From ae434e47d5919a25a3050b2135b1c1702b8cf715 Mon Sep 17 00:00:00 2001 From: "Azure Pipelines (template-sync)" Date: Mon, 3 Aug 2026 09:47:31 +0000 Subject: [PATCH 1/2] Sync docs site template with internal template --- ...chitectureDiagram-3BPJPVTR-F3B6KM45.min.js | 37 +++ ...ectureDiagram-3BPJPVTR-F3B6KM45.min.js.map | 7 + .../blockDiagram-GPEHLZMM-4OU5ZU27.min.js | 133 ++++++++ .../blockDiagram-GPEHLZMM-4OU5ZU27.min.js.map | 7 + .../public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js | 11 + .../c4Diagram-AAUBKEIU-7HP7G5BH.min.js.map | 7 + .../public/chunk-2WVNBDAO.min.js | 63 ++++ .../public/chunk-2WVNBDAO.min.js.map | 7 + .../public/chunk-5JDMXW2E.min.js | 207 +++++++++++++ .../public/chunk-5JDMXW2E.min.js.map | 7 + .../public/chunk-7XSRMU6L.min.js | 2 + .../public/chunk-7XSRMU6L.min.js.map | 7 + .../public/chunk-B7ZLSGB4.min.js | 2 + .../public/chunk-B7ZLSGB4.min.js.map | 7 + .../public/chunk-CLGT2SZG.min.js | 2 + .../public/chunk-CLGT2SZG.min.js.map | 7 + .../public/chunk-LXXU3C6C.min.js | 130 ++++++++ .../public/chunk-LXXU3C6C.min.js.map | 7 + .../public/chunk-MW7YERWN.min.js | 2 + .../public/chunk-MW7YERWN.min.js.map | 7 + .../public/chunk-PNGYEUMH.min.js | 2 + .../public/chunk-PNGYEUMH.min.js.map | 7 + .../public/chunk-SBWG4RFS.min.js | 11 + .../public/chunk-SBWG4RFS.min.js.map | 7 + .../public/chunk-UGAVL4FS.min.js | 232 ++++++++++++++ .../public/chunk-UGAVL4FS.min.js.map | 7 + .../public/chunk-W44GZAG6.min.js | 71 +++++ .../public/chunk-W44GZAG6.min.js.map | 7 + .../public/chunk-WJCDRJGL.min.js | 2 + .../public/chunk-WJCDRJGL.min.js.map | 7 + .../public/chunk-YPRWTSV5.min.js | 3 + .../public/chunk-YPRWTSV5.min.js.map | 7 + .../classDiagram-4FO5ZUOK-LS6BXZZU.min.js | 2 + .../classDiagram-4FO5ZUOK-LS6BXZZU.min.js.map | 7 + .../classDiagram-v2-Q7XG4LA2-ZMVVRICP.min.js | 2 + ...assDiagram-v2-Q7XG4LA2-ZMVVRICP.min.js.map | 7 + .../public/dagre-BM42HDAG-65OGYMYL.min.js | 5 + .../public/dagre-BM42HDAG-65OGYMYL.min.js.map | 7 + .../public/diagram-2AECGRRQ-HHYVX6HC.min.js | 44 +++ .../diagram-2AECGRRQ-HHYVX6HC.min.js.map | 7 + .../public/diagram-5GNKFQAL-4YNHZNEM.min.js | 11 + .../diagram-5GNKFQAL-4YNHZNEM.min.js.map | 7 + .../public/diagram-KO2AKTUF-PQ5RY4Y4.min.js | 4 + .../diagram-KO2AKTUF-PQ5RY4Y4.min.js.map | 7 + .../public/diagram-LMA3HP47-UDH42V23.min.js | 25 ++ .../diagram-LMA3HP47-UDH42V23.min.js.map | 7 + .../public/diagram-OG6HWLK6-RMJPOHR7.min.js | 25 ++ .../diagram-OG6HWLK6-RMJPOHR7.min.js.map | 7 + templates/tabulareditor/public/docfx.min.js | 2 +- .../public/erDiagram-TEJ5UH35-FKJ737I2.min.js | 86 +++++ .../erDiagram-TEJ5UH35-FKJ737I2.min.js.map | 7 + .../flowDiagram-I6XJVG4X-6SJT2VHC.min.js | 163 ++++++++++ .../flowDiagram-I6XJVG4X-6SJT2VHC.min.js.map | 7 + .../ganttDiagram-6RSMTGT7-JNI3JM7G.min.js | 293 ++++++++++++++++++ .../ganttDiagram-6RSMTGT7-JNI3JM7G.min.js.map | 7 + .../gitGraphDiagram-PVQCEYII-SM2UOZJG.min.js | 107 +++++++ ...tGraphDiagram-PVQCEYII-SM2UOZJG.min.js.map | 7 + .../infoDiagram-5YYISTIA-PDRU43OJ.min.js | 3 + .../infoDiagram-5YYISTIA-PDRU43OJ.min.js.map | 7 + .../ishikawaDiagram-YF4QCWOH-RYJC5P7O.min.js | 71 +++++ ...hikawaDiagram-YF4QCWOH-RYJC5P7O.min.js.map | 7 + .../journeyDiagram-JHISSGLW-R7LX2G2G.min.js | 140 +++++++++ ...ourneyDiagram-JHISSGLW-R7LX2G2G.min.js.map | 7 + ...kanban-definition-UN3LZRKU-LLF2RIP2.min.js | 90 ++++++ ...an-definition-UN3LZRKU-LLF2RIP2.min.js.map | 7 + .../public/mermaid.core-4KHAGR56.min.js | 17 + .../public/mermaid.core-4KHAGR56.min.js.map | 7 + ...indmap-definition-RKZ34NQL-W4ITJGDW.min.js | 97 ++++++ ...ap-definition-RKZ34NQL-W4ITJGDW.min.js.map | 7 + .../pieDiagram-4H26LBE5-4XFXH6Y3.min.js | 31 ++ .../pieDiagram-4H26LBE5-4XFXH6Y3.min.js.map | 7 + .../quadrantDiagram-W4KKPZXB-5JBPQOW5.min.js | 8 + ...adrantDiagram-W4KKPZXB-5JBPQOW5.min.js.map | 7 + ...equirementDiagram-4Y6WPE33-4FGUH6YH.min.js | 85 +++++ ...rementDiagram-4Y6WPE33-4FGUH6YH.min.js.map | 7 + .../sankeyDiagram-5OEKKPKP-ZOCY7XZV.min.js | 41 +++ ...sankeyDiagram-5OEKKPKP-ZOCY7XZV.min.js.map | 7 + .../sequenceDiagram-3UESZ5HK-ZFCJ4J76.min.js | 163 ++++++++++ ...quenceDiagram-3UESZ5HK-ZFCJ4J76.min.js.map | 7 + .../stateDiagram-AJRCARHV-FQFN3AJT.min.js | 2 + .../stateDiagram-AJRCARHV-FQFN3AJT.min.js.map | 7 + .../stateDiagram-v2-BHNVJYJU-GH5YX63Z.min.js | 2 + ...ateDiagram-v2-BHNVJYJU-GH5YX63Z.min.js.map | 7 + ...meline-definition-PNZ67QCA-22OFGTTJ.min.js | 121 ++++++++ ...ne-definition-PNZ67QCA-22OFGTTJ.min.js.map | 7 + .../vennDiagram-CIIHVFJN-GU2EPE2R.min.js | 35 +++ .../vennDiagram-CIIHVFJN-GU2EPE2R.min.js.map | 7 + .../wardleyDiagram-YWT4CUSO-LWWW4Q5E.min.js | 79 +++++ ...ardleyDiagram-YWT4CUSO-LWWW4Q5E.min.js.map | 7 + .../xychartDiagram-2RQKCTM6-RFSD5X44.min.js | 8 + ...ychartDiagram-2RQKCTM6-RFSD5X44.min.js.map | 7 + 91 files changed, 2986 insertions(+), 1 deletion(-) create mode 100644 templates/tabulareditor/public/architectureDiagram-3BPJPVTR-F3B6KM45.min.js create mode 100644 templates/tabulareditor/public/architectureDiagram-3BPJPVTR-F3B6KM45.min.js.map create mode 100644 templates/tabulareditor/public/blockDiagram-GPEHLZMM-4OU5ZU27.min.js create mode 100644 templates/tabulareditor/public/blockDiagram-GPEHLZMM-4OU5ZU27.min.js.map create mode 100644 templates/tabulareditor/public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js create mode 100644 templates/tabulareditor/public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js.map create mode 100644 templates/tabulareditor/public/chunk-2WVNBDAO.min.js create mode 100644 templates/tabulareditor/public/chunk-2WVNBDAO.min.js.map create mode 100644 templates/tabulareditor/public/chunk-5JDMXW2E.min.js create mode 100644 templates/tabulareditor/public/chunk-5JDMXW2E.min.js.map create mode 100644 templates/tabulareditor/public/chunk-7XSRMU6L.min.js create mode 100644 templates/tabulareditor/public/chunk-7XSRMU6L.min.js.map create mode 100644 templates/tabulareditor/public/chunk-B7ZLSGB4.min.js create mode 100644 templates/tabulareditor/public/chunk-B7ZLSGB4.min.js.map create mode 100644 templates/tabulareditor/public/chunk-CLGT2SZG.min.js create mode 100644 templates/tabulareditor/public/chunk-CLGT2SZG.min.js.map create mode 100644 templates/tabulareditor/public/chunk-LXXU3C6C.min.js create mode 100644 templates/tabulareditor/public/chunk-LXXU3C6C.min.js.map create mode 100644 templates/tabulareditor/public/chunk-MW7YERWN.min.js create mode 100644 templates/tabulareditor/public/chunk-MW7YERWN.min.js.map create mode 100644 templates/tabulareditor/public/chunk-PNGYEUMH.min.js create mode 100644 templates/tabulareditor/public/chunk-PNGYEUMH.min.js.map create mode 100644 templates/tabulareditor/public/chunk-SBWG4RFS.min.js create mode 100644 templates/tabulareditor/public/chunk-SBWG4RFS.min.js.map create mode 100644 templates/tabulareditor/public/chunk-UGAVL4FS.min.js create mode 100644 templates/tabulareditor/public/chunk-UGAVL4FS.min.js.map create mode 100644 templates/tabulareditor/public/chunk-W44GZAG6.min.js create mode 100644 templates/tabulareditor/public/chunk-W44GZAG6.min.js.map create mode 100644 templates/tabulareditor/public/chunk-WJCDRJGL.min.js create mode 100644 templates/tabulareditor/public/chunk-WJCDRJGL.min.js.map create mode 100644 templates/tabulareditor/public/chunk-YPRWTSV5.min.js create mode 100644 templates/tabulareditor/public/chunk-YPRWTSV5.min.js.map create mode 100644 templates/tabulareditor/public/classDiagram-4FO5ZUOK-LS6BXZZU.min.js create mode 100644 templates/tabulareditor/public/classDiagram-4FO5ZUOK-LS6BXZZU.min.js.map create mode 100644 templates/tabulareditor/public/classDiagram-v2-Q7XG4LA2-ZMVVRICP.min.js create mode 100644 templates/tabulareditor/public/classDiagram-v2-Q7XG4LA2-ZMVVRICP.min.js.map create mode 100644 templates/tabulareditor/public/dagre-BM42HDAG-65OGYMYL.min.js create mode 100644 templates/tabulareditor/public/dagre-BM42HDAG-65OGYMYL.min.js.map create mode 100644 templates/tabulareditor/public/diagram-2AECGRRQ-HHYVX6HC.min.js create mode 100644 templates/tabulareditor/public/diagram-2AECGRRQ-HHYVX6HC.min.js.map create mode 100644 templates/tabulareditor/public/diagram-5GNKFQAL-4YNHZNEM.min.js create mode 100644 templates/tabulareditor/public/diagram-5GNKFQAL-4YNHZNEM.min.js.map create mode 100644 templates/tabulareditor/public/diagram-KO2AKTUF-PQ5RY4Y4.min.js create mode 100644 templates/tabulareditor/public/diagram-KO2AKTUF-PQ5RY4Y4.min.js.map create mode 100644 templates/tabulareditor/public/diagram-LMA3HP47-UDH42V23.min.js create mode 100644 templates/tabulareditor/public/diagram-LMA3HP47-UDH42V23.min.js.map create mode 100644 templates/tabulareditor/public/diagram-OG6HWLK6-RMJPOHR7.min.js create mode 100644 templates/tabulareditor/public/diagram-OG6HWLK6-RMJPOHR7.min.js.map create mode 100644 templates/tabulareditor/public/erDiagram-TEJ5UH35-FKJ737I2.min.js create mode 100644 templates/tabulareditor/public/erDiagram-TEJ5UH35-FKJ737I2.min.js.map create mode 100644 templates/tabulareditor/public/flowDiagram-I6XJVG4X-6SJT2VHC.min.js create mode 100644 templates/tabulareditor/public/flowDiagram-I6XJVG4X-6SJT2VHC.min.js.map create mode 100644 templates/tabulareditor/public/ganttDiagram-6RSMTGT7-JNI3JM7G.min.js create mode 100644 templates/tabulareditor/public/ganttDiagram-6RSMTGT7-JNI3JM7G.min.js.map create mode 100644 templates/tabulareditor/public/gitGraphDiagram-PVQCEYII-SM2UOZJG.min.js create mode 100644 templates/tabulareditor/public/gitGraphDiagram-PVQCEYII-SM2UOZJG.min.js.map create mode 100644 templates/tabulareditor/public/infoDiagram-5YYISTIA-PDRU43OJ.min.js create mode 100644 templates/tabulareditor/public/infoDiagram-5YYISTIA-PDRU43OJ.min.js.map create mode 100644 templates/tabulareditor/public/ishikawaDiagram-YF4QCWOH-RYJC5P7O.min.js create mode 100644 templates/tabulareditor/public/ishikawaDiagram-YF4QCWOH-RYJC5P7O.min.js.map create mode 100644 templates/tabulareditor/public/journeyDiagram-JHISSGLW-R7LX2G2G.min.js create mode 100644 templates/tabulareditor/public/journeyDiagram-JHISSGLW-R7LX2G2G.min.js.map create mode 100644 templates/tabulareditor/public/kanban-definition-UN3LZRKU-LLF2RIP2.min.js create mode 100644 templates/tabulareditor/public/kanban-definition-UN3LZRKU-LLF2RIP2.min.js.map create mode 100644 templates/tabulareditor/public/mermaid.core-4KHAGR56.min.js create mode 100644 templates/tabulareditor/public/mermaid.core-4KHAGR56.min.js.map create mode 100644 templates/tabulareditor/public/mindmap-definition-RKZ34NQL-W4ITJGDW.min.js create mode 100644 templates/tabulareditor/public/mindmap-definition-RKZ34NQL-W4ITJGDW.min.js.map create mode 100644 templates/tabulareditor/public/pieDiagram-4H26LBE5-4XFXH6Y3.min.js create mode 100644 templates/tabulareditor/public/pieDiagram-4H26LBE5-4XFXH6Y3.min.js.map create mode 100644 templates/tabulareditor/public/quadrantDiagram-W4KKPZXB-5JBPQOW5.min.js create mode 100644 templates/tabulareditor/public/quadrantDiagram-W4KKPZXB-5JBPQOW5.min.js.map create mode 100644 templates/tabulareditor/public/requirementDiagram-4Y6WPE33-4FGUH6YH.min.js create mode 100644 templates/tabulareditor/public/requirementDiagram-4Y6WPE33-4FGUH6YH.min.js.map create mode 100644 templates/tabulareditor/public/sankeyDiagram-5OEKKPKP-ZOCY7XZV.min.js create mode 100644 templates/tabulareditor/public/sankeyDiagram-5OEKKPKP-ZOCY7XZV.min.js.map create mode 100644 templates/tabulareditor/public/sequenceDiagram-3UESZ5HK-ZFCJ4J76.min.js create mode 100644 templates/tabulareditor/public/sequenceDiagram-3UESZ5HK-ZFCJ4J76.min.js.map create mode 100644 templates/tabulareditor/public/stateDiagram-AJRCARHV-FQFN3AJT.min.js create mode 100644 templates/tabulareditor/public/stateDiagram-AJRCARHV-FQFN3AJT.min.js.map create mode 100644 templates/tabulareditor/public/stateDiagram-v2-BHNVJYJU-GH5YX63Z.min.js create mode 100644 templates/tabulareditor/public/stateDiagram-v2-BHNVJYJU-GH5YX63Z.min.js.map create mode 100644 templates/tabulareditor/public/timeline-definition-PNZ67QCA-22OFGTTJ.min.js create mode 100644 templates/tabulareditor/public/timeline-definition-PNZ67QCA-22OFGTTJ.min.js.map create mode 100644 templates/tabulareditor/public/vennDiagram-CIIHVFJN-GU2EPE2R.min.js create mode 100644 templates/tabulareditor/public/vennDiagram-CIIHVFJN-GU2EPE2R.min.js.map create mode 100644 templates/tabulareditor/public/wardleyDiagram-YWT4CUSO-LWWW4Q5E.min.js create mode 100644 templates/tabulareditor/public/wardleyDiagram-YWT4CUSO-LWWW4Q5E.min.js.map create mode 100644 templates/tabulareditor/public/xychartDiagram-2RQKCTM6-RFSD5X44.min.js create mode 100644 templates/tabulareditor/public/xychartDiagram-2RQKCTM6-RFSD5X44.min.js.map diff --git a/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-F3B6KM45.min.js b/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-F3B6KM45.min.js new file mode 100644 index 000000000..822c18c6c --- /dev/null +++ b/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-F3B6KM45.min.js @@ -0,0 +1,37 @@ +import{a as qe}from"./chunk-PPWLQFJD.min.js";import{a as ze}from"./chunk-MW7YERWN.min.js";import{a as Qe}from"./chunk-CCNPHFNE.min.js";import"./chunk-IJMU45IO.min.js";import"./chunk-HWCHFEAH.min.js";import"./chunk-OH5PAVPX.min.js";import"./chunk-RN42Y33E.min.js";import"./chunk-XNJBVM5Z.min.js";import"./chunk-Q5YIQYCF.min.js";import"./chunk-4HQ5XQBY.min.js";import"./chunk-X6TCRES7.min.js";import"./chunk-P3KXGIV7.min.js";import"./chunk-NE3GILF7.min.js";import"./chunk-25XGUDQ5.min.js";import{b as ke,c as Ze,d as he,f as le}from"./chunk-W44GZAG6.min.js";import{a as me}from"./chunk-G3CW6HDB.min.js";import{o as Be,s as $e}from"./chunk-YPRWTSV5.min.js";import"./chunk-HCOLC5CQ.min.js";import{B as Se,H as Fe,P as be,T as Pe,U as Ge,V as Ue,W as Ye,X as Xe,Y as He,Z as We,_ as se,r as Re}from"./chunk-LXXU3C6C.min.js";import{b as ct,d as ye,j as Ve}from"./chunk-BJGJ3C53.min.js";import{a as pe,c as ur}from"./chunk-MY7PHHTQ.min.js";var Te=pe((re,Ee)=>{(function(w,N){typeof re=="object"&&typeof Ee=="object"?Ee.exports=N():typeof define=="function"&&define.amd?define([],N):typeof re=="object"?re.layoutBase=N():w.layoutBase=N()})(re,function(){return(function(E){var w={};function N(u){if(w[u])return w[u].exports;var l=w[u]={i:u,l:!1,exports:{}};return E[u].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=E,N.c=w,N.i=function(u){return u},N.d=function(u,l,a){N.o(u,l)||Object.defineProperty(u,l,{configurable:!1,enumerable:!0,get:a})},N.n=function(u){var l=u&&u.__esModule?function(){return u.default}:function(){return u};return N.d(l,"a",l),l},N.o=function(u,l){return Object.prototype.hasOwnProperty.call(u,l)},N.p="",N(N.s=28)})([(function(E,w,N){"use strict";function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(8),a=N(9);function r(f,e,c){u.call(this,c),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=c,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(u.prototype);for(var n in u)r[n]=u[n];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,e){for(var c=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(c.getOwner()==e)return c;if(c.getOwner()==t)break;c=c.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},E.exports=r}),(function(E,w,N){"use strict";function u(l){this.vGraphObject=l}E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(10),a=N(13),r=N(0),n=N(16),f=N(5);function e(t,i,h,g){h==null&&g==null&&(g=i),u.call(this,g),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=t,h!=null&&i!=null?this.rect=new a(i.x,i.y,h.width,h.height):this.rect=new a}e.prototype=Object.create(u.prototype);for(var c in u)e[c]=u[c];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,i){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=i.width,this.rect.height=i.height},e.prototype.setCenter=function(t,i){this.rect.x=t-this.rect.width/2,this.rect.y=i-this.rect.height/2},e.prototype.setLocation=function(t,i){this.rect.x=t,this.rect.y=i},e.prototype.moveBy=function(t,i){this.rect.x+=t,this.rect.y+=i},e.prototype.getEdgeListToNode=function(t){var i=[],h,g=this;return g.edges.forEach(function(s){if(s.target==t){if(s.source!=g)throw"Incorrect edge source!";i.push(s)}}),i},e.prototype.getEdgesBetween=function(t){var i=[],h,g=this;return g.edges.forEach(function(s){if(!(s.source==g||s.target==g))throw"Incorrect edge source and/or target";(s.target==t||s.source==t)&&i.push(s)}),i},e.prototype.getNeighborsList=function(){var t=new Set,i=this;return i.edges.forEach(function(h){if(h.source==i)t.add(h.target);else{if(h.target!=i)throw"Incorrect incidency!";t.add(h.source)}}),t},e.prototype.withChildren=function(){var t=new Set,i,h;if(t.add(this),this.child!=null)for(var g=this.child.getNodes(),s=0;si?(this.rect.x-=(this.labelWidth-i)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(i+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(h+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>h?(this.rect.y-=(this.labelHeight-h)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(h+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var i=this.rect.x;i>r.WORLD_BOUNDARY?i=r.WORLD_BOUNDARY:i<-r.WORLD_BOUNDARY&&(i=-r.WORLD_BOUNDARY);var h=this.rect.y;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var g=new f(i,h),s=t.inverseTransformPoint(g);this.setLocation(s.x,s.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},E.exports=e}),(function(E,w,N){"use strict";var u=N(0);function l(){}for(var a in u)l[a]=u[a];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,E.exports=l}),(function(E,w,N){"use strict";function u(l,a){l==null&&a==null?(this.x=0,this.y=0):(this.x=l,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(l){this.x=l},u.prototype.setY=function(l){this.y=l},u.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},E.exports=u}),(function(E,w,N){"use strict";var u=N(2),l=N(10),a=N(0),r=N(7),n=N(3),f=N(1),e=N(13),c=N(12),t=N(11);function i(g,s,L){u.call(this,L),this.estimatedSize=l.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,s!=null&&s instanceof r?this.graphManager=s:s!=null&&s instanceof Layout&&(this.graphManager=s.graphManager)}i.prototype=Object.create(u.prototype);for(var h in u)i[h]=u[h];i.prototype.getNodes=function(){return this.nodes},i.prototype.getEdges=function(){return this.edges},i.prototype.getGraphManager=function(){return this.graphManager},i.prototype.getParent=function(){return this.parent},i.prototype.getLeft=function(){return this.left},i.prototype.getRight=function(){return this.right},i.prototype.getTop=function(){return this.top},i.prototype.getBottom=function(){return this.bottom},i.prototype.isConnected=function(){return this.isConnected},i.prototype.add=function(g,s,L){if(s==null&&L==null){var y=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(y)>-1)throw"Node already in graph!";return y.owner=this,this.getNodes().push(y),y}else{var p=g;if(!(this.getNodes().indexOf(s)>-1&&this.getNodes().indexOf(L)>-1))throw"Source or target not in graph!";if(!(s.owner==L.owner&&s.owner==this))throw"Both owners must be this graph!";return s.owner!=L.owner?null:(p.source=s,p.target=L,p.isInterGraph=!1,this.getEdges().push(p),s.edges.push(p),L!=s&&L.edges.push(p),p)}},i.prototype.remove=function(g){var s=g;if(g instanceof n){if(s==null)throw"Node is null!";if(!(s.owner!=null&&s.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var L=s.edges.slice(),y,p=L.length,C=0;C-1&&b>-1))throw"Source and/or target doesn't know this edge!";y.source.edges.splice(A,1),y.target!=y.source&&y.target.edges.splice(b,1);var R=y.source.owner.getEdges().indexOf(y);if(R==-1)throw"Not in owner's edge list!";y.source.owner.getEdges().splice(R,1)}},i.prototype.updateLeftTop=function(){for(var g=l.MAX_VALUE,s=l.MAX_VALUE,L,y,p,C=this.getNodes(),R=C.length,A=0;AL&&(g=L),s>y&&(s=y)}return g==l.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?p=C[0].getParent().paddingLeft:p=this.margin,this.left=s-p,this.top=g-p,new c(this.left,this.top))},i.prototype.updateBounds=function(g){for(var s=l.MAX_VALUE,L=-l.MAX_VALUE,y=l.MAX_VALUE,p=-l.MAX_VALUE,C,R,A,b,W,G=this.nodes,J=G.length,x=0;xC&&(s=C),LA&&(y=A),pC&&(s=C),LA&&(y=A),p=this.nodes.length){var J=0;L.forEach(function(x){x.owner==g&&J++}),J==this.nodes.length&&(this.isConnected=!0)}},E.exports=i}),(function(E,w,N){"use strict";var u,l=N(1);function a(r){u=N(6),this.layout=r,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var r=this.layout.newGraph(),n=this.layout.newNode(null),f=this.add(r,n);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(r,n,f,e,c){if(f==null&&e==null&&c==null){if(r==null)throw"Graph is null!";if(n==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(n.child!=null)throw"Already has a child!";return r.parent=n,n.child=r,r}else{c=f,e=n,f=r;var t=e.getOwner(),i=c.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(i!=null&&i.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==i)return f.isInterGraph=!1,t.add(f,e,c);if(f.isInterGraph=!0,f.source=e,f.target=c,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},a.prototype.remove=function(r){if(r instanceof u){var n=r;if(n.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(n==this.rootGraph||n.parent!=null&&n.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(n.getEdges());for(var e,c=f.length,t=0;t=r.getRight()?n[0]+=Math.min(r.getX()-a.getX(),a.getRight()-r.getRight()):r.getX()<=a.getX()&&r.getRight()>=a.getRight()&&(n[0]+=Math.min(a.getX()-r.getX(),r.getRight()-a.getRight())),a.getY()<=r.getY()&&a.getBottom()>=r.getBottom()?n[1]+=Math.min(r.getY()-a.getY(),a.getBottom()-r.getBottom()):r.getY()<=a.getY()&&r.getBottom()>=a.getBottom()&&(n[1]+=Math.min(a.getY()-r.getY(),r.getBottom()-a.getBottom()));var c=Math.abs((r.getCenterY()-a.getCenterY())/(r.getCenterX()-a.getCenterX()));r.getCenterY()===a.getCenterY()&&r.getCenterX()===a.getCenterX()&&(c=1);var t=c*n[0],i=n[1]/c;n[0]t)return n[0]=f,n[1]=h,n[2]=c,n[3]=G,!1;if(ec)return n[0]=i,n[1]=e,n[2]=b,n[3]=t,!1;if(fc?(n[0]=s,n[1]=L,o=!0):(n[0]=g,n[1]=h,o=!0):d===v&&(f>c?(n[0]=i,n[1]=h,o=!0):(n[0]=y,n[1]=L,o=!0)),-T===v?c>f?(n[2]=W,n[3]=G,m=!0):(n[2]=b,n[3]=A,m=!0):T===v&&(c>f?(n[2]=R,n[3]=A,m=!0):(n[2]=J,n[3]=G,m=!0)),o&&m)return!1;if(f>c?e>t?(D=this.getCardinalDirection(d,v,4),O=this.getCardinalDirection(T,v,2)):(D=this.getCardinalDirection(-d,v,3),O=this.getCardinalDirection(-T,v,1)):e>t?(D=this.getCardinalDirection(-d,v,1),O=this.getCardinalDirection(-T,v,3)):(D=this.getCardinalDirection(d,v,2),O=this.getCardinalDirection(T,v,4)),!o)switch(D){case 1:S=h,P=f+-C/v,n[0]=P,n[1]=S;break;case 2:P=y,S=e+p*v,n[0]=P,n[1]=S;break;case 3:S=L,P=f+C/v,n[0]=P,n[1]=S;break;case 4:P=s,S=e+-p*v,n[0]=P,n[1]=S;break}if(!m)switch(O){case 1:Z=A,I=c+-z/v,n[2]=I,n[3]=Z;break;case 2:I=J,Z=t+x*v,n[2]=I,n[3]=Z;break;case 3:Z=G,I=c+z/v,n[2]=I,n[3]=Z;break;case 4:I=W,Z=t+-x*v,n[2]=I,n[3]=Z;break}}return!1},l.getCardinalDirection=function(a,r,n){return a>r?n:1+n%4},l.getIntersection=function(a,r,n,f){if(f==null)return this.getIntersection2(a,r,n);var e=a.x,c=a.y,t=r.x,i=r.y,h=n.x,g=n.y,s=f.x,L=f.y,y=void 0,p=void 0,C=void 0,R=void 0,A=void 0,b=void 0,W=void 0,G=void 0,J=void 0;return C=i-c,A=e-t,W=t*c-e*i,R=L-g,b=h-s,G=s*g-h*L,J=C*b-R*A,J===0?null:(y=(A*G-b*W)/J,p=(R*W-C*G)/J,new u(y,p))},l.angleOfVector=function(a,r,n,f){var e=void 0;return a!==n?(e=Math.atan((f-r)/(n-a)),n=0){var L=(-h+Math.sqrt(h*h-4*i*g))/(2*i),y=(-h-Math.sqrt(h*h-4*i*g))/(2*i),p=null;return L>=0&&L<=1?[L]:y>=0&&y<=1?[y]:p}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,E.exports=l}),(function(E,w,N){"use strict";function u(){}u.sign=function(l){return l>0?1:l<0?-1:0},u.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},u.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},E.exports=u}),(function(E,w,N){"use strict";function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,E.exports=u}),(function(E,w,N){"use strict";var u=(function(){function e(c,t){for(var i=0;i"u"?"undefined":u(a);return a==null||r!="object"&&r!="function"},E.exports=l}),(function(E,w,N){"use strict";function u(h){if(Array.isArray(h)){for(var g=0,s=Array(h.length);g0&&g;){for(C.push(A[0]);C.length>0&&g;){var b=C[0];C.splice(0,1),p.add(b);for(var W=b.getEdges(),y=0;y-1&&A.splice(z,1)}p=new Set,R=new Map}}return h},i.prototype.createDummyNodesForBendpoints=function(h){for(var g=[],s=h.source,L=this.graphManager.calcLowestCommonAncestor(h.source,h.target),y=0;y0){for(var L=this.edgeToDummyNodes.get(s),y=0;y=0&&g.splice(G,1);var J=R.getNeighborsList();J.forEach(function(o){if(s.indexOf(o)<0){var m=L.get(o),d=m-1;d==1&&b.push(o),L.set(o,d)}})}s=s.concat(b),(g.length==1||g.length==2)&&(y=!0,p=g[0])}return p},i.prototype.setGraphManager=function(h){this.graphManager=h},E.exports=i}),(function(E,w,N){"use strict";function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},E.exports=u}),(function(E,w,N){"use strict";var u=N(5);function l(a,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(a){this.lworldExtX=a},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(a){this.lworldExtY=a},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},l.prototype.transformX=function(a){var r=0,n=this.lworldExtX;return n!=0&&(r=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/n),r},l.prototype.transformY=function(a){var r=0,n=this.lworldExtY;return n!=0&&(r=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/n),r},l.prototype.inverseTransformX=function(a){var r=0,n=this.ldeviceExtX;return n!=0&&(r=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/n),r},l.prototype.inverseTransformY=function(a){var r=0,n=this.ldeviceExtY;return n!=0&&(r=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/n),r},l.prototype.inverseTransformPoint=function(a){var r=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return r},E.exports=l}),(function(E,w,N){"use strict";function u(t){if(Array.isArray(t)){for(var i=0,h=Array(t.length);ia.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),i,h=0;h0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,h,g,s,L,y=this.getAllNodes(),p;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),p=new Set,h=0;hC||p>C)&&(t.gravitationForceX=-this.gravityConstant*s,t.gravitationForceY=-this.gravityConstant*L)):(C=i.getEstimatedSize()*this.compoundGravityRangeFactor,(y>C||p>C)&&(t.gravitationForceX=-this.gravityConstant*s*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*L*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,i=!1;return this.totalIterations>this.maxIterations/3&&(i=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=y.length||C>=y[0].length)){for(var R=0;Re}}]),n})();E.exports=r}),(function(E,w,N){"use strict";function u(){}u.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var a=Math.min(this.m,this.n);this.s=(function(Dt){for(var Nt=[];Dt-- >0;)Nt.push(0);return Nt})(Math.min(this.m+1,this.n)),this.U=(function(Dt){var Nt=function $t(Rt){if(Rt.length==0)return 0;for(var Xt=[],zt=0;zt0;)Nt.push(0);return Nt})(this.n),n=(function(Dt){for(var Nt=[];Dt-- >0;)Nt.push(0);return Nt})(this.m),f=!0,e=!0,c=Math.min(this.m-1,this.n),t=Math.max(0,Math.min(this.n-2,this.m)),i=0;i=0;v--)if(this.s[v]!==0){for(var D=v+1;D=0;F--){if((function(Dt,Nt){return Dt&&Nt})(F0;){var Q=void 0,Ut=void 0;for(Q=m-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(r[Q])<=St+Lt*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){r[Q]=0;break}if(Q===m-2)Ut=4;else{var Mt=void 0;for(Mt=m-1;Mt>=Q&&Mt!==Q;Mt--){var at=(Mt!==m?Math.abs(r[Mt]):0)+(Mt!==Q+1?Math.abs(r[Mt-1]):0);if(Math.abs(this.s[Mt])<=St+Lt*at){this.s[Mt]=0;break}}Mt===Q?Ut=3:Mt===m-1?Ut=1:(Ut=2,Q=Mt)}switch(Q++,Ut){case 1:{var et=r[m-2];r[m-2]=0;for(var pt=m-2;pt>=Q;pt--){var mt=u.hypot(this.s[pt],et),Ct=this.s[pt]/mt,Et=et/mt;if(this.s[pt]=mt,pt!==Q&&(et=-Et*r[pt-1],r[pt-1]=Ct*r[pt-1]),e)for(var Tt=0;Tt=this.s[Q+1]);){var lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=lt,e&&QMath.abs(a)?(r=a/l,r=Math.abs(l)*Math.sqrt(1+r*r)):a!=0?(r=l/a,r=Math.abs(a)*Math.sqrt(1+r*r)):r=0,r},E.exports=u}),(function(E,w,N){"use strict";var u=(function(){function r(n,f){for(var e=0;e2&&arguments[2]!==void 0?arguments[2]:1,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=n,this.sequence2=f,this.match_score=e,this.mismatch_penalty=c,this.gap_penalty=t,this.iMax=n.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var i=0;i=0;n--){var f=this.listeners[n];f.event===a&&f.callback===r&&this.listeners.splice(n,1)}},l.emit=function(a,r){for(var n=0;n{(function(w,N){typeof ie=="object"&&typeof Ne=="object"?Ne.exports=N(Te()):typeof define=="function"&&define.amd?define(["layout-base"],N):typeof ie=="object"?ie.coseBase=N(Te()):w.coseBase=N(w.layoutBase)})(ie,function(E){return(()=>{"use strict";var w={45:((a,r,n)=>{var f={};f.layoutBase=n(551),f.CoSEConstants=n(806),f.CoSEEdge=n(767),f.CoSEGraph=n(880),f.CoSEGraphManager=n(578),f.CoSELayout=n(765),f.CoSENode=n(991),f.ConstraintHandler=n(902),a.exports=f}),806:((a,r,n)=>{var f=n(551).FDLayoutConstants;function e(){}for(var c in f)e[c]=f[c];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,a.exports=e}),767:((a,r,n)=>{var f=n(551).FDLayoutEdge;function e(t,i,h){f.call(this,t,i,h)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),880:((a,r,n)=>{var f=n(551).LGraph;function e(t,i,h){f.call(this,t,i,h)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),578:((a,r,n)=>{var f=n(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var c in f)e[c]=f[c];a.exports=e}),765:((a,r,n)=>{var f=n(551).FDLayout,e=n(578),c=n(880),t=n(991),i=n(767),h=n(806),g=n(902),s=n(551).FDLayoutConstants,L=n(551).LayoutConstants,y=n(551).Point,p=n(551).PointD,C=n(551).DimensionD,R=n(551).Layout,A=n(551).Integer,b=n(551).IGeometry,W=n(551).LGraph,G=n(551).Transform,J=n(551).LinkedList;function x(){f.call(this),this.toBeTiled={},this.constraints={}}x.prototype=Object.create(f.prototype);for(var z in f)x[z]=f[z];x.prototype.newGraphManager=function(){var o=new e(this);return this.graphManager=o,o},x.prototype.newGraph=function(o){return new c(null,this.graphManager,o)},x.prototype.newNode=function(o){return new t(this.graphManager,o)},x.prototype.newEdge=function(o){return new i(null,null,o)},x.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=s.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=s.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=s.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/s.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){var o=L.DEFAULT_CREATE_BENDS_AS_NEEDED;return o&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(h.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(D){return m.has(D)});this.graphManager.setAllNodesToApplyGravitation(d)}}else{var o=this.getFlatForest();if(o.length>0)this.positionNodesRadially(o);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(T){return m.has(T)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),h.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%s.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var o=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(v){return o.has(v)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),h.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),h.PURE_INCREMENTAL?this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=s.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var d=!this.isTreeGrowing&&!this.isGrowthFinished,T=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(d,T),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var o=this.graphManager.getAllNodes(),m={},d=0;d0&&this.updateDisplacements();for(var d=0;d0&&(T.fixedNodeWeight=D)}}if(this.constraints.relativePlacementConstraint){var O=new Map,P=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(M){o.fixedNodesOnHorizontal.add(M),o.fixedNodesOnVertical.add(M)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var S=this.constraints.alignmentConstraint.vertical,d=0;d=2*M.length/3;K--)Y=Math.floor(Math.random()*(K+1)),X=M[K],M[K]=M[Y],M[Y]=X;return M},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var Y=O.has(M.left)?O.get(M.left):M.left,X=O.has(M.right)?O.get(M.right):M.right;o.nodesInRelativeHorizontal.includes(Y)||(o.nodesInRelativeHorizontal.push(Y),o.nodeToRelativeConstraintMapHorizontal.set(Y,[]),o.dummyToNodeForVerticalAlignment.has(Y)?o.nodeToTempPositionMapHorizontal.set(Y,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(Y)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(Y,o.idToNodeMap.get(Y).getCenterX())),o.nodesInRelativeHorizontal.includes(X)||(o.nodesInRelativeHorizontal.push(X),o.nodeToRelativeConstraintMapHorizontal.set(X,[]),o.dummyToNodeForVerticalAlignment.has(X)?o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(o.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):o.nodeToTempPositionMapHorizontal.set(X,o.idToNodeMap.get(X).getCenterX())),o.nodeToRelativeConstraintMapHorizontal.get(Y).push({right:X,gap:M.gap}),o.nodeToRelativeConstraintMapHorizontal.get(X).push({left:Y,gap:M.gap})}else{var K=P.has(M.top)?P.get(M.top):M.top,st=P.has(M.bottom)?P.get(M.bottom):M.bottom;o.nodesInRelativeVertical.includes(K)||(o.nodesInRelativeVertical.push(K),o.nodeToRelativeConstraintMapVertical.set(K,[]),o.dummyToNodeForHorizontalAlignment.has(K)?o.nodeToTempPositionMapVertical.set(K,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(K)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(K,o.idToNodeMap.get(K).getCenterY())),o.nodesInRelativeVertical.includes(st)||(o.nodesInRelativeVertical.push(st),o.nodeToRelativeConstraintMapVertical.set(st,[]),o.dummyToNodeForHorizontalAlignment.has(st)?o.nodeToTempPositionMapVertical.set(st,o.idToNodeMap.get(o.dummyToNodeForHorizontalAlignment.get(st)[0]).getCenterY()):o.nodeToTempPositionMapVertical.set(st,o.idToNodeMap.get(st).getCenterY())),o.nodeToRelativeConstraintMapVertical.get(K).push({bottom:st,gap:M.gap}),o.nodeToRelativeConstraintMapVertical.get(st).push({top:K,gap:M.gap})}});else{var Z=new Map,tt=new Map;this.constraints.relativePlacementConstraint.forEach(function(M){if(M.left){var Y=O.has(M.left)?O.get(M.left):M.left,X=O.has(M.right)?O.get(M.right):M.right;Z.has(Y)?Z.get(Y).push(X):Z.set(Y,[X]),Z.has(X)?Z.get(X).push(Y):Z.set(X,[Y])}else{var K=P.has(M.top)?P.get(M.top):M.top,st=P.has(M.bottom)?P.get(M.bottom):M.bottom;tt.has(K)?tt.get(K).push(st):tt.set(K,[st]),tt.has(st)?tt.get(st).push(K):tt.set(st,[K])}});var F=function(Y,X){var K=[],st=[],Lt=new J,St=new Set,Q=0;return Y.forEach(function(Ut,Mt){if(!St.has(Mt)){K[Q]=[],st[Q]=!1;var at=Mt;for(Lt.push(at),St.add(at),K[Q].push(at);Lt.length!=0;){at=Lt.shift(),X.has(at)&&(st[Q]=!0);var et=Y.get(at);et.forEach(function(pt){St.has(pt)||(Lt.push(pt),St.add(pt),K[Q].push(pt))})}Q++}}),{components:K,isFixed:st}},_=F(Z,o.fixedNodesOnHorizontal);this.componentsOnHorizontal=_.components,this.fixedComponentsOnHorizontal=_.isFixed;var B=F(tt,o.fixedNodesOnVertical);this.componentsOnVertical=B.components,this.fixedComponentsOnVertical=B.isFixed}}},x.prototype.updateDisplacements=function(){var o=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(B){var M=o.idToNodeMap.get(B.nodeId);M.displacementX=0,M.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,d=0;d1){var P;for(P=0;PT&&(T=Math.floor(O.y)),D=Math.floor(O.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(L.WORLD_CENTER_X-O.x/2,L.WORLD_CENTER_Y-O.y/2))},x.radialLayout=function(o,m,d){var T=Math.max(this.maxDiagonalInTree(o),h.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(m,null,0,359,0,T);var v=W.calculateBounds(o),D=new G;D.setDeviceOrgX(v.getMinX()),D.setDeviceOrgY(v.getMinY()),D.setWorldOrgX(d.x),D.setWorldOrgY(d.y);for(var O=0;O1;){var K=X[0];X.splice(0,1);var st=F.indexOf(K);st>=0&&F.splice(st,1),M--,_--}m!=null?Y=(F.indexOf(X[0])+1)%M:Y=0;for(var Lt=Math.abs(T-d)/_,St=Y;B!=_;St=++St%M){var Q=F[St].getOtherEnd(o);if(Q!=m){var Ut=(d+B*Lt)%360,Mt=(Ut+Lt)%360;x.branchRadialLayout(Q,o,Ut,Mt,v+D,D),B++}}},x.maxDiagonalInTree=function(o){for(var m=A.MIN_VALUE,d=0;dm&&(m=v)}return m},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var o=this,m={};this.memberGroups={},this.idToDummyNode={};for(var d=[],T=this.graphManager.getAllNodes(),v=0;v"u"&&(m[P]=[]),m[P]=m[P].concat(D)}Object.keys(m).forEach(function(S){if(m[S].length>1){var I="DummyCompound_"+S;o.memberGroups[I]=m[S];var Z=m[S][0].getParent(),tt=new t(o.graphManager);tt.id=I,tt.paddingLeft=Z.paddingLeft||0,tt.paddingRight=Z.paddingRight||0,tt.paddingBottom=Z.paddingBottom||0,tt.paddingTop=Z.paddingTop||0,o.idToDummyNode[I]=tt;var F=o.getGraphManager().add(o.newGraph(),tt),_=Z.getChild();_.add(tt);for(var B=0;Bv?(T.rect.x-=(T.labelWidth-v)/2,T.setWidth(T.labelWidth),T.labelMarginLeft=(T.labelWidth-v)/2):T.labelPosHorizontal=="right"&&T.setWidth(v+T.labelWidth)),T.labelHeight&&(T.labelPosVertical=="top"?(T.rect.y-=T.labelHeight,T.setHeight(D+T.labelHeight),T.labelMarginTop=T.labelHeight):T.labelPosVertical=="center"&&T.labelHeight>D?(T.rect.y-=(T.labelHeight-D)/2,T.setHeight(T.labelHeight),T.labelMarginTop=(T.labelHeight-D)/2):T.labelPosVertical=="bottom"&&T.setHeight(D+T.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var o=this.compoundOrder.length-1;o>=0;o--){var m=this.compoundOrder[o],d=m.id,T=m.paddingLeft,v=m.paddingTop,D=m.labelMarginLeft,O=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[d],m.rect.x,m.rect.y,T,v,D,O)}},x.prototype.repopulateZeroDegreeMembers=function(){var o=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(d){var T=o.idToDummyNode[d],v=T.paddingLeft,D=T.paddingTop,O=T.labelMarginLeft,P=T.labelMarginTop;o.adjustLocations(m[d],T.rect.x,T.rect.y,v,D,O,P)})},x.prototype.getToBeTiled=function(o){var m=o.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var d=o.getChild();if(d==null)return this.toBeTiled[m]=!1,!1;for(var T=d.getNodes(),v=0;v0)return this.toBeTiled[m]=!1,!1;if(D.getChild()==null){this.toBeTiled[D.id]=!1;continue}if(!this.getToBeTiled(D))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},x.prototype.getNodeDegree=function(o){for(var m=o.id,d=o.getEdges(),T=0,v=0;vZ&&(Z=F.rect.height)}d+=Z+o.verticalPadding}},x.prototype.tileCompoundMembers=function(o,m){var d=this;this.tiledMemberPack=[],Object.keys(o).forEach(function(T){var v=m[T];if(d.tiledMemberPack[T]=d.tileNodes(o[T],v.paddingLeft+v.paddingRight),v.rect.width=d.tiledMemberPack[T].width,v.rect.height=d.tiledMemberPack[T].height,v.setCenter(d.tiledMemberPack[T].centerX,d.tiledMemberPack[T].centerY),v.labelMarginLeft=0,v.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var D=v.rect.width,O=v.rect.height;v.labelWidth&&(v.labelPosHorizontal=="left"?(v.rect.x-=v.labelWidth,v.setWidth(D+v.labelWidth),v.labelMarginLeft=v.labelWidth):v.labelPosHorizontal=="center"&&v.labelWidth>D?(v.rect.x-=(v.labelWidth-D)/2,v.setWidth(v.labelWidth),v.labelMarginLeft=(v.labelWidth-D)/2):v.labelPosHorizontal=="right"&&v.setWidth(D+v.labelWidth)),v.labelHeight&&(v.labelPosVertical=="top"?(v.rect.y-=v.labelHeight,v.setHeight(O+v.labelHeight),v.labelMarginTop=v.labelHeight):v.labelPosVertical=="center"&&v.labelHeight>O?(v.rect.y-=(v.labelHeight-O)/2,v.setHeight(v.labelHeight),v.labelMarginTop=(v.labelHeight-O)/2):v.labelPosVertical=="bottom"&&v.setHeight(O+v.labelHeight))}})},x.prototype.tileNodes=function(o,m){var d=this.tileNodesByFavoringDim(o,m,!0),T=this.tileNodesByFavoringDim(o,m,!1),v=this.getOrgRatio(d),D=this.getOrgRatio(T),O;return DP&&(P=B.getWidth())});var S=D/v,I=O/v,Z=Math.pow(d-T,2)+4*(S+T)*(I+d)*v,tt=(T-d+Math.sqrt(Z))/(2*(S+T)),F;m?(F=Math.ceil(tt),F==tt&&F++):F=Math.floor(tt);var _=F*(S+T)-T;return P>_&&(_=P),_+=T*2,_},x.prototype.tileNodesByFavoringDim=function(o,m,d){var T=h.TILING_PADDING_VERTICAL,v=h.TILING_PADDING_HORIZONTAL,D=h.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:T,horizontalPadding:v,centerX:0,centerY:0};D&&(O.idealRowWidth=this.calcIdealRowWidth(o,d));var P=function(M){return M.rect.width*M.rect.height},S=function(M,Y){return P(Y)-P(M)};o.sort(function(B,M){var Y=S;return O.idealRowWidth?(Y=D,Y(B.id,M.id)):Y(B,M)});for(var I=0,Z=0,tt=0;tt0&&(O+=o.horizontalPadding),o.rowWidth[d]=O,o.width0&&(P+=o.verticalPadding);var S=0;P>o.rowHeight[d]&&(S=o.rowHeight[d],o.rowHeight[d]=P,S=o.rowHeight[d]-S),o.height+=S,o.rows[d].push(m)},x.prototype.getShortestRowIndex=function(o){for(var m=-1,d=Number.MAX_VALUE,T=0;Td&&(m=T,d=o.rowWidth[T]);return m},x.prototype.canAddHorizontal=function(o,m,d){if(o.idealRowWidth){var T=o.rows.length-1,v=o.rowWidth[T];return v+m+o.horizontalPadding<=o.idealRowWidth}var D=this.getShortestRowIndex(o);if(D<0)return!0;var O=o.rowWidth[D];if(O+o.horizontalPadding+m<=o.width)return!0;var P=0;o.rowHeight[D]0&&(P=d+o.verticalPadding-o.rowHeight[D]);var S;o.width-O>=m+o.horizontalPadding?S=(o.height+P)/(O+m+o.horizontalPadding):S=(o.height+P)/o.width,P=d+o.verticalPadding;var I;return o.widthD&&m!=d){T.splice(-1,1),o.rows[d].push(v),o.rowWidth[m]=o.rowWidth[m]-D,o.rowWidth[d]=o.rowWidth[d]+D,o.width=o.rowWidth[instance.getLongestRowIndex(o)];for(var O=Number.MIN_VALUE,P=0;PO&&(O=T[P].height);m>0&&(O+=o.verticalPadding);var S=o.rowHeight[m]+o.rowHeight[d];o.rowHeight[m]=O,o.rowHeight[d]0)for(var _=v;_<=D;_++)F[0]+=this.grid[_][O-1].length+this.grid[_][O].length-1;if(D0)for(var _=O;_<=P;_++)F[3]+=this.grid[v-1][_].length+this.grid[v][_].length-1;for(var B=A.MAX_VALUE,M,Y,X=0;X{var f=n(551).FDLayoutNode,e=n(551).IMath;function c(i,h,g,s){f.call(this,i,h,g,s)}c.prototype=Object.create(f.prototype);for(var t in f)c[t]=f[t];c.prototype.calculateDisplacement=function(){var i=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=i.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=i.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=i.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=i.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>i.coolingFactor*i.maxNodeDisplacement&&(this.displacementX=i.coolingFactor*i.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>i.coolingFactor*i.maxNodeDisplacement&&(this.displacementY=i.coolingFactor*i.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},c.prototype.propogateDisplacementToChildren=function(i,h){for(var g=this.getChild().getNodes(),s,L=0;L{function f(g){if(Array.isArray(g)){for(var s=0,L=Array(g.length);s0){var dt=0;it.forEach(function(lt){V=="horizontal"?(q.set(lt,y.has(lt)?p[y.get(lt)]:k.get(lt)),dt+=q.get(lt)):(q.set(lt,y.has(lt)?C[y.get(lt)]:k.get(lt)),dt+=q.get(lt))}),dt=dt/it.length,ot.forEach(function(lt){$.has(lt)||q.set(lt,dt)})}else{var nt=0;ot.forEach(function(lt){V=="horizontal"?nt+=y.has(lt)?p[y.get(lt)]:k.get(lt):nt+=y.has(lt)?C[y.get(lt)]:k.get(lt)}),nt=nt/ot.length,ot.forEach(function(lt){q.set(lt,nt)})}});for(var rt=function(){var it=gt.shift(),dt=H.get(it);dt.forEach(function(nt){if(q.get(nt.id)lt&&(lt=Xt),ztFt&&(Ft=zt)}}catch(_t){Vt=!0,Dt=_t}finally{try{!xt&&Nt.return&&Nt.return()}finally{if(Vt)throw Dt}}var ce=(dt+lt)/2-(nt+Ft)/2,qt=!0,Jt=!1,Kt=void 0;try{for(var Qt=ot[Symbol.iterator](),oe;!(qt=(oe=Qt.next()).done);qt=!0){var jt=oe.value;q.set(jt,q.get(jt)+ce)}}catch(_t){Jt=!0,Kt=_t}finally{try{!qt&&Qt.return&&Qt.return()}finally{if(Jt)throw Kt}}})}return q},z=function(H){var V=0,$=0,k=0,j=0;if(H.forEach(function(ht){ht.left?p[y.get(ht.left)]-p[y.get(ht.right)]>=0?V++:$++:C[y.get(ht.top)]-C[y.get(ht.bottom)]>=0?k++:j++}),V>$&&k>j)for(var ut=0;ut$)for(var ft=0;ftj)for(var q=0;q1)s.fixedNodeConstraint.forEach(function(U,H){T[H]=[U.position.x,U.position.y],v[H]=[p[y.get(U.nodeId)],C[y.get(U.nodeId)]]}),D=!0;else if(s.alignmentConstraint)(function(){var U=0;if(s.alignmentConstraint.vertical){for(var H=s.alignmentConstraint.vertical,V=function(q){var ht=new Set;H[q].forEach(function(vt){ht.add(vt)});var gt=new Set([].concat(f(ht)).filter(function(vt){return P.has(vt)})),rt=void 0;gt.size>0?rt=p[y.get(gt.values().next().value)]:rt=J(ht).x,H[q].forEach(function(vt){T[U]=[rt,C[y.get(vt)]],v[U]=[p[y.get(vt)],C[y.get(vt)]],U++})},$=0;$0?rt=p[y.get(gt.values().next().value)]:rt=J(ht).y,k[q].forEach(function(vt){T[U]=[p[y.get(vt)],rt],v[U]=[p[y.get(vt)],C[y.get(vt)]],U++})},ut=0;uttt&&(tt=Z[_].length,F=_);if(tt0){var Ct={x:0,y:0};s.fixedNodeConstraint.forEach(function(U,H){var V={x:p[y.get(U.nodeId)],y:C[y.get(U.nodeId)]},$=U.position,k=G($,V);Ct.x+=k.x,Ct.y+=k.y}),Ct.x/=s.fixedNodeConstraint.length,Ct.y/=s.fixedNodeConstraint.length,p.forEach(function(U,H){p[H]+=Ct.x}),C.forEach(function(U,H){C[H]+=Ct.y}),s.fixedNodeConstraint.forEach(function(U){p[y.get(U.nodeId)]=U.position.x,C[y.get(U.nodeId)]=U.position.y})}if(s.alignmentConstraint){if(s.alignmentConstraint.vertical)for(var Et=s.alignmentConstraint.vertical,Tt=function(H){var V=new Set;Et[H].forEach(function(j){V.add(j)});var $=new Set([].concat(f(V)).filter(function(j){return P.has(j)})),k=void 0;$.size>0?k=p[y.get($.values().next().value)]:k=J(V).x,V.forEach(function(j){P.has(j)||(p[y.get(j)]=k)})},Ot=0;Ot0?k=C[y.get($.values().next().value)]:k=J(V).y,V.forEach(function(j){P.has(j)||(C[y.get(j)]=k)})},Pt=0;Pt{a.exports=E})},N={};function u(a){var r=N[a];if(r!==void 0)return r.exports;var n=N[a]={exports:{}};return w[a](n,n.exports,u),n.exports}var l=u(45);return l})()})});var Je=pe((ne,Ce)=>{(function(w,N){typeof ne=="object"&&typeof Ce=="object"?Ce.exports=N(Le()):typeof define=="function"&&define.amd?define(["cose-base"],N):typeof ne=="object"?ne.cytoscapeFcose=N(Le()):w.cytoscapeFcose=N(w.coseBase)})(ne,function(E){return(()=>{"use strict";var w={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var n=arguments.length,f=Array(n>1?n-1:0),e=1;e{var f=(function(){function t(i,h){var g=[],s=!0,L=!1,y=void 0;try{for(var p=i[Symbol.iterator](),C;!(s=(C=p.next()).done)&&(g.push(C.value),!(h&&g.length===h));s=!0);}catch(R){L=!0,y=R}finally{try{!s&&p.return&&p.return()}finally{if(L)throw y}}return g}return function(i,h){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return t(i,h);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),e=n(140).layoutBase.LinkedList,c={};c.getTopMostNodes=function(t){for(var i={},h=0;h0&&D.merge(I)});for(var O=0;O1){C=y[0],R=C.connectedEdges().length,y.forEach(function(v){v.connectedEdges().length0&&g.set("dummy"+(g.size+1),W),G},c.relocateComponent=function(t,i,h){if(!h.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,L=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY;if(h.quality=="draft"){var p=!0,C=!1,R=void 0;try{for(var A=i.nodeIndexes[Symbol.iterator](),b;!(p=(b=A.next()).done);p=!0){var W=b.value,G=f(W,2),J=G[0],x=G[1],z=h.cy.getElementById(J);if(z){var o=z.boundingBox(),m=i.xCoords[x]-o.w/2,d=i.xCoords[x]+o.w/2,T=i.yCoords[x]-o.h/2,v=i.yCoords[x]+o.h/2;ms&&(s=d),Ty&&(y=v)}}}catch(I){C=!0,R=I}finally{try{!p&&A.return&&A.return()}finally{if(C)throw R}}var D=t.x-(s+g)/2,O=t.y-(y+L)/2;i.xCoords=i.xCoords.map(function(I){return I+D}),i.yCoords=i.yCoords.map(function(I){return I+O})}else{Object.keys(i).forEach(function(I){var Z=i[I],tt=Z.getRect().x,F=Z.getRect().x+Z.getRect().width,_=Z.getRect().y,B=Z.getRect().y+Z.getRect().height;tts&&(s=F),_y&&(y=B)});var P=t.x-(s+g)/2,S=t.y-(y+L)/2;Object.keys(i).forEach(function(I){var Z=i[I];Z.setCenter(Z.getCenterX()+P,Z.getCenterY()+S)})}}},c.calcBoundingBox=function(t,i,h,g){for(var s=Number.MAX_SAFE_INTEGER,L=Number.MIN_SAFE_INTEGER,y=Number.MAX_SAFE_INTEGER,p=Number.MIN_SAFE_INTEGER,C=void 0,R=void 0,A=void 0,b=void 0,W=t.descendants().not(":parent"),G=W.length,J=0;JC&&(s=C),LA&&(y=A),p{var f=n(548),e=n(140).CoSELayout,c=n(140).CoSENode,t=n(140).layoutBase.PointD,i=n(140).layoutBase.DimensionD,h=n(140).layoutBase.LayoutConstants,g=n(140).layoutBase.FDLayoutConstants,s=n(140).CoSEConstants,L=function(p,C){var R=p.cy,A=p.eles,b=A.nodes(),W=A.edges(),G=void 0,J=void 0,x=void 0,z={};p.randomize&&(G=C.nodeIndexes,J=C.xCoords,x=C.yCoords);var o=function(I){return typeof I=="function"},m=function(I,Z){return o(I)?I(Z):I},d=f.calcParentsWithoutChildren(R,A),T=function S(I,Z,tt,F){for(var _=Z.length,B=0;B<_;B++){var M=Z[B],Y=null;M.intersection(d).length==0&&(Y=M.children());var X=void 0,K=M.layoutDimensions({nodeDimensionsIncludeLabels:F.nodeDimensionsIncludeLabels});if(M.outerWidth()!=null&&M.outerHeight()!=null)if(F.randomize)if(!M.isParent())X=I.add(new c(tt.graphManager,new t(J[G.get(M.id())]-K.w/2,x[G.get(M.id())]-K.h/2),new i(parseFloat(K.w),parseFloat(K.h))));else{var st=f.calcBoundingBox(M,J,x,G);M.intersection(d).length==0?X=I.add(new c(tt.graphManager,new t(st.topLeftX,st.topLeftY),new i(st.width,st.height))):X=I.add(new c(tt.graphManager,new t(st.topLeftX,st.topLeftY),new i(parseFloat(K.w),parseFloat(K.h))))}else X=I.add(new c(tt.graphManager,new t(M.position("x")-K.w/2,M.position("y")-K.h/2),new i(parseFloat(K.w),parseFloat(K.h))));else X=I.add(new c(this.graphManager));if(X.id=M.data("id"),X.nodeRepulsion=m(F.nodeRepulsion,M),X.paddingLeft=parseInt(M.css("padding")),X.paddingTop=parseInt(M.css("padding")),X.paddingRight=parseInt(M.css("padding")),X.paddingBottom=parseInt(M.css("padding")),F.nodeDimensionsIncludeLabels&&(X.labelWidth=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,X.labelHeight=M.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,X.labelPosVertical=M.css("text-valign"),X.labelPosHorizontal=M.css("text-halign")),z[M.data("id")]=X,isNaN(X.rect.x)&&(X.rect.x=0),isNaN(X.rect.y)&&(X.rect.y=0),Y!=null&&Y.length>0){var Lt=void 0;Lt=tt.getGraphManager().add(tt.newGraph(),X),S(Lt,Y,tt,F)}}},v=function(I,Z,tt){for(var F=0,_=0,B=0;B0?s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=F/_:o(p.idealEdgeLength)?s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:s.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=p.idealEdgeLength,s.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,s.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH)},D=function(I,Z){Z.fixedNodeConstraint&&(I.constraints.fixedNodeConstraint=Z.fixedNodeConstraint),Z.alignmentConstraint&&(I.constraints.alignmentConstraint=Z.alignmentConstraint),Z.relativePlacementConstraint&&(I.constraints.relativePlacementConstraint=Z.relativePlacementConstraint)};p.nestingFactor!=null&&(s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=p.nestingFactor),p.gravity!=null&&(s.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=p.gravity),p.numIter!=null&&(s.MAX_ITERATIONS=g.MAX_ITERATIONS=p.numIter),p.gravityRange!=null&&(s.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=p.gravityRange),p.gravityCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=p.gravityCompound),p.gravityRangeCompound!=null&&(s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=p.gravityRangeCompound),p.initialEnergyOnIncremental!=null&&(s.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=p.initialEnergyOnIncremental),p.tilingCompareBy!=null&&(s.TILING_COMPARE_BY=p.tilingCompareBy),p.quality=="proof"?h.QUALITY=2:h.QUALITY=0,s.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=p.nodeDimensionsIncludeLabels,s.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!p.randomize,s.ANIMATE=g.ANIMATE=h.ANIMATE=p.animate,s.TILE=p.tile,s.TILING_PADDING_VERTICAL=typeof p.tilingPaddingVertical=="function"?p.tilingPaddingVertical.call():p.tilingPaddingVertical,s.TILING_PADDING_HORIZONTAL=typeof p.tilingPaddingHorizontal=="function"?p.tilingPaddingHorizontal.call():p.tilingPaddingHorizontal,s.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!0,s.PURE_INCREMENTAL=!p.randomize,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=p.uniformNodeDimensions,p.step=="transformed"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!1),p.step=="enforced"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!1),p.step=="cose"&&(s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!1,s.APPLY_LAYOUT=!0),p.step=="all"&&(p.randomize?s.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:s.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,s.ENFORCE_CONSTRAINTS=!0,s.APPLY_LAYOUT=!0),p.fixedNodeConstraint||p.alignmentConstraint||p.relativePlacementConstraint?s.TREE_REDUCTION_ON_INCREMENTAL=!1:s.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new e,P=O.newGraphManager();return T(P.addRoot(),f.getTopMostNodes(b),O,p),v(O,P,W),D(O,p),O.runLayout(),z};a.exports={coseLayout:L}}),212:((a,r,n)=>{var f=(function(){function p(C,R){for(var A=0;A0)if(v){var P=t.getTopMostNodes(A.eles.nodes());if(o=t.connectComponents(b,A.eles,P),o.forEach(function(at){var et=at.boundingBox();m.push({x:et.x1+et.w/2,y:et.y1+et.h/2})}),A.randomize&&o.forEach(function(at){A.eles=at,G.push(h(A))}),A.quality=="default"||A.quality=="proof"){var S=b.collection();if(A.tile){var I=new Map,Z=[],tt=[],F=0,_={nodeIndexes:I,xCoords:Z,yCoords:tt},B=[];if(o.forEach(function(at,et){at.edges().length==0&&(at.nodes().forEach(function(pt,mt){S.merge(at.nodes()[mt]),pt.isParent()||(_.nodeIndexes.set(at.nodes()[mt].id(),F++),_.xCoords.push(at.nodes()[0].position().x),_.yCoords.push(at.nodes()[0].position().y))}),B.push(et))}),S.length>1){var M=S.boundingBox();m.push({x:M.x1+M.w/2,y:M.y1+M.h/2}),o.push(S),G.push(_);for(var Y=B.length-1;Y>=0;Y--)o.splice(B[Y],1),G.splice(B[Y],1),m.splice(B[Y],1)}}o.forEach(function(at,et){A.eles=at,z.push(s(A,G[et])),t.relocateComponent(m[et],z[et],A)})}else o.forEach(function(at,et){t.relocateComponent(m[et],G[et],A)});var X=new Set;if(o.length>1){var K=[],st=W.filter(function(at){return at.css("display")=="none"});o.forEach(function(at,et){var pt=void 0;if(A.quality=="draft"&&(pt=G[et].nodeIndexes),at.nodes().not(st).length>0){var mt={};mt.edges=[],mt.nodes=[];var Ct=void 0;at.nodes().not(st).forEach(function(Et){if(A.quality=="draft")if(!Et.isParent())Ct=pt.get(Et.id()),mt.nodes.push({x:G[et].xCoords[Ct]-Et.boundingbox().w/2,y:G[et].yCoords[Ct]-Et.boundingbox().h/2,width:Et.boundingbox().w,height:Et.boundingbox().h});else{var Tt=t.calcBoundingBox(Et,G[et].xCoords,G[et].yCoords,pt);mt.nodes.push({x:Tt.topLeftX,y:Tt.topLeftY,width:Tt.width,height:Tt.height})}else z[et][Et.id()]&&mt.nodes.push({x:z[et][Et.id()].getLeft(),y:z[et][Et.id()].getTop(),width:z[et][Et.id()].getWidth(),height:z[et][Et.id()].getHeight()})}),at.edges().forEach(function(Et){var Tt=Et.source(),Ot=Et.target();if(Tt.css("display")!="none"&&Ot.css("display")!="none")if(A.quality=="draft"){var It=pt.get(Tt.id()),Wt=pt.get(Ot.id()),Pt=[],Yt=[];if(Tt.isParent()){var bt=t.calcBoundingBox(Tt,G[et].xCoords,G[et].yCoords,pt);Pt.push(bt.topLeftX+bt.width/2),Pt.push(bt.topLeftY+bt.height/2)}else Pt.push(G[et].xCoords[It]),Pt.push(G[et].yCoords[It]);if(Ot.isParent()){var U=t.calcBoundingBox(Ot,G[et].xCoords,G[et].yCoords,pt);Yt.push(U.topLeftX+U.width/2),Yt.push(U.topLeftY+U.height/2)}else Yt.push(G[et].xCoords[Wt]),Yt.push(G[et].yCoords[Wt]);mt.edges.push({startX:Pt[0],startY:Pt[1],endX:Yt[0],endY:Yt[1]})}else z[et][Tt.id()]&&z[et][Ot.id()]&&mt.edges.push({startX:z[et][Tt.id()].getCenterX(),startY:z[et][Tt.id()].getCenterY(),endX:z[et][Ot.id()].getCenterX(),endY:z[et][Ot.id()].getCenterY()})}),mt.nodes.length>0&&(K.push(mt),X.add(et))}});var Lt=T.packComponents(K,A.randomize).shifts;if(A.quality=="draft")G.forEach(function(at,et){var pt=at.xCoords.map(function(Ct){return Ct+Lt[et].dx}),mt=at.yCoords.map(function(Ct){return Ct+Lt[et].dy});at.xCoords=pt,at.yCoords=mt});else{var St=0;X.forEach(function(at){Object.keys(z[at]).forEach(function(et){var pt=z[at][et];pt.setCenter(pt.getCenterX()+Lt[St].dx,pt.getCenterY()+Lt[St].dy)}),St++})}}}else{var D=A.eles.boundingBox();if(m.push({x:D.x1+D.w/2,y:D.y1+D.h/2}),A.randomize){var O=h(A);G.push(O)}A.quality=="default"||A.quality=="proof"?(z.push(s(A,G[0])),t.relocateComponent(m[0],z[0],A)):t.relocateComponent(m[0],G[0],A)}var Q=function(et,pt){if(A.quality=="default"||A.quality=="proof"){typeof et=="number"&&(et=pt);var mt=void 0,Ct=void 0,Et=et.data("id");return z.forEach(function(Ot){Et in Ot&&(mt={x:Ot[Et].getRect().getCenterX(),y:Ot[Et].getRect().getCenterY()},Ct=Ot[Et])}),A.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?mt.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(mt.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?mt.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(mt.y-=Ct.labelHeight/2))),mt==null&&(mt={x:et.position("x"),y:et.position("y")}),{x:mt.x,y:mt.y}}else{var Tt=void 0;return G.forEach(function(Ot){var It=Ot.nodeIndexes.get(et.id());It!=null&&(Tt={x:Ot.xCoords[It],y:Ot.yCoords[It]})}),Tt==null&&(Tt={x:et.position("x"),y:et.position("y")}),{x:Tt.x,y:Tt.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var Ut=t.calcParentsWithoutChildren(b,W),Mt=W.filter(function(at){return at.css("display")=="none"});A.eles=W.not(Mt),W.nodes().not(":parent").not(Mt).layoutPositions(R,A,Q),Ut.length>0&&Ut.forEach(function(at){at.position(Q(at))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),p})();a.exports=y}),657:((a,r,n)=>{var f=n(548),e=n(140).layoutBase.Matrix,c=n(140).layoutBase.SVD,t=function(h){var g=h.cy,s=h.eles,L=s.nodes(),y=s.nodes(":parent"),p=new Map,C=new Map,R=new Map,A=[],b=[],W=[],G=[],J=[],x=[],z=[],o=[],m=void 0,d=void 0,T=1e8,v=1e-9,D=h.piTol,O=h.samplingType,P=h.nodeSeparation,S=void 0,I=function(){for(var V=0,$=0,k=!1;$=ut;){q=j[ut++];for(var ot=A[q],it=0;itrt&&(rt=J[nt],vt=nt)}return vt},tt=function(V){var $=void 0;if(V){$=Math.floor(Math.random()*d),m=$;for(var j=0;j=1)break;rt=gt}for(var ot=0;ot=1)break;rt=gt}for(var dt=0;dt0&&($.isParent()?A[V].push(R.get($.id())):A[V].push($.id()))})});var Ut=function(V){var $=C.get(V),k=void 0;p.get(V).forEach(function(j){g.getElementById(j).isParent()?k=R.get(j):k=j,A[$].push(k),A[C.get(k)].push(V)})},Mt=!0,at=!1,et=void 0;try{for(var pt=p.keys()[Symbol.iterator](),mt;!(Mt=(mt=pt.next()).done);Mt=!0){var Ct=mt.value;Ut(Ct)}}catch(H){at=!0,et=H}finally{try{!Mt&&pt.return&&pt.return()}finally{if(at)throw et}}d=C.size;var Et=void 0;if(d>2){S=d{var f=n(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),a.exports=e}),140:(a=>{a.exports=E})},N={};function u(a){var r=N[a];if(r!==void 0)return r.exports;var n=N[a]={exports:{}};return w[a](n,n.exports,u),n.exports}var l=u(579);return l})()})});var ir=ur(Je(),1);var Ke={L:"left",R:"right",T:"top",B:"bottom"},je={L:ct(E=>`${E},${E/2} 0,${E} 0,0`,"L"),R:ct(E=>`0,${E/2} ${E},0 ${E},${E}`,"R"),T:ct(E=>`0,0 ${E},0 ${E/2},${E}`,"T"),B:ct(E=>`${E/2},0 ${E},${E} 0,${E}`,"B")},fe={L:ct((E,w)=>E-w+2,"L"),R:ct((E,w)=>E-2,"R"),T:ct((E,w)=>E-w+2,"T"),B:ct((E,w)=>E-2,"B")},dr=ct(function(E){return Ht(E)?E==="L"?"R":"L":E==="T"?"B":"T"},"getOppositeArchitectureDirection"),_e=ct(function(E){let w=E;return w==="L"||w==="R"||w==="T"||w==="B"},"isArchitectureDirection"),Ht=ct(function(E){let w=E;return w==="L"||w==="R"},"isArchitectureDirectionX"),Zt=ct(function(E){let w=E;return w==="T"||w==="B"},"isArchitectureDirectionY"),we=ct(function(E,w){let N=Ht(E)&&Zt(w),u=Zt(E)&&Ht(w);return N||u},"isArchitectureDirectionXY"),vr=ct(function(E){let w=E[0],N=E[1],u=Ht(w)&&Zt(N),l=Zt(w)&&Ht(N);return u||l},"isArchitecturePairXY"),pr=ct(function(E){return E!=="LL"&&E!=="RR"&&E!=="TT"&&E!=="BB"},"isValidArchitectureDirectionPair"),Ae=ct(function(E,w){let N=`${E}${w}`;return pr(N)?N:void 0},"getArchitectureDirectionPair"),yr=ct(function([E,w],N){let u=N[0],l=N[1];return Ht(u)?Zt(l)?[E+(u==="L"?-1:1),w+(l==="T"?1:-1)]:[E+(u==="L"?-1:1),w]:Ht(l)?[E+(l==="L"?1:-1),w+(u==="T"?1:-1)]:[E,w+(u==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),mr=ct(function(E){return E==="LT"||E==="TL"?[1,1]:E==="BL"||E==="LB"?[1,-1]:E==="BR"||E==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Er=ct(function(E,w){return we(E,w)?"bend":Ht(E)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Tr=ct(function(E){return E.type==="service"},"isArchitectureService"),Nr=ct(function(E){return E.type==="junction"},"isArchitectureJunction"),tr=ct(E=>E.data(),"edgeData"),ee=ct(E=>E.data(),"nodeData"),Lr=Re.architecture,er=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Ge,this.getAccTitle=Ue,this.setDiagramTitle=He,this.getDiagramTitle=We,this.getAccDescription=Xe,this.setAccDescription=Ye,this.clear()}static{ct(this,"ArchitectureDB")}setDiagramId(E){this.diagramId=E}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",Pe()}addService({id:E,icon:w,in:N,title:u,iconText:l}){if(this.registeredIds[E]!==void 0)throw new Error(`The service id [${E}] is already in use by another ${this.registeredIds[E]}`);if(N!==void 0){if(E===N)throw new Error(`The service [${E}] cannot be placed within itself`);if(this.registeredIds[N]===void 0)throw new Error(`The service [${E}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[N]==="node")throw new Error(`The service [${E}]'s parent is not a group`)}this.registeredIds[E]="node",this.nodes[E]={id:E,type:"service",icon:w,iconText:l,title:u,edges:[],in:N}}getServices(){return Object.values(this.nodes).filter(Tr)}addJunction({id:E,in:w}){if(this.registeredIds[E]!==void 0)throw new Error(`The junction id [${E}] is already in use by another ${this.registeredIds[E]}`);if(w!==void 0){if(E===w)throw new Error(`The junction [${E}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The junction [${E}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[w]==="node")throw new Error(`The junction [${E}]'s parent is not a group`)}this.registeredIds[E]="node",this.nodes[E]={id:E,type:"junction",edges:[],in:w}}getJunctions(){return Object.values(this.nodes).filter(Nr)}getNodes(){return Object.values(this.nodes)}getNode(E){return this.nodes[E]??null}addGroup({id:E,icon:w,in:N,title:u}){if(this.registeredIds?.[E]!==void 0)throw new Error(`The group id [${E}] is already in use by another ${this.registeredIds[E]}`);if(N!==void 0){if(E===N)throw new Error(`The group [${E}] cannot be placed within itself`);if(this.registeredIds?.[N]===void 0)throw new Error(`The group [${E}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[N]==="node")throw new Error(`The group [${E}]'s parent is not a group`)}this.registeredIds[E]="group",this.groups[E]={id:E,icon:w,title:u,in:N}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:E,rhsId:w,lhsDir:N,rhsDir:u,lhsInto:l,rhsInto:a,lhsGroup:r,rhsGroup:n,title:f}){if(!_e(N))throw new Error(`Invalid direction given for left hand side of edge ${E}--${w}. Expected (L,R,T,B) got ${String(N)}`);if(!_e(u))throw new Error(`Invalid direction given for right hand side of edge ${E}--${w}. Expected (L,R,T,B) got ${String(u)}`);if(this.nodes[E]===void 0&&this.groups[E]===void 0)throw new Error(`The left-hand id [${E}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[w]===void 0&&this.groups[w]===void 0)throw new Error(`The right-hand id [${w}] does not yet exist. Please create the service/group before declaring an edge to it.`);let e=this.nodes[E].in,c=this.nodes[w].in;if(r&&e&&c&&e==c)throw new Error(`The left-hand id [${E}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(n&&e&&c&&e==c)throw new Error(`The right-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let t={lhsId:E,lhsDir:N,lhsInto:l,lhsGroup:r,rhsId:w,rhsDir:u,rhsInto:a,rhsGroup:n,title:f};this.edges.push(t),this.nodes[E]&&this.nodes[w]&&(this.nodes[E].edges.push(this.edges[this.edges.length-1]),this.nodes[w].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){let E={},w=Object.entries(this.nodes).reduce((n,[f,e])=>(n[f]=e.edges.reduce((c,t)=>{let i=this.getNode(t.lhsId)?.in,h=this.getNode(t.rhsId)?.in;if(i&&h&&i!==h){let g=Er(t.lhsDir,t.rhsDir);g!=="bend"&&(E[i]??={},E[i][h]=g,E[h]??={},E[h][i]=g)}if(t.lhsId===f){let g=Ae(t.lhsDir,t.rhsDir);g&&(c[g]=t.rhsId)}else{let g=Ae(t.rhsDir,t.lhsDir);g&&(c[g]=t.lhsId)}return c},{}),n),{}),N=Object.keys(w)[0],u={[N]:1},l=Object.keys(w).reduce((n,f)=>f===N?n:{...n,[f]:1},{}),a=ct(n=>{let f={[n]:[0,0]},e=[n];for(;e.length>0;){let c=e.shift();if(c){u[c]=1,delete l[c];let t=w[c],[i,h]=f[c];Object.entries(t).forEach(([g,s])=>{u[s]||(f[s]=yr([i,h],g),e.push(s))})}}return f},"BFS"),r=[a(N)];for(;Object.keys(l).length>0;)r.push(a(Object.keys(l)[0]));this.dataStructures={adjList:w,spatialMaps:r,groupAlignments:E}}return this.dataStructures}setElementForId(E,w){this.elements[E]=w}getElementById(E){return this.elements[E]}getConfig(){return Be({...Lr,...Se().architecture})}getConfigField(E){return this.getConfig()[E]}},Cr=ct((E,w)=>{qe(E,w),E.groups.map(N=>w.addGroup(N)),E.services.map(N=>w.addService({...N,type:"service"})),E.junctions.map(N=>w.addJunction({...N,type:"junction"})),E.edges.map(N=>w.addEdge(N))},"populateDb"),rr={parser:{yy:void 0},parse:ct(async E=>{let w=await Qe("architecture",E);ye.debug(w);let N=rr.parser?.yy;if(!(N instanceof er))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Cr(w,N)},"parse")},Ar=ct(E=>` + .edge { + stroke-width: ${E.archEdgeWidth}; + stroke: ${E.archEdgeColor}; + fill: none; + } + + .arrow { + fill: ${E.archEdgeArrowColor}; + } + + .node-bkg { + fill: none; + stroke: ${E.archGroupBorderColor}; + stroke-width: ${E.archGroupBorderWidth}; + stroke-dasharray: 8; + } + .node-icon-text { + display: flex; + align-items: center; + } + + .node-icon-text > div { + color: #fff; + margin: 1px; + height: fit-content; + text-align: center; + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + } +`,"getStyles"),wr=Ar,te=ct(E=>`${E}`,"wrapIcon"),ae={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:te('')},server:{body:te('')},disk:{body:te('')},internet:{body:te('')},cloud:{body:te('')},unknown:ke,blank:{body:te("")}}},Mr=ct(async function(E,w,N,u){let l=N.getConfigField("padding"),a=N.getConfigField("iconSize"),r=a/2,n=a/6,f=n/2;await Promise.all(w.edges().map(async e=>{let{source:c,sourceDir:t,sourceArrow:i,sourceGroup:h,target:g,targetDir:s,targetArrow:L,targetGroup:y,label:p}=tr(e),{x:C,y:R}=e[0].sourceEndpoint(),{x:A,y:b}=e[0].midpoint(),{x:W,y:G}=e[0].targetEndpoint(),J=l+4;if(h&&(Ht(t)?C+=t==="L"?-J:J:R+=t==="T"?-J:J+18),y&&(Ht(s)?W+=s==="L"?-J:J:G+=s==="T"?-J:J+18),!h&&N.getNode(c)?.type==="junction"&&(Ht(t)?C+=t==="L"?r:-r:R+=t==="T"?r:-r),!y&&N.getNode(g)?.type==="junction"&&(Ht(s)?W+=s==="L"?r:-r:G+=s==="T"?r:-r),e[0]._private.rscratch){let x=E.insert("g");if(x.insert("path").attr("d",`M ${C},${R} L ${A},${b} L${W},${G} `).attr("class","edge").attr("id",`${u}-${$e(c,g,{prefix:"L"})}`),i){let z=Ht(t)?fe[t](C,n):C-f,o=Zt(t)?fe[t](R,n):R-f;x.insert("polygon").attr("points",je[t](n)).attr("transform",`translate(${z},${o})`).attr("class","arrow")}if(L){let z=Ht(s)?fe[s](W,n):W-f,o=Zt(s)?fe[s](G,n):G-f;x.insert("polygon").attr("points",je[s](n)).attr("transform",`translate(${z},${o})`).attr("class","arrow")}if(p){let z=we(t,s)?"XY":Ht(t)?"X":"Y",o=0;z==="X"?o=Math.abs(C-W):z==="Y"?o=Math.abs(R-G)/1.5:o=Math.abs(C-W)/2;let m=x.append("g");if(await le(m,p,{useHtmlLabels:!1,width:o,classes:"architecture-service-label"},se()),m.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),z==="X")m.attr("transform","translate("+A+", "+b+")");else if(z==="Y")m.attr("transform","translate("+A+", "+b+") rotate(-90)");else if(z==="XY"){let d=Ae(t,s);if(d&&vr(d)){let T=m.node().getBoundingClientRect(),[v,D]=mr(d);m.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*v*D*45})`);let O=m.node().getBoundingClientRect();m.attr("transform",` + translate(${A}, ${b-T.height/2}) + translate(${v*O.width/2}, ${D*O.height/2}) + rotate(${-1*v*D*45}, 0, ${T.height/2}) + `)}}}}}))},"drawEdges"),Or=ct(async function(E,w,N,u){let a=N.getConfigField("padding")*.75,r=N.getConfigField("fontSize"),f=N.getConfigField("iconSize")/2;await Promise.all(w.nodes().map(async e=>{let c=ee(e);if(c.type==="group"){let{h:t,w:i,x1:h,y1:g}=e.boundingBox(),s=E.append("rect");s.attr("id",`${u}-group-${c.id}`).attr("x",h+f).attr("y",g+f).attr("width",i).attr("height",t).attr("class","node-bkg");let L=E.append("g"),y=h,p=g;if(c.icon){let C=L.append("g");C.html(`${await he(c.icon,{height:a,width:a,fallbackPrefix:ae.prefix})}`),C.attr("transform","translate("+(y+f+1)+", "+(p+f+1)+")"),y+=a,p+=r/2-1-2}if(c.label){let C=L.append("g");await le(C,c.label,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},se()),C.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),C.attr("transform","translate("+(y+f+4)+", "+(p+f+2)+")")}N.setElementForId(c.id,s)}}))},"drawGroups"),Dr=ct(async function(E,w,N,u){let l=se();for(let a of N){let r=w.append("g"),n=E.getConfigField("iconSize");if(a.title){let t=r.append("g");await le(t,a.title,{useHtmlLabels:!1,width:n*1.5,classes:"architecture-service-label"},l),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.attr("transform","translate("+n/2+", "+n+")")}let f=r.append("g");if(a.icon)f.html(`${await he(a.icon,{height:n,width:n,fallbackPrefix:ae.prefix})}`);else if(a.iconText){f.html(`${await he("blank",{height:n,width:n,fallbackPrefix:ae.prefix})}`);let h=f.append("g").append("foreignObject").attr("width",n).attr("height",n).append("div").attr("class","node-icon-text").attr("style",`height: ${n}px;`).append("div").html(Fe(a.iconText,l)),g=parseInt(window.getComputedStyle(h.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;h.attr("style",`-webkit-line-clamp: ${Math.floor((n-2)/g)};`)}else f.append("path").attr("class","node-bkg").attr("id",`${u}-node-${a.id}`).attr("d",`M0,${n} V5 Q0,0 5,0 H${n-5} Q${n},0 ${n},5 V${n} Z`);r.attr("id",`${u}-service-${a.id}`).attr("class","architecture-service");let{width:e,height:c}=r.node().getBBox();a.width=e,a.height=c,E.setElementForId(a.id,r)}return 0},"drawServices"),xr=ct(function(E,w,N,u){N.forEach(l=>{let a=w.append("g"),r=E.getConfigField("iconSize");a.append("g").append("rect").attr("id",`${u}-node-${l.id}`).attr("fill-opacity","0").attr("width",r).attr("height",r),a.attr("class","architecture-junction");let{width:f,height:e}=a._groups[0][0].getBBox();a.width=f,a.height=e,E.setElementForId(l.id,a)})},"drawJunctions");Ze([{name:ae.prefix,icons:ae}]);me.use(ir.default);function nr(E,w,N){E.forEach(u=>{w.add({group:"nodes",data:{type:"service",id:u.id,icon:u.icon,label:u.title,parent:u.in,width:N.getConfigField("iconSize"),height:N.getConfigField("iconSize")},classes:"node-service"})})}ct(nr,"addServices");function ar(E,w,N){E.forEach(u=>{w.add({group:"nodes",data:{type:"junction",id:u.id,parent:u.in,width:N.getConfigField("iconSize"),height:N.getConfigField("iconSize")},classes:"node-junction"})})}ct(ar,"addJunctions");function or(E,w){w.nodes().map(N=>{let u=ee(N);if(u.type==="group")return;u.x=N.position().x,u.y=N.position().y,E.getElementById(u.id).attr("transform","translate("+(u.x||0)+","+(u.y||0)+")")})}ct(or,"positionNodes");function sr(E,w){E.forEach(N=>{w.add({group:"nodes",data:{type:"group",id:N.id,icon:N.icon,label:N.title,parent:N.in},classes:"node-group"})})}ct(sr,"addGroups");function hr(E,w){E.forEach(N=>{let{lhsId:u,rhsId:l,lhsInto:a,lhsGroup:r,rhsInto:n,lhsDir:f,rhsDir:e,rhsGroup:c,title:t}=N,i=we(N.lhsDir,N.rhsDir)?"segments":"straight",h={id:`${u}-${l}`,label:t,source:u,sourceDir:f,sourceArrow:a,sourceGroup:r,sourceEndpoint:f==="L"?"0 50%":f==="R"?"100% 50%":f==="T"?"50% 0":"50% 100%",target:l,targetDir:e,targetArrow:n,targetGroup:c,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};w.add({group:"edges",data:h,classes:i})})}ct(hr,"addEdges");function lr(E,w,N){let u=ct((n,f)=>Object.entries(n).reduce((e,[c,t])=>{let i=0,h=Object.entries(t);if(h.length===1)return e[c]=h[0][1],e;for(let g=0;g{let f={},e={};return Object.entries(n).forEach(([c,[t,i]])=>{let h=E.getNode(c)?.in??"default";f[i]??={},f[i][h]??=[],f[i][h].push(c),e[t]??={},e[t][h]??=[],e[t][h].push(c)}),{horiz:Object.values(u(f,"horizontal")).filter(c=>c.length>1),vert:Object.values(u(e,"vertical")).filter(c=>c.length>1)}}),[a,r]=l.reduce(([n,f],{horiz:e,vert:c})=>[[...n,...e],[...f,...c]],[[],[]]);return{horizontal:a,vertical:r}}ct(lr,"getAlignments");function fr(E,w){let N=[],u=ct(a=>`${a[0]},${a[1]}`,"posToStr"),l=ct(a=>a.split(",").map(r=>parseInt(r)),"strToPos");return E.forEach(a=>{let r=Object.fromEntries(Object.entries(a).map(([c,t])=>[u(t),c])),n=[u([0,0])],f={},e={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;n.length>0;){let c=n.shift();if(c){f[c]=1;let t=r[c];if(t){let i=l(c);Object.entries(e).forEach(([h,g])=>{let s=u([i[0]+g[0],i[1]+g[1]]),L=r[s];L&&!f[s]&&(n.push(s),N.push({[Ke[h]]:L,[Ke[dr(h)]]:t,gap:1.5*w.getConfigField("iconSize")}))})}}}}),N}ct(fr,"getRelativeConstraints");function cr(E,w,N,u,l,{spatialMaps:a,groupAlignments:r}){return new Promise(n=>{let f=Ve("body").append("div").attr("id","cy").attr("style","display:none"),e=me({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${l.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${l.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});f.remove(),sr(N,e),nr(E,e,l),ar(w,e,l),hr(u,e);let c=lr(l,a,r),t=fr(a,l),i=l.getConfigField("iconSize"),h=l.getConfigField("idealEdgeLengthMultiplier")*i,g=.5*i,s=l.getConfigField("edgeElasticity"),L=e.layout({name:"fcose",quality:"proof",randomize:l.getConfigField("randomize"),nodeSeparation:l.getConfigField("nodeSeparation"),numIter:l.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(y){let[p,C]=y.connectedNodes(),{parent:R}=ee(p),{parent:A}=ee(C);return R===A?h:g},edgeElasticity(y){let[p,C]=y.connectedNodes(),{parent:R}=ee(p),{parent:A}=ee(C);return R===A?s:.001},alignmentConstraint:c,relativePlacementConstraint:t});L.one("layoutstop",()=>{function y(p,C,R,A){let b,W,{x:G,y:J}=p,{x,y:z}=C;W=(A-J+(G-R)*(J-z)/(G-x))/Math.sqrt(1+Math.pow((J-z)/(G-x),2)),b=Math.sqrt(Math.pow(A-J,2)+Math.pow(R-G,2)-Math.pow(W,2));let o=Math.sqrt(Math.pow(x-G,2)+Math.pow(z-J,2));b=b/o;let m=(x-G)*(A-J)-(z-J)*(R-G);switch(!0){case m>=0:m=1;break;case m<0:m=-1;break}let d=(x-G)*(R-G)+(z-J)*(A-J);switch(!0){case d>=0:d=1;break;case d<0:d=-1;break}return W=Math.abs(W)*m,b=b*d,{distances:W,weights:b}}ct(y,"getSegmentWeights"),e.startBatch();for(let p of Object.values(e.edges()))if(p.data?.()){let{x:C,y:R}=p.source().position(),{x:A,y:b}=p.target().position();if(C!==A&&R!==b){let W=p.sourceEndpoint(),G=p.targetEndpoint(),{sourceDir:J}=tr(p),[x,z]=Zt(J)?[W.x,G.y]:[G.x,W.y],{weights:o,distances:m}=y(W,G,x,z);p.style("segment-distances",m),p.style("segment-weights",o)}}e.endBatch(),L.run()}),L.run(),e.ready(y=>{ye.info("Ready",y),n(e)})})}ct(cr,"layoutArchitecture");var Ir=ct(async(E,w,N,u)=>{let l=u.db;l.setDiagramId(w);let a=l.getServices(),r=l.getJunctions(),n=l.getGroups(),f=l.getEdges(),e=l.getDataStructures(),c=ze(w),t=c.append("g");t.attr("class","architecture-edges");let i=c.append("g");i.attr("class","architecture-services");let h=c.append("g");h.attr("class","architecture-groups"),await Dr(l,i,a,w),xr(l,i,r,w);let g=await cr(a,r,n,f,l,e);await Mr(t,g,l,w),await Or(h,g,l,w),or(l,g),be(void 0,c,l.getConfigField("padding"),l.getConfigField("useMaxWidth"))},"draw"),Rr={draw:Ir},Wr={parser:rr,get db(){return new er},renderer:Rr,styles:wr};export{Wr as diagram}; +//# sourceMappingURL=architectureDiagram-3BPJPVTR-F3B6KM45.min.js.map diff --git a/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-F3B6KM45.min.js.map b/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-F3B6KM45.min.js.map new file mode 100644 index 000000000..63922fe01 --- /dev/null +++ b/templates/tabulareditor/public/architectureDiagram-3BPJPVTR-F3B6KM45.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.js", "../../node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.js", "../../node_modules/cytoscape-fcose/cytoscape-fcose.js", "../../node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-3BPJPVTR.mjs"], + "sourcesContent": ["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"layoutBase\"] = factory();\n\telse\n\t\troot[\"layoutBase\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 28);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction LayoutConstants() {}\n\n/**\r\n * Layout Quality: 0:draft, 1:default, 2:proof\r\n */\nLayoutConstants.QUALITY = 1;\n\n/**\r\n * Default parameters\r\n */\nLayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false;\nLayoutConstants.DEFAULT_INCREMENTAL = false;\nLayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true;\nLayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false;\nLayoutConstants.DEFAULT_ANIMATION_PERIOD = 50;\nLayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false;\n\n// -----------------------------------------------------------------------------\n// Section: General other constants\n// -----------------------------------------------------------------------------\n/*\r\n * Margins of a graph to be applied on bouding rectangle of its contents. We\r\n * assume margins on all four sides to be uniform.\r\n */\nLayoutConstants.DEFAULT_GRAPH_MARGIN = 15;\n\n/*\r\n * Whether to consider labels in node dimensions or not\r\n */\nLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false;\n\n/*\r\n * Default dimension of a non-compound node.\r\n */\nLayoutConstants.SIMPLE_NODE_SIZE = 40;\n\n/*\r\n * Default dimension of a non-compound node.\r\n */\nLayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2;\n\n/*\r\n * Empty compound node size. When a compound node is empty, its both\r\n * dimensions should be of this value.\r\n */\nLayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40;\n\n/*\r\n * Minimum length that an edge should take during layout\r\n */\nLayoutConstants.MIN_EDGE_LENGTH = 1;\n\n/*\r\n * World boundaries that layout operates on\r\n */\nLayoutConstants.WORLD_BOUNDARY = 1000000;\n\n/*\r\n * World boundaries that random positioning can be performed with\r\n */\nLayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1000;\n\n/*\r\n * Coordinates of the world center\r\n */\nLayoutConstants.WORLD_CENTER_X = 1200;\nLayoutConstants.WORLD_CENTER_Y = 900;\n\nmodule.exports = LayoutConstants;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphObject = __webpack_require__(2);\nvar IGeometry = __webpack_require__(8);\nvar IMath = __webpack_require__(9);\n\nfunction LEdge(source, target, vEdge) {\n LGraphObject.call(this, vEdge);\n\n this.isOverlapingSourceAndTarget = false;\n this.vGraphObject = vEdge;\n this.bendpoints = [];\n this.source = source;\n this.target = target;\n}\n\nLEdge.prototype = Object.create(LGraphObject.prototype);\n\nfor (var prop in LGraphObject) {\n LEdge[prop] = LGraphObject[prop];\n}\n\nLEdge.prototype.getSource = function () {\n return this.source;\n};\n\nLEdge.prototype.getTarget = function () {\n return this.target;\n};\n\nLEdge.prototype.isInterGraph = function () {\n return this.isInterGraph;\n};\n\nLEdge.prototype.getLength = function () {\n return this.length;\n};\n\nLEdge.prototype.isOverlapingSourceAndTarget = function () {\n return this.isOverlapingSourceAndTarget;\n};\n\nLEdge.prototype.getBendpoints = function () {\n return this.bendpoints;\n};\n\nLEdge.prototype.getLca = function () {\n return this.lca;\n};\n\nLEdge.prototype.getSourceInLca = function () {\n return this.sourceInLca;\n};\n\nLEdge.prototype.getTargetInLca = function () {\n return this.targetInLca;\n};\n\nLEdge.prototype.getOtherEnd = function (node) {\n if (this.source === node) {\n return this.target;\n } else if (this.target === node) {\n return this.source;\n } else {\n throw \"Node is not incident with this edge\";\n }\n};\n\nLEdge.prototype.getOtherEndInGraph = function (node, graph) {\n var otherEnd = this.getOtherEnd(node);\n var root = graph.getGraphManager().getRoot();\n\n while (true) {\n if (otherEnd.getOwner() == graph) {\n return otherEnd;\n }\n\n if (otherEnd.getOwner() == root) {\n break;\n }\n\n otherEnd = otherEnd.getOwner().getParent();\n }\n\n return null;\n};\n\nLEdge.prototype.updateLength = function () {\n var clipPointCoordinates = new Array(4);\n\n this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates);\n\n if (!this.isOverlapingSourceAndTarget) {\n this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2];\n this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3];\n\n if (Math.abs(this.lengthX) < 1.0) {\n this.lengthX = IMath.sign(this.lengthX);\n }\n\n if (Math.abs(this.lengthY) < 1.0) {\n this.lengthY = IMath.sign(this.lengthY);\n }\n\n this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);\n }\n};\n\nLEdge.prototype.updateLengthSimple = function () {\n this.lengthX = this.target.getCenterX() - this.source.getCenterX();\n this.lengthY = this.target.getCenterY() - this.source.getCenterY();\n\n if (Math.abs(this.lengthX) < 1.0) {\n this.lengthX = IMath.sign(this.lengthX);\n }\n\n if (Math.abs(this.lengthY) < 1.0) {\n this.lengthY = IMath.sign(this.lengthY);\n }\n\n this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);\n};\n\nmodule.exports = LEdge;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction LGraphObject(vGraphObject) {\n this.vGraphObject = vGraphObject;\n}\n\nmodule.exports = LGraphObject;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphObject = __webpack_require__(2);\nvar Integer = __webpack_require__(10);\nvar RectangleD = __webpack_require__(13);\nvar LayoutConstants = __webpack_require__(0);\nvar RandomSeed = __webpack_require__(16);\nvar PointD = __webpack_require__(5);\n\nfunction LNode(gm, loc, size, vNode) {\n //Alternative constructor 1 : LNode(LGraphManager gm, Point loc, Dimension size, Object vNode)\n if (size == null && vNode == null) {\n vNode = loc;\n }\n\n LGraphObject.call(this, vNode);\n\n //Alternative constructor 2 : LNode(Layout layout, Object vNode)\n if (gm.graphManager != null) gm = gm.graphManager;\n\n this.estimatedSize = Integer.MIN_VALUE;\n this.inclusionTreeDepth = Integer.MAX_VALUE;\n this.vGraphObject = vNode;\n this.edges = [];\n this.graphManager = gm;\n\n if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);else this.rect = new RectangleD();\n}\n\nLNode.prototype = Object.create(LGraphObject.prototype);\nfor (var prop in LGraphObject) {\n LNode[prop] = LGraphObject[prop];\n}\n\nLNode.prototype.getEdges = function () {\n return this.edges;\n};\n\nLNode.prototype.getChild = function () {\n return this.child;\n};\n\nLNode.prototype.getOwner = function () {\n // if (this.owner != null) {\n // if (!(this.owner == null || this.owner.getNodes().indexOf(this) > -1)) {\n // throw \"assert failed\";\n // }\n // }\n\n return this.owner;\n};\n\nLNode.prototype.getWidth = function () {\n return this.rect.width;\n};\n\nLNode.prototype.setWidth = function (width) {\n this.rect.width = width;\n};\n\nLNode.prototype.getHeight = function () {\n return this.rect.height;\n};\n\nLNode.prototype.setHeight = function (height) {\n this.rect.height = height;\n};\n\nLNode.prototype.getCenterX = function () {\n return this.rect.x + this.rect.width / 2;\n};\n\nLNode.prototype.getCenterY = function () {\n return this.rect.y + this.rect.height / 2;\n};\n\nLNode.prototype.getCenter = function () {\n return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);\n};\n\nLNode.prototype.getLocation = function () {\n return new PointD(this.rect.x, this.rect.y);\n};\n\nLNode.prototype.getRect = function () {\n return this.rect;\n};\n\nLNode.prototype.getDiagonal = function () {\n return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);\n};\n\n/**\n * This method returns half the diagonal length of this node.\n */\nLNode.prototype.getHalfTheDiagonal = function () {\n return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;\n};\n\nLNode.prototype.setRect = function (upperLeft, dimension) {\n this.rect.x = upperLeft.x;\n this.rect.y = upperLeft.y;\n this.rect.width = dimension.width;\n this.rect.height = dimension.height;\n};\n\nLNode.prototype.setCenter = function (cx, cy) {\n this.rect.x = cx - this.rect.width / 2;\n this.rect.y = cy - this.rect.height / 2;\n};\n\nLNode.prototype.setLocation = function (x, y) {\n this.rect.x = x;\n this.rect.y = y;\n};\n\nLNode.prototype.moveBy = function (dx, dy) {\n this.rect.x += dx;\n this.rect.y += dy;\n};\n\nLNode.prototype.getEdgeListToNode = function (to) {\n var edgeList = [];\n var edge;\n var self = this;\n\n self.edges.forEach(function (edge) {\n\n if (edge.target == to) {\n if (edge.source != self) throw \"Incorrect edge source!\";\n\n edgeList.push(edge);\n }\n });\n\n return edgeList;\n};\n\nLNode.prototype.getEdgesBetween = function (other) {\n var edgeList = [];\n var edge;\n\n var self = this;\n self.edges.forEach(function (edge) {\n\n if (!(edge.source == self || edge.target == self)) throw \"Incorrect edge source and/or target\";\n\n if (edge.target == other || edge.source == other) {\n edgeList.push(edge);\n }\n });\n\n return edgeList;\n};\n\nLNode.prototype.getNeighborsList = function () {\n var neighbors = new Set();\n\n var self = this;\n self.edges.forEach(function (edge) {\n\n if (edge.source == self) {\n neighbors.add(edge.target);\n } else {\n if (edge.target != self) {\n throw \"Incorrect incidency!\";\n }\n\n neighbors.add(edge.source);\n }\n });\n\n return neighbors;\n};\n\nLNode.prototype.withChildren = function () {\n var withNeighborsList = new Set();\n var childNode;\n var children;\n\n withNeighborsList.add(this);\n\n if (this.child != null) {\n var nodes = this.child.getNodes();\n for (var i = 0; i < nodes.length; i++) {\n childNode = nodes[i];\n children = childNode.withChildren();\n children.forEach(function (node) {\n withNeighborsList.add(node);\n });\n }\n }\n\n return withNeighborsList;\n};\n\nLNode.prototype.getNoOfChildren = function () {\n var noOfChildren = 0;\n var childNode;\n\n if (this.child == null) {\n noOfChildren = 1;\n } else {\n var nodes = this.child.getNodes();\n for (var i = 0; i < nodes.length; i++) {\n childNode = nodes[i];\n\n noOfChildren += childNode.getNoOfChildren();\n }\n }\n\n if (noOfChildren == 0) {\n noOfChildren = 1;\n }\n return noOfChildren;\n};\n\nLNode.prototype.getEstimatedSize = function () {\n if (this.estimatedSize == Integer.MIN_VALUE) {\n throw \"assert failed\";\n }\n return this.estimatedSize;\n};\n\nLNode.prototype.calcEstimatedSize = function () {\n if (this.child == null) {\n return this.estimatedSize = (this.rect.width + this.rect.height) / 2;\n } else {\n this.estimatedSize = this.child.calcEstimatedSize();\n this.rect.width = this.estimatedSize;\n this.rect.height = this.estimatedSize;\n\n return this.estimatedSize;\n }\n};\n\nLNode.prototype.scatter = function () {\n var randomCenterX;\n var randomCenterY;\n\n var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY;\n var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY;\n randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX;\n\n var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY;\n var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY;\n randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY;\n\n this.rect.x = randomCenterX;\n this.rect.y = randomCenterY;\n};\n\nLNode.prototype.updateBounds = function () {\n if (this.getChild() == null) {\n throw \"assert failed\";\n }\n if (this.getChild().getNodes().length != 0) {\n // wrap the children nodes by re-arranging the boundaries\n var childGraph = this.getChild();\n childGraph.updateBounds(true);\n\n this.rect.x = childGraph.getLeft();\n this.rect.y = childGraph.getTop();\n\n this.setWidth(childGraph.getRight() - childGraph.getLeft());\n this.setHeight(childGraph.getBottom() - childGraph.getTop());\n\n // Update compound bounds considering its label properties \n if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {\n\n var width = childGraph.getRight() - childGraph.getLeft();\n var height = childGraph.getBottom() - childGraph.getTop();\n\n if (this.labelWidth) {\n if (this.labelPosHorizontal == \"left\") {\n this.rect.x -= this.labelWidth;\n this.setWidth(width + this.labelWidth);\n } else if (this.labelPosHorizontal == \"center\" && this.labelWidth > width) {\n this.rect.x -= (this.labelWidth - width) / 2;\n this.setWidth(this.labelWidth);\n } else if (this.labelPosHorizontal == \"right\") {\n this.setWidth(width + this.labelWidth);\n }\n }\n\n if (this.labelHeight) {\n if (this.labelPosVertical == \"top\") {\n this.rect.y -= this.labelHeight;\n this.setHeight(height + this.labelHeight);\n } else if (this.labelPosVertical == \"center\" && this.labelHeight > height) {\n this.rect.y -= (this.labelHeight - height) / 2;\n this.setHeight(this.labelHeight);\n } else if (this.labelPosVertical == \"bottom\") {\n this.setHeight(height + this.labelHeight);\n }\n }\n }\n }\n};\n\nLNode.prototype.getInclusionTreeDepth = function () {\n if (this.inclusionTreeDepth == Integer.MAX_VALUE) {\n throw \"assert failed\";\n }\n return this.inclusionTreeDepth;\n};\n\nLNode.prototype.transform = function (trans) {\n var left = this.rect.x;\n\n if (left > LayoutConstants.WORLD_BOUNDARY) {\n left = LayoutConstants.WORLD_BOUNDARY;\n } else if (left < -LayoutConstants.WORLD_BOUNDARY) {\n left = -LayoutConstants.WORLD_BOUNDARY;\n }\n\n var top = this.rect.y;\n\n if (top > LayoutConstants.WORLD_BOUNDARY) {\n top = LayoutConstants.WORLD_BOUNDARY;\n } else if (top < -LayoutConstants.WORLD_BOUNDARY) {\n top = -LayoutConstants.WORLD_BOUNDARY;\n }\n\n var leftTop = new PointD(left, top);\n var vLeftTop = trans.inverseTransformPoint(leftTop);\n\n this.setLocation(vLeftTop.x, vLeftTop.y);\n};\n\nLNode.prototype.getLeft = function () {\n return this.rect.x;\n};\n\nLNode.prototype.getRight = function () {\n return this.rect.x + this.rect.width;\n};\n\nLNode.prototype.getTop = function () {\n return this.rect.y;\n};\n\nLNode.prototype.getBottom = function () {\n return this.rect.y + this.rect.height;\n};\n\nLNode.prototype.getParent = function () {\n if (this.owner == null) {\n return null;\n }\n\n return this.owner.getParent();\n};\n\nmodule.exports = LNode;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LayoutConstants = __webpack_require__(0);\n\nfunction FDLayoutConstants() {}\n\n//FDLayoutConstants inherits static props in LayoutConstants\nfor (var prop in LayoutConstants) {\n FDLayoutConstants[prop] = LayoutConstants[prop];\n}\n\nFDLayoutConstants.MAX_ITERATIONS = 2500;\n\nFDLayoutConstants.DEFAULT_EDGE_LENGTH = 50;\nFDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45;\nFDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500.0;\nFDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4;\nFDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1.0;\nFDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8;\nFDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5;\nFDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true;\nFDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true;\nFDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3;\nFDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33;\nFDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1000;\nFDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5000;\nFDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100.0;\nFDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3;\nFDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0;\nFDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100;\nFDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1;\nFDLayoutConstants.MIN_EDGE_LENGTH = 1;\nFDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10;\n\nmodule.exports = FDLayoutConstants;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction PointD(x, y) {\n if (x == null && y == null) {\n this.x = 0;\n this.y = 0;\n } else {\n this.x = x;\n this.y = y;\n }\n}\n\nPointD.prototype.getX = function () {\n return this.x;\n};\n\nPointD.prototype.getY = function () {\n return this.y;\n};\n\nPointD.prototype.setX = function (x) {\n this.x = x;\n};\n\nPointD.prototype.setY = function (y) {\n this.y = y;\n};\n\nPointD.prototype.getDifference = function (pt) {\n return new DimensionD(this.x - pt.x, this.y - pt.y);\n};\n\nPointD.prototype.getCopy = function () {\n return new PointD(this.x, this.y);\n};\n\nPointD.prototype.translate = function (dim) {\n this.x += dim.width;\n this.y += dim.height;\n return this;\n};\n\nmodule.exports = PointD;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraphObject = __webpack_require__(2);\nvar Integer = __webpack_require__(10);\nvar LayoutConstants = __webpack_require__(0);\nvar LGraphManager = __webpack_require__(7);\nvar LNode = __webpack_require__(3);\nvar LEdge = __webpack_require__(1);\nvar RectangleD = __webpack_require__(13);\nvar Point = __webpack_require__(12);\nvar LinkedList = __webpack_require__(11);\n\nfunction LGraph(parent, obj2, vGraph) {\n LGraphObject.call(this, vGraph);\n this.estimatedSize = Integer.MIN_VALUE;\n this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN;\n this.edges = [];\n this.nodes = [];\n this.isConnected = false;\n this.parent = parent;\n\n if (obj2 != null && obj2 instanceof LGraphManager) {\n this.graphManager = obj2;\n } else if (obj2 != null && obj2 instanceof Layout) {\n this.graphManager = obj2.graphManager;\n }\n}\n\nLGraph.prototype = Object.create(LGraphObject.prototype);\nfor (var prop in LGraphObject) {\n LGraph[prop] = LGraphObject[prop];\n}\n\nLGraph.prototype.getNodes = function () {\n return this.nodes;\n};\n\nLGraph.prototype.getEdges = function () {\n return this.edges;\n};\n\nLGraph.prototype.getGraphManager = function () {\n return this.graphManager;\n};\n\nLGraph.prototype.getParent = function () {\n return this.parent;\n};\n\nLGraph.prototype.getLeft = function () {\n return this.left;\n};\n\nLGraph.prototype.getRight = function () {\n return this.right;\n};\n\nLGraph.prototype.getTop = function () {\n return this.top;\n};\n\nLGraph.prototype.getBottom = function () {\n return this.bottom;\n};\n\nLGraph.prototype.isConnected = function () {\n return this.isConnected;\n};\n\nLGraph.prototype.add = function (obj1, sourceNode, targetNode) {\n if (sourceNode == null && targetNode == null) {\n var newNode = obj1;\n if (this.graphManager == null) {\n throw \"Graph has no graph mgr!\";\n }\n if (this.getNodes().indexOf(newNode) > -1) {\n throw \"Node already in graph!\";\n }\n newNode.owner = this;\n this.getNodes().push(newNode);\n\n return newNode;\n } else {\n var newEdge = obj1;\n if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) {\n throw \"Source or target not in graph!\";\n }\n\n if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) {\n throw \"Both owners must be this graph!\";\n }\n\n if (sourceNode.owner != targetNode.owner) {\n return null;\n }\n\n // set source and target\n newEdge.source = sourceNode;\n newEdge.target = targetNode;\n\n // set as intra-graph edge\n newEdge.isInterGraph = false;\n\n // add to graph edge list\n this.getEdges().push(newEdge);\n\n // add to incidency lists\n sourceNode.edges.push(newEdge);\n\n if (targetNode != sourceNode) {\n targetNode.edges.push(newEdge);\n }\n\n return newEdge;\n }\n};\n\nLGraph.prototype.remove = function (obj) {\n var node = obj;\n if (obj instanceof LNode) {\n if (node == null) {\n throw \"Node is null!\";\n }\n if (!(node.owner != null && node.owner == this)) {\n throw \"Owner graph is invalid!\";\n }\n if (this.graphManager == null) {\n throw \"Owner graph manager is invalid!\";\n }\n // remove incident edges first (make a copy to do it safely)\n var edgesToBeRemoved = node.edges.slice();\n var edge;\n var s = edgesToBeRemoved.length;\n for (var i = 0; i < s; i++) {\n edge = edgesToBeRemoved[i];\n\n if (edge.isInterGraph) {\n this.graphManager.remove(edge);\n } else {\n edge.source.owner.remove(edge);\n }\n }\n\n // now the node itself\n var index = this.nodes.indexOf(node);\n if (index == -1) {\n throw \"Node not in owner node list!\";\n }\n\n this.nodes.splice(index, 1);\n } else if (obj instanceof LEdge) {\n var edge = obj;\n if (edge == null) {\n throw \"Edge is null!\";\n }\n if (!(edge.source != null && edge.target != null)) {\n throw \"Source and/or target is null!\";\n }\n if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) {\n throw \"Source and/or target owner is invalid!\";\n }\n\n var sourceIndex = edge.source.edges.indexOf(edge);\n var targetIndex = edge.target.edges.indexOf(edge);\n if (!(sourceIndex > -1 && targetIndex > -1)) {\n throw \"Source and/or target doesn't know this edge!\";\n }\n\n edge.source.edges.splice(sourceIndex, 1);\n\n if (edge.target != edge.source) {\n edge.target.edges.splice(targetIndex, 1);\n }\n\n var index = edge.source.owner.getEdges().indexOf(edge);\n if (index == -1) {\n throw \"Not in owner's edge list!\";\n }\n\n edge.source.owner.getEdges().splice(index, 1);\n }\n};\n\nLGraph.prototype.updateLeftTop = function () {\n var top = Integer.MAX_VALUE;\n var left = Integer.MAX_VALUE;\n var nodeTop;\n var nodeLeft;\n var margin;\n\n var nodes = this.getNodes();\n var s = nodes.length;\n\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n nodeTop = lNode.getTop();\n nodeLeft = lNode.getLeft();\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n }\n\n // Do we have any nodes in this graph?\n if (top == Integer.MAX_VALUE) {\n return null;\n }\n\n if (nodes[0].getParent().paddingLeft != undefined) {\n margin = nodes[0].getParent().paddingLeft;\n } else {\n margin = this.margin;\n }\n\n this.left = left - margin;\n this.top = top - margin;\n\n // Apply the margins and return the result\n return new Point(this.left, this.top);\n};\n\nLGraph.prototype.updateBounds = function (recursive) {\n // calculate bounds\n var left = Integer.MAX_VALUE;\n var right = -Integer.MAX_VALUE;\n var top = Integer.MAX_VALUE;\n var bottom = -Integer.MAX_VALUE;\n var nodeLeft;\n var nodeRight;\n var nodeTop;\n var nodeBottom;\n var margin;\n\n var nodes = this.nodes;\n var s = nodes.length;\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n\n if (recursive && lNode.child != null) {\n lNode.updateBounds();\n }\n nodeLeft = lNode.getLeft();\n nodeRight = lNode.getRight();\n nodeTop = lNode.getTop();\n nodeBottom = lNode.getBottom();\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n\n if (right < nodeRight) {\n right = nodeRight;\n }\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (bottom < nodeBottom) {\n bottom = nodeBottom;\n }\n }\n\n var boundingRect = new RectangleD(left, top, right - left, bottom - top);\n if (left == Integer.MAX_VALUE) {\n this.left = this.parent.getLeft();\n this.right = this.parent.getRight();\n this.top = this.parent.getTop();\n this.bottom = this.parent.getBottom();\n }\n\n if (nodes[0].getParent().paddingLeft != undefined) {\n margin = nodes[0].getParent().paddingLeft;\n } else {\n margin = this.margin;\n }\n\n this.left = boundingRect.x - margin;\n this.right = boundingRect.x + boundingRect.width + margin;\n this.top = boundingRect.y - margin;\n this.bottom = boundingRect.y + boundingRect.height + margin;\n};\n\nLGraph.calculateBounds = function (nodes) {\n var left = Integer.MAX_VALUE;\n var right = -Integer.MAX_VALUE;\n var top = Integer.MAX_VALUE;\n var bottom = -Integer.MAX_VALUE;\n var nodeLeft;\n var nodeRight;\n var nodeTop;\n var nodeBottom;\n\n var s = nodes.length;\n\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n nodeLeft = lNode.getLeft();\n nodeRight = lNode.getRight();\n nodeTop = lNode.getTop();\n nodeBottom = lNode.getBottom();\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n\n if (right < nodeRight) {\n right = nodeRight;\n }\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (bottom < nodeBottom) {\n bottom = nodeBottom;\n }\n }\n\n var boundingRect = new RectangleD(left, top, right - left, bottom - top);\n\n return boundingRect;\n};\n\nLGraph.prototype.getInclusionTreeDepth = function () {\n if (this == this.graphManager.getRoot()) {\n return 1;\n } else {\n return this.parent.getInclusionTreeDepth();\n }\n};\n\nLGraph.prototype.getEstimatedSize = function () {\n if (this.estimatedSize == Integer.MIN_VALUE) {\n throw \"assert failed\";\n }\n return this.estimatedSize;\n};\n\nLGraph.prototype.calcEstimatedSize = function () {\n var size = 0;\n var nodes = this.nodes;\n var s = nodes.length;\n\n for (var i = 0; i < s; i++) {\n var lNode = nodes[i];\n size += lNode.calcEstimatedSize();\n }\n\n if (size == 0) {\n this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE;\n } else {\n this.estimatedSize = size / Math.sqrt(this.nodes.length);\n }\n\n return this.estimatedSize;\n};\n\nLGraph.prototype.updateConnected = function () {\n var self = this;\n if (this.nodes.length == 0) {\n this.isConnected = true;\n return;\n }\n\n var queue = new LinkedList();\n var visited = new Set();\n var currentNode = this.nodes[0];\n var neighborEdges;\n var currentNeighbor;\n var childrenOfNode = currentNode.withChildren();\n childrenOfNode.forEach(function (node) {\n queue.push(node);\n visited.add(node);\n });\n\n while (queue.length !== 0) {\n currentNode = queue.shift();\n\n // Traverse all neighbors of this node\n neighborEdges = currentNode.getEdges();\n var size = neighborEdges.length;\n for (var i = 0; i < size; i++) {\n var neighborEdge = neighborEdges[i];\n currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this);\n\n // Add unvisited neighbors to the list to visit\n if (currentNeighbor != null && !visited.has(currentNeighbor)) {\n var childrenOfNeighbor = currentNeighbor.withChildren();\n\n childrenOfNeighbor.forEach(function (node) {\n queue.push(node);\n visited.add(node);\n });\n }\n }\n }\n\n this.isConnected = false;\n\n if (visited.size >= this.nodes.length) {\n var noOfVisitedInThisGraph = 0;\n\n visited.forEach(function (visitedNode) {\n if (visitedNode.owner == self) {\n noOfVisitedInThisGraph++;\n }\n });\n\n if (noOfVisitedInThisGraph == this.nodes.length) {\n this.isConnected = true;\n }\n }\n};\n\nmodule.exports = LGraph;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LGraph;\nvar LEdge = __webpack_require__(1);\n\nfunction LGraphManager(layout) {\n LGraph = __webpack_require__(6); // It may be better to initilize this out of this function but it gives an error (Right-hand side of 'instanceof' is not callable) now.\n this.layout = layout;\n\n this.graphs = [];\n this.edges = [];\n}\n\nLGraphManager.prototype.addRoot = function () {\n var ngraph = this.layout.newGraph();\n var nnode = this.layout.newNode(null);\n var root = this.add(ngraph, nnode);\n this.setRootGraph(root);\n return this.rootGraph;\n};\n\nLGraphManager.prototype.add = function (newGraph, parentNode, newEdge, sourceNode, targetNode) {\n //there are just 2 parameters are passed then it adds an LGraph else it adds an LEdge\n if (newEdge == null && sourceNode == null && targetNode == null) {\n if (newGraph == null) {\n throw \"Graph is null!\";\n }\n if (parentNode == null) {\n throw \"Parent node is null!\";\n }\n if (this.graphs.indexOf(newGraph) > -1) {\n throw \"Graph already in this graph mgr!\";\n }\n\n this.graphs.push(newGraph);\n\n if (newGraph.parent != null) {\n throw \"Already has a parent!\";\n }\n if (parentNode.child != null) {\n throw \"Already has a child!\";\n }\n\n newGraph.parent = parentNode;\n parentNode.child = newGraph;\n\n return newGraph;\n } else {\n //change the order of the parameters\n targetNode = newEdge;\n sourceNode = parentNode;\n newEdge = newGraph;\n var sourceGraph = sourceNode.getOwner();\n var targetGraph = targetNode.getOwner();\n\n if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) {\n throw \"Source not in this graph mgr!\";\n }\n if (!(targetGraph != null && targetGraph.getGraphManager() == this)) {\n throw \"Target not in this graph mgr!\";\n }\n\n if (sourceGraph == targetGraph) {\n newEdge.isInterGraph = false;\n return sourceGraph.add(newEdge, sourceNode, targetNode);\n } else {\n newEdge.isInterGraph = true;\n\n // set source and target\n newEdge.source = sourceNode;\n newEdge.target = targetNode;\n\n // add edge to inter-graph edge list\n if (this.edges.indexOf(newEdge) > -1) {\n throw \"Edge already in inter-graph edge list!\";\n }\n\n this.edges.push(newEdge);\n\n // add edge to source and target incidency lists\n if (!(newEdge.source != null && newEdge.target != null)) {\n throw \"Edge source and/or target is null!\";\n }\n\n if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) {\n throw \"Edge already in source and/or target incidency list!\";\n }\n\n newEdge.source.edges.push(newEdge);\n newEdge.target.edges.push(newEdge);\n\n return newEdge;\n }\n }\n};\n\nLGraphManager.prototype.remove = function (lObj) {\n if (lObj instanceof LGraph) {\n var graph = lObj;\n if (graph.getGraphManager() != this) {\n throw \"Graph not in this graph mgr\";\n }\n if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) {\n throw \"Invalid parent node!\";\n }\n\n // first the edges (make a copy to do it safely)\n var edgesToBeRemoved = [];\n\n edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges());\n\n var edge;\n var s = edgesToBeRemoved.length;\n for (var i = 0; i < s; i++) {\n edge = edgesToBeRemoved[i];\n graph.remove(edge);\n }\n\n // then the nodes (make a copy to do it safely)\n var nodesToBeRemoved = [];\n\n nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes());\n\n var node;\n s = nodesToBeRemoved.length;\n for (var i = 0; i < s; i++) {\n node = nodesToBeRemoved[i];\n graph.remove(node);\n }\n\n // check if graph is the root\n if (graph == this.rootGraph) {\n this.setRootGraph(null);\n }\n\n // now remove the graph itself\n var index = this.graphs.indexOf(graph);\n this.graphs.splice(index, 1);\n\n // also reset the parent of the graph\n graph.parent = null;\n } else if (lObj instanceof LEdge) {\n edge = lObj;\n if (edge == null) {\n throw \"Edge is null!\";\n }\n if (!edge.isInterGraph) {\n throw \"Not an inter-graph edge!\";\n }\n if (!(edge.source != null && edge.target != null)) {\n throw \"Source and/or target is null!\";\n }\n\n // remove edge from source and target nodes' incidency lists\n\n if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) {\n throw \"Source and/or target doesn't know this edge!\";\n }\n\n var index = edge.source.edges.indexOf(edge);\n edge.source.edges.splice(index, 1);\n index = edge.target.edges.indexOf(edge);\n edge.target.edges.splice(index, 1);\n\n // remove edge from owner graph manager's inter-graph edge list\n\n if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) {\n throw \"Edge owner graph or owner graph manager is null!\";\n }\n if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) {\n throw \"Not in owner graph manager's edge list!\";\n }\n\n var index = edge.source.owner.getGraphManager().edges.indexOf(edge);\n edge.source.owner.getGraphManager().edges.splice(index, 1);\n }\n};\n\nLGraphManager.prototype.updateBounds = function () {\n this.rootGraph.updateBounds(true);\n};\n\nLGraphManager.prototype.getGraphs = function () {\n return this.graphs;\n};\n\nLGraphManager.prototype.getAllNodes = function () {\n if (this.allNodes == null) {\n var nodeList = [];\n var graphs = this.getGraphs();\n var s = graphs.length;\n for (var i = 0; i < s; i++) {\n nodeList = nodeList.concat(graphs[i].getNodes());\n }\n this.allNodes = nodeList;\n }\n return this.allNodes;\n};\n\nLGraphManager.prototype.resetAllNodes = function () {\n this.allNodes = null;\n};\n\nLGraphManager.prototype.resetAllEdges = function () {\n this.allEdges = null;\n};\n\nLGraphManager.prototype.resetAllNodesToApplyGravitation = function () {\n this.allNodesToApplyGravitation = null;\n};\n\nLGraphManager.prototype.getAllEdges = function () {\n if (this.allEdges == null) {\n var edgeList = [];\n var graphs = this.getGraphs();\n var s = graphs.length;\n for (var i = 0; i < graphs.length; i++) {\n edgeList = edgeList.concat(graphs[i].getEdges());\n }\n\n edgeList = edgeList.concat(this.edges);\n\n this.allEdges = edgeList;\n }\n return this.allEdges;\n};\n\nLGraphManager.prototype.getAllNodesToApplyGravitation = function () {\n return this.allNodesToApplyGravitation;\n};\n\nLGraphManager.prototype.setAllNodesToApplyGravitation = function (nodeList) {\n if (this.allNodesToApplyGravitation != null) {\n throw \"assert failed\";\n }\n\n this.allNodesToApplyGravitation = nodeList;\n};\n\nLGraphManager.prototype.getRoot = function () {\n return this.rootGraph;\n};\n\nLGraphManager.prototype.setRootGraph = function (graph) {\n if (graph.getGraphManager() != this) {\n throw \"Root not in this graph mgr!\";\n }\n\n this.rootGraph = graph;\n // root graph must have a root node associated with it for convenience\n if (graph.parent == null) {\n graph.parent = this.layout.newNode(\"Root node\");\n }\n};\n\nLGraphManager.prototype.getLayout = function () {\n return this.layout;\n};\n\nLGraphManager.prototype.isOneAncestorOfOther = function (firstNode, secondNode) {\n if (!(firstNode != null && secondNode != null)) {\n throw \"assert failed\";\n }\n\n if (firstNode == secondNode) {\n return true;\n }\n // Is second node an ancestor of the first one?\n var ownerGraph = firstNode.getOwner();\n var parentNode;\n\n do {\n parentNode = ownerGraph.getParent();\n\n if (parentNode == null) {\n break;\n }\n\n if (parentNode == secondNode) {\n return true;\n }\n\n ownerGraph = parentNode.getOwner();\n if (ownerGraph == null) {\n break;\n }\n } while (true);\n // Is first node an ancestor of the second one?\n ownerGraph = secondNode.getOwner();\n\n do {\n parentNode = ownerGraph.getParent();\n\n if (parentNode == null) {\n break;\n }\n\n if (parentNode == firstNode) {\n return true;\n }\n\n ownerGraph = parentNode.getOwner();\n if (ownerGraph == null) {\n break;\n }\n } while (true);\n\n return false;\n};\n\nLGraphManager.prototype.calcLowestCommonAncestors = function () {\n var edge;\n var sourceNode;\n var targetNode;\n var sourceAncestorGraph;\n var targetAncestorGraph;\n\n var edges = this.getAllEdges();\n var s = edges.length;\n for (var i = 0; i < s; i++) {\n edge = edges[i];\n\n sourceNode = edge.source;\n targetNode = edge.target;\n edge.lca = null;\n edge.sourceInLca = sourceNode;\n edge.targetInLca = targetNode;\n\n if (sourceNode == targetNode) {\n edge.lca = sourceNode.getOwner();\n continue;\n }\n\n sourceAncestorGraph = sourceNode.getOwner();\n\n while (edge.lca == null) {\n edge.targetInLca = targetNode;\n targetAncestorGraph = targetNode.getOwner();\n\n while (edge.lca == null) {\n if (targetAncestorGraph == sourceAncestorGraph) {\n edge.lca = targetAncestorGraph;\n break;\n }\n\n if (targetAncestorGraph == this.rootGraph) {\n break;\n }\n\n if (edge.lca != null) {\n throw \"assert failed\";\n }\n edge.targetInLca = targetAncestorGraph.getParent();\n targetAncestorGraph = edge.targetInLca.getOwner();\n }\n\n if (sourceAncestorGraph == this.rootGraph) {\n break;\n }\n\n if (edge.lca == null) {\n edge.sourceInLca = sourceAncestorGraph.getParent();\n sourceAncestorGraph = edge.sourceInLca.getOwner();\n }\n }\n\n if (edge.lca == null) {\n throw \"assert failed\";\n }\n }\n};\n\nLGraphManager.prototype.calcLowestCommonAncestor = function (firstNode, secondNode) {\n if (firstNode == secondNode) {\n return firstNode.getOwner();\n }\n var firstOwnerGraph = firstNode.getOwner();\n\n do {\n if (firstOwnerGraph == null) {\n break;\n }\n var secondOwnerGraph = secondNode.getOwner();\n\n do {\n if (secondOwnerGraph == null) {\n break;\n }\n\n if (secondOwnerGraph == firstOwnerGraph) {\n return secondOwnerGraph;\n }\n secondOwnerGraph = secondOwnerGraph.getParent().getOwner();\n } while (true);\n\n firstOwnerGraph = firstOwnerGraph.getParent().getOwner();\n } while (true);\n\n return firstOwnerGraph;\n};\n\nLGraphManager.prototype.calcInclusionTreeDepths = function (graph, depth) {\n if (graph == null && depth == null) {\n graph = this.rootGraph;\n depth = 1;\n }\n var node;\n\n var nodes = graph.getNodes();\n var s = nodes.length;\n for (var i = 0; i < s; i++) {\n node = nodes[i];\n node.inclusionTreeDepth = depth;\n\n if (node.child != null) {\n this.calcInclusionTreeDepths(node.child, depth + 1);\n }\n }\n};\n\nLGraphManager.prototype.includesInvalidEdge = function () {\n var edge;\n var edgesToRemove = [];\n\n var s = this.edges.length;\n for (var i = 0; i < s; i++) {\n edge = this.edges[i];\n\n if (this.isOneAncestorOfOther(edge.source, edge.target)) {\n edgesToRemove.push(edge);\n }\n }\n\n // Remove invalid edges from graph manager\n for (var i = 0; i < edgesToRemove.length; i++) {\n this.remove(edgesToRemove[i]);\n }\n\n // Invalid edges are cleared, so return false\n return false;\n};\n\nmodule.exports = LGraphManager;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * This class maintains a list of static geometry related utility methods.\n *\n *\n * Copyright: i-Vis Research Group, Bilkent University, 2007 - present\n */\n\nvar Point = __webpack_require__(12);\n\nfunction IGeometry() {}\n\n/**\n * This method calculates *half* the amount in x and y directions of the two\n * input rectangles needed to separate them keeping their respective\n * positioning, and returns the result in the input array. An input\n * separation buffer added to the amount in both directions. We assume that\n * the two rectangles do intersect.\n */\nIGeometry.calcSeparationAmount = function (rectA, rectB, overlapAmount, separationBuffer) {\n if (!rectA.intersects(rectB)) {\n throw \"assert failed\";\n }\n\n var directions = new Array(2);\n\n this.decideDirectionsForOverlappingNodes(rectA, rectB, directions);\n\n overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x);\n overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y);\n\n // update the overlapping amounts for the following cases:\n if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) {\n /* Case x.1:\n *\n * rectA\n * \t| |\n * \t| _________ |\n * \t| | | |\n * \t|________|_______|______|\n * \t\t\t | |\n * | |\n * rectB\n */\n overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight());\n } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) {\n /* Case x.2:\n *\n * rectB\n * \t| |\n * \t| _________ |\n * \t| | | |\n * \t|________|_______|______|\n * \t\t\t | |\n * | |\n * rectA\n */\n overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight());\n }\n if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) {\n /* Case y.1:\n * ________ rectA\n * |\n * |\n * ______|____ rectB\n * | |\n * | |\n * ______|____|\n * |\n * |\n * |________\n *\n */\n overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom());\n } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) {\n /* Case y.2:\n * ________ rectB\n * |\n * |\n * ______|____ rectA\n * | |\n * | |\n * ______|____|\n * |\n * |\n * |________\n *\n */\n overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom());\n }\n\n // find slope of the line passes two centers\n var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX()));\n // if centers are overlapped\n if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) {\n // assume the slope is 1 (45 degree)\n slope = 1.0;\n }\n\n var moveByY = slope * overlapAmount[0];\n var moveByX = overlapAmount[1] / slope;\n if (overlapAmount[0] < moveByX) {\n moveByX = overlapAmount[0];\n } else {\n moveByY = overlapAmount[1];\n }\n // return half the amount so that if each rectangle is moved by these\n // amounts in opposite directions, overlap will be resolved\n overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer);\n overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer);\n};\n\n/**\n * This method decides the separation direction of overlapping nodes\n *\n * if directions[0] = -1, then rectA goes left\n * if directions[0] = 1, then rectA goes right\n * if directions[1] = -1, then rectA goes up\n * if directions[1] = 1, then rectA goes down\n */\nIGeometry.decideDirectionsForOverlappingNodes = function (rectA, rectB, directions) {\n if (rectA.getCenterX() < rectB.getCenterX()) {\n directions[0] = -1;\n } else {\n directions[0] = 1;\n }\n\n if (rectA.getCenterY() < rectB.getCenterY()) {\n directions[1] = -1;\n } else {\n directions[1] = 1;\n }\n};\n\n/**\n * This method calculates the intersection (clipping) points of the two\n * input rectangles with line segment defined by the centers of these two\n * rectangles. The clipping points are saved in the input double array and\n * whether or not the two rectangles overlap is returned.\n */\nIGeometry.getIntersection2 = function (rectA, rectB, result) {\n //result[0-1] will contain clipPoint of rectA, result[2-3] will contain clipPoint of rectB\n var p1x = rectA.getCenterX();\n var p1y = rectA.getCenterY();\n var p2x = rectB.getCenterX();\n var p2y = rectB.getCenterY();\n\n //if two rectangles intersect, then clipping points are centers\n if (rectA.intersects(rectB)) {\n result[0] = p1x;\n result[1] = p1y;\n result[2] = p2x;\n result[3] = p2y;\n return true;\n }\n //variables for rectA\n var topLeftAx = rectA.getX();\n var topLeftAy = rectA.getY();\n var topRightAx = rectA.getRight();\n var bottomLeftAx = rectA.getX();\n var bottomLeftAy = rectA.getBottom();\n var bottomRightAx = rectA.getRight();\n var halfWidthA = rectA.getWidthHalf();\n var halfHeightA = rectA.getHeightHalf();\n //variables for rectB\n var topLeftBx = rectB.getX();\n var topLeftBy = rectB.getY();\n var topRightBx = rectB.getRight();\n var bottomLeftBx = rectB.getX();\n var bottomLeftBy = rectB.getBottom();\n var bottomRightBx = rectB.getRight();\n var halfWidthB = rectB.getWidthHalf();\n var halfHeightB = rectB.getHeightHalf();\n\n //flag whether clipping points are found\n var clipPointAFound = false;\n var clipPointBFound = false;\n\n // line is vertical\n if (p1x === p2x) {\n if (p1y > p2y) {\n result[0] = p1x;\n result[1] = topLeftAy;\n result[2] = p2x;\n result[3] = bottomLeftBy;\n return false;\n } else if (p1y < p2y) {\n result[0] = p1x;\n result[1] = bottomLeftAy;\n result[2] = p2x;\n result[3] = topLeftBy;\n return false;\n } else {\n //not line, return null;\n }\n }\n // line is horizontal\n else if (p1y === p2y) {\n if (p1x > p2x) {\n result[0] = topLeftAx;\n result[1] = p1y;\n result[2] = topRightBx;\n result[3] = p2y;\n return false;\n } else if (p1x < p2x) {\n result[0] = topRightAx;\n result[1] = p1y;\n result[2] = topLeftBx;\n result[3] = p2y;\n return false;\n } else {\n //not valid line, return null;\n }\n } else {\n //slopes of rectA's and rectB's diagonals\n var slopeA = rectA.height / rectA.width;\n var slopeB = rectB.height / rectB.width;\n\n //slope of line between center of rectA and center of rectB\n var slopePrime = (p2y - p1y) / (p2x - p1x);\n var cardinalDirectionA = void 0;\n var cardinalDirectionB = void 0;\n var tempPointAx = void 0;\n var tempPointAy = void 0;\n var tempPointBx = void 0;\n var tempPointBy = void 0;\n\n //determine whether clipping point is the corner of nodeA\n if (-slopeA === slopePrime) {\n if (p1x > p2x) {\n result[0] = bottomLeftAx;\n result[1] = bottomLeftAy;\n clipPointAFound = true;\n } else {\n result[0] = topRightAx;\n result[1] = topLeftAy;\n clipPointAFound = true;\n }\n } else if (slopeA === slopePrime) {\n if (p1x > p2x) {\n result[0] = topLeftAx;\n result[1] = topLeftAy;\n clipPointAFound = true;\n } else {\n result[0] = bottomRightAx;\n result[1] = bottomLeftAy;\n clipPointAFound = true;\n }\n }\n\n //determine whether clipping point is the corner of nodeB\n if (-slopeB === slopePrime) {\n if (p2x > p1x) {\n result[2] = bottomLeftBx;\n result[3] = bottomLeftBy;\n clipPointBFound = true;\n } else {\n result[2] = topRightBx;\n result[3] = topLeftBy;\n clipPointBFound = true;\n }\n } else if (slopeB === slopePrime) {\n if (p2x > p1x) {\n result[2] = topLeftBx;\n result[3] = topLeftBy;\n clipPointBFound = true;\n } else {\n result[2] = bottomRightBx;\n result[3] = bottomLeftBy;\n clipPointBFound = true;\n }\n }\n\n //if both clipping points are corners\n if (clipPointAFound && clipPointBFound) {\n return false;\n }\n\n //determine Cardinal Direction of rectangles\n if (p1x > p2x) {\n if (p1y > p2y) {\n cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4);\n cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2);\n } else {\n cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3);\n cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1);\n }\n } else {\n if (p1y > p2y) {\n cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1);\n cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3);\n } else {\n cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2);\n cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4);\n }\n }\n //calculate clipping Point if it is not found before\n if (!clipPointAFound) {\n switch (cardinalDirectionA) {\n case 1:\n tempPointAy = topLeftAy;\n tempPointAx = p1x + -halfHeightA / slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n case 2:\n tempPointAx = bottomRightAx;\n tempPointAy = p1y + halfWidthA * slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n case 3:\n tempPointAy = bottomLeftAy;\n tempPointAx = p1x + halfHeightA / slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n case 4:\n tempPointAx = bottomLeftAx;\n tempPointAy = p1y + -halfWidthA * slopePrime;\n result[0] = tempPointAx;\n result[1] = tempPointAy;\n break;\n }\n }\n if (!clipPointBFound) {\n switch (cardinalDirectionB) {\n case 1:\n tempPointBy = topLeftBy;\n tempPointBx = p2x + -halfHeightB / slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n case 2:\n tempPointBx = bottomRightBx;\n tempPointBy = p2y + halfWidthB * slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n case 3:\n tempPointBy = bottomLeftBy;\n tempPointBx = p2x + halfHeightB / slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n case 4:\n tempPointBx = bottomLeftBx;\n tempPointBy = p2y + -halfWidthB * slopePrime;\n result[2] = tempPointBx;\n result[3] = tempPointBy;\n break;\n }\n }\n }\n return false;\n};\n\n/**\n * This method returns in which cardinal direction does input point stays\n * 1: North\n * 2: East\n * 3: South\n * 4: West\n */\nIGeometry.getCardinalDirection = function (slope, slopePrime, line) {\n if (slope > slopePrime) {\n return line;\n } else {\n return 1 + line % 4;\n }\n};\n\n/**\n * This method calculates the intersection of the two lines defined by\n * point pairs (s1,s2) and (f1,f2).\n */\nIGeometry.getIntersection = function (s1, s2, f1, f2) {\n if (f2 == null) {\n return this.getIntersection2(s1, s2, f1);\n }\n\n var x1 = s1.x;\n var y1 = s1.y;\n var x2 = s2.x;\n var y2 = s2.y;\n var x3 = f1.x;\n var y3 = f1.y;\n var x4 = f2.x;\n var y4 = f2.y;\n var x = void 0,\n y = void 0; // intersection point\n var a1 = void 0,\n a2 = void 0,\n b1 = void 0,\n b2 = void 0,\n c1 = void 0,\n c2 = void 0; // coefficients of line eqns.\n var denom = void 0;\n\n a1 = y2 - y1;\n b1 = x1 - x2;\n c1 = x2 * y1 - x1 * y2; // { a1*x + b1*y + c1 = 0 is line 1 }\n\n a2 = y4 - y3;\n b2 = x3 - x4;\n c2 = x4 * y3 - x3 * y4; // { a2*x + b2*y + c2 = 0 is line 2 }\n\n denom = a1 * b2 - a2 * b1;\n\n if (denom === 0) {\n return null;\n }\n\n x = (b1 * c2 - b2 * c1) / denom;\n y = (a2 * c1 - a1 * c2) / denom;\n\n return new Point(x, y);\n};\n\n/**\n * This method finds and returns the angle of the vector from the + x-axis\n * in clockwise direction (compatible w/ Java coordinate system!).\n */\nIGeometry.angleOfVector = function (Cx, Cy, Nx, Ny) {\n var C_angle = void 0;\n\n if (Cx !== Nx) {\n C_angle = Math.atan((Ny - Cy) / (Nx - Cx));\n\n if (Nx < Cx) {\n C_angle += Math.PI;\n } else if (Ny < Cy) {\n C_angle += this.TWO_PI;\n }\n } else if (Ny < Cy) {\n C_angle = this.ONE_AND_HALF_PI; // 270 degrees\n } else {\n C_angle = this.HALF_PI; // 90 degrees\n }\n\n return C_angle;\n};\n\n/**\n * This method checks whether the given two line segments (one with point\n * p1 and p2, the other with point p3 and p4) intersect at a point other\n * than these points.\n */\nIGeometry.doIntersect = function (p1, p2, p3, p4) {\n var a = p1.x;\n var b = p1.y;\n var c = p2.x;\n var d = p2.y;\n var p = p3.x;\n var q = p3.y;\n var r = p4.x;\n var s = p4.y;\n var det = (c - a) * (s - q) - (r - p) * (d - b);\n\n if (det === 0) {\n return false;\n } else {\n var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det;\n var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det;\n return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1;\n }\n};\n\n/**\n * This method checks and calculates the intersection of \n * a line segment and a circle.\n */\nIGeometry.findCircleLineIntersections = function (Ex, Ey, Lx, Ly, Cx, Cy, r) {\n\n // E is the starting point of the ray,\n // L is the end point of the ray,\n // C is the center of sphere you're testing against\n // r is the radius of that sphere\n\n // Compute:\n // d = L - E ( Direction vector of ray, from start to end )\n // f = E - C ( Vector from center sphere to ray start )\n\n // Then the intersection is found by..\n // P = E + t * d\n // This is a parametric equation:\n // Px = Ex + tdx\n // Py = Ey + tdy\n\n // get a, b, c values\n var a = (Lx - Ex) * (Lx - Ex) + (Ly - Ey) * (Ly - Ey);\n var b = 2 * ((Ex - Cx) * (Lx - Ex) + (Ey - Cy) * (Ly - Ey));\n var c = (Ex - Cx) * (Ex - Cx) + (Ey - Cy) * (Ey - Cy) - r * r;\n\n // get discriminant\n var disc = b * b - 4 * a * c;\n if (disc >= 0) {\n // insert into quadratic formula\n var t1 = (-b + Math.sqrt(b * b - 4 * a * c)) / (2 * a);\n var t2 = (-b - Math.sqrt(b * b - 4 * a * c)) / (2 * a);\n var intersections = null;\n if (t1 >= 0 && t1 <= 1) {\n // t1 is the intersection, and it's closer than t2\n // (since t1 uses -b - discriminant)\n // Impale, Poke\n return [t1];\n }\n\n // here t1 didn't intersect so we are either started\n // inside the sphere or completely past it\n if (t2 >= 0 && t2 <= 1) {\n // ExitWound\n return [t2];\n }\n\n return intersections;\n } else return null;\n};\n\n// -----------------------------------------------------------------------------\n// Section: Class Constants\n// -----------------------------------------------------------------------------\n/**\n * Some useful pre-calculated constants\n */\nIGeometry.HALF_PI = 0.5 * Math.PI;\nIGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI;\nIGeometry.TWO_PI = 2.0 * Math.PI;\nIGeometry.THREE_PI = 3.0 * Math.PI;\n\nmodule.exports = IGeometry;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction IMath() {}\n\n/**\n * This method returns the sign of the input value.\n */\nIMath.sign = function (value) {\n if (value > 0) {\n return 1;\n } else if (value < 0) {\n return -1;\n } else {\n return 0;\n }\n};\n\nIMath.floor = function (value) {\n return value < 0 ? Math.ceil(value) : Math.floor(value);\n};\n\nIMath.ceil = function (value) {\n return value < 0 ? Math.floor(value) : Math.ceil(value);\n};\n\nmodule.exports = IMath;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction Integer() {}\n\nInteger.MAX_VALUE = 2147483647;\nInteger.MIN_VALUE = -2147483648;\n\nmodule.exports = Integer;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar nodeFrom = function nodeFrom(value) {\n return { value: value, next: null, prev: null };\n};\n\nvar add = function add(prev, node, next, list) {\n if (prev !== null) {\n prev.next = node;\n } else {\n list.head = node;\n }\n\n if (next !== null) {\n next.prev = node;\n } else {\n list.tail = node;\n }\n\n node.prev = prev;\n node.next = next;\n\n list.length++;\n\n return node;\n};\n\nvar _remove = function _remove(node, list) {\n var prev = node.prev,\n next = node.next;\n\n\n if (prev !== null) {\n prev.next = next;\n } else {\n list.head = next;\n }\n\n if (next !== null) {\n next.prev = prev;\n } else {\n list.tail = prev;\n }\n\n node.prev = node.next = null;\n\n list.length--;\n\n return node;\n};\n\nvar LinkedList = function () {\n function LinkedList(vals) {\n var _this = this;\n\n _classCallCheck(this, LinkedList);\n\n this.length = 0;\n this.head = null;\n this.tail = null;\n\n if (vals != null) {\n vals.forEach(function (v) {\n return _this.push(v);\n });\n }\n }\n\n _createClass(LinkedList, [{\n key: \"size\",\n value: function size() {\n return this.length;\n }\n }, {\n key: \"insertBefore\",\n value: function insertBefore(val, otherNode) {\n return add(otherNode.prev, nodeFrom(val), otherNode, this);\n }\n }, {\n key: \"insertAfter\",\n value: function insertAfter(val, otherNode) {\n return add(otherNode, nodeFrom(val), otherNode.next, this);\n }\n }, {\n key: \"insertNodeBefore\",\n value: function insertNodeBefore(newNode, otherNode) {\n return add(otherNode.prev, newNode, otherNode, this);\n }\n }, {\n key: \"insertNodeAfter\",\n value: function insertNodeAfter(newNode, otherNode) {\n return add(otherNode, newNode, otherNode.next, this);\n }\n }, {\n key: \"push\",\n value: function push(val) {\n return add(this.tail, nodeFrom(val), null, this);\n }\n }, {\n key: \"unshift\",\n value: function unshift(val) {\n return add(null, nodeFrom(val), this.head, this);\n }\n }, {\n key: \"remove\",\n value: function remove(node) {\n return _remove(node, this);\n }\n }, {\n key: \"pop\",\n value: function pop() {\n return _remove(this.tail, this).value;\n }\n }, {\n key: \"popNode\",\n value: function popNode() {\n return _remove(this.tail, this);\n }\n }, {\n key: \"shift\",\n value: function shift() {\n return _remove(this.head, this).value;\n }\n }, {\n key: \"shiftNode\",\n value: function shiftNode() {\n return _remove(this.head, this);\n }\n }, {\n key: \"get_object_at\",\n value: function get_object_at(index) {\n if (index <= this.length()) {\n var i = 1;\n var current = this.head;\n while (i < index) {\n current = current.next;\n i++;\n }\n return current.value;\n }\n }\n }, {\n key: \"set_object_at\",\n value: function set_object_at(index, value) {\n if (index <= this.length()) {\n var i = 1;\n var current = this.head;\n while (i < index) {\n current = current.next;\n i++;\n }\n current.value = value;\n }\n }\n }]);\n\n return LinkedList;\n}();\n\nmodule.exports = LinkedList;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/*\r\n *This class is the javascript implementation of the Point.java class in jdk\r\n */\nfunction Point(x, y, p) {\n this.x = null;\n this.y = null;\n if (x == null && y == null && p == null) {\n this.x = 0;\n this.y = 0;\n } else if (typeof x == 'number' && typeof y == 'number' && p == null) {\n this.x = x;\n this.y = y;\n } else if (x.constructor.name == 'Point' && y == null && p == null) {\n p = x;\n this.x = p.x;\n this.y = p.y;\n }\n}\n\nPoint.prototype.getX = function () {\n return this.x;\n};\n\nPoint.prototype.getY = function () {\n return this.y;\n};\n\nPoint.prototype.getLocation = function () {\n return new Point(this.x, this.y);\n};\n\nPoint.prototype.setLocation = function (x, y, p) {\n if (x.constructor.name == 'Point' && y == null && p == null) {\n p = x;\n this.setLocation(p.x, p.y);\n } else if (typeof x == 'number' && typeof y == 'number' && p == null) {\n //if both parameters are integer just move (x,y) location\n if (parseInt(x) == x && parseInt(y) == y) {\n this.move(x, y);\n } else {\n this.x = Math.floor(x + 0.5);\n this.y = Math.floor(y + 0.5);\n }\n }\n};\n\nPoint.prototype.move = function (x, y) {\n this.x = x;\n this.y = y;\n};\n\nPoint.prototype.translate = function (dx, dy) {\n this.x += dx;\n this.y += dy;\n};\n\nPoint.prototype.equals = function (obj) {\n if (obj.constructor.name == \"Point\") {\n var pt = obj;\n return this.x == pt.x && this.y == pt.y;\n }\n return this == obj;\n};\n\nPoint.prototype.toString = function () {\n return new Point().constructor.name + \"[x=\" + this.x + \",y=\" + this.y + \"]\";\n};\n\nmodule.exports = Point;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction RectangleD(x, y, width, height) {\n this.x = 0;\n this.y = 0;\n this.width = 0;\n this.height = 0;\n\n if (x != null && y != null && width != null && height != null) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n }\n}\n\nRectangleD.prototype.getX = function () {\n return this.x;\n};\n\nRectangleD.prototype.setX = function (x) {\n this.x = x;\n};\n\nRectangleD.prototype.getY = function () {\n return this.y;\n};\n\nRectangleD.prototype.setY = function (y) {\n this.y = y;\n};\n\nRectangleD.prototype.getWidth = function () {\n return this.width;\n};\n\nRectangleD.prototype.setWidth = function (width) {\n this.width = width;\n};\n\nRectangleD.prototype.getHeight = function () {\n return this.height;\n};\n\nRectangleD.prototype.setHeight = function (height) {\n this.height = height;\n};\n\nRectangleD.prototype.getRight = function () {\n return this.x + this.width;\n};\n\nRectangleD.prototype.getBottom = function () {\n return this.y + this.height;\n};\n\nRectangleD.prototype.intersects = function (a) {\n if (this.getRight() < a.x) {\n return false;\n }\n\n if (this.getBottom() < a.y) {\n return false;\n }\n\n if (a.getRight() < this.x) {\n return false;\n }\n\n if (a.getBottom() < this.y) {\n return false;\n }\n\n return true;\n};\n\nRectangleD.prototype.getCenterX = function () {\n return this.x + this.width / 2;\n};\n\nRectangleD.prototype.getMinX = function () {\n return this.getX();\n};\n\nRectangleD.prototype.getMaxX = function () {\n return this.getX() + this.width;\n};\n\nRectangleD.prototype.getCenterY = function () {\n return this.y + this.height / 2;\n};\n\nRectangleD.prototype.getMinY = function () {\n return this.getY();\n};\n\nRectangleD.prototype.getMaxY = function () {\n return this.getY() + this.height;\n};\n\nRectangleD.prototype.getWidthHalf = function () {\n return this.width / 2;\n};\n\nRectangleD.prototype.getHeightHalf = function () {\n return this.height / 2;\n};\n\nmodule.exports = RectangleD;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nfunction UniqueIDGeneretor() {}\n\nUniqueIDGeneretor.lastID = 0;\n\nUniqueIDGeneretor.createID = function (obj) {\n if (UniqueIDGeneretor.isPrimitive(obj)) {\n return obj;\n }\n if (obj.uniqueID != null) {\n return obj.uniqueID;\n }\n obj.uniqueID = UniqueIDGeneretor.getString();\n UniqueIDGeneretor.lastID++;\n return obj.uniqueID;\n};\n\nUniqueIDGeneretor.getString = function (id) {\n if (id == null) id = UniqueIDGeneretor.lastID;\n return \"Object#\" + id + \"\";\n};\n\nUniqueIDGeneretor.isPrimitive = function (arg) {\n var type = typeof arg === \"undefined\" ? \"undefined\" : _typeof(arg);\n return arg == null || type != \"object\" && type != \"function\";\n};\n\nmodule.exports = UniqueIDGeneretor;\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar LayoutConstants = __webpack_require__(0);\nvar LGraphManager = __webpack_require__(7);\nvar LNode = __webpack_require__(3);\nvar LEdge = __webpack_require__(1);\nvar LGraph = __webpack_require__(6);\nvar PointD = __webpack_require__(5);\nvar Transform = __webpack_require__(17);\nvar Emitter = __webpack_require__(29);\n\nfunction Layout(isRemoteUse) {\n Emitter.call(this);\n\n //Layout Quality: 0:draft, 1:default, 2:proof\n this.layoutQuality = LayoutConstants.QUALITY;\n //Whether layout should create bendpoints as needed or not\n this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;\n //Whether layout should be incremental or not\n this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;\n //Whether we animate from before to after layout node positions\n this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;\n //Whether we animate the layout process or not\n this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;\n //Number iterations that should be done between two successive animations\n this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;\n /**\r\n * Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When\r\n * they are, both spring and repulsion forces between two leaf nodes can be\r\n * calculated without the expensive clipping point calculations, resulting\r\n * in major speed-up.\r\n */\n this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;\n /**\r\n * This is used for creation of bendpoints by using dummy nodes and edges.\r\n * Maps an LEdge to its dummy bendpoint path.\r\n */\n this.edgeToDummyNodes = new Map();\n this.graphManager = new LGraphManager(this);\n this.isLayoutFinished = false;\n this.isSubLayout = false;\n this.isRemoteUse = false;\n\n if (isRemoteUse != null) {\n this.isRemoteUse = isRemoteUse;\n }\n}\n\nLayout.RANDOM_SEED = 1;\n\nLayout.prototype = Object.create(Emitter.prototype);\n\nLayout.prototype.getGraphManager = function () {\n return this.graphManager;\n};\n\nLayout.prototype.getAllNodes = function () {\n return this.graphManager.getAllNodes();\n};\n\nLayout.prototype.getAllEdges = function () {\n return this.graphManager.getAllEdges();\n};\n\nLayout.prototype.getAllNodesToApplyGravitation = function () {\n return this.graphManager.getAllNodesToApplyGravitation();\n};\n\nLayout.prototype.newGraphManager = function () {\n var gm = new LGraphManager(this);\n this.graphManager = gm;\n return gm;\n};\n\nLayout.prototype.newGraph = function (vGraph) {\n return new LGraph(null, this.graphManager, vGraph);\n};\n\nLayout.prototype.newNode = function (vNode) {\n return new LNode(this.graphManager, vNode);\n};\n\nLayout.prototype.newEdge = function (vEdge) {\n return new LEdge(null, null, vEdge);\n};\n\nLayout.prototype.checkLayoutSuccess = function () {\n return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();\n};\n\nLayout.prototype.runLayout = function () {\n this.isLayoutFinished = false;\n\n if (this.tilingPreLayout) {\n this.tilingPreLayout();\n }\n\n this.initParameters();\n var isLayoutSuccessfull;\n\n if (this.checkLayoutSuccess()) {\n isLayoutSuccessfull = false;\n } else {\n isLayoutSuccessfull = this.layout();\n }\n\n if (LayoutConstants.ANIMATE === 'during') {\n // If this is a 'during' layout animation. Layout is not finished yet. \n // We need to perform these in index.js when layout is really finished.\n return false;\n }\n\n if (isLayoutSuccessfull) {\n if (!this.isSubLayout) {\n this.doPostLayout();\n }\n }\n\n if (this.tilingPostLayout) {\n this.tilingPostLayout();\n }\n\n this.isLayoutFinished = true;\n\n return isLayoutSuccessfull;\n};\n\n/**\r\n * This method performs the operations required after layout.\r\n */\nLayout.prototype.doPostLayout = function () {\n //assert !isSubLayout : \"Should not be called on sub-layout!\";\n // Propagate geometric changes to v-level objects\n if (!this.incremental) {\n this.transform();\n }\n this.update();\n};\n\n/**\r\n * This method updates the geometry of the target graph according to\r\n * calculated layout.\r\n */\nLayout.prototype.update2 = function () {\n // update bend points\n if (this.createBendsAsNeeded) {\n this.createBendpointsFromDummyNodes();\n\n // reset all edges, since the topology has changed\n this.graphManager.resetAllEdges();\n }\n\n // perform edge, node and root updates if layout is not called\n // remotely\n if (!this.isRemoteUse) {\n // update all edges\n var edge;\n var allEdges = this.graphManager.getAllEdges();\n for (var i = 0; i < allEdges.length; i++) {\n edge = allEdges[i];\n // this.update(edge);\n }\n\n // recursively update nodes\n var node;\n var nodes = this.graphManager.getRoot().getNodes();\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n // this.update(node);\n }\n\n // update root graph\n this.update(this.graphManager.getRoot());\n }\n};\n\nLayout.prototype.update = function (obj) {\n if (obj == null) {\n this.update2();\n } else if (obj instanceof LNode) {\n var node = obj;\n if (node.getChild() != null) {\n // since node is compound, recursively update child nodes\n var nodes = node.getChild().getNodes();\n for (var i = 0; i < nodes.length; i++) {\n update(nodes[i]);\n }\n }\n\n // if the l-level node is associated with a v-level graph object,\n // then it is assumed that the v-level node implements the\n // interface Updatable.\n if (node.vGraphObject != null) {\n // cast to Updatable without any type check\n var vNode = node.vGraphObject;\n\n // call the update method of the interface\n vNode.update(node);\n }\n } else if (obj instanceof LEdge) {\n var edge = obj;\n // if the l-level edge is associated with a v-level graph object,\n // then it is assumed that the v-level edge implements the\n // interface Updatable.\n\n if (edge.vGraphObject != null) {\n // cast to Updatable without any type check\n var vEdge = edge.vGraphObject;\n\n // call the update method of the interface\n vEdge.update(edge);\n }\n } else if (obj instanceof LGraph) {\n var graph = obj;\n // if the l-level graph is associated with a v-level graph object,\n // then it is assumed that the v-level object implements the\n // interface Updatable.\n\n if (graph.vGraphObject != null) {\n // cast to Updatable without any type check\n var vGraph = graph.vGraphObject;\n\n // call the update method of the interface\n vGraph.update(graph);\n }\n }\n};\n\n/**\r\n * This method is used to set all layout parameters to default values\r\n * determined at compile time.\r\n */\nLayout.prototype.initParameters = function () {\n if (!this.isSubLayout) {\n this.layoutQuality = LayoutConstants.QUALITY;\n this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;\n this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD;\n this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;\n this.incremental = LayoutConstants.DEFAULT_INCREMENTAL;\n this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;\n this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;\n }\n\n if (this.animationDuringLayout) {\n this.animationOnLayout = false;\n }\n};\n\nLayout.prototype.transform = function (newLeftTop) {\n if (newLeftTop == undefined) {\n this.transform(new PointD(0, 0));\n } else {\n // create a transformation object (from Eclipse to layout). When an\n // inverse transform is applied, we get upper-left coordinate of the\n // drawing or the root graph at given input coordinate (some margins\n // already included in calculation of left-top).\n\n var trans = new Transform();\n var leftTop = this.graphManager.getRoot().updateLeftTop();\n\n if (leftTop != null) {\n trans.setWorldOrgX(newLeftTop.x);\n trans.setWorldOrgY(newLeftTop.y);\n\n trans.setDeviceOrgX(leftTop.x);\n trans.setDeviceOrgY(leftTop.y);\n\n var nodes = this.getAllNodes();\n var node;\n\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n node.transform(trans);\n }\n }\n }\n};\n\nLayout.prototype.positionNodesRandomly = function (graph) {\n\n if (graph == undefined) {\n //assert !this.incremental;\n this.positionNodesRandomly(this.getGraphManager().getRoot());\n this.getGraphManager().getRoot().updateBounds(true);\n } else {\n var lNode;\n var childGraph;\n\n var nodes = graph.getNodes();\n for (var i = 0; i < nodes.length; i++) {\n lNode = nodes[i];\n childGraph = lNode.getChild();\n\n if (childGraph == null) {\n lNode.scatter();\n } else if (childGraph.getNodes().length == 0) {\n lNode.scatter();\n } else {\n this.positionNodesRandomly(childGraph);\n lNode.updateBounds();\n }\n }\n }\n};\n\n/**\r\n * This method returns a list of trees where each tree is represented as a\r\n * list of l-nodes. The method returns a list of size 0 when:\r\n * - The graph is not flat or\r\n * - One of the component(s) of the graph is not a tree.\r\n */\nLayout.prototype.getFlatForest = function () {\n var flatForest = [];\n var isForest = true;\n\n // Quick reference for all nodes in the graph manager associated with\n // this layout. The list should not be changed.\n var allNodes = this.graphManager.getRoot().getNodes();\n\n // First be sure that the graph is flat\n var isFlat = true;\n\n for (var i = 0; i < allNodes.length; i++) {\n if (allNodes[i].getChild() != null) {\n isFlat = false;\n }\n }\n\n // Return empty forest if the graph is not flat.\n if (!isFlat) {\n return flatForest;\n }\n\n // Run BFS for each component of the graph.\n\n var visited = new Set();\n var toBeVisited = [];\n var parents = new Map();\n var unProcessedNodes = [];\n\n unProcessedNodes = unProcessedNodes.concat(allNodes);\n\n // Each iteration of this loop finds a component of the graph and\n // decides whether it is a tree or not. If it is a tree, adds it to the\n // forest and continued with the next component.\n\n while (unProcessedNodes.length > 0 && isForest) {\n toBeVisited.push(unProcessedNodes[0]);\n\n // Start the BFS. Each iteration of this loop visits a node in a\n // BFS manner.\n while (toBeVisited.length > 0 && isForest) {\n //pool operation\n var currentNode = toBeVisited[0];\n toBeVisited.splice(0, 1);\n visited.add(currentNode);\n\n // Traverse all neighbors of this node\n var neighborEdges = currentNode.getEdges();\n\n for (var i = 0; i < neighborEdges.length; i++) {\n var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode);\n\n // If BFS is not growing from this neighbor.\n if (parents.get(currentNode) != currentNeighbor) {\n // We haven't previously visited this neighbor.\n if (!visited.has(currentNeighbor)) {\n toBeVisited.push(currentNeighbor);\n parents.set(currentNeighbor, currentNode);\n }\n // Since we have previously visited this neighbor and\n // this neighbor is not parent of currentNode, given\n // graph contains a component that is not tree, hence\n // it is not a forest.\n else {\n isForest = false;\n break;\n }\n }\n }\n }\n\n // The graph contains a component that is not a tree. Empty\n // previously found trees. The method will end.\n if (!isForest) {\n flatForest = [];\n }\n // Save currently visited nodes as a tree in our forest. Reset\n // visited and parents lists. Continue with the next component of\n // the graph, if any.\n else {\n var temp = [].concat(_toConsumableArray(visited));\n flatForest.push(temp);\n //flatForest = flatForest.concat(temp);\n //unProcessedNodes.removeAll(visited);\n for (var i = 0; i < temp.length; i++) {\n var value = temp[i];\n var index = unProcessedNodes.indexOf(value);\n if (index > -1) {\n unProcessedNodes.splice(index, 1);\n }\n }\n visited = new Set();\n parents = new Map();\n }\n }\n\n return flatForest;\n};\n\n/**\r\n * This method creates dummy nodes (an l-level node with minimal dimensions)\r\n * for the given edge (one per bendpoint). The existing l-level structure\r\n * is updated accordingly.\r\n */\nLayout.prototype.createDummyNodesForBendpoints = function (edge) {\n var dummyNodes = [];\n var prev = edge.source;\n\n var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target);\n\n for (var i = 0; i < edge.bendpoints.length; i++) {\n // create new dummy node\n var dummyNode = this.newNode(null);\n dummyNode.setRect(new Point(0, 0), new Dimension(1, 1));\n\n graph.add(dummyNode);\n\n // create new dummy edge between prev and dummy node\n var dummyEdge = this.newEdge(null);\n this.graphManager.add(dummyEdge, prev, dummyNode);\n\n dummyNodes.add(dummyNode);\n prev = dummyNode;\n }\n\n var dummyEdge = this.newEdge(null);\n this.graphManager.add(dummyEdge, prev, edge.target);\n\n this.edgeToDummyNodes.set(edge, dummyNodes);\n\n // remove real edge from graph manager if it is inter-graph\n if (edge.isInterGraph()) {\n this.graphManager.remove(edge);\n }\n // else, remove the edge from the current graph\n else {\n graph.remove(edge);\n }\n\n return dummyNodes;\n};\n\n/**\r\n * This method creates bendpoints for edges from the dummy nodes\r\n * at l-level.\r\n */\nLayout.prototype.createBendpointsFromDummyNodes = function () {\n var edges = [];\n edges = edges.concat(this.graphManager.getAllEdges());\n edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges);\n\n for (var k = 0; k < edges.length; k++) {\n var lEdge = edges[k];\n\n if (lEdge.bendpoints.length > 0) {\n var path = this.edgeToDummyNodes.get(lEdge);\n\n for (var i = 0; i < path.length; i++) {\n var dummyNode = path[i];\n var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY());\n\n // update bendpoint's location according to dummy node\n var ebp = lEdge.bendpoints.get(i);\n ebp.x = p.x;\n ebp.y = p.y;\n\n // remove the dummy node, dummy edges incident with this\n // dummy node is also removed (within the remove method)\n dummyNode.getOwner().remove(dummyNode);\n }\n\n // add the real edge to graph\n this.graphManager.add(lEdge, lEdge.source, lEdge.target);\n }\n }\n};\n\nLayout.transform = function (sliderValue, defaultValue, minDiv, maxMul) {\n if (minDiv != undefined && maxMul != undefined) {\n var value = defaultValue;\n\n if (sliderValue <= 50) {\n var minValue = defaultValue / minDiv;\n value -= (defaultValue - minValue) / 50 * (50 - sliderValue);\n } else {\n var maxValue = defaultValue * maxMul;\n value += (maxValue - defaultValue) / 50 * (sliderValue - 50);\n }\n\n return value;\n } else {\n var a, b;\n\n if (sliderValue <= 50) {\n a = 9.0 * defaultValue / 500.0;\n b = defaultValue / 10.0;\n } else {\n a = 9.0 * defaultValue / 50.0;\n b = -8 * defaultValue;\n }\n\n return a * sliderValue + b;\n }\n};\n\n/**\r\n * This method finds and returns the center of the given nodes, assuming\r\n * that the given nodes form a tree in themselves.\r\n */\nLayout.findCenterOfTree = function (nodes) {\n var list = [];\n list = list.concat(nodes);\n\n var removedNodes = [];\n var remainingDegrees = new Map();\n var foundCenter = false;\n var centerNode = null;\n\n if (list.length == 1 || list.length == 2) {\n foundCenter = true;\n centerNode = list[0];\n }\n\n for (var i = 0; i < list.length; i++) {\n var node = list[i];\n var degree = node.getNeighborsList().size;\n remainingDegrees.set(node, node.getNeighborsList().size);\n\n if (degree == 1) {\n removedNodes.push(node);\n }\n }\n\n var tempList = [];\n tempList = tempList.concat(removedNodes);\n\n while (!foundCenter) {\n var tempList2 = [];\n tempList2 = tempList2.concat(tempList);\n tempList = [];\n\n for (var i = 0; i < list.length; i++) {\n var node = list[i];\n\n var index = list.indexOf(node);\n if (index >= 0) {\n list.splice(index, 1);\n }\n\n var neighbours = node.getNeighborsList();\n\n neighbours.forEach(function (neighbour) {\n if (removedNodes.indexOf(neighbour) < 0) {\n var otherDegree = remainingDegrees.get(neighbour);\n var newDegree = otherDegree - 1;\n\n if (newDegree == 1) {\n tempList.push(neighbour);\n }\n\n remainingDegrees.set(neighbour, newDegree);\n }\n });\n }\n\n removedNodes = removedNodes.concat(tempList);\n\n if (list.length == 1 || list.length == 2) {\n foundCenter = true;\n centerNode = list[0];\n }\n }\n\n return centerNode;\n};\n\n/**\r\n * During the coarsening process, this layout may be referenced by two graph managers\r\n * this setter function grants access to change the currently being used graph manager\r\n */\nLayout.prototype.setGraphManager = function (gm) {\n this.graphManager = gm;\n};\n\nmodule.exports = Layout;\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction RandomSeed() {}\n// adapted from: https://stackoverflow.com/a/19303725\nRandomSeed.seed = 1;\nRandomSeed.x = 0;\n\nRandomSeed.nextDouble = function () {\n RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000;\n return RandomSeed.x - Math.floor(RandomSeed.x);\n};\n\nmodule.exports = RandomSeed;\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar PointD = __webpack_require__(5);\n\nfunction Transform(x, y) {\n this.lworldOrgX = 0.0;\n this.lworldOrgY = 0.0;\n this.ldeviceOrgX = 0.0;\n this.ldeviceOrgY = 0.0;\n this.lworldExtX = 1.0;\n this.lworldExtY = 1.0;\n this.ldeviceExtX = 1.0;\n this.ldeviceExtY = 1.0;\n}\n\nTransform.prototype.getWorldOrgX = function () {\n return this.lworldOrgX;\n};\n\nTransform.prototype.setWorldOrgX = function (wox) {\n this.lworldOrgX = wox;\n};\n\nTransform.prototype.getWorldOrgY = function () {\n return this.lworldOrgY;\n};\n\nTransform.prototype.setWorldOrgY = function (woy) {\n this.lworldOrgY = woy;\n};\n\nTransform.prototype.getWorldExtX = function () {\n return this.lworldExtX;\n};\n\nTransform.prototype.setWorldExtX = function (wex) {\n this.lworldExtX = wex;\n};\n\nTransform.prototype.getWorldExtY = function () {\n return this.lworldExtY;\n};\n\nTransform.prototype.setWorldExtY = function (wey) {\n this.lworldExtY = wey;\n};\n\n/* Device related */\n\nTransform.prototype.getDeviceOrgX = function () {\n return this.ldeviceOrgX;\n};\n\nTransform.prototype.setDeviceOrgX = function (dox) {\n this.ldeviceOrgX = dox;\n};\n\nTransform.prototype.getDeviceOrgY = function () {\n return this.ldeviceOrgY;\n};\n\nTransform.prototype.setDeviceOrgY = function (doy) {\n this.ldeviceOrgY = doy;\n};\n\nTransform.prototype.getDeviceExtX = function () {\n return this.ldeviceExtX;\n};\n\nTransform.prototype.setDeviceExtX = function (dex) {\n this.ldeviceExtX = dex;\n};\n\nTransform.prototype.getDeviceExtY = function () {\n return this.ldeviceExtY;\n};\n\nTransform.prototype.setDeviceExtY = function (dey) {\n this.ldeviceExtY = dey;\n};\n\nTransform.prototype.transformX = function (x) {\n var xDevice = 0.0;\n var worldExtX = this.lworldExtX;\n if (worldExtX != 0.0) {\n xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX;\n }\n\n return xDevice;\n};\n\nTransform.prototype.transformY = function (y) {\n var yDevice = 0.0;\n var worldExtY = this.lworldExtY;\n if (worldExtY != 0.0) {\n yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY;\n }\n\n return yDevice;\n};\n\nTransform.prototype.inverseTransformX = function (x) {\n var xWorld = 0.0;\n var deviceExtX = this.ldeviceExtX;\n if (deviceExtX != 0.0) {\n xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX;\n }\n\n return xWorld;\n};\n\nTransform.prototype.inverseTransformY = function (y) {\n var yWorld = 0.0;\n var deviceExtY = this.ldeviceExtY;\n if (deviceExtY != 0.0) {\n yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY;\n }\n return yWorld;\n};\n\nTransform.prototype.inverseTransformPoint = function (inPoint) {\n var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y));\n return outPoint;\n};\n\nmodule.exports = Transform;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar Layout = __webpack_require__(15);\nvar FDLayoutConstants = __webpack_require__(4);\nvar LayoutConstants = __webpack_require__(0);\nvar IGeometry = __webpack_require__(8);\nvar IMath = __webpack_require__(9);\n\nfunction FDLayout() {\n Layout.call(this);\n\n this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;\n this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;\n this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;\n this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;\n this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;\n this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100;\n this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;\n this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;\n this.totalDisplacement = 0.0;\n this.oldTotalDisplacement = 0.0;\n this.maxIterations = FDLayoutConstants.MAX_ITERATIONS;\n}\n\nFDLayout.prototype = Object.create(Layout.prototype);\n\nfor (var prop in Layout) {\n FDLayout[prop] = Layout[prop];\n}\n\nFDLayout.prototype.initParameters = function () {\n Layout.prototype.initParameters.call(this, arguments);\n\n this.totalIterations = 0;\n this.notAnimatedIterations = 0;\n\n this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION;\n\n this.grid = [];\n};\n\nFDLayout.prototype.calcIdealEdgeLengths = function () {\n var edge;\n var originalIdealLength;\n var lcaDepth;\n var source;\n var target;\n var sizeOfSourceInLca;\n var sizeOfTargetInLca;\n\n var allEdges = this.getGraphManager().getAllEdges();\n for (var i = 0; i < allEdges.length; i++) {\n edge = allEdges[i];\n\n originalIdealLength = edge.idealLength;\n\n if (edge.isInterGraph) {\n source = edge.getSource();\n target = edge.getTarget();\n\n sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize();\n sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize();\n\n if (this.useSmartIdealEdgeLengthCalculation) {\n edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE;\n }\n\n lcaDepth = edge.getLca().getInclusionTreeDepth();\n\n edge.idealLength += originalIdealLength * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth);\n }\n }\n};\n\nFDLayout.prototype.initSpringEmbedder = function () {\n\n var s = this.getAllNodes().length;\n if (this.incremental) {\n if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {\n this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));\n }\n this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL;\n } else {\n if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) {\n this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1.0 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR));\n } else {\n this.coolingFactor = 1.0;\n }\n this.initialCoolingFactor = this.coolingFactor;\n this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT;\n }\n\n this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations);\n\n // Reassign this attribute by using new constant value\n this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100;\n this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length;\n\n this.repulsionRange = this.calcRepulsionRange();\n};\n\nFDLayout.prototype.calcSpringForces = function () {\n var lEdges = this.getAllEdges();\n var edge;\n\n for (var i = 0; i < lEdges.length; i++) {\n edge = lEdges[i];\n\n this.calcSpringForce(edge, edge.idealLength);\n }\n};\n\nFDLayout.prototype.calcRepulsionForces = function () {\n var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var i, j;\n var nodeA, nodeB;\n var lNodes = this.getAllNodes();\n var processedNodeSet;\n\n if (this.useFRGridVariant) {\n if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) {\n this.updateGrid();\n }\n\n processedNodeSet = new Set();\n\n // calculate repulsion forces between each nodes and its surrounding\n for (i = 0; i < lNodes.length; i++) {\n nodeA = lNodes[i];\n this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate);\n processedNodeSet.add(nodeA);\n }\n } else {\n for (i = 0; i < lNodes.length; i++) {\n nodeA = lNodes[i];\n\n for (j = i + 1; j < lNodes.length; j++) {\n nodeB = lNodes[j];\n\n // If both nodes are not members of the same graph, skip.\n if (nodeA.getOwner() != nodeB.getOwner()) {\n continue;\n }\n\n this.calcRepulsionForce(nodeA, nodeB);\n }\n }\n }\n};\n\nFDLayout.prototype.calcGravitationalForces = function () {\n var node;\n var lNodes = this.getAllNodesToApplyGravitation();\n\n for (var i = 0; i < lNodes.length; i++) {\n node = lNodes[i];\n this.calcGravitationalForce(node);\n }\n};\n\nFDLayout.prototype.moveNodes = function () {\n var lNodes = this.getAllNodes();\n var node;\n\n for (var i = 0; i < lNodes.length; i++) {\n node = lNodes[i];\n node.move();\n }\n};\n\nFDLayout.prototype.calcSpringForce = function (edge, idealLength) {\n var sourceNode = edge.getSource();\n var targetNode = edge.getTarget();\n\n var length;\n var springForce;\n var springForceX;\n var springForceY;\n\n // Update edge length\n if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) {\n edge.updateLengthSimple();\n } else {\n edge.updateLength();\n\n if (edge.isOverlapingSourceAndTarget) {\n return;\n }\n }\n\n length = edge.getLength();\n\n if (length == 0) return;\n\n // Calculate spring forces\n springForce = edge.edgeElasticity * (length - idealLength);\n\n // Project force onto x and y axes\n springForceX = springForce * (edge.lengthX / length);\n springForceY = springForce * (edge.lengthY / length);\n\n // Apply forces on the end nodes\n sourceNode.springForceX += springForceX;\n sourceNode.springForceY += springForceY;\n targetNode.springForceX -= springForceX;\n targetNode.springForceY -= springForceY;\n};\n\nFDLayout.prototype.calcRepulsionForce = function (nodeA, nodeB) {\n var rectA = nodeA.getRect();\n var rectB = nodeB.getRect();\n var overlapAmount = new Array(2);\n var clipPoints = new Array(4);\n var distanceX;\n var distanceY;\n var distanceSquared;\n var distance;\n var repulsionForce;\n var repulsionForceX;\n var repulsionForceY;\n\n if (rectA.intersects(rectB)) // two nodes overlap\n {\n // calculate separation amount in x and y directions\n IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2.0);\n\n repulsionForceX = 2 * overlapAmount[0];\n repulsionForceY = 2 * overlapAmount[1];\n\n var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren);\n\n // Apply forces on the two nodes\n nodeA.repulsionForceX -= childrenConstant * repulsionForceX;\n nodeA.repulsionForceY -= childrenConstant * repulsionForceY;\n nodeB.repulsionForceX += childrenConstant * repulsionForceX;\n nodeB.repulsionForceY += childrenConstant * repulsionForceY;\n } else // no overlap\n {\n // calculate distance\n\n if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) // simply base repulsion on distance of node centers\n {\n distanceX = rectB.getCenterX() - rectA.getCenterX();\n distanceY = rectB.getCenterY() - rectA.getCenterY();\n } else // use clipping points\n {\n IGeometry.getIntersection(rectA, rectB, clipPoints);\n\n distanceX = clipPoints[2] - clipPoints[0];\n distanceY = clipPoints[3] - clipPoints[1];\n }\n\n // No repulsion range. FR grid variant should take care of this.\n if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) {\n distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST;\n }\n\n if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) {\n distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST;\n }\n\n distanceSquared = distanceX * distanceX + distanceY * distanceY;\n distance = Math.sqrt(distanceSquared);\n\n // Here we use half of the nodes' repulsion values for backward compatibility\n repulsionForce = (nodeA.nodeRepulsion / 2 + nodeB.nodeRepulsion / 2) * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared;\n\n // Project force onto x and y axes\n repulsionForceX = repulsionForce * distanceX / distance;\n repulsionForceY = repulsionForce * distanceY / distance;\n\n // Apply forces on the two nodes \n nodeA.repulsionForceX -= repulsionForceX;\n nodeA.repulsionForceY -= repulsionForceY;\n nodeB.repulsionForceX += repulsionForceX;\n nodeB.repulsionForceY += repulsionForceY;\n }\n};\n\nFDLayout.prototype.calcGravitationalForce = function (node) {\n var ownerGraph;\n var ownerCenterX;\n var ownerCenterY;\n var distanceX;\n var distanceY;\n var absDistanceX;\n var absDistanceY;\n var estimatedSize;\n ownerGraph = node.getOwner();\n\n ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2;\n ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2;\n distanceX = node.getCenterX() - ownerCenterX;\n distanceY = node.getCenterY() - ownerCenterY;\n absDistanceX = Math.abs(distanceX) + node.getWidth() / 2;\n absDistanceY = Math.abs(distanceY) + node.getHeight() / 2;\n\n if (node.getOwner() == this.graphManager.getRoot()) // in the root graph\n {\n estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor;\n\n if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {\n node.gravitationForceX = -this.gravityConstant * distanceX;\n node.gravitationForceY = -this.gravityConstant * distanceY;\n }\n } else // inside a compound\n {\n estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor;\n\n if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) {\n node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant;\n node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant;\n }\n }\n};\n\nFDLayout.prototype.isConverged = function () {\n var converged;\n var oscilating = false;\n\n if (this.totalIterations > this.maxIterations / 3) {\n oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2;\n }\n\n converged = this.totalDisplacement < this.totalDisplacementThreshold;\n\n this.oldTotalDisplacement = this.totalDisplacement;\n\n return converged || oscilating;\n};\n\nFDLayout.prototype.animate = function () {\n if (this.animationDuringLayout && !this.isSubLayout) {\n if (this.notAnimatedIterations == this.animationPeriod) {\n this.update();\n this.notAnimatedIterations = 0;\n } else {\n this.notAnimatedIterations++;\n }\n }\n};\n\n//This method calculates the number of children (weight) for all nodes\nFDLayout.prototype.calcNoOfChildrenForAllNodes = function () {\n var node;\n var allNodes = this.graphManager.getAllNodes();\n\n for (var i = 0; i < allNodes.length; i++) {\n node = allNodes[i];\n node.noOfChildren = node.getNoOfChildren();\n }\n};\n\n// -----------------------------------------------------------------------------\n// Section: FR-Grid Variant Repulsion Force Calculation\n// -----------------------------------------------------------------------------\n\nFDLayout.prototype.calcGrid = function (graph) {\n\n var sizeX = 0;\n var sizeY = 0;\n\n sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange));\n sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange));\n\n var grid = new Array(sizeX);\n\n for (var i = 0; i < sizeX; i++) {\n grid[i] = new Array(sizeY);\n }\n\n for (var i = 0; i < sizeX; i++) {\n for (var j = 0; j < sizeY; j++) {\n grid[i][j] = new Array();\n }\n }\n\n return grid;\n};\n\nFDLayout.prototype.addNodeToGrid = function (v, left, top) {\n\n var startX = 0;\n var finishX = 0;\n var startY = 0;\n var finishY = 0;\n\n startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange));\n finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange));\n startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange));\n finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange));\n\n for (var i = startX; i <= finishX; i++) {\n for (var j = startY; j <= finishY; j++) {\n this.grid[i][j].push(v);\n v.setGridCoordinates(startX, finishX, startY, finishY);\n }\n }\n};\n\nFDLayout.prototype.updateGrid = function () {\n var i;\n var nodeA;\n var lNodes = this.getAllNodes();\n\n this.grid = this.calcGrid(this.graphManager.getRoot());\n\n // put all nodes to proper grid cells\n for (i = 0; i < lNodes.length; i++) {\n nodeA = lNodes[i];\n this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());\n }\n};\n\nFDLayout.prototype.calculateRepulsionForceOfANode = function (nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) {\n\n if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) {\n var surrounding = new Set();\n nodeA.surrounding = new Array();\n var nodeB;\n var grid = this.grid;\n\n for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) {\n for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) {\n if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) {\n for (var k = 0; k < grid[i][j].length; k++) {\n nodeB = grid[i][j][k];\n\n // If both nodes are not members of the same graph, \n // or both nodes are the same, skip.\n if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) {\n continue;\n }\n\n // check if the repulsion force between\n // nodeA and nodeB has already been calculated\n if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) {\n var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2);\n var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2);\n\n // if the distance between nodeA and nodeB \n // is less then calculation range\n if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) {\n //then add nodeB to surrounding of nodeA\n surrounding.add(nodeB);\n }\n }\n }\n }\n }\n }\n\n nodeA.surrounding = [].concat(_toConsumableArray(surrounding));\n }\n for (i = 0; i < nodeA.surrounding.length; i++) {\n this.calcRepulsionForce(nodeA, nodeA.surrounding[i]);\n }\n};\n\nFDLayout.prototype.calcRepulsionRange = function () {\n return 0.0;\n};\n\nmodule.exports = FDLayout;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LEdge = __webpack_require__(1);\nvar FDLayoutConstants = __webpack_require__(4);\n\nfunction FDLayoutEdge(source, target, vEdge) {\n LEdge.call(this, source, target, vEdge);\n\n // Ideal length and elasticity value for this edge\n this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH;\n this.edgeElasticity = FDLayoutConstants.DEFAULT_SPRING_STRENGTH;\n}\n\nFDLayoutEdge.prototype = Object.create(LEdge.prototype);\n\nfor (var prop in LEdge) {\n FDLayoutEdge[prop] = LEdge[prop];\n}\n\nmodule.exports = FDLayoutEdge;\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar LNode = __webpack_require__(3);\nvar FDLayoutConstants = __webpack_require__(4);\n\nfunction FDLayoutNode(gm, loc, size, vNode) {\n // alternative constructor is handled inside LNode\n LNode.call(this, gm, loc, size, vNode);\n\n // Repulsion value of this node\n this.nodeRepulsion = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH;\n\n //Spring, repulsion and gravitational forces acting on this node\n this.springForceX = 0;\n this.springForceY = 0;\n this.repulsionForceX = 0;\n this.repulsionForceY = 0;\n this.gravitationForceX = 0;\n this.gravitationForceY = 0;\n //Amount by which this node is to be moved in this iteration\n this.displacementX = 0;\n this.displacementY = 0;\n\n //Start and finish grid coordinates that this node is fallen into\n this.startX = 0;\n this.finishX = 0;\n this.startY = 0;\n this.finishY = 0;\n\n //Geometric neighbors of this node\n this.surrounding = [];\n}\n\nFDLayoutNode.prototype = Object.create(LNode.prototype);\n\nfor (var prop in LNode) {\n FDLayoutNode[prop] = LNode[prop];\n}\n\nFDLayoutNode.prototype.setGridCoordinates = function (_startX, _finishX, _startY, _finishY) {\n this.startX = _startX;\n this.finishX = _finishX;\n this.startY = _startY;\n this.finishY = _finishY;\n};\n\nmodule.exports = FDLayoutNode;\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction DimensionD(width, height) {\n this.width = 0;\n this.height = 0;\n if (width !== null && height !== null) {\n this.height = height;\n this.width = width;\n }\n}\n\nDimensionD.prototype.getWidth = function () {\n return this.width;\n};\n\nDimensionD.prototype.setWidth = function (width) {\n this.width = width;\n};\n\nDimensionD.prototype.getHeight = function () {\n return this.height;\n};\n\nDimensionD.prototype.setHeight = function (height) {\n this.height = height;\n};\n\nmodule.exports = DimensionD;\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar UniqueIDGeneretor = __webpack_require__(14);\n\nfunction HashMap() {\n this.map = {};\n this.keys = [];\n}\n\nHashMap.prototype.put = function (key, value) {\n var theId = UniqueIDGeneretor.createID(key);\n if (!this.contains(theId)) {\n this.map[theId] = value;\n this.keys.push(key);\n }\n};\n\nHashMap.prototype.contains = function (key) {\n var theId = UniqueIDGeneretor.createID(key);\n return this.map[key] != null;\n};\n\nHashMap.prototype.get = function (key) {\n var theId = UniqueIDGeneretor.createID(key);\n return this.map[theId];\n};\n\nHashMap.prototype.keySet = function () {\n return this.keys;\n};\n\nmodule.exports = HashMap;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar UniqueIDGeneretor = __webpack_require__(14);\n\nfunction HashSet() {\n this.set = {};\n}\n;\n\nHashSet.prototype.add = function (obj) {\n var theId = UniqueIDGeneretor.createID(obj);\n if (!this.contains(theId)) this.set[theId] = obj;\n};\n\nHashSet.prototype.remove = function (obj) {\n delete this.set[UniqueIDGeneretor.createID(obj)];\n};\n\nHashSet.prototype.clear = function () {\n this.set = {};\n};\n\nHashSet.prototype.contains = function (obj) {\n return this.set[UniqueIDGeneretor.createID(obj)] == obj;\n};\n\nHashSet.prototype.isEmpty = function () {\n return this.size() === 0;\n};\n\nHashSet.prototype.size = function () {\n return Object.keys(this.set).length;\n};\n\n//concats this.set to the given list\nHashSet.prototype.addAllTo = function (list) {\n var keys = Object.keys(this.set);\n var length = keys.length;\n for (var i = 0; i < length; i++) {\n list.push(this.set[keys[i]]);\n }\n};\n\nHashSet.prototype.size = function () {\n return Object.keys(this.set).length;\n};\n\nHashSet.prototype.addAll = function (list) {\n var s = list.length;\n for (var i = 0; i < s; i++) {\n var v = list[i];\n this.add(v);\n }\n};\n\nmodule.exports = HashSet;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// Some matrix (1d and 2d array) operations\nfunction Matrix() {}\n\n/**\n * matrix multiplication\n * array1, array2 and result are 2d arrays\n */\nMatrix.multMat = function (array1, array2) {\n var result = [];\n\n for (var i = 0; i < array1.length; i++) {\n result[i] = [];\n for (var j = 0; j < array2[0].length; j++) {\n result[i][j] = 0;\n for (var k = 0; k < array1[0].length; k++) {\n result[i][j] += array1[i][k] * array2[k][j];\n }\n }\n }\n return result;\n};\n\n/**\n * matrix transpose\n * array and result are 2d arrays\n */\nMatrix.transpose = function (array) {\n var result = [];\n\n for (var i = 0; i < array[0].length; i++) {\n result[i] = [];\n for (var j = 0; j < array.length; j++) {\n result[i][j] = array[j][i];\n }\n }\n\n return result;\n};\n\n/**\n * multiply array with constant\n * array and result are 1d arrays\n */\nMatrix.multCons = function (array, constant) {\n var result = [];\n\n for (var i = 0; i < array.length; i++) {\n result[i] = array[i] * constant;\n }\n\n return result;\n};\n\n/**\n * substract two arrays\n * array1, array2 and result are 1d arrays\n */\nMatrix.minusOp = function (array1, array2) {\n var result = [];\n\n for (var i = 0; i < array1.length; i++) {\n result[i] = array1[i] - array2[i];\n }\n\n return result;\n};\n\n/**\n * dot product of two arrays with same size\n * array1 and array2 are 1d arrays\n */\nMatrix.dotProduct = function (array1, array2) {\n var product = 0;\n\n for (var i = 0; i < array1.length; i++) {\n product += array1[i] * array2[i];\n }\n\n return product;\n};\n\n/**\n * magnitude of an array\n * array is 1d array\n */\nMatrix.mag = function (array) {\n return Math.sqrt(this.dotProduct(array, array));\n};\n\n/**\n * normalization of an array\n * array and result are 1d array\n */\nMatrix.normalize = function (array) {\n var result = [];\n var magnitude = this.mag(array);\n\n for (var i = 0; i < array.length; i++) {\n result[i] = array[i] / magnitude;\n }\n\n return result;\n};\n\n/**\n * multiply an array with centering matrix\n * array and result are 1d array\n */\nMatrix.multGamma = function (array) {\n var result = [];\n var sum = 0;\n\n for (var i = 0; i < array.length; i++) {\n sum += array[i];\n }\n\n sum *= -1 / array.length;\n\n for (var _i = 0; _i < array.length; _i++) {\n result[_i] = sum + array[_i];\n }\n return result;\n};\n\n/**\n * a special matrix multiplication\n * result = 0.5 * C * INV * C^T * array\n * array and result are 1d, C and INV are 2d arrays\n */\nMatrix.multL = function (array, C, INV) {\n var result = [];\n var temp1 = [];\n var temp2 = [];\n\n // multiply by C^T\n for (var i = 0; i < C[0].length; i++) {\n var sum = 0;\n for (var j = 0; j < C.length; j++) {\n sum += -0.5 * C[j][i] * array[j];\n }\n temp1[i] = sum;\n }\n // multiply the result by INV\n for (var _i2 = 0; _i2 < INV.length; _i2++) {\n var _sum = 0;\n for (var _j = 0; _j < INV.length; _j++) {\n _sum += INV[_i2][_j] * temp1[_j];\n }\n temp2[_i2] = _sum;\n }\n // multiply the result by C\n for (var _i3 = 0; _i3 < C.length; _i3++) {\n var _sum2 = 0;\n for (var _j2 = 0; _j2 < C[0].length; _j2++) {\n _sum2 += C[_i3][_j2] * temp2[_j2];\n }\n result[_i3] = _sum2;\n }\n\n return result;\n};\n\nmodule.exports = Matrix;\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * A classic Quicksort algorithm with Hoare's partition\n * - Works also on LinkedList objects\n *\n * Copyright: i-Vis Research Group, Bilkent University, 2007 - present\n */\n\nvar LinkedList = __webpack_require__(11);\n\nvar Quicksort = function () {\n function Quicksort(A, compareFunction) {\n _classCallCheck(this, Quicksort);\n\n if (compareFunction !== null || compareFunction !== undefined) this.compareFunction = this._defaultCompareFunction;\n\n var length = void 0;\n if (A instanceof LinkedList) length = A.size();else length = A.length;\n\n this._quicksort(A, 0, length - 1);\n }\n\n _createClass(Quicksort, [{\n key: '_quicksort',\n value: function _quicksort(A, p, r) {\n if (p < r) {\n var q = this._partition(A, p, r);\n this._quicksort(A, p, q);\n this._quicksort(A, q + 1, r);\n }\n }\n }, {\n key: '_partition',\n value: function _partition(A, p, r) {\n var x = this._get(A, p);\n var i = p;\n var j = r;\n while (true) {\n while (this.compareFunction(x, this._get(A, j))) {\n j--;\n }while (this.compareFunction(this._get(A, i), x)) {\n i++;\n }if (i < j) {\n this._swap(A, i, j);\n i++;\n j--;\n } else return j;\n }\n }\n }, {\n key: '_get',\n value: function _get(object, index) {\n if (object instanceof LinkedList) return object.get_object_at(index);else return object[index];\n }\n }, {\n key: '_set',\n value: function _set(object, index, value) {\n if (object instanceof LinkedList) object.set_object_at(index, value);else object[index] = value;\n }\n }, {\n key: '_swap',\n value: function _swap(A, i, j) {\n var temp = this._get(A, i);\n this._set(A, i, this._get(A, j));\n this._set(A, j, temp);\n }\n }, {\n key: '_defaultCompareFunction',\n value: function _defaultCompareFunction(a, b) {\n return b > a;\n }\n }]);\n\n return Quicksort;\n}();\n\nmodule.exports = Quicksort;\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// Singular Value Decomposition implementation\nfunction SVD() {};\n\n/* Below singular value decomposition (svd) code including hypot function is adopted from https://github.com/dragonfly-ai/JamaJS\n Some changes are applied to make the code compatible with the fcose code and to make it independent from Jama.\n Input matrix is changed to a 2D array instead of Jama matrix. Matrix dimensions are taken according to 2D array instead of using Jama functions.\n An object that includes singular value components is created for return. \n The types of input parameters of the hypot function are removed. \n let is used instead of var for the variable initialization.\n*/\n/*\n Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"{}\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright {yyyy} {name of copyright owner}\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\nSVD.svd = function (A) {\n this.U = null;\n this.V = null;\n this.s = null;\n this.m = 0;\n this.n = 0;\n this.m = A.length;\n this.n = A[0].length;\n var nu = Math.min(this.m, this.n);\n this.s = function (s) {\n var a = [];\n while (s-- > 0) {\n a.push(0);\n }return a;\n }(Math.min(this.m + 1, this.n));\n this.U = function (dims) {\n var allocate = function allocate(dims) {\n if (dims.length == 0) {\n return 0;\n } else {\n var array = [];\n for (var i = 0; i < dims[0]; i++) {\n array.push(allocate(dims.slice(1)));\n }\n return array;\n }\n };\n return allocate(dims);\n }([this.m, nu]);\n this.V = function (dims) {\n var allocate = function allocate(dims) {\n if (dims.length == 0) {\n return 0;\n } else {\n var array = [];\n for (var i = 0; i < dims[0]; i++) {\n array.push(allocate(dims.slice(1)));\n }\n return array;\n }\n };\n return allocate(dims);\n }([this.n, this.n]);\n var e = function (s) {\n var a = [];\n while (s-- > 0) {\n a.push(0);\n }return a;\n }(this.n);\n var work = function (s) {\n var a = [];\n while (s-- > 0) {\n a.push(0);\n }return a;\n }(this.m);\n var wantu = true;\n var wantv = true;\n var nct = Math.min(this.m - 1, this.n);\n var nrt = Math.max(0, Math.min(this.n - 2, this.m));\n for (var k = 0; k < Math.max(nct, nrt); k++) {\n if (k < nct) {\n this.s[k] = 0;\n for (var i = k; i < this.m; i++) {\n this.s[k] = SVD.hypot(this.s[k], A[i][k]);\n }\n ;\n if (this.s[k] !== 0.0) {\n if (A[k][k] < 0.0) {\n this.s[k] = -this.s[k];\n }\n for (var _i = k; _i < this.m; _i++) {\n A[_i][k] /= this.s[k];\n }\n ;\n A[k][k] += 1.0;\n }\n this.s[k] = -this.s[k];\n }\n for (var j = k + 1; j < this.n; j++) {\n if (function (lhs, rhs) {\n return lhs && rhs;\n }(k < nct, this.s[k] !== 0.0)) {\n var t = 0;\n for (var _i2 = k; _i2 < this.m; _i2++) {\n t += A[_i2][k] * A[_i2][j];\n }\n ;\n t = -t / A[k][k];\n for (var _i3 = k; _i3 < this.m; _i3++) {\n A[_i3][j] += t * A[_i3][k];\n }\n ;\n }\n e[j] = A[k][j];\n }\n ;\n if (function (lhs, rhs) {\n return lhs && rhs;\n }(wantu, k < nct)) {\n for (var _i4 = k; _i4 < this.m; _i4++) {\n this.U[_i4][k] = A[_i4][k];\n }\n ;\n }\n if (k < nrt) {\n e[k] = 0;\n for (var _i5 = k + 1; _i5 < this.n; _i5++) {\n e[k] = SVD.hypot(e[k], e[_i5]);\n }\n ;\n if (e[k] !== 0.0) {\n if (e[k + 1] < 0.0) {\n e[k] = -e[k];\n }\n for (var _i6 = k + 1; _i6 < this.n; _i6++) {\n e[_i6] /= e[k];\n }\n ;\n e[k + 1] += 1.0;\n }\n e[k] = -e[k];\n if (function (lhs, rhs) {\n return lhs && rhs;\n }(k + 1 < this.m, e[k] !== 0.0)) {\n for (var _i7 = k + 1; _i7 < this.m; _i7++) {\n work[_i7] = 0.0;\n }\n ;\n for (var _j = k + 1; _j < this.n; _j++) {\n for (var _i8 = k + 1; _i8 < this.m; _i8++) {\n work[_i8] += e[_j] * A[_i8][_j];\n }\n ;\n }\n ;\n for (var _j2 = k + 1; _j2 < this.n; _j2++) {\n var _t = -e[_j2] / e[k + 1];\n for (var _i9 = k + 1; _i9 < this.m; _i9++) {\n A[_i9][_j2] += _t * work[_i9];\n }\n ;\n }\n ;\n }\n if (wantv) {\n for (var _i10 = k + 1; _i10 < this.n; _i10++) {\n this.V[_i10][k] = e[_i10];\n };\n }\n }\n };\n var p = Math.min(this.n, this.m + 1);\n if (nct < this.n) {\n this.s[nct] = A[nct][nct];\n }\n if (this.m < p) {\n this.s[p - 1] = 0.0;\n }\n if (nrt + 1 < p) {\n e[nrt] = A[nrt][p - 1];\n }\n e[p - 1] = 0.0;\n if (wantu) {\n for (var _j3 = nct; _j3 < nu; _j3++) {\n for (var _i11 = 0; _i11 < this.m; _i11++) {\n this.U[_i11][_j3] = 0.0;\n }\n ;\n this.U[_j3][_j3] = 1.0;\n };\n for (var _k = nct - 1; _k >= 0; _k--) {\n if (this.s[_k] !== 0.0) {\n for (var _j4 = _k + 1; _j4 < nu; _j4++) {\n var _t2 = 0;\n for (var _i12 = _k; _i12 < this.m; _i12++) {\n _t2 += this.U[_i12][_k] * this.U[_i12][_j4];\n };\n _t2 = -_t2 / this.U[_k][_k];\n for (var _i13 = _k; _i13 < this.m; _i13++) {\n this.U[_i13][_j4] += _t2 * this.U[_i13][_k];\n };\n };\n for (var _i14 = _k; _i14 < this.m; _i14++) {\n this.U[_i14][_k] = -this.U[_i14][_k];\n };\n this.U[_k][_k] = 1.0 + this.U[_k][_k];\n for (var _i15 = 0; _i15 < _k - 1; _i15++) {\n this.U[_i15][_k] = 0.0;\n };\n } else {\n for (var _i16 = 0; _i16 < this.m; _i16++) {\n this.U[_i16][_k] = 0.0;\n };\n this.U[_k][_k] = 1.0;\n }\n };\n }\n if (wantv) {\n for (var _k2 = this.n - 1; _k2 >= 0; _k2--) {\n if (function (lhs, rhs) {\n return lhs && rhs;\n }(_k2 < nrt, e[_k2] !== 0.0)) {\n for (var _j5 = _k2 + 1; _j5 < nu; _j5++) {\n var _t3 = 0;\n for (var _i17 = _k2 + 1; _i17 < this.n; _i17++) {\n _t3 += this.V[_i17][_k2] * this.V[_i17][_j5];\n };\n _t3 = -_t3 / this.V[_k2 + 1][_k2];\n for (var _i18 = _k2 + 1; _i18 < this.n; _i18++) {\n this.V[_i18][_j5] += _t3 * this.V[_i18][_k2];\n };\n };\n }\n for (var _i19 = 0; _i19 < this.n; _i19++) {\n this.V[_i19][_k2] = 0.0;\n };\n this.V[_k2][_k2] = 1.0;\n };\n }\n var pp = p - 1;\n var iter = 0;\n var eps = Math.pow(2.0, -52.0);\n var tiny = Math.pow(2.0, -966.0);\n while (p > 0) {\n var _k3 = void 0;\n var kase = void 0;\n for (_k3 = p - 2; _k3 >= -1; _k3--) {\n if (_k3 === -1) {\n break;\n }\n if (Math.abs(e[_k3]) <= tiny + eps * (Math.abs(this.s[_k3]) + Math.abs(this.s[_k3 + 1]))) {\n e[_k3] = 0.0;\n break;\n }\n };\n if (_k3 === p - 2) {\n kase = 4;\n } else {\n var ks = void 0;\n for (ks = p - 1; ks >= _k3; ks--) {\n if (ks === _k3) {\n break;\n }\n var _t4 = (ks !== p ? Math.abs(e[ks]) : 0.0) + (ks !== _k3 + 1 ? Math.abs(e[ks - 1]) : 0.0);\n if (Math.abs(this.s[ks]) <= tiny + eps * _t4) {\n this.s[ks] = 0.0;\n break;\n }\n };\n if (ks === _k3) {\n kase = 3;\n } else if (ks === p - 1) {\n kase = 1;\n } else {\n kase = 2;\n _k3 = ks;\n }\n }\n _k3++;\n switch (kase) {\n case 1:\n {\n var f = e[p - 2];\n e[p - 2] = 0.0;\n for (var _j6 = p - 2; _j6 >= _k3; _j6--) {\n var _t5 = SVD.hypot(this.s[_j6], f);\n var cs = this.s[_j6] / _t5;\n var sn = f / _t5;\n this.s[_j6] = _t5;\n if (_j6 !== _k3) {\n f = -sn * e[_j6 - 1];\n e[_j6 - 1] = cs * e[_j6 - 1];\n }\n if (wantv) {\n for (var _i20 = 0; _i20 < this.n; _i20++) {\n _t5 = cs * this.V[_i20][_j6] + sn * this.V[_i20][p - 1];\n this.V[_i20][p - 1] = -sn * this.V[_i20][_j6] + cs * this.V[_i20][p - 1];\n this.V[_i20][_j6] = _t5;\n };\n }\n };\n };\n break;\n case 2:\n {\n var _f = e[_k3 - 1];\n e[_k3 - 1] = 0.0;\n for (var _j7 = _k3; _j7 < p; _j7++) {\n var _t6 = SVD.hypot(this.s[_j7], _f);\n var _cs = this.s[_j7] / _t6;\n var _sn = _f / _t6;\n this.s[_j7] = _t6;\n _f = -_sn * e[_j7];\n e[_j7] = _cs * e[_j7];\n if (wantu) {\n for (var _i21 = 0; _i21 < this.m; _i21++) {\n _t6 = _cs * this.U[_i21][_j7] + _sn * this.U[_i21][_k3 - 1];\n this.U[_i21][_k3 - 1] = -_sn * this.U[_i21][_j7] + _cs * this.U[_i21][_k3 - 1];\n this.U[_i21][_j7] = _t6;\n };\n }\n };\n };\n break;\n case 3:\n {\n var scale = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[p - 1]), Math.abs(this.s[p - 2])), Math.abs(e[p - 2])), Math.abs(this.s[_k3])), Math.abs(e[_k3]));\n var sp = this.s[p - 1] / scale;\n var spm1 = this.s[p - 2] / scale;\n var epm1 = e[p - 2] / scale;\n var sk = this.s[_k3] / scale;\n var ek = e[_k3] / scale;\n var b = ((spm1 + sp) * (spm1 - sp) + epm1 * epm1) / 2.0;\n var c = sp * epm1 * (sp * epm1);\n var shift = 0.0;\n if (function (lhs, rhs) {\n return lhs || rhs;\n }(b !== 0.0, c !== 0.0)) {\n shift = Math.sqrt(b * b + c);\n if (b < 0.0) {\n shift = -shift;\n }\n shift = c / (b + shift);\n }\n var _f2 = (sk + sp) * (sk - sp) + shift;\n var g = sk * ek;\n for (var _j8 = _k3; _j8 < p - 1; _j8++) {\n var _t7 = SVD.hypot(_f2, g);\n var _cs2 = _f2 / _t7;\n var _sn2 = g / _t7;\n if (_j8 !== _k3) {\n e[_j8 - 1] = _t7;\n }\n _f2 = _cs2 * this.s[_j8] + _sn2 * e[_j8];\n e[_j8] = _cs2 * e[_j8] - _sn2 * this.s[_j8];\n g = _sn2 * this.s[_j8 + 1];\n this.s[_j8 + 1] = _cs2 * this.s[_j8 + 1];\n if (wantv) {\n for (var _i22 = 0; _i22 < this.n; _i22++) {\n _t7 = _cs2 * this.V[_i22][_j8] + _sn2 * this.V[_i22][_j8 + 1];\n this.V[_i22][_j8 + 1] = -_sn2 * this.V[_i22][_j8] + _cs2 * this.V[_i22][_j8 + 1];\n this.V[_i22][_j8] = _t7;\n };\n }\n _t7 = SVD.hypot(_f2, g);\n _cs2 = _f2 / _t7;\n _sn2 = g / _t7;\n this.s[_j8] = _t7;\n _f2 = _cs2 * e[_j8] + _sn2 * this.s[_j8 + 1];\n this.s[_j8 + 1] = -_sn2 * e[_j8] + _cs2 * this.s[_j8 + 1];\n g = _sn2 * e[_j8 + 1];\n e[_j8 + 1] = _cs2 * e[_j8 + 1];\n if (wantu && _j8 < this.m - 1) {\n for (var _i23 = 0; _i23 < this.m; _i23++) {\n _t7 = _cs2 * this.U[_i23][_j8] + _sn2 * this.U[_i23][_j8 + 1];\n this.U[_i23][_j8 + 1] = -_sn2 * this.U[_i23][_j8] + _cs2 * this.U[_i23][_j8 + 1];\n this.U[_i23][_j8] = _t7;\n };\n }\n };\n e[p - 2] = _f2;\n iter = iter + 1;\n };\n break;\n case 4:\n {\n if (this.s[_k3] <= 0.0) {\n this.s[_k3] = this.s[_k3] < 0.0 ? -this.s[_k3] : 0.0;\n if (wantv) {\n for (var _i24 = 0; _i24 <= pp; _i24++) {\n this.V[_i24][_k3] = -this.V[_i24][_k3];\n };\n }\n }\n while (_k3 < pp) {\n if (this.s[_k3] >= this.s[_k3 + 1]) {\n break;\n }\n var _t8 = this.s[_k3];\n this.s[_k3] = this.s[_k3 + 1];\n this.s[_k3 + 1] = _t8;\n if (wantv && _k3 < this.n - 1) {\n for (var _i25 = 0; _i25 < this.n; _i25++) {\n _t8 = this.V[_i25][_k3 + 1];\n this.V[_i25][_k3 + 1] = this.V[_i25][_k3];\n this.V[_i25][_k3] = _t8;\n };\n }\n if (wantu && _k3 < this.m - 1) {\n for (var _i26 = 0; _i26 < this.m; _i26++) {\n _t8 = this.U[_i26][_k3 + 1];\n this.U[_i26][_k3 + 1] = this.U[_i26][_k3];\n this.U[_i26][_k3] = _t8;\n };\n }\n _k3++;\n };\n iter = 0;\n p--;\n };\n break;\n }\n };\n var result = { U: this.U, V: this.V, S: this.s };\n return result;\n};\n\n// sqrt(a^2 + b^2) without under/overflow.\nSVD.hypot = function (a, b) {\n var r = void 0;\n if (Math.abs(a) > Math.abs(b)) {\n r = b / a;\n r = Math.abs(a) * Math.sqrt(1 + r * r);\n } else if (b != 0) {\n r = a / b;\n r = Math.abs(b) * Math.sqrt(1 + r * r);\n } else {\n r = 0.0;\n }\n return r;\n};\n\nmodule.exports = SVD;\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * Needleman-Wunsch algorithm is an procedure to compute the optimal global alignment of two string\n * sequences by S.B.Needleman and C.D.Wunsch (1970).\n *\n * Aside from the inputs, you can assign the scores for,\n * - Match: The two characters at the current index are same.\n * - Mismatch: The two characters at the current index are different.\n * - Insertion/Deletion(gaps): The best alignment involves one letter aligning to a gap in the other string.\n */\n\nvar NeedlemanWunsch = function () {\n function NeedlemanWunsch(sequence1, sequence2) {\n var match_score = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var mismatch_penalty = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1;\n var gap_penalty = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;\n\n _classCallCheck(this, NeedlemanWunsch);\n\n this.sequence1 = sequence1;\n this.sequence2 = sequence2;\n this.match_score = match_score;\n this.mismatch_penalty = mismatch_penalty;\n this.gap_penalty = gap_penalty;\n\n // Just the remove redundancy\n this.iMax = sequence1.length + 1;\n this.jMax = sequence2.length + 1;\n\n // Grid matrix of scores\n this.grid = new Array(this.iMax);\n for (var i = 0; i < this.iMax; i++) {\n this.grid[i] = new Array(this.jMax);\n\n for (var j = 0; j < this.jMax; j++) {\n this.grid[i][j] = 0;\n }\n }\n\n // Traceback matrix (2D array, each cell is an array of boolean values for [`Diag`, `Up`, `Left`] positions)\n this.tracebackGrid = new Array(this.iMax);\n for (var _i = 0; _i < this.iMax; _i++) {\n this.tracebackGrid[_i] = new Array(this.jMax);\n\n for (var _j = 0; _j < this.jMax; _j++) {\n this.tracebackGrid[_i][_j] = [null, null, null];\n }\n }\n\n // The aligned sequences (return multiple possibilities)\n this.alignments = [];\n\n // Final alignment score\n this.score = -1;\n\n // Calculate scores and tracebacks\n this.computeGrids();\n }\n\n _createClass(NeedlemanWunsch, [{\n key: \"getScore\",\n value: function getScore() {\n return this.score;\n }\n }, {\n key: \"getAlignments\",\n value: function getAlignments() {\n return this.alignments;\n }\n\n // Main dynamic programming procedure\n\n }, {\n key: \"computeGrids\",\n value: function computeGrids() {\n // Fill in the first row\n for (var j = 1; j < this.jMax; j++) {\n this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty;\n this.tracebackGrid[0][j] = [false, false, true];\n }\n\n // Fill in the first column\n for (var i = 1; i < this.iMax; i++) {\n this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty;\n this.tracebackGrid[i][0] = [false, true, false];\n }\n\n // Fill the rest of the grid\n for (var _i2 = 1; _i2 < this.iMax; _i2++) {\n for (var _j2 = 1; _j2 < this.jMax; _j2++) {\n // Find the max score(s) among [`Diag`, `Up`, `Left`]\n var diag = void 0;\n if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty;\n\n var up = this.grid[_i2 - 1][_j2] + this.gap_penalty;\n var left = this.grid[_i2][_j2 - 1] + this.gap_penalty;\n\n // If there exists multiple max values, capture them for multiple paths\n var maxOf = [diag, up, left];\n var indices = this.arrayAllMaxIndexes(maxOf);\n\n // Update Grids\n this.grid[_i2][_j2] = maxOf[indices[0]];\n this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)];\n }\n }\n\n // Update alignment score\n this.score = this.grid[this.iMax - 1][this.jMax - 1];\n }\n\n // Gets all possible valid sequence combinations\n\n }, {\n key: \"alignmentTraceback\",\n value: function alignmentTraceback() {\n var inProcessAlignments = [];\n\n inProcessAlignments.push({ pos: [this.sequence1.length, this.sequence2.length],\n seq1: \"\",\n seq2: \"\"\n });\n\n while (inProcessAlignments[0]) {\n var current = inProcessAlignments[0];\n var directions = this.tracebackGrid[current.pos[0]][current.pos[1]];\n\n if (directions[0]) {\n inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1] - 1],\n seq1: this.sequence1[current.pos[0] - 1] + current.seq1,\n seq2: this.sequence2[current.pos[1] - 1] + current.seq2\n });\n }\n if (directions[1]) {\n inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1]],\n seq1: this.sequence1[current.pos[0] - 1] + current.seq1,\n seq2: '-' + current.seq2\n });\n }\n if (directions[2]) {\n inProcessAlignments.push({ pos: [current.pos[0], current.pos[1] - 1],\n seq1: '-' + current.seq1,\n seq2: this.sequence2[current.pos[1] - 1] + current.seq2\n });\n }\n\n if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({ sequence1: current.seq1,\n sequence2: current.seq2\n });\n\n inProcessAlignments.shift();\n }\n\n return this.alignments;\n }\n\n // Helper Functions\n\n }, {\n key: \"getAllIndexes\",\n value: function getAllIndexes(arr, val) {\n var indexes = [],\n i = -1;\n while ((i = arr.indexOf(val, i + 1)) !== -1) {\n indexes.push(i);\n }\n return indexes;\n }\n }, {\n key: \"arrayAllMaxIndexes\",\n value: function arrayAllMaxIndexes(array) {\n return this.getAllIndexes(array, Math.max.apply(null, array));\n }\n }]);\n\n return NeedlemanWunsch;\n}();\n\nmodule.exports = NeedlemanWunsch;\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar layoutBase = function layoutBase() {\n return;\n};\n\nlayoutBase.FDLayout = __webpack_require__(18);\nlayoutBase.FDLayoutConstants = __webpack_require__(4);\nlayoutBase.FDLayoutEdge = __webpack_require__(19);\nlayoutBase.FDLayoutNode = __webpack_require__(20);\nlayoutBase.DimensionD = __webpack_require__(21);\nlayoutBase.HashMap = __webpack_require__(22);\nlayoutBase.HashSet = __webpack_require__(23);\nlayoutBase.IGeometry = __webpack_require__(8);\nlayoutBase.IMath = __webpack_require__(9);\nlayoutBase.Integer = __webpack_require__(10);\nlayoutBase.Point = __webpack_require__(12);\nlayoutBase.PointD = __webpack_require__(5);\nlayoutBase.RandomSeed = __webpack_require__(16);\nlayoutBase.RectangleD = __webpack_require__(13);\nlayoutBase.Transform = __webpack_require__(17);\nlayoutBase.UniqueIDGeneretor = __webpack_require__(14);\nlayoutBase.Quicksort = __webpack_require__(25);\nlayoutBase.LinkedList = __webpack_require__(11);\nlayoutBase.LGraphObject = __webpack_require__(2);\nlayoutBase.LGraph = __webpack_require__(6);\nlayoutBase.LEdge = __webpack_require__(1);\nlayoutBase.LGraphManager = __webpack_require__(7);\nlayoutBase.LNode = __webpack_require__(3);\nlayoutBase.Layout = __webpack_require__(15);\nlayoutBase.LayoutConstants = __webpack_require__(0);\nlayoutBase.NeedlemanWunsch = __webpack_require__(27);\nlayoutBase.Matrix = __webpack_require__(24);\nlayoutBase.SVD = __webpack_require__(26);\n\nmodule.exports = layoutBase;\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction Emitter() {\n this.listeners = [];\n}\n\nvar p = Emitter.prototype;\n\np.addListener = function (event, callback) {\n this.listeners.push({\n event: event,\n callback: callback\n });\n};\n\np.removeListener = function (event, callback) {\n for (var i = this.listeners.length; i >= 0; i--) {\n var l = this.listeners[i];\n\n if (l.event === event && l.callback === callback) {\n this.listeners.splice(i, 1);\n }\n }\n};\n\np.emit = function (event, data) {\n for (var i = 0; i < this.listeners.length; i++) {\n var l = this.listeners[i];\n\n if (event === l.event) {\n l.callback(data);\n }\n }\n};\n\nmodule.exports = Emitter;\n\n/***/ })\n/******/ ]);\n});", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"layout-base\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"layout-base\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"coseBase\"] = factory(require(\"layout-base\"));\n\telse\n\t\troot[\"coseBase\"] = factory(root[\"layoutBase\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE__551__) {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 45:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar coseBase = {};\n\ncoseBase.layoutBase = __webpack_require__(551);\ncoseBase.CoSEConstants = __webpack_require__(806);\ncoseBase.CoSEEdge = __webpack_require__(767);\ncoseBase.CoSEGraph = __webpack_require__(880);\ncoseBase.CoSEGraphManager = __webpack_require__(578);\ncoseBase.CoSELayout = __webpack_require__(765);\ncoseBase.CoSENode = __webpack_require__(991);\ncoseBase.ConstraintHandler = __webpack_require__(902);\n\nmodule.exports = coseBase;\n\n/***/ }),\n\n/***/ 806:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar FDLayoutConstants = __webpack_require__(551).FDLayoutConstants;\n\nfunction CoSEConstants() {}\n\n//CoSEConstants inherits static props in FDLayoutConstants\nfor (var prop in FDLayoutConstants) {\n CoSEConstants[prop] = FDLayoutConstants[prop];\n}\n\nCoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false;\nCoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH;\nCoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60;\nCoSEConstants.TILE = true;\nCoSEConstants.TILING_PADDING_VERTICAL = 10;\nCoSEConstants.TILING_PADDING_HORIZONTAL = 10;\nCoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;\nCoSEConstants.ENFORCE_CONSTRAINTS = true;\nCoSEConstants.APPLY_LAYOUT = true;\nCoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS = true;\nCoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true; // this should be set to false if there will be a constraint\n// This constant is for differentiating whether actual layout algorithm that uses cose-base wants to apply only incremental layout or \n// an incremental layout on top of a randomized layout. If it is only incremental layout, then this constant should be true.\nCoSEConstants.PURE_INCREMENTAL = CoSEConstants.DEFAULT_INCREMENTAL;\n\nmodule.exports = CoSEConstants;\n\n/***/ }),\n\n/***/ 767:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar FDLayoutEdge = __webpack_require__(551).FDLayoutEdge;\n\nfunction CoSEEdge(source, target, vEdge) {\n FDLayoutEdge.call(this, source, target, vEdge);\n}\n\nCoSEEdge.prototype = Object.create(FDLayoutEdge.prototype);\nfor (var prop in FDLayoutEdge) {\n CoSEEdge[prop] = FDLayoutEdge[prop];\n}\n\nmodule.exports = CoSEEdge;\n\n/***/ }),\n\n/***/ 880:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar LGraph = __webpack_require__(551).LGraph;\n\nfunction CoSEGraph(parent, graphMgr, vGraph) {\n LGraph.call(this, parent, graphMgr, vGraph);\n}\n\nCoSEGraph.prototype = Object.create(LGraph.prototype);\nfor (var prop in LGraph) {\n CoSEGraph[prop] = LGraph[prop];\n}\n\nmodule.exports = CoSEGraph;\n\n/***/ }),\n\n/***/ 578:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar LGraphManager = __webpack_require__(551).LGraphManager;\n\nfunction CoSEGraphManager(layout) {\n LGraphManager.call(this, layout);\n}\n\nCoSEGraphManager.prototype = Object.create(LGraphManager.prototype);\nfor (var prop in LGraphManager) {\n CoSEGraphManager[prop] = LGraphManager[prop];\n}\n\nmodule.exports = CoSEGraphManager;\n\n/***/ }),\n\n/***/ 765:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar FDLayout = __webpack_require__(551).FDLayout;\nvar CoSEGraphManager = __webpack_require__(578);\nvar CoSEGraph = __webpack_require__(880);\nvar CoSENode = __webpack_require__(991);\nvar CoSEEdge = __webpack_require__(767);\nvar CoSEConstants = __webpack_require__(806);\nvar ConstraintHandler = __webpack_require__(902);\nvar FDLayoutConstants = __webpack_require__(551).FDLayoutConstants;\nvar LayoutConstants = __webpack_require__(551).LayoutConstants;\nvar Point = __webpack_require__(551).Point;\nvar PointD = __webpack_require__(551).PointD;\nvar DimensionD = __webpack_require__(551).DimensionD;\nvar Layout = __webpack_require__(551).Layout;\nvar Integer = __webpack_require__(551).Integer;\nvar IGeometry = __webpack_require__(551).IGeometry;\nvar LGraph = __webpack_require__(551).LGraph;\nvar Transform = __webpack_require__(551).Transform;\nvar LinkedList = __webpack_require__(551).LinkedList;\n\nfunction CoSELayout() {\n FDLayout.call(this);\n\n this.toBeTiled = {}; // Memorize if a node is to be tiled or is tiled\n this.constraints = {}; // keep layout constraints\n}\n\nCoSELayout.prototype = Object.create(FDLayout.prototype);\n\nfor (var prop in FDLayout) {\n CoSELayout[prop] = FDLayout[prop];\n}\n\nCoSELayout.prototype.newGraphManager = function () {\n var gm = new CoSEGraphManager(this);\n this.graphManager = gm;\n return gm;\n};\n\nCoSELayout.prototype.newGraph = function (vGraph) {\n return new CoSEGraph(null, this.graphManager, vGraph);\n};\n\nCoSELayout.prototype.newNode = function (vNode) {\n return new CoSENode(this.graphManager, vNode);\n};\n\nCoSELayout.prototype.newEdge = function (vEdge) {\n return new CoSEEdge(null, null, vEdge);\n};\n\nCoSELayout.prototype.initParameters = function () {\n FDLayout.prototype.initParameters.call(this, arguments);\n if (!this.isSubLayout) {\n if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) {\n this.idealEdgeLength = 10;\n } else {\n this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH;\n }\n\n this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION;\n this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH;\n this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH;\n this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR;\n this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR;\n\n // variables for tree reduction support\n this.prunedNodesAll = [];\n this.growTreeIterations = 0;\n this.afterGrowthIterations = 0;\n this.isTreeGrowing = false;\n this.isGrowthFinished = false;\n }\n};\n\n// This method is used to set CoSE related parameters used by spring embedder.\nCoSELayout.prototype.initSpringEmbedder = function () {\n FDLayout.prototype.initSpringEmbedder.call(this);\n\n // variables for cooling\n this.coolingCycle = 0;\n this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD;\n this.finalTemperature = 0.04;\n this.coolingAdjuster = 1;\n};\n\nCoSELayout.prototype.layout = function () {\n var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;\n if (createBendsAsNeeded) {\n this.createBendpoints();\n this.graphManager.resetAllEdges();\n }\n\n this.level = 0;\n return this.classicLayout();\n};\n\nCoSELayout.prototype.classicLayout = function () {\n this.nodesWithGravity = this.calculateNodesToApplyGravitationTo();\n this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity);\n this.calcNoOfChildrenForAllNodes();\n this.graphManager.calcLowestCommonAncestors();\n this.graphManager.calcInclusionTreeDepths();\n this.graphManager.getRoot().calcEstimatedSize();\n this.calcIdealEdgeLengths();\n\n if (!this.incremental) {\n var forest = this.getFlatForest();\n\n // The graph associated with this layout is flat and a forest\n if (forest.length > 0) {\n this.positionNodesRadially(forest);\n }\n // The graph associated with this layout is not flat or a forest\n else {\n // Reduce the trees when incremental mode is not enabled and graph is not a forest \n this.reduceTrees();\n // Update nodes that gravity will be applied\n this.graphManager.resetAllNodesToApplyGravitation();\n var allNodes = new Set(this.getAllNodes());\n var intersection = this.nodesWithGravity.filter(function (x) {\n return allNodes.has(x);\n });\n this.graphManager.setAllNodesToApplyGravitation(intersection);\n\n this.positionNodesRandomly();\n }\n } else {\n if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) {\n // Reduce the trees in incremental mode if only this constant is set to true \n this.reduceTrees();\n // Update nodes that gravity will be applied\n this.graphManager.resetAllNodesToApplyGravitation();\n var allNodes = new Set(this.getAllNodes());\n var intersection = this.nodesWithGravity.filter(function (x) {\n return allNodes.has(x);\n });\n this.graphManager.setAllNodesToApplyGravitation(intersection);\n }\n }\n\n if (Object.keys(this.constraints).length > 0) {\n ConstraintHandler.handleConstraints(this);\n this.initConstraintVariables();\n }\n\n this.initSpringEmbedder();\n if (CoSEConstants.APPLY_LAYOUT) {\n this.runSpringEmbedder();\n }\n\n return true;\n};\n\nCoSELayout.prototype.tick = function () {\n this.totalIterations++;\n\n if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) {\n if (this.prunedNodesAll.length > 0) {\n this.isTreeGrowing = true;\n } else {\n return true;\n }\n }\n\n if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {\n if (this.isConverged()) {\n if (this.prunedNodesAll.length > 0) {\n this.isTreeGrowing = true;\n } else {\n return true;\n }\n }\n\n this.coolingCycle++;\n\n if (this.layoutQuality == 0) {\n // quality - \"draft\"\n this.coolingAdjuster = this.coolingCycle;\n } else if (this.layoutQuality == 1) {\n // quality - \"default\"\n this.coolingAdjuster = this.coolingCycle / 3;\n }\n\n // cooling schedule is based on http://www.btluke.com/simanf1.html -> cooling schedule 3\n this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature);\n this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));\n }\n // Operations while tree is growing again \n if (this.isTreeGrowing) {\n if (this.growTreeIterations % 10 == 0) {\n if (this.prunedNodesAll.length > 0) {\n this.graphManager.updateBounds();\n this.updateGrid();\n this.growTree(this.prunedNodesAll);\n // Update nodes that gravity will be applied\n this.graphManager.resetAllNodesToApplyGravitation();\n var allNodes = new Set(this.getAllNodes());\n var intersection = this.nodesWithGravity.filter(function (x) {\n return allNodes.has(x);\n });\n this.graphManager.setAllNodesToApplyGravitation(intersection);\n\n this.graphManager.updateBounds();\n this.updateGrid();\n if (CoSEConstants.PURE_INCREMENTAL) this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2;else this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL;\n } else {\n this.isTreeGrowing = false;\n this.isGrowthFinished = true;\n }\n }\n this.growTreeIterations++;\n }\n // Operations after growth is finished\n if (this.isGrowthFinished) {\n if (this.isConverged()) {\n return true;\n }\n if (this.afterGrowthIterations % 10 == 0) {\n this.graphManager.updateBounds();\n this.updateGrid();\n }\n if (CoSEConstants.PURE_INCREMENTAL) this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100);else this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100);\n this.afterGrowthIterations++;\n }\n\n var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished;\n var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;\n\n this.totalDisplacement = 0;\n this.graphManager.updateBounds();\n this.calcSpringForces();\n this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate);\n this.calcGravitationalForces();\n this.moveNodes();\n this.animate();\n\n return false; // Layout is not ended yet return false\n};\n\nCoSELayout.prototype.getPositionsData = function () {\n var allNodes = this.graphManager.getAllNodes();\n var pData = {};\n for (var i = 0; i < allNodes.length; i++) {\n var rect = allNodes[i].rect;\n var id = allNodes[i].id;\n pData[id] = {\n id: id,\n x: rect.getCenterX(),\n y: rect.getCenterY(),\n w: rect.width,\n h: rect.height\n };\n }\n\n return pData;\n};\n\nCoSELayout.prototype.runSpringEmbedder = function () {\n this.initialAnimationPeriod = 25;\n this.animationPeriod = this.initialAnimationPeriod;\n var layoutEnded = false;\n\n // If aminate option is 'during' signal that layout is supposed to start iterating\n if (FDLayoutConstants.ANIMATE === 'during') {\n this.emit('layoutstarted');\n } else {\n // If aminate option is 'during' tick() function will be called on index.js\n while (!layoutEnded) {\n layoutEnded = this.tick();\n }\n\n this.graphManager.updateBounds();\n }\n};\n\n// overrides moveNodes method in FDLayout\nCoSELayout.prototype.moveNodes = function () {\n var lNodes = this.getAllNodes();\n var node;\n\n // calculate displacement for each node \n for (var i = 0; i < lNodes.length; i++) {\n node = lNodes[i];\n node.calculateDisplacement();\n }\n\n if (Object.keys(this.constraints).length > 0) {\n this.updateDisplacements();\n }\n\n // move each node\n for (var i = 0; i < lNodes.length; i++) {\n node = lNodes[i];\n node.move();\n }\n};\n\n// constraint related methods: initConstraintVariables and updateDisplacements\n\n// initialize constraint related variables\nCoSELayout.prototype.initConstraintVariables = function () {\n var self = this;\n this.idToNodeMap = new Map();\n this.fixedNodeSet = new Set();\n\n var allNodes = this.graphManager.getAllNodes();\n\n // fill idToNodeMap\n for (var i = 0; i < allNodes.length; i++) {\n var node = allNodes[i];\n this.idToNodeMap.set(node.id, node);\n }\n\n // calculate fixed node weight for given compound node\n var calculateCompoundWeight = function calculateCompoundWeight(compoundNode) {\n var nodes = compoundNode.getChild().getNodes();\n var node;\n var fixedNodeWeight = 0;\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n if (node.getChild() == null) {\n if (self.fixedNodeSet.has(node.id)) {\n fixedNodeWeight += 100;\n }\n } else {\n fixedNodeWeight += calculateCompoundWeight(node);\n }\n }\n return fixedNodeWeight;\n };\n\n if (this.constraints.fixedNodeConstraint) {\n // fill fixedNodeSet\n this.constraints.fixedNodeConstraint.forEach(function (nodeData) {\n self.fixedNodeSet.add(nodeData.nodeId);\n });\n\n // assign fixed node weights to compounds if they contain fixed nodes\n var allNodes = this.graphManager.getAllNodes();\n var node;\n\n for (var i = 0; i < allNodes.length; i++) {\n node = allNodes[i];\n if (node.getChild() != null) {\n var fixedNodeWeight = calculateCompoundWeight(node);\n if (fixedNodeWeight > 0) {\n node.fixedNodeWeight = fixedNodeWeight;\n }\n }\n }\n }\n\n if (this.constraints.relativePlacementConstraint) {\n var nodeToDummyForVerticalAlignment = new Map();\n var nodeToDummyForHorizontalAlignment = new Map();\n this.dummyToNodeForVerticalAlignment = new Map();\n this.dummyToNodeForHorizontalAlignment = new Map();\n this.fixedNodesOnHorizontal = new Set();\n this.fixedNodesOnVertical = new Set();\n\n // fill maps and sets\n this.fixedNodeSet.forEach(function (nodeId) {\n self.fixedNodesOnHorizontal.add(nodeId);\n self.fixedNodesOnVertical.add(nodeId);\n });\n\n if (this.constraints.alignmentConstraint) {\n if (this.constraints.alignmentConstraint.vertical) {\n var verticalAlignment = this.constraints.alignmentConstraint.vertical;\n for (var i = 0; i < verticalAlignment.length; i++) {\n this.dummyToNodeForVerticalAlignment.set(\"dummy\" + i, []);\n verticalAlignment[i].forEach(function (nodeId) {\n nodeToDummyForVerticalAlignment.set(nodeId, \"dummy\" + i);\n self.dummyToNodeForVerticalAlignment.get(\"dummy\" + i).push(nodeId);\n if (self.fixedNodeSet.has(nodeId)) {\n self.fixedNodesOnHorizontal.add(\"dummy\" + i);\n }\n });\n }\n }\n if (this.constraints.alignmentConstraint.horizontal) {\n var horizontalAlignment = this.constraints.alignmentConstraint.horizontal;\n for (var i = 0; i < horizontalAlignment.length; i++) {\n this.dummyToNodeForHorizontalAlignment.set(\"dummy\" + i, []);\n horizontalAlignment[i].forEach(function (nodeId) {\n nodeToDummyForHorizontalAlignment.set(nodeId, \"dummy\" + i);\n self.dummyToNodeForHorizontalAlignment.get(\"dummy\" + i).push(nodeId);\n if (self.fixedNodeSet.has(nodeId)) {\n self.fixedNodesOnVertical.add(\"dummy\" + i);\n }\n });\n }\n }\n }\n\n if (CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) {\n\n this.shuffle = function (array) {\n var j, x, i;\n for (i = array.length - 1; i >= 2 * array.length / 3; i--) {\n j = Math.floor(Math.random() * (i + 1));\n x = array[i];\n array[i] = array[j];\n array[j] = x;\n }\n return array;\n };\n\n this.nodesInRelativeHorizontal = [];\n this.nodesInRelativeVertical = [];\n this.nodeToRelativeConstraintMapHorizontal = new Map();\n this.nodeToRelativeConstraintMapVertical = new Map();\n this.nodeToTempPositionMapHorizontal = new Map();\n this.nodeToTempPositionMapVertical = new Map();\n\n // fill arrays and maps\n this.constraints.relativePlacementConstraint.forEach(function (constraint) {\n if (constraint.left) {\n var nodeIdLeft = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left;\n var nodeIdRight = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right;\n\n if (!self.nodesInRelativeHorizontal.includes(nodeIdLeft)) {\n self.nodesInRelativeHorizontal.push(nodeIdLeft);\n self.nodeToRelativeConstraintMapHorizontal.set(nodeIdLeft, []);\n if (self.dummyToNodeForVerticalAlignment.has(nodeIdLeft)) {\n self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdLeft)[0]).getCenterX());\n } else {\n self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(nodeIdLeft).getCenterX());\n }\n }\n if (!self.nodesInRelativeHorizontal.includes(nodeIdRight)) {\n self.nodesInRelativeHorizontal.push(nodeIdRight);\n self.nodeToRelativeConstraintMapHorizontal.set(nodeIdRight, []);\n if (self.dummyToNodeForVerticalAlignment.has(nodeIdRight)) {\n self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdRight)[0]).getCenterX());\n } else {\n self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(nodeIdRight).getCenterX());\n }\n }\n\n self.nodeToRelativeConstraintMapHorizontal.get(nodeIdLeft).push({ right: nodeIdRight, gap: constraint.gap });\n self.nodeToRelativeConstraintMapHorizontal.get(nodeIdRight).push({ left: nodeIdLeft, gap: constraint.gap });\n } else {\n var nodeIdTop = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top;\n var nodeIdBottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom;\n\n if (!self.nodesInRelativeVertical.includes(nodeIdTop)) {\n self.nodesInRelativeVertical.push(nodeIdTop);\n self.nodeToRelativeConstraintMapVertical.set(nodeIdTop, []);\n if (self.dummyToNodeForHorizontalAlignment.has(nodeIdTop)) {\n self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdTop)[0]).getCenterY());\n } else {\n self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(nodeIdTop).getCenterY());\n }\n }\n if (!self.nodesInRelativeVertical.includes(nodeIdBottom)) {\n self.nodesInRelativeVertical.push(nodeIdBottom);\n self.nodeToRelativeConstraintMapVertical.set(nodeIdBottom, []);\n if (self.dummyToNodeForHorizontalAlignment.has(nodeIdBottom)) {\n self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdBottom)[0]).getCenterY());\n } else {\n self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(nodeIdBottom).getCenterY());\n }\n }\n self.nodeToRelativeConstraintMapVertical.get(nodeIdTop).push({ bottom: nodeIdBottom, gap: constraint.gap });\n self.nodeToRelativeConstraintMapVertical.get(nodeIdBottom).push({ top: nodeIdTop, gap: constraint.gap });\n }\n });\n } else {\n var subGraphOnHorizontal = new Map(); // subgraph from vertical RP constraints\n var subGraphOnVertical = new Map(); // subgraph from vertical RP constraints\n\n // construct subgraphs from relative placement constraints \n this.constraints.relativePlacementConstraint.forEach(function (constraint) {\n if (constraint.left) {\n var left = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left;\n var right = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right;\n if (subGraphOnHorizontal.has(left)) {\n subGraphOnHorizontal.get(left).push(right);\n } else {\n subGraphOnHorizontal.set(left, [right]);\n }\n if (subGraphOnHorizontal.has(right)) {\n subGraphOnHorizontal.get(right).push(left);\n } else {\n subGraphOnHorizontal.set(right, [left]);\n }\n } else {\n var top = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top;\n var bottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom;\n if (subGraphOnVertical.has(top)) {\n subGraphOnVertical.get(top).push(bottom);\n } else {\n subGraphOnVertical.set(top, [bottom]);\n }\n if (subGraphOnVertical.has(bottom)) {\n subGraphOnVertical.get(bottom).push(top);\n } else {\n subGraphOnVertical.set(bottom, [top]);\n }\n }\n });\n\n // function to construct components from a given graph \n // also returns an array that keeps whether each component contains fixed node\n var constructComponents = function constructComponents(graph, fixedNodes) {\n var components = [];\n var isFixed = [];\n var queue = new LinkedList();\n var visited = new Set();\n var count = 0;\n\n graph.forEach(function (value, key) {\n if (!visited.has(key)) {\n components[count] = [];\n isFixed[count] = false;\n var currentNode = key;\n queue.push(currentNode);\n visited.add(currentNode);\n components[count].push(currentNode);\n\n while (queue.length != 0) {\n currentNode = queue.shift();\n if (fixedNodes.has(currentNode)) {\n isFixed[count] = true;\n }\n var neighbors = graph.get(currentNode);\n neighbors.forEach(function (neighbor) {\n if (!visited.has(neighbor)) {\n queue.push(neighbor);\n visited.add(neighbor);\n components[count].push(neighbor);\n }\n });\n }\n count++;\n }\n });\n\n return { components: components, isFixed: isFixed };\n };\n\n var resultOnHorizontal = constructComponents(subGraphOnHorizontal, self.fixedNodesOnHorizontal);\n this.componentsOnHorizontal = resultOnHorizontal.components;\n this.fixedComponentsOnHorizontal = resultOnHorizontal.isFixed;\n var resultOnVertical = constructComponents(subGraphOnVertical, self.fixedNodesOnVertical);\n this.componentsOnVertical = resultOnVertical.components;\n this.fixedComponentsOnVertical = resultOnVertical.isFixed;\n }\n }\n};\n\n// updates node displacements based on constraints\nCoSELayout.prototype.updateDisplacements = function () {\n var self = this;\n if (this.constraints.fixedNodeConstraint) {\n this.constraints.fixedNodeConstraint.forEach(function (nodeData) {\n var fixedNode = self.idToNodeMap.get(nodeData.nodeId);\n fixedNode.displacementX = 0;\n fixedNode.displacementY = 0;\n });\n }\n\n if (this.constraints.alignmentConstraint) {\n if (this.constraints.alignmentConstraint.vertical) {\n var allVerticalAlignments = this.constraints.alignmentConstraint.vertical;\n for (var i = 0; i < allVerticalAlignments.length; i++) {\n var totalDisplacementX = 0;\n for (var j = 0; j < allVerticalAlignments[i].length; j++) {\n if (this.fixedNodeSet.has(allVerticalAlignments[i][j])) {\n totalDisplacementX = 0;\n break;\n }\n totalDisplacementX += this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX;\n }\n var averageDisplacementX = totalDisplacementX / allVerticalAlignments[i].length;\n for (var j = 0; j < allVerticalAlignments[i].length; j++) {\n this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX = averageDisplacementX;\n }\n }\n }\n if (this.constraints.alignmentConstraint.horizontal) {\n var allHorizontalAlignments = this.constraints.alignmentConstraint.horizontal;\n for (var i = 0; i < allHorizontalAlignments.length; i++) {\n var totalDisplacementY = 0;\n for (var j = 0; j < allHorizontalAlignments[i].length; j++) {\n if (this.fixedNodeSet.has(allHorizontalAlignments[i][j])) {\n totalDisplacementY = 0;\n break;\n }\n totalDisplacementY += this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY;\n }\n var averageDisplacementY = totalDisplacementY / allHorizontalAlignments[i].length;\n for (var j = 0; j < allHorizontalAlignments[i].length; j++) {\n this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY = averageDisplacementY;\n }\n }\n }\n }\n\n if (this.constraints.relativePlacementConstraint) {\n\n if (CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) {\n // shuffle array to randomize node processing order\n if (this.totalIterations % 10 == 0) {\n this.shuffle(this.nodesInRelativeHorizontal);\n this.shuffle(this.nodesInRelativeVertical);\n }\n\n this.nodesInRelativeHorizontal.forEach(function (nodeId) {\n if (!self.fixedNodesOnHorizontal.has(nodeId)) {\n var displacement = 0;\n if (self.dummyToNodeForVerticalAlignment.has(nodeId)) {\n displacement = self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeId)[0]).displacementX;\n } else {\n displacement = self.idToNodeMap.get(nodeId).displacementX;\n }\n self.nodeToRelativeConstraintMapHorizontal.get(nodeId).forEach(function (constraint) {\n if (constraint.right) {\n var diff = self.nodeToTempPositionMapHorizontal.get(constraint.right) - self.nodeToTempPositionMapHorizontal.get(nodeId) - displacement;\n if (diff < constraint.gap) {\n displacement -= constraint.gap - diff;\n }\n } else {\n var diff = self.nodeToTempPositionMapHorizontal.get(nodeId) - self.nodeToTempPositionMapHorizontal.get(constraint.left) + displacement;\n if (diff < constraint.gap) {\n displacement += constraint.gap - diff;\n }\n }\n });\n self.nodeToTempPositionMapHorizontal.set(nodeId, self.nodeToTempPositionMapHorizontal.get(nodeId) + displacement);\n if (self.dummyToNodeForVerticalAlignment.has(nodeId)) {\n self.dummyToNodeForVerticalAlignment.get(nodeId).forEach(function (nodeId) {\n self.idToNodeMap.get(nodeId).displacementX = displacement;\n });\n } else {\n self.idToNodeMap.get(nodeId).displacementX = displacement;\n }\n }\n });\n\n this.nodesInRelativeVertical.forEach(function (nodeId) {\n if (!self.fixedNodesOnHorizontal.has(nodeId)) {\n var displacement = 0;\n if (self.dummyToNodeForHorizontalAlignment.has(nodeId)) {\n displacement = self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeId)[0]).displacementY;\n } else {\n displacement = self.idToNodeMap.get(nodeId).displacementY;\n }\n self.nodeToRelativeConstraintMapVertical.get(nodeId).forEach(function (constraint) {\n if (constraint.bottom) {\n var diff = self.nodeToTempPositionMapVertical.get(constraint.bottom) - self.nodeToTempPositionMapVertical.get(nodeId) - displacement;\n if (diff < constraint.gap) {\n displacement -= constraint.gap - diff;\n }\n } else {\n var diff = self.nodeToTempPositionMapVertical.get(nodeId) - self.nodeToTempPositionMapVertical.get(constraint.top) + displacement;\n if (diff < constraint.gap) {\n displacement += constraint.gap - diff;\n }\n }\n });\n self.nodeToTempPositionMapVertical.set(nodeId, self.nodeToTempPositionMapVertical.get(nodeId) + displacement);\n if (self.dummyToNodeForHorizontalAlignment.has(nodeId)) {\n self.dummyToNodeForHorizontalAlignment.get(nodeId).forEach(function (nodeId) {\n self.idToNodeMap.get(nodeId).displacementY = displacement;\n });\n } else {\n self.idToNodeMap.get(nodeId).displacementY = displacement;\n }\n }\n });\n } else {\n for (var i = 0; i < this.componentsOnHorizontal.length; i++) {\n var component = this.componentsOnHorizontal[i];\n if (this.fixedComponentsOnHorizontal[i]) {\n for (var j = 0; j < component.length; j++) {\n if (this.dummyToNodeForVerticalAlignment.has(component[j])) {\n this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function (nodeId) {\n self.idToNodeMap.get(nodeId).displacementX = 0;\n });\n } else {\n this.idToNodeMap.get(component[j]).displacementX = 0;\n }\n }\n } else {\n var sum = 0;\n var count = 0;\n for (var j = 0; j < component.length; j++) {\n if (this.dummyToNodeForVerticalAlignment.has(component[j])) {\n var actualNodes = this.dummyToNodeForVerticalAlignment.get(component[j]);\n sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementX;\n count += actualNodes.length;\n } else {\n sum += this.idToNodeMap.get(component[j]).displacementX;\n count++;\n }\n }\n var averageDisplacement = sum / count;\n for (var j = 0; j < component.length; j++) {\n if (this.dummyToNodeForVerticalAlignment.has(component[j])) {\n this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function (nodeId) {\n self.idToNodeMap.get(nodeId).displacementX = averageDisplacement;\n });\n } else {\n this.idToNodeMap.get(component[j]).displacementX = averageDisplacement;\n }\n }\n }\n }\n\n for (var i = 0; i < this.componentsOnVertical.length; i++) {\n var component = this.componentsOnVertical[i];\n if (this.fixedComponentsOnVertical[i]) {\n for (var j = 0; j < component.length; j++) {\n if (this.dummyToNodeForHorizontalAlignment.has(component[j])) {\n this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function (nodeId) {\n self.idToNodeMap.get(nodeId).displacementY = 0;\n });\n } else {\n this.idToNodeMap.get(component[j]).displacementY = 0;\n }\n }\n } else {\n var sum = 0;\n var count = 0;\n for (var j = 0; j < component.length; j++) {\n if (this.dummyToNodeForHorizontalAlignment.has(component[j])) {\n var actualNodes = this.dummyToNodeForHorizontalAlignment.get(component[j]);\n sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementY;\n count += actualNodes.length;\n } else {\n sum += this.idToNodeMap.get(component[j]).displacementY;\n count++;\n }\n }\n var averageDisplacement = sum / count;\n for (var j = 0; j < component.length; j++) {\n if (this.dummyToNodeForHorizontalAlignment.has(component[j])) {\n this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function (nodeId) {\n self.idToNodeMap.get(nodeId).displacementY = averageDisplacement;\n });\n } else {\n this.idToNodeMap.get(component[j]).displacementY = averageDisplacement;\n }\n }\n }\n }\n }\n }\n};\n\nCoSELayout.prototype.calculateNodesToApplyGravitationTo = function () {\n var nodeList = [];\n var graph;\n\n var graphs = this.graphManager.getGraphs();\n var size = graphs.length;\n var i;\n for (i = 0; i < size; i++) {\n graph = graphs[i];\n\n graph.updateConnected();\n\n if (!graph.isConnected) {\n nodeList = nodeList.concat(graph.getNodes());\n }\n }\n\n return nodeList;\n};\n\nCoSELayout.prototype.createBendpoints = function () {\n var edges = [];\n edges = edges.concat(this.graphManager.getAllEdges());\n var visited = new Set();\n var i;\n for (i = 0; i < edges.length; i++) {\n var edge = edges[i];\n\n if (!visited.has(edge)) {\n var source = edge.getSource();\n var target = edge.getTarget();\n\n if (source == target) {\n edge.getBendpoints().push(new PointD());\n edge.getBendpoints().push(new PointD());\n this.createDummyNodesForBendpoints(edge);\n visited.add(edge);\n } else {\n var edgeList = [];\n\n edgeList = edgeList.concat(source.getEdgeListToNode(target));\n edgeList = edgeList.concat(target.getEdgeListToNode(source));\n\n if (!visited.has(edgeList[0])) {\n if (edgeList.length > 1) {\n var k;\n for (k = 0; k < edgeList.length; k++) {\n var multiEdge = edgeList[k];\n multiEdge.getBendpoints().push(new PointD());\n this.createDummyNodesForBendpoints(multiEdge);\n }\n }\n edgeList.forEach(function (edge) {\n visited.add(edge);\n });\n }\n }\n }\n\n if (visited.size == edges.length) {\n break;\n }\n }\n};\n\nCoSELayout.prototype.positionNodesRadially = function (forest) {\n // We tile the trees to a grid row by row; first tree starts at (0,0)\n var currentStartingPoint = new Point(0, 0);\n var numberOfColumns = Math.ceil(Math.sqrt(forest.length));\n var height = 0;\n var currentY = 0;\n var currentX = 0;\n var point = new PointD(0, 0);\n\n for (var i = 0; i < forest.length; i++) {\n if (i % numberOfColumns == 0) {\n // Start of a new row, make the x coordinate 0, increment the\n // y coordinate with the max height of the previous row\n currentX = 0;\n currentY = height;\n\n if (i != 0) {\n currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION;\n }\n\n height = 0;\n }\n\n var tree = forest[i];\n\n // Find the center of the tree\n var centerNode = Layout.findCenterOfTree(tree);\n\n // Set the staring point of the next tree\n currentStartingPoint.x = currentX;\n currentStartingPoint.y = currentY;\n\n // Do a radial layout starting with the center\n point = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint);\n\n if (point.y > height) {\n height = Math.floor(point.y);\n }\n\n currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION);\n }\n\n this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, LayoutConstants.WORLD_CENTER_Y - point.y / 2));\n};\n\nCoSELayout.radialLayout = function (tree, centerNode, startingPoint) {\n var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION);\n CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep);\n var bounds = LGraph.calculateBounds(tree);\n\n var transform = new Transform();\n transform.setDeviceOrgX(bounds.getMinX());\n transform.setDeviceOrgY(bounds.getMinY());\n transform.setWorldOrgX(startingPoint.x);\n transform.setWorldOrgY(startingPoint.y);\n\n for (var i = 0; i < tree.length; i++) {\n var node = tree[i];\n node.transform(transform);\n }\n\n var bottomRight = new PointD(bounds.getMaxX(), bounds.getMaxY());\n\n return transform.inverseTransformPoint(bottomRight);\n};\n\nCoSELayout.branchRadialLayout = function (node, parentOfNode, startAngle, endAngle, distance, radialSeparation) {\n // First, position this node by finding its angle.\n var halfInterval = (endAngle - startAngle + 1) / 2;\n\n if (halfInterval < 0) {\n halfInterval += 180;\n }\n\n var nodeAngle = (halfInterval + startAngle) % 360;\n var teta = nodeAngle * IGeometry.TWO_PI / 360;\n\n // Make polar to java cordinate conversion.\n var cos_teta = Math.cos(teta);\n var x_ = distance * Math.cos(teta);\n var y_ = distance * Math.sin(teta);\n\n node.setCenter(x_, y_);\n\n // Traverse all neighbors of this node and recursively call this\n // function.\n var neighborEdges = [];\n neighborEdges = neighborEdges.concat(node.getEdges());\n var childCount = neighborEdges.length;\n\n if (parentOfNode != null) {\n childCount--;\n }\n\n var branchCount = 0;\n\n var incEdgesCount = neighborEdges.length;\n var startIndex;\n\n var edges = node.getEdgesBetween(parentOfNode);\n\n // If there are multiple edges, prune them until there remains only one\n // edge.\n while (edges.length > 1) {\n //neighborEdges.remove(edges.remove(0));\n var temp = edges[0];\n edges.splice(0, 1);\n var index = neighborEdges.indexOf(temp);\n if (index >= 0) {\n neighborEdges.splice(index, 1);\n }\n incEdgesCount--;\n childCount--;\n }\n\n if (parentOfNode != null) {\n //assert edges.length == 1;\n startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount;\n } else {\n startIndex = 0;\n }\n\n var stepAngle = Math.abs(endAngle - startAngle) / childCount;\n\n for (var i = startIndex; branchCount != childCount; i = ++i % incEdgesCount) {\n var currentNeighbor = neighborEdges[i].getOtherEnd(node);\n\n // Don't back traverse to root node in current tree.\n if (currentNeighbor == parentOfNode) {\n continue;\n }\n\n var childStartAngle = (startAngle + branchCount * stepAngle) % 360;\n var childEndAngle = (childStartAngle + stepAngle) % 360;\n\n CoSELayout.branchRadialLayout(currentNeighbor, node, childStartAngle, childEndAngle, distance + radialSeparation, radialSeparation);\n\n branchCount++;\n }\n};\n\nCoSELayout.maxDiagonalInTree = function (tree) {\n var maxDiagonal = Integer.MIN_VALUE;\n\n for (var i = 0; i < tree.length; i++) {\n var node = tree[i];\n var diagonal = node.getDiagonal();\n\n if (diagonal > maxDiagonal) {\n maxDiagonal = diagonal;\n }\n }\n\n return maxDiagonal;\n};\n\nCoSELayout.prototype.calcRepulsionRange = function () {\n // formula is 2 x (level + 1) x idealEdgeLength\n return 2 * (this.level + 1) * this.idealEdgeLength;\n};\n\n// Tiling methods\n\n// Group zero degree members whose parents are not to be tiled, create dummy parents where needed and fill memberGroups by their dummp parent id's\nCoSELayout.prototype.groupZeroDegreeMembers = function () {\n var self = this;\n // array of [parent_id x oneDegreeNode_id]\n var tempMemberGroups = {}; // A temporary map of parent node and its zero degree members\n this.memberGroups = {}; // A map of dummy parent node and its zero degree members whose parents are not to be tiled\n this.idToDummyNode = {}; // A map of id to dummy node \n\n var zeroDegree = []; // List of zero degree nodes whose parents are not to be tiled\n var allNodes = this.graphManager.getAllNodes();\n\n // Fill zero degree list\n for (var i = 0; i < allNodes.length; i++) {\n var node = allNodes[i];\n var parent = node.getParent();\n // If a node has zero degree and its parent is not to be tiled if exists add that node to zeroDegres list\n if (this.getNodeDegreeWithChildren(node) === 0 && (parent.id == undefined || !this.getToBeTiled(parent))) {\n zeroDegree.push(node);\n }\n }\n\n // Create a map of parent node and its zero degree members\n for (var i = 0; i < zeroDegree.length; i++) {\n var node = zeroDegree[i]; // Zero degree node itself\n var p_id = node.getParent().id; // Parent id\n\n if (typeof tempMemberGroups[p_id] === \"undefined\") tempMemberGroups[p_id] = [];\n\n tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); // Push node to the list belongs to its parent in tempMemberGroups\n }\n\n // If there are at least two nodes at a level, create a dummy compound for them\n Object.keys(tempMemberGroups).forEach(function (p_id) {\n if (tempMemberGroups[p_id].length > 1) {\n var dummyCompoundId = \"DummyCompound_\" + p_id; // The id of dummy compound which will be created soon\n self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id]; // Add dummy compound to memberGroups\n\n var parent = tempMemberGroups[p_id][0].getParent(); // The parent of zero degree nodes will be the parent of new dummy compound\n\n // Create a dummy compound with calculated id\n var dummyCompound = new CoSENode(self.graphManager);\n dummyCompound.id = dummyCompoundId;\n dummyCompound.paddingLeft = parent.paddingLeft || 0;\n dummyCompound.paddingRight = parent.paddingRight || 0;\n dummyCompound.paddingBottom = parent.paddingBottom || 0;\n dummyCompound.paddingTop = parent.paddingTop || 0;\n\n self.idToDummyNode[dummyCompoundId] = dummyCompound;\n\n var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound);\n var parentGraph = parent.getChild();\n\n // Add dummy compound to parent the graph\n parentGraph.add(dummyCompound);\n\n // For each zero degree node in this level remove it from its parent graph and add it to the graph of dummy parent\n for (var i = 0; i < tempMemberGroups[p_id].length; i++) {\n var node = tempMemberGroups[p_id][i];\n\n parentGraph.remove(node);\n dummyParentGraph.add(node);\n }\n }\n });\n};\n\nCoSELayout.prototype.clearCompounds = function () {\n var childGraphMap = {};\n var idToNode = {};\n\n // Get compound ordering by finding the inner one first\n this.performDFSOnCompounds();\n\n for (var i = 0; i < this.compoundOrder.length; i++) {\n\n idToNode[this.compoundOrder[i].id] = this.compoundOrder[i];\n childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes());\n\n // Remove children of compounds\n this.graphManager.remove(this.compoundOrder[i].getChild());\n this.compoundOrder[i].child = null;\n }\n\n this.graphManager.resetAllNodes();\n\n // Tile the removed children\n this.tileCompoundMembers(childGraphMap, idToNode);\n};\n\nCoSELayout.prototype.clearZeroDegreeMembers = function () {\n var self = this;\n var tiledZeroDegreePack = this.tiledZeroDegreePack = [];\n\n Object.keys(this.memberGroups).forEach(function (id) {\n var compoundNode = self.idToDummyNode[id]; // Get the dummy compound\n\n tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight);\n\n // Set the width and height of the dummy compound as calculated\n compoundNode.rect.width = tiledZeroDegreePack[id].width;\n compoundNode.rect.height = tiledZeroDegreePack[id].height;\n compoundNode.setCenter(tiledZeroDegreePack[id].centerX, tiledZeroDegreePack[id].centerY);\n\n // compound left and top margings for labels\n // when node labels are included, these values may be set to different values below and are used in tilingPostLayout,\n // otherwise they stay as zero\n compoundNode.labelMarginLeft = 0;\n compoundNode.labelMarginTop = 0;\n\n // Update compound bounds considering its label properties and set label margins for left and top\n if (CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {\n\n var width = compoundNode.rect.width;\n var height = compoundNode.rect.height;\n\n if (compoundNode.labelWidth) {\n if (compoundNode.labelPosHorizontal == \"left\") {\n compoundNode.rect.x -= compoundNode.labelWidth;\n compoundNode.setWidth(width + compoundNode.labelWidth);\n compoundNode.labelMarginLeft = compoundNode.labelWidth;\n } else if (compoundNode.labelPosHorizontal == \"center\" && compoundNode.labelWidth > width) {\n compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2;\n compoundNode.setWidth(compoundNode.labelWidth);\n compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2;\n } else if (compoundNode.labelPosHorizontal == \"right\") {\n compoundNode.setWidth(width + compoundNode.labelWidth);\n }\n }\n\n if (compoundNode.labelHeight) {\n if (compoundNode.labelPosVertical == \"top\") {\n compoundNode.rect.y -= compoundNode.labelHeight;\n compoundNode.setHeight(height + compoundNode.labelHeight);\n compoundNode.labelMarginTop = compoundNode.labelHeight;\n } else if (compoundNode.labelPosVertical == \"center\" && compoundNode.labelHeight > height) {\n compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2;\n compoundNode.setHeight(compoundNode.labelHeight);\n compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2;\n } else if (compoundNode.labelPosVertical == \"bottom\") {\n compoundNode.setHeight(height + compoundNode.labelHeight);\n }\n }\n }\n });\n};\n\nCoSELayout.prototype.repopulateCompounds = function () {\n for (var i = this.compoundOrder.length - 1; i >= 0; i--) {\n var lCompoundNode = this.compoundOrder[i];\n var id = lCompoundNode.id;\n var horizontalMargin = lCompoundNode.paddingLeft;\n var verticalMargin = lCompoundNode.paddingTop;\n var labelMarginLeft = lCompoundNode.labelMarginLeft;\n var labelMarginTop = lCompoundNode.labelMarginTop;\n\n this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop);\n }\n};\n\nCoSELayout.prototype.repopulateZeroDegreeMembers = function () {\n var self = this;\n var tiledPack = this.tiledZeroDegreePack;\n\n Object.keys(tiledPack).forEach(function (id) {\n var compoundNode = self.idToDummyNode[id]; // Get the dummy compound by its id\n var horizontalMargin = compoundNode.paddingLeft;\n var verticalMargin = compoundNode.paddingTop;\n var labelMarginLeft = compoundNode.labelMarginLeft;\n var labelMarginTop = compoundNode.labelMarginTop;\n\n // Adjust the positions of nodes wrt its compound\n self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop);\n });\n};\n\nCoSELayout.prototype.getToBeTiled = function (node) {\n var id = node.id;\n //firstly check the previous results\n if (this.toBeTiled[id] != null) {\n return this.toBeTiled[id];\n }\n\n //only compound nodes are to be tiled\n var childGraph = node.getChild();\n if (childGraph == null) {\n this.toBeTiled[id] = false;\n return false;\n }\n\n var children = childGraph.getNodes(); // Get the children nodes\n\n //a compound node is not to be tiled if all of its compound children are not to be tiled\n for (var i = 0; i < children.length; i++) {\n var theChild = children[i];\n\n if (this.getNodeDegree(theChild) > 0) {\n this.toBeTiled[id] = false;\n return false;\n }\n\n //pass the children not having the compound structure\n if (theChild.getChild() == null) {\n this.toBeTiled[theChild.id] = false;\n continue;\n }\n\n if (!this.getToBeTiled(theChild)) {\n this.toBeTiled[id] = false;\n return false;\n }\n }\n this.toBeTiled[id] = true;\n return true;\n};\n\n// Get degree of a node depending of its edges and independent of its children\nCoSELayout.prototype.getNodeDegree = function (node) {\n var id = node.id;\n var edges = node.getEdges();\n var degree = 0;\n\n // For the edges connected\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n if (edge.getSource().id !== edge.getTarget().id) {\n degree = degree + 1;\n }\n }\n return degree;\n};\n\n// Get degree of a node with its children\nCoSELayout.prototype.getNodeDegreeWithChildren = function (node) {\n var degree = this.getNodeDegree(node);\n if (node.getChild() == null) {\n return degree;\n }\n var children = node.getChild().getNodes();\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n degree += this.getNodeDegreeWithChildren(child);\n }\n return degree;\n};\n\nCoSELayout.prototype.performDFSOnCompounds = function () {\n this.compoundOrder = [];\n this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());\n};\n\nCoSELayout.prototype.fillCompexOrderByDFS = function (children) {\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child.getChild() != null) {\n this.fillCompexOrderByDFS(child.getChild().getNodes());\n }\n if (this.getToBeTiled(child)) {\n this.compoundOrder.push(child);\n }\n }\n};\n\n/**\n* This method places each zero degree member wrt given (x,y) coordinates (top left).\n*/\nCoSELayout.prototype.adjustLocations = function (organization, x, y, compoundHorizontalMargin, compoundVerticalMargin, compoundLabelMarginLeft, compoundLabelMarginTop) {\n x += compoundHorizontalMargin + compoundLabelMarginLeft;\n y += compoundVerticalMargin + compoundLabelMarginTop;\n\n var left = x;\n\n for (var i = 0; i < organization.rows.length; i++) {\n var row = organization.rows[i];\n x = left;\n var maxHeight = 0;\n\n for (var j = 0; j < row.length; j++) {\n var lnode = row[j];\n\n lnode.rect.x = x; // + lnode.rect.width / 2;\n lnode.rect.y = y; // + lnode.rect.height / 2;\n\n x += lnode.rect.width + organization.horizontalPadding;\n\n if (lnode.rect.height > maxHeight) maxHeight = lnode.rect.height;\n }\n\n y += maxHeight + organization.verticalPadding;\n }\n};\n\nCoSELayout.prototype.tileCompoundMembers = function (childGraphMap, idToNode) {\n var self = this;\n this.tiledMemberPack = [];\n\n Object.keys(childGraphMap).forEach(function (id) {\n // Get the compound node\n var compoundNode = idToNode[id];\n\n self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight);\n\n compoundNode.rect.width = self.tiledMemberPack[id].width;\n compoundNode.rect.height = self.tiledMemberPack[id].height;\n compoundNode.setCenter(self.tiledMemberPack[id].centerX, self.tiledMemberPack[id].centerY);\n\n // compound left and top margings for labels\n // when node labels are included, these values may be set to different values below and are used in tilingPostLayout,\n // otherwise they stay as zero\n compoundNode.labelMarginLeft = 0;\n compoundNode.labelMarginTop = 0;\n\n // Update compound bounds considering its label properties and set label margins for left and top\n if (CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS) {\n\n var width = compoundNode.rect.width;\n var height = compoundNode.rect.height;\n\n if (compoundNode.labelWidth) {\n if (compoundNode.labelPosHorizontal == \"left\") {\n compoundNode.rect.x -= compoundNode.labelWidth;\n compoundNode.setWidth(width + compoundNode.labelWidth);\n compoundNode.labelMarginLeft = compoundNode.labelWidth;\n } else if (compoundNode.labelPosHorizontal == \"center\" && compoundNode.labelWidth > width) {\n compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2;\n compoundNode.setWidth(compoundNode.labelWidth);\n compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2;\n } else if (compoundNode.labelPosHorizontal == \"right\") {\n compoundNode.setWidth(width + compoundNode.labelWidth);\n }\n }\n\n if (compoundNode.labelHeight) {\n if (compoundNode.labelPosVertical == \"top\") {\n compoundNode.rect.y -= compoundNode.labelHeight;\n compoundNode.setHeight(height + compoundNode.labelHeight);\n compoundNode.labelMarginTop = compoundNode.labelHeight;\n } else if (compoundNode.labelPosVertical == \"center\" && compoundNode.labelHeight > height) {\n compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2;\n compoundNode.setHeight(compoundNode.labelHeight);\n compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2;\n } else if (compoundNode.labelPosVertical == \"bottom\") {\n compoundNode.setHeight(height + compoundNode.labelHeight);\n }\n }\n }\n });\n};\n\nCoSELayout.prototype.tileNodes = function (nodes, minWidth) {\n var horizontalOrg = this.tileNodesByFavoringDim(nodes, minWidth, true);\n var verticalOrg = this.tileNodesByFavoringDim(nodes, minWidth, false);\n\n var horizontalRatio = this.getOrgRatio(horizontalOrg);\n var verticalRatio = this.getOrgRatio(verticalOrg);\n var bestOrg;\n\n // the best ratio is the one that is closer to 1 since the ratios are already normalized\n // and the best organization is the one that has the best ratio\n if (verticalRatio < horizontalRatio) {\n bestOrg = verticalOrg;\n } else {\n bestOrg = horizontalOrg;\n }\n\n return bestOrg;\n};\n\n// get the width/height ratio of the organization that is normalized so that it will not be less than 1\nCoSELayout.prototype.getOrgRatio = function (organization) {\n // get dimensions and calculate the initial ratio\n var width = organization.width;\n var height = organization.height;\n var ratio = width / height;\n\n // if the initial ratio is less then 1 then inverse it\n if (ratio < 1) {\n ratio = 1 / ratio;\n }\n\n // return the normalized ratio\n return ratio;\n};\n\n/*\n * Calculates the ideal width for the rows. This method assumes that\n * each node has the same sizes and calculates the ideal row width that\n * approximates a square shaped complex accordingly. However, since nodes would\n * have different sizes some rows would have different sizes and the resulting\n * shape would not be an exact square.\n */\nCoSELayout.prototype.calcIdealRowWidth = function (members, favorHorizontalDim) {\n // To approximate a square shaped complex we need to make complex width equal to complex height.\n // To achieve this we need to solve the following equation system for hc:\n // (x + bx) * hc - bx = (y + by) * vc - by, hc * vc = n\n // where x is the avarage width of the nodes, y is the avarage height of nodes\n // bx and by are the buffer sizes in horizontal and vertical dimensions accordingly,\n // hc and vc are the number of rows in horizontal and vertical dimensions\n // n is number of members.\n\n var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL;\n var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL;\n\n // number of members\n var membersSize = members.length;\n\n // sum of the width of all members\n var totalWidth = 0;\n\n // sum of the height of all members\n var totalHeight = 0;\n\n var maxWidth = 0;\n\n // traverse all members to calculate total width and total height and get the maximum members width\n members.forEach(function (node) {\n totalWidth += node.getWidth();\n totalHeight += node.getHeight();\n\n if (node.getWidth() > maxWidth) {\n maxWidth = node.getWidth();\n }\n });\n\n // average width of the members\n var averageWidth = totalWidth / membersSize;\n\n // average height of the members\n var averageHeight = totalHeight / membersSize;\n\n // solving the initial equation system for the hc yields the following second degree equation:\n // hc^2 * (x+bx) + hc * (by - bx) - n * (y + by) = 0\n\n // the delta value to solve the equation above for hc\n var delta = Math.pow(verticalPadding - horizontalPadding, 2) + 4 * (averageWidth + horizontalPadding) * (averageHeight + verticalPadding) * membersSize;\n\n // solve the equation using delta value to calculate the horizontal count\n // that represents the number of nodes in an ideal row\n var horizontalCountDouble = (horizontalPadding - verticalPadding + Math.sqrt(delta)) / (2 * (averageWidth + horizontalPadding));\n // round the calculated horizontal count up or down according to the favored dimension\n var horizontalCount;\n\n if (favorHorizontalDim) {\n horizontalCount = Math.ceil(horizontalCountDouble);\n // if horizontalCount count is not a float value then both of rounding to floor and ceil\n // will yield the same values. Instead of repeating the same calculation try going up\n // while favoring horizontal dimension in such cases\n if (horizontalCount == horizontalCountDouble) {\n horizontalCount++;\n }\n } else {\n horizontalCount = Math.floor(horizontalCountDouble);\n }\n\n // ideal width to be calculated\n var idealWidth = horizontalCount * (averageWidth + horizontalPadding) - horizontalPadding;\n\n // if max width is bigger than calculated ideal width reset ideal width to it\n if (maxWidth > idealWidth) {\n idealWidth = maxWidth;\n }\n\n // add the left-right margins to the ideal row width\n idealWidth += horizontalPadding * 2;\n\n // return the ideal row width1\n return idealWidth;\n};\n\nCoSELayout.prototype.tileNodesByFavoringDim = function (nodes, minWidth, favorHorizontalDim) {\n var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL;\n var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL;\n var tilingCompareBy = CoSEConstants.TILING_COMPARE_BY;\n var organization = {\n rows: [],\n rowWidth: [],\n rowHeight: [],\n width: 0,\n height: minWidth, // assume minHeight equals to minWidth\n verticalPadding: verticalPadding,\n horizontalPadding: horizontalPadding,\n centerX: 0,\n centerY: 0\n };\n\n if (tilingCompareBy) {\n organization.idealRowWidth = this.calcIdealRowWidth(nodes, favorHorizontalDim);\n }\n\n var getNodeArea = function getNodeArea(n) {\n return n.rect.width * n.rect.height;\n };\n\n var areaCompareFcn = function areaCompareFcn(n1, n2) {\n return getNodeArea(n2) - getNodeArea(n1);\n };\n\n // Sort the nodes in descending order of their areas\n nodes.sort(function (n1, n2) {\n var cmpBy = areaCompareFcn;\n if (organization.idealRowWidth) {\n cmpBy = tilingCompareBy;\n return cmpBy(n1.id, n2.id);\n }\n return cmpBy(n1, n2);\n });\n\n // Create the organization -> calculate compound center\n var sumCenterX = 0;\n var sumCenterY = 0;\n for (var i = 0; i < nodes.length; i++) {\n var lNode = nodes[i];\n\n sumCenterX += lNode.getCenterX();\n sumCenterY += lNode.getCenterY();\n }\n\n organization.centerX = sumCenterX / nodes.length;\n organization.centerY = sumCenterY / nodes.length;\n\n // Create the organization -> tile members\n for (var i = 0; i < nodes.length; i++) {\n var lNode = nodes[i];\n\n if (organization.rows.length == 0) {\n this.insertNodeToRow(organization, lNode, 0, minWidth);\n } else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) {\n var rowIndex = organization.rows.length - 1;\n if (!organization.idealRowWidth) {\n rowIndex = this.getShortestRowIndex(organization);\n }\n this.insertNodeToRow(organization, lNode, rowIndex, minWidth);\n } else {\n this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth);\n }\n\n this.shiftToLastRow(organization);\n }\n\n return organization;\n};\n\nCoSELayout.prototype.insertNodeToRow = function (organization, node, rowIndex, minWidth) {\n var minCompoundSize = minWidth;\n\n // Add new row if needed\n if (rowIndex == organization.rows.length) {\n var secondDimension = [];\n\n organization.rows.push(secondDimension);\n organization.rowWidth.push(minCompoundSize);\n organization.rowHeight.push(0);\n }\n\n // Update row width\n var w = organization.rowWidth[rowIndex] + node.rect.width;\n\n if (organization.rows[rowIndex].length > 0) {\n w += organization.horizontalPadding;\n }\n\n organization.rowWidth[rowIndex] = w;\n // Update compound width\n if (organization.width < w) {\n organization.width = w;\n }\n\n // Update height\n var h = node.rect.height;\n if (rowIndex > 0) h += organization.verticalPadding;\n\n var extraHeight = 0;\n if (h > organization.rowHeight[rowIndex]) {\n extraHeight = organization.rowHeight[rowIndex];\n organization.rowHeight[rowIndex] = h;\n extraHeight = organization.rowHeight[rowIndex] - extraHeight;\n }\n\n organization.height += extraHeight;\n\n // Insert node\n organization.rows[rowIndex].push(node);\n};\n\n//Scans the rows of an organization and returns the one with the min width\nCoSELayout.prototype.getShortestRowIndex = function (organization) {\n var r = -1;\n var min = Number.MAX_VALUE;\n\n for (var i = 0; i < organization.rows.length; i++) {\n if (organization.rowWidth[i] < min) {\n r = i;\n min = organization.rowWidth[i];\n }\n }\n return r;\n};\n\n//Scans the rows of an organization and returns the one with the max width\nCoSELayout.prototype.getLongestRowIndex = function (organization) {\n var r = -1;\n var max = Number.MIN_VALUE;\n\n for (var i = 0; i < organization.rows.length; i++) {\n\n if (organization.rowWidth[i] > max) {\n r = i;\n max = organization.rowWidth[i];\n }\n }\n\n return r;\n};\n\n/**\n* This method checks whether adding extra width to the organization violates\n* the aspect ratio(1) or not.\n*/\nCoSELayout.prototype.canAddHorizontal = function (organization, extraWidth, extraHeight) {\n\n // if there is an ideal row width specified use it instead of checking the aspect ratio\n if (organization.idealRowWidth) {\n var lastRowIndex = organization.rows.length - 1;\n var lastRowWidth = organization.rowWidth[lastRowIndex];\n\n // check and return if ideal row width will be exceed if the node is added to the row\n return lastRowWidth + extraWidth + organization.horizontalPadding <= organization.idealRowWidth;\n }\n\n var sri = this.getShortestRowIndex(organization);\n\n if (sri < 0) {\n return true;\n }\n\n var min = organization.rowWidth[sri];\n\n if (min + organization.horizontalPadding + extraWidth <= organization.width) return true;\n\n var hDiff = 0;\n\n // Adding to an existing row\n if (organization.rowHeight[sri] < extraHeight) {\n if (sri > 0) hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri];\n }\n\n var add_to_row_ratio;\n if (organization.width - min >= extraWidth + organization.horizontalPadding) {\n add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding);\n } else {\n add_to_row_ratio = (organization.height + hDiff) / organization.width;\n }\n\n // Adding a new row for this node\n hDiff = extraHeight + organization.verticalPadding;\n var add_new_row_ratio;\n if (organization.width < extraWidth) {\n add_new_row_ratio = (organization.height + hDiff) / extraWidth;\n } else {\n add_new_row_ratio = (organization.height + hDiff) / organization.width;\n }\n\n if (add_new_row_ratio < 1) add_new_row_ratio = 1 / add_new_row_ratio;\n\n if (add_to_row_ratio < 1) add_to_row_ratio = 1 / add_to_row_ratio;\n\n return add_to_row_ratio < add_new_row_ratio;\n};\n\n//If moving the last node from the longest row and adding it to the last\n//row makes the bounding box smaller, do it.\nCoSELayout.prototype.shiftToLastRow = function (organization) {\n var longest = this.getLongestRowIndex(organization);\n var last = organization.rowWidth.length - 1;\n var row = organization.rows[longest];\n var node = row[row.length - 1];\n\n var diff = node.width + organization.horizontalPadding;\n\n // Check if there is enough space on the last row\n if (organization.width - organization.rowWidth[last] > diff && longest != last) {\n // Remove the last element of the longest row\n row.splice(-1, 1);\n\n // Push it to the last row\n organization.rows[last].push(node);\n\n organization.rowWidth[longest] = organization.rowWidth[longest] - diff;\n organization.rowWidth[last] = organization.rowWidth[last] + diff;\n organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)];\n\n // Update heights of the organization\n var maxHeight = Number.MIN_VALUE;\n for (var i = 0; i < row.length; i++) {\n if (row[i].height > maxHeight) maxHeight = row[i].height;\n }\n if (longest > 0) maxHeight += organization.verticalPadding;\n\n var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last];\n\n organization.rowHeight[longest] = maxHeight;\n if (organization.rowHeight[last] < node.height + organization.verticalPadding) organization.rowHeight[last] = node.height + organization.verticalPadding;\n\n var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last];\n organization.height += finalTotal - prevTotal;\n\n this.shiftToLastRow(organization);\n }\n};\n\nCoSELayout.prototype.tilingPreLayout = function () {\n if (CoSEConstants.TILE) {\n // Find zero degree nodes and create a compound for each level\n this.groupZeroDegreeMembers();\n // Tile and clear children of each compound\n this.clearCompounds();\n // Separately tile and clear zero degree nodes for each level\n this.clearZeroDegreeMembers();\n }\n};\n\nCoSELayout.prototype.tilingPostLayout = function () {\n if (CoSEConstants.TILE) {\n this.repopulateZeroDegreeMembers();\n this.repopulateCompounds();\n }\n};\n\n// -----------------------------------------------------------------------------\n// Section: Tree Reduction methods\n// -----------------------------------------------------------------------------\n// Reduce trees \nCoSELayout.prototype.reduceTrees = function () {\n var prunedNodesAll = [];\n var containsLeaf = true;\n var node;\n\n while (containsLeaf) {\n var allNodes = this.graphManager.getAllNodes();\n var prunedNodesInStepTemp = [];\n containsLeaf = false;\n\n for (var i = 0; i < allNodes.length; i++) {\n node = allNodes[i];\n if (node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null) {\n if (CoSEConstants.PURE_INCREMENTAL) {\n var otherEnd = node.getEdges()[0].getOtherEnd(node);\n var relativePosition = new DimensionD(node.getCenterX() - otherEnd.getCenterX(), node.getCenterY() - otherEnd.getCenterY());\n prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner(), relativePosition]);\n } else {\n prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]);\n }\n containsLeaf = true;\n }\n }\n if (containsLeaf == true) {\n var prunedNodesInStep = [];\n for (var j = 0; j < prunedNodesInStepTemp.length; j++) {\n if (prunedNodesInStepTemp[j][0].getEdges().length == 1) {\n prunedNodesInStep.push(prunedNodesInStepTemp[j]);\n prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]);\n }\n }\n prunedNodesAll.push(prunedNodesInStep);\n this.graphManager.resetAllNodes();\n this.graphManager.resetAllEdges();\n }\n }\n this.prunedNodesAll = prunedNodesAll;\n};\n\n// Grow tree one step \nCoSELayout.prototype.growTree = function (prunedNodesAll) {\n var lengthOfPrunedNodesInStep = prunedNodesAll.length;\n var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1];\n\n var nodeData;\n for (var i = 0; i < prunedNodesInStep.length; i++) {\n nodeData = prunedNodesInStep[i];\n\n this.findPlaceforPrunedNode(nodeData);\n\n nodeData[2].add(nodeData[0]);\n nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target);\n }\n\n prunedNodesAll.splice(prunedNodesAll.length - 1, 1);\n this.graphManager.resetAllNodes();\n this.graphManager.resetAllEdges();\n};\n\n// Find an appropriate position to replace pruned node, this method can be improved\nCoSELayout.prototype.findPlaceforPrunedNode = function (nodeData) {\n\n var gridForPrunedNode;\n var nodeToConnect;\n var prunedNode = nodeData[0];\n if (prunedNode == nodeData[1].source) {\n nodeToConnect = nodeData[1].target;\n } else {\n nodeToConnect = nodeData[1].source;\n }\n\n if (CoSEConstants.PURE_INCREMENTAL) {\n prunedNode.setCenter(nodeToConnect.getCenterX() + nodeData[3].getWidth(), nodeToConnect.getCenterY() + nodeData[3].getHeight());\n } else {\n var startGridX = nodeToConnect.startX;\n var finishGridX = nodeToConnect.finishX;\n var startGridY = nodeToConnect.startY;\n var finishGridY = nodeToConnect.finishY;\n\n var upNodeCount = 0;\n var downNodeCount = 0;\n var rightNodeCount = 0;\n var leftNodeCount = 0;\n var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount];\n\n if (startGridY > 0) {\n for (var i = startGridX; i <= finishGridX; i++) {\n controlRegions[0] += this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1;\n }\n }\n if (finishGridX < this.grid.length - 1) {\n for (var i = startGridY; i <= finishGridY; i++) {\n controlRegions[1] += this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1;\n }\n }\n if (finishGridY < this.grid[0].length - 1) {\n for (var i = startGridX; i <= finishGridX; i++) {\n controlRegions[2] += this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1;\n }\n }\n if (startGridX > 0) {\n for (var i = startGridY; i <= finishGridY; i++) {\n controlRegions[3] += this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1;\n }\n }\n var min = Integer.MAX_VALUE;\n var minCount;\n var minIndex;\n for (var j = 0; j < controlRegions.length; j++) {\n if (controlRegions[j] < min) {\n min = controlRegions[j];\n minCount = 1;\n minIndex = j;\n } else if (controlRegions[j] == min) {\n minCount++;\n }\n }\n\n if (minCount == 3 && min == 0) {\n if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) {\n gridForPrunedNode = 1;\n } else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) {\n gridForPrunedNode = 0;\n } else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) {\n gridForPrunedNode = 3;\n } else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) {\n gridForPrunedNode = 2;\n }\n } else if (minCount == 2 && min == 0) {\n var random = Math.floor(Math.random() * 2);\n if (controlRegions[0] == 0 && controlRegions[1] == 0) {\n ;\n if (random == 0) {\n gridForPrunedNode = 0;\n } else {\n gridForPrunedNode = 1;\n }\n } else if (controlRegions[0] == 0 && controlRegions[2] == 0) {\n if (random == 0) {\n gridForPrunedNode = 0;\n } else {\n gridForPrunedNode = 2;\n }\n } else if (controlRegions[0] == 0 && controlRegions[3] == 0) {\n if (random == 0) {\n gridForPrunedNode = 0;\n } else {\n gridForPrunedNode = 3;\n }\n } else if (controlRegions[1] == 0 && controlRegions[2] == 0) {\n if (random == 0) {\n gridForPrunedNode = 1;\n } else {\n gridForPrunedNode = 2;\n }\n } else if (controlRegions[1] == 0 && controlRegions[3] == 0) {\n if (random == 0) {\n gridForPrunedNode = 1;\n } else {\n gridForPrunedNode = 3;\n }\n } else {\n if (random == 0) {\n gridForPrunedNode = 2;\n } else {\n gridForPrunedNode = 3;\n }\n }\n } else if (minCount == 4 && min == 0) {\n var random = Math.floor(Math.random() * 4);\n gridForPrunedNode = random;\n } else {\n gridForPrunedNode = minIndex;\n }\n\n if (gridForPrunedNode == 0) {\n prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2);\n } else if (gridForPrunedNode == 1) {\n prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY());\n } else if (gridForPrunedNode == 2) {\n prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2);\n } else {\n prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY());\n }\n }\n};\n\nmodule.exports = CoSELayout;\n\n/***/ }),\n\n/***/ 991:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar FDLayoutNode = __webpack_require__(551).FDLayoutNode;\nvar IMath = __webpack_require__(551).IMath;\n\nfunction CoSENode(gm, loc, size, vNode) {\n FDLayoutNode.call(this, gm, loc, size, vNode);\n}\n\nCoSENode.prototype = Object.create(FDLayoutNode.prototype);\nfor (var prop in FDLayoutNode) {\n CoSENode[prop] = FDLayoutNode[prop];\n}\n\nCoSENode.prototype.calculateDisplacement = function () {\n var layout = this.graphManager.getLayout();\n // this check is for compound nodes that contain fixed nodes\n if (this.getChild() != null && this.fixedNodeWeight) {\n this.displacementX += layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.fixedNodeWeight;\n this.displacementY += layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.fixedNodeWeight;\n } else {\n this.displacementX += layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren;\n this.displacementY += layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren;\n }\n\n if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) {\n this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementX);\n }\n\n if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) {\n this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementY);\n }\n\n // non-empty compound node, propogate movement to children as well\n if (this.child && this.child.getNodes().length > 0) {\n this.propogateDisplacementToChildren(this.displacementX, this.displacementY);\n }\n};\n\nCoSENode.prototype.propogateDisplacementToChildren = function (dX, dY) {\n var nodes = this.getChild().getNodes();\n var node;\n for (var i = 0; i < nodes.length; i++) {\n node = nodes[i];\n if (node.getChild() == null) {\n node.displacementX += dX;\n node.displacementY += dY;\n } else {\n node.propogateDisplacementToChildren(dX, dY);\n }\n }\n};\n\nCoSENode.prototype.move = function () {\n var layout = this.graphManager.getLayout();\n\n // a simple node or an empty compound node, move it\n if (this.child == null || this.child.getNodes().length == 0) {\n this.moveBy(this.displacementX, this.displacementY);\n\n layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY);\n }\n\n this.springForceX = 0;\n this.springForceY = 0;\n this.repulsionForceX = 0;\n this.repulsionForceY = 0;\n this.gravitationForceX = 0;\n this.gravitationForceY = 0;\n this.displacementX = 0;\n this.displacementY = 0;\n};\n\nCoSENode.prototype.setPred1 = function (pred1) {\n this.pred1 = pred1;\n};\n\nCoSENode.prototype.getPred1 = function () {\n return pred1;\n};\n\nCoSENode.prototype.getPred2 = function () {\n return pred2;\n};\n\nCoSENode.prototype.setNext = function (next) {\n this.next = next;\n};\n\nCoSENode.prototype.getNext = function () {\n return next;\n};\n\nCoSENode.prototype.setProcessed = function (processed) {\n this.processed = processed;\n};\n\nCoSENode.prototype.isProcessed = function () {\n return processed;\n};\n\nmodule.exports = CoSENode;\n\n/***/ }),\n\n/***/ 902:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar CoSEConstants = __webpack_require__(806);\nvar LinkedList = __webpack_require__(551).LinkedList;\nvar Matrix = __webpack_require__(551).Matrix;\nvar SVD = __webpack_require__(551).SVD;\n\nfunction ConstraintHandler() {}\n\nConstraintHandler.handleConstraints = function (layout) {\n // let layout = this.graphManager.getLayout();\n\n // get constraints from layout\n var constraints = {};\n constraints.fixedNodeConstraint = layout.constraints.fixedNodeConstraint;\n constraints.alignmentConstraint = layout.constraints.alignmentConstraint;\n constraints.relativePlacementConstraint = layout.constraints.relativePlacementConstraint;\n\n var idToNodeMap = new Map();\n var nodeIndexes = new Map();\n var xCoords = [];\n var yCoords = [];\n\n var allNodes = layout.getAllNodes();\n var index = 0;\n // fill index map and coordinates\n for (var i = 0; i < allNodes.length; i++) {\n var node = allNodes[i];\n if (node.getChild() == null) {\n nodeIndexes.set(node.id, index++);\n xCoords.push(node.getCenterX());\n yCoords.push(node.getCenterY());\n idToNodeMap.set(node.id, node);\n }\n }\n\n // if there exists relative placement constraint without gap value, set it to default \n if (constraints.relativePlacementConstraint) {\n constraints.relativePlacementConstraint.forEach(function (constraint) {\n if (!constraint.gap && constraint.gap != 0) {\n if (constraint.left) {\n constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.left).getWidth() / 2 + idToNodeMap.get(constraint.right).getWidth() / 2;\n } else {\n constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.top).getHeight() / 2 + idToNodeMap.get(constraint.bottom).getHeight() / 2;\n }\n }\n });\n }\n\n /* auxiliary functions */\n\n // calculate difference between two position objects\n var calculatePositionDiff = function calculatePositionDiff(pos1, pos2) {\n return { x: pos1.x - pos2.x, y: pos1.y - pos2.y };\n };\n\n // calculate average position of the nodes\n var calculateAvgPosition = function calculateAvgPosition(nodeIdSet) {\n var xPosSum = 0;\n var yPosSum = 0;\n nodeIdSet.forEach(function (nodeId) {\n xPosSum += xCoords[nodeIndexes.get(nodeId)];\n yPosSum += yCoords[nodeIndexes.get(nodeId)];\n });\n\n return { x: xPosSum / nodeIdSet.size, y: yPosSum / nodeIdSet.size };\n };\n\n // find an appropriate positioning for the nodes in a given graph according to relative placement constraints\n // this function also takes the fixed nodes and alignment constraints into account\n // graph: dag to be evaluated, direction: \"horizontal\" or \"vertical\", \n // fixedNodes: set of fixed nodes to consider during evaluation, dummyPositions: appropriate coordinates of the dummy nodes \n var findAppropriatePositionForRelativePlacement = function findAppropriatePositionForRelativePlacement(graph, direction, fixedNodes, dummyPositions, componentSources) {\n\n // find union of two sets\n function setUnion(setA, setB) {\n var union = new Set(setA);\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = setB[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var elem = _step.value;\n\n union.add(elem);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return union;\n }\n\n // find indegree count for each node\n var inDegrees = new Map();\n\n graph.forEach(function (value, key) {\n inDegrees.set(key, 0);\n });\n graph.forEach(function (value, key) {\n value.forEach(function (adjacent) {\n inDegrees.set(adjacent.id, inDegrees.get(adjacent.id) + 1);\n });\n });\n\n var positionMap = new Map(); // keeps the position for each node\n var pastMap = new Map(); // keeps the predecessors(past) of a node\n var queue = new LinkedList();\n inDegrees.forEach(function (value, key) {\n if (value == 0) {\n queue.push(key);\n if (!fixedNodes) {\n if (direction == \"horizontal\") {\n positionMap.set(key, nodeIndexes.has(key) ? xCoords[nodeIndexes.get(key)] : dummyPositions.get(key));\n } else {\n positionMap.set(key, nodeIndexes.has(key) ? yCoords[nodeIndexes.get(key)] : dummyPositions.get(key));\n }\n }\n } else {\n positionMap.set(key, Number.NEGATIVE_INFINITY);\n }\n if (fixedNodes) {\n pastMap.set(key, new Set([key]));\n }\n });\n\n // align sources of each component in enforcement phase\n if (fixedNodes) {\n componentSources.forEach(function (component) {\n var fixedIds = [];\n component.forEach(function (nodeId) {\n if (fixedNodes.has(nodeId)) {\n fixedIds.push(nodeId);\n }\n });\n if (fixedIds.length > 0) {\n var position = 0;\n fixedIds.forEach(function (fixedId) {\n if (direction == \"horizontal\") {\n positionMap.set(fixedId, nodeIndexes.has(fixedId) ? xCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId));\n position += positionMap.get(fixedId);\n } else {\n positionMap.set(fixedId, nodeIndexes.has(fixedId) ? yCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId));\n position += positionMap.get(fixedId);\n }\n });\n position = position / fixedIds.length;\n component.forEach(function (nodeId) {\n if (!fixedNodes.has(nodeId)) {\n positionMap.set(nodeId, position);\n }\n });\n } else {\n var _position = 0;\n component.forEach(function (nodeId) {\n if (direction == \"horizontal\") {\n _position += nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);\n } else {\n _position += nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);\n }\n });\n _position = _position / component.length;\n component.forEach(function (nodeId) {\n positionMap.set(nodeId, _position);\n });\n }\n });\n }\n\n // calculate positions of the nodes\n\n var _loop = function _loop() {\n var currentNode = queue.shift();\n var neighbors = graph.get(currentNode);\n neighbors.forEach(function (neighbor) {\n if (positionMap.get(neighbor.id) < positionMap.get(currentNode) + neighbor.gap) {\n if (fixedNodes && fixedNodes.has(neighbor.id)) {\n var fixedPosition = void 0;\n if (direction == \"horizontal\") {\n fixedPosition = nodeIndexes.has(neighbor.id) ? xCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id);\n } else {\n fixedPosition = nodeIndexes.has(neighbor.id) ? yCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id);\n }\n positionMap.set(neighbor.id, fixedPosition); // TODO: may do unnecessary work\n if (fixedPosition < positionMap.get(currentNode) + neighbor.gap) {\n var diff = positionMap.get(currentNode) + neighbor.gap - fixedPosition;\n pastMap.get(currentNode).forEach(function (nodeId) {\n positionMap.set(nodeId, positionMap.get(nodeId) - diff);\n });\n }\n } else {\n positionMap.set(neighbor.id, positionMap.get(currentNode) + neighbor.gap);\n }\n }\n inDegrees.set(neighbor.id, inDegrees.get(neighbor.id) - 1);\n if (inDegrees.get(neighbor.id) == 0) {\n queue.push(neighbor.id);\n }\n if (fixedNodes) {\n pastMap.set(neighbor.id, setUnion(pastMap.get(currentNode), pastMap.get(neighbor.id)));\n }\n });\n };\n\n while (queue.length != 0) {\n _loop();\n }\n\n // readjust position of the nodes after enforcement\n if (fixedNodes) {\n // find indegree count for each node\n var sinkNodes = new Set();\n\n graph.forEach(function (value, key) {\n if (value.length == 0) {\n sinkNodes.add(key);\n }\n });\n\n var _components = [];\n pastMap.forEach(function (value, key) {\n if (sinkNodes.has(key)) {\n var isFixedComponent = false;\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var nodeId = _step2.value;\n\n if (fixedNodes.has(nodeId)) {\n isFixedComponent = true;\n }\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n if (!isFixedComponent) {\n var isExist = false;\n var existAt = void 0;\n _components.forEach(function (component, index) {\n if (component.has([].concat(_toConsumableArray(value))[0])) {\n isExist = true;\n existAt = index;\n }\n });\n if (!isExist) {\n _components.push(new Set(value));\n } else {\n value.forEach(function (ele) {\n _components[existAt].add(ele);\n });\n }\n }\n }\n });\n\n _components.forEach(function (component, index) {\n var minBefore = Number.POSITIVE_INFINITY;\n var minAfter = Number.POSITIVE_INFINITY;\n var maxBefore = Number.NEGATIVE_INFINITY;\n var maxAfter = Number.NEGATIVE_INFINITY;\n\n var _iteratorNormalCompletion3 = true;\n var _didIteratorError3 = false;\n var _iteratorError3 = undefined;\n\n try {\n for (var _iterator3 = component[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {\n var nodeId = _step3.value;\n\n var posBefore = void 0;\n if (direction == \"horizontal\") {\n posBefore = nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);\n } else {\n posBefore = nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId);\n }\n var posAfter = positionMap.get(nodeId);\n if (posBefore < minBefore) {\n minBefore = posBefore;\n }\n if (posBefore > maxBefore) {\n maxBefore = posBefore;\n }\n if (posAfter < minAfter) {\n minAfter = posAfter;\n }\n if (posAfter > maxAfter) {\n maxAfter = posAfter;\n }\n }\n } catch (err) {\n _didIteratorError3 = true;\n _iteratorError3 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion3 && _iterator3.return) {\n _iterator3.return();\n }\n } finally {\n if (_didIteratorError3) {\n throw _iteratorError3;\n }\n }\n }\n\n var diff = (minBefore + maxBefore) / 2 - (minAfter + maxAfter) / 2;\n\n var _iteratorNormalCompletion4 = true;\n var _didIteratorError4 = false;\n var _iteratorError4 = undefined;\n\n try {\n for (var _iterator4 = component[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) {\n var _nodeId = _step4.value;\n\n positionMap.set(_nodeId, positionMap.get(_nodeId) + diff);\n }\n } catch (err) {\n _didIteratorError4 = true;\n _iteratorError4 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion4 && _iterator4.return) {\n _iterator4.return();\n }\n } finally {\n if (_didIteratorError4) {\n throw _iteratorError4;\n }\n }\n }\n });\n }\n\n return positionMap;\n };\n\n // find transformation based on rel. placement constraints if there are both alignment and rel. placement constraints\n // or if there are only rel. placement contraints where the largest component isn't sufficiently large\n var applyReflectionForRelativePlacement = function applyReflectionForRelativePlacement(relativePlacementConstraints) {\n // variables to count votes\n var reflectOnY = 0,\n notReflectOnY = 0;\n var reflectOnX = 0,\n notReflectOnX = 0;\n\n relativePlacementConstraints.forEach(function (constraint) {\n if (constraint.left) {\n xCoords[nodeIndexes.get(constraint.left)] - xCoords[nodeIndexes.get(constraint.right)] >= 0 ? reflectOnY++ : notReflectOnY++;\n } else {\n yCoords[nodeIndexes.get(constraint.top)] - yCoords[nodeIndexes.get(constraint.bottom)] >= 0 ? reflectOnX++ : notReflectOnX++;\n }\n });\n\n if (reflectOnY > notReflectOnY && reflectOnX > notReflectOnX) {\n for (var _i = 0; _i < nodeIndexes.size; _i++) {\n xCoords[_i] = -1 * xCoords[_i];\n yCoords[_i] = -1 * yCoords[_i];\n }\n } else if (reflectOnY > notReflectOnY) {\n for (var _i2 = 0; _i2 < nodeIndexes.size; _i2++) {\n xCoords[_i2] = -1 * xCoords[_i2];\n }\n } else if (reflectOnX > notReflectOnX) {\n for (var _i3 = 0; _i3 < nodeIndexes.size; _i3++) {\n yCoords[_i3] = -1 * yCoords[_i3];\n }\n }\n };\n\n // find weakly connected components in undirected graph\n var findComponents = function findComponents(graph) {\n // find weakly connected components in dag\n var components = [];\n var queue = new LinkedList();\n var visited = new Set();\n var count = 0;\n\n graph.forEach(function (value, key) {\n if (!visited.has(key)) {\n components[count] = [];\n var _currentNode = key;\n queue.push(_currentNode);\n visited.add(_currentNode);\n components[count].push(_currentNode);\n\n while (queue.length != 0) {\n _currentNode = queue.shift();\n var neighbors = graph.get(_currentNode);\n neighbors.forEach(function (neighbor) {\n if (!visited.has(neighbor.id)) {\n queue.push(neighbor.id);\n visited.add(neighbor.id);\n components[count].push(neighbor.id);\n }\n });\n }\n count++;\n }\n });\n return components;\n };\n\n // return undirected version of given dag\n var dagToUndirected = function dagToUndirected(dag) {\n var undirected = new Map();\n\n dag.forEach(function (value, key) {\n undirected.set(key, []);\n });\n\n dag.forEach(function (value, key) {\n value.forEach(function (adjacent) {\n undirected.get(key).push(adjacent);\n undirected.get(adjacent.id).push({ id: key, gap: adjacent.gap, direction: adjacent.direction });\n });\n });\n\n return undirected;\n };\n\n // return reversed (directions inverted) version of given dag\n var dagToReversed = function dagToReversed(dag) {\n var reversed = new Map();\n\n dag.forEach(function (value, key) {\n reversed.set(key, []);\n });\n\n dag.forEach(function (value, key) {\n value.forEach(function (adjacent) {\n reversed.get(adjacent.id).push({ id: key, gap: adjacent.gap, direction: adjacent.direction });\n });\n });\n\n return reversed;\n };\n\n /**** apply transformation to the initial draft layout to better align with constrained nodes ****/\n // solve the Orthogonal Procrustean Problem to rotate and/or reflect initial draft layout\n // here we follow the solution in Chapter 20.2 of Borg, I. & Groenen, P. (2005) Modern Multidimensional Scaling: Theory and Applications \n\n /* construct source and target configurations */\n\n var targetMatrix = []; // A - target configuration\n var sourceMatrix = []; // B - source configuration \n var standardTransformation = false; // false for no transformation, true for standart (Procrustes) transformation (rotation and/or reflection)\n var reflectionType = false; // false/true for reflection check, 'reflectOnX', 'reflectOnY' or 'reflectOnBoth' for reflection type if necessary\n var fixedNodes = new Set();\n var dag = new Map(); // adjacency list to keep directed acyclic graph (dag) that consists of relative placement constraints\n var dagUndirected = new Map(); // undirected version of the dag\n var components = []; // weakly connected components\n\n // fill fixedNodes collection to use later\n if (constraints.fixedNodeConstraint) {\n constraints.fixedNodeConstraint.forEach(function (nodeData) {\n fixedNodes.add(nodeData.nodeId);\n });\n }\n\n // construct dag from relative placement constraints \n if (constraints.relativePlacementConstraint) {\n // construct both directed and undirected version of the dag\n constraints.relativePlacementConstraint.forEach(function (constraint) {\n if (constraint.left) {\n if (dag.has(constraint.left)) {\n dag.get(constraint.left).push({ id: constraint.right, gap: constraint.gap, direction: \"horizontal\" });\n } else {\n dag.set(constraint.left, [{ id: constraint.right, gap: constraint.gap, direction: \"horizontal\" }]);\n }\n if (!dag.has(constraint.right)) {\n dag.set(constraint.right, []);\n }\n } else {\n if (dag.has(constraint.top)) {\n dag.get(constraint.top).push({ id: constraint.bottom, gap: constraint.gap, direction: \"vertical\" });\n } else {\n dag.set(constraint.top, [{ id: constraint.bottom, gap: constraint.gap, direction: \"vertical\" }]);\n }\n if (!dag.has(constraint.bottom)) {\n dag.set(constraint.bottom, []);\n }\n }\n });\n\n dagUndirected = dagToUndirected(dag);\n components = findComponents(dagUndirected);\n }\n\n if (CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING) {\n // first check fixed node constraint\n if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 1) {\n constraints.fixedNodeConstraint.forEach(function (nodeData, i) {\n targetMatrix[i] = [nodeData.position.x, nodeData.position.y];\n sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeData.nodeId)], yCoords[nodeIndexes.get(nodeData.nodeId)]];\n });\n standardTransformation = true;\n } else if (constraints.alignmentConstraint) {\n (function () {\n // then check alignment constraint\n var count = 0;\n if (constraints.alignmentConstraint.vertical) {\n var verticalAlign = constraints.alignmentConstraint.vertical;\n\n var _loop2 = function _loop2(_i4) {\n var alignmentSet = new Set();\n verticalAlign[_i4].forEach(function (nodeId) {\n alignmentSet.add(nodeId);\n });\n var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) {\n return fixedNodes.has(x);\n }));\n var xPos = void 0;\n if (intersection.size > 0) xPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else xPos = calculateAvgPosition(alignmentSet).x;\n\n verticalAlign[_i4].forEach(function (nodeId) {\n targetMatrix[count] = [xPos, yCoords[nodeIndexes.get(nodeId)]];\n sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]];\n count++;\n });\n };\n\n for (var _i4 = 0; _i4 < verticalAlign.length; _i4++) {\n _loop2(_i4);\n }\n standardTransformation = true;\n }\n if (constraints.alignmentConstraint.horizontal) {\n var horizontalAlign = constraints.alignmentConstraint.horizontal;\n\n var _loop3 = function _loop3(_i5) {\n var alignmentSet = new Set();\n horizontalAlign[_i5].forEach(function (nodeId) {\n alignmentSet.add(nodeId);\n });\n var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) {\n return fixedNodes.has(x);\n }));\n var yPos = void 0;\n if (intersection.size > 0) yPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else yPos = calculateAvgPosition(alignmentSet).y;\n\n horizontalAlign[_i5].forEach(function (nodeId) {\n targetMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yPos];\n sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]];\n count++;\n });\n };\n\n for (var _i5 = 0; _i5 < horizontalAlign.length; _i5++) {\n _loop3(_i5);\n }\n standardTransformation = true;\n }\n if (constraints.relativePlacementConstraint) {\n reflectionType = true;\n }\n })();\n } else if (constraints.relativePlacementConstraint) {\n // finally check relative placement constraint\n // find largest component in dag\n var largestComponentSize = 0;\n var largestComponentIndex = 0;\n for (var _i6 = 0; _i6 < components.length; _i6++) {\n if (components[_i6].length > largestComponentSize) {\n largestComponentSize = components[_i6].length;\n largestComponentIndex = _i6;\n }\n }\n // if largest component isn't dominant, then take the votes for reflection\n if (largestComponentSize < dagUndirected.size / 2) {\n applyReflectionForRelativePlacement(constraints.relativePlacementConstraint);\n standardTransformation = false;\n reflectionType = false;\n } else {\n // use largest component for transformation\n // construct horizontal and vertical subgraphs in the largest component\n var subGraphOnHorizontal = new Map();\n var subGraphOnVertical = new Map();\n var constraintsInlargestComponent = [];\n\n components[largestComponentIndex].forEach(function (nodeId) {\n dag.get(nodeId).forEach(function (adjacent) {\n if (adjacent.direction == \"horizontal\") {\n if (subGraphOnHorizontal.has(nodeId)) {\n subGraphOnHorizontal.get(nodeId).push(adjacent);\n } else {\n subGraphOnHorizontal.set(nodeId, [adjacent]);\n }\n if (!subGraphOnHorizontal.has(adjacent.id)) {\n subGraphOnHorizontal.set(adjacent.id, []);\n }\n constraintsInlargestComponent.push({ left: nodeId, right: adjacent.id });\n } else {\n if (subGraphOnVertical.has(nodeId)) {\n subGraphOnVertical.get(nodeId).push(adjacent);\n } else {\n subGraphOnVertical.set(nodeId, [adjacent]);\n }\n if (!subGraphOnVertical.has(adjacent.id)) {\n subGraphOnVertical.set(adjacent.id, []);\n }\n constraintsInlargestComponent.push({ top: nodeId, bottom: adjacent.id });\n }\n });\n });\n\n applyReflectionForRelativePlacement(constraintsInlargestComponent);\n reflectionType = false;\n\n // calculate appropriate positioning for subgraphs\n var positionMapHorizontal = findAppropriatePositionForRelativePlacement(subGraphOnHorizontal, \"horizontal\");\n var positionMapVertical = findAppropriatePositionForRelativePlacement(subGraphOnVertical, \"vertical\");\n\n // construct source and target configuration\n components[largestComponentIndex].forEach(function (nodeId, i) {\n sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]];\n targetMatrix[i] = [];\n if (positionMapHorizontal.has(nodeId)) {\n targetMatrix[i][0] = positionMapHorizontal.get(nodeId);\n } else {\n targetMatrix[i][0] = xCoords[nodeIndexes.get(nodeId)];\n }\n if (positionMapVertical.has(nodeId)) {\n targetMatrix[i][1] = positionMapVertical.get(nodeId);\n } else {\n targetMatrix[i][1] = yCoords[nodeIndexes.get(nodeId)];\n }\n });\n\n standardTransformation = true;\n }\n }\n\n // if transformation is required, then calculate and apply transformation matrix\n if (standardTransformation) {\n /* calculate transformation matrix */\n var transformationMatrix = void 0;\n var targetMatrixTranspose = Matrix.transpose(targetMatrix); // A'\n var sourceMatrixTranspose = Matrix.transpose(sourceMatrix); // B'\n\n // centralize transpose matrices\n for (var _i7 = 0; _i7 < targetMatrixTranspose.length; _i7++) {\n targetMatrixTranspose[_i7] = Matrix.multGamma(targetMatrixTranspose[_i7]);\n sourceMatrixTranspose[_i7] = Matrix.multGamma(sourceMatrixTranspose[_i7]);\n }\n\n // do actual calculation for transformation matrix\n var tempMatrix = Matrix.multMat(targetMatrixTranspose, Matrix.transpose(sourceMatrixTranspose)); // tempMatrix = A'B\n var SVDResult = SVD.svd(tempMatrix); // SVD(A'B) = USV', svd function returns U, S and V \n transformationMatrix = Matrix.multMat(SVDResult.V, Matrix.transpose(SVDResult.U)); // transformationMatrix = T = VU'\n\n /* apply found transformation matrix to obtain final draft layout */\n for (var _i8 = 0; _i8 < nodeIndexes.size; _i8++) {\n var temp1 = [xCoords[_i8], yCoords[_i8]];\n var temp2 = [transformationMatrix[0][0], transformationMatrix[1][0]];\n var temp3 = [transformationMatrix[0][1], transformationMatrix[1][1]];\n xCoords[_i8] = Matrix.dotProduct(temp1, temp2);\n yCoords[_i8] = Matrix.dotProduct(temp1, temp3);\n }\n\n // applied only both alignment and rel. placement constraints exist\n if (reflectionType) {\n applyReflectionForRelativePlacement(constraints.relativePlacementConstraint);\n }\n }\n }\n\n if (CoSEConstants.ENFORCE_CONSTRAINTS) {\n /**** enforce constraints on the transformed draft layout ****/\n\n /* first enforce fixed node constraint */\n\n if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 0) {\n var translationAmount = { x: 0, y: 0 };\n constraints.fixedNodeConstraint.forEach(function (nodeData, i) {\n var posInTheory = { x: xCoords[nodeIndexes.get(nodeData.nodeId)], y: yCoords[nodeIndexes.get(nodeData.nodeId)] };\n var posDesired = nodeData.position;\n var posDiff = calculatePositionDiff(posDesired, posInTheory);\n translationAmount.x += posDiff.x;\n translationAmount.y += posDiff.y;\n });\n translationAmount.x /= constraints.fixedNodeConstraint.length;\n translationAmount.y /= constraints.fixedNodeConstraint.length;\n\n xCoords.forEach(function (value, i) {\n xCoords[i] += translationAmount.x;\n });\n\n yCoords.forEach(function (value, i) {\n yCoords[i] += translationAmount.y;\n });\n\n constraints.fixedNodeConstraint.forEach(function (nodeData) {\n xCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.x;\n yCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.y;\n });\n }\n\n /* then enforce alignment constraint */\n\n if (constraints.alignmentConstraint) {\n if (constraints.alignmentConstraint.vertical) {\n var xAlign = constraints.alignmentConstraint.vertical;\n\n var _loop4 = function _loop4(_i9) {\n var alignmentSet = new Set();\n xAlign[_i9].forEach(function (nodeId) {\n alignmentSet.add(nodeId);\n });\n var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) {\n return fixedNodes.has(x);\n }));\n var xPos = void 0;\n if (intersection.size > 0) xPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else xPos = calculateAvgPosition(alignmentSet).x;\n\n alignmentSet.forEach(function (nodeId) {\n if (!fixedNodes.has(nodeId)) xCoords[nodeIndexes.get(nodeId)] = xPos;\n });\n };\n\n for (var _i9 = 0; _i9 < xAlign.length; _i9++) {\n _loop4(_i9);\n }\n }\n if (constraints.alignmentConstraint.horizontal) {\n var yAlign = constraints.alignmentConstraint.horizontal;\n\n var _loop5 = function _loop5(_i10) {\n var alignmentSet = new Set();\n yAlign[_i10].forEach(function (nodeId) {\n alignmentSet.add(nodeId);\n });\n var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) {\n return fixedNodes.has(x);\n }));\n var yPos = void 0;\n if (intersection.size > 0) yPos = yCoords[nodeIndexes.get(intersection.values().next().value)];else yPos = calculateAvgPosition(alignmentSet).y;\n\n alignmentSet.forEach(function (nodeId) {\n if (!fixedNodes.has(nodeId)) yCoords[nodeIndexes.get(nodeId)] = yPos;\n });\n };\n\n for (var _i10 = 0; _i10 < yAlign.length; _i10++) {\n _loop5(_i10);\n }\n }\n }\n\n /* finally enforce relative placement constraint */\n\n if (constraints.relativePlacementConstraint) {\n (function () {\n var nodeToDummyForVerticalAlignment = new Map();\n var nodeToDummyForHorizontalAlignment = new Map();\n var dummyToNodeForVerticalAlignment = new Map();\n var dummyToNodeForHorizontalAlignment = new Map();\n var dummyPositionsForVerticalAlignment = new Map();\n var dummyPositionsForHorizontalAlignment = new Map();\n var fixedNodesOnHorizontal = new Set();\n var fixedNodesOnVertical = new Set();\n\n // fill maps and sets \n fixedNodes.forEach(function (nodeId) {\n fixedNodesOnHorizontal.add(nodeId);\n fixedNodesOnVertical.add(nodeId);\n });\n\n if (constraints.alignmentConstraint) {\n if (constraints.alignmentConstraint.vertical) {\n var verticalAlignment = constraints.alignmentConstraint.vertical;\n\n var _loop6 = function _loop6(_i11) {\n dummyToNodeForVerticalAlignment.set(\"dummy\" + _i11, []);\n verticalAlignment[_i11].forEach(function (nodeId) {\n nodeToDummyForVerticalAlignment.set(nodeId, \"dummy\" + _i11);\n dummyToNodeForVerticalAlignment.get(\"dummy\" + _i11).push(nodeId);\n if (fixedNodes.has(nodeId)) {\n fixedNodesOnHorizontal.add(\"dummy\" + _i11);\n }\n });\n dummyPositionsForVerticalAlignment.set(\"dummy\" + _i11, xCoords[nodeIndexes.get(verticalAlignment[_i11][0])]);\n };\n\n for (var _i11 = 0; _i11 < verticalAlignment.length; _i11++) {\n _loop6(_i11);\n }\n }\n if (constraints.alignmentConstraint.horizontal) {\n var horizontalAlignment = constraints.alignmentConstraint.horizontal;\n\n var _loop7 = function _loop7(_i12) {\n dummyToNodeForHorizontalAlignment.set(\"dummy\" + _i12, []);\n horizontalAlignment[_i12].forEach(function (nodeId) {\n nodeToDummyForHorizontalAlignment.set(nodeId, \"dummy\" + _i12);\n dummyToNodeForHorizontalAlignment.get(\"dummy\" + _i12).push(nodeId);\n if (fixedNodes.has(nodeId)) {\n fixedNodesOnVertical.add(\"dummy\" + _i12);\n }\n });\n dummyPositionsForHorizontalAlignment.set(\"dummy\" + _i12, yCoords[nodeIndexes.get(horizontalAlignment[_i12][0])]);\n };\n\n for (var _i12 = 0; _i12 < horizontalAlignment.length; _i12++) {\n _loop7(_i12);\n }\n }\n }\n\n // construct horizontal and vertical dags (subgraphs) from overall dag\n var dagOnHorizontal = new Map();\n var dagOnVertical = new Map();\n\n var _loop8 = function _loop8(nodeId) {\n dag.get(nodeId).forEach(function (adjacent) {\n var sourceId = void 0;\n var targetNode = void 0;\n if (adjacent[\"direction\"] == \"horizontal\") {\n sourceId = nodeToDummyForVerticalAlignment.get(nodeId) ? nodeToDummyForVerticalAlignment.get(nodeId) : nodeId;\n if (nodeToDummyForVerticalAlignment.get(adjacent.id)) {\n targetNode = { id: nodeToDummyForVerticalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction };\n } else {\n targetNode = adjacent;\n }\n if (dagOnHorizontal.has(sourceId)) {\n dagOnHorizontal.get(sourceId).push(targetNode);\n } else {\n dagOnHorizontal.set(sourceId, [targetNode]);\n }\n if (!dagOnHorizontal.has(targetNode.id)) {\n dagOnHorizontal.set(targetNode.id, []);\n }\n } else {\n sourceId = nodeToDummyForHorizontalAlignment.get(nodeId) ? nodeToDummyForHorizontalAlignment.get(nodeId) : nodeId;\n if (nodeToDummyForHorizontalAlignment.get(adjacent.id)) {\n targetNode = { id: nodeToDummyForHorizontalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction };\n } else {\n targetNode = adjacent;\n }\n if (dagOnVertical.has(sourceId)) {\n dagOnVertical.get(sourceId).push(targetNode);\n } else {\n dagOnVertical.set(sourceId, [targetNode]);\n }\n if (!dagOnVertical.has(targetNode.id)) {\n dagOnVertical.set(targetNode.id, []);\n }\n }\n });\n };\n\n var _iteratorNormalCompletion5 = true;\n var _didIteratorError5 = false;\n var _iteratorError5 = undefined;\n\n try {\n for (var _iterator5 = dag.keys()[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) {\n var nodeId = _step5.value;\n\n _loop8(nodeId);\n }\n\n // find source nodes of each component in horizontal and vertical dags\n } catch (err) {\n _didIteratorError5 = true;\n _iteratorError5 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion5 && _iterator5.return) {\n _iterator5.return();\n }\n } finally {\n if (_didIteratorError5) {\n throw _iteratorError5;\n }\n }\n }\n\n var undirectedOnHorizontal = dagToUndirected(dagOnHorizontal);\n var undirectedOnVertical = dagToUndirected(dagOnVertical);\n var componentsOnHorizontal = findComponents(undirectedOnHorizontal);\n var componentsOnVertical = findComponents(undirectedOnVertical);\n var reversedDagOnHorizontal = dagToReversed(dagOnHorizontal);\n var reversedDagOnVertical = dagToReversed(dagOnVertical);\n var componentSourcesOnHorizontal = [];\n var componentSourcesOnVertical = [];\n\n componentsOnHorizontal.forEach(function (component, index) {\n componentSourcesOnHorizontal[index] = [];\n component.forEach(function (nodeId) {\n if (reversedDagOnHorizontal.get(nodeId).length == 0) {\n componentSourcesOnHorizontal[index].push(nodeId);\n }\n });\n });\n\n componentsOnVertical.forEach(function (component, index) {\n componentSourcesOnVertical[index] = [];\n component.forEach(function (nodeId) {\n if (reversedDagOnVertical.get(nodeId).length == 0) {\n componentSourcesOnVertical[index].push(nodeId);\n }\n });\n });\n\n // calculate appropriate positioning for subgraphs\n var positionMapHorizontal = findAppropriatePositionForRelativePlacement(dagOnHorizontal, \"horizontal\", fixedNodesOnHorizontal, dummyPositionsForVerticalAlignment, componentSourcesOnHorizontal);\n var positionMapVertical = findAppropriatePositionForRelativePlacement(dagOnVertical, \"vertical\", fixedNodesOnVertical, dummyPositionsForHorizontalAlignment, componentSourcesOnVertical);\n\n // update positions of the nodes based on relative placement constraints\n\n var _loop9 = function _loop9(key) {\n if (dummyToNodeForVerticalAlignment.get(key)) {\n dummyToNodeForVerticalAlignment.get(key).forEach(function (nodeId) {\n xCoords[nodeIndexes.get(nodeId)] = positionMapHorizontal.get(key);\n });\n } else {\n xCoords[nodeIndexes.get(key)] = positionMapHorizontal.get(key);\n }\n };\n\n var _iteratorNormalCompletion6 = true;\n var _didIteratorError6 = false;\n var _iteratorError6 = undefined;\n\n try {\n for (var _iterator6 = positionMapHorizontal.keys()[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) {\n var key = _step6.value;\n\n _loop9(key);\n }\n } catch (err) {\n _didIteratorError6 = true;\n _iteratorError6 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion6 && _iterator6.return) {\n _iterator6.return();\n }\n } finally {\n if (_didIteratorError6) {\n throw _iteratorError6;\n }\n }\n }\n\n var _loop10 = function _loop10(key) {\n if (dummyToNodeForHorizontalAlignment.get(key)) {\n dummyToNodeForHorizontalAlignment.get(key).forEach(function (nodeId) {\n yCoords[nodeIndexes.get(nodeId)] = positionMapVertical.get(key);\n });\n } else {\n yCoords[nodeIndexes.get(key)] = positionMapVertical.get(key);\n }\n };\n\n var _iteratorNormalCompletion7 = true;\n var _didIteratorError7 = false;\n var _iteratorError7 = undefined;\n\n try {\n for (var _iterator7 = positionMapVertical.keys()[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) {\n var key = _step7.value;\n\n _loop10(key);\n }\n } catch (err) {\n _didIteratorError7 = true;\n _iteratorError7 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion7 && _iterator7.return) {\n _iterator7.return();\n }\n } finally {\n if (_didIteratorError7) {\n throw _iteratorError7;\n }\n }\n }\n })();\n }\n }\n\n // assign new coordinates to nodes after constraint handling\n for (var _i13 = 0; _i13 < allNodes.length; _i13++) {\n var _node = allNodes[_i13];\n if (_node.getChild() == null) {\n _node.setCenter(xCoords[nodeIndexes.get(_node.id)], yCoords[nodeIndexes.get(_node.id)]);\n }\n }\n};\n\nmodule.exports = ConstraintHandler;\n\n/***/ }),\n\n/***/ 551:\n/***/ ((module) => {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__551__;\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module is referenced by other modules so it can't be inlined\n/******/ \tvar __webpack_exports__ = __webpack_require__(45);\n/******/ \t\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});", "(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"cose-base\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"cose-base\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cytoscapeFcose\"] = factory(require(\"cose-base\"));\n\telse\n\t\troot[\"cytoscapeFcose\"] = factory(root[\"coseBase\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE__140__) {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 658:\n/***/ ((module) => {\n\n\n\n// Simple, internal Object.assign() polyfill for options objects etc.\n\nmodule.exports = Object.assign != null ? Object.assign.bind(Object) : function (tgt) {\n for (var _len = arguments.length, srcs = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n srcs[_key - 1] = arguments[_key];\n }\n\n srcs.forEach(function (src) {\n Object.keys(src).forEach(function (k) {\n return tgt[k] = src[k];\n });\n });\n\n return tgt;\n};\n\n/***/ }),\n\n/***/ 548:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\n/*\n * Auxiliary functions\n */\n\nvar LinkedList = __webpack_require__(140).layoutBase.LinkedList;\n\nvar auxiliary = {};\n\n// get the top most nodes\nauxiliary.getTopMostNodes = function (nodes) {\n var nodesMap = {};\n for (var i = 0; i < nodes.length; i++) {\n nodesMap[nodes[i].id()] = true;\n }\n var roots = nodes.filter(function (ele, i) {\n if (typeof ele === \"number\") {\n ele = i;\n }\n var parent = ele.parent()[0];\n while (parent != null) {\n if (nodesMap[parent.id()]) {\n return false;\n }\n parent = parent.parent()[0];\n }\n return true;\n });\n\n return roots;\n};\n\n// find disconnected components and create dummy nodes that connect them\nauxiliary.connectComponents = function (cy, eles, topMostNodes, dummyNodes) {\n var queue = new LinkedList();\n var visited = new Set();\n var visitedTopMostNodes = [];\n var currentNeighbor = void 0;\n var minDegreeNode = void 0;\n var minDegree = void 0;\n\n var isConnected = false;\n var count = 1;\n var nodesConnectedToDummy = [];\n var components = [];\n\n var _loop = function _loop() {\n var cmpt = cy.collection();\n components.push(cmpt);\n\n var currentNode = topMostNodes[0];\n var childrenOfCurrentNode = cy.collection();\n childrenOfCurrentNode.merge(currentNode).merge(currentNode.descendants().intersection(eles));\n visitedTopMostNodes.push(currentNode);\n\n childrenOfCurrentNode.forEach(function (node) {\n queue.push(node);\n visited.add(node);\n cmpt.merge(node);\n });\n\n var _loop2 = function _loop2() {\n currentNode = queue.shift();\n\n // Traverse all neighbors of this node\n var neighborNodes = cy.collection();\n currentNode.neighborhood().nodes().forEach(function (node) {\n if (eles.intersection(currentNode.edgesWith(node)).length > 0) {\n neighborNodes.merge(node);\n }\n });\n\n for (var i = 0; i < neighborNodes.length; i++) {\n var neighborNode = neighborNodes[i];\n currentNeighbor = topMostNodes.intersection(neighborNode.union(neighborNode.ancestors()));\n if (currentNeighbor != null && !visited.has(currentNeighbor[0])) {\n var childrenOfNeighbor = currentNeighbor.union(currentNeighbor.descendants());\n\n childrenOfNeighbor.forEach(function (node) {\n queue.push(node);\n visited.add(node);\n cmpt.merge(node);\n if (topMostNodes.has(node)) {\n visitedTopMostNodes.push(node);\n }\n });\n }\n }\n };\n\n while (queue.length != 0) {\n _loop2();\n }\n\n cmpt.forEach(function (node) {\n eles.intersection(node.connectedEdges()).forEach(function (e) {\n // connectedEdges() usually cached\n if (cmpt.has(e.source()) && cmpt.has(e.target())) {\n // has() is cheap\n cmpt.merge(e);\n }\n });\n });\n\n if (visitedTopMostNodes.length == topMostNodes.length) {\n isConnected = true;\n }\n\n if (!isConnected || isConnected && count > 1) {\n minDegreeNode = visitedTopMostNodes[0];\n minDegree = minDegreeNode.connectedEdges().length;\n visitedTopMostNodes.forEach(function (node) {\n if (node.connectedEdges().length < minDegree) {\n minDegree = node.connectedEdges().length;\n minDegreeNode = node;\n }\n });\n nodesConnectedToDummy.push(minDegreeNode.id());\n // TO DO: Check efficiency of this part\n var temp = cy.collection();\n temp.merge(visitedTopMostNodes[0]);\n visitedTopMostNodes.forEach(function (node) {\n temp.merge(node);\n });\n visitedTopMostNodes = [];\n topMostNodes = topMostNodes.difference(temp);\n count++;\n }\n };\n\n do {\n _loop();\n } while (!isConnected);\n\n if (dummyNodes) {\n if (nodesConnectedToDummy.length > 0) {\n dummyNodes.set('dummy' + (dummyNodes.size + 1), nodesConnectedToDummy);\n }\n }\n return components;\n};\n\n// relocates componentResult to originalCenter if there is no fixedNodeConstraint\nauxiliary.relocateComponent = function (originalCenter, componentResult, options) {\n if (!options.fixedNodeConstraint) {\n var minXCoord = Number.POSITIVE_INFINITY;\n var maxXCoord = Number.NEGATIVE_INFINITY;\n var minYCoord = Number.POSITIVE_INFINITY;\n var maxYCoord = Number.NEGATIVE_INFINITY;\n if (options.quality == \"draft\") {\n // calculate current bounding box\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = componentResult.nodeIndexes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var _ref = _step.value;\n\n var _ref2 = _slicedToArray(_ref, 2);\n\n var key = _ref2[0];\n var value = _ref2[1];\n\n var cyNode = options.cy.getElementById(key);\n if (cyNode) {\n var nodeBB = cyNode.boundingBox();\n var leftX = componentResult.xCoords[value] - nodeBB.w / 2;\n var rightX = componentResult.xCoords[value] + nodeBB.w / 2;\n var topY = componentResult.yCoords[value] - nodeBB.h / 2;\n var bottomY = componentResult.yCoords[value] + nodeBB.h / 2;\n\n if (leftX < minXCoord) minXCoord = leftX;\n if (rightX > maxXCoord) maxXCoord = rightX;\n if (topY < minYCoord) minYCoord = topY;\n if (bottomY > maxYCoord) maxYCoord = bottomY;\n }\n }\n // find difference between current and original center\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n var diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2;\n var diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2;\n // move component to original center\n componentResult.xCoords = componentResult.xCoords.map(function (x) {\n return x + diffOnX;\n });\n componentResult.yCoords = componentResult.yCoords.map(function (y) {\n return y + diffOnY;\n });\n } else {\n // calculate current bounding box\n Object.keys(componentResult).forEach(function (item) {\n var node = componentResult[item];\n var leftX = node.getRect().x;\n var rightX = node.getRect().x + node.getRect().width;\n var topY = node.getRect().y;\n var bottomY = node.getRect().y + node.getRect().height;\n\n if (leftX < minXCoord) minXCoord = leftX;\n if (rightX > maxXCoord) maxXCoord = rightX;\n if (topY < minYCoord) minYCoord = topY;\n if (bottomY > maxYCoord) maxYCoord = bottomY;\n });\n // find difference between current and original center\n var _diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2;\n var _diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2;\n // move component to original center\n Object.keys(componentResult).forEach(function (item) {\n var node = componentResult[item];\n node.setCenter(node.getCenterX() + _diffOnX, node.getCenterY() + _diffOnY);\n });\n }\n }\n};\n\nauxiliary.calcBoundingBox = function (parentNode, xCoords, yCoords, nodeIndexes) {\n // calculate bounds\n var left = Number.MAX_SAFE_INTEGER;\n var right = Number.MIN_SAFE_INTEGER;\n var top = Number.MAX_SAFE_INTEGER;\n var bottom = Number.MIN_SAFE_INTEGER;\n var nodeLeft = void 0;\n var nodeRight = void 0;\n var nodeTop = void 0;\n var nodeBottom = void 0;\n\n var nodes = parentNode.descendants().not(\":parent\");\n var s = nodes.length;\n for (var i = 0; i < s; i++) {\n var node = nodes[i];\n\n nodeLeft = xCoords[nodeIndexes.get(node.id())] - node.width() / 2;\n nodeRight = xCoords[nodeIndexes.get(node.id())] + node.width() / 2;\n nodeTop = yCoords[nodeIndexes.get(node.id())] - node.height() / 2;\n nodeBottom = yCoords[nodeIndexes.get(node.id())] + node.height() / 2;\n\n if (left > nodeLeft) {\n left = nodeLeft;\n }\n\n if (right < nodeRight) {\n right = nodeRight;\n }\n\n if (top > nodeTop) {\n top = nodeTop;\n }\n\n if (bottom < nodeBottom) {\n bottom = nodeBottom;\n }\n }\n\n var boundingBox = {};\n boundingBox.topLeftX = left;\n boundingBox.topLeftY = top;\n boundingBox.width = right - left;\n boundingBox.height = bottom - top;\n return boundingBox;\n};\n\n// This function finds and returns parent nodes whose all children are hidden\nauxiliary.calcParentsWithoutChildren = function (cy, eles) {\n var parentsWithoutChildren = cy.collection();\n eles.nodes(':parent').forEach(function (parent) {\n var check = false;\n parent.children().forEach(function (child) {\n if (child.css('display') != 'none') {\n check = true;\n }\n });\n if (!check) {\n parentsWithoutChildren.merge(parent);\n }\n });\n\n return parentsWithoutChildren;\n};\n\nmodule.exports = auxiliary;\n\n/***/ }),\n\n/***/ 816:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\n/**\n The implementation of the postprocessing part that applies CoSE layout over the spectral layout\n*/\n\nvar aux = __webpack_require__(548);\nvar CoSELayout = __webpack_require__(140).CoSELayout;\nvar CoSENode = __webpack_require__(140).CoSENode;\nvar PointD = __webpack_require__(140).layoutBase.PointD;\nvar DimensionD = __webpack_require__(140).layoutBase.DimensionD;\nvar LayoutConstants = __webpack_require__(140).layoutBase.LayoutConstants;\nvar FDLayoutConstants = __webpack_require__(140).layoutBase.FDLayoutConstants;\nvar CoSEConstants = __webpack_require__(140).CoSEConstants;\n\n// main function that cose layout is processed\nvar coseLayout = function coseLayout(options, spectralResult) {\n\n var cy = options.cy;\n var eles = options.eles;\n var nodes = eles.nodes();\n var edges = eles.edges();\n\n var nodeIndexes = void 0;\n var xCoords = void 0;\n var yCoords = void 0;\n var idToLNode = {};\n\n if (options.randomize) {\n nodeIndexes = spectralResult[\"nodeIndexes\"];\n xCoords = spectralResult[\"xCoords\"];\n yCoords = spectralResult[\"yCoords\"];\n }\n\n var isFn = function isFn(fn) {\n return typeof fn === 'function';\n };\n\n var optFn = function optFn(opt, ele) {\n if (isFn(opt)) {\n return opt(ele);\n } else {\n return opt;\n }\n };\n\n /**** Postprocessing functions ****/\n\n var parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles);\n\n // transfer cytoscape nodes to cose nodes\n var processChildrenList = function processChildrenList(parent, children, layout, options) {\n var size = children.length;\n for (var i = 0; i < size; i++) {\n var theChild = children[i];\n var children_of_children = null;\n if (theChild.intersection(parentsWithoutChildren).length == 0) {\n children_of_children = theChild.children();\n }\n var theNode = void 0;\n\n var dimensions = theChild.layoutDimensions({\n nodeDimensionsIncludeLabels: options.nodeDimensionsIncludeLabels\n });\n\n if (theChild.outerWidth() != null && theChild.outerHeight() != null) {\n if (options.randomize) {\n if (!theChild.isParent()) {\n theNode = parent.add(new CoSENode(layout.graphManager, new PointD(xCoords[nodeIndexes.get(theChild.id())] - dimensions.w / 2, yCoords[nodeIndexes.get(theChild.id())] - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));\n } else {\n var parentInfo = aux.calcBoundingBox(theChild, xCoords, yCoords, nodeIndexes);\n if (theChild.intersection(parentsWithoutChildren).length == 0) {\n theNode = parent.add(new CoSENode(layout.graphManager, new PointD(parentInfo.topLeftX, parentInfo.topLeftY), new DimensionD(parentInfo.width, parentInfo.height)));\n } else {\n // for the parentsWithoutChildren\n theNode = parent.add(new CoSENode(layout.graphManager, new PointD(parentInfo.topLeftX, parentInfo.topLeftY), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));\n }\n }\n } else {\n theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h))));\n }\n } else {\n theNode = parent.add(new CoSENode(this.graphManager));\n }\n // Attach id to the layout node and repulsion value\n theNode.id = theChild.data(\"id\");\n theNode.nodeRepulsion = optFn(options.nodeRepulsion, theChild);\n // Attach the paddings of cy node to layout node\n theNode.paddingLeft = parseInt(theChild.css('padding'));\n theNode.paddingTop = parseInt(theChild.css('padding'));\n theNode.paddingRight = parseInt(theChild.css('padding'));\n theNode.paddingBottom = parseInt(theChild.css('padding'));\n\n //Attach the label properties to both compound and simple nodes if labels will be included in node dimensions\n //These properties will be used while updating bounds of compounds during iterations or tiling\n //and will be used for simple nodes while transferring final positions to cytoscape\n if (options.nodeDimensionsIncludeLabels) {\n theNode.labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).w;\n theNode.labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).h;\n theNode.labelPosVertical = theChild.css(\"text-valign\");\n theNode.labelPosHorizontal = theChild.css(\"text-halign\");\n }\n\n // Map the layout node\n idToLNode[theChild.data(\"id\")] = theNode;\n\n if (isNaN(theNode.rect.x)) {\n theNode.rect.x = 0;\n }\n\n if (isNaN(theNode.rect.y)) {\n theNode.rect.y = 0;\n }\n\n if (children_of_children != null && children_of_children.length > 0) {\n var theNewGraph = void 0;\n theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode);\n processChildrenList(theNewGraph, children_of_children, layout, options);\n }\n }\n };\n\n // transfer cytoscape edges to cose edges\n var processEdges = function processEdges(layout, gm, edges) {\n var idealLengthTotal = 0;\n var edgeCount = 0;\n for (var i = 0; i < edges.length; i++) {\n var edge = edges[i];\n var sourceNode = idToLNode[edge.data(\"source\")];\n var targetNode = idToLNode[edge.data(\"target\")];\n if (sourceNode && targetNode && sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) {\n var e1 = gm.add(layout.newEdge(), sourceNode, targetNode);\n e1.id = edge.id();\n e1.idealLength = optFn(options.idealEdgeLength, edge);\n e1.edgeElasticity = optFn(options.edgeElasticity, edge);\n idealLengthTotal += e1.idealLength;\n edgeCount++;\n }\n }\n // we need to update the ideal edge length constant with the avg. ideal length value after processing edges\n // in case there is no edge, use other options\n if (options.idealEdgeLength != null) {\n if (edgeCount > 0) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = idealLengthTotal / edgeCount;else if (!isFn(options.idealEdgeLength)) // in case there is no edge, but option gives a value to use\n CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength;else // in case there is no edge and we cannot get a value from option (because it's a function)\n CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50;\n // we need to update these constant values based on the ideal edge length constant\n CoSEConstants.MIN_REPULSION_DIST = FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0;\n CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH;\n }\n };\n\n // transfer cytoscape constraints to cose layout\n var processConstraints = function processConstraints(layout, options) {\n // get nodes to be fixed\n if (options.fixedNodeConstraint) {\n layout.constraints[\"fixedNodeConstraint\"] = options.fixedNodeConstraint;\n }\n // get nodes to be aligned\n if (options.alignmentConstraint) {\n layout.constraints[\"alignmentConstraint\"] = options.alignmentConstraint;\n }\n // get nodes to be relatively placed\n if (options.relativePlacementConstraint) {\n layout.constraints[\"relativePlacementConstraint\"] = options.relativePlacementConstraint;\n }\n };\n\n /**** Apply postprocessing ****/\n if (options.nestingFactor != null) CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor;\n if (options.gravity != null) CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity;\n if (options.numIter != null) CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter;\n if (options.gravityRange != null) CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange;\n if (options.gravityCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound;\n if (options.gravityRangeCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound;\n if (options.initialEnergyOnIncremental != null) CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental;\n\n if (options.tilingCompareBy != null) CoSEConstants.TILING_COMPARE_BY = options.tilingCompareBy;\n\n if (options.quality == 'proof') LayoutConstants.QUALITY = 2;else LayoutConstants.QUALITY = 0;\n\n CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels;\n CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize;\n CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate;\n CoSEConstants.TILE = options.tile;\n CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical;\n CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal;\n\n CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = true;\n CoSEConstants.PURE_INCREMENTAL = !options.randomize;\n LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = options.uniformNodeDimensions;\n\n // This part is for debug/demo purpose\n if (options.step == \"transformed\") {\n CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;\n CoSEConstants.ENFORCE_CONSTRAINTS = false;\n CoSEConstants.APPLY_LAYOUT = false;\n }\n if (options.step == \"enforced\") {\n CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;\n CoSEConstants.ENFORCE_CONSTRAINTS = true;\n CoSEConstants.APPLY_LAYOUT = false;\n }\n if (options.step == \"cose\") {\n CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;\n CoSEConstants.ENFORCE_CONSTRAINTS = false;\n CoSEConstants.APPLY_LAYOUT = true;\n }\n if (options.step == \"all\") {\n if (options.randomize) CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;else CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false;\n CoSEConstants.ENFORCE_CONSTRAINTS = true;\n CoSEConstants.APPLY_LAYOUT = true;\n }\n\n if (options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint) {\n CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false;\n } else {\n CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true;\n }\n\n var coseLayout = new CoSELayout();\n var gm = coseLayout.newGraphManager();\n\n processChildrenList(gm.addRoot(), aux.getTopMostNodes(nodes), coseLayout, options);\n processEdges(coseLayout, gm, edges);\n processConstraints(coseLayout, options);\n\n coseLayout.runLayout();\n\n return idToLNode;\n};\n\nmodule.exports = { coseLayout: coseLayout };\n\n/***/ }),\n\n/***/ 212:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n The implementation of the fcose layout algorithm\n*/\n\nvar assign = __webpack_require__(658);\nvar aux = __webpack_require__(548);\n\nvar _require = __webpack_require__(657),\n spectralLayout = _require.spectralLayout;\n\nvar _require2 = __webpack_require__(816),\n coseLayout = _require2.coseLayout;\n\nvar defaults = Object.freeze({\n\n // 'draft', 'default' or 'proof' \n // - 'draft' only applies spectral layout \n // - 'default' improves the quality with subsequent CoSE layout (fast cooling rate)\n // - 'proof' improves the quality with subsequent CoSE layout (slow cooling rate) \n quality: \"default\",\n // Use random node positions at beginning of layout\n // if this is set to false, then quality option must be \"proof\"\n randomize: true,\n // Whether or not to animate the layout\n animate: true,\n // Duration of animation in ms, if enabled\n animationDuration: 1000,\n // Easing of animation, if enabled\n animationEasing: undefined,\n // Fit the viewport to the repositioned nodes\n fit: true,\n // Padding around layout\n padding: 30,\n // Whether to include labels in node dimensions. Valid in \"proof\" quality\n nodeDimensionsIncludeLabels: false,\n // Whether or not simple nodes (non-compound nodes) are of uniform dimensions\n uniformNodeDimensions: false,\n // Whether to pack disconnected components - valid only if randomize: true\n packComponents: true,\n // Layout step - all, transformed, enforced, cose - for debug purpose only\n step: \"all\",\n\n /* spectral layout options */\n\n // False for random, true for greedy\n samplingType: true,\n // Sample size to construct distance matrix\n sampleSize: 25,\n // Separation amount between nodes\n nodeSeparation: 75,\n // Power iteration tolerance\n piTol: 0.0000001,\n\n /* CoSE layout options */\n\n // Node repulsion (non overlapping) multiplier\n nodeRepulsion: function nodeRepulsion(node) {\n return 4500;\n },\n // Ideal edge (non nested) length\n idealEdgeLength: function idealEdgeLength(edge) {\n return 50;\n },\n // Divisor to compute edge forces\n edgeElasticity: function edgeElasticity(edge) {\n return 0.45;\n },\n // Nesting factor (multiplier) to compute ideal edge length for nested edges\n nestingFactor: 0.1,\n // Gravity force (constant)\n gravity: 0.25,\n // Maximum number of iterations to perform\n numIter: 2500,\n // For enabling tiling\n tile: true,\n // The function that specifies the criteria for comparing nodes while sorting them during tiling operation.\n // Takes the node id as a parameter and the default tiling operation is perfomed when this option is not set.\n tilingCompareBy: undefined,\n // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)\n tilingPaddingVertical: 10,\n // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)\n tilingPaddingHorizontal: 10,\n // Gravity range (constant) for compounds\n gravityRangeCompound: 1.5,\n // Gravity force (constant) for compounds\n gravityCompound: 1.0,\n // Gravity range (constant)\n gravityRange: 3.8,\n // Initial cooling factor for incremental layout \n initialEnergyOnIncremental: 0.3,\n\n /* constraint options */\n\n // Fix required nodes to predefined positions\n // [{nodeId: 'n1', position: {x: 100, y: 200}, {...}]\n fixedNodeConstraint: undefined,\n // Align required nodes in vertical/horizontal direction\n // {vertical: [['n1', 'n2')], ['n3', 'n4']], horizontal: ['n2', 'n4']}\n alignmentConstraint: undefined,\n // Place two nodes relatively in vertical/horizontal direction \n // [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}]\n relativePlacementConstraint: undefined,\n\n /* layout event callbacks */\n ready: function ready() {}, // on layoutready\n stop: function stop() {} // on layoutstop\n});\n\nvar Layout = function () {\n function Layout(options) {\n _classCallCheck(this, Layout);\n\n this.options = assign({}, defaults, options);\n }\n\n _createClass(Layout, [{\n key: 'run',\n value: function run() {\n var layout = this;\n var options = this.options;\n var cy = options.cy;\n var eles = options.eles;\n\n var spectralResult = [];\n var xCoords = void 0;\n var yCoords = void 0;\n var coseResult = [];\n var components = void 0;\n var componentCenters = [];\n\n // basic validity check for constraint inputs \n if (options.fixedNodeConstraint && (!Array.isArray(options.fixedNodeConstraint) || options.fixedNodeConstraint.length == 0)) {\n options.fixedNodeConstraint = undefined;\n }\n\n if (options.alignmentConstraint) {\n if (options.alignmentConstraint.vertical && (!Array.isArray(options.alignmentConstraint.vertical) || options.alignmentConstraint.vertical.length == 0)) {\n options.alignmentConstraint.vertical = undefined;\n }\n if (options.alignmentConstraint.horizontal && (!Array.isArray(options.alignmentConstraint.horizontal) || options.alignmentConstraint.horizontal.length == 0)) {\n options.alignmentConstraint.horizontal = undefined;\n }\n }\n\n if (options.relativePlacementConstraint && (!Array.isArray(options.relativePlacementConstraint) || options.relativePlacementConstraint.length == 0)) {\n options.relativePlacementConstraint = undefined;\n }\n\n // if any constraint exists, set some options\n var constraintExist = options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint;\n if (constraintExist) {\n // constraints work with these options\n options.tile = false;\n options.packComponents = false;\n }\n\n // decide component packing is enabled or not\n var layUtil = void 0;\n var packingEnabled = false;\n if (cy.layoutUtilities && options.packComponents) {\n layUtil = cy.layoutUtilities(\"get\");\n if (!layUtil) layUtil = cy.layoutUtilities();\n packingEnabled = true;\n }\n\n if (eles.nodes().length > 0) {\n // if packing is not enabled, perform layout on the whole graph\n if (!packingEnabled) {\n // store component center\n var boundingBox = options.eles.boundingBox();\n componentCenters.push({ x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2 });\n // apply spectral layout\n if (options.randomize) {\n var result = spectralLayout(options);\n spectralResult.push(result);\n }\n // apply cose layout as postprocessing\n if (options.quality == \"default\" || options.quality == \"proof\") {\n coseResult.push(coseLayout(options, spectralResult[0]));\n aux.relocateComponent(componentCenters[0], coseResult[0], options); // relocate center to original position\n } else {\n aux.relocateComponent(componentCenters[0], spectralResult[0], options); // relocate center to original position\n }\n } else {\n // packing is enabled\n var topMostNodes = aux.getTopMostNodes(options.eles.nodes());\n components = aux.connectComponents(cy, options.eles, topMostNodes);\n // store component centers\n components.forEach(function (component) {\n var boundingBox = component.boundingBox();\n componentCenters.push({ x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2 });\n });\n\n //send each component to spectral layout if randomized\n if (options.randomize) {\n components.forEach(function (component) {\n options.eles = component;\n spectralResult.push(spectralLayout(options));\n });\n }\n\n if (options.quality == \"default\" || options.quality == \"proof\") {\n var toBeTiledNodes = cy.collection();\n if (options.tile) {\n // behave nodes to be tiled as one component\n var nodeIndexes = new Map();\n var _xCoords = [];\n var _yCoords = [];\n var count = 0;\n var tempSpectralResult = { nodeIndexes: nodeIndexes, xCoords: _xCoords, yCoords: _yCoords };\n var indexesToBeDeleted = [];\n components.forEach(function (component, index) {\n if (component.edges().length == 0) {\n component.nodes().forEach(function (node, i) {\n toBeTiledNodes.merge(component.nodes()[i]);\n if (!node.isParent()) {\n tempSpectralResult.nodeIndexes.set(component.nodes()[i].id(), count++);\n tempSpectralResult.xCoords.push(component.nodes()[0].position().x);\n tempSpectralResult.yCoords.push(component.nodes()[0].position().y);\n }\n });\n indexesToBeDeleted.push(index);\n }\n });\n if (toBeTiledNodes.length > 1) {\n var _boundingBox = toBeTiledNodes.boundingBox();\n componentCenters.push({ x: _boundingBox.x1 + _boundingBox.w / 2, y: _boundingBox.y1 + _boundingBox.h / 2 });\n components.push(toBeTiledNodes);\n spectralResult.push(tempSpectralResult);\n for (var i = indexesToBeDeleted.length - 1; i >= 0; i--) {\n components.splice(indexesToBeDeleted[i], 1);\n spectralResult.splice(indexesToBeDeleted[i], 1);\n componentCenters.splice(indexesToBeDeleted[i], 1);\n };\n }\n }\n components.forEach(function (component, index) {\n // send each component to cose layout\n options.eles = component;\n coseResult.push(coseLayout(options, spectralResult[index]));\n aux.relocateComponent(componentCenters[index], coseResult[index], options); // relocate center to original position\n });\n } else {\n components.forEach(function (component, index) {\n aux.relocateComponent(componentCenters[index], spectralResult[index], options); // relocate center to original position\n });\n }\n\n // packing\n var componentsEvaluated = new Set();\n if (components.length > 1) {\n var subgraphs = [];\n var hiddenEles = eles.filter(function (ele) {\n return ele.css('display') == 'none';\n });\n components.forEach(function (component, index) {\n var nodeIndexes = void 0;\n if (options.quality == \"draft\") {\n nodeIndexes = spectralResult[index].nodeIndexes;\n }\n\n if (component.nodes().not(hiddenEles).length > 0) {\n var subgraph = {};\n subgraph.edges = [];\n subgraph.nodes = [];\n var nodeIndex = void 0;\n component.nodes().not(hiddenEles).forEach(function (node) {\n if (options.quality == \"draft\") {\n if (!node.isParent()) {\n nodeIndex = nodeIndexes.get(node.id());\n subgraph.nodes.push({ x: spectralResult[index].xCoords[nodeIndex] - node.boundingbox().w / 2, y: spectralResult[index].yCoords[nodeIndex] - node.boundingbox().h / 2, width: node.boundingbox().w, height: node.boundingbox().h });\n } else {\n var parentInfo = aux.calcBoundingBox(node, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes);\n subgraph.nodes.push({ x: parentInfo.topLeftX, y: parentInfo.topLeftY, width: parentInfo.width, height: parentInfo.height });\n }\n } else {\n if (coseResult[index][node.id()]) {\n subgraph.nodes.push({ x: coseResult[index][node.id()].getLeft(), y: coseResult[index][node.id()].getTop(), width: coseResult[index][node.id()].getWidth(), height: coseResult[index][node.id()].getHeight() });\n }\n }\n });\n component.edges().forEach(function (edge) {\n var source = edge.source();\n var target = edge.target();\n if (source.css(\"display\") != \"none\" && target.css(\"display\") != \"none\") {\n if (options.quality == \"draft\") {\n var sourceNodeIndex = nodeIndexes.get(source.id());\n var targetNodeIndex = nodeIndexes.get(target.id());\n var sourceCenter = [];\n var targetCenter = [];\n if (source.isParent()) {\n var parentInfo = aux.calcBoundingBox(source, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes);\n sourceCenter.push(parentInfo.topLeftX + parentInfo.width / 2);\n sourceCenter.push(parentInfo.topLeftY + parentInfo.height / 2);\n } else {\n sourceCenter.push(spectralResult[index].xCoords[sourceNodeIndex]);\n sourceCenter.push(spectralResult[index].yCoords[sourceNodeIndex]);\n }\n if (target.isParent()) {\n var _parentInfo = aux.calcBoundingBox(target, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes);\n targetCenter.push(_parentInfo.topLeftX + _parentInfo.width / 2);\n targetCenter.push(_parentInfo.topLeftY + _parentInfo.height / 2);\n } else {\n targetCenter.push(spectralResult[index].xCoords[targetNodeIndex]);\n targetCenter.push(spectralResult[index].yCoords[targetNodeIndex]);\n }\n subgraph.edges.push({ startX: sourceCenter[0], startY: sourceCenter[1], endX: targetCenter[0], endY: targetCenter[1] });\n } else {\n if (coseResult[index][source.id()] && coseResult[index][target.id()]) {\n subgraph.edges.push({ startX: coseResult[index][source.id()].getCenterX(), startY: coseResult[index][source.id()].getCenterY(), endX: coseResult[index][target.id()].getCenterX(), endY: coseResult[index][target.id()].getCenterY() });\n }\n }\n }\n });\n if (subgraph.nodes.length > 0) {\n subgraphs.push(subgraph);\n componentsEvaluated.add(index);\n }\n }\n });\n var shiftResult = layUtil.packComponents(subgraphs, options.randomize).shifts;\n if (options.quality == \"draft\") {\n spectralResult.forEach(function (result, index) {\n var newXCoords = result.xCoords.map(function (x) {\n return x + shiftResult[index].dx;\n });\n var newYCoords = result.yCoords.map(function (y) {\n return y + shiftResult[index].dy;\n });\n result.xCoords = newXCoords;\n result.yCoords = newYCoords;\n });\n } else {\n var _count = 0;\n componentsEvaluated.forEach(function (index) {\n Object.keys(coseResult[index]).forEach(function (item) {\n var nodeRectangle = coseResult[index][item];\n nodeRectangle.setCenter(nodeRectangle.getCenterX() + shiftResult[_count].dx, nodeRectangle.getCenterY() + shiftResult[_count].dy);\n });\n _count++;\n });\n }\n }\n }\n }\n\n // get each element's calculated position\n var getPositions = function getPositions(ele, i) {\n if (options.quality == \"default\" || options.quality == \"proof\") {\n if (typeof ele === \"number\") {\n ele = i;\n }\n var pos = void 0;\n var node = void 0;\n var theId = ele.data('id');\n coseResult.forEach(function (result) {\n if (theId in result) {\n pos = { x: result[theId].getRect().getCenterX(), y: result[theId].getRect().getCenterY() };\n node = result[theId];\n }\n });\n if (options.nodeDimensionsIncludeLabels) {\n if (node.labelWidth) {\n if (node.labelPosHorizontal == \"left\") {\n pos.x += node.labelWidth / 2;\n } else if (node.labelPosHorizontal == \"right\") {\n pos.x -= node.labelWidth / 2;\n }\n }\n if (node.labelHeight) {\n if (node.labelPosVertical == \"top\") {\n pos.y += node.labelHeight / 2;\n } else if (node.labelPosVertical == \"bottom\") {\n pos.y -= node.labelHeight / 2;\n }\n }\n }\n if (pos == undefined) pos = { x: ele.position(\"x\"), y: ele.position(\"y\") };\n return {\n x: pos.x,\n y: pos.y\n };\n } else {\n var _pos = void 0;\n spectralResult.forEach(function (result) {\n var index = result.nodeIndexes.get(ele.id());\n if (index != undefined) {\n _pos = { x: result.xCoords[index], y: result.yCoords[index] };\n }\n });\n if (_pos == undefined) _pos = { x: ele.position(\"x\"), y: ele.position(\"y\") };\n return {\n x: _pos.x,\n y: _pos.y\n };\n }\n };\n\n // quality = \"draft\" and randomize = false are contradictive so in that case positions don't change\n if (options.quality == \"default\" || options.quality == \"proof\" || options.randomize) {\n // transfer calculated positions to nodes (positions of only simple nodes are evaluated, compounds are positioned automatically)\n var parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles);\n var _hiddenEles = eles.filter(function (ele) {\n return ele.css('display') == 'none';\n });\n options.eles = eles.not(_hiddenEles);\n\n eles.nodes().not(\":parent\").not(_hiddenEles).layoutPositions(layout, options, getPositions);\n\n if (parentsWithoutChildren.length > 0) {\n parentsWithoutChildren.forEach(function (ele) {\n ele.position(getPositions(ele));\n });\n }\n } else {\n console.log(\"If randomize option is set to false, then quality option must be 'default' or 'proof'.\");\n }\n }\n }]);\n\n return Layout;\n}();\n\nmodule.exports = Layout;\n\n/***/ }),\n\n/***/ 657:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\n/**\n The implementation of the spectral layout that is the first part of the fcose layout algorithm\n*/\n\nvar aux = __webpack_require__(548);\nvar Matrix = __webpack_require__(140).layoutBase.Matrix;\nvar SVD = __webpack_require__(140).layoutBase.SVD;\n\n// main function that spectral layout is processed\nvar spectralLayout = function spectralLayout(options) {\n\n var cy = options.cy;\n var eles = options.eles;\n var nodes = eles.nodes();\n var parentNodes = eles.nodes(\":parent\");\n\n var dummyNodes = new Map(); // map to keep dummy nodes and their neighbors\n var nodeIndexes = new Map(); // map to keep indexes to nodes\n var parentChildMap = new Map(); // mapping btw. compound and its representative node \n var allNodesNeighborhood = []; // array to keep neighborhood of all nodes\n var xCoords = [];\n var yCoords = [];\n\n var samplesColumn = []; // sampled vertices\n var minDistancesColumn = [];\n var C = []; // column sampling matrix\n var PHI = []; // intersection of column and row sampling matrices \n var INV = []; // inverse of PHI \n\n var firstSample = void 0; // the first sampled node\n var nodeSize = void 0;\n\n var infinity = 100000000;\n var small = 0.000000001;\n\n var piTol = options.piTol;\n var samplingType = options.samplingType; // false for random, true for greedy\n var nodeSeparation = options.nodeSeparation;\n var sampleSize = void 0;\n\n /**** Spectral-preprocessing functions ****/\n\n /**** Spectral layout functions ****/\n\n // determine which columns to be sampled\n var randomSampleCR = function randomSampleCR() {\n var sample = 0;\n var count = 0;\n var flag = false;\n\n while (count < sampleSize) {\n sample = Math.floor(Math.random() * nodeSize);\n\n flag = false;\n for (var i = 0; i < count; i++) {\n if (samplesColumn[i] == sample) {\n flag = true;\n break;\n }\n }\n\n if (!flag) {\n samplesColumn[count] = sample;\n count++;\n } else {\n continue;\n }\n }\n };\n\n // takes the index of the node(pivot) to initiate BFS as a parameter\n var BFS = function BFS(pivot, index, samplingMethod) {\n var path = []; // the front of the path\n var front = 0; // the back of the path\n var back = 0;\n var current = 0;\n var temp = void 0;\n var distance = [];\n\n var max_dist = 0; // the furthest node to be returned\n var max_ind = 1;\n\n for (var i = 0; i < nodeSize; i++) {\n distance[i] = infinity;\n }\n\n path[back] = pivot;\n distance[pivot] = 0;\n\n while (back >= front) {\n current = path[front++];\n var neighbors = allNodesNeighborhood[current];\n for (var _i = 0; _i < neighbors.length; _i++) {\n temp = nodeIndexes.get(neighbors[_i]);\n if (distance[temp] == infinity) {\n distance[temp] = distance[current] + 1;\n path[++back] = temp;\n }\n }\n C[current][index] = distance[current] * nodeSeparation;\n }\n\n if (samplingMethod) {\n for (var _i2 = 0; _i2 < nodeSize; _i2++) {\n if (C[_i2][index] < minDistancesColumn[_i2]) minDistancesColumn[_i2] = C[_i2][index];\n }\n\n for (var _i3 = 0; _i3 < nodeSize; _i3++) {\n if (minDistancesColumn[_i3] > max_dist) {\n max_dist = minDistancesColumn[_i3];\n max_ind = _i3;\n }\n }\n }\n return max_ind;\n };\n\n // apply BFS to all nodes or selected samples\n var allBFS = function allBFS(samplingMethod) {\n\n var sample = void 0;\n\n if (!samplingMethod) {\n randomSampleCR();\n\n // call BFS\n for (var i = 0; i < sampleSize; i++) {\n BFS(samplesColumn[i], i, samplingMethod, false);\n }\n } else {\n sample = Math.floor(Math.random() * nodeSize);\n firstSample = sample;\n\n for (var _i4 = 0; _i4 < nodeSize; _i4++) {\n minDistancesColumn[_i4] = infinity;\n }\n\n for (var _i5 = 0; _i5 < sampleSize; _i5++) {\n samplesColumn[_i5] = sample;\n sample = BFS(sample, _i5, samplingMethod);\n }\n }\n\n // form the squared distances for C\n for (var _i6 = 0; _i6 < nodeSize; _i6++) {\n for (var j = 0; j < sampleSize; j++) {\n C[_i6][j] *= C[_i6][j];\n }\n }\n\n // form PHI\n for (var _i7 = 0; _i7 < sampleSize; _i7++) {\n PHI[_i7] = [];\n }\n\n for (var _i8 = 0; _i8 < sampleSize; _i8++) {\n for (var _j = 0; _j < sampleSize; _j++) {\n PHI[_i8][_j] = C[samplesColumn[_j]][_i8];\n }\n }\n };\n\n // perform the SVD algorithm and apply a regularization step\n var sample = function sample() {\n\n var SVDResult = SVD.svd(PHI);\n\n var a_q = SVDResult.S;\n var a_u = SVDResult.U;\n var a_v = SVDResult.V;\n\n var max_s = a_q[0] * a_q[0] * a_q[0];\n\n var a_Sig = [];\n\n // regularization\n for (var i = 0; i < sampleSize; i++) {\n a_Sig[i] = [];\n for (var j = 0; j < sampleSize; j++) {\n a_Sig[i][j] = 0;\n if (i == j) {\n a_Sig[i][j] = a_q[i] / (a_q[i] * a_q[i] + max_s / (a_q[i] * a_q[i]));\n }\n }\n }\n\n INV = Matrix.multMat(Matrix.multMat(a_v, a_Sig), Matrix.transpose(a_u));\n };\n\n // calculate final coordinates \n var powerIteration = function powerIteration() {\n // two largest eigenvalues\n var theta1 = void 0;\n var theta2 = void 0;\n\n // initial guesses for eigenvectors\n var Y1 = [];\n var Y2 = [];\n\n var V1 = [];\n var V2 = [];\n\n for (var i = 0; i < nodeSize; i++) {\n Y1[i] = Math.random();\n Y2[i] = Math.random();\n }\n\n Y1 = Matrix.normalize(Y1);\n Y2 = Matrix.normalize(Y2);\n\n var count = 0;\n // to keep track of the improvement ratio in power iteration\n var current = small;\n var previous = small;\n\n var temp = void 0;\n\n while (true) {\n count++;\n\n for (var _i9 = 0; _i9 < nodeSize; _i9++) {\n V1[_i9] = Y1[_i9];\n }\n\n Y1 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V1), C, INV));\n theta1 = Matrix.dotProduct(V1, Y1);\n Y1 = Matrix.normalize(Y1);\n\n current = Matrix.dotProduct(V1, Y1);\n\n temp = Math.abs(current / previous);\n\n if (temp <= 1 + piTol && temp >= 1) {\n break;\n }\n\n previous = current;\n }\n\n for (var _i10 = 0; _i10 < nodeSize; _i10++) {\n V1[_i10] = Y1[_i10];\n }\n\n count = 0;\n previous = small;\n while (true) {\n count++;\n\n for (var _i11 = 0; _i11 < nodeSize; _i11++) {\n V2[_i11] = Y2[_i11];\n }\n\n V2 = Matrix.minusOp(V2, Matrix.multCons(V1, Matrix.dotProduct(V1, V2)));\n Y2 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V2), C, INV));\n theta2 = Matrix.dotProduct(V2, Y2);\n Y2 = Matrix.normalize(Y2);\n\n current = Matrix.dotProduct(V2, Y2);\n\n temp = Math.abs(current / previous);\n\n if (temp <= 1 + piTol && temp >= 1) {\n break;\n }\n\n previous = current;\n }\n\n for (var _i12 = 0; _i12 < nodeSize; _i12++) {\n V2[_i12] = Y2[_i12];\n }\n\n // theta1 now contains dominant eigenvalue\n // theta2 now contains the second-largest eigenvalue\n // V1 now contains theta1's eigenvector\n // V2 now contains theta2's eigenvector\n\n //populate the two vectors\n xCoords = Matrix.multCons(V1, Math.sqrt(Math.abs(theta1)));\n yCoords = Matrix.multCons(V2, Math.sqrt(Math.abs(theta2)));\n };\n\n /**** Preparation for spectral layout (Preprocessing) ****/\n\n // connect disconnected components (first top level, then inside of each compound node)\n aux.connectComponents(cy, eles, aux.getTopMostNodes(nodes), dummyNodes);\n\n parentNodes.forEach(function (ele) {\n aux.connectComponents(cy, eles, aux.getTopMostNodes(ele.descendants().intersection(eles)), dummyNodes);\n });\n\n // assign indexes to nodes (first real, then dummy nodes)\n var index = 0;\n for (var i = 0; i < nodes.length; i++) {\n if (!nodes[i].isParent()) {\n nodeIndexes.set(nodes[i].id(), index++);\n }\n }\n\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = dummyNodes.keys()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n\n nodeIndexes.set(key, index++);\n }\n\n // instantiate the neighborhood matrix\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n for (var _i13 = 0; _i13 < nodeIndexes.size; _i13++) {\n allNodesNeighborhood[_i13] = [];\n }\n\n // form a parent-child map to keep representative node of each compound node \n parentNodes.forEach(function (ele) {\n var children = ele.children().intersection(eles);\n\n // let random = 0;\n while (children.nodes(\":childless\").length == 0) {\n // random = Math.floor(Math.random() * children.nodes().length); // if all children are compound then proceed randomly\n children = children.nodes()[0].children().intersection(eles);\n }\n // select the representative node - we can apply different methods here\n // random = Math.floor(Math.random() * children.nodes(\":childless\").length);\n var index = 0;\n var min = children.nodes(\":childless\")[0].connectedEdges().length;\n children.nodes(\":childless\").forEach(function (ele2, i) {\n if (ele2.connectedEdges().length < min) {\n min = ele2.connectedEdges().length;\n index = i;\n }\n });\n parentChildMap.set(ele.id(), children.nodes(\":childless\")[index].id());\n });\n\n // add neighborhood relations (first real, then dummy nodes)\n nodes.forEach(function (ele) {\n var eleIndex = void 0;\n\n if (ele.isParent()) eleIndex = nodeIndexes.get(parentChildMap.get(ele.id()));else eleIndex = nodeIndexes.get(ele.id());\n\n ele.neighborhood().nodes().forEach(function (node) {\n if (eles.intersection(ele.edgesWith(node)).length > 0) {\n if (node.isParent()) allNodesNeighborhood[eleIndex].push(parentChildMap.get(node.id()));else allNodesNeighborhood[eleIndex].push(node.id());\n }\n });\n });\n\n var _loop = function _loop(_key) {\n var eleIndex = nodeIndexes.get(_key);\n var disconnectedId = void 0;\n dummyNodes.get(_key).forEach(function (id) {\n if (cy.getElementById(id).isParent()) disconnectedId = parentChildMap.get(id);else disconnectedId = id;\n\n allNodesNeighborhood[eleIndex].push(disconnectedId);\n allNodesNeighborhood[nodeIndexes.get(disconnectedId)].push(_key);\n });\n };\n\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = dummyNodes.keys()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var _key = _step2.value;\n\n _loop(_key);\n }\n\n // nodeSize now only considers the size of transformed graph\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n\n nodeSize = nodeIndexes.size;\n\n var spectralResult = void 0;\n\n // If number of nodes in transformed graph is 1 or 2, either SVD or powerIteration causes problem\n // So skip spectral and layout the graph with cose\n if (nodeSize > 2) {\n // if # of nodes in transformed graph is smaller than sample size,\n // then use # of nodes as sample size\n sampleSize = nodeSize < options.sampleSize ? nodeSize : options.sampleSize;\n\n // instantiates the partial matrices that will be used in spectral layout\n for (var _i14 = 0; _i14 < nodeSize; _i14++) {\n C[_i14] = [];\n }\n for (var _i15 = 0; _i15 < sampleSize; _i15++) {\n INV[_i15] = [];\n }\n\n /**** Apply spectral layout ****/\n\n if (options.quality == \"draft\" || options.step == \"all\") {\n allBFS(samplingType);\n sample();\n powerIteration();\n\n spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords };\n } else {\n nodeIndexes.forEach(function (value, key) {\n xCoords.push(cy.getElementById(key).position(\"x\"));\n yCoords.push(cy.getElementById(key).position(\"y\"));\n });\n spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords };\n }\n return spectralResult;\n } else {\n var iterator = nodeIndexes.keys();\n var firstNode = cy.getElementById(iterator.next().value);\n var firstNodePos = firstNode.position();\n var firstNodeWidth = firstNode.outerWidth();\n xCoords.push(firstNodePos.x);\n yCoords.push(firstNodePos.y);\n if (nodeSize == 2) {\n var secondNode = cy.getElementById(iterator.next().value);\n var secondNodeWidth = secondNode.outerWidth();\n xCoords.push(firstNodePos.x + firstNodeWidth / 2 + secondNodeWidth / 2 + options.idealEdgeLength);\n yCoords.push(firstNodePos.y);\n }\n\n spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords };\n return spectralResult;\n }\n};\n\nmodule.exports = { spectralLayout: spectralLayout };\n\n/***/ }),\n\n/***/ 579:\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\n\nvar impl = __webpack_require__(212);\n\n// registers the extension on a cytoscape lib ref\nvar register = function register(cytoscape) {\n if (!cytoscape) {\n return;\n } // can't register if cytoscape unspecified\n\n cytoscape('layout', 'fcose', impl); // register with cytoscape.js\n};\n\nif (typeof cytoscape !== 'undefined') {\n // expose to global cytoscape (i.e. window.cytoscape)\n register(cytoscape);\n}\n\nmodule.exports = register;\n\n/***/ }),\n\n/***/ 140:\n/***/ ((module) => {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__140__;\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module is referenced by other modules so it can't be inlined\n/******/ \tvar __webpack_exports__ = __webpack_require__(579);\n/******/ \t\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});", "import {\n selectSvgElement\n} from \"./chunk-WU5MYG2G.mjs\";\nimport {\n createText,\n getIconSVG,\n registerIconPacks,\n unknownIcon\n} from \"./chunk-O5CBEL6O.mjs\";\nimport {\n populateCommonDb\n} from \"./chunk-4BX2VUAB.mjs\";\nimport {\n cleanAndMerge,\n getEdgeId\n} from \"./chunk-5ZQYHXKU.mjs\";\nimport {\n clear,\n defaultConfig_default,\n getAccDescription,\n getAccTitle,\n getConfig,\n getConfig2,\n getDiagramTitle,\n sanitizeText,\n setAccDescription,\n setAccTitle,\n setDiagramTitle,\n setupGraphViewbox\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/architecture/architectureParser.ts\nimport { parse } from \"@mermaid-js/parser\";\n\n// src/diagrams/architecture/architectureTypes.ts\nvar ArchitectureDirectionName = {\n L: \"left\",\n R: \"right\",\n T: \"top\",\n B: \"bottom\"\n};\nvar ArchitectureDirectionArrow = {\n L: /* @__PURE__ */ __name((scale) => `${scale},${scale / 2} 0,${scale} 0,0`, \"L\"),\n R: /* @__PURE__ */ __name((scale) => `0,${scale / 2} ${scale},0 ${scale},${scale}`, \"R\"),\n T: /* @__PURE__ */ __name((scale) => `0,0 ${scale},0 ${scale / 2},${scale}`, \"T\"),\n B: /* @__PURE__ */ __name((scale) => `${scale / 2},0 ${scale},${scale} 0,${scale}`, \"B\")\n};\nvar ArchitectureDirectionArrowShift = {\n L: /* @__PURE__ */ __name((orig, arrowSize) => orig - arrowSize + 2, \"L\"),\n R: /* @__PURE__ */ __name((orig, _arrowSize) => orig - 2, \"R\"),\n T: /* @__PURE__ */ __name((orig, arrowSize) => orig - arrowSize + 2, \"T\"),\n B: /* @__PURE__ */ __name((orig, _arrowSize) => orig - 2, \"B\")\n};\nvar getOppositeArchitectureDirection = /* @__PURE__ */ __name(function(x) {\n if (isArchitectureDirectionX(x)) {\n return x === \"L\" ? \"R\" : \"L\";\n } else {\n return x === \"T\" ? \"B\" : \"T\";\n }\n}, \"getOppositeArchitectureDirection\");\nvar isArchitectureDirection = /* @__PURE__ */ __name(function(x) {\n const temp = x;\n return temp === \"L\" || temp === \"R\" || temp === \"T\" || temp === \"B\";\n}, \"isArchitectureDirection\");\nvar isArchitectureDirectionX = /* @__PURE__ */ __name(function(x) {\n const temp = x;\n return temp === \"L\" || temp === \"R\";\n}, \"isArchitectureDirectionX\");\nvar isArchitectureDirectionY = /* @__PURE__ */ __name(function(x) {\n const temp = x;\n return temp === \"T\" || temp === \"B\";\n}, \"isArchitectureDirectionY\");\nvar isArchitectureDirectionXY = /* @__PURE__ */ __name(function(a, b) {\n const aX_bY = isArchitectureDirectionX(a) && isArchitectureDirectionY(b);\n const aY_bX = isArchitectureDirectionY(a) && isArchitectureDirectionX(b);\n return aX_bY || aY_bX;\n}, \"isArchitectureDirectionXY\");\nvar isArchitecturePairXY = /* @__PURE__ */ __name(function(pair) {\n const lhs = pair[0];\n const rhs = pair[1];\n const aX_bY = isArchitectureDirectionX(lhs) && isArchitectureDirectionY(rhs);\n const aY_bX = isArchitectureDirectionY(lhs) && isArchitectureDirectionX(rhs);\n return aX_bY || aY_bX;\n}, \"isArchitecturePairXY\");\nvar isValidArchitectureDirectionPair = /* @__PURE__ */ __name(function(x) {\n return x !== \"LL\" && x !== \"RR\" && x !== \"TT\" && x !== \"BB\";\n}, \"isValidArchitectureDirectionPair\");\nvar getArchitectureDirectionPair = /* @__PURE__ */ __name(function(sourceDir, targetDir) {\n const pair = `${sourceDir}${targetDir}`;\n return isValidArchitectureDirectionPair(pair) ? pair : void 0;\n}, \"getArchitectureDirectionPair\");\nvar shiftPositionByArchitectureDirectionPair = /* @__PURE__ */ __name(function([x, y], pair) {\n const lhs = pair[0];\n const rhs = pair[1];\n if (isArchitectureDirectionX(lhs)) {\n if (isArchitectureDirectionY(rhs)) {\n return [x + (lhs === \"L\" ? -1 : 1), y + (rhs === \"T\" ? 1 : -1)];\n } else {\n return [x + (lhs === \"L\" ? -1 : 1), y];\n }\n } else {\n if (isArchitectureDirectionX(rhs)) {\n return [x + (rhs === \"L\" ? 1 : -1), y + (lhs === \"T\" ? 1 : -1)];\n } else {\n return [x, y + (lhs === \"T\" ? 1 : -1)];\n }\n }\n}, \"shiftPositionByArchitectureDirectionPair\");\nvar getArchitectureDirectionXYFactors = /* @__PURE__ */ __name(function(pair) {\n if (pair === \"LT\" || pair === \"TL\") {\n return [1, 1];\n } else if (pair === \"BL\" || pair === \"LB\") {\n return [1, -1];\n } else if (pair === \"BR\" || pair === \"RB\") {\n return [-1, -1];\n } else {\n return [-1, 1];\n }\n}, \"getArchitectureDirectionXYFactors\");\nvar getArchitectureDirectionAlignment = /* @__PURE__ */ __name(function(a, b) {\n if (isArchitectureDirectionXY(a, b)) {\n return \"bend\";\n } else if (isArchitectureDirectionX(a)) {\n return \"horizontal\";\n }\n return \"vertical\";\n}, \"getArchitectureDirectionAlignment\");\nvar isArchitectureService = /* @__PURE__ */ __name(function(x) {\n const temp = x;\n return temp.type === \"service\";\n}, \"isArchitectureService\");\nvar isArchitectureJunction = /* @__PURE__ */ __name(function(x) {\n const temp = x;\n return temp.type === \"junction\";\n}, \"isArchitectureJunction\");\nvar edgeData = /* @__PURE__ */ __name((edge) => {\n return edge.data();\n}, \"edgeData\");\nvar nodeData = /* @__PURE__ */ __name((node) => {\n return node.data();\n}, \"nodeData\");\n\n// src/diagrams/architecture/architectureDb.ts\nvar DEFAULT_ARCHITECTURE_CONFIG = defaultConfig_default.architecture;\nvar ArchitectureDB = class {\n constructor() {\n this.nodes = {};\n this.groups = {};\n this.edges = [];\n this.registeredIds = {};\n this.elements = {};\n this.diagramId = \"\";\n this.setAccTitle = setAccTitle;\n this.getAccTitle = getAccTitle;\n this.setDiagramTitle = setDiagramTitle;\n this.getDiagramTitle = getDiagramTitle;\n this.getAccDescription = getAccDescription;\n this.setAccDescription = setAccDescription;\n this.clear();\n }\n static {\n __name(this, \"ArchitectureDB\");\n }\n setDiagramId(id) {\n this.diagramId = id;\n }\n getDiagramId() {\n return this.diagramId;\n }\n clear() {\n this.nodes = {};\n this.groups = {};\n this.edges = [];\n this.registeredIds = {};\n this.dataStructures = void 0;\n this.elements = {};\n this.diagramId = \"\";\n clear();\n }\n addService({\n id,\n icon,\n in: parent,\n title,\n iconText\n }) {\n if (this.registeredIds[id] !== void 0) {\n throw new Error(\n `The service id [${id}] is already in use by another ${this.registeredIds[id]}`\n );\n }\n if (parent !== void 0) {\n if (id === parent) {\n throw new Error(`The service [${id}] cannot be placed within itself`);\n }\n if (this.registeredIds[parent] === void 0) {\n throw new Error(\n `The service [${id}]'s parent does not exist. Please make sure the parent is created before this service`\n );\n }\n if (this.registeredIds[parent] === \"node\") {\n throw new Error(`The service [${id}]'s parent is not a group`);\n }\n }\n this.registeredIds[id] = \"node\";\n this.nodes[id] = {\n id,\n type: \"service\",\n icon,\n iconText,\n title,\n edges: [],\n in: parent\n };\n }\n getServices() {\n return Object.values(this.nodes).filter(isArchitectureService);\n }\n addJunction({ id, in: parent }) {\n if (this.registeredIds[id] !== void 0) {\n throw new Error(\n `The junction id [${id}] is already in use by another ${this.registeredIds[id]}`\n );\n }\n if (parent !== void 0) {\n if (id === parent) {\n throw new Error(`The junction [${id}] cannot be placed within itself`);\n }\n if (this.registeredIds[parent] === void 0) {\n throw new Error(\n `The junction [${id}]'s parent does not exist. Please make sure the parent is created before this junction`\n );\n }\n if (this.registeredIds[parent] === \"node\") {\n throw new Error(`The junction [${id}]'s parent is not a group`);\n }\n }\n this.registeredIds[id] = \"node\";\n this.nodes[id] = {\n id,\n type: \"junction\",\n edges: [],\n in: parent\n };\n }\n getJunctions() {\n return Object.values(this.nodes).filter(isArchitectureJunction);\n }\n getNodes() {\n return Object.values(this.nodes);\n }\n getNode(id) {\n return this.nodes[id] ?? null;\n }\n addGroup({ id, icon, in: parent, title }) {\n if (this.registeredIds?.[id] !== void 0) {\n throw new Error(\n `The group id [${id}] is already in use by another ${this.registeredIds[id]}`\n );\n }\n if (parent !== void 0) {\n if (id === parent) {\n throw new Error(`The group [${id}] cannot be placed within itself`);\n }\n if (this.registeredIds?.[parent] === void 0) {\n throw new Error(\n `The group [${id}]'s parent does not exist. Please make sure the parent is created before this group`\n );\n }\n if (this.registeredIds?.[parent] === \"node\") {\n throw new Error(`The group [${id}]'s parent is not a group`);\n }\n }\n this.registeredIds[id] = \"group\";\n this.groups[id] = {\n id,\n icon,\n title,\n in: parent\n };\n }\n getGroups() {\n return Object.values(this.groups);\n }\n addEdge({\n lhsId,\n rhsId,\n lhsDir,\n rhsDir,\n lhsInto,\n rhsInto,\n lhsGroup,\n rhsGroup,\n title\n }) {\n if (!isArchitectureDirection(lhsDir)) {\n throw new Error(\n `Invalid direction given for left hand side of edge ${lhsId}--${rhsId}. Expected (L,R,T,B) got ${String(lhsDir)}`\n );\n }\n if (!isArchitectureDirection(rhsDir)) {\n throw new Error(\n `Invalid direction given for right hand side of edge ${lhsId}--${rhsId}. Expected (L,R,T,B) got ${String(rhsDir)}`\n );\n }\n if (this.nodes[lhsId] === void 0 && this.groups[lhsId] === void 0) {\n throw new Error(\n `The left-hand id [${lhsId}] does not yet exist. Please create the service/group before declaring an edge to it.`\n );\n }\n if (this.nodes[rhsId] === void 0 && this.groups[rhsId] === void 0) {\n throw new Error(\n `The right-hand id [${rhsId}] does not yet exist. Please create the service/group before declaring an edge to it.`\n );\n }\n const lhsGroupId = this.nodes[lhsId].in;\n const rhsGroupId = this.nodes[rhsId].in;\n if (lhsGroup && lhsGroupId && rhsGroupId && lhsGroupId == rhsGroupId) {\n throw new Error(\n `The left-hand id [${lhsId}] is modified to traverse the group boundary, but the edge does not pass through two groups.`\n );\n }\n if (rhsGroup && lhsGroupId && rhsGroupId && lhsGroupId == rhsGroupId) {\n throw new Error(\n `The right-hand id [${rhsId}] is modified to traverse the group boundary, but the edge does not pass through two groups.`\n );\n }\n const edge = {\n lhsId,\n lhsDir,\n lhsInto,\n lhsGroup,\n rhsId,\n rhsDir,\n rhsInto,\n rhsGroup,\n title\n };\n this.edges.push(edge);\n if (this.nodes[lhsId] && this.nodes[rhsId]) {\n this.nodes[lhsId].edges.push(this.edges[this.edges.length - 1]);\n this.nodes[rhsId].edges.push(this.edges[this.edges.length - 1]);\n }\n }\n getEdges() {\n return this.edges;\n }\n /**\n * Returns the current diagram's adjacency list, spatial map, & group alignments.\n * If they have not been created, run the algorithms to generate them.\n * @returns\n */\n getDataStructures() {\n if (this.dataStructures === void 0) {\n const groupAlignments = {};\n const adjList = Object.entries(this.nodes).reduce((prevOuter, [id, service]) => {\n prevOuter[id] = service.edges.reduce((prevInner, edge) => {\n const lhsGroupId = this.getNode(edge.lhsId)?.in;\n const rhsGroupId = this.getNode(edge.rhsId)?.in;\n if (lhsGroupId && rhsGroupId && lhsGroupId !== rhsGroupId) {\n const alignment = getArchitectureDirectionAlignment(edge.lhsDir, edge.rhsDir);\n if (alignment !== \"bend\") {\n groupAlignments[lhsGroupId] ??= {};\n groupAlignments[lhsGroupId][rhsGroupId] = alignment;\n groupAlignments[rhsGroupId] ??= {};\n groupAlignments[rhsGroupId][lhsGroupId] = alignment;\n }\n }\n if (edge.lhsId === id) {\n const pair = getArchitectureDirectionPair(edge.lhsDir, edge.rhsDir);\n if (pair) {\n prevInner[pair] = edge.rhsId;\n }\n } else {\n const pair = getArchitectureDirectionPair(edge.rhsDir, edge.lhsDir);\n if (pair) {\n prevInner[pair] = edge.lhsId;\n }\n }\n return prevInner;\n }, {});\n return prevOuter;\n }, {});\n const firstId = Object.keys(adjList)[0];\n const visited = { [firstId]: 1 };\n const notVisited = Object.keys(adjList).reduce(\n (prev, id) => id === firstId ? prev : { ...prev, [id]: 1 },\n {}\n );\n const BFS = /* @__PURE__ */ __name((startingId) => {\n const spatialMap = { [startingId]: [0, 0] };\n const queue = [startingId];\n while (queue.length > 0) {\n const id = queue.shift();\n if (id) {\n visited[id] = 1;\n delete notVisited[id];\n const adj = adjList[id];\n const [posX, posY] = spatialMap[id];\n Object.entries(adj).forEach(([dir, rhsId]) => {\n if (!visited[rhsId]) {\n spatialMap[rhsId] = shiftPositionByArchitectureDirectionPair(\n [posX, posY],\n dir\n );\n queue.push(rhsId);\n }\n });\n }\n }\n return spatialMap;\n }, \"BFS\");\n const spatialMaps = [BFS(firstId)];\n while (Object.keys(notVisited).length > 0) {\n spatialMaps.push(BFS(Object.keys(notVisited)[0]));\n }\n this.dataStructures = {\n adjList,\n spatialMaps,\n groupAlignments\n };\n }\n return this.dataStructures;\n }\n setElementForId(id, element) {\n this.elements[id] = element;\n }\n getElementById(id) {\n return this.elements[id];\n }\n getConfig() {\n return cleanAndMerge({\n ...DEFAULT_ARCHITECTURE_CONFIG,\n ...getConfig().architecture\n });\n }\n getConfigField(field) {\n return this.getConfig()[field];\n }\n};\n\n// src/diagrams/architecture/architectureParser.ts\nvar populateDb = /* @__PURE__ */ __name((ast, db) => {\n populateCommonDb(ast, db);\n ast.groups.map((group) => db.addGroup(group));\n ast.services.map((service) => db.addService({ ...service, type: \"service\" }));\n ast.junctions.map((service) => db.addJunction({ ...service, type: \"junction\" }));\n ast.edges.map((edge) => db.addEdge(edge));\n}, \"populateDb\");\nvar parser = {\n parser: {\n // @ts-expect-error - ArchitectureDB is not assignable to DiagramDB\n yy: void 0\n },\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"architecture\", input);\n log.debug(ast);\n const db = parser.parser?.yy;\n if (!(db instanceof ArchitectureDB)) {\n throw new Error(\n \"parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.\"\n );\n }\n populateDb(ast, db);\n }, \"parse\")\n};\n\n// src/diagrams/architecture/architectureStyles.ts\nvar getStyles = /* @__PURE__ */ __name((options) => `\n .edge {\n stroke-width: ${options.archEdgeWidth};\n stroke: ${options.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${options.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${options.archGroupBorderColor};\n stroke-width: ${options.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`, \"getStyles\");\nvar architectureStyles_default = getStyles;\n\n// src/diagrams/architecture/architectureRenderer.ts\nimport cytoscape from \"cytoscape\";\nimport fcose from \"cytoscape-fcose\";\nimport { select } from \"d3\";\n\n// src/diagrams/architecture/architectureIcons.ts\nvar wrapIcon = /* @__PURE__ */ __name((icon) => {\n return `${icon}`;\n}, \"wrapIcon\");\nvar architectureIcons = {\n prefix: \"mermaid-architecture\",\n height: 80,\n width: 80,\n icons: {\n database: {\n body: wrapIcon(\n ''\n )\n },\n server: {\n body: wrapIcon(\n ''\n )\n },\n disk: {\n body: wrapIcon(\n ''\n )\n },\n internet: {\n body: wrapIcon(\n ''\n )\n },\n cloud: {\n body: wrapIcon(\n ''\n )\n },\n unknown: unknownIcon,\n blank: {\n body: wrapIcon(\"\")\n }\n }\n};\n\n// src/diagrams/architecture/svgDraw.ts\nvar drawEdges = /* @__PURE__ */ __name(async function(edgesEl, cy, db, diagramId) {\n const padding = db.getConfigField(\"padding\");\n const iconSize = db.getConfigField(\"iconSize\");\n const halfIconSize = iconSize / 2;\n const arrowSize = iconSize / 6;\n const halfArrowSize = arrowSize / 2;\n await Promise.all(\n cy.edges().map(async (edge) => {\n const {\n source,\n sourceDir,\n sourceArrow,\n sourceGroup,\n target,\n targetDir,\n targetArrow,\n targetGroup,\n label\n } = edgeData(edge);\n let { x: startX, y: startY } = edge[0].sourceEndpoint();\n const { x: midX, y: midY } = edge[0].midpoint();\n let { x: endX, y: endY } = edge[0].targetEndpoint();\n const groupEdgeShift = padding + 4;\n if (sourceGroup) {\n if (isArchitectureDirectionX(sourceDir)) {\n startX += sourceDir === \"L\" ? -groupEdgeShift : groupEdgeShift;\n } else {\n startY += sourceDir === \"T\" ? -groupEdgeShift : groupEdgeShift + 18;\n }\n }\n if (targetGroup) {\n if (isArchitectureDirectionX(targetDir)) {\n endX += targetDir === \"L\" ? -groupEdgeShift : groupEdgeShift;\n } else {\n endY += targetDir === \"T\" ? -groupEdgeShift : groupEdgeShift + 18;\n }\n }\n if (!sourceGroup && db.getNode(source)?.type === \"junction\") {\n if (isArchitectureDirectionX(sourceDir)) {\n startX += sourceDir === \"L\" ? halfIconSize : -halfIconSize;\n } else {\n startY += sourceDir === \"T\" ? halfIconSize : -halfIconSize;\n }\n }\n if (!targetGroup && db.getNode(target)?.type === \"junction\") {\n if (isArchitectureDirectionX(targetDir)) {\n endX += targetDir === \"L\" ? halfIconSize : -halfIconSize;\n } else {\n endY += targetDir === \"T\" ? halfIconSize : -halfIconSize;\n }\n }\n if (edge[0]._private.rscratch) {\n const g = edgesEl.insert(\"g\");\n g.insert(\"path\").attr(\"d\", `M ${startX},${startY} L ${midX},${midY} L${endX},${endY} `).attr(\"class\", \"edge\").attr(\"id\", `${diagramId}-${getEdgeId(source, target, { prefix: \"L\" })}`);\n if (sourceArrow) {\n const xShift = isArchitectureDirectionX(sourceDir) ? ArchitectureDirectionArrowShift[sourceDir](startX, arrowSize) : startX - halfArrowSize;\n const yShift = isArchitectureDirectionY(sourceDir) ? ArchitectureDirectionArrowShift[sourceDir](startY, arrowSize) : startY - halfArrowSize;\n g.insert(\"polygon\").attr(\"points\", ArchitectureDirectionArrow[sourceDir](arrowSize)).attr(\"transform\", `translate(${xShift},${yShift})`).attr(\"class\", \"arrow\");\n }\n if (targetArrow) {\n const xShift = isArchitectureDirectionX(targetDir) ? ArchitectureDirectionArrowShift[targetDir](endX, arrowSize) : endX - halfArrowSize;\n const yShift = isArchitectureDirectionY(targetDir) ? ArchitectureDirectionArrowShift[targetDir](endY, arrowSize) : endY - halfArrowSize;\n g.insert(\"polygon\").attr(\"points\", ArchitectureDirectionArrow[targetDir](arrowSize)).attr(\"transform\", `translate(${xShift},${yShift})`).attr(\"class\", \"arrow\");\n }\n if (label) {\n const axis = !isArchitectureDirectionXY(sourceDir, targetDir) ? isArchitectureDirectionX(sourceDir) ? \"X\" : \"Y\" : \"XY\";\n let width = 0;\n if (axis === \"X\") {\n width = Math.abs(startX - endX);\n } else if (axis === \"Y\") {\n width = Math.abs(startY - endY) / 1.5;\n } else {\n width = Math.abs(startX - endX) / 2;\n }\n const textElem = g.append(\"g\");\n await createText(\n textElem,\n label,\n {\n useHtmlLabels: false,\n width,\n classes: \"architecture-service-label\"\n },\n getConfig2()\n );\n textElem.attr(\"dy\", \"1em\").attr(\"alignment-baseline\", \"middle\").attr(\"dominant-baseline\", \"middle\").attr(\"text-anchor\", \"middle\");\n if (axis === \"X\") {\n textElem.attr(\"transform\", \"translate(\" + midX + \", \" + midY + \")\");\n } else if (axis === \"Y\") {\n textElem.attr(\"transform\", \"translate(\" + midX + \", \" + midY + \") rotate(-90)\");\n } else if (axis === \"XY\") {\n const pair = getArchitectureDirectionPair(sourceDir, targetDir);\n if (pair && isArchitecturePairXY(pair)) {\n const bboxOrig = textElem.node().getBoundingClientRect();\n const [x, y] = getArchitectureDirectionXYFactors(pair);\n textElem.attr(\"dominant-baseline\", \"auto\").attr(\"transform\", `rotate(${-1 * x * y * 45})`);\n const bboxNew = textElem.node().getBoundingClientRect();\n textElem.attr(\n \"transform\",\n `\n translate(${midX}, ${midY - bboxOrig.height / 2})\n translate(${x * bboxNew.width / 2}, ${y * bboxNew.height / 2})\n rotate(${-1 * x * y * 45}, 0, ${bboxOrig.height / 2})\n `\n );\n }\n }\n }\n }\n })\n );\n}, \"drawEdges\");\nvar drawGroups = /* @__PURE__ */ __name(async function(groupsEl, cy, db, diagramId) {\n const padding = db.getConfigField(\"padding\");\n const groupIconSize = padding * 0.75;\n const fontSize = db.getConfigField(\"fontSize\");\n const iconSize = db.getConfigField(\"iconSize\");\n const halfIconSize = iconSize / 2;\n await Promise.all(\n cy.nodes().map(async (node) => {\n const data = nodeData(node);\n if (data.type === \"group\") {\n const { h, w, x1, y1 } = node.boundingBox();\n const groupsNode = groupsEl.append(\"rect\");\n groupsNode.attr(\"id\", `${diagramId}-group-${data.id}`).attr(\"x\", x1 + halfIconSize).attr(\"y\", y1 + halfIconSize).attr(\"width\", w).attr(\"height\", h).attr(\"class\", \"node-bkg\");\n const groupLabelContainer = groupsEl.append(\"g\");\n let shiftedX1 = x1;\n let shiftedY1 = y1;\n if (data.icon) {\n const bkgElem = groupLabelContainer.append(\"g\");\n bkgElem.html(\n `${await getIconSVG(data.icon, { height: groupIconSize, width: groupIconSize, fallbackPrefix: architectureIcons.prefix })}`\n );\n bkgElem.attr(\n \"transform\",\n \"translate(\" + (shiftedX1 + halfIconSize + 1) + \", \" + (shiftedY1 + halfIconSize + 1) + \")\"\n );\n shiftedX1 += groupIconSize;\n shiftedY1 += fontSize / 2 - 1 - 2;\n }\n if (data.label) {\n const textElem = groupLabelContainer.append(\"g\");\n await createText(\n textElem,\n data.label,\n {\n useHtmlLabels: false,\n width: w,\n classes: \"architecture-service-label\"\n },\n getConfig2()\n );\n textElem.attr(\"dy\", \"1em\").attr(\"alignment-baseline\", \"middle\").attr(\"dominant-baseline\", \"start\").attr(\"text-anchor\", \"start\");\n textElem.attr(\n \"transform\",\n \"translate(\" + (shiftedX1 + halfIconSize + 4) + \", \" + (shiftedY1 + halfIconSize + 2) + \")\"\n );\n }\n db.setElementForId(data.id, groupsNode);\n }\n })\n );\n}, \"drawGroups\");\nvar drawServices = /* @__PURE__ */ __name(async function(db, elem, services, diagramId) {\n const config = getConfig2();\n for (const service of services) {\n const serviceElem = elem.append(\"g\");\n const iconSize = db.getConfigField(\"iconSize\");\n if (service.title) {\n const textElem = serviceElem.append(\"g\");\n await createText(\n textElem,\n service.title,\n {\n useHtmlLabels: false,\n width: iconSize * 1.5,\n classes: \"architecture-service-label\"\n },\n config\n );\n textElem.attr(\"dy\", \"1em\").attr(\"alignment-baseline\", \"middle\").attr(\"dominant-baseline\", \"middle\").attr(\"text-anchor\", \"middle\");\n textElem.attr(\"transform\", \"translate(\" + iconSize / 2 + \", \" + iconSize + \")\");\n }\n const bkgElem = serviceElem.append(\"g\");\n if (service.icon) {\n bkgElem.html(\n `${await getIconSVG(service.icon, { height: iconSize, width: iconSize, fallbackPrefix: architectureIcons.prefix })}`\n );\n } else if (service.iconText) {\n bkgElem.html(\n `${await getIconSVG(\"blank\", { height: iconSize, width: iconSize, fallbackPrefix: architectureIcons.prefix })}`\n );\n const textElemContainer = bkgElem.append(\"g\");\n const fo = textElemContainer.append(\"foreignObject\").attr(\"width\", iconSize).attr(\"height\", iconSize);\n const divElem = fo.append(\"div\").attr(\"class\", \"node-icon-text\").attr(\"style\", `height: ${iconSize}px;`).append(\"div\").html(sanitizeText(service.iconText, config));\n const fontSize = parseInt(\n window.getComputedStyle(divElem.node(), null).getPropertyValue(\"font-size\").replace(/\\D/g, \"\")\n ) ?? 16;\n divElem.attr(\"style\", `-webkit-line-clamp: ${Math.floor((iconSize - 2) / fontSize)};`);\n } else {\n bkgElem.append(\"path\").attr(\"class\", \"node-bkg\").attr(\"id\", `${diagramId}-node-${service.id}`).attr(\n \"d\",\n `M0,${iconSize} V5 Q0,0 5,0 H${iconSize - 5} Q${iconSize},0 ${iconSize},5 V${iconSize} Z`\n );\n }\n serviceElem.attr(\"id\", `${diagramId}-service-${service.id}`).attr(\"class\", \"architecture-service\");\n const { width, height } = serviceElem.node().getBBox();\n service.width = width;\n service.height = height;\n db.setElementForId(service.id, serviceElem);\n }\n return 0;\n}, \"drawServices\");\nvar drawJunctions = /* @__PURE__ */ __name(function(db, elem, junctions, diagramId) {\n junctions.forEach((junction) => {\n const junctionElem = elem.append(\"g\");\n const iconSize = db.getConfigField(\"iconSize\");\n const bkgElem = junctionElem.append(\"g\");\n bkgElem.append(\"rect\").attr(\"id\", `${diagramId}-node-${junction.id}`).attr(\"fill-opacity\", \"0\").attr(\"width\", iconSize).attr(\"height\", iconSize);\n junctionElem.attr(\"class\", \"architecture-junction\");\n const { width, height } = junctionElem._groups[0][0].getBBox();\n junctionElem.width = width;\n junctionElem.height = height;\n db.setElementForId(junction.id, junctionElem);\n });\n}, \"drawJunctions\");\n\n// src/diagrams/architecture/architectureRenderer.ts\nregisterIconPacks([\n {\n name: architectureIcons.prefix,\n icons: architectureIcons\n }\n]);\ncytoscape.use(fcose);\nfunction addServices(services, cy, db) {\n services.forEach((service) => {\n cy.add({\n group: \"nodes\",\n data: {\n type: \"service\",\n id: service.id,\n icon: service.icon,\n label: service.title,\n parent: service.in,\n width: db.getConfigField(\"iconSize\"),\n height: db.getConfigField(\"iconSize\")\n },\n classes: \"node-service\"\n });\n });\n}\n__name(addServices, \"addServices\");\nfunction addJunctions(junctions, cy, db) {\n junctions.forEach((junction) => {\n cy.add({\n group: \"nodes\",\n data: {\n type: \"junction\",\n id: junction.id,\n parent: junction.in,\n width: db.getConfigField(\"iconSize\"),\n height: db.getConfigField(\"iconSize\")\n },\n classes: \"node-junction\"\n });\n });\n}\n__name(addJunctions, \"addJunctions\");\nfunction positionNodes(db, cy) {\n cy.nodes().map((node) => {\n const data = nodeData(node);\n if (data.type === \"group\") {\n return;\n }\n data.x = node.position().x;\n data.y = node.position().y;\n const nodeElem = db.getElementById(data.id);\n nodeElem.attr(\"transform\", \"translate(\" + (data.x || 0) + \",\" + (data.y || 0) + \")\");\n });\n}\n__name(positionNodes, \"positionNodes\");\nfunction addGroups(groups, cy) {\n groups.forEach((group) => {\n cy.add({\n group: \"nodes\",\n data: {\n type: \"group\",\n id: group.id,\n icon: group.icon,\n label: group.title,\n parent: group.in\n },\n classes: \"node-group\"\n });\n });\n}\n__name(addGroups, \"addGroups\");\nfunction addEdges(edges, cy) {\n edges.forEach((parsedEdge) => {\n const { lhsId, rhsId, lhsInto, lhsGroup, rhsInto, lhsDir, rhsDir, rhsGroup, title } = parsedEdge;\n const edgeType = isArchitectureDirectionXY(parsedEdge.lhsDir, parsedEdge.rhsDir) ? \"segments\" : \"straight\";\n const edge = {\n id: `${lhsId}-${rhsId}`,\n label: title,\n source: lhsId,\n sourceDir: lhsDir,\n sourceArrow: lhsInto,\n sourceGroup: lhsGroup,\n sourceEndpoint: lhsDir === \"L\" ? \"0 50%\" : lhsDir === \"R\" ? \"100% 50%\" : lhsDir === \"T\" ? \"50% 0\" : \"50% 100%\",\n target: rhsId,\n targetDir: rhsDir,\n targetArrow: rhsInto,\n targetGroup: rhsGroup,\n targetEndpoint: rhsDir === \"L\" ? \"0 50%\" : rhsDir === \"R\" ? \"100% 50%\" : rhsDir === \"T\" ? \"50% 0\" : \"50% 100%\"\n };\n cy.add({\n group: \"edges\",\n data: edge,\n classes: edgeType\n });\n });\n}\n__name(addEdges, \"addEdges\");\nfunction getAlignments(db, spatialMaps, groupAlignments) {\n const flattenAlignments = /* @__PURE__ */ __name((alignmentObj, alignmentDir) => {\n return Object.entries(alignmentObj).reduce(\n (prev, [dir, alignments2]) => {\n let cnt = 0;\n const arr = Object.entries(alignments2);\n if (arr.length === 1) {\n prev[dir] = arr[0][1];\n return prev;\n }\n for (let i = 0; i < arr.length - 1; i++) {\n for (let j = i + 1; j < arr.length; j++) {\n const [aGroupId, aNodeIds] = arr[i];\n const [bGroupId, bNodeIds] = arr[j];\n const alignment = groupAlignments[aGroupId]?.[bGroupId];\n if (alignment === alignmentDir) {\n prev[dir] ??= [];\n prev[dir] = [...prev[dir], ...aNodeIds, ...bNodeIds];\n } else if (aGroupId === \"default\" || bGroupId === \"default\") {\n prev[dir] ??= [];\n prev[dir] = [...prev[dir], ...aNodeIds, ...bNodeIds];\n } else {\n const keyA = `${dir}-${cnt++}`;\n prev[keyA] = aNodeIds;\n const keyB = `${dir}-${cnt++}`;\n prev[keyB] = bNodeIds;\n }\n }\n }\n return prev;\n },\n {}\n );\n }, \"flattenAlignments\");\n const alignments = spatialMaps.map((spatialMap) => {\n const horizontalAlignments = {};\n const verticalAlignments = {};\n Object.entries(spatialMap).forEach(([id, [x, y]]) => {\n const nodeGroup = db.getNode(id)?.in ?? \"default\";\n horizontalAlignments[y] ??= {};\n horizontalAlignments[y][nodeGroup] ??= [];\n horizontalAlignments[y][nodeGroup].push(id);\n verticalAlignments[x] ??= {};\n verticalAlignments[x][nodeGroup] ??= [];\n verticalAlignments[x][nodeGroup].push(id);\n });\n return {\n horiz: Object.values(flattenAlignments(horizontalAlignments, \"horizontal\")).filter(\n (arr) => arr.length > 1\n ),\n vert: Object.values(flattenAlignments(verticalAlignments, \"vertical\")).filter(\n (arr) => arr.length > 1\n )\n };\n });\n const [horizontal, vertical] = alignments.reduce(\n ([prevHoriz, prevVert], { horiz, vert }) => {\n return [\n [...prevHoriz, ...horiz],\n [...prevVert, ...vert]\n ];\n },\n [[], []]\n );\n return {\n horizontal,\n vertical\n };\n}\n__name(getAlignments, \"getAlignments\");\nfunction getRelativeConstraints(spatialMaps, db) {\n const relativeConstraints = [];\n const posToStr = /* @__PURE__ */ __name((pos) => `${pos[0]},${pos[1]}`, \"posToStr\");\n const strToPos = /* @__PURE__ */ __name((pos) => pos.split(\",\").map((p) => parseInt(p)), \"strToPos\");\n spatialMaps.forEach((spatialMap) => {\n const invSpatialMap = Object.fromEntries(\n Object.entries(spatialMap).map(([id, pos]) => [posToStr(pos), id])\n );\n const queue = [posToStr([0, 0])];\n const visited = {};\n const directions = {\n L: [-1, 0],\n R: [1, 0],\n T: [0, 1],\n B: [0, -1]\n };\n while (queue.length > 0) {\n const curr = queue.shift();\n if (curr) {\n visited[curr] = 1;\n const currId = invSpatialMap[curr];\n if (currId) {\n const currPos = strToPos(curr);\n Object.entries(directions).forEach(([dir, shift]) => {\n const newPos = posToStr([currPos[0] + shift[0], currPos[1] + shift[1]]);\n const newId = invSpatialMap[newPos];\n if (newId && !visited[newPos]) {\n queue.push(newPos);\n relativeConstraints.push({\n [ArchitectureDirectionName[dir]]: newId,\n [ArchitectureDirectionName[getOppositeArchitectureDirection(dir)]]: currId,\n gap: 1.5 * db.getConfigField(\"iconSize\")\n });\n }\n });\n }\n }\n }\n });\n return relativeConstraints;\n}\n__name(getRelativeConstraints, \"getRelativeConstraints\");\nfunction layoutArchitecture(services, junctions, groups, edges, db, { spatialMaps, groupAlignments }) {\n return new Promise((resolve) => {\n const renderEl = select(\"body\").append(\"div\").attr(\"id\", \"cy\").attr(\"style\", \"display:none\");\n const cy = cytoscape({\n container: document.getElementById(\"cy\"),\n style: [\n {\n selector: \"edge\",\n style: {\n \"curve-style\": \"straight\",\n \"source-endpoint\": \"data(sourceEndpoint)\",\n \"target-endpoint\": \"data(targetEndpoint)\"\n }\n },\n {\n selector: \"edge[label]\",\n style: {\n label: \"data(label)\"\n }\n },\n {\n selector: \"edge.segments\",\n style: {\n \"curve-style\": \"segments\",\n \"segment-weights\": \"0\",\n \"segment-distances\": [0.5],\n // @ts-ignore Incorrect library types\n \"edge-distances\": \"endpoints\",\n \"source-endpoint\": \"data(sourceEndpoint)\",\n \"target-endpoint\": \"data(targetEndpoint)\"\n }\n },\n {\n selector: \"node\",\n style: {\n // @ts-ignore Incorrect library types\n \"compound-sizing-wrt-labels\": \"include\"\n }\n },\n {\n selector: \"node[label]\",\n style: {\n \"text-valign\": \"bottom\",\n \"text-halign\": \"center\",\n \"font-size\": `${db.getConfigField(\"fontSize\")}px`\n }\n },\n {\n selector: \".node-service\",\n style: {\n label: \"data(label)\",\n width: \"data(width)\",\n height: \"data(height)\"\n }\n },\n {\n selector: \".node-junction\",\n style: {\n width: \"data(width)\",\n height: \"data(height)\"\n }\n },\n {\n selector: \".node-group\",\n style: {\n // @ts-ignore Incorrect library types\n padding: `${db.getConfigField(\"padding\")}px`\n }\n }\n ],\n layout: {\n name: \"grid\",\n boundingBox: {\n x1: 0,\n x2: 100,\n y1: 0,\n y2: 100\n }\n }\n });\n renderEl.remove();\n addGroups(groups, cy);\n addServices(services, cy, db);\n addJunctions(junctions, cy, db);\n addEdges(edges, cy);\n const alignmentConstraint = getAlignments(db, spatialMaps, groupAlignments);\n const relativePlacementConstraint = getRelativeConstraints(spatialMaps, db);\n const iconSize = db.getConfigField(\"iconSize\");\n const sameGroupIdealLength = db.getConfigField(\"idealEdgeLengthMultiplier\") * iconSize;\n const crossGroupIdealLength = 0.5 * iconSize;\n const sameGroupElasticity = db.getConfigField(\"edgeElasticity\");\n const layout = cy.layout({\n name: \"fcose\",\n quality: \"proof\",\n randomize: db.getConfigField(\"randomize\"),\n nodeSeparation: db.getConfigField(\"nodeSeparation\"),\n numIter: db.getConfigField(\"numIter\"),\n styleEnabled: false,\n animate: false,\n nodeDimensionsIncludeLabels: false,\n // Adjust the edge parameters if it passes through the border of a group\n // Hacky fix for: https://github.com/iVis-at-Bilkent/cytoscape.js-fcose/issues/67\n idealEdgeLength(edge) {\n const [nodeA, nodeB] = edge.connectedNodes();\n const { parent: parentA } = nodeData(nodeA);\n const { parent: parentB } = nodeData(nodeB);\n return parentA === parentB ? sameGroupIdealLength : crossGroupIdealLength;\n },\n edgeElasticity(edge) {\n const [nodeA, nodeB] = edge.connectedNodes();\n const { parent: parentA } = nodeData(nodeA);\n const { parent: parentB } = nodeData(nodeB);\n return parentA === parentB ? sameGroupElasticity : 1e-3;\n },\n alignmentConstraint,\n relativePlacementConstraint\n });\n layout.one(\"layoutstop\", () => {\n function getSegmentWeights(source, target, pointX, pointY) {\n let W, D;\n const { x: sX, y: sY } = source;\n const { x: tX, y: tY } = target;\n D = (pointY - sY + (sX - pointX) * (sY - tY) / (sX - tX)) / Math.sqrt(1 + Math.pow((sY - tY) / (sX - tX), 2));\n W = Math.sqrt(Math.pow(pointY - sY, 2) + Math.pow(pointX - sX, 2) - Math.pow(D, 2));\n const distAB = Math.sqrt(Math.pow(tX - sX, 2) + Math.pow(tY - sY, 2));\n W = W / distAB;\n let delta1 = (tX - sX) * (pointY - sY) - (tY - sY) * (pointX - sX);\n switch (true) {\n case delta1 >= 0:\n delta1 = 1;\n break;\n case delta1 < 0:\n delta1 = -1;\n break;\n }\n let delta2 = (tX - sX) * (pointX - sX) + (tY - sY) * (pointY - sY);\n switch (true) {\n case delta2 >= 0:\n delta2 = 1;\n break;\n case delta2 < 0:\n delta2 = -1;\n break;\n }\n D = Math.abs(D) * delta1;\n W = W * delta2;\n return {\n distances: D,\n weights: W\n };\n }\n __name(getSegmentWeights, \"getSegmentWeights\");\n cy.startBatch();\n for (const edge of Object.values(cy.edges())) {\n if (edge.data?.()) {\n const { x: sX, y: sY } = edge.source().position();\n const { x: tX, y: tY } = edge.target().position();\n if (sX !== tX && sY !== tY) {\n const sEP = edge.sourceEndpoint();\n const tEP = edge.targetEndpoint();\n const { sourceDir } = edgeData(edge);\n const [pointX, pointY] = isArchitectureDirectionY(sourceDir) ? [sEP.x, tEP.y] : [tEP.x, sEP.y];\n const { weights, distances } = getSegmentWeights(sEP, tEP, pointX, pointY);\n edge.style(\"segment-distances\", distances);\n edge.style(\"segment-weights\", weights);\n }\n }\n }\n cy.endBatch();\n layout.run();\n });\n layout.run();\n cy.ready((e) => {\n log.info(\"Ready\", e);\n resolve(cy);\n });\n });\n}\n__name(layoutArchitecture, \"layoutArchitecture\");\nvar draw = /* @__PURE__ */ __name(async (text, id, _version, diagObj) => {\n const db = diagObj.db;\n db.setDiagramId(id);\n const services = db.getServices();\n const junctions = db.getJunctions();\n const groups = db.getGroups();\n const edges = db.getEdges();\n const ds = db.getDataStructures();\n const svg = selectSvgElement(id);\n const edgesElem = svg.append(\"g\");\n edgesElem.attr(\"class\", \"architecture-edges\");\n const servicesElem = svg.append(\"g\");\n servicesElem.attr(\"class\", \"architecture-services\");\n const groupElem = svg.append(\"g\");\n groupElem.attr(\"class\", \"architecture-groups\");\n await drawServices(db, servicesElem, services, id);\n drawJunctions(db, servicesElem, junctions, id);\n const cy = await layoutArchitecture(services, junctions, groups, edges, db, ds);\n await drawEdges(edgesElem, cy, db, id);\n await drawGroups(groupElem, cy, db, id);\n positionNodes(db, cy);\n setupGraphViewbox(void 0, svg, db.getConfigField(\"padding\"), db.getConfigField(\"useMaxWidth\"));\n}, \"draw\");\nvar renderer = { draw };\n\n// src/diagrams/architecture/architectureDiagram.ts\nvar diagram = {\n parser,\n get db() {\n return new ArchitectureDB();\n },\n renderer,\n styles: architectureStyles_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EACpB+J,EAAK/J,EAAG,kBAAkB,EAC1BgK,EAAMC,GAAiB1M,CAAE,EACzB2M,EAAYF,EAAI,OAAO,GAAG,EAChCE,EAAU,KAAK,QAAS,oBAAoB,EAC5C,IAAMC,EAAeH,EAAI,OAAO,GAAG,EACnCG,EAAa,KAAK,QAAS,uBAAuB,EAClD,IAAMC,EAAYJ,EAAI,OAAO,GAAG,EAChCI,EAAU,KAAK,QAAS,qBAAqB,EAC7C,MAAMvG,GAAa7D,EAAImK,EAAcpG,EAAUxG,CAAE,EACjD8G,GAAcrE,EAAImK,EAAc7F,EAAW/G,CAAE,EAC7C,IAAMwD,EAAK,MAAM6G,GAAmB7D,EAAUO,EAAWU,EAAQE,EAAOlF,EAAI+J,CAAE,EAC9E,MAAMlJ,GAAUqJ,EAAWnJ,EAAIf,EAAIzC,CAAE,EACrC,MAAMuF,GAAWsH,EAAWrJ,EAAIf,EAAIzC,CAAE,EACtCuH,GAAc9E,EAAIe,CAAE,EACpBsJ,GAAkB,OAAQL,EAAKhK,EAAG,eAAe,SAAS,EAAGA,EAAG,eAAe,aAAa,CAAC,CAC/F,EAAG,MAAM,EACLsK,GAAW,CAAE,KAAAX,EAAK,EAGlBY,GAAU,CACZ,OAAApK,GACA,IAAI,IAAK,CACP,OAAO,IAAInD,EACb,EACA,SAAAsN,GACA,OAAQ7J,EACV", + "names": ["require_layout_base", "__commonJSMin", "exports", "module", "root", "factory", "modules", "installedModules", "__webpack_require__", "moduleId", "value", "name", "getter", "object", "property", "LayoutConstants", "LGraphObject", "IGeometry", "IMath", "LEdge", "source", "target", "vEdge", "prop", "node", "graph", "otherEnd", "clipPointCoordinates", "vGraphObject", "Integer", "RectangleD", "RandomSeed", "PointD", "LNode", "gm", "loc", "size", "vNode", "width", "height", "upperLeft", "dimension", "cx", "cy", "x", "y", "dx", "dy", "to", "edgeList", "edge", "self", "other", "neighbors", "withNeighborsList", "childNode", "children", "nodes", "i", "noOfChildren", "randomCenterX", "randomCenterY", "minX", "maxX", "minY", "maxY", "childGraph", "trans", "left", "top", "leftTop", "vLeftTop", "FDLayoutConstants", "pt", "dim", "LGraphManager", "Point", "LinkedList", "LGraph", "parent", "obj2", "vGraph", "obj1", "sourceNode", "targetNode", "newNode", "newEdge", "obj", "edgesToBeRemoved", "s", "index", "sourceIndex", "targetIndex", "nodeTop", "nodeLeft", "margin", "lNode", "recursive", "right", "bottom", "nodeRight", "nodeBottom", "boundingRect", "queue", "visited", "currentNode", "neighborEdges", "currentNeighbor", "childrenOfNode", "neighborEdge", "childrenOfNeighbor", "noOfVisitedInThisGraph", "visitedNode", "layout", "ngraph", "nnode", "newGraph", "parentNode", "sourceGraph", "targetGraph", "lObj", "nodesToBeRemoved", "nodeList", "graphs", "firstNode", "secondNode", "ownerGraph", "sourceAncestorGraph", "targetAncestorGraph", "edges", "firstOwnerGraph", "secondOwnerGraph", "depth", "edgesToRemove", "rectA", "rectB", "overlapAmount", "separationBuffer", "directions", "slope", "moveByY", "moveByX", "result", "p1x", "p1y", "p2x", "p2y", "topLeftAx", "topLeftAy", "topRightAx", "bottomLeftAx", "bottomLeftAy", "bottomRightAx", "halfWidthA", "halfHeightA", "topLeftBx", "topLeftBy", "topRightBx", "bottomLeftBx", "bottomLeftBy", "bottomRightBx", "halfWidthB", "halfHeightB", "clipPointAFound", "clipPointBFound", "slopeA", "slopeB", "slopePrime", "cardinalDirectionA", "cardinalDirectionB", "tempPointAx", "tempPointAy", "tempPointBx", "tempPointBy", "line", "s1", "s2", "f1", "f2", "x1", "y1", "x2", "y2", "x3", "y3", "x4", "y4", "a1", "a2", "b1", "b2", "c1", "c2", "denom", "Cx", "Cy", "Nx", "Ny", "C_angle", "p1", "p2", "p3", "p4", "a", "b", "c", "d", "p", "q", "r", "det", "lambda", "gamma", "Ex", "Ey", "Lx", "Ly", "disc", "t1", "t2", "intersections", "_createClass", "defineProperties", "props", "descriptor", "Constructor", "protoProps", "staticProps", "_classCallCheck", "instance", "nodeFrom", "add", "prev", "next", "list", "_remove", "vals", "_this", "v", "val", "otherNode", "current", "_typeof", "UniqueIDGeneretor", "id", "arg", "type", "_toConsumableArray", "arr", "arr2", "Transform", "Emitter", "Layout", "isRemoteUse", "isLayoutSuccessfull", "allEdges", "newLeftTop", "flatForest", "isForest", "allNodes", "isFlat", "toBeVisited", "parents", "unProcessedNodes", "temp", "dummyNodes", "dummyNode", "dummyEdge", "k", "lEdge", "path", "ebp", "sliderValue", "defaultValue", "minDiv", "maxMul", "minValue", "maxValue", "removedNodes", "remainingDegrees", "foundCenter", "centerNode", "degree", "tempList", "tempList2", "neighbours", "neighbour", "otherDegree", "newDegree", "wox", "woy", "wex", "wey", "dox", "doy", "dex", "dey", "xDevice", "worldExtX", "yDevice", "worldExtY", "xWorld", "deviceExtX", "yWorld", "deviceExtY", "inPoint", "outPoint", "FDLayout", "originalIdealLength", "lcaDepth", "sizeOfSourceInLca", "sizeOfTargetInLca", "lEdges", "gridUpdateAllowed", "forceToNodeSurroundingUpdate", "j", "nodeA", "nodeB", "lNodes", "processedNodeSet", "idealLength", "length", "springForce", "springForceX", "springForceY", "clipPoints", "distanceX", "distanceY", "distanceSquared", "distance", "repulsionForce", "repulsionForceX", "repulsionForceY", "childrenConstant", "ownerCenterX", "ownerCenterY", "absDistanceX", "absDistanceY", "estimatedSize", "converged", "oscilating", "sizeX", "sizeY", "grid", "startX", "finishX", "startY", "finishY", "surrounding", "FDLayoutEdge", "FDLayoutNode", "_startX", "_finishX", "_startY", "_finishY", "DimensionD", "HashMap", "key", "theId", "HashSet", "keys", "Matrix", "array1", "array2", "array", "constant", "product", "magnitude", "sum", "_i", "C", "INV", "temp1", "temp2", "_i2", "_sum", "_j", "_i3", "_sum2", "_j2", "Quicksort", "A", "compareFunction", "SVD", "nu", "dims", "allocate", "e", "work", "wantu", "wantv", "nct", "nrt", "lhs", "rhs", "t", "_i4", "_i5", "_i6", "_i7", "_i8", "_t", "_i9", "_i10", "_j3", "_i11", "_k", "_j4", "_t2", "_i12", "_i13", "_i14", "_i15", "_i16", "_k2", "_j5", "_t3", "_i17", "_i18", "_i19", "pp", "iter", "eps", "tiny", "_k3", "kase", "ks", "_t4", "f", "_j6", "_t5", "cs", "sn", "_i20", "_f", "_j7", "_t6", "_cs", "_sn", "_i21", "scale", "sp", "spm1", "epm1", "sk", "ek", "shift", "_f2", "g", "_j8", "_t7", "_cs2", "_sn2", "_i22", "_i23", "_i24", "_t8", "_i25", "_i26", "NeedlemanWunsch", "sequence1", "sequence2", "match_score", "mismatch_penalty", "gap_penalty", "diag", "up", "maxOf", "indices", "inProcessAlignments", "indexes", "layoutBase", "event", "callback", "l", "data", "require_cose_base", "__commonJSMin", "exports", "module", "root", "factory", "__WEBPACK_EXTERNAL_MODULE__551__", "__webpack_modules__", "__unused_webpack_exports", "__webpack_require__", "coseBase", "FDLayoutConstants", "CoSEConstants", "prop", "FDLayoutEdge", "CoSEEdge", "source", "target", "vEdge", "LGraph", "CoSEGraph", "parent", "graphMgr", "vGraph", "LGraphManager", "CoSEGraphManager", "layout", "FDLayout", "CoSENode", "ConstraintHandler", "LayoutConstants", "Point", "PointD", "DimensionD", "Layout", "Integer", "IGeometry", "Transform", "LinkedList", "CoSELayout", "gm", "vNode", "createBendsAsNeeded", "allNodes", "intersection", "x", "forest", "gridUpdateAllowed", "forceToNodeSurroundingUpdate", "pData", "i", "rect", "id", "layoutEnded", "lNodes", "node", "self", "calculateCompoundWeight", "compoundNode", "nodes", "fixedNodeWeight", "nodeData", "nodeToDummyForVerticalAlignment", "nodeToDummyForHorizontalAlignment", "nodeId", "verticalAlignment", "horizontalAlignment", "array", "j", "constraint", "nodeIdLeft", "nodeIdRight", "nodeIdTop", "nodeIdBottom", "subGraphOnHorizontal", "subGraphOnVertical", "left", "right", "top", "bottom", "constructComponents", "graph", "fixedNodes", "components", "isFixed", "queue", "visited", "count", "value", "key", "currentNode", "neighbors", "neighbor", "resultOnHorizontal", "resultOnVertical", "fixedNode", "allVerticalAlignments", "totalDisplacementX", "averageDisplacementX", "allHorizontalAlignments", "totalDisplacementY", "averageDisplacementY", "displacement", "diff", "component", "sum", "actualNodes", "averageDisplacement", "nodeList", "graphs", "size", "edges", "edge", "edgeList", "k", "multiEdge", "currentStartingPoint", "numberOfColumns", "height", "currentY", "currentX", "point", "tree", "centerNode", "startingPoint", "radialSep", "bounds", "transform", "bottomRight", "parentOfNode", "startAngle", "endAngle", "distance", "radialSeparation", "halfInterval", "nodeAngle", "teta", "cos_teta", "x_", "y_", "neighborEdges", "childCount", "branchCount", "incEdgesCount", "startIndex", "temp", "index", "stepAngle", "currentNeighbor", "childStartAngle", "childEndAngle", "maxDiagonal", "diagonal", "tempMemberGroups", "zeroDegree", "p_id", "dummyCompoundId", "dummyCompound", "dummyParentGraph", "parentGraph", "childGraphMap", "idToNode", "tiledZeroDegreePack", "width", "lCompoundNode", "horizontalMargin", "verticalMargin", "labelMarginLeft", "labelMarginTop", "tiledPack", "childGraph", "children", "theChild", "degree", "child", "organization", "y", "compoundHorizontalMargin", "compoundVerticalMargin", "compoundLabelMarginLeft", "compoundLabelMarginTop", "row", "maxHeight", "lnode", "minWidth", "horizontalOrg", "verticalOrg", "horizontalRatio", "verticalRatio", "bestOrg", "ratio", "members", "favorHorizontalDim", "verticalPadding", "horizontalPadding", "membersSize", "totalWidth", "totalHeight", "maxWidth", "averageWidth", "averageHeight", "delta", "horizontalCountDouble", "horizontalCount", "idealWidth", "tilingCompareBy", "getNodeArea", "n", "areaCompareFcn", "n1", "n2", "cmpBy", "sumCenterX", "sumCenterY", "lNode", "rowIndex", "minCompoundSize", "secondDimension", "w", "h", "extraHeight", "r", "min", "max", "extraWidth", "lastRowIndex", "lastRowWidth", "sri", "hDiff", "add_to_row_ratio", "add_new_row_ratio", "longest", "last", "prevTotal", "finalTotal", "prunedNodesAll", "containsLeaf", "prunedNodesInStepTemp", "otherEnd", "relativePosition", "prunedNodesInStep", "lengthOfPrunedNodesInStep", "gridForPrunedNode", "nodeToConnect", "prunedNode", "startGridX", "finishGridX", "startGridY", "finishGridY", "upNodeCount", "downNodeCount", "rightNodeCount", "leftNodeCount", "controlRegions", "minCount", "minIndex", "random", "FDLayoutNode", "IMath", "loc", "dX", "dY", "pred1", "next", "processed", "_toConsumableArray", "arr", "arr2", "Matrix", "SVD", "constraints", "idToNodeMap", "nodeIndexes", "xCoords", "yCoords", "calculatePositionDiff", "pos1", "pos2", "calculateAvgPosition", "nodeIdSet", "xPosSum", "yPosSum", "findAppropriatePositionForRelativePlacement", "direction", "dummyPositions", "componentSources", "setUnion", "setA", "setB", "union", "_iteratorNormalCompletion", "_didIteratorError", "_iteratorError", "_iterator", "_step", "elem", "err", "inDegrees", "adjacent", "positionMap", "pastMap", "fixedIds", "position", "fixedId", "_position", "_loop", "fixedPosition", "sinkNodes", "_components", "isFixedComponent", "_iteratorNormalCompletion2", "_didIteratorError2", "_iteratorError2", "_iterator2", "_step2", "isExist", "existAt", "ele", "minBefore", "minAfter", "maxBefore", "maxAfter", "_iteratorNormalCompletion3", "_didIteratorError3", "_iteratorError3", "_iterator3", "_step3", "posBefore", "posAfter", "_iteratorNormalCompletion4", "_didIteratorError4", "_iteratorError4", "_iterator4", "_step4", "_nodeId", "applyReflectionForRelativePlacement", "relativePlacementConstraints", "reflectOnY", "notReflectOnY", "reflectOnX", "notReflectOnX", "_i", "_i2", "_i3", "findComponents", "_currentNode", "dagToUndirected", "dag", "undirected", "dagToReversed", "reversed", "targetMatrix", "sourceMatrix", "standardTransformation", "reflectionType", "dagUndirected", "verticalAlign", "_loop2", "_i4", "alignmentSet", "xPos", "horizontalAlign", "_loop3", "_i5", "yPos", "largestComponentSize", "largestComponentIndex", "_i6", "constraintsInlargestComponent", "positionMapHorizontal", "positionMapVertical", "transformationMatrix", "targetMatrixTranspose", "sourceMatrixTranspose", "_i7", "tempMatrix", "SVDResult", "_i8", "temp1", "temp2", "temp3", "translationAmount", "posInTheory", "posDesired", "posDiff", "xAlign", "_loop4", "_i9", "yAlign", "_loop5", "_i10", "dummyToNodeForVerticalAlignment", "dummyToNodeForHorizontalAlignment", "dummyPositionsForVerticalAlignment", "dummyPositionsForHorizontalAlignment", "fixedNodesOnHorizontal", "fixedNodesOnVertical", "_loop6", "_i11", "_loop7", "_i12", "dagOnHorizontal", "dagOnVertical", "_loop8", "sourceId", "targetNode", "_iteratorNormalCompletion5", "_didIteratorError5", "_iteratorError5", "_iterator5", "_step5", "undirectedOnHorizontal", "undirectedOnVertical", "componentsOnHorizontal", "componentsOnVertical", "reversedDagOnHorizontal", "reversedDagOnVertical", "componentSourcesOnHorizontal", "componentSourcesOnVertical", "_loop9", "_iteratorNormalCompletion6", "_didIteratorError6", "_iteratorError6", "_iterator6", "_step6", "_loop10", "_iteratorNormalCompletion7", "_didIteratorError7", "_iteratorError7", "_iterator7", "_step7", "_i13", "_node", "__webpack_module_cache__", "moduleId", "cachedModule", "__webpack_exports__", "require_cytoscape_fcose", "__commonJSMin", "exports", "module", "root", "factory", "__WEBPACK_EXTERNAL_MODULE__140__", "__webpack_modules__", "tgt", "_len", "srcs", "_key", "src", "k", "__unused_webpack_exports", "__webpack_require__", "_slicedToArray", "sliceIterator", "arr", "i", "_arr", "_n", "_d", "_e", "_i", "_s", "err", "LinkedList", "auxiliary", "nodes", "nodesMap", "roots", "ele", "parent", "cy", "eles", "topMostNodes", "dummyNodes", "queue", "visited", "visitedTopMostNodes", "currentNeighbor", "minDegreeNode", "minDegree", "isConnected", "count", "nodesConnectedToDummy", "components", "_loop", "cmpt", "currentNode", "childrenOfCurrentNode", "node", "_loop2", "neighborNodes", "neighborNode", "childrenOfNeighbor", "e", "temp", "originalCenter", "componentResult", "options", "minXCoord", "maxXCoord", "minYCoord", "maxYCoord", "_iteratorNormalCompletion", "_didIteratorError", "_iteratorError", "_iterator", "_step", "_ref", "_ref2", "key", "value", "cyNode", "nodeBB", "leftX", "rightX", "topY", "bottomY", "diffOnX", "diffOnY", "x", "y", "item", "_diffOnX", "_diffOnY", "parentNode", "xCoords", "yCoords", "nodeIndexes", "left", "right", "top", "bottom", "nodeLeft", "nodeRight", "nodeTop", "nodeBottom", "s", "boundingBox", "parentsWithoutChildren", "check", "child", "aux", "CoSELayout", "CoSENode", "PointD", "DimensionD", "LayoutConstants", "FDLayoutConstants", "CoSEConstants", "coseLayout", "spectralResult", "edges", "idToLNode", "isFn", "fn", "optFn", "opt", "processChildrenList", "children", "layout", "size", "theChild", "children_of_children", "theNode", "dimensions", "parentInfo", "theNewGraph", "processEdges", "gm", "idealLengthTotal", "edgeCount", "edge", "sourceNode", "targetNode", "e1", "processConstraints", "_createClass", "defineProperties", "target", "props", "descriptor", "Constructor", "protoProps", "staticProps", "_classCallCheck", "instance", "assign", "_require", "spectralLayout", "_require2", "defaults", "Layout", "coseResult", "componentCenters", "constraintExist", "layUtil", "packingEnabled", "component", "toBeTiledNodes", "_xCoords", "_yCoords", "tempSpectralResult", "indexesToBeDeleted", "index", "_boundingBox", "componentsEvaluated", "subgraphs", "hiddenEles", "subgraph", "nodeIndex", "source", "sourceNodeIndex", "targetNodeIndex", "sourceCenter", "targetCenter", "_parentInfo", "shiftResult", "result", "newXCoords", "newYCoords", "_count", "nodeRectangle", "getPositions", "pos", "theId", "_pos", "_hiddenEles", "Matrix", "SVD", "parentNodes", "parentChildMap", "allNodesNeighborhood", "samplesColumn", "minDistancesColumn", "C", "PHI", "INV", "firstSample", "nodeSize", "infinity", "small", "piTol", "samplingType", "nodeSeparation", "sampleSize", "randomSampleCR", "sample", "flag", "BFS", "pivot", "samplingMethod", "path", "front", "back", "current", "distance", "max_dist", "max_ind", "neighbors", "_i2", "_i3", "allBFS", "_i4", "_i5", "_i6", "j", "_i7", "_i8", "_j", "SVDResult", "a_q", "a_u", "a_v", "max_s", "a_Sig", "powerIteration", "theta1", "theta2", "Y1", "Y2", "V1", "V2", "previous", "_i9", "_i10", "_i11", "_i12", "_i13", "min", "ele2", "eleIndex", "disconnectedId", "id", "_iteratorNormalCompletion2", "_didIteratorError2", "_iteratorError2", "_iterator2", "_step2", "_i14", "_i15", "iterator", "firstNode", "firstNodePos", "firstNodeWidth", "secondNode", "secondNodeWidth", "impl", "register", "cytoscape", "__webpack_module_cache__", "moduleId", "cachedModule", "__webpack_exports__", "import_cytoscape_fcose", "ArchitectureDirectionName", "ArchitectureDirectionArrow", "__name", "scale", "ArchitectureDirectionArrowShift", "orig", "arrowSize", "_arrowSize", "getOppositeArchitectureDirection", "x", "isArchitectureDirectionX", "isArchitectureDirection", "temp", "isArchitectureDirectionY", "isArchitectureDirectionXY", "a", "b", "aX_bY", "aY_bX", "isArchitecturePairXY", "pair", "lhs", "rhs", "isValidArchitectureDirectionPair", "getArchitectureDirectionPair", "sourceDir", "targetDir", "shiftPositionByArchitectureDirectionPair", "y", "getArchitectureDirectionXYFactors", "getArchitectureDirectionAlignment", "isArchitectureService", "isArchitectureJunction", "edgeData", "edge", "nodeData", "node", "DEFAULT_ARCHITECTURE_CONFIG", "defaultConfig_default", "ArchitectureDB", "setAccTitle", "getAccTitle", "setDiagramTitle", "getDiagramTitle", "getAccDescription", "setAccDescription", "id", "clear", "icon", "parent", "title", "iconText", "lhsId", "rhsId", "lhsDir", "rhsDir", "lhsInto", "rhsInto", "lhsGroup", "rhsGroup", "lhsGroupId", "rhsGroupId", "groupAlignments", "adjList", "prevOuter", "service", "prevInner", "alignment", "firstId", "visited", "notVisited", "prev", "BFS", "startingId", "spatialMap", "queue", "adj", "posX", "posY", "dir", "spatialMaps", "element", "cleanAndMerge", "getConfig", "field", "populateDb", "ast", "db", "populateCommonDb", "group", "parser", "input", "parse", "log", "getStyles", "options", "architectureStyles_default", "wrapIcon", "architectureIcons", "unknownIcon", "drawEdges", "edgesEl", "cy", "diagramId", "padding", "iconSize", "halfIconSize", "halfArrowSize", "source", "sourceArrow", "sourceGroup", "target", "targetArrow", "targetGroup", "label", "startX", "startY", "midX", "midY", "endX", "endY", "groupEdgeShift", "g", "getEdgeId", "xShift", "yShift", "axis", "width", "textElem", "createText", "getConfig2", "bboxOrig", "bboxNew", "drawGroups", "groupsEl", "groupIconSize", "fontSize", "data", "h", "w", "x1", "y1", "groupsNode", "groupLabelContainer", "shiftedX1", "shiftedY1", "bkgElem", "getIconSVG", "drawServices", "elem", "services", "config", "serviceElem", "divElem", "sanitizeText", "height", "drawJunctions", "junctions", "junction", "junctionElem", "registerIconPacks", "cytoscape", "fcose", "addServices", "addJunctions", "positionNodes", "addGroups", "groups", "addEdges", "edges", "parsedEdge", "edgeType", "getAlignments", "flattenAlignments", "alignmentObj", "alignmentDir", "alignments2", "cnt", "arr", "i", "j", "aGroupId", "aNodeIds", "bGroupId", "bNodeIds", "keyA", "keyB", "alignments", "horizontalAlignments", "verticalAlignments", "nodeGroup", "horizontal", "vertical", "prevHoriz", "prevVert", "horiz", "vert", "getRelativeConstraints", "relativeConstraints", "posToStr", "pos", "strToPos", "p", "invSpatialMap", "directions", "curr", "currId", "currPos", "shift", "newPos", "newId", "layoutArchitecture", "resolve", "renderEl", "select_default", "alignmentConstraint", "relativePlacementConstraint", "sameGroupIdealLength", "crossGroupIdealLength", "sameGroupElasticity", "layout", "nodeA", "nodeB", "parentA", "parentB", "getSegmentWeights", "pointX", "pointY", "W", "D", "sX", "sY", "tX", "tY", "distAB", "delta1", "delta2", "sEP", "tEP", "weights", "distances", "e", "draw", "text", "_version", "diagObj", "ds", "svg", "selectSvgElement", "edgesElem", "servicesElem", "groupElem", "setupGraphViewbox", "renderer", "diagram"] +} diff --git a/templates/tabulareditor/public/blockDiagram-GPEHLZMM-4OU5ZU27.min.js b/templates/tabulareditor/public/blockDiagram-GPEHLZMM-4OU5ZU27.min.js new file mode 100644 index 000000000..60a07418d --- /dev/null +++ b/templates/tabulareditor/public/blockDiagram-GPEHLZMM-4OU5ZU27.min.js @@ -0,0 +1,133 @@ +import{a as qt}from"./chunk-MZ3CL6N5.min.js";import{D as Gt}from"./chunk-7MS36IQK.min.js";import{a as tt,d as Ut}from"./chunk-AZ7QTF4J.min.js";import{a as Vt,b as Zt}from"./chunk-7XSRMU6L.min.js";import{f as lt}from"./chunk-W44GZAG6.min.js";import{a as Xt,f as jt,p as et,r as kt}from"./chunk-YPRWTSV5.min.js";import"./chunk-HCOLC5CQ.min.js";import{B as $,F as M,H as wt,I as Ft,N as Pt,O as Wt,T as Yt,_ as C,a as At,b as Mt}from"./chunk-LXXU3C6C.min.js";import{J as Ht,N as Kt,b as g,d as L,j as _}from"./chunk-BJGJ3C53.min.js";import"./chunk-MY7PHHTQ.min.js";var Lt=(function(){var e=g(function(T,w,u,b){for(u=u||{},b=T.length;b--;u[T[b]]=w);return u},"o"),t=[1,15],a=[1,7],n=[1,13],s=[1,14],l=[1,19],r=[1,16],i=[1,17],c=[1,18],d=[8,30],o=[8,10,21,28,29,30,31,39,43,46],p=[1,23],y=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(w,u,b,S,E,h,W){var f=h.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",h[f-1]),S.setHierarchy(h[f-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",h[f]),typeof h[f].length=="number"?this.$=h[f]:this.$=[h[f]];break;case 13:S.getLogger().debug("Rule: statement #2: ",h[f-1]),this.$=[h[f-1]].concat(h[f]);break;case 14:S.getLogger().debug("Rule: link: ",h[f],w),this.$={edgeTypeStr:h[f],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",h[f-3],h[f-1],h[f]),this.$={edgeTypeStr:h[f],label:h[f-1]};break;case 18:let R=parseInt(h[f]),q=S.generateId();this.$={id:q,type:"space",label:"",width:R,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",h[f-2],h[f-1],h[f]," typestr: ",h[f-1].edgeTypeStr);let V=S.edgeStrToEdgeData(h[f-1].edgeTypeStr),ut=S.edgeStrToEdgeStartData(h[f-1].edgeTypeStr),st=S.edgeStrToThickness(h[f-1].edgeTypeStr),pt=S.edgeStrToPattern(h[f-1].edgeTypeStr);this.$=[{id:h[f-2].id,label:h[f-2].label,type:h[f-2].type,directions:h[f-2].directions},{id:h[f-2].id+"-"+h[f].id,start:h[f-2].id,end:h[f].id,label:h[f-1].label,type:"edge",thickness:st,pattern:pt,directions:h[f].directions,arrowTypeEnd:V,arrowTypeStart:ut},{id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[f-1],h[f]),this.$={id:h[f-1].id,label:h[f-1].label,type:S.typeStr2Type(h[f-1].typeStr),directions:h[f-1].directions,widthInColumns:parseInt(h[f],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",h[f]),this.$={id:h[f].id,label:h[f].label,type:S.typeStr2Type(h[f].typeStr),directions:h[f].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",h[f]),this.$={type:"column-setting",columns:h[f]==="auto"?-1:parseInt(h[f])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",h[f-2],h[f-1]);let z=S.generateId();this.$={...h[f-2],type:"composite",children:h[f-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",h[f-2],h[f-1],h[f]);let Z=S.generateId();this.$={id:Z,type:"composite",label:"",children:h[f-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",h[f]),this.$={id:h[f]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[f-1],h[f]),this.$={id:h[f-1],label:h[f].label,typeStr:h[f].typeStr,directions:h[f].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",h[f]),this.$=[h[f]];break;case 32:S.getLogger().debug("Rule: dirList: ",h[f-1],h[f]),this.$=[h[f-1]].concat(h[f]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",h[f-2],h[f-1],h[f]),this.$={typeStr:h[f-2]+h[f],label:h[f-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[f-3],h[f-2]," #3:",h[f-1],h[f]),this.$={typeStr:h[f-3]+h[f],label:h[f-2],directions:h[f-1]};break;case 35:case 36:this.$={type:"classDef",id:h[f-1].trim(),css:h[f].trim()};break;case 37:this.$={type:"applyClass",id:h[f-1].trim(),styleClass:h[f].trim()};break;case 38:this.$={type:"applyStyles",id:h[f-1].trim(),stylesStr:h[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{8:[1,20]},e(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:n,29:s,31:l,39:r,43:i,46:c}),e(o,[2,16],{14:22,15:p,16:y}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(x,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:l},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(d,[2,13]),{26:35,31:l},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:p,16:y,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:n,29:s,31:l,39:r,43:i,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(w,u){if(u.recoverable)this.trace(w);else{var b=new Error(w);throw b.hash=u,b}},"parseError"),parse:g(function(w){var u=this,b=[0],S=[],E=[null],h=[],W=this.table,f="",R=0,q=0,V=0,ut=2,st=1,pt=h.slice.call(arguments,1),z=Object.create(this.lexer),Z={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&(Z.yy[ft]=this.yy[ft]);z.setInput(w,Z.yy),Z.yy.lexer=z,Z.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var xt=z.yylloc;h.push(xt);var De=z.options&&z.options.ranges;typeof Z.yy.parseError=="function"?this.parseError=Z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(Y){b.length=b.length-2*Y,E.length=E.length-Y,h.length=h.length-Y}g(Te,"popStack");function Rt(){var Y;return Y=S.pop()||z.lex()||st,typeof Y!="number"&&(Y instanceof Array&&(S=Y,Y=S.pop()),Y=u.symbols_[Y]||Y),Y}g(Rt,"lex");for(var P,bt,J,K,ea,yt,Q={},it,G,zt,nt;;){if(J=b[b.length-1],this.defaultActions[J]?K=this.defaultActions[J]:((P===null||typeof P>"u")&&(P=Rt()),K=W[J]&&W[J][P]),typeof K>"u"||!K.length||!K[0]){var mt="";nt=[];for(it in W[J])this.terminals_[it]&&it>ut&&nt.push("'"+this.terminals_[it]+"'");z.showPosition?mt="Parse error on line "+(R+1)+`: +`+z.showPosition()+` +Expecting `+nt.join(", ")+", got '"+(this.terminals_[P]||P)+"'":mt="Parse error on line "+(R+1)+": Unexpected "+(P==st?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(mt,{text:z.match,token:this.terminals_[P]||P,line:z.yylineno,loc:xt,expected:nt})}if(K[0]instanceof Array&&K.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+P);switch(K[0]){case 1:b.push(P),E.push(z.yytext),h.push(z.yylloc),b.push(K[1]),P=null,bt?(P=bt,bt=null):(q=z.yyleng,f=z.yytext,R=z.yylineno,xt=z.yylloc,V>0&&V--);break;case 2:if(G=this.productions_[K[1]][1],Q.$=E[E.length-G],Q._$={first_line:h[h.length-(G||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(G||1)].first_column,last_column:h[h.length-1].last_column},De&&(Q._$.range=[h[h.length-(G||1)].range[0],h[h.length-1].range[1]]),yt=this.performAction.apply(Q,[f,q,R,Z.yy,K[1],E,h].concat(pt)),typeof yt<"u")return yt;G&&(b=b.slice(0,-1*G*2),E=E.slice(0,-1*G),h=h.slice(0,-1*G)),b.push(this.productions_[K[1]][0]),E.push(Q.$),h.push(Q._$),zt=W[b[b.length-2]][b[b.length-1]],b.push(zt);break;case 3:return!0}}return!0},"parse")},D=(function(){var T={EOF:1,parseError:g(function(u,b){if(this.yy.parser)this.yy.parser.parseError(u,b);else throw new Error(u)},"parseError"),setInput:g(function(w,u){return this.yy=u||this.yy||{},this._input=w,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:g(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var u=w.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:g(function(w){var u=w.length,b=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var S=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),b.length-1&&(this.yylineno-=b.length-1);var E=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:b?(b.length===S.length?this.yylloc.first_column:0)+S[S.length-b.length].length-b[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(w){this.unput(this.match.slice(w))},"less"),pastInput:g(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var w=this.pastInput(),u=new Array(w.length+1).join("-");return w+this.upcomingInput()+` +`+u+"^"},"showPosition"),test_match:g(function(w,u){var b,S,E;if(this.options.backtrack_lexer&&(E={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&&(E.yylloc.range=this.yylloc.range.slice(0))),S=w[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,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(w[0].length),this.matched+=w[0],b=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),b)return b;if(this._backtrack){for(var h in E)this[h]=E[h];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,u,b,S;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),h=0;hu[0].length)){if(u=b,S=h,this.options.backtrack_lexer){if(w=this.test_match(b,E[h]),w!==!1)return w;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(w=this.test_match(u,E[S]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var u=this.next();return u||this.lex()},"lex"),begin:g(function(u){this.conditionStack.push(u)},"begin"),popState:g(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(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:g(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:g(function(u){this.begin(u)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(u,b,S,E){var h=E;switch(S){case 0:return u.getLogger().debug("Found block-beta"),10;break;case 1:return u.getLogger().debug("Found id-block"),29;break;case 2:return u.getLogger().debug("Found block"),10;break;case 3:u.getLogger().debug(".",b.yytext);break;case 4:u.getLogger().debug("_",b.yytext);break;case 5:return 5;case 6:return b.yytext=-1,28;break;case 7:return b.yytext=b.yytext.replace(/columns\s+/,""),u.getLogger().debug("COLUMNS (LEX)",b.yytext),28;break;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:u.getLogger().debug("LEX: POPPING STR:",b.yytext),this.popState();break;case 13:return u.getLogger().debug("LEX: STR end:",b.yytext),"STR";break;case 14:return b.yytext=b.yytext.replace(/space\:/,""),u.getLogger().debug("SPACE NUM (LEX)",b.yytext),21;break;case 15:return b.yytext="1",u.getLogger().debug("COLUMNS (LEX)",b.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),u.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),u.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),u.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),u.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),u.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),u.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),u.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),u.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),u.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),u.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),u.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),u.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return u.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return u.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return u.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return u.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return u.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return u.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return u.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),u.getLogger().debug("LEX ARR START"),37;break;case 74:return u.getLogger().debug("Lex: NODE_ID",b.yytext),31;break;case 75:return u.getLogger().debug("Lex: EOF",b.yytext),8;break;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:u.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:u.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return u.getLogger().debug("LEX: NODE_DESCR:",b.yytext),"NODE_DESCR";break;case 83:u.getLogger().debug("LEX POPPING"),this.popState();break;case 84:u.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return b.yytext=b.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (right): dir:",b.yytext),"DIR";break;case 86:return b.yytext=b.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (left):",b.yytext),"DIR";break;case 87:return b.yytext=b.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (x):",b.yytext),"DIR";break;case 88:return b.yytext=b.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (y):",b.yytext),"DIR";break;case 89:return b.yytext=b.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (up):",b.yytext),"DIR";break;case 90:return b.yytext=b.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (down):",b.yytext),"DIR";break;case 91:return b.yytext="]>",u.getLogger().debug("Lex (ARROW_DIR end):",b.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return u.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;break;case 93:return u.getLogger().debug("Lex: LINK",b.yytext),15;break;case 94:return u.getLogger().debug("Lex: LINK",b.yytext),15;break;case 95:return u.getLogger().debug("Lex: LINK",b.yytext),15;break;case 96:return u.getLogger().debug("Lex: START_LINK",b.yytext),this.pushState("LLABEL"),16;break;case 97:return u.getLogger().debug("Lex: START_LINK",b.yytext),this.pushState("LLABEL"),16;break;case 98:return u.getLogger().debug("Lex: START_LINK",b.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return u.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),u.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;break;case 102:return this.popState(),u.getLogger().debug("Lex: LINK",b.yytext),15;break;case 103:return this.popState(),u.getLogger().debug("Lex: LINK",b.yytext),15;break;case 104:return u.getLogger().debug("Lex: COLON",b.yytext),b.yytext=b.yytext.slice(1),27;break}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return T})();k.lexer=D;function N(){this.yy={}}return g(N,"Parser"),N.prototype=k,k.Parser=N,new N})();Lt.parser=Lt;var Be=Lt,X=new Map,Tt=[],vt=new Map,Jt="color",Qt="fill",Ie="bgFill",ne=",",Ne=C(),ot=new Map,Bt="",Ce=g(e=>Pt.sanitizeText(e,Ne),"sanitizeText"),Oe=g(function(e,t=""){let a=ot.get(e);a||(a={id:e,styles:[],textStyles:[]},ot.set(e,a)),t?.split(ne).forEach(n=>{let s=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Jt).exec(n)){let r=s.replace(Qt,Ie).replace(Jt,Qt);a.textStyles.push(r)}a.styles.push(s)})},"addStyleClass"),Re=g(function(e,t=""){let a=X.get(e);t!=null&&(a.styles=t.split(ne))},"addStyle2Node"),ze=g(function(e,t){e.split(",").forEach(function(a){let n=X.get(a);if(n===void 0){let s=a.trim();n={id:s,type:"na",children:[]},X.set(s,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),le=g((e,t)=>{let a=e.flat(),n=[],l=a.find(r=>r?.type==="column-setting")?.columns??-1;for(let r of a){if(typeof l=="number"&&l>0&&r.type!=="column-setting"&&typeof r.widthInColumns=="number"&&r.widthInColumns>l&&L.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${l}`),r.label&&(r.label=Ce(r.label)),r.type==="classDef"){Oe(r.id,r.css);continue}if(r.type==="applyClass"){ze(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){r?.stylesStr&&Re(r.id,r?.stylesStr);continue}if(r.type==="column-setting")t.columns=r.columns??-1;else if(r.type==="edge"){let i=(vt.get(r.id)??0)+1;vt.set(r.id,i),r.id=i+"-"+r.id,Tt.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);let i=X.get(r.id);if(i===void 0?X.set(r.id,r):(r.type!=="na"&&(i.type=r.type),r.label!==r.id&&(i.label=r.label)),r.children&&le(r.children,r),r.type==="space"){let c=r.width??1;for(let d=0;d{L.debug("Clear called"),Yt(),at={id:"root",type:"composite",children:[],columns:-1},X=new Map([["root",at]]),It=[],ot=new Map,Tt=[],vt=new Map,Bt=""},"clear");function ce(e){switch(L.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return L.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}g(ce,"typeStr2Type");function oe(e){return L.debug("typeStr2Type",e),e==="=="?"thick":"normal"}g(oe,"edgeTypeStr2Type");function he(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}g(he,"edgeStrToEdgeData");function de(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}g(de,"edgeStrToEdgeStartData");function ge(e){return e.includes("==")?"thick":"normal"}g(ge,"edgeStrToThickness");function ue(e){return e.includes(".-")?"dotted":"solid"}g(ue,"edgeStrToPattern");var $t=0,Me=g(()=>($t++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$t),"generateId"),Fe=g(e=>{at.children=e,le(e,at),It=at.children},"setHierarchy"),Pe=g(e=>{let t=X.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),We=g(()=>[...X.values()],"getBlocksFlat"),Ye=g(()=>It||[],"getBlocks"),He=g(()=>Tt,"getEdges"),Ke=g(e=>X.get(e),"getBlock"),Ue=g(e=>{X.set(e.id,e)},"setBlock"),Xe=g(e=>{Bt=e},"setDiagramId"),je=g(()=>Bt,"getDiagramId"),Ve=g(()=>L,"getLogger"),Ze=g(function(){return ot},"getClasses"),Ge={getConfig:g(()=>$().block,"getConfig"),typeStr2Type:ce,edgeTypeStr2Type:oe,edgeStrToEdgeData:he,edgeStrToEdgeStartData:de,edgeStrToThickness:ge,edgeStrToPattern:ue,getLogger:Ve,getBlocksFlat:We,getBlocks:Ye,getEdges:He,setHierarchy:Fe,getBlock:Ke,setBlock:Ue,getColumns:Pe,getClasses:Ze,clear:Ae,generateId:Me,setDiagramId:Xe,getDiagramId:je},qe=Ge,St=g((e,t)=>{let a=Mt,n=a(e,"r"),s=a(e,"g"),l=a(e,"b");return At(n,s,l,t)},"fade"),Je=g(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span,p { + color: ${e.titleColor}; + } + + + + .label text,span,p { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + /* + * This is for backward compatibility with existing code that didn't + * add a \`

\` around edge labels. + * + * TODO: We should probably remove this in a future release. + */ + p { + margin: 0; + padding: 0; + display: inline; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${e.edgeLabelBackground}; + } + + .node .cluster { + // fill: ${St(e.mainBkg,.5)}; + fill: ${St(e.clusterBkg,.5)}; + stroke: ${St(e.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span,p { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + ${qt()} +`,"getStyles"),Qe=Je,$e=g((e,t,a,n)=>{t.forEach(s=>{or[s](e,a,n)})},"insertMarkers"),tr=g((e,t,a)=>{L.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),er=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),rr=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),ar=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),sr=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),ir=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).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",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).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")},"point"),nr=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+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",a+"_"+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")},"circle"),lr=g((e,t,a)=>{e.append("marker").attr("id",a+"_"+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",a+"_"+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")},"cross"),cr=g((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+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 L9,13 L14,7 L9,1 Z")},"barb"),or={extension:tr,composition:er,aggregation:rr,dependency:ar,lollipop:sr,point:ir,circle:nr,cross:lr,barb:cr},hr=$e,O=C()?.block?.padding??8;function Et(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};let a=t%e,n=Math.floor(t/e);return{px:a,py:n}}g(Et,"calculateBlockPosition");var dr=g(e=>{let t=0,a=0;for(let n of e.children){let{width:s,height:l,x:r,y:i}=n.size??{width:0,height:0,x:0,y:0};if(L.debug("getMaxChildSize abc95 child:",n.id,"width:",s,"height:",l,"x:",r,"y:",i,n.type),n.type==="space")continue;let c=s/(n.widthInColumns??1);c>t&&(t=c),l>a&&(a=l)}return{width:t,height:a}},"getMaxChildSize");function ht(e,t,a=0,n=0){L.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",a),e?.size?.width||(e.size={width:a,height:n,x:0,y:0});let s=0,l=0;if(e.children?.length>0){for(let x of e.children)ht(x,t);let r=dr(e);s=r.width,l=r.height,L.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",s,l);for(let x of e.children)x.size&&(L.debug(`abc95 Setting size of children of ${e.id} id=${x.id} ${s} ${l} ${JSON.stringify(x.size)}`),x.size.width=s*(x.widthInColumns??1)+O*((x.widthInColumns??1)-1),x.size.height=l,x.size.x=0,x.size.y=0,L.debug(`abc95 updating size of ${e.id} children child:${x.id} maxWidth:${s} maxHeight:${l}`));for(let x of e.children)ht(x,t,s,l);let i=e.columns??-1,c=0;for(let x of e.children)c+=x.widthInColumns??1;let d=e.children.length;i>0&&i0?Math.min(e.children.length,i):e.children.length;if(x>0){let m=(p-x*O-O)/x;L.debug("abc95 (growing to fit) width",e.id,p,e.size?.width,m);for(let v of e.children)v.size&&(v.size.width=m)}}e.size={width:p,height:y,x:0,y:0}}L.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}g(ht,"setBlockSizes");function Nt(e,t){L.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let a=e.columns??-1;if(L.debug("layoutBlocks columns abc95",e.id,"=>",a,e),e.children&&e.children.length>0){let n=e?.children[0]?.size?.width??0,s=e.children.length*n+(e.children.length-1)*O;L.debug("widthOfChildren 88",s,"posX");let l=new Map;{let o=0;for(let p of e.children){if(!p.size)continue;let{py:y}=Et(a,o),x=l.get(y)??0;p.size.height>x&&l.set(y,p.size.height);let m=p?.widthInColumns??1;a>0&&(m=Math.min(m,a-o%a)),o+=m}}let r=new Map;{let o=0,p=[...l.keys()].sort((y,x)=>y-x);for(let y of p)r.set(y,o),o+=(l.get(y)??0)+O}let i=0;L.debug("abc91 block?.size?.x",e.id,e?.size?.x);let c=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-O,d=0;for(let o of e.children){let p=e;if(!o.size)continue;let{width:y,height:x}=o.size,{px:m,py:v}=Et(a,i);if(v!=d&&(d=v,c=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-O,L.debug("New row in layout for block",e.id," and child ",o.id,d)),L.debug(`abc89 layout blocks (child) id: ${o.id} Pos: ${i} (px, py) ${m},${v} (${p?.size?.x},${p?.size?.y}) parent: ${p.id} width: ${y}${O}`),p.size){let D=y/2;o.size.x=c+O+D,L.debug(`abc91 layout blocks (calc) px, pyid:${o.id} startingPos=X${c} new startingPosX${o.size.x} ${D} padding=${O} width=${y} halfWidth=${D} => x:${o.size.x} y:${o.size.y} ${o.widthInColumns} (width * (child?.w || 1)) / 2 ${y*(o?.widthInColumns??1)/2}`),c=o.size.x+D;let N=r.get(v)??0,T=l.get(v)??x;o.size.y=p.size.y-p.size.height/2+N+T/2+O,L.debug(`abc88 layout blocks (calc) px, pyid:${o.id}startingPosX${c}${O}${D}=>x:${o.size.x}y:${o.size.y}${o.widthInColumns}(width * (child?.w || 1)) / 2${y*(o?.widthInColumns??1)/2}`)}o.children&&Nt(o,t);let k=o?.widthInColumns??1;a>0&&(k=Math.min(k,a-i%a)),i+=k,L.debug("abc88 columnsPos",o,i)}}L.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}g(Nt,"layoutBlocks");function Ct(e,{minX:t,minY:a,maxX:n,maxY:s}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:l,y:r,width:i,height:c}=e.size;l-i/2n&&(n=l+i/2),r+c/2>s&&(s=r+c/2)}if(e.children)for(let l of e.children)({minX:t,minY:a,maxX:n,maxY:s}=Ct(l,{minX:t,minY:a,maxX:n,maxY:s}));return{minX:t,minY:a,maxX:n,maxY:s}}g(Ct,"findBounds");function pe(e){let t=e.getBlock("root");if(!t)return;ht(t,e,0,0),Nt(t,e),L.debug("getBlocks",JSON.stringify(t,null,2));let{minX:a,minY:n,maxX:s,maxY:l}=Ct(t),r=l-n,i=s-a;return{x:a,y:n,width:i,height:r}}g(pe,"layout");var gr=g(async(e,t,a,n=!1,s=!1)=>{let l=t||"";typeof l=="object"&&(l=l[0]);let r=C(),i=M(r);return await lt(e,l,{style:a,isTitle:n,useHtmlLabels:i,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},r)},"createLabel"),U=gr,ur=g((e,t,a,n,s)=>{t.arrowTypeStart&&te(e,"start",t.arrowTypeStart,a,n,s),t.arrowTypeEnd&&te(e,"end",t.arrowTypeEnd,a,n,s)},"addEdgeMarkers"),pr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},te=g((e,t,a,n,s,l)=>{let r=pr[a];if(!r){L.warn(`Unknown arrow type: ${a}`);return}let i=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${n}#${s}_${l}-${r}${i})`)},"addEdgeMarker"),_t={},F={},fr=g(async(e,t)=>{let a=C(),n=M(a),s=e.insert("g").attr("class","edgeLabel"),l=s.insert("g").attr("class","label"),r=t.labelType==="markdown",i=await lt(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:r,isNode:!1,markdown:r,width:r?void 0:Number.POSITIVE_INFINITY},a);l.node().appendChild(i);let c=i.getBBox(),d=c;if(n){let p=i.children[0],y=_(i);c=p.getBoundingClientRect(),d=c,y.attr("width",c.width),y.attr("height",c.height)}else{let p=_(i).select("text").node();p&&typeof p.getBBox=="function"&&(d=p.getBBox())}l.attr("transform",tt(d,n)),_t[t.id]=s,t.width=c.width,t.height=c.height;let o;if(t.startLabelLeft){let p=e.insert("g").attr("class","edgeTerminals"),y=p.insert("g").attr("class","inner"),x=await U(y,t.startLabelLeft,t.labelStyle);o=x;let m=x.getBBox();if(n){let v=x.children[0],k=_(x);m=v.getBoundingClientRect(),k.attr("width",m.width),k.attr("height",m.height)}y.attr("transform",tt(m,n)),F[t.id]||(F[t.id]={}),F[t.id].startLeft=p,rt(o,t.startLabelLeft)}if(t.startLabelRight){let p=e.insert("g").attr("class","edgeTerminals"),y=p.insert("g").attr("class","inner"),x=await U(y,t.startLabelRight,t.labelStyle);o=x;let m=x.getBBox();if(n){let v=x.children[0],k=_(x);m=v.getBoundingClientRect(),k.attr("width",m.width),k.attr("height",m.height)}y.attr("transform",tt(m,n)),F[t.id]||(F[t.id]={}),F[t.id].startRight=p,rt(o,t.startLabelRight)}if(t.endLabelLeft){let p=e.insert("g").attr("class","edgeTerminals"),y=p.insert("g").attr("class","inner"),x=await U(p,t.endLabelLeft,t.labelStyle);o=x;let m=x.getBBox();if(n){let v=x.children[0],k=_(x);m=v.getBoundingClientRect(),k.attr("width",m.width),k.attr("height",m.height)}y.attr("transform",tt(m,n)),F[t.id]||(F[t.id]={}),F[t.id].endLeft=p,rt(o,t.endLabelLeft)}if(t.endLabelRight){let p=e.insert("g").attr("class","edgeTerminals"),y=p.insert("g").attr("class","inner"),x=await U(p,t.endLabelRight,t.labelStyle);o=x;let m=x.getBBox();if(n){let v=x.children[0],k=_(x);m=v.getBoundingClientRect(),k.attr("width",m.width),k.attr("height",m.height)}y.attr("transform",tt(m,n)),F[t.id]||(F[t.id]={}),F[t.id].endRight=p,rt(o,t.endLabelRight)}return i},"insertEdgeLabel");function rt(e,t){M(C())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(rt,"setTerminalWidth");var xr=g((e,t)=>{L.debug("Moving label abc88 ",e.id,e.label,_t[e.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath,n=C(),{subGraphTitleTotalMargin:s}=Vt(n);if(e.label){let l=_t[e.id],r=e.x,i=e.y;if(a){let c=et.calcLabelPosition(a);L.debug("Moving label "+e.label+" from (",r,",",i,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(r=c.x,i=c.y)}l.attr("transform",`translate(${r}, ${i+s/2})`)}if(e.startLabelLeft){let l=F[e.id].startLeft,r=e.x,i=e.y;if(a){let c=et.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",a);r=c.x,i=c.y}l.attr("transform",`translate(${r}, ${i})`)}if(e.startLabelRight){let l=F[e.id].startRight,r=e.x,i=e.y;if(a){let c=et.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",a);r=c.x,i=c.y}l.attr("transform",`translate(${r}, ${i})`)}if(e.endLabelLeft){let l=F[e.id].endLeft,r=e.x,i=e.y;if(a){let c=et.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",a);r=c.x,i=c.y}l.attr("transform",`translate(${r}, ${i})`)}if(e.endLabelRight){let l=F[e.id].endRight,r=e.x,i=e.y;if(a){let c=et.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",a);r=c.x,i=c.y}l.attr("transform",`translate(${r}, ${i})`)}},"positionEdgeLabel"),br=g((e,t)=>{let a=e.x,n=e.y,s=Math.abs(t.x-a),l=Math.abs(t.y-n),r=e.width/2,i=e.height/2;return s>=r||l>=i},"outsideNode"),yr=g((e,t,a)=>{L.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(a)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let n=e.x,s=e.y,l=Math.abs(n-a.x),r=e.width/2,i=a.xMath.abs(n-t.x)*c){let p=a.y{L.debug("abc88 cutPathAtIntersect",e,t);let a=[],n=e[0],s=!1;return e.forEach(l=>{if(!br(t,l)&&!s){let r=yr(t,n,l),i=!1;a.forEach(c=>{i=i||c.x===r.x&&c.y===r.y}),a.some(c=>c.x===r.x&&c.y===r.y)||a.push(r),s=!0}else n=l,s||a.push(l)}),a},"cutPathAtIntersect"),mr=g(function(e,t,a,n,s,l,r){let i=a.points;L.debug("abc88 InsertEdge: edge=",a,"e=",t);let c=!1,d=l.node(t.v);var o=l.node(t.w);o?.intersect&&d?.intersect&&(i=i.slice(1,a.points.length-1),i.unshift(d.intersect(i[0])),i.push(o.intersect(i[i.length-1]))),a.toCluster&&(L.debug("to cluster abc88",n[a.toCluster]),i=ee(a.points,n[a.toCluster].node),c=!0),a.fromCluster&&(L.debug("from cluster abc88",n[a.fromCluster]),i=ee(i.reverse(),n[a.fromCluster].node).reverse(),c=!0);let p=i.filter(w=>!Number.isNaN(w.y)),y=Kt;a.curve&&(s==="graph"||s==="flowchart")&&(y=a.curve);let{x,y:m}=Ut(a),v=Ht().x(x).y(m).curve(y),k;switch(a.thickness){case"normal":k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-thick";break;default:k=""}switch(a.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed";break}let D=e.append("path").attr("d",v(p)).attr("id",a.id).attr("class"," "+k+(a.classes?" "+a.classes:"")).attr("style",a.style),N="";(C().flowchart.arrowMarkerAbsolute||C().state.arrowMarkerAbsolute)&&(N=Ft(!0)),ur(D,a,N,r,s);let T={};return c&&(T.updatedPath=i),T.originalPath=a.points,T},"insertEdge"),wr=g(e=>{let t=new Set;for(let a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},"expandAndDeduplicateDirections"),kr=g((e,t,a,n)=>{let s=wr(e),l=2,r=t.height+2*a.padding,i=r/l,c=n??t.width+2*i+a.padding,d=a.padding/2;return s.has("right")&&s.has("left")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:i,y:0},{x:c/2,y:2*d},{x:c-i,y:0},{x:c,y:0},{x:c,y:-r/3},{x:c+2*d,y:-r/2},{x:c,y:-2*r/3},{x:c,y:-r},{x:c-i,y:-r},{x:c/2,y:-r-2*d},{x:i,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*d,y:-r/2},{x:0,y:-r/3}]:s.has("right")&&s.has("left")&&s.has("up")?[{x:i,y:0},{x:c-i,y:0},{x:c,y:-r/2},{x:c-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}]:s.has("right")&&s.has("left")&&s.has("down")?[{x:0,y:0},{x:i,y:-r},{x:c-i,y:-r},{x:c,y:0}]:s.has("right")&&s.has("up")&&s.has("down")?[{x:0,y:0},{x:c,y:-i},{x:c,y:-r+i},{x:0,y:-r}]:s.has("left")&&s.has("up")&&s.has("down")?[{x:c,y:0},{x:0,y:-i},{x:0,y:-r+i},{x:c,y:-r}]:s.has("right")&&s.has("left")?[{x:i,y:0},{x:i,y:-d},{x:c-i,y:-d},{x:c-i,y:0},{x:c,y:-r/2},{x:c-i,y:-r},{x:c-i,y:-r+d},{x:i,y:-r+d},{x:i,y:-r},{x:0,y:-r/2}]:s.has("up")&&s.has("down")?[{x:c/2,y:0},{x:0,y:-d},{x:i,y:-d},{x:i,y:-r+d},{x:0,y:-r+d},{x:c/2,y:-r},{x:c,y:-r+d},{x:c-i,y:-r+d},{x:c-i,y:-d},{x:c,y:-d}]:s.has("right")&&s.has("up")?[{x:0,y:0},{x:c,y:-i},{x:0,y:-r}]:s.has("right")&&s.has("down")?[{x:0,y:0},{x:c,y:0},{x:0,y:-r}]:s.has("left")&&s.has("up")?[{x:c,y:0},{x:0,y:-i},{x:c,y:-r}]:s.has("left")&&s.has("down")?[{x:c,y:0},{x:0,y:0},{x:c,y:-r}]:s.has("right")?[{x:i,y:-d},{x:i,y:-d},{x:c-i,y:-d},{x:c-i,y:0},{x:c,y:-r/2},{x:c-i,y:-r},{x:c-i,y:-r+d},{x:i,y:-r+d},{x:i,y:-r+d}]:s.has("left")?[{x:i,y:0},{x:i,y:-d},{x:c-i,y:-d},{x:c-i,y:-r+d},{x:i,y:-r+d},{x:i,y:-r},{x:0,y:-r/2}]:s.has("up")?[{x:i,y:-d},{x:i,y:-r+d},{x:0,y:-r+d},{x:c/2,y:-r},{x:c,y:-r+d},{x:c-i,y:-r+d},{x:c-i,y:-d}]:s.has("down")?[{x:c/2,y:0},{x:0,y:-d},{x:i,y:-d},{x:i,y:-r+d},{x:c-i,y:-r+d},{x:c-i,y:-d},{x:c,y:-d}]:[{x:0,y:0}]},"getArrowPoints");function fe(e,t){return e.intersect(t)}g(fe,"intersectNode");var Sr=fe;function xe(e,t,a,n){var s=e.x,l=e.y,r=s-n.x,i=l-n.y,c=Math.sqrt(t*t*i*i+a*a*r*r),d=Math.abs(t*a*r/c);n.x0}g(Dt,"sameSign");var vr=me,Er=we;function we(e,t,a){var n=e.x,s=e.y,l=[],r=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(m){r=Math.min(r,m.x),i=Math.min(i,m.y)}):(r=Math.min(r,t.x),i=Math.min(i,t.y));for(var c=n-e.width/2-r,d=s-e.height/2-i,o=0;o1&&l.sort(function(m,v){var k=m.x-a.x,D=m.y-a.y,N=Math.sqrt(k*k+D*D),T=v.x-a.x,w=v.y-a.y,u=Math.sqrt(T*T+w*w);return N{var a=e.x,n=e.y,s=t.x-a,l=t.y-n,r=e.width/2,i=e.height/2,c,d;return Math.abs(l)*r>Math.abs(s)*i?(l<0&&(i=-i),c=l===0?0:i*s/l,d=i):(s<0&&(r=-r),c=r,d=s===0?0:r*l/s),{x:a+c,y:n+d}},"intersectRect"),Dr=_r,B={node:Sr,circle:Lr,ellipse:be,polygon:Er,rect:Dr},A=g(async(e,t,a,n)=>{let s=C(),l,r=t.useHtmlLabels||M(s);a?l=a:l="node default";let i=e.insert("g").attr("class",l).attr("id",t.domId||t.id),c=i.insert("g").attr("class","label").attr("style",t.labelStyle),d;t.labelText===void 0?d="":d=typeof t.labelText=="string"?t.labelText:t.labelText[0];let o;t.labelType==="markdown"?o=lt(c,wt(kt(d),s),{useHtmlLabels:r,width:t.width||s.flowchart.wrappingWidth,classes:"markdown-node-label"},s):o=await U(c,wt(kt(d),s),t.labelStyle,!1,n);let p=o.getBBox(),y=t.padding/2;if(M(s)){let x=o.children[0],m=_(o);await Zt(x,d),p=x.getBoundingClientRect(),m.attr("width",p.width),m.attr("height",p.height)}return r?c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):c.attr("transform","translate(0, "+-p.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:i,bbox:p,halfPadding:y,label:c}},"labelHelper"),I=g((e,t)=>{let a=t.node().getBBox();e.width=a.width,e.height=a.height},"updateNodeBounds");function j(e,t,a,n){return e.insert("polygon",":first-child").attr("points",n.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}g(j,"insertPolygonShape");var Tr=g(async(e,t)=>{t.useHtmlLabels||M(C())||(t.centerLabel=!0);let{shapeSvg:n,bbox:s,halfPadding:l}=await A(e,t,"node "+t.classes,!0);L.info("Classes = ",t.classes);let r=n.insert("rect",":first-child");return r.attr("rx",t.rx).attr("ry",t.ry).attr("x",-s.width/2-l).attr("y",-s.height/2-l).attr("width",s.width+t.padding).attr("height",s.height+t.padding),I(t,r),t.intersect=function(i){return B.rect(t,i)},n},"note"),Br=Tr,re=g(e=>e?" "+e:"","formatClass"),H=g((e,t)=>`${t||"node default"}${re(e.classes)} ${re(e.class)}`,"getClassesFromNode"),ae=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=s+l,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];L.info("Question main (Circle)");let c=j(a,r,r,i);return c.attr("style",t.style),I(t,c),t.intersect=function(d){return L.warn("Intersect called"),B.polygon(t,i,d)},a},"question"),Ir=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return a.insert("polygon",":first-child").attr("points",s.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return B.circle(t,14,r)},a},"choice"),Nr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=4,l=t.positioned?t.height:n.height+t.padding,r=l/s,i=t.positioned?t.width:n.width+2*r+t.padding,c=[{x:r,y:0},{x:i-r,y:0},{x:i,y:-l/2},{x:i-r,y:-l},{x:r,y:-l},{x:0,y:-l/2}],d=j(a,i,l,c);return d.attr("style",t.style),I(t,d),t.intersect=function(o){return B.polygon(t,c,o)},a},"hexagon"),Cr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,void 0,!0),s=2,l=n.height+2*t.padding,r=l/s,i=n.width+2*r+t.padding,d=t.positioned&&(t.widthInColumns??1)>1&&t.width>i?t.width:i,o=kr(t.directions,n,t,d),p=j(a,d,l,o);return p.attr("style",t.style),I(t,p),t.intersect=function(y){return B.polygon(t,o,y)},a},"block_arrow"),Or=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:-l/2,y:0},{x:s,y:0},{x:s,y:-l},{x:-l/2,y:-l},{x:0,y:-l/2}];return j(a,s,l,r).attr("style",t.style),t.width=s+l,t.height=l,t.intersect=function(c){return B.polygon(t,r,c)},a},"rect_left_inv_arrow"),Rr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:-2*l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"lean_right"),zr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:2*l/6,y:0},{x:s+l/6,y:0},{x:s-2*l/6,y:-l},{x:-l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"lean_left"),Ar=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:-2*l/6,y:0},{x:s+2*l/6,y:0},{x:s-l/6,y:-l},{x:l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"trapezoid"),Mr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:l/6,y:0},{x:s-l/6,y:0},{x:s+2*l/6,y:-l},{x:-2*l/6,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"inv_trapezoid"),Fr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:0,y:0},{x:s+l/2,y:0},{x:s,y:-l/2},{x:s+l/2,y:-l},{x:0,y:-l}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"rect_right_inv_arrow"),Pr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=s/2,r=l/(2.5+s/50),i=n.height+r+t.padding,c="M 0,"+r+" a "+l+","+r+" 0,0,0 "+s+" 0 a "+l+","+r+" 0,0,0 "+-s+" 0 l 0,"+i+" a "+l+","+r+" 0,0,0 "+s+" 0 l 0,"+-i,d=a.attr("label-offset-y",r).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-s/2+","+-(i/2+r)+")");return I(t,d),t.intersect=function(o){let p=B.rect(t,o),y=p.x-t.x;if(l!=0&&(Math.abs(y)t.height/2-r)){let x=r*r*(1-y*y/(l*l));x!=0&&(x=Math.sqrt(x)),x=r-x,o.y-t.y>0&&(x=-x),p.y+=x}return p},a},"cylinder"),Wr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,"node "+t.classes+" "+t.class,!0),l=a.insert("rect",":first-child"),r=t.positioned?t.width:n.width+t.padding,i=t.positioned?t.height:n.height+t.padding,c=t.positioned?-r/2:-n.width/2-s,d=t.positioned?-i/2:-n.height/2-s;if(l.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",d).attr("width",r).attr("height",i),t.props){let o=new Set(Object.keys(t.props));t.props.borders&&(dt(l,t.props.borders,r,i),o.delete("borders")),o.forEach(p=>{L.warn(`Unknown node property ${p}`)})}return I(t,l),t.intersect=function(o){return B.rect(t,o)},a},"rect"),Yr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,"node "+t.classes,!0),l=a.insert("rect",":first-child"),r=t.positioned?t.width:n.width+t.padding,i=t.positioned?t.height:n.height+t.padding,c=t.positioned?-r/2:-n.width/2-s,d=t.positioned?-i/2:-n.height/2-s;if(l.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",d).attr("width",r).attr("height",i),t.props){let o=new Set(Object.keys(t.props));t.props.borders&&(dt(l,t.props.borders,r,i),o.delete("borders")),o.forEach(p=>{L.warn(`Unknown node property ${p}`)})}return I(t,l),t.intersect=function(o){return B.rect(t,o)},a},"composite"),Hr=g(async(e,t)=>{let{shapeSvg:a}=await A(e,t,"label",!0);L.trace("Classes = ",t.class);let n=a.insert("rect",":first-child"),s=0,l=0;if(n.attr("width",s).attr("height",l),a.attr("class","label edgeLabel"),t.props){let r=new Set(Object.keys(t.props));t.props.borders&&(dt(n,t.props.borders,s,l),r.delete("borders")),r.forEach(i=>{L.warn(`Unknown node property ${i}`)})}return I(t,n),t.intersect=function(r){return B.rect(t,r)},a},"labelRect");function dt(e,t,a,n){let s=[],l=g(i=>{s.push(i,0)},"addBorder"),r=g(i=>{s.push(0,i)},"skipBorder");t.includes("t")?(L.debug("add top border"),l(a)):r(a),t.includes("r")?(L.debug("add right border"),l(n)):r(n),t.includes("b")?(L.debug("add bottom border"),l(a)):r(a),t.includes("l")?(L.debug("add left border"),l(n)):r(n),e.attr("stroke-dasharray",s.join(" "))}g(dt,"applyNodePropertyBorders");var Kr=g(async(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";let n=e.insert("g").attr("class",a).attr("id",t.domId||t.id),s=n.insert("rect",":first-child"),l=n.insert("line"),r=n.insert("g").attr("class","label"),i=t.labelText.flat?t.labelText.flat():t.labelText,c="";typeof i=="object"?c=i[0]:c=i,L.info("Label text abc79",c,i,typeof i=="object");let d=await U(r,c,t.labelStyle,!0,!0),o={width:0,height:0};if(M(C())){let v=d.children[0],k=_(d);o=v.getBoundingClientRect(),k.attr("width",o.width),k.attr("height",o.height)}L.info("Text 2",i);let p=i.slice(1,i.length),y=d.getBBox(),x=await U(r,p.join?p.join("
"):p,t.labelStyle,!0,!0);if(M(C())){let v=x.children[0],k=_(x);o=v.getBoundingClientRect(),k.attr("width",o.width),k.attr("height",o.height)}let m=t.padding/2;return _(x).attr("transform","translate( "+(o.width>y.width?0:(y.width-o.width)/2)+", "+(y.height+m+5)+")"),_(d).attr("transform","translate( "+(o.width{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.height+t.padding,l=n.width+s/4+t.padding,r=a.insert("rect",":first-child").attr("style",t.style).attr("rx",s/2).attr("ry",s/2).attr("x",-l/2).attr("y",-s/2).attr("width",l).attr("height",s);return I(t,r),t.intersect=function(i){return B.rect(t,i)},a},"stadium"),Xr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,H(t,void 0),!0),l=a.insert("circle",":first-child");return l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("Circle main"),I(t,l),t.intersect=function(r){return L.info("Circle intersect",t,n.width/2+s,r),B.circle(t,n.width/2+s,r)},a},"circle"),jr=g(async(e,t)=>{let{shapeSvg:a,bbox:n,halfPadding:s}=await A(e,t,H(t,void 0),!0),l=5,r=a.insert("g",":first-child"),i=r.insert("circle"),c=r.insert("circle");return r.attr("class",t.class),i.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s+l).attr("width",n.width+t.padding+l*2).attr("height",n.height+t.padding+l*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+s).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("DoubleCircle main"),I(t,i),t.intersect=function(d){return L.info("DoubleCircle intersect",t,n.width/2+s+l,d),B.circle(t,n.width/2+s+l,d)},a},"doublecircle"),Vr=g(async(e,t)=>{let{shapeSvg:a,bbox:n}=await A(e,t,H(t,void 0),!0),s=n.width+t.padding,l=n.height+t.padding,r=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}],i=j(a,s,l,r);return i.attr("style",t.style),I(t,i),t.intersect=function(c){return B.polygon(t,r,c)},a},"subroutine"),Zr=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=a.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),I(t,n),t.intersect=function(s){return B.circle(t,7,s)},a},"start"),se=g((e,t,a)=>{let n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=70,l=10;a==="LR"&&(s=10,l=70);let r=n.append("rect").attr("x",-1*s/2).attr("y",-1*l/2).attr("width",s).attr("height",l).attr("class","fork-join");return I(t,r),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(i){return B.rect(t,i)},n},"forkJoin"),Gr=g((e,t)=>{let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=a.insert("circle",":first-child"),s=a.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),I(t,s),t.intersect=function(l){return B.circle(t,7,l)},a},"end"),qr=g(async(e,t)=>{let a=t.padding/2,n=4,s=8,l;t.classes?l="node "+t.classes:l="node default";let r=e.insert("g").attr("class",l).attr("id",t.domId||t.id),i=r.insert("rect",":first-child"),c=r.insert("line"),d=r.insert("line"),o=0,p=n,y=r.insert("g").attr("class","label"),x=0,m=t.classData.annotations?.[0],v=t.classData.annotations[0]?"\xAB"+t.classData.annotations[0]+"\xBB":"",k=await U(y,v,t.labelStyle,!0,!0),D=k.getBBox();if(M(C())){let E=k.children[0],h=_(k);D=E.getBoundingClientRect(),h.attr("width",D.width),h.attr("height",D.height)}t.classData.annotations[0]&&(p+=D.height+n,o+=D.width);let N=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(M(C())?N+="<"+t.classData.type+">":N+="<"+t.classData.type+">");let T=await U(y,N,t.labelStyle,!0,!0);_(T).attr("class","classTitle");let w=T.getBBox();if(M(C())){let E=T.children[0],h=_(T);w=E.getBoundingClientRect(),h.attr("width",w.width),h.attr("height",w.height)}p+=w.height+n,w.width>o&&(o=w.width);let u=[];t.classData.members.forEach(async E=>{let h=E.getDisplayDetails(),W=h.displayText;M(C())&&(W=W.replace(//g,">"));let f=await U(y,W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0),R=f.getBBox();if(M(C())){let q=f.children[0],V=_(f);R=q.getBoundingClientRect(),V.attr("width",R.width),V.attr("height",R.height)}R.width>o&&(o=R.width),p+=R.height+n,u.push(f)}),p+=s;let b=[];if(t.classData.methods.forEach(async E=>{let h=E.getDisplayDetails(),W=h.displayText;M(C())&&(W=W.replace(//g,">"));let f=await U(y,W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0),R=f.getBBox();if(M(C())){let q=f.children[0],V=_(f);R=q.getBoundingClientRect(),V.attr("width",R.width),V.attr("height",R.height)}R.width>o&&(o=R.width),p+=R.height+n,b.push(f)}),p+=s,m){let E=(o-D.width)/2;_(k).attr("transform","translate( "+(-1*o/2+E)+", "+-1*p/2+")"),x=D.height+n}let S=(o-w.width)/2;return _(T).attr("transform","translate( "+(-1*o/2+S)+", "+(-1*p/2+x)+")"),x+=w.height+n,c.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-p/2-a+s+x).attr("y2",-p/2-a+s+x),x+=s,u.forEach(E=>{_(E).attr("transform","translate( "+-o/2+", "+(-1*p/2+x+s/2)+")");let h=E?.getBBox();x+=(h?.height??0)+n}),x+=s,d.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-p/2-a+s+x).attr("y2",-p/2-a+s+x),x+=s,b.forEach(E=>{_(E).attr("transform","translate( "+-o/2+", "+(-1*p/2+x)+")");let h=E?.getBBox();x+=(h?.height??0)+n}),i.attr("style",t.style).attr("class","outer title-state").attr("x",-o/2-a).attr("y",-(p/2)-a).attr("width",o+t.padding).attr("height",p+t.padding),I(t,i),t.intersect=function(E){return B.rect(t,E)},r},"class_box"),ie={rhombus:ae,composite:Yr,question:ae,rect:Wr,labelRect:Hr,rectWithTitle:Kr,choice:Ir,circle:Xr,doublecircle:jr,stadium:Ur,hexagon:Nr,block_arrow:Cr,rect_left_inv_arrow:Or,lean_right:Rr,lean_left:zr,trapezoid:Ar,inv_trapezoid:Mr,rect_right_inv_arrow:Fr,cylinder:Pr,start:Zr,end:Gr,note:Br,subroutine:Vr,fork:se,join:se,class_box:qr},ct={},ke=g(async(e,t,a)=>{let n,s;if(t.link){let l;C().securityLevel==="sandbox"?l="_top":t.linkTarget&&(l=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",l),s=await ie[t.shape](n,t,a)}else s=await ie[t.shape](e,t,a),n=s;return t.tooltip&&s.attr("title",t.tooltip),t.class&&s.attr("class","node default "+t.class),ct[t.id]=n,t.haveCallback&&ct[t.id].attr("class",ct[t.id].attr("class")+" clickable"),n},"insertNode"),Jr=g(e=>{let t=ct[e.id];L.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let a=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode");function Ot(e,t,a=!1){let n=e,s="default";(n?.classes?.length||0)>0&&(s=(n?.classes??[]).join(" ")),s=s+" flowchart-label";let l=0,r="",i;switch(n.type){case"round":l=5,r="rect";break;case"composite":l=0,r="composite",i=0;break;case"square":r="rect";break;case"diamond":r="question";break;case"hexagon":r="hexagon";break;case"block_arrow":r="block_arrow";break;case"odd":r="rect_left_inv_arrow";break;case"lean_right":r="lean_right";break;case"lean_left":r="lean_left";break;case"trapezoid":r="trapezoid";break;case"inv_trapezoid":r="inv_trapezoid";break;case"rect_left_inv_arrow":r="rect_left_inv_arrow";break;case"circle":r="circle";break;case"ellipse":r="ellipse";break;case"stadium":r="stadium";break;case"subroutine":r="subroutine";break;case"cylinder":r="cylinder";break;case"group":r="rect";break;case"doublecircle":r="doublecircle";break;default:r="rect"}let c=jt(n?.styles??[]),d=n.label,o=n.size??{width:0,height:0,x:0,y:0},p=t.getDiagramId();return{labelStyle:c.labelStyle,shape:r,labelText:d,rx:l,ry:l,class:s,style:c.style,id:n.id,domId:p?`${p}-${n.id}`:n.id,directions:n.directions,width:o.width,height:o.height,x:o.x,y:o.y,positioned:a,intersect:void 0,type:n.type,padding:i??$()?.block?.padding??0,widthInColumns:n.widthInColumns??1}}g(Ot,"getNodeFromBlock");async function Se(e,t,a){let n=Ot(t,a,!1);if(n.type==="group")return;let s=$(),l=await ke(e,n,{config:s}),r=l.node().getBBox(),i=a.getBlock(n.id);i.size={width:r.width,height:r.height,x:0,y:0,node:l},a.setBlock(i),l.remove()}g(Se,"calculateBlockSize");async function Le(e,t,a){let n=Ot(t,a,!0);if(a.getBlock(n.id).type!=="space"){let l=$();await ke(e,n,{config:l}),t.intersect=n?.intersect,Jr(n)}}g(Le,"insertBlockPositioned");async function gt(e,t,a,n){for(let s of t)await n(e,s,a),s.children&&await gt(e,s.children,a,n)}g(gt,"performOperations");async function ve(e,t,a){await gt(e,t,a,Se)}g(ve,"calculateBlockSizes");async function Ee(e,t,a){await gt(e,t,a,Le)}g(Ee,"insertBlocks");async function _e(e,t,a,n,s){let l=new Gt({multigraph:!0,compound:!0});l.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let r of a)r.size&&l.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(let r of t)if(r.start&&r.end){let i=n.getBlock(r.start),c=n.getBlock(r.end);if(i?.size&&c?.size){let d=i.size,o=c.size,p=[{x:d.x,y:d.y},{x:d.x+(o.x-d.x)/2,y:d.y+(o.y-d.y)/2},{x:o.x,y:o.y}],y=s?`${s}-${r.id}`:r.id,x=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",m=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",v=`${x} ${m} flowchart-link LS-a1 LE-b1`;mr(e,{v:r.start,w:r.end,name:y},{...r,id:y,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:p,classes:v},void 0,"block",l,s),r.label&&(await fr(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:p,classes:v}),xr({...r,x:p[1].x,y:p[1].y},{originalPath:p}))}}}g(_e,"insertEdges");var Qr=g(function(e,t){return t.db.getClasses()},"getClasses"),$r=g(async function(e,t,a,n){let{securityLevel:s,block:l}=$(),r=n.db;r.setDiagramId(t);let i;s==="sandbox"&&(i=_("#i"+t));let c=s==="sandbox"?_(i.nodes()[0].contentDocument.body):_("body"),d=s==="sandbox"?c.select(`[id="${t}"]`):_(`[id="${t}"]`);hr(d,["point","circle","cross"],n.type,t);let p=r.getBlocks(),y=r.getBlocksFlat(),x=r.getEdges(),m=d.insert("g").attr("class","block");await ve(m,p,r);let v=pe(r);if(await Ee(m,p,r),await _e(m,x,y,r,t),v){let k=v,D=Math.max(1,Math.round(.125*(k.width/k.height))),N=k.height+D+10,T=k.width+10,{useMaxWidth:w}=l;Wt(d,N,T,!!w),L.debug("Here Bounds",v,k),d.attr("viewBox",`${k.x-5} ${k.y-5} ${k.width+10} ${k.height+10}`)}},"draw"),ta={draw:$r,getClasses:Qr},xa={parser:Be,db:qe,renderer:ta,styles:Qe};export{xa as diagram}; +//# sourceMappingURL=blockDiagram-GPEHLZMM-4OU5ZU27.min.js.map diff --git a/templates/tabulareditor/public/blockDiagram-GPEHLZMM-4OU5ZU27.min.js.map b/templates/tabulareditor/public/blockDiagram-GPEHLZMM-4OU5ZU27.min.js.map new file mode 100644 index 000000000..39ec1a3fe --- /dev/null +++ b/templates/tabulareditor/public/blockDiagram-GPEHLZMM-4OU5ZU27.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.mjs"], + "sourcesContent": ["import {\n getIconStyles\n} from \"./chunk-FMBD7UC4.mjs\";\nimport {\n computeLabelTransform,\n getLineFunctionsWithOffset\n} from \"./chunk-BSJP7CBP.mjs\";\nimport {\n configureLabelImages,\n getSubGraphTitleMargins\n} from \"./chunk-L5ZTLDWV.mjs\";\nimport {\n createText\n} from \"./chunk-O5CBEL6O.mjs\";\nimport {\n decodeEntities,\n getStylesFromArray,\n utils_default\n} from \"./chunk-5ZQYHXKU.mjs\";\nimport {\n clear,\n common_default,\n configureSvgSize,\n getConfig,\n getConfig2,\n getEffectiveHtmlLabels,\n getUrl,\n sanitizeText\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/block/parser/block.jison\nvar parser = (function() {\n var o = /* @__PURE__ */ __name(function(k, v, o2, l) {\n for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;\n return o2;\n }, \"o\"), $V0 = [1, 15], $V1 = [1, 7], $V2 = [1, 13], $V3 = [1, 14], $V4 = [1, 19], $V5 = [1, 16], $V6 = [1, 17], $V7 = [1, 18], $V8 = [8, 30], $V9 = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], $Va = [1, 23], $Vb = [1, 24], $Vc = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], $Vd = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], $Ve = [1, 49];\n var parser2 = {\n trace: /* @__PURE__ */ __name(function trace() {\n }, \"trace\"),\n yy: {},\n symbols_: { \"error\": 2, \"spaceLines\": 3, \"SPACELINE\": 4, \"NL\": 5, \"separator\": 6, \"SPACE\": 7, \"EOF\": 8, \"start\": 9, \"BLOCK_DIAGRAM_KEY\": 10, \"document\": 11, \"stop\": 12, \"statement\": 13, \"link\": 14, \"LINK\": 15, \"START_LINK\": 16, \"LINK_LABEL\": 17, \"STR\": 18, \"nodeStatement\": 19, \"columnsStatement\": 20, \"SPACE_BLOCK\": 21, \"blockStatement\": 22, \"classDefStatement\": 23, \"cssClassStatement\": 24, \"styleStatement\": 25, \"node\": 26, \"SIZE\": 27, \"COLUMNS\": 28, \"id-block\": 29, \"end\": 30, \"NODE_ID\": 31, \"nodeShapeNLabel\": 32, \"dirList\": 33, \"DIR\": 34, \"NODE_DSTART\": 35, \"NODE_DEND\": 36, \"BLOCK_ARROW_START\": 37, \"BLOCK_ARROW_END\": 38, \"classDef\": 39, \"CLASSDEF_ID\": 40, \"CLASSDEF_STYLEOPTS\": 41, \"DEFAULT\": 42, \"class\": 43, \"CLASSENTITY_IDS\": 44, \"STYLECLASS\": 45, \"style\": 46, \"STYLE_ENTITY_IDS\": 47, \"STYLE_DEFINITION_DATA\": 48, \"$accept\": 0, \"$end\": 1 },\n terminals_: { 2: \"error\", 4: \"SPACELINE\", 5: \"NL\", 7: \"SPACE\", 8: \"EOF\", 10: \"BLOCK_DIAGRAM_KEY\", 15: \"LINK\", 16: \"START_LINK\", 17: \"LINK_LABEL\", 18: \"STR\", 21: \"SPACE_BLOCK\", 27: \"SIZE\", 28: \"COLUMNS\", 29: \"id-block\", 30: \"end\", 31: \"NODE_ID\", 34: \"DIR\", 35: \"NODE_DSTART\", 36: \"NODE_DEND\", 37: \"BLOCK_ARROW_START\", 38: \"BLOCK_ARROW_END\", 39: \"classDef\", 40: \"CLASSDEF_ID\", 41: \"CLASSDEF_STYLEOPTS\", 42: \"DEFAULT\", 43: \"class\", 44: \"CLASSENTITY_IDS\", 45: \"STYLECLASS\", 46: \"style\", 47: \"STYLE_ENTITY_IDS\", 48: \"STYLE_DEFINITION_DATA\" },\n productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [33, 1], [33, 2], [32, 3], [32, 4], [23, 3], [23, 3], [24, 3], [25, 3]],\n performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {\n var $0 = $$.length - 1;\n switch (yystate) {\n case 4:\n yy.getLogger().debug(\"Rule: separator (NL) \");\n break;\n case 5:\n yy.getLogger().debug(\"Rule: separator (Space) \");\n break;\n case 6:\n yy.getLogger().debug(\"Rule: separator (EOF) \");\n break;\n case 7:\n yy.getLogger().debug(\"Rule: hierarchy: \", $$[$0 - 1]);\n yy.setHierarchy($$[$0 - 1]);\n break;\n case 8:\n yy.getLogger().debug(\"Stop NL \");\n break;\n case 9:\n yy.getLogger().debug(\"Stop EOF \");\n break;\n case 10:\n yy.getLogger().debug(\"Stop NL2 \");\n break;\n case 11:\n yy.getLogger().debug(\"Stop EOF2 \");\n break;\n case 12:\n yy.getLogger().debug(\"Rule: statement: \", $$[$0]);\n typeof $$[$0].length === \"number\" ? this.$ = $$[$0] : this.$ = [$$[$0]];\n break;\n case 13:\n yy.getLogger().debug(\"Rule: statement #2: \", $$[$0 - 1]);\n this.$ = [$$[$0 - 1]].concat($$[$0]);\n break;\n case 14:\n yy.getLogger().debug(\"Rule: link: \", $$[$0], yytext);\n this.$ = { edgeTypeStr: $$[$0], label: \"\" };\n break;\n case 15:\n yy.getLogger().debug(\"Rule: LABEL link: \", $$[$0 - 3], $$[$0 - 1], $$[$0]);\n this.$ = { edgeTypeStr: $$[$0], label: $$[$0 - 1] };\n break;\n case 18:\n const num = parseInt($$[$0]);\n const spaceId = yy.generateId();\n this.$ = { id: spaceId, type: \"space\", label: \"\", width: num, children: [] };\n break;\n case 23:\n yy.getLogger().debug(\"Rule: (nodeStatement link node) \", $$[$0 - 2], $$[$0 - 1], $$[$0], \" typestr: \", $$[$0 - 1].edgeTypeStr);\n const edgeData = yy.edgeStrToEdgeData($$[$0 - 1].edgeTypeStr);\n const startEdgeData = yy.edgeStrToEdgeStartData($$[$0 - 1].edgeTypeStr);\n const lineThickness = yy.edgeStrToThickness($$[$0 - 1].edgeTypeStr);\n const linePattern = yy.edgeStrToPattern($$[$0 - 1].edgeTypeStr);\n this.$ = [\n { id: $$[$0 - 2].id, label: $$[$0 - 2].label, type: $$[$0 - 2].type, directions: $$[$0 - 2].directions },\n { id: $$[$0 - 2].id + \"-\" + $$[$0].id, start: $$[$0 - 2].id, end: $$[$0].id, label: $$[$0 - 1].label, type: \"edge\", thickness: lineThickness, pattern: linePattern, directions: $$[$0].directions, arrowTypeEnd: edgeData, arrowTypeStart: startEdgeData },\n { id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions }\n ];\n break;\n case 24:\n yy.getLogger().debug(\"Rule: nodeStatement (abc88 node size) \", $$[$0 - 1], $$[$0]);\n this.$ = { id: $$[$0 - 1].id, label: $$[$0 - 1].label, type: yy.typeStr2Type($$[$0 - 1].typeStr), directions: $$[$0 - 1].directions, widthInColumns: parseInt($$[$0], 10) };\n break;\n case 25:\n yy.getLogger().debug(\"Rule: nodeStatement (node) \", $$[$0]);\n this.$ = { id: $$[$0].id, label: $$[$0].label, type: yy.typeStr2Type($$[$0].typeStr), directions: $$[$0].directions, widthInColumns: 1 };\n break;\n case 26:\n yy.getLogger().debug(\"APA123\", this ? this : \"na\");\n yy.getLogger().debug(\"COLUMNS: \", $$[$0]);\n this.$ = { type: \"column-setting\", columns: $$[$0] === \"auto\" ? -1 : parseInt($$[$0]) };\n break;\n case 27:\n yy.getLogger().debug(\"Rule: id-block statement : \", $$[$0 - 2], $$[$0 - 1]);\n const id2 = yy.generateId();\n this.$ = { ...$$[$0 - 2], type: \"composite\", children: $$[$0 - 1] };\n break;\n case 28:\n yy.getLogger().debug(\"Rule: blockStatement : \", $$[$0 - 2], $$[$0 - 1], $$[$0]);\n const id = yy.generateId();\n this.$ = { id, type: \"composite\", label: \"\", children: $$[$0 - 1] };\n break;\n case 29:\n yy.getLogger().debug(\"Rule: node (NODE_ID separator): \", $$[$0]);\n this.$ = { id: $$[$0] };\n break;\n case 30:\n yy.getLogger().debug(\"Rule: node (NODE_ID nodeShapeNLabel separator): \", $$[$0 - 1], $$[$0]);\n this.$ = { id: $$[$0 - 1], label: $$[$0].label, typeStr: $$[$0].typeStr, directions: $$[$0].directions };\n break;\n case 31:\n yy.getLogger().debug(\"Rule: dirList: \", $$[$0]);\n this.$ = [$$[$0]];\n break;\n case 32:\n yy.getLogger().debug(\"Rule: dirList: \", $$[$0 - 1], $$[$0]);\n this.$ = [$$[$0 - 1]].concat($$[$0]);\n break;\n case 33:\n yy.getLogger().debug(\"Rule: nodeShapeNLabel: \", $$[$0 - 2], $$[$0 - 1], $$[$0]);\n this.$ = { typeStr: $$[$0 - 2] + $$[$0], label: $$[$0 - 1] };\n break;\n case 34:\n yy.getLogger().debug(\"Rule: BLOCK_ARROW nodeShapeNLabel: \", $$[$0 - 3], $$[$0 - 2], \" #3:\", $$[$0 - 1], $$[$0]);\n this.$ = { typeStr: $$[$0 - 3] + $$[$0], label: $$[$0 - 2], directions: $$[$0 - 1] };\n break;\n case 35:\n case 36:\n this.$ = { type: \"classDef\", id: $$[$0 - 1].trim(), css: $$[$0].trim() };\n break;\n case 37:\n this.$ = { type: \"applyClass\", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() };\n break;\n case 38:\n this.$ = { type: \"applyStyles\", id: $$[$0 - 1].trim(), stylesStr: $$[$0].trim() };\n break;\n }\n }, \"anonymous\"),\n table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: $V0, 11: 3, 13: 4, 19: 5, 20: 6, 21: $V1, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: $V2, 29: $V3, 31: $V4, 39: $V5, 43: $V6, 46: $V7 }, { 8: [1, 20] }, o($V8, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: $V0, 21: $V1, 28: $V2, 29: $V3, 31: $V4, 39: $V5, 43: $V6, 46: $V7 }), o($V9, [2, 16], { 14: 22, 15: $Va, 16: $Vb }), o($V9, [2, 17]), o($V9, [2, 18]), o($V9, [2, 19]), o($V9, [2, 20]), o($V9, [2, 21]), o($V9, [2, 22]), o($Vc, [2, 25], { 27: [1, 25] }), o($V9, [2, 26]), { 19: 26, 26: 12, 31: $V4 }, { 10: $V0, 11: 27, 13: 4, 19: 5, 20: 6, 21: $V1, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: $V2, 29: $V3, 31: $V4, 39: $V5, 43: $V6, 46: $V7 }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, o($Vd, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, o($V8, [2, 13]), { 26: 35, 31: $V4 }, { 31: [2, 14] }, { 17: [1, 36] }, o($Vc, [2, 24]), { 10: $V0, 11: 37, 13: 4, 14: 22, 15: $Va, 16: $Vb, 19: 5, 20: 6, 21: $V1, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: $V2, 29: $V3, 31: $V4, 39: $V5, 43: $V6, 46: $V7 }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, o($Vd, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, o($Vc, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, o($V9, [2, 28]), o($V9, [2, 35]), o($V9, [2, 36]), o($V9, [2, 37]), o($V9, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: $Ve }, { 15: [1, 50] }, o($V9, [2, 27]), o($Vd, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: $Ve, 38: [2, 31] }, { 31: [2, 15] }, o($Vd, [2, 34]), { 38: [2, 32] }],\n defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },\n parseError: /* @__PURE__ */ __name(function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n }, \"parseError\"),\n parse: /* @__PURE__ */ __name(function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer2 = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer2.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer2;\n sharedState.yy.parser = this;\n if (typeof lexer2.yylloc == \"undefined\") {\n lexer2.yylloc = {};\n }\n var yyloc = lexer2.yylloc;\n lstack.push(yyloc);\n var ranges = lexer2.options && lexer2.options.ranges;\n if (typeof sharedState.yy.parseError === \"function\") {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n __name(popStack, \"popStack\");\n function lex() {\n var token;\n token = tstack.pop() || lexer2.lex() || EOF;\n if (typeof token !== \"number\") {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n __name(lex, \"lex\");\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == \"undefined\") {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === \"undefined\" || !action.length || !action[0]) {\n var errStr = \"\";\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push(\"'\" + this.terminals_[p] + \"'\");\n }\n }\n if (lexer2.showPosition) {\n errStr = \"Parse error on line \" + (yylineno + 1) + \":\\n\" + lexer2.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n } else {\n errStr = \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == EOF ? \"end of input\" : \"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n }\n this.parseError(errStr, {\n text: lexer2.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer2.yylineno,\n loc: yyloc,\n expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer2.yytext);\n lstack.push(lexer2.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer2.yyleng;\n yytext = lexer2.yytext;\n yylineno = lexer2.yylineno;\n yyloc = lexer2.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== \"undefined\") {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n }, \"parse\")\n };\n var lexer = /* @__PURE__ */ (function() {\n var lexer2 = {\n EOF: 1,\n parseError: /* @__PURE__ */ __name(function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n }, \"parseError\"),\n // resets the lexer, sets new input\n setInput: /* @__PURE__ */ __name(function(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = \"\";\n this.conditionStack = [\"INITIAL\"];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n this.offset = 0;\n return this;\n }, \"setInput\"),\n // consumes and returns one char from the input\n input: /* @__PURE__ */ __name(function() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n this._input = this._input.slice(1);\n return ch;\n }, \"input\"),\n // unshifts one char (or a string) into the input\n unput: /* @__PURE__ */ __name(function(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n }, \"unput\"),\n // When called from action, caches matched text and appends it on next action\n more: /* @__PURE__ */ __name(function() {\n this._more = true;\n return this;\n }, \"more\"),\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: /* @__PURE__ */ __name(function() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n return this;\n }, \"reject\"),\n // retain first n characters of the match\n less: /* @__PURE__ */ __name(function(n) {\n this.unput(this.match.slice(n));\n }, \"less\"),\n // displays already matched input, i.e. for error messages\n pastInput: /* @__PURE__ */ __name(function() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? \"...\" : \"\") + past.substr(-20).replace(/\\n/g, \"\");\n }, \"pastInput\"),\n // displays upcoming input, i.e. for error messages\n upcomingInput: /* @__PURE__ */ __name(function() {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n return (next.substr(0, 20) + (next.length > 20 ? \"...\" : \"\")).replace(/\\n/g, \"\");\n }, \"upcomingInput\"),\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: /* @__PURE__ */ __name(function() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n }, \"showPosition\"),\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {\n var token, lines, backup;\n if (this.options.backtrack_lexer) {\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false;\n }\n return false;\n }, \"test_match\"),\n // return next match in input\n next: /* @__PURE__ */ __name(function() {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n var token, match, tempMatch, index;\n if (!this._more) {\n this.yytext = \"\";\n this.match = \"\";\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue;\n } else {\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". Unrecognized text.\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n }, \"next\"),\n // return next match that has a token\n lex: /* @__PURE__ */ __name(function lex() {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n }, \"lex\"),\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: /* @__PURE__ */ __name(function begin(condition) {\n this.conditionStack.push(condition);\n }, \"begin\"),\n // pop the previously active lexer condition state off the condition stack\n popState: /* @__PURE__ */ __name(function popState() {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n }, \"popState\"),\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: /* @__PURE__ */ __name(function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n }, \"_currentRules\"),\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: /* @__PURE__ */ __name(function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n }, \"topState\"),\n // alias for begin(condition)\n pushState: /* @__PURE__ */ __name(function pushState(condition) {\n this.begin(condition);\n }, \"pushState\"),\n // return the number of states currently on the stack\n stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {\n return this.conditionStack.length;\n }, \"stateStackSize\"),\n options: {},\n performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n switch ($avoiding_name_collisions) {\n case 0:\n yy.getLogger().debug(\"Found block-beta\");\n return 10;\n break;\n case 1:\n yy.getLogger().debug(\"Found id-block\");\n return 29;\n break;\n case 2:\n yy.getLogger().debug(\"Found block\");\n return 10;\n break;\n case 3:\n yy.getLogger().debug(\".\", yy_.yytext);\n break;\n case 4:\n yy.getLogger().debug(\"_\", yy_.yytext);\n break;\n case 5:\n return 5;\n break;\n case 6:\n yy_.yytext = -1;\n return 28;\n break;\n case 7:\n yy_.yytext = yy_.yytext.replace(/columns\\s+/, \"\");\n yy.getLogger().debug(\"COLUMNS (LEX)\", yy_.yytext);\n return 28;\n break;\n case 8:\n this.pushState(\"md_string\");\n break;\n case 9:\n return \"MD_STR\";\n break;\n case 10:\n this.popState();\n break;\n case 11:\n this.pushState(\"string\");\n break;\n case 12:\n yy.getLogger().debug(\"LEX: POPPING STR:\", yy_.yytext);\n this.popState();\n break;\n case 13:\n yy.getLogger().debug(\"LEX: STR end:\", yy_.yytext);\n return \"STR\";\n break;\n case 14:\n yy_.yytext = yy_.yytext.replace(/space\\:/, \"\");\n yy.getLogger().debug(\"SPACE NUM (LEX)\", yy_.yytext);\n return 21;\n break;\n case 15:\n yy_.yytext = \"1\";\n yy.getLogger().debug(\"COLUMNS (LEX)\", yy_.yytext);\n return 21;\n break;\n case 16:\n return 42;\n break;\n case 17:\n return \"LINKSTYLE\";\n break;\n case 18:\n return \"INTERPOLATE\";\n break;\n case 19:\n this.pushState(\"CLASSDEF\");\n return 39;\n break;\n case 20:\n this.popState();\n this.pushState(\"CLASSDEFID\");\n return \"DEFAULT_CLASSDEF_ID\";\n break;\n case 21:\n this.popState();\n this.pushState(\"CLASSDEFID\");\n return 40;\n break;\n case 22:\n this.popState();\n return 41;\n break;\n case 23:\n this.pushState(\"CLASS\");\n return 43;\n break;\n case 24:\n this.popState();\n this.pushState(\"CLASS_STYLE\");\n return 44;\n break;\n case 25:\n this.popState();\n return 45;\n break;\n case 26:\n this.pushState(\"STYLE_STMNT\");\n return 46;\n break;\n case 27:\n this.popState();\n this.pushState(\"STYLE_DEFINITION\");\n return 47;\n break;\n case 28:\n this.popState();\n return 48;\n break;\n case 29:\n this.pushState(\"acc_title\");\n return \"acc_title\";\n break;\n case 30:\n this.popState();\n return \"acc_title_value\";\n break;\n case 31:\n this.pushState(\"acc_descr\");\n return \"acc_descr\";\n break;\n case 32:\n this.popState();\n return \"acc_descr_value\";\n break;\n case 33:\n this.pushState(\"acc_descr_multiline\");\n break;\n case 34:\n this.popState();\n break;\n case 35:\n return \"acc_descr_multiline_value\";\n break;\n case 36:\n return 30;\n break;\n case 37:\n this.popState();\n yy.getLogger().debug(\"Lex: ((\");\n return \"NODE_DEND\";\n break;\n case 38:\n this.popState();\n yy.getLogger().debug(\"Lex: ((\");\n return \"NODE_DEND\";\n break;\n case 39:\n this.popState();\n yy.getLogger().debug(\"Lex: ))\");\n return \"NODE_DEND\";\n break;\n case 40:\n this.popState();\n yy.getLogger().debug(\"Lex: ((\");\n return \"NODE_DEND\";\n break;\n case 41:\n this.popState();\n yy.getLogger().debug(\"Lex: ((\");\n return \"NODE_DEND\";\n break;\n case 42:\n this.popState();\n yy.getLogger().debug(\"Lex: (-\");\n return \"NODE_DEND\";\n break;\n case 43:\n this.popState();\n yy.getLogger().debug(\"Lex: -)\");\n return \"NODE_DEND\";\n break;\n case 44:\n this.popState();\n yy.getLogger().debug(\"Lex: ((\");\n return \"NODE_DEND\";\n break;\n case 45:\n this.popState();\n yy.getLogger().debug(\"Lex: ]]\");\n return \"NODE_DEND\";\n break;\n case 46:\n this.popState();\n yy.getLogger().debug(\"Lex: (\");\n return \"NODE_DEND\";\n break;\n case 47:\n this.popState();\n yy.getLogger().debug(\"Lex: ])\");\n return \"NODE_DEND\";\n break;\n case 48:\n this.popState();\n yy.getLogger().debug(\"Lex: /]\");\n return \"NODE_DEND\";\n break;\n case 49:\n this.popState();\n yy.getLogger().debug(\"Lex: /]\");\n return \"NODE_DEND\";\n break;\n case 50:\n this.popState();\n yy.getLogger().debug(\"Lex: )]\");\n return \"NODE_DEND\";\n break;\n case 51:\n this.popState();\n yy.getLogger().debug(\"Lex: )\");\n return \"NODE_DEND\";\n break;\n case 52:\n this.popState();\n yy.getLogger().debug(\"Lex: ]>\");\n return \"NODE_DEND\";\n break;\n case 53:\n this.popState();\n yy.getLogger().debug(\"Lex: ]\");\n return \"NODE_DEND\";\n break;\n case 54:\n yy.getLogger().debug(\"Lexa: -)\");\n this.pushState(\"NODE\");\n return 35;\n break;\n case 55:\n yy.getLogger().debug(\"Lexa: (-\");\n this.pushState(\"NODE\");\n return 35;\n break;\n case 56:\n yy.getLogger().debug(\"Lexa: ))\");\n this.pushState(\"NODE\");\n return 35;\n break;\n case 57:\n yy.getLogger().debug(\"Lexa: )\");\n this.pushState(\"NODE\");\n return 35;\n break;\n case 58:\n yy.getLogger().debug(\"Lex: (((\");\n this.pushState(\"NODE\");\n return 35;\n break;\n case 59:\n yy.getLogger().debug(\"Lexa: )\");\n this.pushState(\"NODE\");\n return 35;\n break;\n case 60:\n yy.getLogger().debug(\"Lexa: )\");\n this.pushState(\"NODE\");\n return 35;\n break;\n case 61:\n yy.getLogger().debug(\"Lexa: )\");\n this.pushState(\"NODE\");\n return 35;\n break;\n case 62:\n yy.getLogger().debug(\"Lexc: >\");\n this.pushState(\"NODE\");\n return 35;\n break;\n case 63:\n yy.getLogger().debug(\"Lexa: ([\");\n this.pushState(\"NODE\");\n return 35;\n break;\n case 64:\n yy.getLogger().debug(\"Lexa: )\");\n this.pushState(\"NODE\");\n return 35;\n break;\n case 65:\n this.pushState(\"NODE\");\n return 35;\n break;\n case 66:\n this.pushState(\"NODE\");\n return 35;\n break;\n case 67:\n this.pushState(\"NODE\");\n return 35;\n break;\n case 68:\n this.pushState(\"NODE\");\n return 35;\n break;\n case 69:\n this.pushState(\"NODE\");\n return 35;\n break;\n case 70:\n this.pushState(\"NODE\");\n return 35;\n break;\n case 71:\n this.pushState(\"NODE\");\n return 35;\n break;\n case 72:\n yy.getLogger().debug(\"Lexa: [\");\n this.pushState(\"NODE\");\n return 35;\n break;\n case 73:\n this.pushState(\"BLOCK_ARROW\");\n yy.getLogger().debug(\"LEX ARR START\");\n return 37;\n break;\n case 74:\n yy.getLogger().debug(\"Lex: NODE_ID\", yy_.yytext);\n return 31;\n break;\n case 75:\n yy.getLogger().debug(\"Lex: EOF\", yy_.yytext);\n return 8;\n break;\n case 76:\n this.pushState(\"md_string\");\n break;\n case 77:\n this.pushState(\"md_string\");\n break;\n case 78:\n return \"NODE_DESCR\";\n break;\n case 79:\n this.popState();\n break;\n case 80:\n yy.getLogger().debug(\"Lex: Starting string\");\n this.pushState(\"string\");\n break;\n case 81:\n yy.getLogger().debug(\"LEX ARR: Starting string\");\n this.pushState(\"string\");\n break;\n case 82:\n yy.getLogger().debug(\"LEX: NODE_DESCR:\", yy_.yytext);\n return \"NODE_DESCR\";\n break;\n case 83:\n yy.getLogger().debug(\"LEX POPPING\");\n this.popState();\n break;\n case 84:\n yy.getLogger().debug(\"Lex: =>BAE\");\n this.pushState(\"ARROW_DIR\");\n break;\n case 85:\n yy_.yytext = yy_.yytext.replace(/^,\\s*/, \"\");\n yy.getLogger().debug(\"Lex (right): dir:\", yy_.yytext);\n return \"DIR\";\n break;\n case 86:\n yy_.yytext = yy_.yytext.replace(/^,\\s*/, \"\");\n yy.getLogger().debug(\"Lex (left):\", yy_.yytext);\n return \"DIR\";\n break;\n case 87:\n yy_.yytext = yy_.yytext.replace(/^,\\s*/, \"\");\n yy.getLogger().debug(\"Lex (x):\", yy_.yytext);\n return \"DIR\";\n break;\n case 88:\n yy_.yytext = yy_.yytext.replace(/^,\\s*/, \"\");\n yy.getLogger().debug(\"Lex (y):\", yy_.yytext);\n return \"DIR\";\n break;\n case 89:\n yy_.yytext = yy_.yytext.replace(/^,\\s*/, \"\");\n yy.getLogger().debug(\"Lex (up):\", yy_.yytext);\n return \"DIR\";\n break;\n case 90:\n yy_.yytext = yy_.yytext.replace(/^,\\s*/, \"\");\n yy.getLogger().debug(\"Lex (down):\", yy_.yytext);\n return \"DIR\";\n break;\n case 91:\n yy_.yytext = \"]>\";\n yy.getLogger().debug(\"Lex (ARROW_DIR end):\", yy_.yytext);\n this.popState();\n this.popState();\n return \"BLOCK_ARROW_END\";\n break;\n case 92:\n yy.getLogger().debug(\"Lex: LINK\", \"#\" + yy_.yytext + \"#\");\n return 15;\n break;\n case 93:\n yy.getLogger().debug(\"Lex: LINK\", yy_.yytext);\n return 15;\n break;\n case 94:\n yy.getLogger().debug(\"Lex: LINK\", yy_.yytext);\n return 15;\n break;\n case 95:\n yy.getLogger().debug(\"Lex: LINK\", yy_.yytext);\n return 15;\n break;\n case 96:\n yy.getLogger().debug(\"Lex: START_LINK\", yy_.yytext);\n this.pushState(\"LLABEL\");\n return 16;\n break;\n case 97:\n yy.getLogger().debug(\"Lex: START_LINK\", yy_.yytext);\n this.pushState(\"LLABEL\");\n return 16;\n break;\n case 98:\n yy.getLogger().debug(\"Lex: START_LINK\", yy_.yytext);\n this.pushState(\"LLABEL\");\n return 16;\n break;\n case 99:\n this.pushState(\"md_string\");\n break;\n case 100:\n yy.getLogger().debug(\"Lex: Starting string\");\n this.pushState(\"string\");\n return \"LINK_LABEL\";\n break;\n case 101:\n this.popState();\n yy.getLogger().debug(\"Lex: LINK\", \"#\" + yy_.yytext + \"#\");\n return 15;\n break;\n case 102:\n this.popState();\n yy.getLogger().debug(\"Lex: LINK\", yy_.yytext);\n return 15;\n break;\n case 103:\n this.popState();\n yy.getLogger().debug(\"Lex: LINK\", yy_.yytext);\n return 15;\n break;\n case 104:\n yy.getLogger().debug(\"Lex: COLON\", yy_.yytext);\n yy_.yytext = yy_.yytext.slice(1);\n return 27;\n break;\n }\n }, \"anonymous\"),\n rules: [/^(?:block-beta\\b)/, /^(?:block:)/, /^(?:block\\b)/, /^(?:[\\s]+)/, /^(?:[\\n]+)/, /^(?:((\\u000D\\u000A)|(\\u000A)))/, /^(?:columns\\s+auto\\b)/, /^(?:columns\\s+[\\d]+)/, /^(?:[\"][`])/, /^(?:[^`\"]+)/, /^(?:[`][\"])/, /^(?:[\"])/, /^(?:[\"])/, /^(?:[^\"]*)/, /^(?:space[:]\\d+)/, /^(?:space\\b)/, /^(?:default\\b)/, /^(?:linkStyle\\b)/, /^(?:interpolate\\b)/, /^(?:classDef\\s+)/, /^(?:DEFAULT\\s+)/, /^(?:\\w+\\s+)/, /^(?:[^\\n]*)/, /^(?:class\\s+)/, /^(?:(\\w+)+((,\\s*\\w+)*))/, /^(?:[^\\n]*)/, /^(?:style\\s+)/, /^(?:(\\w+)+((,\\s*\\w+)*))/, /^(?:[^\\n]*)/, /^(?:accTitle\\s*:\\s*)/, /^(?:(?!\\n||)*[^\\n]*)/, /^(?:accDescr\\s*:\\s*)/, /^(?:(?!\\n||)*[^\\n]*)/, /^(?:accDescr\\s*\\{\\s*)/, /^(?:[\\}])/, /^(?:[^\\}]*)/, /^(?:end\\b\\s*)/, /^(?:\\(\\(\\()/, /^(?:\\)\\)\\))/, /^(?:[\\)]\\))/, /^(?:\\}\\})/, /^(?:\\})/, /^(?:\\(-)/, /^(?:-\\))/, /^(?:\\(\\()/, /^(?:\\]\\])/, /^(?:\\()/, /^(?:\\]\\))/, /^(?:\\\\\\])/, /^(?:\\/\\])/, /^(?:\\)\\])/, /^(?:[\\)])/, /^(?:\\]>)/, /^(?:[\\]])/, /^(?:-\\))/, /^(?:\\(-)/, /^(?:\\)\\))/, /^(?:\\))/, /^(?:\\(\\(\\()/, /^(?:\\(\\()/, /^(?:\\{\\{)/, /^(?:\\{)/, /^(?:>)/, /^(?:\\(\\[)/, /^(?:\\()/, /^(?:\\[\\[)/, /^(?:\\[\\|)/, /^(?:\\[\\()/, /^(?:\\)\\)\\))/, /^(?:\\[\\\\)/, /^(?:\\[\\/)/, /^(?:\\[\\\\)/, /^(?:\\[)/, /^(?:<\\[)/, /^(?:[^\\(\\[\\n\\-\\)\\{\\}\\s\\<\\>:=]+)/, /^(?:$)/, /^(?:[\"][`])/, /^(?:[\"][`])/, /^(?:[^`\"]+)/, /^(?:[`][\"])/, /^(?:[\"])/, /^(?:[\"])/, /^(?:[^\"]+)/, /^(?:[\"])/, /^(?:\\]>\\s*\\()/, /^(?:,?\\s*right\\s*)/, /^(?:,?\\s*left\\s*)/, /^(?:,?\\s*x\\s*)/, /^(?:,?\\s*y\\s*)/, /^(?:,?\\s*up\\s*)/, /^(?:,?\\s*down\\s*)/, /^(?:\\)\\s*)/, /^(?:\\s*[xo<]?--+[-xo>]\\s*)/, /^(?:\\s*[xo<]?==+[=xo>]\\s*)/, /^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/, /^(?:\\s*~~[\\~]+\\s*)/, /^(?:\\s*[xo<]?--\\s*)/, /^(?:\\s*[xo<]?==\\s*)/, /^(?:\\s*[xo<]?-\\.\\s*)/, /^(?:[\"][`])/, /^(?:[\"])/, /^(?:\\s*[xo<]?--+[-xo>]\\s*)/, /^(?:\\s*[xo<]?==+[=xo>]\\s*)/, /^(?:\\s*[xo<]?-?\\.+-[xo>]?\\s*)/, /^(?::\\d+)/],\n conditions: { \"STYLE_DEFINITION\": { \"rules\": [28], \"inclusive\": false }, \"STYLE_STMNT\": { \"rules\": [27], \"inclusive\": false }, \"CLASSDEFID\": { \"rules\": [22], \"inclusive\": false }, \"CLASSDEF\": { \"rules\": [20, 21], \"inclusive\": false }, \"CLASS_STYLE\": { \"rules\": [25], \"inclusive\": false }, \"CLASS\": { \"rules\": [24], \"inclusive\": false }, \"LLABEL\": { \"rules\": [99, 100, 101, 102, 103], \"inclusive\": false }, \"ARROW_DIR\": { \"rules\": [85, 86, 87, 88, 89, 90, 91], \"inclusive\": false }, \"BLOCK_ARROW\": { \"rules\": [76, 81, 84], \"inclusive\": false }, \"NODE\": { \"rules\": [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 77, 80], \"inclusive\": false }, \"md_string\": { \"rules\": [9, 10, 78, 79], \"inclusive\": false }, \"space\": { \"rules\": [], \"inclusive\": false }, \"string\": { \"rules\": [12, 13, 82, 83], \"inclusive\": false }, \"acc_descr_multiline\": { \"rules\": [34, 35], \"inclusive\": false }, \"acc_descr\": { \"rules\": [32], \"inclusive\": false }, \"acc_title\": { \"rules\": [30], \"inclusive\": false }, \"INITIAL\": { \"rules\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 19, 23, 26, 29, 31, 33, 36, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 92, 93, 94, 95, 96, 97, 98, 104], \"inclusive\": true } }\n };\n return lexer2;\n })();\n parser2.lexer = lexer;\n function Parser() {\n this.yy = {};\n }\n __name(Parser, \"Parser\");\n Parser.prototype = parser2;\n parser2.Parser = Parser;\n return new Parser();\n})();\nparser.parser = parser;\nvar block_default = parser;\n\n// src/diagrams/block/blockDB.ts\nimport { clone } from \"es-toolkit/compat\";\nvar blockDatabase = /* @__PURE__ */ new Map();\nvar edgeList = [];\nvar edgeCount = /* @__PURE__ */ new Map();\nvar COLOR_KEYWORD = \"color\";\nvar FILL_KEYWORD = \"fill\";\nvar BG_FILL = \"bgFill\";\nvar STYLECLASS_SEP = \",\";\nvar config = getConfig2();\nvar classes = /* @__PURE__ */ new Map();\nvar diagramId = \"\";\nvar sanitizeText2 = /* @__PURE__ */ __name((txt) => common_default.sanitizeText(txt, config), \"sanitizeText\");\nvar addStyleClass = /* @__PURE__ */ __name(function(id, styleAttributes = \"\") {\n let foundClass = classes.get(id);\n if (!foundClass) {\n foundClass = { id, styles: [], textStyles: [] };\n classes.set(id, foundClass);\n }\n if (styleAttributes !== void 0 && styleAttributes !== null) {\n styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => {\n const fixedAttrib = attrib.replace(/([^;]*);/, \"$1\").trim();\n if (RegExp(COLOR_KEYWORD).exec(attrib)) {\n const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL);\n const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD);\n foundClass.textStyles.push(newStyle2);\n }\n foundClass.styles.push(fixedAttrib);\n });\n }\n}, \"addStyleClass\");\nvar addStyle2Node = /* @__PURE__ */ __name(function(id, styles = \"\") {\n const foundBlock = blockDatabase.get(id);\n if (styles !== void 0 && styles !== null) {\n foundBlock.styles = styles.split(STYLECLASS_SEP);\n }\n}, \"addStyle2Node\");\nvar setCssClass = /* @__PURE__ */ __name(function(itemIds, cssClassName) {\n itemIds.split(\",\").forEach(function(id) {\n let foundBlock = blockDatabase.get(id);\n if (foundBlock === void 0) {\n const trimmedId = id.trim();\n foundBlock = { id: trimmedId, type: \"na\", children: [] };\n blockDatabase.set(trimmedId, foundBlock);\n }\n if (!foundBlock.classes) {\n foundBlock.classes = [];\n }\n foundBlock.classes.push(cssClassName);\n });\n}, \"setCssClass\");\nvar populateBlockDatabase = /* @__PURE__ */ __name((_blockList, parent) => {\n const blockList = _blockList.flat();\n const children = [];\n const columnSettingBlock = blockList.find((b) => b?.type === \"column-setting\");\n const column = columnSettingBlock?.columns ?? -1;\n for (const block of blockList) {\n if (typeof column === \"number\" && column > 0 && block.type !== \"column-setting\" && typeof block.widthInColumns === \"number\" && block.widthInColumns > column) {\n log.warn(\n `Block ${block.id} width ${block.widthInColumns} exceeds configured column width ${column}`\n );\n }\n if (block.label) {\n block.label = sanitizeText2(block.label);\n }\n if (block.type === \"classDef\") {\n addStyleClass(block.id, block.css);\n continue;\n }\n if (block.type === \"applyClass\") {\n setCssClass(block.id, block?.styleClass ?? \"\");\n continue;\n }\n if (block.type === \"applyStyles\") {\n if (block?.stylesStr) {\n addStyle2Node(block.id, block?.stylesStr);\n }\n continue;\n }\n if (block.type === \"column-setting\") {\n parent.columns = block.columns ?? -1;\n } else if (block.type === \"edge\") {\n const count = (edgeCount.get(block.id) ?? 0) + 1;\n edgeCount.set(block.id, count);\n block.id = count + \"-\" + block.id;\n edgeList.push(block);\n } else {\n if (!block.label) {\n if (block.type === \"composite\") {\n block.label = \"\";\n } else {\n block.label = block.id;\n }\n }\n const existingBlock = blockDatabase.get(block.id);\n if (existingBlock === void 0) {\n blockDatabase.set(block.id, block);\n } else {\n if (block.type !== \"na\") {\n existingBlock.type = block.type;\n }\n if (block.label !== block.id) {\n existingBlock.label = block.label;\n }\n }\n if (block.children) {\n populateBlockDatabase(block.children, block);\n }\n if (block.type === \"space\") {\n const w = block.width ?? 1;\n for (let j = 0; j < w; j++) {\n const newBlock = clone(block);\n newBlock.id = newBlock.id + \"-\" + j;\n blockDatabase.set(newBlock.id, newBlock);\n children.push(newBlock);\n }\n } else if (existingBlock === void 0) {\n children.push(block);\n }\n }\n }\n parent.children = children;\n}, \"populateBlockDatabase\");\nvar blocks = [];\nvar rootBlock = { id: \"root\", type: \"composite\", children: [], columns: -1 };\nvar clear2 = /* @__PURE__ */ __name(() => {\n log.debug(\"Clear called\");\n clear();\n rootBlock = { id: \"root\", type: \"composite\", children: [], columns: -1 };\n blockDatabase = /* @__PURE__ */ new Map([[\"root\", rootBlock]]);\n blocks = [];\n classes = /* @__PURE__ */ new Map();\n edgeList = [];\n edgeCount = /* @__PURE__ */ new Map();\n diagramId = \"\";\n}, \"clear\");\nfunction typeStr2Type(typeStr) {\n log.debug(\"typeStr2Type\", typeStr);\n switch (typeStr) {\n case \"[]\":\n return \"square\";\n case \"()\":\n log.debug(\"we have a round\");\n return \"round\";\n case \"(())\":\n return \"circle\";\n case \">]\":\n return \"rect_left_inv_arrow\";\n case \"{}\":\n return \"diamond\";\n case \"{{}}\":\n return \"hexagon\";\n case \"([])\":\n return \"stadium\";\n case \"[[]]\":\n return \"subroutine\";\n case \"[()]\":\n return \"cylinder\";\n case \"((()))\":\n return \"doublecircle\";\n case \"[//]\":\n return \"lean_right\";\n case \"[\\\\\\\\]\":\n return \"lean_left\";\n case \"[/\\\\]\":\n return \"trapezoid\";\n case \"[\\\\/]\":\n return \"inv_trapezoid\";\n case \"<[]>\":\n return \"block_arrow\";\n default:\n return \"na\";\n }\n}\n__name(typeStr2Type, \"typeStr2Type\");\nfunction edgeTypeStr2Type(typeStr) {\n log.debug(\"typeStr2Type\", typeStr);\n switch (typeStr) {\n case \"==\":\n return \"thick\";\n default:\n return \"normal\";\n }\n}\n__name(edgeTypeStr2Type, \"edgeTypeStr2Type\");\nfunction edgeStrToEdgeData(typeStr) {\n const lastChar = typeStr.trim().slice(-1);\n switch (lastChar) {\n case \"x\":\n return \"arrow_cross\";\n case \"o\":\n return \"arrow_circle\";\n case \">\":\n return \"arrow_point\";\n default:\n return \"\";\n }\n}\n__name(edgeStrToEdgeData, \"edgeStrToEdgeData\");\nfunction edgeStrToEdgeStartData(typeStr) {\n const firstChar = typeStr.trim().charAt(0);\n switch (firstChar) {\n case \"x\":\n return \"arrow_cross\";\n case \"o\":\n return \"arrow_circle\";\n case \"<\":\n return \"arrow_point\";\n default:\n return \"arrow_open\";\n }\n}\n__name(edgeStrToEdgeStartData, \"edgeStrToEdgeStartData\");\nfunction edgeStrToThickness(typeStr) {\n return typeStr.includes(\"==\") ? \"thick\" : \"normal\";\n}\n__name(edgeStrToThickness, \"edgeStrToThickness\");\nfunction edgeStrToPattern(typeStr) {\n if (typeStr.includes(\".-\")) {\n return \"dotted\";\n }\n return \"solid\";\n}\n__name(edgeStrToPattern, \"edgeStrToPattern\");\nvar cnt = 0;\nvar generateId = /* @__PURE__ */ __name(() => {\n cnt++;\n return \"id-\" + Math.random().toString(36).substr(2, 12) + \"-\" + cnt;\n}, \"generateId\");\nvar setHierarchy = /* @__PURE__ */ __name((block) => {\n rootBlock.children = block;\n populateBlockDatabase(block, rootBlock);\n blocks = rootBlock.children;\n}, \"setHierarchy\");\nvar getColumns = /* @__PURE__ */ __name((blockId) => {\n const block = blockDatabase.get(blockId);\n if (!block) {\n return -1;\n }\n if (block.columns) {\n return block.columns;\n }\n if (!block.children) {\n return -1;\n }\n return block.children.length;\n}, \"getColumns\");\nvar getBlocksFlat = /* @__PURE__ */ __name(() => {\n return [...blockDatabase.values()];\n}, \"getBlocksFlat\");\nvar getBlocks = /* @__PURE__ */ __name(() => {\n return blocks || [];\n}, \"getBlocks\");\nvar getEdges = /* @__PURE__ */ __name(() => {\n return edgeList;\n}, \"getEdges\");\nvar getBlock = /* @__PURE__ */ __name((id) => {\n return blockDatabase.get(id);\n}, \"getBlock\");\nvar setBlock = /* @__PURE__ */ __name((block) => {\n blockDatabase.set(block.id, block);\n}, \"setBlock\");\nvar setDiagramId = /* @__PURE__ */ __name((id) => {\n diagramId = id;\n}, \"setDiagramId\");\nvar getDiagramId = /* @__PURE__ */ __name(() => diagramId, \"getDiagramId\");\nvar getLogger = /* @__PURE__ */ __name(() => log, \"getLogger\");\nvar getClasses = /* @__PURE__ */ __name(function() {\n return classes;\n}, \"getClasses\");\nvar db = {\n getConfig: /* @__PURE__ */ __name(() => getConfig().block, \"getConfig\"),\n typeStr2Type,\n edgeTypeStr2Type,\n edgeStrToEdgeData,\n edgeStrToEdgeStartData,\n edgeStrToThickness,\n edgeStrToPattern,\n getLogger,\n getBlocksFlat,\n getBlocks,\n getEdges,\n setHierarchy,\n getBlock,\n setBlock,\n getColumns,\n getClasses,\n clear: clear2,\n generateId,\n setDiagramId,\n getDiagramId\n};\nvar blockDB_default = db;\n\n// src/diagrams/block/styles.ts\nimport * as khroma from \"khroma\";\nvar fade = /* @__PURE__ */ __name((color, opacity) => {\n const channel2 = khroma.channel;\n const r = channel2(color, \"r\");\n const g = channel2(color, \"g\");\n const b = channel2(color, \"b\");\n return khroma.rgba(r, g, b, opacity);\n}, \"fade\");\nvar getStyles = /* @__PURE__ */ __name((options) => `.label {\n font-family: ${options.fontFamily};\n color: ${options.nodeTextColor || options.textColor};\n }\n .cluster-label text {\n fill: ${options.titleColor};\n }\n .cluster-label span,p {\n color: ${options.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${options.nodeTextColor || options.textColor};\n color: ${options.nodeTextColor || options.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \\`

\\` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${options.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${fade(options.mainBkg, 0.5)};\n fill: ${fade(options.clusterBkg, 0.5)};\n stroke: ${fade(options.clusterBorder, 0.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n .cluster span,p {\n color: ${options.titleColor};\n }\n /* .cluster div {\n color: ${options.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${options.fontFamily};\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n }\n ${getIconStyles()}\n`, \"getStyles\");\nvar styles_default = getStyles;\n\n// src/diagrams/block/blockRenderer.ts\nimport { select as d3select } from \"d3\";\n\n// src/dagre-wrapper/markers.js\nvar insertMarkers = /* @__PURE__ */ __name((elem, markerArray, type, id) => {\n markerArray.forEach((markerName) => {\n markers[markerName](elem, type, id);\n });\n}, \"insertMarkers\");\nvar extension = /* @__PURE__ */ __name((elem, type, id) => {\n log.trace(\"Making markers for \", id);\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-extensionStart\").attr(\"class\", \"marker extension \" + type).attr(\"refX\", 18).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 1,7 L18,13 V 1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-extensionEnd\").attr(\"class\", \"marker extension \" + type).attr(\"refX\", 1).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 1,1 V 13 L18,7 Z\");\n}, \"extension\");\nvar composition = /* @__PURE__ */ __name((elem, type, id) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-compositionStart\").attr(\"class\", \"marker composition \" + type).attr(\"refX\", 18).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-compositionEnd\").attr(\"class\", \"marker composition \" + type).attr(\"refX\", 1).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n}, \"composition\");\nvar aggregation = /* @__PURE__ */ __name((elem, type, id) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-aggregationStart\").attr(\"class\", \"marker aggregation \" + type).attr(\"refX\", 18).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-aggregationEnd\").attr(\"class\", \"marker aggregation \" + type).attr(\"refX\", 1).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L1,7 L9,1 Z\");\n}, \"aggregation\");\nvar dependency = /* @__PURE__ */ __name((elem, type, id) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-dependencyStart\").attr(\"class\", \"marker dependency \" + type).attr(\"refX\", 6).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 5,7 L9,13 L1,7 L9,1 Z\");\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-dependencyEnd\").attr(\"class\", \"marker dependency \" + type).attr(\"refX\", 13).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L14,7 L9,1 Z\");\n}, \"dependency\");\nvar lollipop = /* @__PURE__ */ __name((elem, type, id) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-lollipopStart\").attr(\"class\", \"marker lollipop \" + type).attr(\"refX\", 13).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"circle\").attr(\"stroke\", \"black\").attr(\"fill\", \"transparent\").attr(\"cx\", 7).attr(\"cy\", 7).attr(\"r\", 6);\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-lollipopEnd\").attr(\"class\", \"marker lollipop \" + type).attr(\"refX\", 1).attr(\"refY\", 7).attr(\"markerWidth\", 190).attr(\"markerHeight\", 240).attr(\"orient\", \"auto\").append(\"circle\").attr(\"stroke\", \"black\").attr(\"fill\", \"transparent\").attr(\"cx\", 7).attr(\"cy\", 7).attr(\"r\", 6);\n}, \"lollipop\");\nvar point = /* @__PURE__ */ __name((elem, type, id) => {\n elem.append(\"marker\").attr(\"id\", id + \"_\" + type + \"-pointEnd\").attr(\"class\", \"marker \" + type).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 6).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 12).attr(\"markerHeight\", 12).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\");\n elem.append(\"marker\").attr(\"id\", id + \"_\" + type + \"-pointStart\").attr(\"class\", \"marker \" + type).attr(\"viewBox\", \"0 0 10 10\").attr(\"refX\", 4.5).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 12).attr(\"markerHeight\", 12).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\");\n}, \"point\");\nvar circle = /* @__PURE__ */ __name((elem, type, id) => {\n elem.append(\"marker\").attr(\"id\", id + \"_\" + type + \"-circleEnd\").attr(\"class\", \"marker \" + type).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\");\n elem.append(\"marker\").attr(\"id\", id + \"_\" + type + \"-circleStart\").attr(\"class\", \"marker \" + type).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\");\n}, \"circle\");\nvar cross = /* @__PURE__ */ __name((elem, type, id) => {\n elem.append(\"marker\").attr(\"id\", id + \"_\" + type + \"-crossEnd\").attr(\"class\", \"marker cross \" + type).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\");\n elem.append(\"marker\").attr(\"id\", id + \"_\" + type + \"-crossStart\").attr(\"class\", \"marker cross \" + type).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\");\n}, \"cross\");\nvar barb = /* @__PURE__ */ __name((elem, type, id) => {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"_\" + type + \"-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 L9,13 L14,7 L9,1 Z\");\n}, \"barb\");\nvar markers = {\n extension,\n composition,\n aggregation,\n dependency,\n lollipop,\n point,\n circle,\n cross,\n barb\n};\nvar markers_default = insertMarkers;\n\n// src/diagrams/block/layout.ts\nvar padding = getConfig2()?.block?.padding ?? 8;\nfunction calculateBlockPosition(columns, position) {\n if (columns === 0 || !Number.isInteger(columns)) {\n throw new Error(\"Columns must be an integer !== 0.\");\n }\n if (position < 0 || !Number.isInteger(position)) {\n throw new Error(\"Position must be a non-negative integer.\" + position);\n }\n if (columns < 0) {\n return { px: position, py: 0 };\n }\n if (columns === 1) {\n return { px: 0, py: position };\n }\n const px = position % columns;\n const py = Math.floor(position / columns);\n return { px, py };\n}\n__name(calculateBlockPosition, \"calculateBlockPosition\");\nvar getMaxChildSize = /* @__PURE__ */ __name((block) => {\n let maxWidth = 0;\n let maxHeight = 0;\n for (const child of block.children) {\n const { width, height, x, y } = child.size ?? { width: 0, height: 0, x: 0, y: 0 };\n log.debug(\n \"getMaxChildSize abc95 child:\",\n child.id,\n \"width:\",\n width,\n \"height:\",\n height,\n \"x:\",\n x,\n \"y:\",\n y,\n child.type\n );\n if (child.type === \"space\") {\n continue;\n }\n const normalizedWidth = width / (child.widthInColumns ?? 1);\n if (normalizedWidth > maxWidth) {\n maxWidth = normalizedWidth;\n }\n if (height > maxHeight) {\n maxHeight = height;\n }\n }\n return { width: maxWidth, height: maxHeight };\n}, \"getMaxChildSize\");\nfunction setBlockSizes(block, db2, siblingWidth = 0, siblingHeight = 0) {\n log.debug(\n \"setBlockSizes abc95 (start)\",\n block.id,\n block?.size?.x,\n \"block width =\",\n block?.size,\n \"siblingWidth\",\n siblingWidth\n );\n if (!block?.size?.width) {\n block.size = {\n width: siblingWidth,\n height: siblingHeight,\n x: 0,\n y: 0\n };\n }\n let maxWidth = 0;\n let maxHeight = 0;\n if (block.children?.length > 0) {\n for (const child of block.children) {\n setBlockSizes(child, db2);\n }\n const childSize = getMaxChildSize(block);\n maxWidth = childSize.width;\n maxHeight = childSize.height;\n log.debug(\"setBlockSizes abc95 maxWidth of\", block.id, \":s children is \", maxWidth, maxHeight);\n for (const child of block.children) {\n if (child.size) {\n log.debug(\n `abc95 Setting size of children of ${block.id} id=${child.id} ${maxWidth} ${maxHeight} ${JSON.stringify(child.size)}`\n );\n child.size.width = maxWidth * (child.widthInColumns ?? 1) + padding * ((child.widthInColumns ?? 1) - 1);\n child.size.height = maxHeight;\n child.size.x = 0;\n child.size.y = 0;\n log.debug(\n `abc95 updating size of ${block.id} children child:${child.id} maxWidth:${maxWidth} maxHeight:${maxHeight}`\n );\n }\n }\n for (const child of block.children) {\n setBlockSizes(child, db2, maxWidth, maxHeight);\n }\n const columns = block.columns ?? -1;\n let numItems = 0;\n for (const child of block.children) {\n numItems += child.widthInColumns ?? 1;\n }\n let xSize = block.children.length;\n if (columns > 0 && columns < numItems) {\n xSize = columns;\n }\n const ySize = Math.ceil(numItems / xSize);\n let width = xSize * (maxWidth + padding) + padding;\n let height = ySize * (maxHeight + padding) + padding;\n if (width < siblingWidth) {\n log.debug(\n `Detected to small sibling: abc95 ${block.id} siblingWidth ${siblingWidth} siblingHeight ${siblingHeight} width ${width}`\n );\n width = siblingWidth;\n height = siblingHeight;\n const childWidth = (siblingWidth - xSize * padding - padding) / xSize;\n const childHeight = (siblingHeight - ySize * padding - padding) / ySize;\n log.debug(\"Size indata abc88\", block.id, \"childWidth\", childWidth, \"maxWidth\", maxWidth);\n log.debug(\"Size indata abc88\", block.id, \"childHeight\", childHeight, \"maxHeight\", maxHeight);\n log.debug(\"Size indata abc88 xSize\", xSize, \"padding\", padding);\n for (const child of block.children) {\n if (child.size) {\n child.size.width = childWidth;\n child.size.height = childHeight;\n child.size.x = 0;\n child.size.y = 0;\n }\n }\n }\n log.debug(\n `abc95 (finale calc) ${block.id} xSize ${xSize} ySize ${ySize} columns ${columns}${block.children.length} width=${Math.max(width, block.size?.width || 0)}`\n );\n if (width < (block?.size?.width || 0)) {\n width = block?.size?.width || 0;\n const num = columns > 0 ? Math.min(block.children.length, columns) : block.children.length;\n if (num > 0) {\n const childWidth = (width - num * padding - padding) / num;\n log.debug(\"abc95 (growing to fit) width\", block.id, width, block.size?.width, childWidth);\n for (const child of block.children) {\n if (child.size) {\n child.size.width = childWidth;\n }\n }\n }\n }\n block.size = {\n width,\n height,\n x: 0,\n y: 0\n };\n }\n log.debug(\n \"setBlockSizes abc94 (done)\",\n block.id,\n block?.size?.x,\n block?.size?.width,\n block?.size?.y,\n block?.size?.height\n );\n}\n__name(setBlockSizes, \"setBlockSizes\");\nfunction layoutBlocks(block, db2) {\n log.debug(\n `abc85 layout blocks (=>layoutBlocks) ${block.id} x: ${block?.size?.x} y: ${block?.size?.y} width: ${block?.size?.width}`\n );\n const columns = block.columns ?? -1;\n log.debug(\"layoutBlocks columns abc95\", block.id, \"=>\", columns, block);\n if (block.children && // find max width of children\n block.children.length > 0) {\n const width = block?.children[0]?.size?.width ?? 0;\n const widthOfChildren = block.children.length * width + (block.children.length - 1) * padding;\n log.debug(\"widthOfChildren 88\", widthOfChildren, \"posX\");\n const rowHeights = /* @__PURE__ */ new Map();\n {\n let colPos = 0;\n for (const child of block.children) {\n if (!child.size) {\n continue;\n }\n const { py } = calculateBlockPosition(columns, colPos);\n const currentMax = rowHeights.get(py) ?? 0;\n if (child.size.height > currentMax) {\n rowHeights.set(py, child.size.height);\n }\n let filled = child?.widthInColumns ?? 1;\n if (columns > 0) {\n filled = Math.min(filled, columns - colPos % columns);\n }\n colPos += filled;\n }\n }\n const rowYOffsets = /* @__PURE__ */ new Map();\n {\n let offset = 0;\n const rows = [...rowHeights.keys()].sort((a, b) => a - b);\n for (const row of rows) {\n rowYOffsets.set(row, offset);\n offset += (rowHeights.get(row) ?? 0) + padding;\n }\n }\n let columnPos = 0;\n log.debug(\"abc91 block?.size?.x\", block.id, block?.size?.x);\n let startingPosX = block?.size?.x ? block?.size?.x + (-block?.size?.width / 2 || 0) : -padding;\n let rowPos = 0;\n for (const child of block.children) {\n const parent = block;\n if (!child.size) {\n continue;\n }\n const { width: width2, height } = child.size;\n const { px, py } = calculateBlockPosition(columns, columnPos);\n if (py != rowPos) {\n rowPos = py;\n startingPosX = block?.size?.x ? block?.size?.x + (-block?.size?.width / 2 || 0) : -padding;\n log.debug(\"New row in layout for block\", block.id, \" and child \", child.id, rowPos);\n }\n log.debug(\n `abc89 layout blocks (child) id: ${child.id} Pos: ${columnPos} (px, py) ${px},${py} (${parent?.size?.x},${parent?.size?.y}) parent: ${parent.id} width: ${width2}${padding}`\n );\n if (parent.size) {\n const halfWidth = width2 / 2;\n child.size.x = startingPosX + padding + halfWidth;\n log.debug(\n `abc91 layout blocks (calc) px, pyid:${child.id} startingPos=X${startingPosX} new startingPosX${child.size.x} ${halfWidth} padding=${padding} width=${width2} halfWidth=${halfWidth} => x:${child.size.x} y:${child.size.y} ${child.widthInColumns} (width * (child?.w || 1)) / 2 ${width2 * (child?.widthInColumns ?? 1) / 2}`\n );\n startingPosX = child.size.x + halfWidth;\n const rowYOffset = rowYOffsets.get(py) ?? 0;\n const rowHeight = rowHeights.get(py) ?? height;\n child.size.y = parent.size.y - parent.size.height / 2 + rowYOffset + rowHeight / 2 + padding;\n log.debug(\n `abc88 layout blocks (calc) px, pyid:${child.id}startingPosX${startingPosX}${padding}${halfWidth}=>x:${child.size.x}y:${child.size.y}${child.widthInColumns}(width * (child?.w || 1)) / 2${width2 * (child?.widthInColumns ?? 1) / 2}`\n );\n }\n if (child.children) {\n layoutBlocks(child, db2);\n }\n let columnsFilled = child?.widthInColumns ?? 1;\n if (columns > 0) {\n columnsFilled = Math.min(columnsFilled, columns - columnPos % columns);\n }\n columnPos += columnsFilled;\n log.debug(\"abc88 columnsPos\", child, columnPos);\n }\n }\n log.debug(\n `layout blocks (<==layoutBlocks) ${block.id} x: ${block?.size?.x} y: ${block?.size?.y} width: ${block?.size?.width}`\n );\n}\n__name(layoutBlocks, \"layoutBlocks\");\nfunction findBounds(block, { minX, minY, maxX, maxY } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {\n if (block.size && block.id !== \"root\") {\n const { x, y, width, height } = block.size;\n if (x - width / 2 < minX) {\n minX = x - width / 2;\n }\n if (y - height / 2 < minY) {\n minY = y - height / 2;\n }\n if (x + width / 2 > maxX) {\n maxX = x + width / 2;\n }\n if (y + height / 2 > maxY) {\n maxY = y + height / 2;\n }\n }\n if (block.children) {\n for (const child of block.children) {\n ({ minX, minY, maxX, maxY } = findBounds(child, { minX, minY, maxX, maxY }));\n }\n }\n return { minX, minY, maxX, maxY };\n}\n__name(findBounds, \"findBounds\");\nfunction layout(db2) {\n const root = db2.getBlock(\"root\");\n if (!root) {\n return;\n }\n setBlockSizes(root, db2, 0, 0);\n layoutBlocks(root, db2);\n log.debug(\"getBlocks\", JSON.stringify(root, null, 2));\n const { minX, minY, maxX, maxY } = findBounds(root);\n const height = maxY - minY;\n const width = maxX - minX;\n return { x: minX, y: minY, width, height };\n}\n__name(layout, \"layout\");\n\n// src/diagrams/block/renderHelpers.ts\nimport * as graphlib from \"dagre-d3-es/src/graphlib/index.js\";\n\n// src/dagre-wrapper/createLabel.js\nvar createLabel = /* @__PURE__ */ __name(async (element, _vertexText, style, isTitle = false, isNode = false) => {\n let vertexText = _vertexText || \"\";\n if (typeof vertexText === \"object\") {\n vertexText = vertexText[0];\n }\n const config2 = getConfig2();\n const useHtmlLabels = getEffectiveHtmlLabels(config2);\n return await createText(\n element,\n vertexText,\n {\n style,\n isTitle,\n useHtmlLabels,\n markdown: false,\n isNode,\n width: Number.POSITIVE_INFINITY\n },\n config2\n );\n}, \"createLabel\");\nvar createLabel_default = createLabel;\n\n// src/dagre-wrapper/edges.js\nimport { line, curveBasis, select } from \"d3\";\n\n// src/dagre-wrapper/edgeMarker.ts\nvar addEdgeMarkers = /* @__PURE__ */ __name((svgPath, edge, url, id, diagramType) => {\n if (edge.arrowTypeStart) {\n addEdgeMarker(svgPath, \"start\", edge.arrowTypeStart, url, id, diagramType);\n }\n if (edge.arrowTypeEnd) {\n addEdgeMarker(svgPath, \"end\", edge.arrowTypeEnd, url, id, diagramType);\n }\n}, \"addEdgeMarkers\");\nvar arrowTypesMap = {\n arrow_cross: \"cross\",\n arrow_point: \"point\",\n arrow_barb: \"barb\",\n arrow_circle: \"circle\",\n aggregation: \"aggregation\",\n extension: \"extension\",\n composition: \"composition\",\n dependency: \"dependency\",\n lollipop: \"lollipop\"\n};\nvar addEdgeMarker = /* @__PURE__ */ __name((svgPath, position, arrowType, url, id, diagramType) => {\n const endMarkerType = arrowTypesMap[arrowType];\n if (!endMarkerType) {\n log.warn(`Unknown arrow type: ${arrowType}`);\n return;\n }\n const suffix = position === \"start\" ? \"Start\" : \"End\";\n svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`);\n}, \"addEdgeMarker\");\n\n// src/dagre-wrapper/edges.js\nvar edgeLabels = {};\nvar terminalLabels = {};\nvar insertEdgeLabel = /* @__PURE__ */ __name(async (elem, edge) => {\n const config2 = getConfig2();\n const useHtmlLabels = getEffectiveHtmlLabels(config2);\n const edgeLabel = elem.insert(\"g\").attr(\"class\", \"edgeLabel\");\n const label = edgeLabel.insert(\"g\").attr(\"class\", \"label\");\n const isMarkdown = edge.labelType === \"markdown\";\n const labelElement = await createText(\n elem,\n edge.label,\n {\n style: edge.labelStyle,\n useHtmlLabels,\n // TODO: The old code only set addSvgBackground when using markdown, but\n // this function is only used by block diagrams which never use markdown.\n addSvgBackground: isMarkdown,\n isNode: false,\n markdown: isMarkdown,\n // If using markdown, wrap using default width\n width: isMarkdown ? void 0 : Number.POSITIVE_INFINITY\n },\n config2\n );\n label.node().appendChild(labelElement);\n let bbox = labelElement.getBBox();\n let transformBbox = bbox;\n if (useHtmlLabels) {\n const div = labelElement.children[0];\n const dv = select(labelElement);\n bbox = div.getBoundingClientRect();\n transformBbox = bbox;\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n } else {\n const textEl = select(labelElement).select(\"text\").node();\n if (textEl && typeof textEl.getBBox === \"function\") {\n transformBbox = textEl.getBBox();\n }\n }\n label.attr(\"transform\", computeLabelTransform(transformBbox, useHtmlLabels));\n edgeLabels[edge.id] = edgeLabel;\n edge.width = bbox.width;\n edge.height = bbox.height;\n let fo;\n if (edge.startLabelLeft) {\n const startEdgeLabelLeft = elem.insert(\"g\").attr(\"class\", \"edgeTerminals\");\n const inner = startEdgeLabelLeft.insert(\"g\").attr(\"class\", \"inner\");\n const startLabelElement = await createLabel_default(inner, edge.startLabelLeft, edge.labelStyle);\n fo = startLabelElement;\n let slBox = startLabelElement.getBBox();\n if (useHtmlLabels) {\n const div = startLabelElement.children[0];\n const dv = select(startLabelElement);\n slBox = div.getBoundingClientRect();\n dv.attr(\"width\", slBox.width);\n dv.attr(\"height\", slBox.height);\n }\n inner.attr(\"transform\", computeLabelTransform(slBox, useHtmlLabels));\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startLeft = startEdgeLabelLeft;\n setTerminalWidth(fo, edge.startLabelLeft);\n }\n if (edge.startLabelRight) {\n const startEdgeLabelRight = elem.insert(\"g\").attr(\"class\", \"edgeTerminals\");\n const inner = startEdgeLabelRight.insert(\"g\").attr(\"class\", \"inner\");\n const startLabelElement = await createLabel_default(inner, edge.startLabelRight, edge.labelStyle);\n fo = startLabelElement;\n let slBox = startLabelElement.getBBox();\n if (useHtmlLabels) {\n const div = startLabelElement.children[0];\n const dv = select(startLabelElement);\n slBox = div.getBoundingClientRect();\n dv.attr(\"width\", slBox.width);\n dv.attr(\"height\", slBox.height);\n }\n inner.attr(\"transform\", computeLabelTransform(slBox, useHtmlLabels));\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startRight = startEdgeLabelRight;\n setTerminalWidth(fo, edge.startLabelRight);\n }\n if (edge.endLabelLeft) {\n const endEdgeLabelLeft = elem.insert(\"g\").attr(\"class\", \"edgeTerminals\");\n const inner = endEdgeLabelLeft.insert(\"g\").attr(\"class\", \"inner\");\n const endLabelElement = await createLabel_default(endEdgeLabelLeft, edge.endLabelLeft, edge.labelStyle);\n fo = endLabelElement;\n let slBox = endLabelElement.getBBox();\n if (useHtmlLabels) {\n const div = endLabelElement.children[0];\n const dv = select(endLabelElement);\n slBox = div.getBoundingClientRect();\n dv.attr(\"width\", slBox.width);\n dv.attr(\"height\", slBox.height);\n }\n inner.attr(\"transform\", computeLabelTransform(slBox, useHtmlLabels));\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endLeft = endEdgeLabelLeft;\n setTerminalWidth(fo, edge.endLabelLeft);\n }\n if (edge.endLabelRight) {\n const endEdgeLabelRight = elem.insert(\"g\").attr(\"class\", \"edgeTerminals\");\n const inner = endEdgeLabelRight.insert(\"g\").attr(\"class\", \"inner\");\n const endLabelElement = await createLabel_default(\n endEdgeLabelRight,\n edge.endLabelRight,\n edge.labelStyle\n );\n fo = endLabelElement;\n let slBox = endLabelElement.getBBox();\n if (useHtmlLabels) {\n const div = endLabelElement.children[0];\n const dv = select(endLabelElement);\n slBox = div.getBoundingClientRect();\n dv.attr(\"width\", slBox.width);\n dv.attr(\"height\", slBox.height);\n }\n inner.attr(\"transform\", computeLabelTransform(slBox, useHtmlLabels));\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endRight = endEdgeLabelRight;\n setTerminalWidth(fo, edge.endLabelRight);\n }\n return labelElement;\n}, \"insertEdgeLabel\");\nfunction setTerminalWidth(fo, value) {\n if (getEffectiveHtmlLabels(getConfig2()) && fo) {\n fo.style.width = value.length * 9 + \"px\";\n fo.style.height = \"12px\";\n }\n}\n__name(setTerminalWidth, \"setTerminalWidth\");\nvar positionEdgeLabel = /* @__PURE__ */ __name((edge, paths) => {\n log.debug(\"Moving label abc88 \", edge.id, edge.label, edgeLabels[edge.id], paths);\n let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n const siteConfig = getConfig2();\n const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n if (edge.label) {\n const el = edgeLabels[edge.id];\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils_default.calcLabelPosition(path);\n log.debug(\n \"Moving label \" + edge.label + \" from (\",\n x,\n \",\",\n y,\n \") to (\",\n pos.x,\n \",\",\n pos.y,\n \") abc88\"\n );\n if (paths.updatedPath) {\n x = pos.x;\n y = pos.y;\n }\n }\n el.attr(\"transform\", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`);\n }\n if (edge.startLabelLeft) {\n const el = terminalLabels[edge.id].startLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, \"start_left\", path);\n x = pos.x;\n y = pos.y;\n }\n el.attr(\"transform\", `translate(${x}, ${y})`);\n }\n if (edge.startLabelRight) {\n const el = terminalLabels[edge.id].startRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils_default.calcTerminalLabelPosition(\n edge.arrowTypeStart ? 10 : 0,\n \"start_right\",\n path\n );\n x = pos.x;\n y = pos.y;\n }\n el.attr(\"transform\", `translate(${x}, ${y})`);\n }\n if (edge.endLabelLeft) {\n const el = terminalLabels[edge.id].endLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, \"end_left\", path);\n x = pos.x;\n y = pos.y;\n }\n el.attr(\"transform\", `translate(${x}, ${y})`);\n }\n if (edge.endLabelRight) {\n const el = terminalLabels[edge.id].endRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, \"end_right\", path);\n x = pos.x;\n y = pos.y;\n }\n el.attr(\"transform\", `translate(${x}, ${y})`);\n }\n}, \"positionEdgeLabel\");\nvar outsideNode = /* @__PURE__ */ __name((node, point2) => {\n const x = node.x;\n const y = node.y;\n const dx = Math.abs(point2.x - x);\n const dy = Math.abs(point2.y - y);\n const w = node.width / 2;\n const h = node.height / 2;\n if (dx >= w || dy >= h) {\n return true;\n }\n return false;\n}, \"outsideNode\");\nvar intersection = /* @__PURE__ */ __name((node, outsidePoint, insidePoint) => {\n log.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(outsidePoint)}\n insidePoint : ${JSON.stringify(insidePoint)}\n node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);\n const x = node.x;\n const y = node.y;\n const dx = Math.abs(x - insidePoint.x);\n const w = node.width / 2;\n let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;\n const h = node.height / 2;\n const Q = Math.abs(outsidePoint.y - insidePoint.y);\n const R = Math.abs(outsidePoint.x - insidePoint.x);\n if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {\n let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n r = R * q / Q;\n const res = {\n x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,\n y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q\n };\n if (r === 0) {\n res.x = outsidePoint.x;\n res.y = outsidePoint.y;\n }\n if (R === 0) {\n res.x = outsidePoint.x;\n }\n if (Q === 0) {\n res.y = outsidePoint.y;\n }\n log.debug(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);\n return res;\n } else {\n if (insidePoint.x < outsidePoint.x) {\n r = outsidePoint.x - w - x;\n } else {\n r = x - w - outsidePoint.x;\n }\n let q = Q * r / R;\n let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;\n let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;\n log.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });\n if (r === 0) {\n _x = outsidePoint.x;\n _y = outsidePoint.y;\n }\n if (R === 0) {\n _x = outsidePoint.x;\n }\n if (Q === 0) {\n _y = outsidePoint.y;\n }\n return { x: _x, y: _y };\n }\n}, \"intersection\");\nvar cutPathAtIntersect = /* @__PURE__ */ __name((_points, boundaryNode) => {\n log.debug(\"abc88 cutPathAtIntersect\", _points, boundaryNode);\n let points = [];\n let lastPointOutside = _points[0];\n let isInside = false;\n _points.forEach((point2) => {\n if (!outsideNode(boundaryNode, point2) && !isInside) {\n const inter = intersection(boundaryNode, lastPointOutside, point2);\n let pointPresent = false;\n points.forEach((p) => {\n pointPresent = pointPresent || p.x === inter.x && p.y === inter.y;\n });\n if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {\n points.push(inter);\n }\n isInside = true;\n } else {\n lastPointOutside = point2;\n if (!isInside) {\n points.push(point2);\n }\n }\n });\n return points;\n}, \"cutPathAtIntersect\");\nvar insertEdge = /* @__PURE__ */ __name(function(elem, e, edge, clusterDb, diagramType, graph, id) {\n let points = edge.points;\n log.debug(\"abc88 InsertEdge: edge=\", edge, \"e=\", e);\n let pointsHasChanged = false;\n const tail = graph.node(e.v);\n var head = graph.node(e.w);\n if (head?.intersect && tail?.intersect) {\n points = points.slice(1, edge.points.length - 1);\n points.unshift(tail.intersect(points[0]));\n points.push(head.intersect(points[points.length - 1]));\n }\n if (edge.toCluster) {\n log.debug(\"to cluster abc88\", clusterDb[edge.toCluster]);\n points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);\n pointsHasChanged = true;\n }\n if (edge.fromCluster) {\n log.debug(\"from cluster abc88\", clusterDb[edge.fromCluster]);\n points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse();\n pointsHasChanged = true;\n }\n const lineData = points.filter((p) => !Number.isNaN(p.y));\n let curve = curveBasis;\n if (edge.curve && (diagramType === \"graph\" || diagramType === \"flowchart\")) {\n curve = edge.curve;\n }\n const { x, y } = getLineFunctionsWithOffset(edge);\n const lineFunction = line().x(x).y(y).curve(curve);\n let strokeClasses;\n switch (edge.thickness) {\n case \"normal\":\n strokeClasses = \"edge-thickness-normal\";\n break;\n case \"thick\":\n strokeClasses = \"edge-thickness-thick\";\n break;\n case \"invisible\":\n strokeClasses = \"edge-thickness-thick\";\n break;\n default:\n strokeClasses = \"\";\n }\n switch (edge.pattern) {\n case \"solid\":\n strokeClasses += \" edge-pattern-solid\";\n break;\n case \"dotted\":\n strokeClasses += \" edge-pattern-dotted\";\n break;\n case \"dashed\":\n strokeClasses += \" edge-pattern-dashed\";\n break;\n }\n const svgPath = elem.append(\"path\").attr(\"d\", lineFunction(lineData)).attr(\"id\", edge.id).attr(\"class\", \" \" + strokeClasses + (edge.classes ? \" \" + edge.classes : \"\")).attr(\"style\", edge.style);\n let url = \"\";\n if (getConfig2().flowchart.arrowMarkerAbsolute || getConfig2().state.arrowMarkerAbsolute) {\n url = getUrl(true);\n }\n addEdgeMarkers(svgPath, edge, url, id, diagramType);\n let paths = {};\n if (pointsHasChanged) {\n paths.updatedPath = points;\n }\n paths.originalPath = edge.points;\n return paths;\n}, \"insertEdge\");\n\n// src/dagre-wrapper/nodes.js\nimport { select as select3 } from \"d3\";\n\n// src/dagre-wrapper/blockArrowHelper.ts\nvar expandAndDeduplicateDirections = /* @__PURE__ */ __name((directions) => {\n const uniqueDirections = /* @__PURE__ */ new Set();\n for (const direction of directions) {\n switch (direction) {\n case \"x\":\n uniqueDirections.add(\"right\");\n uniqueDirections.add(\"left\");\n break;\n case \"y\":\n uniqueDirections.add(\"up\");\n uniqueDirections.add(\"down\");\n break;\n default:\n uniqueDirections.add(direction);\n break;\n }\n }\n return uniqueDirections;\n}, \"expandAndDeduplicateDirections\");\nvar getArrowPoints = /* @__PURE__ */ __name((duplicatedDirections, bbox, node, totalWidth) => {\n const directions = expandAndDeduplicateDirections(duplicatedDirections);\n const f = 2;\n const height = bbox.height + 2 * node.padding;\n const midpoint = height / f;\n const width = totalWidth ?? bbox.width + 2 * midpoint + node.padding;\n const padding2 = node.padding / 2;\n if (directions.has(\"right\") && directions.has(\"left\") && directions.has(\"up\") && directions.has(\"down\")) {\n return [\n // Bottom\n { x: 0, y: 0 },\n { x: midpoint, y: 0 },\n { x: width / 2, y: 2 * padding2 },\n { x: width - midpoint, y: 0 },\n { x: width, y: 0 },\n // Right\n { x: width, y: -height / 3 },\n { x: width + 2 * padding2, y: -height / 2 },\n { x: width, y: -2 * height / 3 },\n { x: width, y: -height },\n // Top\n { x: width - midpoint, y: -height },\n { x: width / 2, y: -height - 2 * padding2 },\n { x: midpoint, y: -height },\n // Left\n { x: 0, y: -height },\n { x: 0, y: -2 * height / 3 },\n { x: -2 * padding2, y: -height / 2 },\n { x: 0, y: -height / 3 }\n ];\n }\n if (directions.has(\"right\") && directions.has(\"left\") && directions.has(\"up\")) {\n return [\n { x: midpoint, y: 0 },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 }\n ];\n }\n if (directions.has(\"right\") && directions.has(\"left\") && directions.has(\"down\")) {\n return [\n { x: 0, y: 0 },\n { x: midpoint, y: -height },\n { x: width - midpoint, y: -height },\n { x: width, y: 0 }\n ];\n }\n if (directions.has(\"right\") && directions.has(\"up\") && directions.has(\"down\")) {\n return [\n { x: 0, y: 0 },\n { x: width, y: -midpoint },\n { x: width, y: -height + midpoint },\n { x: 0, y: -height }\n ];\n }\n if (directions.has(\"left\") && directions.has(\"up\") && directions.has(\"down\")) {\n return [\n { x: width, y: 0 },\n { x: 0, y: -midpoint },\n { x: 0, y: -height + midpoint },\n { x: width, y: -height }\n ];\n }\n if (directions.has(\"right\") && directions.has(\"left\")) {\n return [\n { x: midpoint, y: 0 },\n { x: midpoint, y: -padding2 },\n { x: width - midpoint, y: -padding2 },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: width - midpoint, y: -height + padding2 },\n { x: midpoint, y: -height + padding2 },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 }\n ];\n }\n if (directions.has(\"up\") && directions.has(\"down\")) {\n return [\n // Bottom center\n { x: width / 2, y: 0 },\n // Left pont of bottom arrow\n { x: 0, y: -padding2 },\n { x: midpoint, y: -padding2 },\n // Left top over vertical section\n { x: midpoint, y: -height + padding2 },\n { x: 0, y: -height + padding2 },\n // Top of arrow\n { x: width / 2, y: -height },\n { x: width, y: -height + padding2 },\n // Top of right vertical bar\n { x: width - midpoint, y: -height + padding2 },\n { x: width - midpoint, y: -padding2 },\n { x: width, y: -padding2 }\n ];\n }\n if (directions.has(\"right\") && directions.has(\"up\")) {\n return [\n { x: 0, y: 0 },\n { x: width, y: -midpoint },\n { x: 0, y: -height }\n ];\n }\n if (directions.has(\"right\") && directions.has(\"down\")) {\n return [\n { x: 0, y: 0 },\n { x: width, y: 0 },\n { x: 0, y: -height }\n ];\n }\n if (directions.has(\"left\") && directions.has(\"up\")) {\n return [\n { x: width, y: 0 },\n { x: 0, y: -midpoint },\n { x: width, y: -height }\n ];\n }\n if (directions.has(\"left\") && directions.has(\"down\")) {\n return [\n { x: width, y: 0 },\n { x: 0, y: 0 },\n { x: width, y: -height }\n ];\n }\n if (directions.has(\"right\")) {\n return [\n { x: midpoint, y: -padding2 },\n { x: midpoint, y: -padding2 },\n { x: width - midpoint, y: -padding2 },\n { x: width - midpoint, y: 0 },\n { x: width, y: -height / 2 },\n { x: width - midpoint, y: -height },\n { x: width - midpoint, y: -height + padding2 },\n // top left corner of arrow\n { x: midpoint, y: -height + padding2 },\n { x: midpoint, y: -height + padding2 }\n ];\n }\n if (directions.has(\"left\")) {\n return [\n { x: midpoint, y: 0 },\n { x: midpoint, y: -padding2 },\n // Two points, the right corners\n { x: width - midpoint, y: -padding2 },\n { x: width - midpoint, y: -height + padding2 },\n { x: midpoint, y: -height + padding2 },\n { x: midpoint, y: -height },\n { x: 0, y: -height / 2 }\n ];\n }\n if (directions.has(\"up\")) {\n return [\n // Bottom center\n { x: midpoint, y: -padding2 },\n // Left top over vertical section\n { x: midpoint, y: -height + padding2 },\n { x: 0, y: -height + padding2 },\n // Top of arrow\n { x: width / 2, y: -height },\n { x: width, y: -height + padding2 },\n // Top of right vertical bar\n { x: width - midpoint, y: -height + padding2 },\n { x: width - midpoint, y: -padding2 }\n ];\n }\n if (directions.has(\"down\")) {\n return [\n // Bottom center\n { x: width / 2, y: 0 },\n // Left pont of bottom arrow\n { x: 0, y: -padding2 },\n { x: midpoint, y: -padding2 },\n // Left top over vertical section\n { x: midpoint, y: -height + padding2 },\n { x: width - midpoint, y: -height + padding2 },\n { x: width - midpoint, y: -padding2 },\n { x: width, y: -padding2 }\n ];\n }\n return [{ x: 0, y: 0 }];\n}, \"getArrowPoints\");\n\n// src/dagre-wrapper/intersect/intersect-node.js\nfunction intersectNode(node, point2) {\n return node.intersect(point2);\n}\n__name(intersectNode, \"intersectNode\");\nvar intersect_node_default = intersectNode;\n\n// src/dagre-wrapper/intersect/intersect-ellipse.js\nfunction intersectEllipse(node, rx, ry, point2) {\n var cx = node.x;\n var cy = node.y;\n var px = cx - point2.x;\n var py = cy - point2.y;\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n var dx = Math.abs(rx * ry * px / det);\n if (point2.x < cx) {\n dx = -dx;\n }\n var dy = Math.abs(rx * ry * py / det);\n if (point2.y < cy) {\n dy = -dy;\n }\n return { x: cx + dx, y: cy + dy };\n}\n__name(intersectEllipse, \"intersectEllipse\");\nvar intersect_ellipse_default = intersectEllipse;\n\n// src/dagre-wrapper/intersect/intersect-circle.js\nfunction intersectCircle(node, rx, point2) {\n return intersect_ellipse_default(node, rx, rx, point2);\n}\n__name(intersectCircle, \"intersectCircle\");\nvar intersect_circle_default = intersectCircle;\n\n// src/dagre-wrapper/intersect/intersect-line.js\nfunction intersectLine(p1, p2, q1, q2) {\n var a1, a2, b1, b2, c1, c2;\n var r1, r2, r3, r4;\n var denom, offset, num;\n var x, y;\n a1 = p2.y - p1.y;\n b1 = p1.x - p2.x;\n c1 = p2.x * p1.y - p1.x * p2.y;\n r3 = a1 * q1.x + b1 * q1.y + c1;\n r4 = a1 * q2.x + b1 * q2.y + c1;\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return;\n }\n a2 = q2.y - q1.y;\n b2 = q1.x - q2.x;\n c2 = q2.x * q1.y - q1.x * q2.y;\n r1 = a2 * p1.x + b2 * p1.y + c2;\n r2 = a2 * p2.x + b2 * p2.y + c2;\n if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n return;\n }\n denom = a1 * b2 - a2 * b1;\n if (denom === 0) {\n return;\n }\n offset = Math.abs(denom / 2);\n num = b1 * c2 - b2 * c1;\n x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n num = a2 * c1 - a1 * c2;\n y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n return { x, y };\n}\n__name(intersectLine, \"intersectLine\");\nfunction sameSign(r1, r2) {\n return r1 * r2 > 0;\n}\n__name(sameSign, \"sameSign\");\nvar intersect_line_default = intersectLine;\n\n// src/dagre-wrapper/intersect/intersect-polygon.js\nvar intersect_polygon_default = intersectPolygon;\nfunction intersectPolygon(node, polyPoints, point2) {\n var x1 = node.x;\n var y1 = node.y;\n var intersections = [];\n var minX = Number.POSITIVE_INFINITY;\n var minY = Number.POSITIVE_INFINITY;\n if (typeof polyPoints.forEach === \"function\") {\n polyPoints.forEach(function(entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n } else {\n minX = Math.min(minX, polyPoints.x);\n minY = Math.min(minY, polyPoints.y);\n }\n var left = x1 - node.width / 2 - minX;\n var top = y1 - node.height / 2 - minY;\n for (var i = 0; i < polyPoints.length; i++) {\n var p1 = polyPoints[i];\n var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n var intersect = intersect_line_default(\n node,\n point2,\n { x: left + p1.x, y: top + p1.y },\n { x: left + p2.x, y: top + p2.y }\n );\n if (intersect) {\n intersections.push(intersect);\n }\n }\n if (!intersections.length) {\n return node;\n }\n if (intersections.length > 1) {\n intersections.sort(function(p, q) {\n var pdx = p.x - point2.x;\n var pdy = p.y - point2.y;\n var distp = Math.sqrt(pdx * pdx + pdy * pdy);\n var qdx = q.x - point2.x;\n var qdy = q.y - point2.y;\n var distq = Math.sqrt(qdx * qdx + qdy * qdy);\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n return intersections[0];\n}\n__name(intersectPolygon, \"intersectPolygon\");\n\n// src/dagre-wrapper/intersect/intersect-rect.js\nvar intersectRect = /* @__PURE__ */ __name((node, point2) => {\n var x = node.x;\n var y = node.y;\n var dx = point2.x - x;\n var dy = point2.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n if (dy < 0) {\n h = -h;\n }\n sx = dy === 0 ? 0 : h * dx / dy;\n sy = h;\n } else {\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = dx === 0 ? 0 : w * dy / dx;\n }\n return { x: x + sx, y: y + sy };\n}, \"intersectRect\");\nvar intersect_rect_default = intersectRect;\n\n// src/dagre-wrapper/intersect/index.js\nvar intersect_default = {\n node: intersect_node_default,\n circle: intersect_circle_default,\n ellipse: intersect_ellipse_default,\n polygon: intersect_polygon_default,\n rect: intersect_rect_default\n};\n\n// src/dagre-wrapper/shapes/util.js\nimport { select as select2 } from \"d3\";\nvar labelHelper = /* @__PURE__ */ __name(async (parent, node, _classes, isNode) => {\n const config2 = getConfig2();\n let classes2;\n const useHtmlLabels = node.useHtmlLabels || getEffectiveHtmlLabels(config2);\n if (!_classes) {\n classes2 = \"node default\";\n } else {\n classes2 = _classes;\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", classes2).attr(\"id\", node.domId || node.id);\n const label = shapeSvg.insert(\"g\").attr(\"class\", \"label\").attr(\"style\", node.labelStyle);\n let labelText;\n if (node.labelText === void 0) {\n labelText = \"\";\n } else {\n labelText = typeof node.labelText === \"string\" ? node.labelText : node.labelText[0];\n }\n let text;\n if (node.labelType === \"markdown\") {\n text = createText(\n label,\n sanitizeText(decodeEntities(labelText), config2),\n {\n useHtmlLabels,\n width: node.width || config2.flowchart.wrappingWidth,\n classes: \"markdown-node-label\"\n },\n config2\n );\n } else {\n text = await createLabel_default(\n label,\n sanitizeText(decodeEntities(labelText), config2),\n node.labelStyle,\n false,\n isNode\n );\n }\n let bbox = text.getBBox();\n const halfPadding = node.padding / 2;\n if (getEffectiveHtmlLabels(config2)) {\n const div = text.children[0];\n const dv = select2(text);\n await configureLabelImages(div, labelText);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n if (useHtmlLabels) {\n label.attr(\"transform\", \"translate(\" + -bbox.width / 2 + \", \" + -bbox.height / 2 + \")\");\n } else {\n label.attr(\"transform\", \"translate(0, \" + -bbox.height / 2 + \")\");\n }\n if (node.centerLabel) {\n label.attr(\"transform\", \"translate(\" + -bbox.width / 2 + \", \" + -bbox.height / 2 + \")\");\n }\n label.insert(\"rect\", \":first-child\");\n return { shapeSvg, bbox, halfPadding, label };\n}, \"labelHelper\");\nvar updateNodeBounds = /* @__PURE__ */ __name((node, element) => {\n const bbox = element.node().getBBox();\n node.width = bbox.width;\n node.height = bbox.height;\n}, \"updateNodeBounds\");\nfunction insertPolygonShape(parent, w, h, points) {\n return parent.insert(\"polygon\", \":first-child\").attr(\n \"points\",\n points.map(function(d) {\n return d.x + \",\" + d.y;\n }).join(\" \")\n ).attr(\"class\", \"label-container\").attr(\"transform\", \"translate(\" + -w / 2 + \",\" + h / 2 + \")\");\n}\n__name(insertPolygonShape, \"insertPolygonShape\");\n\n// src/dagre-wrapper/shapes/note.js\nvar note = /* @__PURE__ */ __name(async (parent, node) => {\n const useHtmlLabels = node.useHtmlLabels || getEffectiveHtmlLabels(getConfig2());\n if (!useHtmlLabels) {\n node.centerLabel = true;\n }\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n \"node \" + node.classes,\n true\n );\n log.info(\"Classes = \", node.classes);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n rect2.attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"x\", -bbox.width / 2 - halfPadding).attr(\"y\", -bbox.height / 2 - halfPadding).attr(\"width\", bbox.width + node.padding).attr(\"height\", bbox.height + node.padding);\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect_default.rect(node, point2);\n };\n return shapeSvg;\n}, \"note\");\nvar note_default = note;\n\n// src/dagre-wrapper/nodes.js\nvar formatClass = /* @__PURE__ */ __name((str) => {\n if (str) {\n return \" \" + str;\n }\n return \"\";\n}, \"formatClass\");\nvar getClassesFromNode = /* @__PURE__ */ __name((node, otherClasses) => {\n return `${otherClasses ? otherClasses : \"node default\"}${formatClass(node.classes)} ${formatClass(\n node.class\n )}`;\n}, \"getClassesFromNode\");\nvar question = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const s = w + h;\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 }\n ];\n log.info(\"Question main (Circle)\");\n const questionElem = insertPolygonShape(shapeSvg, s, s, points);\n questionElem.attr(\"style\", node.style);\n updateNodeBounds(node, questionElem);\n node.intersect = function(point2) {\n log.warn(\"Intersect called\");\n return intersect_default.polygon(node, points, point2);\n };\n return shapeSvg;\n}, \"question\");\nvar choice = /* @__PURE__ */ __name((parent, node) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId || node.id);\n const s = 28;\n const points = [\n { x: 0, y: s / 2 },\n { x: s / 2, y: 0 },\n { x: 0, y: -s / 2 },\n { x: -s / 2, y: 0 }\n ];\n const choice2 = shapeSvg.insert(\"polygon\", \":first-child\").attr(\n \"points\",\n points.map(function(d) {\n return d.x + \",\" + d.y;\n }).join(\" \")\n );\n choice2.attr(\"class\", \"state-start\").attr(\"r\", 7).attr(\"width\", 28).attr(\"height\", 28);\n node.width = 28;\n node.height = 28;\n node.intersect = function(point2) {\n return intersect_default.circle(node, 14, point2);\n };\n return shapeSvg;\n}, \"choice\");\nvar hexagon = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const f = 4;\n const h = node.positioned ? node.height : bbox.height + node.padding;\n const m = h / f;\n const w = node.positioned ? node.width : bbox.width + 2 * m + node.padding;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 }\n ];\n const hex = insertPolygonShape(shapeSvg, w, h, points);\n hex.attr(\"style\", node.style);\n updateNodeBounds(node, hex);\n node.intersect = function(point2) {\n return intersect_default.polygon(node, points, point2);\n };\n return shapeSvg;\n}, \"hexagon\");\nvar block_arrow = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(parent, node, void 0, true);\n const f = 2;\n const h = bbox.height + 2 * node.padding;\n const m = h / f;\n const naturalW = bbox.width + 2 * m + node.padding;\n const isSpanning = node.positioned && (node.widthInColumns ?? 1) > 1 && node.width > naturalW;\n const w = isSpanning ? node.width : naturalW;\n const points = getArrowPoints(node.directions, bbox, node, w);\n const blockArrow = insertPolygonShape(shapeSvg, w, h, points);\n blockArrow.attr(\"style\", node.style);\n updateNodeBounds(node, blockArrow);\n node.intersect = function(point2) {\n return intersect_default.polygon(node, points, point2);\n };\n return shapeSvg;\n}, \"block_arrow\");\nvar rect_left_inv_arrow = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: -h / 2, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: -h / 2, y: -h },\n { x: 0, y: -h / 2 }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n node.width = w + h;\n node.height = h;\n node.intersect = function(point2) {\n return intersect_default.polygon(node, points, point2);\n };\n return shapeSvg;\n}, \"rect_left_inv_arrow\");\nvar lean_right = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true);\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: -2 * h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + 2 * h / 6, y: -h },\n { x: h / 6, y: -h }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect_default.polygon(node, points, point2);\n };\n return shapeSvg;\n}, \"lean_right\");\nvar lean_left = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 2 * h / 6, y: 0 },\n { x: w + h / 6, y: 0 },\n { x: w - 2 * h / 6, y: -h },\n { x: -h / 6, y: -h }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect_default.polygon(node, points, point2);\n };\n return shapeSvg;\n}, \"lean_left\");\nvar trapezoid = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: -2 * h / 6, y: 0 },\n { x: w + 2 * h / 6, y: 0 },\n { x: w - h / 6, y: -h },\n { x: h / 6, y: -h }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect_default.polygon(node, points, point2);\n };\n return shapeSvg;\n}, \"trapezoid\");\nvar inv_trapezoid = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + 2 * h / 6, y: -h },\n { x: -2 * h / 6, y: -h }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect_default.polygon(node, points, point2);\n };\n return shapeSvg;\n}, \"inv_trapezoid\");\nvar rect_right_inv_arrow = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w + h / 2, y: 0 },\n { x: w, y: -h / 2 },\n { x: w + h / 2, y: -h },\n { x: 0, y: -h }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect_default.polygon(node, points, point2);\n };\n return shapeSvg;\n}, \"rect_right_inv_arrow\");\nvar cylinder = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = bbox.height + ry + node.padding;\n const shape = \"M 0,\" + ry + \" a \" + rx + \",\" + ry + \" 0,0,0 \" + w + \" 0 a \" + rx + \",\" + ry + \" 0,0,0 \" + -w + \" 0 l 0,\" + h + \" a \" + rx + \",\" + ry + \" 0,0,0 \" + w + \" 0 l 0,\" + -h;\n const el = shapeSvg.attr(\"label-offset-y\", ry).insert(\"path\", \":first-child\").attr(\"style\", node.style).attr(\"d\", shape).attr(\"transform\", \"translate(\" + -w / 2 + \",\" + -(h / 2 + ry) + \")\");\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n const pos = intersect_default.rect(node, point2);\n const x = pos.x - node.x;\n if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {\n let y = ry * ry * (1 - x * x / (rx * rx));\n if (y != 0) {\n y = Math.sqrt(y);\n }\n y = ry - y;\n if (point2.y - node.y > 0) {\n y = -y;\n }\n pos.y += y;\n }\n return pos;\n };\n return shapeSvg;\n}, \"cylinder\");\nvar rect = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n \"node \" + node.classes + \" \" + node.class,\n true\n );\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const totalWidth = node.positioned ? node.width : bbox.width + node.padding;\n const totalHeight = node.positioned ? node.height : bbox.height + node.padding;\n const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;\n const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;\n rect2.attr(\"class\", \"basic label-container\").attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"x\", x).attr(\"y\", y).attr(\"width\", totalWidth).attr(\"height\", totalHeight);\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);\n propKeys.delete(\"borders\");\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect_default.rect(node, point2);\n };\n return shapeSvg;\n}, \"rect\");\nvar composite = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n \"node \" + node.classes,\n true\n );\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const totalWidth = node.positioned ? node.width : bbox.width + node.padding;\n const totalHeight = node.positioned ? node.height : bbox.height + node.padding;\n const x = node.positioned ? -totalWidth / 2 : -bbox.width / 2 - halfPadding;\n const y = node.positioned ? -totalHeight / 2 : -bbox.height / 2 - halfPadding;\n rect2.attr(\"class\", \"basic cluster composite label-container\").attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"x\", x).attr(\"y\", y).attr(\"width\", totalWidth).attr(\"height\", totalHeight);\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);\n propKeys.delete(\"borders\");\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect_default.rect(node, point2);\n };\n return shapeSvg;\n}, \"composite\");\nvar labelRect = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg } = await labelHelper(parent, node, \"label\", true);\n log.trace(\"Classes = \", node.class);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const totalWidth = 0;\n const totalHeight = 0;\n rect2.attr(\"width\", totalWidth).attr(\"height\", totalHeight);\n shapeSvg.attr(\"class\", \"label edgeLabel\");\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);\n propKeys.delete(\"borders\");\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect_default.rect(node, point2);\n };\n return shapeSvg;\n}, \"labelRect\");\nfunction applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) {\n const strokeDashArray = [];\n const addBorder = /* @__PURE__ */ __name((length) => {\n strokeDashArray.push(length, 0);\n }, \"addBorder\");\n const skipBorder = /* @__PURE__ */ __name((length) => {\n strokeDashArray.push(0, length);\n }, \"skipBorder\");\n if (borders.includes(\"t\")) {\n log.debug(\"add top border\");\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes(\"r\")) {\n log.debug(\"add right border\");\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n if (borders.includes(\"b\")) {\n log.debug(\"add bottom border\");\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes(\"l\")) {\n log.debug(\"add left border\");\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n rect2.attr(\"stroke-dasharray\", strokeDashArray.join(\" \"));\n}\n__name(applyNodePropertyBorders, \"applyNodePropertyBorders\");\nvar rectWithTitle = /* @__PURE__ */ __name(async (parent, node) => {\n let classes2;\n if (!node.classes) {\n classes2 = \"node default\";\n } else {\n classes2 = \"node \" + node.classes;\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", classes2).attr(\"id\", node.domId || node.id);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const innerLine = shapeSvg.insert(\"line\");\n const label = shapeSvg.insert(\"g\").attr(\"class\", \"label\");\n const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText;\n let title = \"\";\n if (typeof text2 === \"object\") {\n title = text2[0];\n } else {\n title = text2;\n }\n log.info(\"Label text abc79\", title, text2, typeof text2 === \"object\");\n const text = await createLabel_default(label, title, node.labelStyle, true, true);\n let bbox = { width: 0, height: 0 };\n if (getEffectiveHtmlLabels(getConfig2())) {\n const div = text.children[0];\n const dv = select3(text);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n log.info(\"Text 2\", text2);\n const textRows = text2.slice(1, text2.length);\n let titleBox = text.getBBox();\n const descr = await createLabel_default(\n label,\n textRows.join ? textRows.join(\"
\") : textRows,\n node.labelStyle,\n true,\n true\n );\n if (getEffectiveHtmlLabels(getConfig2())) {\n const div = descr.children[0];\n const dv = select3(descr);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n const halfPadding = node.padding / 2;\n select3(descr).attr(\n \"transform\",\n \"translate( \" + // (titleBox.width - bbox.width) / 2 +\n (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + \", \" + (titleBox.height + halfPadding + 5) + \")\"\n );\n select3(text).attr(\n \"transform\",\n \"translate( \" + // (titleBox.width - bbox.width) / 2 +\n (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + \", 0)\"\n );\n bbox = label.node().getBBox();\n label.attr(\n \"transform\",\n \"translate(\" + -bbox.width / 2 + \", \" + (-bbox.height / 2 - halfPadding + 3) + \")\"\n );\n rect2.attr(\"class\", \"outer title-state\").attr(\"x\", -bbox.width / 2 - halfPadding).attr(\"y\", -bbox.height / 2 - halfPadding).attr(\"width\", bbox.width + node.padding).attr(\"height\", bbox.height + node.padding);\n innerLine.attr(\"class\", \"divider\").attr(\"x1\", -bbox.width / 2 - halfPadding).attr(\"x2\", bbox.width / 2 + halfPadding).attr(\"y1\", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr(\"y2\", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect_default.rect(node, point2);\n };\n return shapeSvg;\n}, \"rectWithTitle\");\nvar stadium = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const h = bbox.height + node.padding;\n const w = bbox.width + h / 4 + node.padding;\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\").attr(\"style\", node.style).attr(\"rx\", h / 2).attr(\"ry\", h / 2).attr(\"x\", -w / 2).attr(\"y\", -h / 2).attr(\"width\", w).attr(\"height\", h);\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect_default.rect(node, point2);\n };\n return shapeSvg;\n}, \"stadium\");\nvar circle2 = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const circle3 = shapeSvg.insert(\"circle\", \":first-child\");\n circle3.attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"r\", bbox.width / 2 + halfPadding).attr(\"width\", bbox.width + node.padding).attr(\"height\", bbox.height + node.padding);\n log.info(\"Circle main\");\n updateNodeBounds(node, circle3);\n node.intersect = function(point2) {\n log.info(\"Circle intersect\", node, bbox.width / 2 + halfPadding, point2);\n return intersect_default.circle(node, bbox.width / 2 + halfPadding, point2);\n };\n return shapeSvg;\n}, \"circle\");\nvar doublecircle = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const gap = 5;\n const circleGroup = shapeSvg.insert(\"g\", \":first-child\");\n const outerCircle = circleGroup.insert(\"circle\");\n const innerCircle = circleGroup.insert(\"circle\");\n circleGroup.attr(\"class\", node.class);\n outerCircle.attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"r\", bbox.width / 2 + halfPadding + gap).attr(\"width\", bbox.width + node.padding + gap * 2).attr(\"height\", bbox.height + node.padding + gap * 2);\n innerCircle.attr(\"style\", node.style).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"r\", bbox.width / 2 + halfPadding).attr(\"width\", bbox.width + node.padding).attr(\"height\", bbox.height + node.padding);\n log.info(\"DoubleCircle main\");\n updateNodeBounds(node, outerCircle);\n node.intersect = function(point2) {\n log.info(\"DoubleCircle intersect\", node, bbox.width / 2 + halfPadding + gap, point2);\n return intersect_default.circle(node, bbox.width / 2 + halfPadding + gap, point2);\n };\n return shapeSvg;\n}, \"doublecircle\");\nvar subroutine = /* @__PURE__ */ __name(async (parent, node) => {\n const { shapeSvg, bbox } = await labelHelper(\n parent,\n node,\n getClassesFromNode(node, void 0),\n true\n );\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 }\n ];\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr(\"style\", node.style);\n updateNodeBounds(node, el);\n node.intersect = function(point2) {\n return intersect_default.polygon(node, points, point2);\n };\n return shapeSvg;\n}, \"subroutine\");\nvar start = /* @__PURE__ */ __name((parent, node) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId || node.id);\n const circle3 = shapeSvg.insert(\"circle\", \":first-child\");\n circle3.attr(\"class\", \"state-start\").attr(\"r\", 7).attr(\"width\", 14).attr(\"height\", 14);\n updateNodeBounds(node, circle3);\n node.intersect = function(point2) {\n return intersect_default.circle(node, 7, point2);\n };\n return shapeSvg;\n}, \"start\");\nvar forkJoin = /* @__PURE__ */ __name((parent, node, dir) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId || node.id);\n let width = 70;\n let height = 10;\n if (dir === \"LR\") {\n width = 10;\n height = 70;\n }\n const shape = shapeSvg.append(\"rect\").attr(\"x\", -1 * width / 2).attr(\"y\", -1 * height / 2).attr(\"width\", width).attr(\"height\", height).attr(\"class\", \"fork-join\");\n updateNodeBounds(node, shape);\n node.height = node.height + node.padding / 2;\n node.width = node.width + node.padding / 2;\n node.intersect = function(point2) {\n return intersect_default.rect(node, point2);\n };\n return shapeSvg;\n}, \"forkJoin\");\nvar end = /* @__PURE__ */ __name((parent, node) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId || node.id);\n const innerCircle = shapeSvg.insert(\"circle\", \":first-child\");\n const circle3 = shapeSvg.insert(\"circle\", \":first-child\");\n circle3.attr(\"class\", \"state-start\").attr(\"r\", 7).attr(\"width\", 14).attr(\"height\", 14);\n innerCircle.attr(\"class\", \"state-end\").attr(\"r\", 5).attr(\"width\", 10).attr(\"height\", 10);\n updateNodeBounds(node, circle3);\n node.intersect = function(point2) {\n return intersect_default.circle(node, 7, point2);\n };\n return shapeSvg;\n}, \"end\");\nvar class_box = /* @__PURE__ */ __name(async (parent, node) => {\n const halfPadding = node.padding / 2;\n const rowPadding = 4;\n const lineHeight = 8;\n let classes2;\n if (!node.classes) {\n classes2 = \"node default\";\n } else {\n classes2 = \"node \" + node.classes;\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", classes2).attr(\"id\", node.domId || node.id);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const topLine = shapeSvg.insert(\"line\");\n const bottomLine = shapeSvg.insert(\"line\");\n let maxWidth = 0;\n let maxHeight = rowPadding;\n const labelContainer = shapeSvg.insert(\"g\").attr(\"class\", \"label\");\n let verticalPos = 0;\n const hasInterface = node.classData.annotations?.[0];\n const interfaceLabelText = node.classData.annotations[0] ? \"\\xAB\" + node.classData.annotations[0] + \"\\xBB\" : \"\";\n const interfaceLabel = await createLabel_default(\n labelContainer,\n interfaceLabelText,\n node.labelStyle,\n true,\n true\n );\n let interfaceBBox = interfaceLabel.getBBox();\n if (getEffectiveHtmlLabels(getConfig2())) {\n const div = interfaceLabel.children[0];\n const dv = select3(interfaceLabel);\n interfaceBBox = div.getBoundingClientRect();\n dv.attr(\"width\", interfaceBBox.width);\n dv.attr(\"height\", interfaceBBox.height);\n }\n if (node.classData.annotations[0]) {\n maxHeight += interfaceBBox.height + rowPadding;\n maxWidth += interfaceBBox.width;\n }\n let classTitleString = node.classData.label;\n if (node.classData.type !== void 0 && node.classData.type !== \"\") {\n if (getEffectiveHtmlLabels(getConfig2())) {\n classTitleString += \"<\" + node.classData.type + \">\";\n } else {\n classTitleString += \"<\" + node.classData.type + \">\";\n }\n }\n const classTitleLabel = await createLabel_default(\n labelContainer,\n classTitleString,\n node.labelStyle,\n true,\n true\n );\n select3(classTitleLabel).attr(\"class\", \"classTitle\");\n let classTitleBBox = classTitleLabel.getBBox();\n if (getEffectiveHtmlLabels(getConfig2())) {\n const div = classTitleLabel.children[0];\n const dv = select3(classTitleLabel);\n classTitleBBox = div.getBoundingClientRect();\n dv.attr(\"width\", classTitleBBox.width);\n dv.attr(\"height\", classTitleBBox.height);\n }\n maxHeight += classTitleBBox.height + rowPadding;\n if (classTitleBBox.width > maxWidth) {\n maxWidth = classTitleBBox.width;\n }\n const classAttributes = [];\n node.classData.members.forEach(async (member) => {\n const parsedInfo = member.getDisplayDetails();\n let parsedText = parsedInfo.displayText;\n if (getEffectiveHtmlLabels(getConfig2())) {\n parsedText = parsedText.replace(//g, \">\");\n }\n const lbl = await createLabel_default(\n labelContainer,\n parsedText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n );\n let bbox = lbl.getBBox();\n if (getEffectiveHtmlLabels(getConfig2())) {\n const div = lbl.children[0];\n const dv = select3(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n classAttributes.push(lbl);\n });\n maxHeight += lineHeight;\n const classMethods = [];\n node.classData.methods.forEach(async (member) => {\n const parsedInfo = member.getDisplayDetails();\n let displayText = parsedInfo.displayText;\n if (getEffectiveHtmlLabels(getConfig2())) {\n displayText = displayText.replace(//g, \">\");\n }\n const lbl = await createLabel_default(\n labelContainer,\n displayText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n );\n let bbox = lbl.getBBox();\n if (getEffectiveHtmlLabels(getConfig2())) {\n const div = lbl.children[0];\n const dv = select3(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n classMethods.push(lbl);\n });\n maxHeight += lineHeight;\n if (hasInterface) {\n let diffX2 = (maxWidth - interfaceBBox.width) / 2;\n select3(interfaceLabel).attr(\n \"transform\",\n \"translate( \" + (-1 * maxWidth / 2 + diffX2) + \", \" + -1 * maxHeight / 2 + \")\"\n );\n verticalPos = interfaceBBox.height + rowPadding;\n }\n let diffX = (maxWidth - classTitleBBox.width) / 2;\n select3(classTitleLabel).attr(\n \"transform\",\n \"translate( \" + (-1 * maxWidth / 2 + diffX) + \", \" + (-1 * maxHeight / 2 + verticalPos) + \")\"\n );\n verticalPos += classTitleBBox.height + rowPadding;\n topLine.attr(\"class\", \"divider\").attr(\"x1\", -maxWidth / 2 - halfPadding).attr(\"x2\", maxWidth / 2 + halfPadding).attr(\"y1\", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr(\"y2\", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n verticalPos += lineHeight;\n classAttributes.forEach((lbl) => {\n select3(lbl).attr(\n \"transform\",\n \"translate( \" + -maxWidth / 2 + \", \" + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + \")\"\n );\n const memberBBox = lbl?.getBBox();\n verticalPos += (memberBBox?.height ?? 0) + rowPadding;\n });\n verticalPos += lineHeight;\n bottomLine.attr(\"class\", \"divider\").attr(\"x1\", -maxWidth / 2 - halfPadding).attr(\"x2\", maxWidth / 2 + halfPadding).attr(\"y1\", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr(\"y2\", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n verticalPos += lineHeight;\n classMethods.forEach((lbl) => {\n select3(lbl).attr(\n \"transform\",\n \"translate( \" + -maxWidth / 2 + \", \" + (-1 * maxHeight / 2 + verticalPos) + \")\"\n );\n const memberBBox = lbl?.getBBox();\n verticalPos += (memberBBox?.height ?? 0) + rowPadding;\n });\n rect2.attr(\"style\", node.style).attr(\"class\", \"outer title-state\").attr(\"x\", -maxWidth / 2 - halfPadding).attr(\"y\", -(maxHeight / 2) - halfPadding).attr(\"width\", maxWidth + node.padding).attr(\"height\", maxHeight + node.padding);\n updateNodeBounds(node, rect2);\n node.intersect = function(point2) {\n return intersect_default.rect(node, point2);\n };\n return shapeSvg;\n}, \"class_box\");\nvar shapes = {\n rhombus: question,\n composite,\n question,\n rect,\n labelRect,\n rectWithTitle,\n choice,\n circle: circle2,\n doublecircle,\n stadium,\n hexagon,\n block_arrow,\n rect_left_inv_arrow,\n lean_right,\n lean_left,\n trapezoid,\n inv_trapezoid,\n rect_right_inv_arrow,\n cylinder,\n start,\n end,\n note: note_default,\n subroutine,\n fork: forkJoin,\n join: forkJoin,\n class_box\n};\nvar nodeElems = {};\nvar insertNode = /* @__PURE__ */ __name(async (elem, node, renderOptions) => {\n let newEl;\n let el;\n if (node.link) {\n let target;\n if (getConfig2().securityLevel === \"sandbox\") {\n target = \"_top\";\n } else if (node.linkTarget) {\n target = node.linkTarget || \"_blank\";\n }\n newEl = elem.insert(\"svg:a\").attr(\"xlink:href\", node.link).attr(\"target\", target);\n el = await shapes[node.shape](newEl, node, renderOptions);\n } else {\n el = await shapes[node.shape](elem, node, renderOptions);\n newEl = el;\n }\n if (node.tooltip) {\n el.attr(\"title\", node.tooltip);\n }\n if (node.class) {\n el.attr(\"class\", \"node default \" + node.class);\n }\n nodeElems[node.id] = newEl;\n if (node.haveCallback) {\n nodeElems[node.id].attr(\"class\", nodeElems[node.id].attr(\"class\") + \" clickable\");\n }\n return newEl;\n}, \"insertNode\");\nvar positionNode = /* @__PURE__ */ __name((node) => {\n const el = nodeElems[node.id];\n log.trace(\n \"Transforming node\",\n node.diff,\n node,\n \"translate(\" + (node.x - node.width / 2 - 5) + \", \" + node.width / 2 + \")\"\n );\n const padding2 = 8;\n const diff = node.diff || 0;\n if (node.clusterNode) {\n el.attr(\n \"transform\",\n \"translate(\" + (node.x + diff - node.width / 2) + \", \" + (node.y - node.height / 2 - padding2) + \")\"\n );\n } else {\n el.attr(\"transform\", \"translate(\" + node.x + \", \" + node.y + \")\");\n }\n return diff;\n}, \"positionNode\");\n\n// src/diagrams/block/renderHelpers.ts\nfunction getNodeFromBlock(block, db2, positioned = false) {\n const vertex = block;\n let classStr = \"default\";\n if ((vertex?.classes?.length || 0) > 0) {\n classStr = (vertex?.classes ?? []).join(\" \");\n }\n classStr = classStr + \" flowchart-label\";\n let radius = 0;\n let shape = \"\";\n let padding2;\n switch (vertex.type) {\n case \"round\":\n radius = 5;\n shape = \"rect\";\n break;\n case \"composite\":\n radius = 0;\n shape = \"composite\";\n padding2 = 0;\n break;\n case \"square\":\n shape = \"rect\";\n break;\n case \"diamond\":\n shape = \"question\";\n break;\n case \"hexagon\":\n shape = \"hexagon\";\n break;\n case \"block_arrow\":\n shape = \"block_arrow\";\n break;\n case \"odd\":\n shape = \"rect_left_inv_arrow\";\n break;\n case \"lean_right\":\n shape = \"lean_right\";\n break;\n case \"lean_left\":\n shape = \"lean_left\";\n break;\n case \"trapezoid\":\n shape = \"trapezoid\";\n break;\n case \"inv_trapezoid\":\n shape = \"inv_trapezoid\";\n break;\n case \"rect_left_inv_arrow\":\n shape = \"rect_left_inv_arrow\";\n break;\n case \"circle\":\n shape = \"circle\";\n break;\n case \"ellipse\":\n shape = \"ellipse\";\n break;\n case \"stadium\":\n shape = \"stadium\";\n break;\n case \"subroutine\":\n shape = \"subroutine\";\n break;\n case \"cylinder\":\n shape = \"cylinder\";\n break;\n case \"group\":\n shape = \"rect\";\n break;\n case \"doublecircle\":\n shape = \"doublecircle\";\n break;\n default:\n shape = \"rect\";\n }\n const styles = getStylesFromArray(vertex?.styles ?? []);\n const vertexText = vertex.label;\n const bounds = vertex.size ?? { width: 0, height: 0, x: 0, y: 0 };\n const dbDiagramId = db2.getDiagramId();\n const node = {\n labelStyle: styles.labelStyle,\n shape,\n labelText: vertexText,\n rx: radius,\n ry: radius,\n class: classStr,\n style: styles.style,\n id: vertex.id,\n domId: dbDiagramId ? `${dbDiagramId}-${vertex.id}` : vertex.id,\n directions: vertex.directions,\n width: bounds.width,\n height: bounds.height,\n x: bounds.x,\n y: bounds.y,\n positioned,\n intersect: void 0,\n type: vertex.type,\n padding: padding2 ?? getConfig()?.block?.padding ?? 0,\n widthInColumns: vertex.widthInColumns ?? 1\n };\n return node;\n}\n__name(getNodeFromBlock, \"getNodeFromBlock\");\nasync function calculateBlockSize(elem, block, db2) {\n const node = getNodeFromBlock(block, db2, false);\n if (node.type === \"group\") {\n return;\n }\n const config2 = getConfig();\n const nodeEl = await insertNode(elem, node, { config: config2 });\n const boundingBox = nodeEl.node().getBBox();\n const obj = db2.getBlock(node.id);\n obj.size = { width: boundingBox.width, height: boundingBox.height, x: 0, y: 0, node: nodeEl };\n db2.setBlock(obj);\n nodeEl.remove();\n}\n__name(calculateBlockSize, \"calculateBlockSize\");\nasync function insertBlockPositioned(elem, block, db2) {\n const node = getNodeFromBlock(block, db2, true);\n const obj = db2.getBlock(node.id);\n if (obj.type !== \"space\") {\n const config2 = getConfig();\n await insertNode(elem, node, { config: config2 });\n block.intersect = node?.intersect;\n positionNode(node);\n }\n}\n__name(insertBlockPositioned, \"insertBlockPositioned\");\nasync function performOperations(elem, blocks2, db2, operation) {\n for (const block of blocks2) {\n await operation(elem, block, db2);\n if (block.children) {\n await performOperations(elem, block.children, db2, operation);\n }\n }\n}\n__name(performOperations, \"performOperations\");\nasync function calculateBlockSizes(elem, blocks2, db2) {\n await performOperations(elem, blocks2, db2, calculateBlockSize);\n}\n__name(calculateBlockSizes, \"calculateBlockSizes\");\nasync function insertBlocks(elem, blocks2, db2) {\n await performOperations(elem, blocks2, db2, insertBlockPositioned);\n}\n__name(insertBlocks, \"insertBlocks\");\nasync function insertEdges(elem, edges, blocks2, db2, id) {\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true\n });\n g.setGraph({\n rankdir: \"TB\",\n nodesep: 10,\n ranksep: 10,\n marginx: 8,\n marginy: 8\n });\n for (const block of blocks2) {\n if (block.size) {\n g.setNode(block.id, {\n width: block.size.width,\n height: block.size.height,\n intersect: block.intersect\n });\n }\n }\n for (const edge of edges) {\n if (edge.start && edge.end) {\n const startBlock = db2.getBlock(edge.start);\n const endBlock = db2.getBlock(edge.end);\n if (startBlock?.size && endBlock?.size) {\n const start2 = startBlock.size;\n const end2 = endBlock.size;\n const points = [\n { x: start2.x, y: start2.y },\n { x: start2.x + (end2.x - start2.x) / 2, y: start2.y + (end2.y - start2.y) / 2 },\n { x: end2.x, y: end2.y }\n ];\n const prefixedEdgeId = id ? `${id}-${edge.id}` : edge.id;\n const thicknessClass = edge.thickness === \"thick\" ? \"edge-thickness-thick\" : \"edge-thickness-normal\";\n const patternClass = edge.pattern === \"dotted\" ? \"edge-pattern-dotted\" : \"edge-pattern-solid\";\n const dynamicClasses = `${thicknessClass} ${patternClass} flowchart-link LS-a1 LE-b1`;\n insertEdge(\n elem,\n { v: edge.start, w: edge.end, name: prefixedEdgeId },\n {\n ...edge,\n id: prefixedEdgeId,\n arrowTypeEnd: edge.arrowTypeEnd,\n arrowTypeStart: edge.arrowTypeStart,\n points,\n classes: dynamicClasses\n },\n void 0,\n \"block\",\n g,\n id\n );\n if (edge.label) {\n await insertEdgeLabel(elem, {\n ...edge,\n label: edge.label,\n labelStyle: \"stroke: #333; stroke-width: 1.5px;fill:none;\",\n arrowTypeEnd: edge.arrowTypeEnd,\n arrowTypeStart: edge.arrowTypeStart,\n points,\n classes: dynamicClasses\n });\n positionEdgeLabel(\n { ...edge, x: points[1].x, y: points[1].y },\n {\n originalPath: points\n }\n );\n }\n }\n }\n }\n}\n__name(insertEdges, \"insertEdges\");\n\n// src/diagrams/block/blockRenderer.ts\nvar getClasses2 = /* @__PURE__ */ __name(function(text, diagObj) {\n return diagObj.db.getClasses();\n}, \"getClasses\");\nvar draw = /* @__PURE__ */ __name(async function(text, id, _version, diagObj) {\n const { securityLevel, block: conf } = getConfig();\n const db2 = diagObj.db;\n db2.setDiagramId(id);\n let sandboxElement;\n if (securityLevel === \"sandbox\") {\n sandboxElement = d3select(\"#i\" + id);\n }\n const root = securityLevel === \"sandbox\" ? d3select(sandboxElement.nodes()[0].contentDocument.body) : d3select(\"body\");\n const svg = securityLevel === \"sandbox\" ? root.select(`[id=\"${id}\"]`) : d3select(`[id=\"${id}\"]`);\n const markers2 = [\"point\", \"circle\", \"cross\"];\n markers_default(svg, markers2, diagObj.type, id);\n const bl = db2.getBlocks();\n const blArr = db2.getBlocksFlat();\n const edges = db2.getEdges();\n const nodes = svg.insert(\"g\").attr(\"class\", \"block\");\n await calculateBlockSizes(nodes, bl, db2);\n const bounds = layout(db2);\n await insertBlocks(nodes, bl, db2);\n await insertEdges(nodes, edges, blArr, db2, id);\n if (bounds) {\n const bounds2 = bounds;\n const magicFactor = Math.max(1, Math.round(0.125 * (bounds2.width / bounds2.height)));\n const height = bounds2.height + magicFactor + 10;\n const width = bounds2.width + 10;\n const { useMaxWidth } = conf;\n configureSvgSize(svg, height, width, !!useMaxWidth);\n log.debug(\"Here Bounds\", bounds, bounds2);\n svg.attr(\n \"viewBox\",\n `${bounds2.x - 5} ${bounds2.y - 5} ${bounds2.width + 10} ${bounds2.height + 10}`\n );\n }\n}, \"draw\");\nvar blockRenderer_default = {\n draw,\n getClasses: getClasses2\n};\n\n// src/diagrams/block/blockDiagram.ts\nvar diagram = {\n parser: block_default,\n db: blockDB_default,\n renderer: blockRenderer_default,\n styles: styles_default\n};\nexport {\n diagram\n};\n"], + "mappings": "kjBAmCA,IAAIA,IAAU,UAAW,CACvB,IAAIC,EAAoBC,EAAO,SAASC,EAAGC,EAAGC,EAAIC,EAAG,CACnD,IAAKD,EAAKA,GAAM,CAAC,EAAGC,EAAIH,EAAE,OAAQG,IAAKD,EAAGF,EAAEG,CAAC,CAAC,EAAIF,EAAG,CACrD,OAAOC,CACT,EAAG,GAAG,EAAGE,EAAM,CAAC,EAAG,EAAE,EAAGC,EAAM,CAAC,EAAG,CAAC,EAAGC,EAAM,CAAC,EAAG,EAAE,EAAGC,EAAM,CAAC,EAAG,EAAE,EAAGC,EAA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AAQ,OAAS,EAAE,EAChF,CACF,CACF,EAAG,MAAM,EACLI,GAAwB,CAC1B,KAAAb,GACA,WAAYF,EACd,EAGIgB,GAAU,CACZ,OAAQhc,GACR,GAAIsE,GACJ,SAAUyX,GACV,OAAQ9W,EACV", + "names": ["parser", "o", "__name", "k", "v", "o2", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "parser2", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "num", "spaceId", "edgeData", "startEdgeData", "lineThickness", "linePattern", "id2", "id", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer2", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "lexer", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "block_default", "blockDatabase", "edgeList", "edgeCount", "COLOR_KEYWORD", "FILL_KEYWORD", "BG_FILL", "STYLECLASS_SEP", "config", "getConfig2", "classes", "diagramId", "sanitizeText2", "txt", "common_default", "addStyleClass", "styleAttributes", "foundClass", "attrib", "fixedAttrib", "newStyle2", "addStyle2Node", "styles", "foundBlock", "setCssClass", "itemIds", "cssClassName", "trimmedId", "populateBlockDatabase", "_blockList", "parent", "blockList", "children", "column", "b", "block", "log", "count", "existingBlock", "w", "j", "newBlock", "clone", "blocks", "rootBlock", "clear2", "clear", "typeStr2Type", "typeStr", "edgeTypeStr2Type", "edgeStrToEdgeData", "edgeStrToEdgeStartData", "edgeStrToThickness", "edgeStrToPattern", "cnt", "generateId", "setHierarchy", "getColumns", "blockId", "getBlocksFlat", "getBlocks", "getEdges", "getBlock", "setBlock", "setDiagramId", "getDiagramId", "getLogger", "getClasses", "db", "getConfig", "blockDB_default", "fade", "color", "opacity", "channel2", "channel_default", "g", "rgba_default", "getStyles", "options", "getIconStyles", "styles_default", "insertMarkers", "elem", "markerArray", "type", "markerName", "markers", "extension", "composition", "aggregation", "dependency", "lollipop", "point", "circle", "cross", "barb", "markers_default", "padding", "calculateBlockPosition", "columns", "position", "px", "py", "getMaxChildSize", "maxWidth", "maxHeight", "child", "width", "height", "x", "y", "normalizedWidth", "setBlockSizes", "db2", "siblingWidth", "siblingHeight", "childSize", "numItems", "xSize", "ySize", "childWidth", "childHeight", "layoutBlocks", "widthOfChildren", "rowHeights", "colPos", "currentMax", "filled", "rowYOffsets", "offset", "rows", "row", "columnPos", "startingPosX", "rowPos", "width2", "halfWidth", "rowYOffset", "rowHeight", "columnsFilled", "findBounds", "minX", "minY", "maxX", "maxY", "layout", "root", "createLabel", "element", "_vertexText", "style", "isTitle", "isNode", "vertexText", "config2", "useHtmlLabels", "getEffectiveHtmlLabels", "createText", "createLabel_default", "addEdgeMarkers", "svgPath", "edge", "url", "diagramType", "addEdgeMarker", "arrowTypesMap", "arrowType", "endMarkerType", "suffix", "edgeLabels", "terminalLabels", "insertEdgeLabel", "edgeLabel", "label", "isMarkdown", "labelElement", "bbox", "transformBbox", "div", "dv", "select_default", "textEl", "computeLabelTransform", "fo", "startEdgeLabelLeft", "inner", "startLabelElement", "slBox", "setTerminalWidth", "startEdgeLabelRight", "endEdgeLabelLeft", "endLabelElement", "endEdgeLabelRight", "value", "positionEdgeLabel", "paths", "path", "siteConfig", "subGraphTitleTotalMargin", "getSubGraphTitleMargins", "el", "pos", "utils_default", "outsideNode", "node", "point2", "dx", "dy", "h", "intersection", "outsidePoint", "insidePoint", "Q", "R", "q", "res", "_x", "_y", "cutPathAtIntersect", "_points", "boundaryNode", "points", "lastPointOutside", "isInside", "inter", "pointPresent", "e", "insertEdge", "clusterDb", "graph", "pointsHasChanged", "tail", "head", "lineData", "curve", "basis_default", "getLineFunctionsWithOffset", "lineFunction", "line_default", "strokeClasses", "getUrl", "expandAndDeduplicateDirections", "directions", "uniqueDirections", "direction", "getArrowPoints", "duplicatedDirections", "totalWidth", "f", "midpoint", "padding2", "intersectNode", "intersect_node_default", "intersectEllipse", "rx", "ry", "cx", "cy", "det", "intersect_ellipse_default", "intersectCircle", "intersect_circle_default", "intersectLine", "p1", "p2", "q1", "q2", "a1", "a2", "b1", "b2", "c1", "c2", "r1", "r2", "r3", "r4", "denom", "sameSign", "intersect_line_default", "intersect_polygon_default", "intersectPolygon", "polyPoints", "x1", "y1", "intersections", "entry", "left", "top", "intersect", "pdx", "pdy", "distp", "qdx", "qdy", "distq", "intersectRect", "sx", "sy", "intersect_rect_default", "intersect_default", "labelHelper", "_classes", "classes2", "shapeSvg", "labelText", "text", "sanitizeText", "decodeEntities", "halfPadding", "configureLabelImages", "updateNodeBounds", "insertPolygonShape", "d", "note", "rect2", "note_default", "formatClass", "getClassesFromNode", "otherClasses", "question", "s", "questionElem", "choice", "hexagon", "m", "hex", "block_arrow", "naturalW", "blockArrow", "rect_left_inv_arrow", "lean_right", "lean_left", "trapezoid", "inv_trapezoid", "rect_right_inv_arrow", "cylinder", "shape", "rect", "totalHeight", "propKeys", "applyNodePropertyBorders", "propKey", "composite", "labelRect", "borders", "strokeDashArray", "addBorder", "length", "skipBorder", "rectWithTitle", "innerLine", "text2", "title", "textRows", "titleBox", "descr", "stadium", "circle2", "circle3", "doublecircle", "gap", "circleGroup", "outerCircle", "innerCircle", "subroutine", "start", "forkJoin", "dir", "end", "class_box", "rowPadding", "lineHeight", "topLine", "bottomLine", "labelContainer", "verticalPos", "hasInterface", "interfaceLabelText", "interfaceLabel", "interfaceBBox", "classTitleString", "classTitleLabel", "classTitleBBox", "classAttributes", "member", "parsedInfo", "parsedText", "lbl", "classMethods", "displayText", "diffX2", "diffX", "memberBBox", "shapes", "nodeElems", "insertNode", "renderOptions", "newEl", "target", "positionNode", "diff", "getNodeFromBlock", "positioned", "vertex", "classStr", "radius", "getStylesFromArray", "bounds", "dbDiagramId", "calculateBlockSize", "nodeEl", "boundingBox", "obj", "insertBlockPositioned", "performOperations", "blocks2", "operation", "calculateBlockSizes", "insertBlocks", "insertEdges", "edges", "Graph", "startBlock", "endBlock", "start2", "end2", "prefixedEdgeId", "thicknessClass", "patternClass", "dynamicClasses", "getClasses2", "diagObj", "draw", "_version", "securityLevel", "conf", "sandboxElement", "svg", "bl", "blArr", "nodes", "bounds2", "magicFactor", "useMaxWidth", "configureSvgSize", "blockRenderer_default", "diagram"] +} diff --git a/templates/tabulareditor/public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js b/templates/tabulareditor/public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js new file mode 100644 index 000000000..a9c0393f4 --- /dev/null +++ b/templates/tabulareditor/public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js @@ -0,0 +1,11 @@ +import{a as ke,f as Ee}from"./chunk-CLGT2SZG.min.js";import{i as ve,j as ee,k as Ct}from"./chunk-YPRWTSV5.min.js";import{a as Fe}from"./chunk-HCOLC5CQ.min.js";import{H as te,N as Yt,O as be,U as ge,V as _e,W as xe,X as me,_ as Ot,o as ye}from"./chunk-LXXU3C6C.min.js";import{b as y,d as $t,j as Dt}from"./chunk-BJGJ3C53.min.js";import{c as Ue}from"./chunk-MY7PHHTQ.min.js";var Re=Ue(Fe(),1),Ut=(function(){var e=y(function(_t,x,v,k){for(v=v||{},k=_t.length;k--;v[_t[k]]=x);return v},"o"),t=[1,24],n=[1,25],o=[1,26],l=[1,27],s=[1,28],a=[1,63],r=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[1,68],b=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],rt=[1,46],nt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],bt=[1,59],gt=[1,60],wt=[14,42],Wt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Rt=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],E=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],ce=[12,14,33,42],It=[12,14,33,42,76,77,79,80],vt=[12,33],Qt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],Ht={trace:y(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:y(function(x,v,k,g,R,h,St){var f=h.length-1;switch(R){case 3:g.setDirection("TB");break;case 4:g.setDirection("BT");break;case 5:g.setDirection("RL");break;case 6:g.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:g.setC4Type(h[f-3]);break;case 19:g.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:g.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),g.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),g.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:g.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),g.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:g.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:g.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:g.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:g.popBoundaryParseStack();break;case 39:g.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:g.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:g.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:g.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:g.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:g.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:g.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:g.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:g.addContainer("container",...h[f]),this.$=h[f];break;case 48:g.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:g.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:g.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:g.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:g.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:g.addComponent("component",...h[f]),this.$=h[f];break;case 54:g.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:g.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:g.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:g.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:g.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:g.addRel("rel",...h[f]),this.$=h[f];break;case 61:g.addRel("birel",...h[f]),this.$=h[f];break;case 62:g.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:g.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:g.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:g.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:g.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),g.addRel("rel",...h[f]),this.$=h[f];break;case 68:g.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:g.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:g.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let kt={};kt[h[f-1].trim()]=h[f].trim(),this.$=kt;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:70,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:71,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:72,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{13:73,19:20,20:21,21:22,22:t,23:n,24:o,26:l,28:s,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{14:[1,74]},e(wt,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:r,37:i,38:u,39:d,40:p,41:b,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt}),e(wt,[2,14]),e(Wt,[2,16],{12:[1,76]}),e(wt,[2,36],{12:[1,77]}),e(Rt,[2,19]),e(Rt,[2,20]),{25:[1,78]},{27:[1,79]},e(Rt,[2,23]),{35:80,75:81,76:E,77:A,79:C,80:w},{35:86,75:81,76:E,77:A,79:C,80:w},{35:87,75:81,76:E,77:A,79:C,80:w},{35:88,75:81,76:E,77:A,79:C,80:w},{35:89,75:81,76:E,77:A,79:C,80:w},{35:90,75:81,76:E,77:A,79:C,80:w},{35:91,75:81,76:E,77:A,79:C,80:w},{35:92,75:81,76:E,77:A,79:C,80:w},{35:93,75:81,76:E,77:A,79:C,80:w},{35:94,75:81,76:E,77:A,79:C,80:w},{35:95,75:81,76:E,77:A,79:C,80:w},{35:96,75:81,76:E,77:A,79:C,80:w},{35:97,75:81,76:E,77:A,79:C,80:w},{35:98,75:81,76:E,77:A,79:C,80:w},{35:99,75:81,76:E,77:A,79:C,80:w},{35:100,75:81,76:E,77:A,79:C,80:w},{35:101,75:81,76:E,77:A,79:C,80:w},{35:102,75:81,76:E,77:A,79:C,80:w},{35:103,75:81,76:E,77:A,79:C,80:w},{35:104,75:81,76:E,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:E,77:A,79:C,80:w},{35:106,75:81,76:E,77:A,79:C,80:w},{35:107,75:81,76:E,77:A,79:C,80:w},{35:108,75:81,76:E,77:A,79:C,80:w},{35:109,75:81,76:E,77:A,79:C,80:w},{35:110,75:81,76:E,77:A,79:C,80:w},{35:111,75:81,76:E,77:A,79:C,80:w},{35:112,75:81,76:E,77:A,79:C,80:w},{35:113,75:81,76:E,77:A,79:C,80:w},{35:114,75:81,76:E,77:A,79:C,80:w},{35:115,75:81,76:E,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:a,36:r,37:i,38:u,39:d,40:p,41:b,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt},{12:[1,118],33:[1,117]},{35:119,75:81,76:E,77:A,79:C,80:w},{35:120,75:81,76:E,77:A,79:C,80:w},{35:121,75:81,76:E,77:A,79:C,80:w},{35:122,75:81,76:E,77:A,79:C,80:w},{35:123,75:81,76:E,77:A,79:C,80:w},{35:124,75:81,76:E,77:A,79:C,80:w},{35:125,75:81,76:E,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(wt,[2,15]),e(Wt,[2,17],{21:22,19:130,22:t,23:n,24:o,26:l,28:s}),e(wt,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:o,26:l,28:s,34:a,36:r,37:i,38:u,39:d,40:p,41:b,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:rt,62:nt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:bt,74:gt}),e(Rt,[2,21]),e(Rt,[2,22]),e(T,[2,39]),e(ce,[2,71],{75:81,35:132,76:E,77:A,79:C,80:w}),e(It,[2,73]),{78:[1,133]},e(It,[2,75]),e(It,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Wt,[2,18]),e(wt,[2,38]),e(ce,[2,72]),e(It,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Qt,[2,25]),e(Qt,[2,26],{12:[1,138]}),e(Qt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:y(function(x,v){if(v.recoverable)this.trace(x);else{var k=new Error(x);throw k.hash=v,k}},"parseError"),parse:y(function(x){var v=this,k=[0],g=[],R=[null],h=[],St=this.table,f="",kt=0,he=0,ue=0,Le=2,de=1,Ne=h.slice.call(arguments,1),D=Object.create(this.lexer),Et={yy:{}};for(var qt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qt)&&(Et.yy[qt]=this.yy[qt]);D.setInput(x,Et.yy),Et.yy.lexer=D,Et.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Gt=D.yylloc;h.push(Gt);var Ye=D.options&&D.options.ranges;typeof Et.yy.parseError=="function"?this.parseError=Et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(L){k.length=k.length-2*L,R.length=R.length-L,h.length=h.length-L}y(je,"popStack");function fe(){var L;return L=g.pop()||D.lex()||de,typeof L!="number"&&(L instanceof Array&&(g=L,L=g.pop()),L=v.symbols_[L]||L),L}y(fe,"lex");for(var B,Kt,At,N,I0,Jt,Tt={},Lt,W,pe,Nt;;){if(At=k[k.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((B===null||typeof B>"u")&&(B=fe()),N=St[At]&&St[At][B]),typeof N>"u"||!N.length||!N[0]){var Zt="";Nt=[];for(Lt in St[At])this.terminals_[Lt]&&Lt>Le&&Nt.push("'"+this.terminals_[Lt]+"'");D.showPosition?Zt="Parse error on line "+(kt+1)+`: +`+D.showPosition()+` +Expecting `+Nt.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Zt="Parse error on line "+(kt+1)+": Unexpected "+(B==de?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Gt,expected:Nt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+B);switch(N[0]){case 1:k.push(B),R.push(D.yytext),h.push(D.yylloc),k.push(N[1]),B=null,Kt?(B=Kt,Kt=null):(he=D.yyleng,f=D.yytext,kt=D.yylineno,Gt=D.yylloc,ue>0&&ue--);break;case 2:if(W=this.productions_[N[1]][1],Tt.$=R[R.length-W],Tt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Ye&&(Tt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(Tt,[f,he,kt,Et.yy,N[1],R,h].concat(Ne)),typeof Jt<"u")return Jt;W&&(k=k.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),k.push(this.productions_[N[1]][0]),R.push(Tt.$),h.push(Tt._$),pe=St[k[k.length-2]][k[k.length-1]],k.push(pe);break;case 3:return!0}}return!0},"parse")},Me=(function(){var _t={EOF:1,parseError:y(function(v,k){if(this.yy.parser)this.yy.parser.parseError(v,k);else throw new Error(v)},"parseError"),setInput:y(function(x,v){return this.yy=v||this.yy||{},this._input=x,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:y(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var v=x.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:y(function(x){var v=x.length,k=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var g=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),k.length-1&&(this.yylineno-=k.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:k?(k.length===g.length?this.yylloc.first_column:0)+g[g.length-k.length].length-k[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:y(function(x){this.unput(this.match.slice(x))},"less"),pastInput:y(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:y(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:y(function(){var x=this.pastInput(),v=new Array(x.length+1).join("-");return x+this.upcomingInput()+` +`+v+"^"},"showPosition"),test_match:y(function(x,v){var k,g,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),g=x[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,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(x[0].length),this.matched+=x[0],k=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var h in R)this[h]=R[h];return!1}return!1},"test_match"),next:y(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,v,k,g;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),h=0;hv[0].length)){if(v=k,g=h,this.options.backtrack_lexer){if(x=this.test_match(k,R[h]),x!==!1)return x;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(x=this.test_match(v,R[g]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:y(function(){var v=this.next();return v||this.lex()},"lex"),begin:y(function(v){this.conditionStack.push(v)},"begin"),popState:y(function(){var v=this.conditionStack.length-1;return v>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:y(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:y(function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},"topState"),pushState:y(function(v){this.begin(v)},"pushState"),stateStackSize:y(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:y(function(v,k,g,R){var h=R;switch(g){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";break;case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _t})();Ht.lexer=Me;function Mt(){this.yy={}}return y(Mt,"Parser"),Mt.prototype=Ht,Ht.Parser=Mt,new Mt})();Ut.parser=Ut;var Ve=Ut,V=[],xt=[""],I="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Bt=[],ne="",se=!1,Ft=4,Vt=2,we,ze=y(function(){return we},"getC4Type"),Xe=y(function(e){we=te(e,Ot())},"setC4Type"),We=y(function(e,t,n,o,l,s,a,r,i){if(e==null||t===void 0||t===null||n===void 0||n===null||o===void 0||o===null)return;let u={},d=Bt.find(p=>p.from===t&&p.to===n);if(d?u=d:Bt.push(u),u.type=e,u.from=t,u.to=n,u.label={text:o},l==null)u.techn={text:""};else if(typeof l=="object"){let[p,b]=Object.entries(l)[0];u[p]={text:b}}else u.techn={text:l};if(s==null)u.descr={text:""};else if(typeof s=="object"){let[p,b]=Object.entries(s)[0];u[p]={text:b}}else u.descr={text:s};if(typeof a=="object"){let[p,b]=Object.entries(a)[0];u[p]=b}else u.sprite=a;if(typeof r=="object"){let[p,b]=Object.entries(r)[0];u[p]=b}else u.tags=r;if(typeof i=="object"){let[p,b]=Object.entries(i)[0];u[p]=b}else u.link=i;u.wrap=mt()},"addRel"),Qe=y(function(e,t,n,o,l,s,a){if(t===null||n===null)return;let r={},i=V.find(u=>u.alias===t);if(i&&t===i.alias?r=i:(r.alias=t,V.push(r)),n==null?r.label={text:""}:r.label={text:n},o==null)r.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];r[u]={text:d}}else r.descr={text:o};if(typeof l=="object"){let[u,d]=Object.entries(l)[0];r[u]=d}else r.sprite=l;if(typeof s=="object"){let[u,d]=Object.entries(s)[0];r[u]=d}else r.tags=s;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];r[u]=d}else r.link=a;r.typeC4Shape={text:e},r.parentBoundary=I,r.wrap=mt()},"addPersonOrSystem"),He=y(function(e,t,n,o,l,s,a,r){if(t===null||n===null)return;let i={},u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),n==null?i.label={text:""}:i.label={text:n},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,p]=Object.entries(o)[0];i[d]={text:p}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,p]=Object.entries(l)[0];i[d]={text:p}}else i.descr={text:l};if(typeof s=="object"){let[d,p]=Object.entries(s)[0];i[d]=p}else i.sprite=s;if(typeof a=="object"){let[d,p]=Object.entries(a)[0];i[d]=p}else i.tags=a;if(typeof r=="object"){let[d,p]=Object.entries(r)[0];i[d]=p}else i.link=r;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=I},"addContainer"),qe=y(function(e,t,n,o,l,s,a,r){if(t===null||n===null)return;let i={},u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),n==null?i.label={text:""}:i.label={text:n},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,p]=Object.entries(o)[0];i[d]={text:p}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,p]=Object.entries(l)[0];i[d]={text:p}}else i.descr={text:l};if(typeof s=="object"){let[d,p]=Object.entries(s)[0];i[d]=p}else i.sprite=s;if(typeof a=="object"){let[d,p]=Object.entries(a)[0];i[d]=p}else i.tags=a;if(typeof r=="object"){let[d,p]=Object.entries(r)[0];i[d]=p}else i.link=r;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=I},"addComponent"),Ge=y(function(e,t,n,o,l){if(e===null||t===null)return;let s={},a=X.find(r=>r.alias===e);if(a&&e===a.alias?s=a:(s.alias=e,X.push(s)),t==null?s.label={text:""}:s.label={text:t},n==null)s.type={text:"system"};else if(typeof n=="object"){let[r,i]=Object.entries(n)[0];s[r]={text:i}}else s.type={text:n};if(typeof o=="object"){let[r,i]=Object.entries(o)[0];s[r]=i}else s.tags=o;if(typeof l=="object"){let[r,i]=Object.entries(l)[0];s[r]=i}else s.link=l;s.parentBoundary=I,s.wrap=mt(),F=I,I=e,xt.push(F)},"addPersonOrSystemBoundary"),Ke=y(function(e,t,n,o,l){if(e===null||t===null)return;let s={},a=X.find(r=>r.alias===e);if(a&&e===a.alias?s=a:(s.alias=e,X.push(s)),t==null?s.label={text:""}:s.label={text:t},n==null)s.type={text:"container"};else if(typeof n=="object"){let[r,i]=Object.entries(n)[0];s[r]={text:i}}else s.type={text:n};if(typeof o=="object"){let[r,i]=Object.entries(o)[0];s[r]=i}else s.tags=o;if(typeof l=="object"){let[r,i]=Object.entries(l)[0];s[r]=i}else s.link=l;s.parentBoundary=I,s.wrap=mt(),F=I,I=e,xt.push(F)},"addContainerBoundary"),Je=y(function(e,t,n,o,l,s,a,r){if(t===null||n===null)return;let i={},u=X.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,X.push(i)),n==null?i.label={text:""}:i.label={text:n},o==null)i.type={text:"node"};else if(typeof o=="object"){let[d,p]=Object.entries(o)[0];i[d]={text:p}}else i.type={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,p]=Object.entries(l)[0];i[d]={text:p}}else i.descr={text:l};if(typeof a=="object"){let[d,p]=Object.entries(a)[0];i[d]=p}else i.tags=a;if(typeof r=="object"){let[d,p]=Object.entries(r)[0];i[d]=p}else i.link=r;i.nodeType=e,i.parentBoundary=I,i.wrap=mt(),F=I,I=t,xt.push(F)},"addDeploymentNode"),Ze=y(function(){I=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),$e=y(function(e,t,n,o,l,s,a,r,i,u,d){let p=V.find(b=>b.alias===t);if(!(p===void 0&&(p=X.find(b=>b.alias===t),p===void 0))){if(n!=null)if(typeof n=="object"){let[b,m]=Object.entries(n)[0];p[b]=m}else p.bgColor=n;if(o!=null)if(typeof o=="object"){let[b,m]=Object.entries(o)[0];p[b]=m}else p.fontColor=o;if(l!=null)if(typeof l=="object"){let[b,m]=Object.entries(l)[0];p[b]=m}else p.borderColor=l;if(s!=null)if(typeof s=="object"){let[b,m]=Object.entries(s)[0];p[b]=m}else p.shadowing=s;if(a!=null)if(typeof a=="object"){let[b,m]=Object.entries(a)[0];p[b]=m}else p.shape=a;if(r!=null)if(typeof r=="object"){let[b,m]=Object.entries(r)[0];p[b]=m}else p.sprite=r;if(i!=null)if(typeof i=="object"){let[b,m]=Object.entries(i)[0];p[b]=m}else p.techn=i;if(u!=null)if(typeof u=="object"){let[b,m]=Object.entries(u)[0];p[b]=m}else p.legendText=u;if(d!=null)if(typeof d=="object"){let[b,m]=Object.entries(d)[0];p[b]=m}else p.legendSprite=d}},"updateElStyle"),t0=y(function(e,t,n,o,l,s,a){let r=Bt.find(i=>i.from===t&&i.to===n);if(r!==void 0){if(o!=null)if(typeof o=="object"){let[i,u]=Object.entries(o)[0];r[i]=u}else r.textColor=o;if(l!=null)if(typeof l=="object"){let[i,u]=Object.entries(l)[0];r[i]=u}else r.lineColor=l;if(s!=null)if(typeof s=="object"){let[i,u]=Object.entries(s)[0];r[i]=parseInt(u)}else r.offsetX=parseInt(s);if(a!=null)if(typeof a=="object"){let[i,u]=Object.entries(a)[0];r[i]=parseInt(u)}else r.offsetY=parseInt(a)}},"updateRelStyle"),e0=y(function(e,t,n){let o=Ft,l=Vt;if(typeof t=="object"){let s=Object.values(t)[0];o=parseInt(s)}else o=parseInt(t);if(typeof n=="object"){let s=Object.values(n)[0];l=parseInt(s)}else l=parseInt(n);o>=1&&(Ft=o),l>=1&&(Vt=l)},"updateLayoutConfig"),a0=y(function(){return Ft},"getC4ShapeInRow"),i0=y(function(){return Vt},"getC4BoundaryInRow"),r0=y(function(){return I},"getCurrentBoundaryParse"),n0=y(function(){return F},"getParentBoundaryParse"),Te=y(function(e){return e==null?V:V.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),s0=y(function(e){return V.find(t=>t.alias===e)},"getC4Shape"),l0=y(function(e){return Object.keys(Te(e))},"getC4ShapeKeys"),Oe=y(function(e){return e==null?X:X.filter(t=>t.parentBoundary===e)},"getBoundaries"),o0=Oe,c0=y(function(){return Bt},"getRels"),h0=y(function(){return ne},"getTitle"),u0=y(function(e){se=e},"setWrap"),mt=y(function(){return se},"autoWrap"),d0=y(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",I="global",xt=[""],Bt=[],xt=[""],ne="",se=!1,Ft=4,Vt=2},"clear"),f0={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},p0={FILLED:0,OPEN:1},y0={LEFTOF:0,RIGHTOF:1,OVER:2},b0=y(function(e){ne=te(e,Ot())},"setTitle"),ae={addPersonOrSystem:Qe,addPersonOrSystemBoundary:Ge,addContainer:He,addContainerBoundary:Ke,addComponent:qe,addDeploymentNode:Je,popBoundaryParseStack:Ze,addRel:We,updateElStyle:$e,updateRelStyle:t0,updateLayoutConfig:e0,autoWrap:mt,setWrap:u0,getC4ShapeArray:Te,getC4Shape:s0,getC4ShapeKeys:l0,getBoundaries:Oe,getBoundarys:o0,getCurrentBoundaryParse:r0,getParentBoundaryParse:n0,getRels:c0,getTitle:h0,getC4Type:ze,getC4ShapeInRow:a0,getC4BoundaryInRow:i0,setAccTitle:ge,getAccTitle:_e,getAccDescription:me,setAccDescription:xe,getConfig:y(()=>Ot().c4,"getConfig"),clear:d0,LINETYPE:f0,ARROWTYPE:p0,PLACEMENT:y0,setTitle:b0,setC4Type:Xe},le=y(function(e,t){return ke(e,t)},"drawRect"),Se=y(function(e,t,n,o,l,s){let a=e.append("image");a.attr("width",t),a.attr("height",n),a.attr("x",o),a.attr("y",l);let r=s.startsWith("data:image/png;base64")?s:(0,Re.sanitizeUrl)(s);a.attr("xlink:href",r)},"drawImage"),g0=y((e,t,n,o)=>{let l=e.append("g"),s=0;for(let a of t){let r=a.textColor?a.textColor:"#444444",i=a.lineColor?a.lineColor:"#444444",u=a.offsetX?parseInt(a.offsetX):0,d=a.offsetY?parseInt(a.offsetY):0,p="";if(s===0){let m=l.append("line");m.attr("x1",a.startPoint.x),m.attr("y1",a.startPoint.y),m.attr("x2",a.endPoint.x),m.attr("y2",a.endPoint.y),m.attr("stroke-width","1"),m.attr("stroke",i),m.style("fill","none"),a.type!=="rel_b"&&m.attr("marker-end","url("+p+"#"+o+"-arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&m.attr("marker-start","url("+p+"#"+o+"-arrowend)"),s=-1}else{let m=l.append("path");m.attr("fill","none").attr("stroke-width","1").attr("stroke",i).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&m.attr("marker-end","url("+p+"#"+o+"-arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&m.attr("marker-start","url("+p+"#"+o+"-arrowend)")}let b=n.messageFont();Q(n)(a.label.text,l,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+d,a.label.width,a.label.height,{fill:r},b),a.techn&&a.techn.text!==""&&(b=n.messageFont(),Q(n)("["+a.techn.text+"]",l,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+n.messageFontSize+5+d,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:r,"font-style":"italic"},b))}},"drawRels"),_0=y(function(e,t,n){let o=e.append("g"),l=t.bgColor?t.bgColor:"none",s=t.borderColor?t.borderColor:"#444444",a=t.fontColor?t.fontColor:"black",r={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(r={"stroke-width":1});let i={x:t.x,y:t.y,fill:l,stroke:s,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:r};le(o,i);let u=n.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=a,Q(n)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=n.boundaryFont(),u.fontColor=a,Q(n)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=n.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=a,Q(n)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),x0=y(function(e,t,n){let o=t.bgColor?t.bgColor:n[t.typeC4Shape.text+"_bg_color"],l=t.borderColor?t.borderColor:n[t.typeC4Shape.text+"_border_color"],s=t.fontColor?t.fontColor:"#FFFFFF",a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}let r=e.append("g");r.attr("class","person-man");let i=Ee();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":i.x=t.x,i.y=t.y,i.fill=o,i.width=t.width,i.height=t.height,i.stroke=l,i.rx=2.5,i.ry=2.5,i.attrs={"stroke-width":.5},le(r,i);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":r.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),r.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":r.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),r.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=T0(n,t.typeC4Shape.text);switch(r.append("text").attr("fill",s).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":Se(r,48,48,t.x+t.width/2-24,t.y+t.image.Y,a);break}let d=n[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=s,Q(n)(t.label.text,r,t.x,t.y+t.label.Y,t.width,t.height,{fill:s},d),d=n[t.typeC4Shape.text+"Font"](),d.fontColor=s,t.techn&&t.techn?.text!==""?Q(n)(t.techn.text,r,t.x,t.y+t.techn.Y,t.width,t.height,{fill:s,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(n)(t.type.text,r,t.x,t.y+t.type.Y,t.width,t.height,{fill:s,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=n.personFont(),d.fontColor=s,Q(n)(t.descr.text,r,t.x,t.y+t.descr.Y,t.width,t.height,{fill:s},d)),t.height},"drawC4Shape"),m0=y(function(e,t){e.append("defs").append("symbol").attr("id",t+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),v0=y(function(e,t){e.append("defs").append("symbol").attr("id",t+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),k0=y(function(e,t){e.append("defs").append("symbol").attr("id",t+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),E0=y(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),A0=y(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),C0=y(function(e,t){e.append("defs").append("marker").attr("id",t+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),w0=y(function(e,t){let o=e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);o.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),o.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),T0=y((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Q=(function(){function e(l,s,a,r,i,u,d){let p=s.append("text").attr("x",a+i/2).attr("y",r+u/2+5).style("text-anchor","middle").text(l);o(p,d)}y(e,"byText");function t(l,s,a,r,i,u,d,p){let{fontSize:b,fontFamily:m,fontWeight:O}=p,S=l.split(Yt.lineBreakRegex);for(let P=0;P=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>De)&&(t=this.nextData.startx+e.margin+_.nextLinePaddingX,o=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=l=o+e.height,this.nextData.cnt=1),e.x=t,e.y=o,this.updateVal(this.data,"startx",t,Math.min),this.updateVal(this.data,"starty",o,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",l,Math.max),this.updateVal(this.nextData,"startx",t,Math.min),this.updateVal(this.nextData,"starty",o,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",l,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},re(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},re=y(function(e){ye(_,e),e.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=e.fontFamily),e.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=e.fontSize),e.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=e.fontWeight)},"setConf"),Pt=y((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),jt=y(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),O0=y(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");function j(e,t,n,o,l){if(!t[e].width)if(n)t[e].text=ve(t[e].text,l,o),t[e].textLines=t[e].text.split(Yt.lineBreakRegex).length,t[e].width=l,t[e].height=ee(t[e].text,o);else{let s=t[e].text.split(Yt.lineBreakRegex);t[e].textLines=s.length;let a=0;t[e].height=0,t[e].width=0;for(let r of s)t[e].width=Math.max(Ct(r,o),t[e].width),a=ee(r,o),t[e].height=t[e].height+a}}y(j,"calcC4ShapeTextWH");var Be=y(function(e,t,n){t.x=n.data.startx,t.y=n.data.starty,t.width=n.data.stopx-n.data.startx,t.height=n.data.stopy-n.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,l=jt(_);l.fontSize=l.fontSize+2,l.fontWeight="bold";let s=Ct(t.label.text,l);j("label",t,o,l,s),z.drawBoundary(e,t,_)},"drawBoundary"),Ie=y(function(e,t,n,o){let l=0;for(let s of o){l=0;let a=n[s],r=Pt(_,a.typeC4Shape.text);switch(r.fontSize=r.fontSize-2,a.typeC4Shape.width=Ct("\xAB"+a.typeC4Shape.text+"\xBB",r),a.typeC4Shape.height=r.fontSize+2,a.typeC4Shape.Y=_.c4ShapePadding,l=a.typeC4Shape.Y+a.typeC4Shape.height-4,a.image={width:0,height:0,Y:0},a.typeC4Shape.text){case"person":case"external_person":a.image.width=48,a.image.height=48,a.image.Y=l,l=a.image.Y+a.image.height;break}a.sprite&&(a.image.width=48,a.image.height=48,a.image.Y=l,l=a.image.Y+a.image.height);let i=a.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=Pt(_,a.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",a,i,d,u),a.label.Y=l+8,l=a.label.Y+a.label.height,a.type&&a.type.text!==""){a.type.text="["+a.type.text+"]";let m=Pt(_,a.typeC4Shape.text);j("type",a,i,m,u),a.type.Y=l+5,l=a.type.Y+a.type.height}else if(a.techn&&a.techn.text!==""){a.techn.text="["+a.techn.text+"]";let m=Pt(_,a.techn.text);j("techn",a,i,m,u),a.techn.Y=l+5,l=a.techn.Y+a.techn.height}let p=l,b=a.label.width;if(a.descr&&a.descr.text!==""){let m=Pt(_,a.typeC4Shape.text);j("descr",a,i,m,u),a.descr.Y=l+20,l=a.descr.Y+a.descr.height,b=Math.max(a.label.width,a.descr.width),p=l-a.descr.textLines*5}b=b+_.c4ShapePadding,a.width=Math.max(a.width||_.width,b,_.width),a.height=Math.max(a.height||_.height,p,_.height),a.margin=a.margin||_.c4ShapeMargin,e.insert(a),z.drawC4Shape(t,a,_)}e.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Y=class{static{y(this,"Point")}constructor(e,t){this.x=e,this.y=t}},Ae=y(function(e,t){let n=e.x,o=e.y,l=t.x,s=t.y,a=n+e.width/2,r=o+e.height/2,i=Math.abs(n-l),u=Math.abs(o-s),d=u/i,p=e.height/e.width,b=null;return o==s&&nl?b=new Y(n,r):n==l&&os&&(b=new Y(a,o)),n>l&&o=d?b=new Y(n,r+d*e.width/2):b=new Y(a-i/u*e.height/2,o+e.height):n=d?b=new Y(n+e.width,r+d*e.width/2):b=new Y(a+i/u*e.height/2,o+e.height):ns?p>=d?b=new Y(n+e.width,r-d*e.width/2):b=new Y(a+e.height/2*i/u,o):n>l&&o>s&&(p>=d?b=new Y(n,r-e.width/2*d):b=new Y(a-e.height/2*i/u,o)),b},"getIntersectPoint"),R0=y(function(e,t){let n={x:0,y:0};n.x=t.x+t.width/2,n.y=t.y+t.height/2;let o=Ae(e,n);n.x=e.x+e.width/2,n.y=e.y+e.height/2;let l=Ae(t,n);return{startPoint:o,endPoint:l}},"getIntersectPoints"),S0=y(function(e,t,n,o,l){let s=0;for(let a of t){s=s+1;let r=a.wrap&&_.wrap,i=O0(_);o.db.getC4Type()==="C4Dynamic"&&(a.label.text=s+": "+a.label.text);let d=Ct(a.label.text,i);j("label",a,r,i,d),a.techn&&a.techn.text!==""&&(d=Ct(a.techn.text,i),j("techn",a,r,i,d)),a.descr&&a.descr.text!==""&&(d=Ct(a.descr.text,i),j("descr",a,r,i,d));let p=n(a.from),b=n(a.to),m=R0(p,b);a.startPoint=m.startPoint,a.endPoint=m.endPoint}z.drawRels(e,t,_,l)},"drawRels");function oe(e,t,n,o,l){let s=new Pe(l);s.data.widthLimit=n.data.widthLimit/Math.min(ie,o.length);for(let[a,r]of o.entries()){let i=0;r.image={width:0,height:0,Y:0},r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height);let u=r.wrap&&_.wrap,d=jt(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",r,u,d,s.data.widthLimit),r.label.Y=i+8,i=r.label.Y+r.label.height,r.type&&r.type.text!==""){r.type.text="["+r.type.text+"]";let O=jt(_);j("type",r,u,O,s.data.widthLimit),r.type.Y=i+5,i=r.type.Y+r.type.height}if(r.descr&&r.descr.text!==""){let O=jt(_);O.fontSize=O.fontSize-2,j("descr",r,u,O,s.data.widthLimit),r.descr.Y=i+20,i=r.descr.Y+r.descr.height}if(a==0||a%ie===0){let O=n.data.startx+_.diagramMarginX,S=n.data.stopy+_.diagramMarginY+i;s.setData(O,O,S,S)}else{let O=s.data.stopx!==s.data.startx?s.data.stopx+_.diagramMarginX:s.data.startx,S=s.data.starty;s.setData(O,O,S,S)}s.name=r.alias;let p=l.db.getC4ShapeArray(r.alias),b=l.db.getC4ShapeKeys(r.alias);b.length>0&&Ie(s,e,p,b),t=r.alias;let m=l.db.getBoundaries(t);m.length>0&&oe(e,t,s,m,l),r.alias!=="global"&&Be(e,r,s),n.data.stopy=Math.max(s.data.stopy+_.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(s.data.stopx+_.c4ShapeMargin,n.data.stopx),zt=Math.max(zt,n.data.stopx),Xt=Math.max(Xt,n.data.stopy)}}y(oe,"drawInsideBoundary");var D0=y(function(e,t,n,o){_=Ot().c4;let l=Ot().securityLevel,s;l==="sandbox"&&(s=Dt("#i"+t));let a=l==="sandbox"?Dt(s.nodes()[0].contentDocument.body):Dt("body"),r=o.db;o.db.setWrap(_.wrap),De=r.getC4ShapeInRow(),ie=r.getC4BoundaryInRow(),$t.debug(`C:${JSON.stringify(_,null,2)}`);let i=l==="sandbox"?a.select(`[id="${t}"]`):Dt(`[id="${t}"]`);z.insertComputerIcon(i,t),z.insertDatabaseIcon(i,t),z.insertClockIcon(i,t);let u=new Pe(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,zt=_.diagramMarginX,Xt=_.diagramMarginY;let d=o.db.getTitle(),p=o.db.getBoundaries("");oe(i,"",u,p,o),z.insertArrowHead(i,t),z.insertArrowEnd(i,t),z.insertArrowCrossHead(i,t),z.insertArrowFilledHead(i,t),S0(i,o.db.getRels(),o.db.getC4Shape,o,t),u.data.stopx=zt,u.data.stopy=Xt;let b=u.data,O=b.stopy-b.starty+2*_.diagramMarginY,P=b.stopx-b.startx+2*_.diagramMarginX;d&&i.append("text").text(d).attr("x",(b.stopx-b.startx)/2-4*_.diagramMarginX).attr("y",b.starty+_.diagramMarginY),be(i,O,P,_.useMaxWidth);let M=d?60:0;i.attr("viewBox",b.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),$t.debug("models:",b)},"draw"),Ce={drawPersonOrSystemArray:Ie,drawBoundary:Be,setConf:re,draw:D0},P0=y(e=>`.person { + stroke: ${e.personBorder}; + fill: ${e.personBkg}; + } +`,"getStyles"),B0=P0,U0={parser:Ve,db:ae,renderer:Ce,styles:B0,init:y(({c4:e,wrap:t})=>{Ce.setConf(e),ae.setWrap(t)},"init")};export{U0 as diagram}; +//# sourceMappingURL=c4Diagram-AAUBKEIU-7HP7G5BH.min.js.map diff --git a/templates/tabulareditor/public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js.map b/templates/tabulareditor/public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js.map new file mode 100644 index 000000000..7133187cc --- /dev/null +++ b/templates/tabulareditor/public/c4Diagram-AAUBKEIU-7HP7G5BH.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAUBKEIU.mjs"], + "sourcesContent": ["import {\n drawRect,\n getNoteRect\n} from \"./chunk-ND2GUHAM.mjs\";\nimport {\n calculateTextHeight,\n calculateTextWidth,\n wrapLabel\n} from \"./chunk-5ZQYHXKU.mjs\";\nimport {\n assignWithDepth_default,\n common_default,\n configureSvgSize,\n getAccDescription,\n getAccTitle,\n getConfig2 as getConfig,\n sanitizeText,\n setAccDescription,\n setAccTitle\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/c4/parser/c4Diagram.jison\nvar parser = (function() {\n var o = /* @__PURE__ */ __name(function(k, v, o2, l) {\n for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;\n return o2;\n }, \"o\"), $V0 = [1, 24], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 63], $V6 = [1, 64], $V7 = [1, 65], $V8 = [1, 66], $V9 = [1, 67], $Va = [1, 68], $Vb = [1, 69], $Vc = [1, 29], $Vd = [1, 30], $Ve = [1, 31], $Vf = [1, 32], $Vg = [1, 33], $Vh = [1, 34], $Vi = [1, 35], $Vj = [1, 36], $Vk = [1, 37], $Vl = [1, 38], $Vm = [1, 39], $Vn = [1, 40], $Vo = [1, 41], $Vp = [1, 42], $Vq = [1, 43], $Vr = [1, 44], $Vs = [1, 45], $Vt = [1, 46], $Vu = [1, 47], $Vv = [1, 48], $Vw = [1, 50], $Vx = [1, 51], $Vy = [1, 52], $Vz = [1, 53], $VA = [1, 54], $VB = [1, 55], $VC = [1, 56], $VD = [1, 57], $VE = [1, 58], $VF = [1, 59], $VG = [1, 60], $VH = [14, 42], $VI = [14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VJ = [12, 14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VK = [1, 82], $VL = [1, 83], $VM = [1, 84], $VN = [1, 85], $VO = [12, 14, 42], $VP = [12, 14, 33, 42], $VQ = [12, 14, 33, 42, 76, 77, 79, 80], $VR = [12, 33], $VS = [34, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74];\n var parser2 = {\n trace: /* @__PURE__ */ __name(function trace() {\n }, \"trace\"),\n yy: {},\n symbols_: { \"error\": 2, \"start\": 3, \"mermaidDoc\": 4, \"direction\": 5, \"direction_tb\": 6, \"direction_bt\": 7, \"direction_rl\": 8, \"direction_lr\": 9, \"graphConfig\": 10, \"C4_CONTEXT\": 11, \"NEWLINE\": 12, \"statements\": 13, \"EOF\": 14, \"C4_CONTAINER\": 15, \"C4_COMPONENT\": 16, \"C4_DYNAMIC\": 17, \"C4_DEPLOYMENT\": 18, \"otherStatements\": 19, \"diagramStatements\": 20, \"otherStatement\": 21, \"title\": 22, \"accDescription\": 23, \"acc_title\": 24, \"acc_title_value\": 25, \"acc_descr\": 26, \"acc_descr_value\": 27, \"acc_descr_multiline_value\": 28, \"boundaryStatement\": 29, \"boundaryStartStatement\": 30, \"boundaryStopStatement\": 31, \"boundaryStart\": 32, \"LBRACE\": 33, \"ENTERPRISE_BOUNDARY\": 34, \"attributes\": 35, \"SYSTEM_BOUNDARY\": 36, \"BOUNDARY\": 37, \"CONTAINER_BOUNDARY\": 38, \"NODE\": 39, \"NODE_L\": 40, \"NODE_R\": 41, \"RBRACE\": 42, \"diagramStatement\": 43, \"PERSON\": 44, \"PERSON_EXT\": 45, \"SYSTEM\": 46, \"SYSTEM_DB\": 47, \"SYSTEM_QUEUE\": 48, \"SYSTEM_EXT\": 49, \"SYSTEM_EXT_DB\": 50, \"SYSTEM_EXT_QUEUE\": 51, \"CONTAINER\": 52, \"CONTAINER_DB\": 53, \"CONTAINER_QUEUE\": 54, \"CONTAINER_EXT\": 55, \"CONTAINER_EXT_DB\": 56, \"CONTAINER_EXT_QUEUE\": 57, \"COMPONENT\": 58, \"COMPONENT_DB\": 59, \"COMPONENT_QUEUE\": 60, \"COMPONENT_EXT\": 61, \"COMPONENT_EXT_DB\": 62, \"COMPONENT_EXT_QUEUE\": 63, \"REL\": 64, \"BIREL\": 65, \"REL_U\": 66, \"REL_D\": 67, \"REL_L\": 68, \"REL_R\": 69, \"REL_B\": 70, \"REL_INDEX\": 71, \"UPDATE_EL_STYLE\": 72, \"UPDATE_REL_STYLE\": 73, \"UPDATE_LAYOUT_CONFIG\": 74, \"attribute\": 75, \"STR\": 76, \"STR_KEY\": 77, \"STR_VALUE\": 78, \"ATTRIBUTE\": 79, \"ATTRIBUTE_EMPTY\": 80, \"$accept\": 0, \"$end\": 1 },\n terminals_: { 2: \"error\", 6: \"direction_tb\", 7: \"direction_bt\", 8: \"direction_rl\", 9: \"direction_lr\", 11: \"C4_CONTEXT\", 12: \"NEWLINE\", 14: \"EOF\", 15: \"C4_CONTAINER\", 16: \"C4_COMPONENT\", 17: \"C4_DYNAMIC\", 18: \"C4_DEPLOYMENT\", 22: \"title\", 23: \"accDescription\", 24: \"acc_title\", 25: \"acc_title_value\", 26: \"acc_descr\", 27: \"acc_descr_value\", 28: \"acc_descr_multiline_value\", 33: \"LBRACE\", 34: \"ENTERPRISE_BOUNDARY\", 36: \"SYSTEM_BOUNDARY\", 37: \"BOUNDARY\", 38: \"CONTAINER_BOUNDARY\", 39: \"NODE\", 40: \"NODE_L\", 41: \"NODE_R\", 42: \"RBRACE\", 44: \"PERSON\", 45: \"PERSON_EXT\", 46: \"SYSTEM\", 47: \"SYSTEM_DB\", 48: \"SYSTEM_QUEUE\", 49: \"SYSTEM_EXT\", 50: \"SYSTEM_EXT_DB\", 51: \"SYSTEM_EXT_QUEUE\", 52: \"CONTAINER\", 53: \"CONTAINER_DB\", 54: \"CONTAINER_QUEUE\", 55: \"CONTAINER_EXT\", 56: \"CONTAINER_EXT_DB\", 57: \"CONTAINER_EXT_QUEUE\", 58: \"COMPONENT\", 59: \"COMPONENT_DB\", 60: \"COMPONENT_QUEUE\", 61: \"COMPONENT_EXT\", 62: \"COMPONENT_EXT_DB\", 63: \"COMPONENT_EXT_QUEUE\", 64: \"REL\", 65: \"BIREL\", 66: \"REL_U\", 67: \"REL_D\", 68: \"REL_L\", 69: \"REL_R\", 70: \"REL_B\", 71: \"REL_INDEX\", 72: \"UPDATE_EL_STYLE\", 73: \"UPDATE_REL_STYLE\", 74: \"UPDATE_LAYOUT_CONFIG\", 76: \"STR\", 77: \"STR_KEY\", 78: \"STR_VALUE\", 79: \"ATTRIBUTE\", 80: \"ATTRIBUTE_EMPTY\" },\n productions_: [0, [3, 1], [3, 1], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [13, 1], [13, 1], [13, 2], [19, 1], [19, 2], [19, 3], [21, 1], [21, 1], [21, 2], [21, 2], [21, 1], [29, 3], [30, 3], [30, 3], [30, 4], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [31, 1], [20, 1], [20, 2], [20, 3], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 1], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [35, 1], [35, 2], [75, 1], [75, 2], [75, 1], [75, 1]],\n performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {\n var $0 = $$.length - 1;\n switch (yystate) {\n case 3:\n yy.setDirection(\"TB\");\n break;\n case 4:\n yy.setDirection(\"BT\");\n break;\n case 5:\n yy.setDirection(\"RL\");\n break;\n case 6:\n yy.setDirection(\"LR\");\n break;\n case 8:\n case 9:\n case 10:\n case 11:\n case 12:\n yy.setC4Type($$[$0 - 3]);\n break;\n case 19:\n yy.setTitle($$[$0].substring(6));\n this.$ = $$[$0].substring(6);\n break;\n case 20:\n yy.setAccDescription($$[$0].substring(15));\n this.$ = $$[$0].substring(15);\n break;\n case 21:\n this.$ = $$[$0].trim();\n yy.setTitle(this.$);\n break;\n case 22:\n case 23:\n this.$ = $$[$0].trim();\n yy.setAccDescription(this.$);\n break;\n case 28:\n $$[$0].splice(2, 0, \"ENTERPRISE\");\n yy.addPersonOrSystemBoundary(...$$[$0]);\n this.$ = $$[$0];\n break;\n case 29:\n $$[$0].splice(2, 0, \"SYSTEM\");\n yy.addPersonOrSystemBoundary(...$$[$0]);\n this.$ = $$[$0];\n break;\n case 30:\n yy.addPersonOrSystemBoundary(...$$[$0]);\n this.$ = $$[$0];\n break;\n case 31:\n $$[$0].splice(2, 0, \"CONTAINER\");\n yy.addContainerBoundary(...$$[$0]);\n this.$ = $$[$0];\n break;\n case 32:\n yy.addDeploymentNode(\"node\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 33:\n yy.addDeploymentNode(\"nodeL\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 34:\n yy.addDeploymentNode(\"nodeR\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 35:\n yy.popBoundaryParseStack();\n break;\n case 39:\n yy.addPersonOrSystem(\"person\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 40:\n yy.addPersonOrSystem(\"external_person\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 41:\n yy.addPersonOrSystem(\"system\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 42:\n yy.addPersonOrSystem(\"system_db\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 43:\n yy.addPersonOrSystem(\"system_queue\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 44:\n yy.addPersonOrSystem(\"external_system\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 45:\n yy.addPersonOrSystem(\"external_system_db\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 46:\n yy.addPersonOrSystem(\"external_system_queue\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 47:\n yy.addContainer(\"container\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 48:\n yy.addContainer(\"container_db\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 49:\n yy.addContainer(\"container_queue\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 50:\n yy.addContainer(\"external_container\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 51:\n yy.addContainer(\"external_container_db\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 52:\n yy.addContainer(\"external_container_queue\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 53:\n yy.addComponent(\"component\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 54:\n yy.addComponent(\"component_db\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 55:\n yy.addComponent(\"component_queue\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 56:\n yy.addComponent(\"external_component\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 57:\n yy.addComponent(\"external_component_db\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 58:\n yy.addComponent(\"external_component_queue\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 60:\n yy.addRel(\"rel\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 61:\n yy.addRel(\"birel\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 62:\n yy.addRel(\"rel_u\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 63:\n yy.addRel(\"rel_d\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 64:\n yy.addRel(\"rel_l\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 65:\n yy.addRel(\"rel_r\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 66:\n yy.addRel(\"rel_b\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 67:\n $$[$0].splice(0, 1);\n yy.addRel(\"rel\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 68:\n yy.updateElStyle(\"update_el_style\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 69:\n yy.updateRelStyle(\"update_rel_style\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 70:\n yy.updateLayoutConfig(\"update_layout_config\", ...$$[$0]);\n this.$ = $$[$0];\n break;\n case 71:\n this.$ = [$$[$0]];\n break;\n case 72:\n $$[$0].unshift($$[$0 - 1]);\n this.$ = $$[$0];\n break;\n case 73:\n case 75:\n this.$ = $$[$0].trim();\n break;\n case 74:\n let kv = {};\n kv[$$[$0 - 1].trim()] = $$[$0].trim();\n this.$ = kv;\n break;\n case 76:\n this.$ = \"\";\n break;\n }\n }, \"anonymous\"),\n table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 7: [1, 6], 8: [1, 7], 9: [1, 8], 10: 4, 11: [1, 9], 15: [1, 10], 16: [1, 11], 17: [1, 12], 18: [1, 13] }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 7] }, { 1: [2, 3] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 12: [1, 14] }, { 12: [1, 15] }, { 12: [1, 16] }, { 12: [1, 17] }, { 12: [1, 18] }, { 13: 19, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 14: [1, 74] }, o($VH, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VH, [2, 14]), o($VI, [2, 16], { 12: [1, 76] }), o($VH, [2, 36], { 12: [1, 77] }), o($VJ, [2, 19]), o($VJ, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, o($VJ, [2, 23]), { 35: 80, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 86, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 87, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 88, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 89, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 90, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 91, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 92, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 93, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 94, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 95, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 96, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 97, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 98, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 99, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 100, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 101, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 102, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 103, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 104, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, o($VO, [2, 59]), { 35: 105, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 106, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 107, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 108, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 109, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 110, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 111, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 112, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 113, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 114, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 115, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 120, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 121, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 122, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 123, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 124, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 125, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, o($VH, [2, 15]), o($VI, [2, 17], { 21: 22, 19: 130, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4 }), o($VH, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VJ, [2, 21]), o($VJ, [2, 22]), o($VO, [2, 39]), o($VP, [2, 71], { 75: 81, 35: 132, 76: $VK, 77: $VL, 79: $VM, 80: $VN }), o($VQ, [2, 73]), { 78: [1, 133] }, o($VQ, [2, 75]), o($VQ, [2, 76]), o($VO, [2, 40]), o($VO, [2, 41]), o($VO, [2, 42]), o($VO, [2, 43]), o($VO, [2, 44]), o($VO, [2, 45]), o($VO, [2, 46]), o($VO, [2, 47]), o($VO, [2, 48]), o($VO, [2, 49]), o($VO, [2, 50]), o($VO, [2, 51]), o($VO, [2, 52]), o($VO, [2, 53]), o($VO, [2, 54]), o($VO, [2, 55]), o($VO, [2, 56]), o($VO, [2, 57]), o($VO, [2, 58]), o($VO, [2, 60]), o($VO, [2, 61]), o($VO, [2, 62]), o($VO, [2, 63]), o($VO, [2, 64]), o($VO, [2, 65]), o($VO, [2, 66]), o($VO, [2, 67]), o($VO, [2, 68]), o($VO, [2, 69]), o($VO, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, o($VR, [2, 28]), o($VR, [2, 29]), o($VR, [2, 30]), o($VR, [2, 31]), o($VR, [2, 32]), o($VR, [2, 33]), o($VR, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, o($VI, [2, 18]), o($VH, [2, 38]), o($VP, [2, 72]), o($VQ, [2, 74]), o($VO, [2, 24]), o($VO, [2, 35]), o($VS, [2, 25]), o($VS, [2, 26], { 12: [1, 138] }), o($VS, [2, 27])],\n defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 7], 5: [2, 3], 6: [2, 4], 7: [2, 5], 8: [2, 6], 74: [2, 8], 126: [2, 9], 127: [2, 10], 128: [2, 11], 129: [2, 12] },\n parseError: /* @__PURE__ */ __name(function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n }, \"parseError\"),\n parse: /* @__PURE__ */ __name(function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer2 = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer2.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer2;\n sharedState.yy.parser = this;\n if (typeof lexer2.yylloc == \"undefined\") {\n lexer2.yylloc = {};\n }\n var yyloc = lexer2.yylloc;\n lstack.push(yyloc);\n var ranges = lexer2.options && lexer2.options.ranges;\n if (typeof sharedState.yy.parseError === \"function\") {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n __name(popStack, \"popStack\");\n function lex() {\n var token;\n token = tstack.pop() || lexer2.lex() || EOF;\n if (typeof token !== \"number\") {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n __name(lex, \"lex\");\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == \"undefined\") {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === \"undefined\" || !action.length || !action[0]) {\n var errStr = \"\";\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push(\"'\" + this.terminals_[p] + \"'\");\n }\n }\n if (lexer2.showPosition) {\n errStr = \"Parse error on line \" + (yylineno + 1) + \":\\n\" + lexer2.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n } else {\n errStr = \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == EOF ? \"end of input\" : \"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n }\n this.parseError(errStr, {\n text: lexer2.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer2.yylineno,\n loc: yyloc,\n expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer2.yytext);\n lstack.push(lexer2.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer2.yyleng;\n yytext = lexer2.yytext;\n yylineno = lexer2.yylineno;\n yyloc = lexer2.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== \"undefined\") {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n }, \"parse\")\n };\n var lexer = /* @__PURE__ */ (function() {\n var lexer2 = {\n EOF: 1,\n parseError: /* @__PURE__ */ __name(function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n }, \"parseError\"),\n // resets the lexer, sets new input\n setInput: /* @__PURE__ */ __name(function(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = \"\";\n this.conditionStack = [\"INITIAL\"];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n this.offset = 0;\n return this;\n }, \"setInput\"),\n // consumes and returns one char from the input\n input: /* @__PURE__ */ __name(function() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n this._input = this._input.slice(1);\n return ch;\n }, \"input\"),\n // unshifts one char (or a string) into the input\n unput: /* @__PURE__ */ __name(function(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n }, \"unput\"),\n // When called from action, caches matched text and appends it on next action\n more: /* @__PURE__ */ __name(function() {\n this._more = true;\n return this;\n }, \"more\"),\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: /* @__PURE__ */ __name(function() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n return this;\n }, \"reject\"),\n // retain first n characters of the match\n less: /* @__PURE__ */ __name(function(n) {\n this.unput(this.match.slice(n));\n }, \"less\"),\n // displays already matched input, i.e. for error messages\n pastInput: /* @__PURE__ */ __name(function() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? \"...\" : \"\") + past.substr(-20).replace(/\\n/g, \"\");\n }, \"pastInput\"),\n // displays upcoming input, i.e. for error messages\n upcomingInput: /* @__PURE__ */ __name(function() {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n return (next.substr(0, 20) + (next.length > 20 ? \"...\" : \"\")).replace(/\\n/g, \"\");\n }, \"upcomingInput\"),\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: /* @__PURE__ */ __name(function() {\n var pre = this.pastInput();\n var c2 = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c2 + \"^\";\n }, \"showPosition\"),\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {\n var token, lines, backup;\n if (this.options.backtrack_lexer) {\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false;\n }\n return false;\n }, \"test_match\"),\n // return next match in input\n next: /* @__PURE__ */ __name(function() {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n var token, match, tempMatch, index;\n if (!this._more) {\n this.yytext = \"\";\n this.match = \"\";\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue;\n } else {\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". Unrecognized text.\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n }, \"next\"),\n // return next match that has a token\n lex: /* @__PURE__ */ __name(function lex() {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n }, \"lex\"),\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: /* @__PURE__ */ __name(function begin(condition) {\n this.conditionStack.push(condition);\n }, \"begin\"),\n // pop the previously active lexer condition state off the condition stack\n popState: /* @__PURE__ */ __name(function popState() {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n }, \"popState\"),\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: /* @__PURE__ */ __name(function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n }, \"_currentRules\"),\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: /* @__PURE__ */ __name(function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n }, \"topState\"),\n // alias for begin(condition)\n pushState: /* @__PURE__ */ __name(function pushState(condition) {\n this.begin(condition);\n }, \"pushState\"),\n // return the number of states currently on the stack\n stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {\n return this.conditionStack.length;\n }, \"stateStackSize\"),\n options: {},\n performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n switch ($avoiding_name_collisions) {\n case 0:\n return 6;\n break;\n case 1:\n return 7;\n break;\n case 2:\n return 8;\n break;\n case 3:\n return 9;\n break;\n case 4:\n return 22;\n break;\n case 5:\n return 23;\n break;\n case 6:\n this.begin(\"acc_title\");\n return 24;\n break;\n case 7:\n this.popState();\n return \"acc_title_value\";\n break;\n case 8:\n this.begin(\"acc_descr\");\n return 26;\n break;\n case 9:\n this.popState();\n return \"acc_descr_value\";\n break;\n case 10:\n this.begin(\"acc_descr_multiline\");\n break;\n case 11:\n this.popState();\n break;\n case 12:\n return \"acc_descr_multiline_value\";\n break;\n case 13:\n break;\n case 14:\n c;\n break;\n case 15:\n return 12;\n break;\n case 16:\n break;\n case 17:\n return 11;\n break;\n case 18:\n return 15;\n break;\n case 19:\n return 16;\n break;\n case 20:\n return 17;\n break;\n case 21:\n return 18;\n break;\n case 22:\n this.begin(\"person_ext\");\n return 45;\n break;\n case 23:\n this.begin(\"person\");\n return 44;\n break;\n case 24:\n this.begin(\"system_ext_queue\");\n return 51;\n break;\n case 25:\n this.begin(\"system_ext_db\");\n return 50;\n break;\n case 26:\n this.begin(\"system_ext\");\n return 49;\n break;\n case 27:\n this.begin(\"system_queue\");\n return 48;\n break;\n case 28:\n this.begin(\"system_db\");\n return 47;\n break;\n case 29:\n this.begin(\"system\");\n return 46;\n break;\n case 30:\n this.begin(\"boundary\");\n return 37;\n break;\n case 31:\n this.begin(\"enterprise_boundary\");\n return 34;\n break;\n case 32:\n this.begin(\"system_boundary\");\n return 36;\n break;\n case 33:\n this.begin(\"container_ext_queue\");\n return 57;\n break;\n case 34:\n this.begin(\"container_ext_db\");\n return 56;\n break;\n case 35:\n this.begin(\"container_ext\");\n return 55;\n break;\n case 36:\n this.begin(\"container_queue\");\n return 54;\n break;\n case 37:\n this.begin(\"container_db\");\n return 53;\n break;\n case 38:\n this.begin(\"container\");\n return 52;\n break;\n case 39:\n this.begin(\"container_boundary\");\n return 38;\n break;\n case 40:\n this.begin(\"component_ext_queue\");\n return 63;\n break;\n case 41:\n this.begin(\"component_ext_db\");\n return 62;\n break;\n case 42:\n this.begin(\"component_ext\");\n return 61;\n break;\n case 43:\n this.begin(\"component_queue\");\n return 60;\n break;\n case 44:\n this.begin(\"component_db\");\n return 59;\n break;\n case 45:\n this.begin(\"component\");\n return 58;\n break;\n case 46:\n this.begin(\"node\");\n return 39;\n break;\n case 47:\n this.begin(\"node\");\n return 39;\n break;\n case 48:\n this.begin(\"node_l\");\n return 40;\n break;\n case 49:\n this.begin(\"node_r\");\n return 41;\n break;\n case 50:\n this.begin(\"rel\");\n return 64;\n break;\n case 51:\n this.begin(\"birel\");\n return 65;\n break;\n case 52:\n this.begin(\"rel_u\");\n return 66;\n break;\n case 53:\n this.begin(\"rel_u\");\n return 66;\n break;\n case 54:\n this.begin(\"rel_d\");\n return 67;\n break;\n case 55:\n this.begin(\"rel_d\");\n return 67;\n break;\n case 56:\n this.begin(\"rel_l\");\n return 68;\n break;\n case 57:\n this.begin(\"rel_l\");\n return 68;\n break;\n case 58:\n this.begin(\"rel_r\");\n return 69;\n break;\n case 59:\n this.begin(\"rel_r\");\n return 69;\n break;\n case 60:\n this.begin(\"rel_b\");\n return 70;\n break;\n case 61:\n this.begin(\"rel_index\");\n return 71;\n break;\n case 62:\n this.begin(\"update_el_style\");\n return 72;\n break;\n case 63:\n this.begin(\"update_rel_style\");\n return 73;\n break;\n case 64:\n this.begin(\"update_layout_config\");\n return 74;\n break;\n case 65:\n return \"EOF_IN_STRUCT\";\n break;\n case 66:\n this.begin(\"attribute\");\n return \"ATTRIBUTE_EMPTY\";\n break;\n case 67:\n this.begin(\"attribute\");\n break;\n case 68:\n this.popState();\n this.popState();\n break;\n case 69:\n return 80;\n break;\n case 70:\n break;\n case 71:\n return 80;\n break;\n case 72:\n this.begin(\"string\");\n break;\n case 73:\n this.popState();\n break;\n case 74:\n return \"STR\";\n break;\n case 75:\n this.begin(\"string_kv\");\n break;\n case 76:\n this.begin(\"string_kv_key\");\n return \"STR_KEY\";\n break;\n case 77:\n this.popState();\n this.begin(\"string_kv_value\");\n break;\n case 78:\n return \"STR_VALUE\";\n break;\n case 79:\n this.popState();\n this.popState();\n break;\n case 80:\n return \"STR\";\n break;\n case 81:\n return \"LBRACE\";\n break;\n case 82:\n return \"RBRACE\";\n break;\n case 83:\n return \"SPACE\";\n break;\n case 84:\n return \"EOL\";\n break;\n case 85:\n return 14;\n break;\n }\n }, \"anonymous\"),\n rules: [/^(?:.*direction\\s+TB[^\\n]*)/, /^(?:.*direction\\s+BT[^\\n]*)/, /^(?:.*direction\\s+RL[^\\n]*)/, /^(?:.*direction\\s+LR[^\\n]*)/, /^(?:title\\s[^#\\n;]+)/, /^(?:accDescription\\s[^#\\n;]+)/, /^(?:accTitle\\s*:\\s*)/, /^(?:(?!\\n||)*[^\\n]*)/, /^(?:accDescr\\s*:\\s*)/, /^(?:(?!\\n||)*[^\\n]*)/, /^(?:accDescr\\s*\\{\\s*)/, /^(?:[\\}])/, /^(?:[^\\}]*)/, /^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/, /^(?:%%[^\\n]*(\\r?\\n)*)/, /^(?:\\s*(\\r?\\n)+)/, /^(?:\\s+)/, /^(?:C4Context\\b)/, /^(?:C4Container\\b)/, /^(?:C4Component\\b)/, /^(?:C4Dynamic\\b)/, /^(?:C4Deployment\\b)/, /^(?:Person_Ext\\b)/, /^(?:Person\\b)/, /^(?:SystemQueue_Ext\\b)/, /^(?:SystemDb_Ext\\b)/, /^(?:System_Ext\\b)/, /^(?:SystemQueue\\b)/, /^(?:SystemDb\\b)/, /^(?:System\\b)/, /^(?:Boundary\\b)/, /^(?:Enterprise_Boundary\\b)/, /^(?:System_Boundary\\b)/, /^(?:ContainerQueue_Ext\\b)/, /^(?:ContainerDb_Ext\\b)/, /^(?:Container_Ext\\b)/, /^(?:ContainerQueue\\b)/, /^(?:ContainerDb\\b)/, /^(?:Container\\b)/, /^(?:Container_Boundary\\b)/, /^(?:ComponentQueue_Ext\\b)/, /^(?:ComponentDb_Ext\\b)/, /^(?:Component_Ext\\b)/, /^(?:ComponentQueue\\b)/, /^(?:ComponentDb\\b)/, /^(?:Component\\b)/, /^(?:Deployment_Node\\b)/, /^(?:Node\\b)/, /^(?:Node_L\\b)/, /^(?:Node_R\\b)/, /^(?:Rel\\b)/, /^(?:BiRel\\b)/, /^(?:Rel_Up\\b)/, /^(?:Rel_U\\b)/, /^(?:Rel_Down\\b)/, /^(?:Rel_D\\b)/, /^(?:Rel_Left\\b)/, /^(?:Rel_L\\b)/, /^(?:Rel_Right\\b)/, /^(?:Rel_R\\b)/, /^(?:Rel_Back\\b)/, /^(?:RelIndex\\b)/, /^(?:UpdateElementStyle\\b)/, /^(?:UpdateRelStyle\\b)/, /^(?:UpdateLayoutConfig\\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*[\"][\"])/, /^(?:[ ]*[\"])/, /^(?:[\"])/, /^(?:[^\"]*)/, /^(?:[ ]*[\\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*[\"])/, /^(?:[^\"]+)/, /^(?:[\"])/, /^(?:[^,]+)/, /^(?:\\{)/, /^(?:\\})/, /^(?:[\\s]+)/, /^(?:[\\n\\r]+)/, /^(?:$)/],\n conditions: { \"acc_descr_multiline\": { \"rules\": [11, 12], \"inclusive\": false }, \"acc_descr\": { \"rules\": [9], \"inclusive\": false }, \"acc_title\": { \"rules\": [7], \"inclusive\": false }, \"string_kv_value\": { \"rules\": [78, 79], \"inclusive\": false }, \"string_kv_key\": { \"rules\": [77], \"inclusive\": false }, \"string_kv\": { \"rules\": [76], \"inclusive\": false }, \"string\": { \"rules\": [73, 74], \"inclusive\": false }, \"attribute\": { \"rules\": [68, 69, 70, 71, 72, 75, 80], \"inclusive\": false }, \"update_layout_config\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"update_rel_style\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"update_el_style\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"rel_b\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"rel_r\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"rel_l\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"rel_d\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"rel_u\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"rel_bi\": { \"rules\": [], \"inclusive\": false }, \"rel\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"node_r\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"node_l\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"node\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"index\": { \"rules\": [], \"inclusive\": false }, \"rel_index\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"component_ext_queue\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"component_ext_db\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"component_ext\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"component_queue\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"component_db\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"component\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"container_boundary\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"container_ext_queue\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"container_ext_db\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"container_ext\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"container_queue\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"container_db\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"container\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"birel\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"system_boundary\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"enterprise_boundary\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"boundary\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"system_ext_queue\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"system_ext_db\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"system_ext\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"system_queue\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"system_db\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"system\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"person_ext\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"person\": { \"rules\": [65, 66, 67, 68], \"inclusive\": false }, \"INITIAL\": { \"rules\": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], \"inclusive\": true } }\n };\n return lexer2;\n })();\n parser2.lexer = lexer;\n function Parser() {\n this.yy = {};\n }\n __name(Parser, \"Parser\");\n Parser.prototype = parser2;\n parser2.Parser = Parser;\n return new Parser();\n})();\nparser.parser = parser;\nvar c4Diagram_default = parser;\n\n// src/diagrams/c4/c4Db.js\nvar c4ShapeArray = [];\nvar boundaryParseStack = [\"\"];\nvar currentBoundaryParse = \"global\";\nvar parentBoundaryParse = \"\";\nvar boundaries = [\n {\n alias: \"global\",\n label: { text: \"global\" },\n type: { text: \"global\" },\n tags: null,\n link: null,\n parentBoundary: \"\"\n }\n];\nvar rels = [];\nvar title = \"\";\nvar wrapEnabled = false;\nvar c4ShapeInRow = 4;\nvar c4BoundaryInRow = 2;\nvar c4Type;\nvar getC4Type = /* @__PURE__ */ __name(function() {\n return c4Type;\n}, \"getC4Type\");\nvar setC4Type = /* @__PURE__ */ __name(function(c4TypeParam) {\n let sanitizedText = sanitizeText(c4TypeParam, getConfig());\n c4Type = sanitizedText;\n}, \"setC4Type\");\nvar addRel = /* @__PURE__ */ __name(function(type, from, to, label, techn, descr, sprite, tags, link) {\n if (type === void 0 || type === null || from === void 0 || from === null || to === void 0 || to === null || label === void 0 || label === null) {\n return;\n }\n let rel = {};\n const old = rels.find((rel2) => rel2.from === from && rel2.to === to);\n if (old) {\n rel = old;\n } else {\n rels.push(rel);\n }\n rel.type = type;\n rel.from = from;\n rel.to = to;\n rel.label = { text: label };\n if (techn === void 0 || techn === null) {\n rel.techn = { text: \"\" };\n } else {\n if (typeof techn === \"object\") {\n let [key, value] = Object.entries(techn)[0];\n rel[key] = { text: value };\n } else {\n rel.techn = { text: techn };\n }\n }\n if (descr === void 0 || descr === null) {\n rel.descr = { text: \"\" };\n } else {\n if (typeof descr === \"object\") {\n let [key, value] = Object.entries(descr)[0];\n rel[key] = { text: value };\n } else {\n rel.descr = { text: descr };\n }\n }\n if (typeof sprite === \"object\") {\n let [key, value] = Object.entries(sprite)[0];\n rel[key] = value;\n } else {\n rel.sprite = sprite;\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n rel[key] = value;\n } else {\n rel.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n rel[key] = value;\n } else {\n rel.link = link;\n }\n rel.wrap = autoWrap();\n}, \"addRel\");\nvar addPersonOrSystem = /* @__PURE__ */ __name(function(typeC4Shape, alias, label, descr, sprite, tags, link) {\n if (alias === null || label === null) {\n return;\n }\n let personOrSystem = {};\n const old = c4ShapeArray.find((personOrSystem2) => personOrSystem2.alias === alias);\n if (old && alias === old.alias) {\n personOrSystem = old;\n } else {\n personOrSystem.alias = alias;\n c4ShapeArray.push(personOrSystem);\n }\n if (label === void 0 || label === null) {\n personOrSystem.label = { text: \"\" };\n } else {\n personOrSystem.label = { text: label };\n }\n if (descr === void 0 || descr === null) {\n personOrSystem.descr = { text: \"\" };\n } else {\n if (typeof descr === \"object\") {\n let [key, value] = Object.entries(descr)[0];\n personOrSystem[key] = { text: value };\n } else {\n personOrSystem.descr = { text: descr };\n }\n }\n if (typeof sprite === \"object\") {\n let [key, value] = Object.entries(sprite)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.sprite = sprite;\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.link = link;\n }\n personOrSystem.typeC4Shape = { text: typeC4Shape };\n personOrSystem.parentBoundary = currentBoundaryParse;\n personOrSystem.wrap = autoWrap();\n}, \"addPersonOrSystem\");\nvar addContainer = /* @__PURE__ */ __name(function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {\n if (alias === null || label === null) {\n return;\n }\n let container = {};\n const old = c4ShapeArray.find((container2) => container2.alias === alias);\n if (old && alias === old.alias) {\n container = old;\n } else {\n container.alias = alias;\n c4ShapeArray.push(container);\n }\n if (label === void 0 || label === null) {\n container.label = { text: \"\" };\n } else {\n container.label = { text: label };\n }\n if (techn === void 0 || techn === null) {\n container.techn = { text: \"\" };\n } else {\n if (typeof techn === \"object\") {\n let [key, value] = Object.entries(techn)[0];\n container[key] = { text: value };\n } else {\n container.techn = { text: techn };\n }\n }\n if (descr === void 0 || descr === null) {\n container.descr = { text: \"\" };\n } else {\n if (typeof descr === \"object\") {\n let [key, value] = Object.entries(descr)[0];\n container[key] = { text: value };\n } else {\n container.descr = { text: descr };\n }\n }\n if (typeof sprite === \"object\") {\n let [key, value] = Object.entries(sprite)[0];\n container[key] = value;\n } else {\n container.sprite = sprite;\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n container[key] = value;\n } else {\n container.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n container[key] = value;\n } else {\n container.link = link;\n }\n container.wrap = autoWrap();\n container.typeC4Shape = { text: typeC4Shape };\n container.parentBoundary = currentBoundaryParse;\n}, \"addContainer\");\nvar addComponent = /* @__PURE__ */ __name(function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {\n if (alias === null || label === null) {\n return;\n }\n let component = {};\n const old = c4ShapeArray.find((component2) => component2.alias === alias);\n if (old && alias === old.alias) {\n component = old;\n } else {\n component.alias = alias;\n c4ShapeArray.push(component);\n }\n if (label === void 0 || label === null) {\n component.label = { text: \"\" };\n } else {\n component.label = { text: label };\n }\n if (techn === void 0 || techn === null) {\n component.techn = { text: \"\" };\n } else {\n if (typeof techn === \"object\") {\n let [key, value] = Object.entries(techn)[0];\n component[key] = { text: value };\n } else {\n component.techn = { text: techn };\n }\n }\n if (descr === void 0 || descr === null) {\n component.descr = { text: \"\" };\n } else {\n if (typeof descr === \"object\") {\n let [key, value] = Object.entries(descr)[0];\n component[key] = { text: value };\n } else {\n component.descr = { text: descr };\n }\n }\n if (typeof sprite === \"object\") {\n let [key, value] = Object.entries(sprite)[0];\n component[key] = value;\n } else {\n component.sprite = sprite;\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n component[key] = value;\n } else {\n component.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n component[key] = value;\n } else {\n component.link = link;\n }\n component.wrap = autoWrap();\n component.typeC4Shape = { text: typeC4Shape };\n component.parentBoundary = currentBoundaryParse;\n}, \"addComponent\");\nvar addPersonOrSystemBoundary = /* @__PURE__ */ __name(function(alias, label, type, tags, link) {\n if (alias === null || label === null) {\n return;\n }\n let boundary = {};\n const old = boundaries.find((boundary2) => boundary2.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundaries.push(boundary);\n }\n if (label === void 0 || label === null) {\n boundary.label = { text: \"\" };\n } else {\n boundary.label = { text: label };\n }\n if (type === void 0 || type === null) {\n boundary.type = { text: \"system\" };\n } else {\n if (typeof type === \"object\") {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n}, \"addPersonOrSystemBoundary\");\nvar addContainerBoundary = /* @__PURE__ */ __name(function(alias, label, type, tags, link) {\n if (alias === null || label === null) {\n return;\n }\n let boundary = {};\n const old = boundaries.find((boundary2) => boundary2.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundaries.push(boundary);\n }\n if (label === void 0 || label === null) {\n boundary.label = { text: \"\" };\n } else {\n boundary.label = { text: label };\n }\n if (type === void 0 || type === null) {\n boundary.type = { text: \"container\" };\n } else {\n if (typeof type === \"object\") {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n}, \"addContainerBoundary\");\nvar addDeploymentNode = /* @__PURE__ */ __name(function(nodeType, alias, label, type, descr, sprite, tags, link) {\n if (alias === null || label === null) {\n return;\n }\n let boundary = {};\n const old = boundaries.find((boundary2) => boundary2.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundaries.push(boundary);\n }\n if (label === void 0 || label === null) {\n boundary.label = { text: \"\" };\n } else {\n boundary.label = { text: label };\n }\n if (type === void 0 || type === null) {\n boundary.type = { text: \"node\" };\n } else {\n if (typeof type === \"object\") {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n if (descr === void 0 || descr === null) {\n boundary.descr = { text: \"\" };\n } else {\n if (typeof descr === \"object\") {\n let [key, value] = Object.entries(descr)[0];\n boundary[key] = { text: value };\n } else {\n boundary.descr = { text: descr };\n }\n }\n if (typeof tags === \"object\") {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === \"object\") {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.nodeType = nodeType;\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n}, \"addDeploymentNode\");\nvar popBoundaryParseStack = /* @__PURE__ */ __name(function() {\n currentBoundaryParse = parentBoundaryParse;\n boundaryParseStack.pop();\n parentBoundaryParse = boundaryParseStack.pop();\n boundaryParseStack.push(parentBoundaryParse);\n}, \"popBoundaryParseStack\");\nvar updateElStyle = /* @__PURE__ */ __name(function(typeC4Shape, elementName, bgColor, fontColor, borderColor, shadowing, shape, sprite, techn, legendText, legendSprite) {\n let old = c4ShapeArray.find((element) => element.alias === elementName);\n if (old === void 0) {\n old = boundaries.find((element) => element.alias === elementName);\n if (old === void 0) {\n return;\n }\n }\n if (bgColor !== void 0 && bgColor !== null) {\n if (typeof bgColor === \"object\") {\n let [key, value] = Object.entries(bgColor)[0];\n old[key] = value;\n } else {\n old.bgColor = bgColor;\n }\n }\n if (fontColor !== void 0 && fontColor !== null) {\n if (typeof fontColor === \"object\") {\n let [key, value] = Object.entries(fontColor)[0];\n old[key] = value;\n } else {\n old.fontColor = fontColor;\n }\n }\n if (borderColor !== void 0 && borderColor !== null) {\n if (typeof borderColor === \"object\") {\n let [key, value] = Object.entries(borderColor)[0];\n old[key] = value;\n } else {\n old.borderColor = borderColor;\n }\n }\n if (shadowing !== void 0 && shadowing !== null) {\n if (typeof shadowing === \"object\") {\n let [key, value] = Object.entries(shadowing)[0];\n old[key] = value;\n } else {\n old.shadowing = shadowing;\n }\n }\n if (shape !== void 0 && shape !== null) {\n if (typeof shape === \"object\") {\n let [key, value] = Object.entries(shape)[0];\n old[key] = value;\n } else {\n old.shape = shape;\n }\n }\n if (sprite !== void 0 && sprite !== null) {\n if (typeof sprite === \"object\") {\n let [key, value] = Object.entries(sprite)[0];\n old[key] = value;\n } else {\n old.sprite = sprite;\n }\n }\n if (techn !== void 0 && techn !== null) {\n if (typeof techn === \"object\") {\n let [key, value] = Object.entries(techn)[0];\n old[key] = value;\n } else {\n old.techn = techn;\n }\n }\n if (legendText !== void 0 && legendText !== null) {\n if (typeof legendText === \"object\") {\n let [key, value] = Object.entries(legendText)[0];\n old[key] = value;\n } else {\n old.legendText = legendText;\n }\n }\n if (legendSprite !== void 0 && legendSprite !== null) {\n if (typeof legendSprite === \"object\") {\n let [key, value] = Object.entries(legendSprite)[0];\n old[key] = value;\n } else {\n old.legendSprite = legendSprite;\n }\n }\n}, \"updateElStyle\");\nvar updateRelStyle = /* @__PURE__ */ __name(function(typeC4Shape, from, to, textColor, lineColor, offsetX, offsetY) {\n const old = rels.find((rel) => rel.from === from && rel.to === to);\n if (old === void 0) {\n return;\n }\n if (textColor !== void 0 && textColor !== null) {\n if (typeof textColor === \"object\") {\n let [key, value] = Object.entries(textColor)[0];\n old[key] = value;\n } else {\n old.textColor = textColor;\n }\n }\n if (lineColor !== void 0 && lineColor !== null) {\n if (typeof lineColor === \"object\") {\n let [key, value] = Object.entries(lineColor)[0];\n old[key] = value;\n } else {\n old.lineColor = lineColor;\n }\n }\n if (offsetX !== void 0 && offsetX !== null) {\n if (typeof offsetX === \"object\") {\n let [key, value] = Object.entries(offsetX)[0];\n old[key] = parseInt(value);\n } else {\n old.offsetX = parseInt(offsetX);\n }\n }\n if (offsetY !== void 0 && offsetY !== null) {\n if (typeof offsetY === \"object\") {\n let [key, value] = Object.entries(offsetY)[0];\n old[key] = parseInt(value);\n } else {\n old.offsetY = parseInt(offsetY);\n }\n }\n}, \"updateRelStyle\");\nvar updateLayoutConfig = /* @__PURE__ */ __name(function(typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) {\n let c4ShapeInRowValue = c4ShapeInRow;\n let c4BoundaryInRowValue = c4BoundaryInRow;\n if (typeof c4ShapeInRowParam === \"object\") {\n const value = Object.values(c4ShapeInRowParam)[0];\n c4ShapeInRowValue = parseInt(value);\n } else {\n c4ShapeInRowValue = parseInt(c4ShapeInRowParam);\n }\n if (typeof c4BoundaryInRowParam === \"object\") {\n const value = Object.values(c4BoundaryInRowParam)[0];\n c4BoundaryInRowValue = parseInt(value);\n } else {\n c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam);\n }\n if (c4ShapeInRowValue >= 1) {\n c4ShapeInRow = c4ShapeInRowValue;\n }\n if (c4BoundaryInRowValue >= 1) {\n c4BoundaryInRow = c4BoundaryInRowValue;\n }\n}, \"updateLayoutConfig\");\nvar getC4ShapeInRow = /* @__PURE__ */ __name(function() {\n return c4ShapeInRow;\n}, \"getC4ShapeInRow\");\nvar getC4BoundaryInRow = /* @__PURE__ */ __name(function() {\n return c4BoundaryInRow;\n}, \"getC4BoundaryInRow\");\nvar getCurrentBoundaryParse = /* @__PURE__ */ __name(function() {\n return currentBoundaryParse;\n}, \"getCurrentBoundaryParse\");\nvar getParentBoundaryParse = /* @__PURE__ */ __name(function() {\n return parentBoundaryParse;\n}, \"getParentBoundaryParse\");\nvar getC4ShapeArray = /* @__PURE__ */ __name(function(parentBoundary) {\n if (parentBoundary === void 0 || parentBoundary === null) {\n return c4ShapeArray;\n } else {\n return c4ShapeArray.filter((personOrSystem) => {\n return personOrSystem.parentBoundary === parentBoundary;\n });\n }\n}, \"getC4ShapeArray\");\nvar getC4Shape = /* @__PURE__ */ __name(function(alias) {\n return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);\n}, \"getC4Shape\");\nvar getC4ShapeKeys = /* @__PURE__ */ __name(function(parentBoundary) {\n return Object.keys(getC4ShapeArray(parentBoundary));\n}, \"getC4ShapeKeys\");\nvar getBoundaries = /* @__PURE__ */ __name(function(parentBoundary) {\n if (parentBoundary === void 0 || parentBoundary === null) {\n return boundaries;\n } else {\n return boundaries.filter((boundary) => boundary.parentBoundary === parentBoundary);\n }\n}, \"getBoundaries\");\nvar getBoundarys = getBoundaries;\nvar getRels = /* @__PURE__ */ __name(function() {\n return rels;\n}, \"getRels\");\nvar getTitle = /* @__PURE__ */ __name(function() {\n return title;\n}, \"getTitle\");\nvar setWrap = /* @__PURE__ */ __name(function(wrapSetting) {\n wrapEnabled = wrapSetting;\n}, \"setWrap\");\nvar autoWrap = /* @__PURE__ */ __name(function() {\n return wrapEnabled;\n}, \"autoWrap\");\nvar clear = /* @__PURE__ */ __name(function() {\n c4ShapeArray = [];\n boundaries = [\n {\n alias: \"global\",\n label: { text: \"global\" },\n type: { text: \"global\" },\n tags: null,\n link: null,\n parentBoundary: \"\"\n }\n ];\n parentBoundaryParse = \"\";\n currentBoundaryParse = \"global\";\n boundaryParseStack = [\"\"];\n rels = [];\n boundaryParseStack = [\"\"];\n title = \"\";\n wrapEnabled = false;\n c4ShapeInRow = 4;\n c4BoundaryInRow = 2;\n}, \"clear\");\nvar LINETYPE = {\n SOLID: 0,\n DOTTED: 1,\n NOTE: 2,\n SOLID_CROSS: 3,\n DOTTED_CROSS: 4,\n SOLID_OPEN: 5,\n DOTTED_OPEN: 6,\n LOOP_START: 10,\n LOOP_END: 11,\n ALT_START: 12,\n ALT_ELSE: 13,\n ALT_END: 14,\n OPT_START: 15,\n OPT_END: 16,\n ACTIVE_START: 17,\n ACTIVE_END: 18,\n PAR_START: 19,\n PAR_AND: 20,\n PAR_END: 21,\n RECT_START: 22,\n RECT_END: 23,\n SOLID_POINT: 24,\n DOTTED_POINT: 25\n};\nvar ARROWTYPE = {\n FILLED: 0,\n OPEN: 1\n};\nvar PLACEMENT = {\n LEFTOF: 0,\n RIGHTOF: 1,\n OVER: 2\n};\nvar setTitle = /* @__PURE__ */ __name(function(txt) {\n let sanitizedText = sanitizeText(txt, getConfig());\n title = sanitizedText;\n}, \"setTitle\");\nvar c4Db_default = {\n addPersonOrSystem,\n addPersonOrSystemBoundary,\n addContainer,\n addContainerBoundary,\n addComponent,\n addDeploymentNode,\n popBoundaryParseStack,\n addRel,\n updateElStyle,\n updateRelStyle,\n updateLayoutConfig,\n autoWrap,\n setWrap,\n getC4ShapeArray,\n getC4Shape,\n getC4ShapeKeys,\n getBoundaries,\n getBoundarys,\n getCurrentBoundaryParse,\n getParentBoundaryParse,\n getRels,\n getTitle,\n getC4Type,\n getC4ShapeInRow,\n getC4BoundaryInRow,\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n getConfig: /* @__PURE__ */ __name(() => getConfig().c4, \"getConfig\"),\n clear,\n LINETYPE,\n ARROWTYPE,\n PLACEMENT,\n setTitle,\n setC4Type\n // apply,\n};\n\n// src/diagrams/c4/c4Renderer.js\nimport { select } from \"d3\";\n\n// src/diagrams/c4/svgDraw.js\nimport { sanitizeUrl } from \"@braintree/sanitize-url\";\nvar drawRect2 = /* @__PURE__ */ __name(function(elem, rectData) {\n return drawRect(elem, rectData);\n}, \"drawRect\");\nvar drawImage = /* @__PURE__ */ __name(function(elem, width, height, x, y, link) {\n const imageElem = elem.append(\"image\");\n imageElem.attr(\"width\", width);\n imageElem.attr(\"height\", height);\n imageElem.attr(\"x\", x);\n imageElem.attr(\"y\", y);\n let sanitizedLink = link.startsWith(\"data:image/png;base64\") ? link : sanitizeUrl(link);\n imageElem.attr(\"xlink:href\", sanitizedLink);\n}, \"drawImage\");\nvar drawRels = /* @__PURE__ */ __name((elem, rels2, conf2, diagramId) => {\n const relsElem = elem.append(\"g\");\n let i = 0;\n for (let rel of rels2) {\n let textColor = rel.textColor ? rel.textColor : \"#444444\";\n let strokeColor = rel.lineColor ? rel.lineColor : \"#444444\";\n let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0;\n let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0;\n let url = \"\";\n if (i === 0) {\n let line = relsElem.append(\"line\");\n line.attr(\"x1\", rel.startPoint.x);\n line.attr(\"y1\", rel.startPoint.y);\n line.attr(\"x2\", rel.endPoint.x);\n line.attr(\"y2\", rel.endPoint.y);\n line.attr(\"stroke-width\", \"1\");\n line.attr(\"stroke\", strokeColor);\n line.style(\"fill\", \"none\");\n if (rel.type !== \"rel_b\") {\n line.attr(\"marker-end\", \"url(\" + url + \"#\" + diagramId + \"-arrowhead)\");\n }\n if (rel.type === \"birel\" || rel.type === \"rel_b\") {\n line.attr(\"marker-start\", \"url(\" + url + \"#\" + diagramId + \"-arrowend)\");\n }\n i = -1;\n } else {\n let line = relsElem.append(\"path\");\n line.attr(\"fill\", \"none\").attr(\"stroke-width\", \"1\").attr(\"stroke\", strokeColor).attr(\n \"d\",\n \"Mstartx,starty Qcontrolx,controly stopx,stopy \".replaceAll(\"startx\", rel.startPoint.x).replaceAll(\"starty\", rel.startPoint.y).replaceAll(\n \"controlx\",\n rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4\n ).replaceAll(\"controly\", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll(\"stopx\", rel.endPoint.x).replaceAll(\"stopy\", rel.endPoint.y)\n );\n if (rel.type !== \"rel_b\") {\n line.attr(\"marker-end\", \"url(\" + url + \"#\" + diagramId + \"-arrowhead)\");\n }\n if (rel.type === \"birel\" || rel.type === \"rel_b\") {\n line.attr(\"marker-start\", \"url(\" + url + \"#\" + diagramId + \"-arrowend)\");\n }\n }\n let messageConf = conf2.messageFont();\n _drawTextCandidateFunc(conf2)(\n rel.label.text,\n relsElem,\n Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,\n Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + offsetY,\n rel.label.width,\n rel.label.height,\n { fill: textColor },\n messageConf\n );\n if (rel.techn && rel.techn.text !== \"\") {\n messageConf = conf2.messageFont();\n _drawTextCandidateFunc(conf2)(\n \"[\" + rel.techn.text + \"]\",\n relsElem,\n Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,\n Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf2.messageFontSize + 5 + offsetY,\n Math.max(rel.label.width, rel.techn.width),\n rel.techn.height,\n { fill: textColor, \"font-style\": \"italic\" },\n messageConf\n );\n }\n }\n}, \"drawRels\");\nvar drawBoundary = /* @__PURE__ */ __name(function(elem, boundary, conf2) {\n const boundaryElem = elem.append(\"g\");\n let fillColor = boundary.bgColor ? boundary.bgColor : \"none\";\n let strokeColor = boundary.borderColor ? boundary.borderColor : \"#444444\";\n let fontColor = boundary.fontColor ? boundary.fontColor : \"black\";\n let attrsValue = { \"stroke-width\": 1, \"stroke-dasharray\": \"7.0,7.0\" };\n if (boundary.nodeType) {\n attrsValue = { \"stroke-width\": 1 };\n }\n let rectData = {\n x: boundary.x,\n y: boundary.y,\n fill: fillColor,\n stroke: strokeColor,\n width: boundary.width,\n height: boundary.height,\n rx: 2.5,\n ry: 2.5,\n attrs: attrsValue\n };\n drawRect2(boundaryElem, rectData);\n let boundaryConf = conf2.boundaryFont();\n boundaryConf.fontWeight = \"bold\";\n boundaryConf.fontSize = boundaryConf.fontSize + 2;\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf2)(\n boundary.label.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.label.Y,\n boundary.width,\n boundary.height,\n { fill: \"#444444\" },\n boundaryConf\n );\n if (boundary.type && boundary.type.text !== \"\") {\n boundaryConf = conf2.boundaryFont();\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf2)(\n boundary.type.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.type.Y,\n boundary.width,\n boundary.height,\n { fill: \"#444444\" },\n boundaryConf\n );\n }\n if (boundary.descr && boundary.descr.text !== \"\") {\n boundaryConf = conf2.boundaryFont();\n boundaryConf.fontSize = boundaryConf.fontSize - 2;\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf2)(\n boundary.descr.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.descr.Y,\n boundary.width,\n boundary.height,\n { fill: \"#444444\" },\n boundaryConf\n );\n }\n}, \"drawBoundary\");\nvar drawC4Shape = /* @__PURE__ */ __name(function(elem, c4Shape, conf2) {\n let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf2[c4Shape.typeC4Shape.text + \"_bg_color\"];\n let strokeColor = c4Shape.borderColor ? c4Shape.borderColor : conf2[c4Shape.typeC4Shape.text + \"_border_color\"];\n let fontColor = c4Shape.fontColor ? c4Shape.fontColor : \"#FFFFFF\";\n let personImg = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD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DgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=\";\n break;\n }\n const c4ShapeElem = elem.append(\"g\");\n c4ShapeElem.attr(\"class\", \"person-man\");\n const rect = getNoteRect();\n switch (c4Shape.typeC4Shape.text) {\n case \"person\":\n case \"external_person\":\n case \"system\":\n case \"external_system\":\n case \"container\":\n case \"external_container\":\n case \"component\":\n case \"external_component\":\n rect.x = c4Shape.x;\n rect.y = c4Shape.y;\n rect.fill = fillColor;\n rect.width = c4Shape.width;\n rect.height = c4Shape.height;\n rect.stroke = strokeColor;\n rect.rx = 2.5;\n rect.ry = 2.5;\n rect.attrs = { \"stroke-width\": 0.5 };\n drawRect2(c4ShapeElem, rect);\n break;\n case \"system_db\":\n case \"external_system_db\":\n case \"container_db\":\n case \"external_container_db\":\n case \"component_db\":\n case \"external_component_db\":\n c4ShapeElem.append(\"path\").attr(\"fill\", fillColor).attr(\"stroke-width\", \"0.5\").attr(\"stroke\", strokeColor).attr(\n \"d\",\n \"Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height\".replaceAll(\"startx\", c4Shape.x).replaceAll(\"starty\", c4Shape.y).replaceAll(\"half\", c4Shape.width / 2).replaceAll(\"height\", c4Shape.height)\n );\n c4ShapeElem.append(\"path\").attr(\"fill\", \"none\").attr(\"stroke-width\", \"0.5\").attr(\"stroke\", strokeColor).attr(\n \"d\",\n \"Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10\".replaceAll(\"startx\", c4Shape.x).replaceAll(\"starty\", c4Shape.y).replaceAll(\"half\", c4Shape.width / 2)\n );\n break;\n case \"system_queue\":\n case \"external_system_queue\":\n case \"container_queue\":\n case \"external_container_queue\":\n case \"component_queue\":\n case \"external_component_queue\":\n c4ShapeElem.append(\"path\").attr(\"fill\", fillColor).attr(\"stroke-width\", \"0.5\").attr(\"stroke\", strokeColor).attr(\n \"d\",\n \"Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half\".replaceAll(\"startx\", c4Shape.x).replaceAll(\"starty\", c4Shape.y).replaceAll(\"width\", c4Shape.width).replaceAll(\"half\", c4Shape.height / 2)\n );\n c4ShapeElem.append(\"path\").attr(\"fill\", \"none\").attr(\"stroke-width\", \"0.5\").attr(\"stroke\", strokeColor).attr(\n \"d\",\n \"Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half\".replaceAll(\"startx\", c4Shape.x + c4Shape.width).replaceAll(\"starty\", c4Shape.y).replaceAll(\"half\", c4Shape.height / 2)\n );\n break;\n }\n let c4ShapeFontConf = getC4ShapeFont(conf2, c4Shape.typeC4Shape.text);\n c4ShapeElem.append(\"text\").attr(\"fill\", fontColor).attr(\"font-family\", c4ShapeFontConf.fontFamily).attr(\"font-size\", c4ShapeFontConf.fontSize - 2).attr(\"font-style\", \"italic\").attr(\"lengthAdjust\", \"spacing\").attr(\"textLength\", c4Shape.typeC4Shape.width).attr(\"x\", c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2).attr(\"y\", c4Shape.y + c4Shape.typeC4Shape.Y).text(\"<<\" + c4Shape.typeC4Shape.text + \">>\");\n switch (c4Shape.typeC4Shape.text) {\n case \"person\":\n case \"external_person\":\n drawImage(\n c4ShapeElem,\n 48,\n 48,\n c4Shape.x + c4Shape.width / 2 - 24,\n c4Shape.y + c4Shape.image.Y,\n personImg\n );\n break;\n }\n let textFontConf = conf2[c4Shape.typeC4Shape.text + \"Font\"]();\n textFontConf.fontWeight = \"bold\";\n textFontConf.fontSize = textFontConf.fontSize + 2;\n textFontConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf2)(\n c4Shape.label.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.label.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor },\n textFontConf\n );\n textFontConf = conf2[c4Shape.typeC4Shape.text + \"Font\"]();\n textFontConf.fontColor = fontColor;\n if (c4Shape.techn && c4Shape.techn?.text !== \"\") {\n _drawTextCandidateFunc(conf2)(\n c4Shape.techn.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.techn.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor, \"font-style\": \"italic\" },\n textFontConf\n );\n } else if (c4Shape.type && c4Shape.type.text !== \"\") {\n _drawTextCandidateFunc(conf2)(\n c4Shape.type.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.type.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor, \"font-style\": \"italic\" },\n textFontConf\n );\n }\n if (c4Shape.descr && c4Shape.descr.text !== \"\") {\n textFontConf = conf2.personFont();\n textFontConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf2)(\n c4Shape.descr.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.descr.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor },\n textFontConf\n );\n }\n return c4Shape.height;\n}, \"drawC4Shape\");\nvar insertDatabaseIcon = /* @__PURE__ */ __name(function(elem, id) {\n elem.append(\"defs\").append(\"symbol\").attr(\"id\", id + \"-database\").attr(\"fill-rule\", \"evenodd\").attr(\"clip-rule\", \"evenodd\").append(\"path\").attr(\"transform\", \"scale(.5)\").attr(\n \"d\",\n \"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z\"\n );\n}, \"insertDatabaseIcon\");\nvar insertComputerIcon = /* @__PURE__ */ __name(function(elem, id) {\n elem.append(\"defs\").append(\"symbol\").attr(\"id\", id + \"-computer\").attr(\"width\", \"24\").attr(\"height\", \"24\").append(\"path\").attr(\"transform\", \"scale(.5)\").attr(\n \"d\",\n \"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z\"\n );\n}, \"insertComputerIcon\");\nvar insertClockIcon = /* @__PURE__ */ __name(function(elem, id) {\n elem.append(\"defs\").append(\"symbol\").attr(\"id\", id + \"-clock\").attr(\"width\", \"24\").attr(\"height\", \"24\").append(\"path\").attr(\"transform\", \"scale(.5)\").attr(\n \"d\",\n \"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z\"\n );\n}, \"insertClockIcon\");\nvar insertArrowHead = /* @__PURE__ */ __name(function(elem, id) {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"-arrowhead\").attr(\"refX\", 9).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 12).attr(\"markerHeight\", 12).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 0 0 L 10 5 L 0 10 z\");\n}, \"insertArrowHead\");\nvar insertArrowEnd = /* @__PURE__ */ __name(function(elem, id) {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"-arrowend\").attr(\"refX\", 1).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 12).attr(\"markerHeight\", 12).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 10 0 L 0 5 L 10 10 z\");\n}, \"insertArrowEnd\");\nvar insertArrowFilledHead = /* @__PURE__ */ __name(function(elem, id) {\n elem.append(\"defs\").append(\"marker\").attr(\"id\", id + \"-filled-head\").attr(\"refX\", 18).attr(\"refY\", 7).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"auto\").append(\"path\").attr(\"d\", \"M 18,7 L9,13 L14,7 L9,1 Z\");\n}, \"insertArrowFilledHead\");\nvar insertArrowCrossHead = /* @__PURE__ */ __name(function(elem, id) {\n const defs = elem.append(\"defs\");\n const marker = defs.append(\"marker\").attr(\"id\", id + \"-crosshead\").attr(\"markerWidth\", 15).attr(\"markerHeight\", 8).attr(\"orient\", \"auto\").attr(\"refX\", 16).attr(\"refY\", 4);\n marker.append(\"path\").attr(\"fill\", \"black\").attr(\"stroke\", \"#000000\").style(\"stroke-dasharray\", \"0, 0\").attr(\"stroke-width\", \"1px\").attr(\"d\", \"M 9,2 V 6 L16,4 Z\");\n marker.append(\"path\").attr(\"fill\", \"none\").attr(\"stroke\", \"#000000\").style(\"stroke-dasharray\", \"0, 0\").attr(\"stroke-width\", \"1px\").attr(\"d\", \"M 0,1 L 6,7 M 6,1 L 0,7\");\n}, \"insertArrowCrossHead\");\nvar getC4ShapeFont = /* @__PURE__ */ __name((cnf, typeC4Shape) => {\n return {\n fontFamily: cnf[typeC4Shape + \"FontFamily\"],\n fontSize: cnf[typeC4Shape + \"FontSize\"],\n fontWeight: cnf[typeC4Shape + \"FontWeight\"]\n };\n}, \"getC4ShapeFont\");\nvar _drawTextCandidateFunc = /* @__PURE__ */ (function() {\n function byText(content, g, x, y, width, height, textAttrs) {\n const text = g.append(\"text\").attr(\"x\", x + width / 2).attr(\"y\", y + height / 2 + 5).style(\"text-anchor\", \"middle\").text(content);\n _setTextAttrs(text, textAttrs);\n }\n __name(byText, \"byText\");\n function byTspan(content, g, x, y, width, height, textAttrs, conf2) {\n const { fontSize, fontFamily, fontWeight } = conf2;\n const lines = content.split(common_default.lineBreakRegex);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * fontSize - fontSize * (lines.length - 1) / 2;\n const text = g.append(\"text\").attr(\"x\", x + width / 2).attr(\"y\", y).style(\"text-anchor\", \"middle\").attr(\"dominant-baseline\", \"middle\").style(\"font-size\", fontSize).style(\"font-weight\", fontWeight).style(\"font-family\", fontFamily);\n text.append(\"tspan\").attr(\"dy\", dy).text(lines[i]).attr(\"alignment-baseline\", \"mathematical\");\n _setTextAttrs(text, textAttrs);\n }\n }\n __name(byTspan, \"byTspan\");\n function byFo(content, g, x, y, width, height, textAttrs, conf2) {\n const s = g.append(\"switch\");\n const f = s.append(\"foreignObject\").attr(\"x\", x).attr(\"y\", y).attr(\"width\", width).attr(\"height\", height);\n const text = f.append(\"xhtml:div\").style(\"display\", \"table\").style(\"height\", \"100%\").style(\"width\", \"100%\");\n text.append(\"div\").style(\"display\", \"table-cell\").style(\"text-align\", \"center\").style(\"vertical-align\", \"middle\").text(content);\n byTspan(content, s, x, y, width, height, textAttrs, conf2);\n _setTextAttrs(text, textAttrs);\n }\n __name(byFo, \"byFo\");\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) {\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n __name(_setTextAttrs, \"_setTextAttrs\");\n return function(conf2) {\n return conf2.textPlacement === \"fo\" ? byFo : conf2.textPlacement === \"old\" ? byText : byTspan;\n };\n})();\nvar svgDraw_default = {\n drawRect: drawRect2,\n drawBoundary,\n drawC4Shape,\n drawRels,\n drawImage,\n insertArrowHead,\n insertArrowEnd,\n insertArrowFilledHead,\n insertArrowCrossHead,\n insertDatabaseIcon,\n insertComputerIcon,\n insertClockIcon\n};\n\n// src/diagrams/c4/c4Renderer.js\nvar globalBoundaryMaxX = 0;\nvar globalBoundaryMaxY = 0;\nvar c4ShapeInRow2 = 4;\nvar c4BoundaryInRow2 = 2;\nparser.yy = c4Db_default;\nvar conf = {};\nvar Bounds = class {\n static {\n __name(this, \"Bounds\");\n }\n constructor(diagObj) {\n this.name = \"\";\n this.data = {};\n this.data.startx = void 0;\n this.data.stopx = void 0;\n this.data.starty = void 0;\n this.data.stopy = void 0;\n this.data.widthLimit = void 0;\n this.nextData = {};\n this.nextData.startx = void 0;\n this.nextData.stopx = void 0;\n this.nextData.starty = void 0;\n this.nextData.stopy = void 0;\n this.nextData.cnt = 0;\n setConf(diagObj.db.getConfig());\n }\n setData(startx, stopx, starty, stopy) {\n this.nextData.startx = this.data.startx = startx;\n this.nextData.stopx = this.data.stopx = stopx;\n this.nextData.starty = this.data.starty = starty;\n this.nextData.stopy = this.data.stopy = stopy;\n }\n updateVal(obj, key, val, fun) {\n if (obj[key] === void 0) {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n }\n insert(c4Shape) {\n this.nextData.cnt = this.nextData.cnt + 1;\n let _startx = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + c4Shape.margin : this.nextData.stopx + c4Shape.margin * 2;\n let _stopx = _startx + c4Shape.width;\n let _starty = this.nextData.starty + c4Shape.margin * 2;\n let _stopy = _starty + c4Shape.height;\n if (_startx >= this.data.widthLimit || _stopx >= this.data.widthLimit || this.nextData.cnt > c4ShapeInRow2) {\n _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX;\n _starty = this.nextData.stopy + c4Shape.margin * 2;\n this.nextData.stopx = _stopx = _startx + c4Shape.width;\n this.nextData.starty = this.nextData.stopy;\n this.nextData.stopy = _stopy = _starty + c4Shape.height;\n this.nextData.cnt = 1;\n }\n c4Shape.x = _startx;\n c4Shape.y = _starty;\n this.updateVal(this.data, \"startx\", _startx, Math.min);\n this.updateVal(this.data, \"starty\", _starty, Math.min);\n this.updateVal(this.data, \"stopx\", _stopx, Math.max);\n this.updateVal(this.data, \"stopy\", _stopy, Math.max);\n this.updateVal(this.nextData, \"startx\", _startx, Math.min);\n this.updateVal(this.nextData, \"starty\", _starty, Math.min);\n this.updateVal(this.nextData, \"stopx\", _stopx, Math.max);\n this.updateVal(this.nextData, \"stopy\", _stopy, Math.max);\n }\n init(diagObj) {\n this.name = \"\";\n this.data = {\n startx: void 0,\n stopx: void 0,\n starty: void 0,\n stopy: void 0,\n widthLimit: void 0\n };\n this.nextData = {\n startx: void 0,\n stopx: void 0,\n starty: void 0,\n stopy: void 0,\n cnt: 0\n };\n setConf(diagObj.db.getConfig());\n }\n bumpLastMargin(margin) {\n this.data.stopx += margin;\n this.data.stopy += margin;\n }\n};\nvar setConf = /* @__PURE__ */ __name(function(cnf) {\n assignWithDepth_default(conf, cnf);\n if (cnf.fontFamily) {\n conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily;\n }\n if (cnf.fontSize) {\n conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize;\n }\n if (cnf.fontWeight) {\n conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight;\n }\n}, \"setConf\");\nvar c4ShapeFont = /* @__PURE__ */ __name((cnf, typeC4Shape) => {\n return {\n fontFamily: cnf[typeC4Shape + \"FontFamily\"],\n fontSize: cnf[typeC4Shape + \"FontSize\"],\n fontWeight: cnf[typeC4Shape + \"FontWeight\"]\n };\n}, \"c4ShapeFont\");\nvar boundaryFont = /* @__PURE__ */ __name((cnf) => {\n return {\n fontFamily: cnf.boundaryFontFamily,\n fontSize: cnf.boundaryFontSize,\n fontWeight: cnf.boundaryFontWeight\n };\n}, \"boundaryFont\");\nvar messageFont = /* @__PURE__ */ __name((cnf) => {\n return {\n fontFamily: cnf.messageFontFamily,\n fontSize: cnf.messageFontSize,\n fontWeight: cnf.messageFontWeight\n };\n}, \"messageFont\");\nfunction calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) {\n if (!c4Shape[textType].width) {\n if (c4ShapeTextWrap) {\n c4Shape[textType].text = wrapLabel(c4Shape[textType].text, textLimitWidth, textConf);\n c4Shape[textType].textLines = c4Shape[textType].text.split(common_default.lineBreakRegex).length;\n c4Shape[textType].width = textLimitWidth;\n c4Shape[textType].height = calculateTextHeight(c4Shape[textType].text, textConf);\n } else {\n let lines = c4Shape[textType].text.split(common_default.lineBreakRegex);\n c4Shape[textType].textLines = lines.length;\n let lineHeight = 0;\n c4Shape[textType].height = 0;\n c4Shape[textType].width = 0;\n for (const line of lines) {\n c4Shape[textType].width = Math.max(\n calculateTextWidth(line, textConf),\n c4Shape[textType].width\n );\n lineHeight = calculateTextHeight(line, textConf);\n c4Shape[textType].height = c4Shape[textType].height + lineHeight;\n }\n }\n }\n}\n__name(calcC4ShapeTextWH, \"calcC4ShapeTextWH\");\nvar drawBoundary2 = /* @__PURE__ */ __name(function(diagram2, boundary, bounds) {\n boundary.x = bounds.data.startx;\n boundary.y = bounds.data.starty;\n boundary.width = bounds.data.stopx - bounds.data.startx;\n boundary.height = bounds.data.stopy - bounds.data.starty;\n boundary.label.y = conf.c4ShapeMargin - 35;\n let boundaryTextWrap = boundary.wrap && conf.wrap;\n let boundaryLabelConf = boundaryFont(conf);\n boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2;\n boundaryLabelConf.fontWeight = \"bold\";\n let textLimitWidth = calculateTextWidth(boundary.label.text, boundaryLabelConf);\n calcC4ShapeTextWH(\"label\", boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth);\n svgDraw_default.drawBoundary(diagram2, boundary, conf);\n}, \"drawBoundary\");\nvar drawC4ShapeArray = /* @__PURE__ */ __name(function(currentBounds, diagram2, c4ShapeArray2, c4ShapeKeys) {\n let Y = 0;\n for (const c4ShapeKey of c4ShapeKeys) {\n Y = 0;\n const c4Shape = c4ShapeArray2[c4ShapeKey];\n let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2;\n c4Shape.typeC4Shape.width = calculateTextWidth(\n \"\\xAB\" + c4Shape.typeC4Shape.text + \"\\xBB\",\n c4ShapeTypeConf\n );\n c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2;\n c4Shape.typeC4Shape.Y = conf.c4ShapePadding;\n Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4;\n c4Shape.image = { width: 0, height: 0, Y: 0 };\n switch (c4Shape.typeC4Shape.text) {\n case \"person\":\n case \"external_person\":\n c4Shape.image.width = 48;\n c4Shape.image.height = 48;\n c4Shape.image.Y = Y;\n Y = c4Shape.image.Y + c4Shape.image.height;\n break;\n }\n if (c4Shape.sprite) {\n c4Shape.image.width = 48;\n c4Shape.image.height = 48;\n c4Shape.image.Y = Y;\n Y = c4Shape.image.Y + c4Shape.image.height;\n }\n let c4ShapeTextWrap = c4Shape.wrap && conf.wrap;\n let textLimitWidth = conf.width - conf.c4ShapePadding * 2;\n let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2;\n c4ShapeLabelConf.fontWeight = \"bold\";\n calcC4ShapeTextWH(\"label\", c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth);\n c4Shape.label.Y = Y + 8;\n Y = c4Shape.label.Y + c4Shape.label.height;\n if (c4Shape.type && c4Shape.type.text !== \"\") {\n c4Shape.type.text = \"[\" + c4Shape.type.text + \"]\";\n let c4ShapeTypeConf2 = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n calcC4ShapeTextWH(\"type\", c4Shape, c4ShapeTextWrap, c4ShapeTypeConf2, textLimitWidth);\n c4Shape.type.Y = Y + 5;\n Y = c4Shape.type.Y + c4Shape.type.height;\n } else if (c4Shape.techn && c4Shape.techn.text !== \"\") {\n c4Shape.techn.text = \"[\" + c4Shape.techn.text + \"]\";\n let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text);\n calcC4ShapeTextWH(\"techn\", c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth);\n c4Shape.techn.Y = Y + 5;\n Y = c4Shape.techn.Y + c4Shape.techn.height;\n }\n let rectHeight = Y;\n let rectWidth = c4Shape.label.width;\n if (c4Shape.descr && c4Shape.descr.text !== \"\") {\n let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n calcC4ShapeTextWH(\"descr\", c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth);\n c4Shape.descr.Y = Y + 20;\n Y = c4Shape.descr.Y + c4Shape.descr.height;\n rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width);\n rectHeight = Y - c4Shape.descr.textLines * 5;\n }\n rectWidth = rectWidth + conf.c4ShapePadding;\n c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width);\n c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height);\n c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin;\n currentBounds.insert(c4Shape);\n svgDraw_default.drawC4Shape(diagram2, c4Shape, conf);\n }\n currentBounds.bumpLastMargin(conf.c4ShapeMargin);\n}, \"drawC4ShapeArray\");\nvar Point = class {\n static {\n __name(this, \"Point\");\n }\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n};\nvar getIntersectPoint = /* @__PURE__ */ __name(function(fromNode, endPoint) {\n let x1 = fromNode.x;\n let y1 = fromNode.y;\n let x2 = endPoint.x;\n let y2 = endPoint.y;\n let fromCenterX = x1 + fromNode.width / 2;\n let fromCenterY = y1 + fromNode.height / 2;\n let dx = Math.abs(x1 - x2);\n let dy = Math.abs(y1 - y2);\n let tanDYX = dy / dx;\n let fromDYX = fromNode.height / fromNode.width;\n let returnPoint = null;\n if (y1 == y2 && x1 < x2) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY);\n } else if (y1 == y2 && x1 > x2) {\n returnPoint = new Point(x1, fromCenterY);\n } else if (x1 == x2 && y1 < y2) {\n returnPoint = new Point(fromCenterX, y1 + fromNode.height);\n } else if (x1 == x2 && y1 > y2) {\n returnPoint = new Point(fromCenterX, y1);\n }\n if (x1 > x2 && y1 < y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1, fromCenterY + tanDYX * fromNode.width / 2);\n } else {\n returnPoint = new Point(\n fromCenterX - dx / dy * fromNode.height / 2,\n y1 + fromNode.height\n );\n }\n } else if (x1 < x2 && y1 < y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY + tanDYX * fromNode.width / 2);\n } else {\n returnPoint = new Point(\n fromCenterX + dx / dy * fromNode.height / 2,\n y1 + fromNode.height\n );\n }\n } else if (x1 < x2 && y1 > y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY - tanDYX * fromNode.width / 2);\n } else {\n returnPoint = new Point(fromCenterX + fromNode.height / 2 * dx / dy, y1);\n }\n } else if (x1 > x2 && y1 > y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1, fromCenterY - fromNode.width / 2 * tanDYX);\n } else {\n returnPoint = new Point(fromCenterX - fromNode.height / 2 * dx / dy, y1);\n }\n }\n return returnPoint;\n}, \"getIntersectPoint\");\nvar getIntersectPoints = /* @__PURE__ */ __name(function(fromNode, endNode) {\n let endIntersectPoint = { x: 0, y: 0 };\n endIntersectPoint.x = endNode.x + endNode.width / 2;\n endIntersectPoint.y = endNode.y + endNode.height / 2;\n let startPoint = getIntersectPoint(fromNode, endIntersectPoint);\n endIntersectPoint.x = fromNode.x + fromNode.width / 2;\n endIntersectPoint.y = fromNode.y + fromNode.height / 2;\n let endPoint = getIntersectPoint(endNode, endIntersectPoint);\n return { startPoint, endPoint };\n}, \"getIntersectPoints\");\nvar drawRels2 = /* @__PURE__ */ __name(function(diagram2, rels2, getC4ShapeObj, diagObj, diagramId) {\n let i = 0;\n for (let rel of rels2) {\n i = i + 1;\n let relTextWrap = rel.wrap && conf.wrap;\n let relConf = messageFont(conf);\n let diagramType = diagObj.db.getC4Type();\n if (diagramType === \"C4Dynamic\") {\n rel.label.text = i + \": \" + rel.label.text;\n }\n let textLimitWidth = calculateTextWidth(rel.label.text, relConf);\n calcC4ShapeTextWH(\"label\", rel, relTextWrap, relConf, textLimitWidth);\n if (rel.techn && rel.techn.text !== \"\") {\n textLimitWidth = calculateTextWidth(rel.techn.text, relConf);\n calcC4ShapeTextWH(\"techn\", rel, relTextWrap, relConf, textLimitWidth);\n }\n if (rel.descr && rel.descr.text !== \"\") {\n textLimitWidth = calculateTextWidth(rel.descr.text, relConf);\n calcC4ShapeTextWH(\"descr\", rel, relTextWrap, relConf, textLimitWidth);\n }\n let fromNode = getC4ShapeObj(rel.from);\n let endNode = getC4ShapeObj(rel.to);\n let points = getIntersectPoints(fromNode, endNode);\n rel.startPoint = points.startPoint;\n rel.endPoint = points.endPoint;\n }\n svgDraw_default.drawRels(diagram2, rels2, conf, diagramId);\n}, \"drawRels\");\nfunction drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, currentBoundaries, diagObj) {\n let currentBounds = new Bounds(diagObj);\n currentBounds.data.widthLimit = parentBounds.data.widthLimit / Math.min(c4BoundaryInRow2, currentBoundaries.length);\n for (let [i, currentBoundary] of currentBoundaries.entries()) {\n let Y = 0;\n currentBoundary.image = { width: 0, height: 0, Y: 0 };\n if (currentBoundary.sprite) {\n currentBoundary.image.width = 48;\n currentBoundary.image.height = 48;\n currentBoundary.image.Y = Y;\n Y = currentBoundary.image.Y + currentBoundary.image.height;\n }\n let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap;\n let currentBoundaryLabelConf = boundaryFont(conf);\n currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2;\n currentBoundaryLabelConf.fontWeight = \"bold\";\n calcC4ShapeTextWH(\n \"label\",\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryLabelConf,\n currentBounds.data.widthLimit\n );\n currentBoundary.label.Y = Y + 8;\n Y = currentBoundary.label.Y + currentBoundary.label.height;\n if (currentBoundary.type && currentBoundary.type.text !== \"\") {\n currentBoundary.type.text = \"[\" + currentBoundary.type.text + \"]\";\n let currentBoundaryTypeConf = boundaryFont(conf);\n calcC4ShapeTextWH(\n \"type\",\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryTypeConf,\n currentBounds.data.widthLimit\n );\n currentBoundary.type.Y = Y + 5;\n Y = currentBoundary.type.Y + currentBoundary.type.height;\n }\n if (currentBoundary.descr && currentBoundary.descr.text !== \"\") {\n let currentBoundaryDescrConf = boundaryFont(conf);\n currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2;\n calcC4ShapeTextWH(\n \"descr\",\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryDescrConf,\n currentBounds.data.widthLimit\n );\n currentBoundary.descr.Y = Y + 20;\n Y = currentBoundary.descr.Y + currentBoundary.descr.height;\n }\n if (i == 0 || i % c4BoundaryInRow2 === 0) {\n let _x = parentBounds.data.startx + conf.diagramMarginX;\n let _y = parentBounds.data.stopy + conf.diagramMarginY + Y;\n currentBounds.setData(_x, _x, _y, _y);\n } else {\n let _x = currentBounds.data.stopx !== currentBounds.data.startx ? currentBounds.data.stopx + conf.diagramMarginX : currentBounds.data.startx;\n let _y = currentBounds.data.starty;\n currentBounds.setData(_x, _x, _y, _y);\n }\n currentBounds.name = currentBoundary.alias;\n let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias);\n let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias);\n if (currentPersonOrSystemKeys.length > 0) {\n drawC4ShapeArray(\n currentBounds,\n diagram2,\n currentPersonOrSystemArray,\n currentPersonOrSystemKeys\n );\n }\n parentBoundaryAlias = currentBoundary.alias;\n let nextCurrentBoundaries = diagObj.db.getBoundaries(parentBoundaryAlias);\n if (nextCurrentBoundaries.length > 0) {\n drawInsideBoundary(\n diagram2,\n parentBoundaryAlias,\n currentBounds,\n nextCurrentBoundaries,\n diagObj\n );\n }\n if (currentBoundary.alias !== \"global\") {\n drawBoundary2(diagram2, currentBoundary, currentBounds);\n }\n parentBounds.data.stopy = Math.max(\n currentBounds.data.stopy + conf.c4ShapeMargin,\n parentBounds.data.stopy\n );\n parentBounds.data.stopx = Math.max(\n currentBounds.data.stopx + conf.c4ShapeMargin,\n parentBounds.data.stopx\n );\n globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx);\n globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy);\n }\n}\n__name(drawInsideBoundary, \"drawInsideBoundary\");\nvar draw = /* @__PURE__ */ __name(function(_text, id, _version, diagObj) {\n conf = getConfig().c4;\n const securityLevel = getConfig().securityLevel;\n let sandboxElement;\n if (securityLevel === \"sandbox\") {\n sandboxElement = select(\"#i\" + id);\n }\n const root = securityLevel === \"sandbox\" ? select(sandboxElement.nodes()[0].contentDocument.body) : select(\"body\");\n let db = diagObj.db;\n diagObj.db.setWrap(conf.wrap);\n c4ShapeInRow2 = db.getC4ShapeInRow();\n c4BoundaryInRow2 = db.getC4BoundaryInRow();\n log.debug(`C:${JSON.stringify(conf, null, 2)}`);\n const diagram2 = securityLevel === \"sandbox\" ? root.select(`[id=\"${id}\"]`) : select(`[id=\"${id}\"]`);\n svgDraw_default.insertComputerIcon(diagram2, id);\n svgDraw_default.insertDatabaseIcon(diagram2, id);\n svgDraw_default.insertClockIcon(diagram2, id);\n let screenBounds = new Bounds(diagObj);\n screenBounds.setData(\n conf.diagramMarginX,\n conf.diagramMarginX,\n conf.diagramMarginY,\n conf.diagramMarginY\n );\n screenBounds.data.widthLimit = screen.availWidth;\n globalBoundaryMaxX = conf.diagramMarginX;\n globalBoundaryMaxY = conf.diagramMarginY;\n const title2 = diagObj.db.getTitle();\n let currentBoundaries = diagObj.db.getBoundaries(\"\");\n drawInsideBoundary(diagram2, \"\", screenBounds, currentBoundaries, diagObj);\n svgDraw_default.insertArrowHead(diagram2, id);\n svgDraw_default.insertArrowEnd(diagram2, id);\n svgDraw_default.insertArrowCrossHead(diagram2, id);\n svgDraw_default.insertArrowFilledHead(diagram2, id);\n drawRels2(diagram2, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj, id);\n screenBounds.data.stopx = globalBoundaryMaxX;\n screenBounds.data.stopy = globalBoundaryMaxY;\n const box = screenBounds.data;\n let boxHeight = box.stopy - box.starty;\n let height = boxHeight + 2 * conf.diagramMarginY;\n let boxWidth = box.stopx - box.startx;\n const width = boxWidth + 2 * conf.diagramMarginX;\n if (title2) {\n diagram2.append(\"text\").text(title2).attr(\"x\", (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX).attr(\"y\", box.starty + conf.diagramMarginY);\n }\n configureSvgSize(diagram2, height, width, conf.useMaxWidth);\n const extraVertForTitle = title2 ? 60 : 0;\n diagram2.attr(\n \"viewBox\",\n box.startx - conf.diagramMarginX + \" -\" + (conf.diagramMarginY + extraVertForTitle) + \" \" + width + \" \" + (height + extraVertForTitle)\n );\n log.debug(`models:`, box);\n}, \"draw\");\nvar c4Renderer_default = {\n drawPersonOrSystemArray: drawC4ShapeArray,\n drawBoundary: drawBoundary2,\n setConf,\n draw\n};\n\n// src/diagrams/c4/styles.js\nvar getStyles = /* @__PURE__ */ __name((options) => `.person {\n stroke: ${options.personBorder};\n fill: ${options.personBkg};\n }\n`, \"getStyles\");\nvar styles_default = getStyles;\n\n// src/diagrams/c4/c4Diagram.ts\nvar diagram = {\n parser: c4Diagram_default,\n db: c4Db_default,\n renderer: c4Renderer_default,\n styles: styles_default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ACF,IAAK,IACH,YAAK,MAAM,QAAQ,EACZ,GACP,MACF,IAAK,IACH,YAAK,MAAM,KAAK,EACT,GACP,MACF,IAAK,IACH,YAAK,MAAM,OAAO,EACX,GACP,MACF,IAAK,IACH,YAAK,MAAM,OAAO,EACX,GACP,MACF,IAAK,IACH,YAAK,MAAM,OAAO,EACX,GACP,MACF,IAAK,IACH,YAAK,MAAM,OAAO,EACX,GACP,MACF,IAAK,IACH,YAAK,MAAM,OAAO,EACX,GACP,MACF,IAAK,IACH,YAAK,MAAM,OAAO,EACX,GACP,MACF,IAAK,IACH,YAAK,MAAM,OAAO,EACX,GACP,MACF,IAAK,IACH,YAAK,MAAM,OAAO,EACX,GACP,MACF,IAAK,IACH,YAAK,MAAM,OAAO,EACX,GACP,MACF,IAAK,IACH,YAAK,MAAM,OAAO,EACX,GACP,MACF,IAAK,IACH,YAAK,MAAM,WAAW,EACf,GACP,MACF,IAAK,IACH,YAAK,MAAM,iBAAiB,EACrB,GACP,MACF,IAAK,IACH,YAAK,MAAM,kBAAkB,EACtB,GACP,MACF,IAAK,IACH,YAAK,MAAM,sBAAsB,EAC1B,GACP,MACF,IAAK,IACH,MAAO,gBAET,IAAK,IACH,YAAK,MAAM,WAAW,EACf,kBACP,MACF,IAAK,IACH,KAAK,MAAM,WAAW,EACtB,MACF,IAAK,IACH,KAAK,SAAS,EACd,KAAK,SAAS,EACd,MACF,IAAK,IACH,MAAO,IAET,IAAK,IACH,MACF,IAAK,IACH,MAAO,IAET,IAAK,IACH,KAAK,MAAM,QAAQ,EACnB,MACF,IAAK,IACH,KAAK,SAAS,EACd,MACF,IAAK,IACH,MAAO,MAET,IAAK,IACH,KAAK,MAAM,WAAW,EACtB,MACF,IAAK,IACH,YAAK,MAAM,eAAe,EACnB,UACP,MACF,IAAK,IACH,KAAK,SAAS,EACd,KAAK,MAAM,iBAAiB,EAC5B,MACF,IAAK,IACH,MAAO,YAET,IAAK,IACH,KAAK,SAAS,EACd,KAAK,SAAS,EACd,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AGIe,GAA4BlY,EAAQmY,GAAY;AAAA,cACtCA,EAAQ,YAAY;AAAA,YACtBA,EAAQ,SAAS;AAAA;AAAA,EAE1B,WAAW,EACVC,GAAiBF,GAGjBG,GAAU,CACZ,OAAQxQ,GACR,GAAI2F,GACJ,SAAUyK,GACV,OAAQG,GACR,KAAsBpY,EAAO,CAAC,CAAE,GAAAsY,EAAI,KAAAC,CAAK,IAAM,CAC7CN,GAAmB,QAAQK,CAAE,EAC7B9K,GAAa,QAAQ+K,CAAI,CAC3B,EAAG,MAAM,CACX", + "names": ["import_sanitize_url", "parser", "o", "__name", "k", "v", "o2", "l", "$V0", "$V1", "$V2", "$V3", "$V4", "$V5", "$V6", "$V7", "$V8", "$V9", "$Va", "$Vb", "$Vc", "$Vd", "$Ve", "$Vf", "$Vg", "$Vh", "$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "$VB", "$VC", "$VD", "$VE", "$VF", "$VG", "$VH", "$VI", "$VJ", "$VK", "$VL", "$VM", "$VN", "$VO", "$VP", "$VQ", "$VR", "$VS", "parser2", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "kv", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer2", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "lexer", "ch", "lines", "oldLines", "past", "next", "pre", "c2", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "c4Diagram_default", "c4ShapeArray", "boundaryParseStack", "currentBoundaryParse", "parentBoundaryParse", "boundaries", "rels", "title", "wrapEnabled", "c4ShapeInRow", "c4BoundaryInRow", "c4Type", "getC4Type", "setC4Type", "c4TypeParam", "sanitizeText", "getConfig2", "addRel", "type", "from", "to", "label", "techn", "descr", "sprite", "tags", "link", "rel", "old", "rel2", "key", "value", "autoWrap", "addPersonOrSystem", "typeC4Shape", "alias", "personOrSystem", "personOrSystem2", "addContainer", "container", "container2", "addComponent", "component", "component2", "addPersonOrSystemBoundary", "boundary", "boundary2", "addContainerBoundary", "addDeploymentNode", "nodeType", "popBoundaryParseStack", "updateElStyle", "elementName", "bgColor", "fontColor", "borderColor", "shadowing", "shape", "legendText", "legendSprite", "element", "updateRelStyle", "textColor", "lineColor", "offsetX", "offsetY", "updateLayoutConfig", "c4ShapeInRowParam", "c4BoundaryInRowParam", "c4ShapeInRowValue", "c4BoundaryInRowValue", "getC4ShapeInRow", "getC4BoundaryInRow", "getCurrentBoundaryParse", "getParentBoundaryParse", "getC4ShapeArray", "parentBoundary", "getC4Shape", "getC4ShapeKeys", "getBoundaries", "getBoundarys", "getRels", "getTitle", "setWrap", "wrapSetting", "clear", "LINETYPE", "ARROWTYPE", "PLACEMENT", "setTitle", "txt", "c4Db_default", "setAccTitle", "getAccTitle", "getAccDescription", "setAccDescription", "drawRect2", "elem", "rectData", "drawRect", "drawImage", "width", "height", "x", "y", "imageElem", "sanitizedLink", "drawRels", "rels2", "conf2", "diagramId", "relsElem", "strokeColor", "url", "line", "messageConf", "_drawTextCandidateFunc", "drawBoundary", "boundaryElem", "fillColor", "attrsValue", "boundaryConf", "drawC4Shape", "c4Shape", "personImg", "c4ShapeElem", "rect", "getNoteRect", "c4ShapeFontConf", "getC4ShapeFont", "textFontConf", "insertDatabaseIcon", "id", "insertComputerIcon", "insertClockIcon", "insertArrowHead", "insertArrowEnd", "insertArrowFilledHead", "insertArrowCrossHead", "marker", "cnf", "byText", "content", "g", "textAttrs", "text", "_setTextAttrs", "byTspan", "fontSize", "fontFamily", "fontWeight", "common_default", "dy", "byFo", "s", "toText", "fromTextAttrsDict", "svgDraw_default", "globalBoundaryMaxX", "globalBoundaryMaxY", "c4ShapeInRow2", "c4BoundaryInRow2", "conf", "Bounds", "diagObj", "setConf", "startx", "stopx", "starty", "stopy", "obj", "val", "fun", "_startx", "_stopx", "_starty", "_stopy", "margin", "assignWithDepth_default", "c4ShapeFont", "boundaryFont", "messageFont", "calcC4ShapeTextWH", "textType", "c4ShapeTextWrap", "textConf", "textLimitWidth", "wrapLabel", "calculateTextHeight", "lineHeight", "calculateTextWidth", "drawBoundary2", "diagram2", "bounds", "boundaryTextWrap", "boundaryLabelConf", "drawC4ShapeArray", "currentBounds", "c4ShapeArray2", "c4ShapeKeys", "Y", "c4ShapeKey", "c4ShapeTypeConf", "c4ShapeLabelConf", "c4ShapeTypeConf2", "c4ShapeTechnConf", "rectHeight", "rectWidth", "c4ShapeDescrConf", "Point", "getIntersectPoint", "fromNode", "endPoint", "x1", "y1", "x2", "y2", "fromCenterX", "fromCenterY", "dx", "tanDYX", "fromDYX", "returnPoint", "getIntersectPoints", "endNode", "endIntersectPoint", "startPoint", "drawRels2", "getC4ShapeObj", "relTextWrap", "relConf", "points", "drawInsideBoundary", "parentBoundaryAlias", "parentBounds", "currentBoundaries", "currentBoundary", "currentBoundaryTextWrap", "currentBoundaryLabelConf", "currentBoundaryTypeConf", "currentBoundaryDescrConf", "_x", "_y", "currentPersonOrSystemArray", "currentPersonOrSystemKeys", "nextCurrentBoundaries", "draw", "_text", "_version", "securityLevel", "sandboxElement", "select_default", "root", "db", "log", "screenBounds", "title2", "box", "configureSvgSize", "extraVertForTitle", "c4Renderer_default", "getStyles", "options", "styles_default", "diagram", "c4", "wrap"] +} diff --git a/templates/tabulareditor/public/chunk-2WVNBDAO.min.js b/templates/tabulareditor/public/chunk-2WVNBDAO.min.js new file mode 100644 index 000000000..f34bf0fa3 --- /dev/null +++ b/templates/tabulareditor/public/chunk-2WVNBDAO.min.js @@ -0,0 +1,63 @@ +import{a as v}from"./chunk-NTMILJIW.min.js";import{a as Zt,b as Bt,d as W,e as I}from"./chunk-WJCDRJGL.min.js";import{a as Tt,b as Vt}from"./chunk-7XSRMU6L.min.js";import{d as Mt,f as nt}from"./chunk-W44GZAG6.min.js";import{k as Pt,r as Dt,t as K}from"./chunk-YPRWTSV5.min.js";import{B as wt,F as at,H as Lt,J as Wt,K as zt,_ as U,ba as Et,v as ut}from"./chunk-LXXU3C6C.min.js";import{b as $,d as z,j as Z}from"./chunk-BJGJ3C53.min.js";var O=$(async(u,t,o)=>{let h,l=t.useHtmlLabels||ut(U()?.htmlLabels);o?h=o:h="node default";let r=u.insert("g").attr("class",h).attr("id",t.domId||t.id),p=r.insert("g").attr("class","label").attr("style",K(t.labelStyle)),i;t.label===void 0?i="":i=typeof t.label=="string"?t.label:t.label[0];let n=!!t.icon||!!t.img,e=t.labelType==="markdown",s=await nt(p,Lt(Dt(i),U()),{useHtmlLabels:l,width:t.width||U().flowchart?.wrappingWidth,classes:e?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:n,markdown:e},U()),a=s.getBBox(),g=(t?.padding??0)/2;if(l){let c=s.children[0],f=Z(s);await Vt(c,i),a=c.getBoundingClientRect(),f.attr("width",a.width),f.attr("height",a.height)}return l?p.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):p.attr("transform","translate(0, "+-a.height/2+")"),t.centerLabel&&p.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),p.insert("rect",":first-child"),{shapeSvg:r,bbox:a,halfPadding:g,label:p}},"labelHelper"),Xt=$(async(u,t,o)=>{let h=o.useHtmlLabels??at(U()),l=u.insert("g").attr("class","label").attr("style",o.labelStyle||""),r=await nt(l,Lt(Dt(t),U()),{useHtmlLabels:h,width:o.width||U()?.flowchart?.wrappingWidth,style:o.labelStyle,addSvgBackground:!!o.icon||!!o.img}),p=r.getBBox(),i=o.padding/2;if(at(U())){let n=r.children[0],e=Z(r);p=n.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return h?l.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):l.attr("transform","translate(0, "+-p.height/2+")"),o.centerLabel&&l.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:u,bbox:p,halfPadding:i,label:l}},"insertLabel"),T=$((u,t)=>{let o=t.node().getBBox();u.width=o.width,u.height=o.height},"updateNodeBounds"),Y=$((u,t)=>(u.look==="handDrawn"?"rough-node":"node")+" "+u.cssClasses+" "+(t||""),"getNodeClasses");function G(u){let t=u.map((o,h)=>`${h===0?"M":"L"}${o.x},${o.y}`);return t.push("Z"),t.join(" ")}$(G,"createPathFromPoints");function ft(u,t,o,h,l,r){let p=[],n=o-u,e=h-t,s=n/r,a=2*Math.PI/s,g=t+e/2;for(let c=0;c<=50;c++){let f=c/50,y=u+f*n,m=g+l*Math.sin(a*(y-u));p.push({x:y,y:m})}return p}$(ft,"generateFullSineWavePoints");function Ct(u,t,o,h,l,r){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(h-1);for(let a=0;an.tagName==="path"),o=document.createElementNS("http://www.w3.org/2000/svg","path"),h=t.map(n=>n.getAttribute("d")).filter(n=>n!==null).join(" ");o.setAttribute("d",h);let l=t.find(n=>n.getAttribute("fill")!=="none"),r=t.find(n=>n.getAttribute("stroke")!=="none"),p=$((n,e)=>n?.getAttribute(e)??void 0,"getAttr");if(l){let n={fill:p(l,"fill"),"fill-opacity":p(l,"fill-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&o.setAttribute(e,s)})}if(r){let n={stroke:p(r,"stroke"),"stroke-width":p(r,"stroke-width")??"1","stroke-opacity":p(r,"stroke-opacity")??"1"};Object.entries(n).forEach(([e,s])=>{s&&o.setAttribute(e,s)})}let i=document.createElementNS("http://www.w3.org/2000/svg","g");return i.appendChild(o),i}$(Yt,"mergePaths");var Ma=$((u,t)=>{var o=u.x,h=u.y,l=t.x-o,r=t.y-h,p=u.width/2,i=u.height/2,n,e;return Math.abs(r)*p>Math.abs(l)*i?(r<0&&(i=-i),n=r===0?0:i*l/r,e=i):(l<0&&(p=-p),n=p,e=l===0?0:p*r/l),{x:o+n,y:h+e}},"intersectRect"),$t=Ma,Na=$(async(u,t,o,h=!1,l=!1)=>{let r=t||"";typeof r=="object"&&(r=r[0]);let p=U(),i=at(p);return await nt(u,r,{style:o,isTitle:h,useHtmlLabels:i,markdown:!1,isNode:l,width:Number.POSITIVE_INFINITY},p)},"createLabel"),At=Na,yt=$((u,t,o,h,l)=>["M",u+l,t,"H",u+o-l,"A",l,l,0,0,1,u+o,t+l,"V",t+h-l,"A",l,l,0,0,1,u+o-l,t+h,"H",u+l,"A",l,l,0,0,1,u,t+h-l,"V",t+l,"A",l,l,0,0,1,u+l,t,"Z"].join(" "),"createRoundedRectPathD"),ns=$(async(u,t)=>{z.info("Creating subgraph rect for ",t.id,t);let o=U(),{themeVariables:h,handDrawnSeed:l}=o,{clusterBkg:r,clusterBorder:p}=h,{labelStyles:i,nodeStyles:n,borderStyles:e,backgroundStyles:s}=W(t),a=u.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=at(o),c=a.insert("g").attr("class","cluster-label "),f;t.labelType==="markdown"?f=await nt(c,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}):f=await At(c,t.label,t.labelStyle||"",!1,!0);let y=f.getBBox();if(at(o)){let P=f.children[0],D=Z(f);y=P.getBoundingClientRect(),D.attr("width",y.width),D.attr("height",y.height)}let m=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;let d=t.height,w=t.x-m/2,x=t.y-d/2;z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){let P=v.svg(a),D=I(t,{roughness:.7,fill:r,stroke:p,fillWeight:3,seed:l}),B=P.path(yt(w,x,m,d,0),D);S=a.insert(()=>(z.debug("Rough node insert CXC",B),B),":first-child"),S.select("path:nth-child(2)").attr("style",e.join(";")),S.select("path").attr("style",s.join(";").replace("fill","stroke"))}else S=a.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",x).attr("width",m).attr("height",d);let{subGraphTitleTopMargin:b}=Tt(o);if(c.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+b})`),i){let P=c.select("span");P&&P.attr("style",i)}let k=S.node().getBBox();return t.offsetX=0,t.width=k.width,t.height=k.height,t.offsetY=y.height-t.padding/2,t.intersect=function(P){return $t(t,P)},{cluster:a,labelBBox:y}},"rect"),Ca=$((u,t)=>{let o=u.insert("g").attr("class","note-cluster").attr("id",t.domId),h=o.insert("rect",":first-child"),l=0*t.padding,r=l/2;h.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-r).attr("y",t.y-t.height/2-r).attr("width",t.width+l).attr("height",t.height+l).attr("fill","none");let p=h.node().getBBox();return t.width=p.width,t.height=p.height,t.intersect=function(i){return $t(t,i)},{cluster:o,labelBBox:{width:0,height:0}}},"noteGroup"),Ra=$(async(u,t)=>{let o=U(),{themeVariables:h,handDrawnSeed:l}=o,{altBackground:r,compositeBackground:p,compositeTitleBackground:i,nodeBorder:n}=h,e=u.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),s=e.insert("g",":first-child"),a=e.insert("g").attr("class","cluster-label"),g=e.append("rect"),c=await At(a,t.label,t.labelStyle,void 0,!0),f=c.getBBox();if(at(o)){let B=c.children[0],M=Z(c);f=B.getBoundingClientRect(),M.attr("width",f.width),M.attr("height",f.height)}let y=0*t.padding,m=y/2,d=(t.width<=f.width+t.padding?f.width+t.padding:t.width)+y;t.width<=f.width+t.padding?t.diff=(d-t.width)/2-t.padding:t.diff=-t.padding;let w=t.height+y,x=t.height+y-f.height-6,S=t.x-d/2,b=t.y-w/2;t.width=d;let k=t.y-t.height/2-m+f.height+2,P;if(t.look==="handDrawn"){let B=t.cssClasses.includes("statediagram-cluster-alt"),M=v.svg(e),C=t.rx||t.ry?M.path(yt(S,b,d,w,10),{roughness:.7,fill:i,fillStyle:"solid",stroke:n,seed:l}):M.rectangle(S,b,d,w,{seed:l});P=e.insert(()=>C,":first-child");let X=M.rectangle(S,k,d,x,{fill:B?r:p,fillStyle:B?"hachure":"solid",stroke:n,seed:l});P=e.insert(()=>C,":first-child"),g=e.insert(()=>X)}else P=s.insert("rect",":first-child"),P.attr("class","outer").attr("x",S).attr("y",b).attr("width",d).attr("height",w).attr("data-look",t.look),g.attr("class","inner").attr("x",S).attr("y",k).attr("width",d).attr("height",x);a.attr("transform",`translate(${t.x-f.width/2}, ${b+1-(at(o)?0:3)})`);let D=P.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=f.height-t.padding/2,t.labelBBox=f,t.intersect=function(B){return $t(t,B)},{cluster:e,labelBBox:f}},"roundedWithTitle"),Aa=$(async(u,t)=>{z.info("Creating subgraph rect for ",t.id,t);let o=U(),{themeVariables:h,handDrawnSeed:l}=o,{clusterBkg:r,clusterBorder:p}=h,{labelStyles:i,nodeStyles:n,borderStyles:e,backgroundStyles:s}=W(t),a=u.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),g=at(o),c=a.insert("g").attr("class","cluster-label "),f=await nt(c,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}),y=f.getBBox();if(at(o)){let P=f.children[0],D=Z(f);y=P.getBoundingClientRect(),D.attr("width",y.width),D.attr("height",y.height)}let m=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;let d=t.height,w=t.x-m/2,x=t.y-d/2;z.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){let P=v.svg(a),D=I(t,{roughness:.7,fill:r,stroke:p,fillWeight:4,seed:l}),B=P.path(yt(w,x,m,d,t.rx),D);S=a.insert(()=>(z.debug("Rough node insert CXC",B),B),":first-child"),S.select("path:nth-child(2)").attr("style",e.join(";")),S.select("path").attr("style",s.join(";").replace("fill","stroke"))}else S=a.insert("rect",":first-child"),S.attr("style",n).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",x).attr("width",m).attr("height",d);let{subGraphTitleTopMargin:b}=Tt(o);if(c.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+b})`),i){let P=c.select("span");P&&P.attr("style",i)}let k=S.node().getBBox();return t.offsetX=0,t.width=k.width,t.height=k.height,t.offsetY=y.height-t.padding/2,t.intersect=function(P){return $t(t,P)},{cluster:a,labelBBox:y}},"kanbanSection"),Ha=$((u,t)=>{let o=U(),{themeVariables:h,handDrawnSeed:l}=o,{nodeBorder:r}=h,p=u.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),i=p.insert("g",":first-child"),n=0*t.padding,e=t.width+n;t.diff=-t.padding;let s=t.height+n,a=t.x-e/2,g=t.y-s/2;t.width=e;let c;if(t.look==="handDrawn"){let m=v.svg(p).rectangle(a,g,e,s,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:r,seed:l});c=p.insert(()=>m,":first-child")}else{c=i.insert("rect",":first-child");let y="outer";t.look,y="divider",c.attr("class",y).attr("x",a).attr("y",g).attr("width",e).attr("height",s).attr("data-look",t.look)}let f=c.node().getBBox();return t.height=f.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return $t(t,y)},{cluster:p,labelBBox:{}}},"divider"),Ia=ns,La={rect:ns,squareRect:Ia,roundedWithTitle:Ra,noteGroup:Ca,divider:Ha,kanbanSection:Aa},cs=new Map,ye=$(async(u,t)=>{let o=t.shape||"rect",h=await La[o](u,t);return cs.set(t.id,h),h},"insertCluster"),pe=$(()=>{cs=new Map},"clear");function os(u,t){return u.intersect(t)}$(os,"intersectNode");var Wa=os;function hs(u,t,o,h){var l=u.x,r=u.y,p=l-h.x,i=r-h.y,n=Math.sqrt(t*t*i*i+o*o*p*p),e=Math.abs(t*o*p/n);h.x0}$(Ot,"sameSign");var Ta=ys;function ps(u,t,o){let h=u.x,l=u.y,r=[],p=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(s){p=Math.min(p,s.x),i=Math.min(i,s.y)}):(p=Math.min(p,t.x),i=Math.min(i,t.y));let n=h-u.width/2-p,e=l-u.height/2-i;for(let s=0;s1&&r.sort(function(s,a){let g=s.x-o.x,c=s.y-o.y,f=Math.sqrt(g*g+c*c),y=a.x-o.x,m=a.y-o.y,d=Math.sqrt(y*y+m*m);return fs,":first-child");return a.attr("class","anchor").attr("style",K(i)),T(t,a),t.intersect=function(g){return z.info("Circle intersect",t,p,g),N.circle(t,p,g)},r}$(us,"anchor");function jt(u,t,o,h,l,r,p){let n=(u+o)/2,e=(t+h)/2,s=Math.atan2(h-t,o-u),a=(o-u)/2,g=(h-t)/2,c=a/l,f=g/r,y=Math.sqrt(c**2+f**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let m=Math.sqrt(1-y**2),d=n+m*r*Math.sin(s)*(p?-1:1),w=e-m*l*Math.cos(s)*(p?-1:1),x=Math.atan2((t-w)/r,(u-d)/l),b=Math.atan2((h-w)/r,(o-d)/l)-x;p&&b<0&&(b+=2*Math.PI),!p&&b>0&&(b-=2*Math.PI);let k=[];for(let P=0;P<20;P++){let D=P/19,B=x+D*b,M=d+l*Math.cos(B),C=w+r*Math.sin(B);k.push({x:M,y:C})}return k}$(jt,"generateArcPoints");function ds(u,t,o){let[h,l]=[t,o].sort((r,p)=>p-r);return l*(1-Math.sqrt(1-(u/h/2)**2))}$(ds,"calculateArcSagitta");async function ms(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l,i=$(B=>B+p,"calcTotalHeight"),n=$(B=>{let M=B/2;return[M/(2.5+B/50),M]},"calcEllipseRadius"),{shapeSvg:e,bbox:s}=await O(u,t,Y(t)),a=i(t?.height?t?.height:s.height),[g,c]=n(a),f=ds(a,g,c),m=(t?.width?t?.width:s.width)+r*2+f-f,d=a,{cssStyles:w}=t,x=[{x:m/2,y:-d/2},{x:-m/2,y:-d/2},...jt(-m/2,-d/2,-m/2,d/2,g,c,!1),{x:m/2,y:d/2},...jt(m/2,d/2,m/2,-d/2,g,c,!0)],S=v.svg(e),b=I(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let k=G(x),P=S.path(k,b),D=e.insert(()=>P,":first-child");return D.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",w),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),D.attr("transform",`translate(${g/2}, 0)`),T(t,D),t.intersect=function(B){return N.polygon(t,x,B)},e}$(ms,"bowTieRect");function ht(u,t,o,h){return u.insert("polygon",":first-child").attr("points",h.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+o/2+")")}$(ht,"insertPolygonShape");var Rt=12;async function ws(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?28:l,p=t.look==="neo"?24:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.width??n.width)+(t.look==="neo"?r*2:r+Rt),s=(t?.height??n.height)+(t.look==="neo"?p*2:p),a=0,g=e,c=-s,f=0,y=[{x:a+Rt,y:c},{x:g,y:c},{x:g,y:f},{x:a,y:f},{x:a,y:c+Rt},{x:a+Rt,y:c}],m,{cssStyles:d}=t;if(t.look==="handDrawn"){let w=v.svg(i),x=I(t,{}),S=G(y),b=w.path(S,x);m=i.insert(()=>b,":first-child").attr("transform",`translate(${-e/2}, ${s/2})`),d&&m.attr("style",d)}else m=ht(i,e,s,y);return h&&m.attr("style",h),T(t,m),t.intersect=function(w){return N.polygon(t,y,w)},i}$(ws,"card");function xs(u,t){let{nodeStyles:o}=W(t);t.label="";let h=u.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,r=Math.max(28,t.width??0),p=[{x:0,y:r/2},{x:r/2,y:0},{x:0,y:-r/2},{x:-r/2,y:0}],i=v.svg(h),n=I(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let e=G(p),s=i.path(e,n),a=h.insert(()=>s,":first-child");return l&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",l),o&&t.look!=="handDrawn"&&a.selectAll("path").attr("style",o),t.width=28,t.height=28,t.intersect=function(g){return N.polygon(t,p,g)},h}$(xs,"choice");async function Gt(u,t,o){let{labelStyles:h,nodeStyles:l}=W(t);t.labelStyle=h;let{shapeSvg:r,bbox:p,halfPadding:i}=await O(u,t,Y(t)),n=16,e=o?.padding??i,s=t.look==="neo"?p.width/2+n*2:p.width/2+e,a,{cssStyles:g}=t;if(t.look==="handDrawn"){let c=v.svg(r),f=I(t,{}),y=c.circle(0,0,s*2,f);a=r.insert(()=>y,":first-child"),a.attr("class","basic label-container").attr("style",K(g))}else a=r.insert("circle",":first-child").attr("class","basic label-container").attr("style",l).attr("r",s).attr("cx",0).attr("cy",0);return T(t,a),t.calcIntersect=function(c,f){let y=c.width/2;return N.circle(c,y,f)},t.intersect=function(c){return z.info("Circle intersect",t,s,c),N.circle(t,s,c)},r}$(Gt,"circle");function bs(u){let t=Math.cos(Math.PI/4),o=Math.sin(Math.PI/4),h=u*2,l={x:h/2*t,y:h/2*o},r={x:-(h/2)*t,y:h/2*o},p={x:-(h/2)*t,y:-(h/2)*o},i={x:h/2*t,y:-(h/2)*o};return`M ${r.x},${r.y} L ${i.x},${i.y} + M ${l.x},${l.y} L ${p.x},${p.y}`}$(bs,"createLine");function Ss(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o,t.label="";let l=u.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),r=Math.max(30,t?.width??0),{cssStyles:p}=t,i=v.svg(l),n=I(t,{});t.look!=="handDrawn"&&(n.roughness=0,n.fillStyle="solid");let e=i.circle(0,0,r*2,n),s=bs(r),a=i.path(s,n),g=l.insert(()=>e,":first-child");return g.insert(()=>a),g.attr("class","outer-path"),p&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",p),h&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",h),T(t,g),t.intersect=function(c){return z.info("crossedCircle intersect",t,{radius:r,point:c}),N.circle(t,r,c)},l}$(Ss,"crossedCircle");function ct(u,t,o,h=100,l=0,r=180){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(h-1);for(let a=0;ab,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),k.attr("transform",`translate(${a}, 0)`),p.attr("transform",`translate(${-e/2+a-(r.x-(r.left??0))},${-s/2+(t.padding??0)/2-(r.y-(r.top??0))})`),T(t,k),t.intersect=function(P){return N.polygon(t,f,P)},l}$($s,"curlyBraceLeft");function ot(u,t,o,h=100,l=0,r=180){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(h-1);for(let a=0;ab,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),k.attr("transform",`translate(${-a}, 0)`),p.attr("transform",`translate(${-e/2+(t.padding??0)/2-(r.x-(r.left??0))},${-s/2+(t.padding??0)/2-(r.y-(r.top??0))})`),T(t,k),t.intersect=function(P){return N.polygon(t,f,P)},l}$(vs,"curlyBraceRight");function tt(u,t,o,h=100,l=0,r=180){let p=[],i=l*Math.PI/180,s=(r*Math.PI/180-i)/(h-1);for(let a=0;aB,":first-child").attr("stroke-opacity",0),M.insert(()=>S,":first-child"),M.insert(()=>P,":first-child"),M.attr("class","text"),g&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",g),h&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",h),M.attr("transform",`translate(${a-a/4}, 0)`),p.attr("transform",`translate(${-e/2+(t.padding??0)/2-(r.x-(r.left??0))},${-s/2+(t.padding??0)/2-(r.y-(r.top??0))})`),T(t,M),t.intersect=function(C){return N.polygon(t,y,C)},l}$(ks,"curlyBraces");async function Ps(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l,i=20,n=5,{shapeSvg:e,bbox:s}=await O(u,t,Y(t)),a=Math.max(i,(s.width+r*2)*1.25,t?.width??0),g=Math.max(n,s.height+p*2,t?.height??0),c=g/2,{cssStyles:f}=t,y=v.svg(e),m=I(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=a,w=g,x=d-c,S=w/4,b=[{x,y:0},{x:S,y:0},{x:0,y:w/2},{x:S,y:w},{x,y:w},...Ct(-x,-w/2,c,50,270,90)],k=G(b),P=y.path(k,m),D=e.insert(()=>P,":first-child");return D.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&D.selectChildren("path").attr("style",f),h&&t.look!=="handDrawn"&&D.selectChildren("path").attr("style",h),D.attr("transform",`translate(${-a/2}, ${-g/2})`),T(t,D),t.intersect=function(B){return N.polygon(t,b,B)},e}$(Ps,"curvedTrapezoid");var _a=$((u,t,o,h,l,r)=>[`M${u},${t+r}`,`a${l},${r} 0,0,0 ${o},0`,`a${l},${r} 0,0,0 ${-o},0`,`l0,${h}`,`a${l},${r} 0,0,0 ${o},0`,`l0,${-h}`].join(" "),"createCylinderPathD"),Ya=$((u,t,o,h,l,r)=>[`M${u},${t+r}`,`M${u+o},${t+r}`,`a${l},${r} 0,0,0 ${-o},0`,`l0,${h}`,`a${l},${r} 0,0,0 ${o},0`,`l0,${-h}`].join(" "),"createOuterCylinderPathD"),Oa=$((u,t,o,h,l,r)=>[`M${u-o/2},${-h/2}`,`a${l},${r} 0,0,0 ${o},0`].join(" "),"createInnerCylinderPathD"),Jt=8,Qt=8;async function Ds(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?24:l,p=t.look==="neo"?24:l;if(t.width||t.height){let m=t.width??0;t.width=(t.width??0)-p,t.widthb,":first-child"),f=i.insert(()=>S,":first-child"),f.attr("class","basic label-container"),y&&f.attr("style",y)}else{let m=_a(0,0,s,c,a,g);f=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",K(y)).attr("style",h)}return f.attr("label-offset-y",g),f.attr("transform",`translate(${-s/2}, ${-(c/2+g)})`),T(t,f),e.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+(t.padding??0)/1.5-(n.y-(n.top??0))})`),t.intersect=function(m){let d=N.rect(t,m),w=d.x-(t.x??0);if(a!=0&&(Math.abs(w)<(t.width??0)/2||Math.abs(w)==(t.width??0)/2&&Math.abs(d.y-(t.y??0))>(t.height??0)/2-g)){let x=g*g*(1-w*w/(a*a));x>0&&(x=Math.sqrt(x)),x=g-x,m.y-(t.y??0)>0&&(x=-x),d.y+=x}return d},i}$(Ds,"cylinder");async function vt(u,t,o){let{labelStyles:h,nodeStyles:l}=W(t);t.labelStyle=h;let{shapeSvg:r,bbox:p}=await O(u,t,Y(t)),i=Math.max(p.width+o.labelPaddingX*2,t?.width||0),n=Math.max(p.height+o.labelPaddingY*2,t?.height||0),e=-i/2,s=-n/2,a,{rx:g,ry:c}=t,{cssStyles:f}=t;if(o?.rx&&o.ry&&(g=o.rx,c=o.ry),t.look==="handDrawn"){let y=v.svg(r),m=I(t,{}),d=g||c?y.path(yt(e,s,i,n,g||0),m):y.rectangle(e,s,i,n,m);a=r.insert(()=>d,":first-child"),a.attr("class","basic label-container").attr("style",K(f))}else a=r.insert("rect",":first-child"),a.attr("class","basic label-container").attr("style",l).attr("rx",K(g)).attr("ry",K(c)).attr("x",e).attr("y",s).attr("width",i).attr("height",n);return T(t,a),t.calcIntersect=function(y,m){return N.rect(y,m)},t.intersect=function(y){return N.rect(t,y)},r}$(vt,"drawRect");async function Bs(u,t){let{cssClasses:o,labelPaddingX:h,labelPaddingY:l,padding:r,width:p,height:i}=t,n={rx:0,ry:0,classes:o??"",labelPaddingX:h??(r??0)*2,labelPaddingY:l??r??0},e=await vt(u,t,n);if(t.look==="handDrawn"){let c=v.svg(e),f=I(t,{}),y=e.select(".basic.label-container > path:nth-child(2)"),m=y.node();if(!m)return e;let d=null;if(m instanceof SVGGraphicsElement)d=m.getBBox();else return e;return e.insert(()=>c.line(d.x,d.y,d.x+d.width,d.y,f),".basic.label-container g.label"),e.insert(()=>c.line(d.x,d.y+d.height,d.x+d.width,d.y+d.height,f),".basic.label-container g.label"),y.remove(),e}let s=e.select(".basic.label-container"),a=(Number(s.attr("width"))||p)??0,g=(Number(s.attr("height"))||i)??0;return a>0&&g>0&&s.attr("stroke-dasharray",`${a} ${g}`),e}$(Bs,"datastore");async function Ms(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.look==="neo"?16:t.padding??0,r=t.look==="neo"?16:t.padding??0,{shapeSvg:p,bbox:i,label:n}=await O(u,t,Y(t)),e=i.width+l,s=i.height+r,a=s*.2,g=-e/2,c=-s/2-a/2,{cssStyles:f}=t,y=v.svg(p),m=I(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=[{x:g,y:c+a},{x:-g,y:c+a},{x:-g,y:-c},{x:g,y:-c},{x:g,y:c},{x:-g,y:c},{x:-g,y:c+a}],w=y.polygon(d.map(S=>[S.x,S.y]),m),x=p.insert(()=>w,":first-child");return x.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),n.attr("transform",`translate(${g+(t.padding??0)/2-(i.x-(i.left??0))}, ${c+a+(t.padding??0)/2-(i.y-(i.top??0))})`),T(t,x),t.intersect=function(S){return N.rect(t,S)},p}$(Ms,"dividedRectangle");async function Ns(u,t){let{labelStyles:o,nodeStyles:h}=W(t),l=t.look==="neo"?12:5;t.labelStyle=o;let r=t.padding??0,p=t.look==="neo"?16:r,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.width?t?.width/2:n.width/2)+(p??0),s=e-l,a,{cssStyles:g}=t;if(t.look==="handDrawn"){let c=v.svg(i),f=I(t,{roughness:.2,strokeWidth:2.5}),y=I(t,{roughness:.2,strokeWidth:1.5}),m=c.circle(0,0,e*2,f),d=c.circle(0,0,s*2,y);a=i.insert("g",":first-child"),a.attr("class",K(t.cssClasses)).attr("style",K(g)),a.node()?.appendChild(m),a.node()?.appendChild(d)}else{a=i.insert("g",":first-child");let c=a.insert("circle",":first-child"),f=a.insert("circle");a.attr("class","basic label-container").attr("style",h),c.attr("class","outer-circle").attr("style",h).attr("r",e).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",h).attr("r",s).attr("cx",0).attr("cy",0)}return T(t,a),t.intersect=function(c){return z.info("DoubleCircle intersect",t,e,c),N.circle(t,e,c)},i}$(Ns,"doublecircle");function Cs(u,t,{config:{themeVariables:o}}){let{labelStyles:h,nodeStyles:l}=W(t);t.label="",t.labelStyle=h;let r=u.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),p=7,{cssStyles:i}=t,n=v.svg(r),{nodeBorder:e}=o,s=I(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(s.roughness=0);let a=n.circle(0,0,p*2,s),g=r.insert(()=>a,":first-child");return g.selectAll("path").attr("style",`fill: ${e} !important;`),i&&i.length>0&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),l&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",l),T(t,g),t.intersect=function(c){return z.info("filledCircle intersect",t,{radius:p,point:c}),N.circle(t,p,c)},r}$(Cs,"filledCircle");var Ut=10,Kt=10;async function Rs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?l*2:l;(t.width||t.height)&&(t.height=t?.height??0,t.heightd,":first-child").attr("transform",`translate(${-s/2}, ${s/2})`).attr("class","outer-path");return c&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",c),h&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",h),t.width=e,t.height=s,T(t,w),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-s/2+(t.padding??0)/2+(i.y-(i.top??0))})`),t.intersect=function(x){return z.info("Triangle intersect",t,g,x),N.polygon(t,g,x)},p}$(Rs,"flippedTriangle");function As(u,t,{dir:o,config:{state:h,themeVariables:l}}){let{nodeStyles:r}=W(t);t.label="";let p=u.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,n=Math.max(70,t?.width??0),e=Math.max(10,t?.height??0);o==="LR"&&(n=Math.max(10,t?.width??0),e=Math.max(70,t?.height??0));let s=-1*n/2,a=-1*e/2,g=v.svg(p),c=I(t,{stroke:l.lineColor,fill:l.lineColor});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");let f=g.rectangle(s,a,n,e,c),y=p.insert(()=>f,":first-child");i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),r&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",r),T(t,y);let m=h?.padding??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(d){return N.rect(t,d)},p}$(As,"forkJoin");async function Hs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=15,r=10,p=t.look==="neo"?16:t.padding??0,i=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-i*2,t.heightw,":first-child");return x.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",c),h&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",h),T(t,x),t.intersect=function(S){return z.info("Pill intersect",t,{radius:g,point:S}),N.polygon(t,m,S)},n}$(Hs,"halfRoundedRectangle");var ja=$((u,t,o,h,l)=>[`M${u+l},${t}`,`L${u+o-l},${t}`,`L${u+o},${t-h/2}`,`L${u+o-l},${t-h}`,`L${u+l},${t-h}`,`L${u},${t-h/2}`,"Z"].join(" "),"createHexagonPathD");async function Is(u,t){let{labelStyles:o,nodeStyles:h}=W(t),l=t.look==="neo"?3.5:4;t.labelStyle=o;let r=t.padding??0,p=70,i=32,n=t.look==="neo"?p:r,e=t.look==="neo"?i:r;if(t.width||t.height){let x=(t.height??0)/l;t.width=(t?.width??0)-2*x-e,t.height=(t.height??0)-n}let{shapeSvg:s,bbox:a}=await O(u,t,Y(t)),g=(t?.height?t?.height:a.height)+n,c=g/l,f=(t?.width?t?.width:a.width)+2*c+e,y=[{x:c,y:0},{x:f-c,y:0},{x:f,y:-g/2},{x:f-c,y:-g},{x:c,y:-g},{x:0,y:-g/2}],m,{cssStyles:d}=t;if(t.look==="handDrawn"){let w=v.svg(s),x=I(t,{}),S=ja(0,0,f,g,c),b=w.path(S,x);m=s.insert(()=>b,":first-child").attr("transform",`translate(${-f/2}, ${g/2})`),d&&m.attr("style",d)}else m=ht(s,f,g,y);return h&&m.attr("style",h),t.width=f,t.height=g,T(t,m),t.intersect=function(w){return N.polygon(t,y,w)},s}$(Is,"hexagon");async function Ls(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.label="",t.labelStyle=o;let{shapeSvg:l}=await O(u,t,Y(t)),r=Math.max(30,t?.width??0),p=Math.max(30,t?.height??0),{cssStyles:i}=t,n=v.svg(l),e=I(t,{});t.look!=="handDrawn"&&(e.roughness=0,e.fillStyle="solid");let s=[{x:0,y:0},{x:r,y:0},{x:0,y:p},{x:r,y:p}],a=G(s),g=n.path(a,e),c=l.insert(()=>g,":first-child");return c.attr("class","basic label-container outer-path"),i&&t.look!=="handDrawn"&&c.selectChildren("path").attr("style",i),h&&t.look!=="handDrawn"&&c.selectChildren("path").attr("style",h),c.attr("transform",`translate(${-r/2}, ${-p/2})`),T(t,c),t.intersect=function(f){return z.info("Pill intersect",t,{points:s}),N.polygon(t,s,f)},l}$(Ls,"hourglass");async function Ws(u,t,{config:{themeVariables:o,flowchart:h}}){let{labelStyles:l}=W(t);t.labelStyle=l;let r=t.assetHeight??48,p=t.assetWidth??48,i=Math.max(r,p),n=h?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:s,label:a}=await O(u,t,"icon-shape default"),g=t.pos==="t",c=i,f=i,{nodeBorder:y}=o,{stylesMap:m}=Bt(t),d=-f/2,w=-c/2,x=t.label?8:0,S=v.svg(e),b=I(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let k=S.rectangle(d,w,f,c,b),P=Math.max(f,s.width),D=c+s.height+x,B=S.rectangle(-P/2,-D/2,P,D,{...b,fill:"transparent",stroke:"none"}),M=e.insert(()=>k,":first-child"),C=e.insert(()=>B);if(t.icon){let X=e.append("g");X.html(`${await Mt(t.icon,{height:i,width:i,fallbackPrefix:""})}`);let R=X.node().getBBox(),L=R.width,H=R.height,A=R.x,E=R.y;X.attr("transform",`translate(${-L/2-A},${g?s.height/2+x/2-H/2-E:-s.height/2-x/2-H/2-E})`),X.attr("style",`color: ${m.get("stroke")??y};`)}return a.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${g?-D/2:D/2-s.height})`),M.attr("transform",`translate(0,${g?s.height/2+x/2:-s.height/2-x/2})`),T(t,C),t.intersect=function(X){if(z.info("iconSquare intersect",t,X),!t.label)return N.rect(t,X);let R=t.x??0,L=t.y??0,H=t.height??0,A=[];return g?A=[{x:R-s.width/2,y:L-H/2},{x:R+s.width/2,y:L-H/2},{x:R+s.width/2,y:L-H/2+s.height+x},{x:R+f/2,y:L-H/2+s.height+x},{x:R+f/2,y:L+H/2},{x:R-f/2,y:L+H/2},{x:R-f/2,y:L-H/2+s.height+x},{x:R-s.width/2,y:L-H/2+s.height+x}]:A=[{x:R-f/2,y:L-H/2},{x:R+f/2,y:L-H/2},{x:R+f/2,y:L-H/2+c},{x:R+s.width/2,y:L-H/2+c},{x:R+s.width/2/2,y:L+H/2},{x:R-s.width/2,y:L+H/2},{x:R-s.width/2,y:L-H/2+c},{x:R-f/2,y:L-H/2+c}],N.polygon(t,A,X)},e}$(Ws,"icon");async function Es(u,t,{config:{themeVariables:o,flowchart:h}}){let{labelStyles:l}=W(t);t.labelStyle=l;let r=t.assetHeight??48,p=t.assetWidth??48,i=Math.max(r,p),n=h?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:s,label:a}=await O(u,t,"icon-shape default"),g=20,c=t.label?8:0,f=t.pos==="t",{nodeBorder:y,mainBkg:m}=o,{stylesMap:d}=Bt(t),w=v.svg(e),x=I(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let S=d.get("fill");x.stroke=S??m;let b=e.append("g");t.icon&&b.html(`${await Mt(t.icon,{height:i,width:i,fallbackPrefix:""})}`);let k=b.node().getBBox(),P=k.width,D=k.height,B=k.x,M=k.y,C=Math.max(P,D)*Math.SQRT2+g*2,X=w.circle(0,0,C,x),R=Math.max(C,s.width),L=C+s.height+c,H=w.rectangle(-R/2,-L/2,R,L,{...x,fill:"transparent",stroke:"none"}),A=e.insert(()=>X,":first-child"),E=e.insert(()=>H);return b.attr("transform",`translate(${-P/2-B},${f?s.height/2+c/2-D/2-M:-s.height/2-c/2-D/2-M})`),b.attr("style",`color: ${d.get("stroke")??y};`),a.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${f?-L/2:L/2-s.height})`),A.attr("transform",`translate(0,${f?s.height/2+c/2:-s.height/2-c/2})`),T(t,E),t.intersect=function(_){return z.info("iconSquare intersect",t,_),N.rect(t,_)},e}$(Es,"iconCircle");async function Ts(u,t,{config:{themeVariables:o,flowchart:h}}){let{labelStyles:l}=W(t);t.labelStyle=l;let r=t.assetHeight??48,p=t.assetWidth??48,i=Math.max(r,p),n=h?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:s,halfPadding:a,label:g}=await O(u,t,"icon-shape default"),c=t.pos==="t",f=i+a*2,y=i+a*2,{nodeBorder:m,mainBkg:d}=o,{stylesMap:w}=Bt(t),x=-y/2,S=-f/2,b=t.label?8:0,k=v.svg(e),P=I(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let D=w.get("fill");P.stroke=D??d;let B=k.path(yt(x,S,y,f,5),P),M=Math.max(y,s.width),C=f+s.height+b,X=k.rectangle(-M/2,-C/2,M,C,{...P,fill:"transparent",stroke:"none"}),R=e.insert(()=>B,":first-child").attr("class","icon-shape2"),L=e.insert(()=>X);if(t.icon){let H=e.append("g");H.html(`${await Mt(t.icon,{height:i,width:i,fallbackPrefix:""})}`);let A=H.node().getBBox(),E=A.width,_=A.height,F=A.x,q=A.y;H.attr("transform",`translate(${-E/2-F},${c?s.height/2+b/2-_/2-q:-s.height/2-b/2-_/2-q})`),H.attr("style",`color: ${w.get("stroke")??m};`)}return g.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-C/2:C/2-s.height})`),R.attr("transform",`translate(0,${c?s.height/2+b/2:-s.height/2-b/2})`),T(t,L),t.intersect=function(H){if(z.info("iconSquare intersect",t,H),!t.label)return N.rect(t,H);let A=t.x??0,E=t.y??0,_=t.height??0,F=[];return c?F=[{x:A-s.width/2,y:E-_/2},{x:A+s.width/2,y:E-_/2},{x:A+s.width/2,y:E-_/2+s.height+b},{x:A+y/2,y:E-_/2+s.height+b},{x:A+y/2,y:E+_/2},{x:A-y/2,y:E+_/2},{x:A-y/2,y:E-_/2+s.height+b},{x:A-s.width/2,y:E-_/2+s.height+b}]:F=[{x:A-y/2,y:E-_/2},{x:A+y/2,y:E-_/2},{x:A+y/2,y:E-_/2+f},{x:A+s.width/2,y:E-_/2+f},{x:A+s.width/2/2,y:E+_/2},{x:A-s.width/2,y:E+_/2},{x:A-s.width/2,y:E-_/2+f},{x:A-y/2,y:E-_/2+f}],N.polygon(t,F,H)},e}$(Ts,"iconRounded");async function Xs(u,t,{config:{themeVariables:o,flowchart:h}}){let{labelStyles:l}=W(t);t.labelStyle=l;let r=t.assetHeight??48,p=t.assetWidth??48,i=Math.max(r,p),n=h?.wrappingWidth;t.width=Math.max(i,n??0);let{shapeSvg:e,bbox:s,halfPadding:a,label:g}=await O(u,t,"icon-shape default"),c=t.pos==="t",f=i+a*2,y=i+a*2,{nodeBorder:m,mainBkg:d}=o,{stylesMap:w}=Bt(t),x=-y/2,S=-f/2,b=t.label?8:0,k=v.svg(e),P=I(t,{});t.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let D=w.get("fill");P.stroke=D??d;let B=k.path(yt(x,S,y,f,.1),P),M=Math.max(y,s.width),C=f+s.height+b,X=k.rectangle(-M/2,-C/2,M,C,{...P,fill:"transparent",stroke:"none"}),R=e.insert(()=>B,":first-child"),L=e.insert(()=>X);if(t.icon){let H=e.append("g");H.html(`${await Mt(t.icon,{height:i,width:i,fallbackPrefix:""})}`);let A=H.node().getBBox(),E=A.width,_=A.height,F=A.x,q=A.y;H.attr("transform",`translate(${-E/2-F},${c?s.height/2+b/2-_/2-q:-s.height/2-b/2-_/2-q})`),H.attr("style",`color: ${w.get("stroke")??m};`)}return g.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-C/2:C/2-s.height})`),R.attr("transform",`translate(0,${c?s.height/2+b/2:-s.height/2-b/2})`),T(t,L),t.intersect=function(H){if(z.info("iconSquare intersect",t,H),!t.label)return N.rect(t,H);let A=t.x??0,E=t.y??0,_=t.height??0,F=[];return c?F=[{x:A-s.width/2,y:E-_/2},{x:A+s.width/2,y:E-_/2},{x:A+s.width/2,y:E-_/2+s.height+b},{x:A+y/2,y:E-_/2+s.height+b},{x:A+y/2,y:E+_/2},{x:A-y/2,y:E+_/2},{x:A-y/2,y:E-_/2+s.height+b},{x:A-s.width/2,y:E-_/2+s.height+b}]:F=[{x:A-y/2,y:E-_/2},{x:A+y/2,y:E-_/2},{x:A+y/2,y:E-_/2+f},{x:A+s.width/2,y:E-_/2+f},{x:A+s.width/2/2,y:E+_/2},{x:A-s.width/2,y:E+_/2},{x:A-s.width/2,y:E-_/2+f},{x:A-y/2,y:E-_/2+f}],N.polygon(t,F,H)},e}$(Xs,"iconSquare");async function _s(u,t,{config:{flowchart:o}}){let h=new Image;h.src=t?.img??"",await h.decode();let l=Number(h.naturalWidth.toString().replace("px","")),r=Number(h.naturalHeight.toString().replace("px",""));t.imageAspectRatio=l/r;let{labelStyles:p}=W(t);t.labelStyle=p;let i=o?.wrappingWidth;t.defaultWidth=o?.wrappingWidth;let n=Math.max(t.label?i??0:0,t?.assetWidth??l),e=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:n,s=t.constraint==="on"?e/t.imageAspectRatio:t?.assetHeight??r;t.width=Math.max(e,i??0);let{shapeSvg:a,bbox:g,label:c}=await O(u,t,"image-shape default"),f=t.pos==="t",y=-e/2,m=-s/2,d=t.label?8:0,w=v.svg(a),x=I(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let S=w.rectangle(y,m,e,s,x),b=Math.max(e,g.width),k=s+g.height+d,P=w.rectangle(-b/2,-k/2,b,k,{...x,fill:"none",stroke:"none"}),D=a.insert(()=>S,":first-child"),B=a.insert(()=>P);if(t.img){let M=a.append("image");M.attr("href",t.img),M.attr("width",e),M.attr("height",s),M.attr("preserveAspectRatio","none"),M.attr("transform",`translate(${-e/2},${f?k/2-s:-k/2})`)}return c.attr("transform",`translate(${-g.width/2-(g.x-(g.left??0))},${f?-s/2-g.height/2-d/2:s/2-g.height/2+d/2})`),D.attr("transform",`translate(0,${f?g.height/2+d/2:-g.height/2-d/2})`),T(t,B),t.intersect=function(M){if(z.info("iconSquare intersect",t,M),!t.label)return N.rect(t,M);let C=t.x??0,X=t.y??0,R=t.height??0,L=[];return f?L=[{x:C-g.width/2,y:X-R/2},{x:C+g.width/2,y:X-R/2},{x:C+g.width/2,y:X-R/2+g.height+d},{x:C+e/2,y:X-R/2+g.height+d},{x:C+e/2,y:X+R/2},{x:C-e/2,y:X+R/2},{x:C-e/2,y:X-R/2+g.height+d},{x:C-g.width/2,y:X-R/2+g.height+d}]:L=[{x:C-e/2,y:X-R/2},{x:C+e/2,y:X-R/2},{x:C+e/2,y:X-R/2+s},{x:C+g.width/2,y:X-R/2+s},{x:C+g.width/2/2,y:X+R/2},{x:C-g.width/2,y:X+R/2},{x:C-g.width/2,y:X-R/2+s},{x:C-e/2,y:X-R/2+s}],N.polygon(t,L,M)},a}$(_s,"imageSquare");async function Ys(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=l,p=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=Math.max(n.width+(p??0)*2,t?.width??0),s=Math.max(n.height+(r??0)*2,t?.height??0),a=[{x:0,y:0},{x:e,y:0},{x:e+3*s/6,y:-s},{x:-3*s/6,y:-s}],g,{cssStyles:c}=t;if(t.look==="handDrawn"){let f=v.svg(i),y=I(t,{}),m=G(a),d=f.path(m,y);g=i.insert(()=>d,":first-child").attr("transform",`translate(${-e/2}, ${s/2})`),c&&g.attr("style",c)}else g=ht(i,e,s,a);return h&&g.attr("style",h),t.width=e,t.height=s,T(t,g),t.intersect=function(f){return N.polygon(t,a,f)},i}$(Ys,"inv_trapezoid");async function Os(u,t){let{shapeSvg:o,bbox:h,label:l}=await O(u,t,"label"),r=o.insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),o.attr("class","label edgeLabel"),l.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),T(t,r),t.intersect=function(n){return N.rect(t,n)},o}$(Os,"labelRect");async function js(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=l,p=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.height??n.height)+r,s=(t?.width??n.width)+p,a=[{x:0,y:0},{x:s+3*e/6,y:0},{x:s,y:-e},{x:-(3*e)/6,y:-e}],g,{cssStyles:c}=t;if(t.look==="handDrawn"){let f=v.svg(i),y=I(t,{}),m=G(a),d=f.path(m,y);g=i.insert(()=>d,":first-child").attr("transform",`translate(${-s/2}, ${e/2})`),c&&g.attr("style",c)}else g=ht(i,s,e,a);return h&&g.attr("style",h),t.width=s,t.height=e,T(t,g),t.intersect=function(f){return N.polygon(t,a,f)},i}$(js,"lean_left");async function Gs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=l,p=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.height??n.height)+r,s=(t?.width??n.width)+p,a=[{x:-3*e/6,y:0},{x:s,y:0},{x:s+3*e/6,y:-e},{x:0,y:-e}],g,{cssStyles:c}=t;if(t.look==="handDrawn"){let f=v.svg(i),y=I(t,{}),m=G(a),d=f.path(m,y);g=i.insert(()=>d,":first-child").attr("transform",`translate(${-s/2}, ${e/2})`),c&&g.attr("style",c)}else g=ht(i,s,e,a);return h&&g.attr("style",h),t.width=s,t.height=e,T(t,g),t.intersect=function(f){return N.polygon(t,a,f)},i}$(Gs,"lean_right");function Fs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.label="",t.labelStyle=o;let l=u.insert("g").attr("class",Y(t)).attr("id",t.domId??t.id),{cssStyles:r}=t,p=Math.max(35,t?.width??0),i=Math.max(35,t?.height??0),n=7,e=[{x:p,y:0},{x:0,y:i+n/2},{x:p-2*n,y:i+n/2},{x:0,y:2*i},{x:p,y:i-n/2},{x:2*n,y:i-n/2}],s=v.svg(l),a=I(t,{});t.look!=="handDrawn"&&(a.roughness=0,a.fillStyle="solid");let g=G(e),c=s.path(g,a),f=l.insert(()=>c,":first-child");return f.attr("class","outer-path"),r&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",r),h&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",h),f.attr("transform",`translate(-${p/2},${-i})`),T(t,f),t.intersect=function(y){return z.info("lightningBolt intersect",t,y),N.polygon(t,e,y)},l}$(Fs,"lightningBolt");var Ga=$((u,t,o,h,l,r,p)=>[`M${u},${t+r}`,`a${l},${r} 0,0,0 ${o},0`,`a${l},${r} 0,0,0 ${-o},0`,`l0,${h}`,`a${l},${r} 0,0,0 ${o},0`,`l0,${-h}`,`M${u},${t+r+p}`,`a${l},${r} 0,0,0 ${o},0`].join(" "),"createCylinderPathD"),Fa=$((u,t,o,h,l,r,p)=>[`M${u},${t+r}`,`M${u+o},${t+r}`,`a${l},${r} 0,0,0 ${-o},0`,`l0,${h}`,`a${l},${r} 0,0,0 ${o},0`,`l0,${-h}`,`M${u},${t+r+p}`,`a${l},${r} 0,0,0 ${o},0`].join(" "),"createOuterCylinderPathD"),qa=$((u,t,o,h,l,r)=>[`M${u-o/2},${-h/2}`,`a${l},${r} 0,0,0 ${o},0`].join(" "),"createInnerCylinderPathD"),ts=10,ss=10;async function qs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?24:l;if(t.width||t.height){let d=t.width??0;t.width=(t.width??0)-r,t.widthk,":first-child").attr("class","line"),y=i.insert(()=>b,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{let d=Ga(0,0,s,c,a,g,f);y=i.insert("path",":first-child").attr("d",d).attr("class","basic label-container outer-path").attr("style",K(m)).attr("style",h)}return y.attr("label-offset-y",g),y.attr("transform",`translate(${-s/2}, ${-(c/2+g)})`),T(t,y),e.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)+g-(n.y-(n.top??0))})`),t.intersect=function(d){let w=N.rect(t,d),x=w.x-(t.x??0);if(a!=0&&(Math.abs(x)<(t.width??0)/2||Math.abs(x)==(t.width??0)/2&&Math.abs(w.y-(t.y??0))>(t.height??0)/2-g)){let S=g*g*(1-x*x/(a*a));S>0&&(S=Math.sqrt(S)),S=g-S,d.y-(t.y??0)>0&&(S=-S),w.y+=S}return w},i}$(qs,"linedCylinder");async function zs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l;if(t.width||t.height){let S=t.width;t.width=(S??0)*10/11-r*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-p*2,t.height<10&&(t.height=10)}let{shapeSvg:i,bbox:n,label:e}=await O(u,t,Y(t)),s=(t?.width?t?.width:n.width)+(r??0)*2,a=(t?.height?t?.height:n.height)+(p??0)*2,g=t.look==="neo"?a/4:a/8,c=a+g,{cssStyles:f}=t,y=v.svg(i),m=I(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=[{x:-s/2-s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:c/2},...ft(-s/2-s/2*.1,c/2,s/2+s/2*.1,c/2,g,.8),{x:s/2+s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:-c/2},{x:-s/2,y:-c/2},{x:-s/2,y:c/2*1.1},{x:-s/2,y:-c/2}],w=y.polygon(d.map(S=>[S.x,S.y]),m),x=i.insert(()=>w,":first-child");return x.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),x.attr("transform",`translate(0,${-g/2})`),e.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(n.x-(n.left??0))},${-a/2+(t.padding??0)-g/2-(n.y-(n.top??0))})`),T(t,x),t.intersect=function(S){return N.polygon(t,d,S)},i}$(zs,"linedWaveEdgedRect");async function Vs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l,i=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-r*2-2*i,10),t.height=Math.max((t?.height??0)-p*2-2*i,10));let{shapeSvg:n,bbox:e,label:s}=await O(u,t,Y(t)),a=(t?.width?t?.width:e.width)+r*2+2*i,g=(t?.height?t?.height:e.height)+p*2+2*i,c=a-2*i,f=g-2*i,y=-c/2,m=-f/2,{cssStyles:d}=t,w=v.svg(n),x=I(t,{}),S=[{x:y-i,y:m+i},{x:y-i,y:m+f+i},{x:y+c-i,y:m+f+i},{x:y+c-i,y:m+f},{x:y+c,y:m+f},{x:y+c,y:m+f-i},{x:y+c+i,y:m+f-i},{x:y+c+i,y:m-i},{x:y+i,y:m-i},{x:y+i,y:m},{x:y,y:m},{x:y,y:m+i}],b=[{x:y,y:m+i},{x:y+c-i,y:m+i},{x:y+c-i,y:m+f},{x:y+c,y:m+f},{x:y+c,y:m},{x:y,y:m}];t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=G(S),P=w.path(k,x),D=G(b),B=w.path(D,x);t.look!=="handDrawn"&&(P=Yt(P),B=Yt(B));let M=n.insert("g",":first-child");return M.insert(()=>P),M.insert(()=>B),M.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",d),h&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",h),s.attr("transform",`translate(${-(e.width/2)-i-(e.x-(e.left??0))}, ${-(e.height/2)+i-(e.y-(e.top??0))})`),T(t,M),t.intersect=function(C){return N.polygon(t,S,C)},n}$(Vs,"multiRect");async function Zs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let{shapeSvg:l,bbox:r,label:p}=await O(u,t,Y(t)),i=t.padding??0,n=t.look==="neo"?16:i,e=t.look==="neo"?12:i,s=!0;(t.width||t.height)&&(s=!1,t.width=(t?.width??0)-n*2,t.height=(t?.height??0)-e*3);let a=Math.max(r.width,t?.width??0)+n*2,g=Math.max(r.height,t?.height??0)+e*3,c=t.look==="neo"?g/4:g/8,f=g+(s?c/2:-c/2),y=-a/2,m=-f/2,d=10,{cssStyles:w}=t,x=ft(y-d,m+f+d,y+a-d,m+f+d,c,.8),S=x?.[x.length-1],b=[{x:y-d,y:m+d},{x:y-d,y:m+f+d},...x,{x:y+a-d,y:S.y-d},{x:y+a,y:S.y-d},{x:y+a,y:S.y-2*d},{x:y+a+d,y:S.y-2*d},{x:y+a+d,y:m-d},{x:y+d,y:m-d},{x:y+d,y:m},{x:y,y:m},{x:y,y:m+d}],k=[{x:y,y:m+d},{x:y+a-d,y:m+d},{x:y+a-d,y:S.y-d},{x:y+a,y:S.y-d},{x:y+a,y:m},{x:y,y:m}],P=v.svg(l),D=I(t,{});t.look!=="handDrawn"&&(D.roughness=0,D.fillStyle="solid");let B=G(b),M=P.path(B,D),C=G(k),X=P.path(C,D),R=l.insert(()=>M,":first-child");return R.insert(()=>X),R.attr("class","basic label-container outer-path"),w&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",w),h&&t.look!=="handDrawn"&&R.selectAll("path").attr("style",h),R.attr("transform",`translate(0,${-c/2})`),p.attr("transform",`translate(${-(r.width/2)-d-(r.x-(r.left??0))}, ${-(r.height/2)+d-c/2-(r.y-(r.top??0))})`),T(t,R),t.intersect=function(L){return N.polygon(t,b,L)},l}$(Zs,"multiWaveEdgedRectangle");async function Js(u,t,{config:{themeVariables:o}}){let{labelStyles:h,nodeStyles:l}=W(t);t.labelStyle=h,t.useHtmlLabels||at(wt())||(t.centerLabel=!0);let{shapeSvg:p,bbox:i,label:n}=await O(u,t,Y(t)),e=Math.max(i.width+(t.padding??0)*2,t?.width??0),s=Math.max(i.height+(t.padding??0)*2,t?.height??0),a=-e/2,g=-s/2,{cssStyles:c}=t,f=v.svg(p),y=I(t,{fill:o.noteBkgColor,stroke:o.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let m=f.rectangle(a,g,e,s,y),d=p.insert(()=>m,":first-child");return d.attr("class","basic label-container outer-path"),n.attr("class","label noteLabel"),c&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",c),l&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",l),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),T(t,d),t.intersect=function(w){return N.rect(t,w)},p}$(Js,"note");var za=$((u,t,o)=>[`M${u+o/2},${t}`,`L${u+o},${t-o/2}`,`L${u+o/2},${t-o}`,`L${u},${t-o/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Qs(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let{shapeSvg:l,bbox:r}=await O(u,t,Y(t)),p=r.width+(t.padding??0),i=r.height+(t.padding??0),n=p+i,e=.5,s=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],a,{cssStyles:g}=t;if(t.look==="handDrawn"){let c=v.svg(l),f=I(t,{}),y=za(0,0,n),m=c.path(y,f);a=l.insert(()=>m,":first-child").attr("transform",`translate(${-n/2+e}, ${n/2})`),g&&a.attr("style",g)}else a=ht(l,n,n,s),a.attr("transform",`translate(${-n/2+e}, ${n/2})`);return h&&a.attr("style",h),T(t,a),t.calcIntersect=function(c,f){let y=c.width,m=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],d=N.polygon(c,m,f);return{x:d.x-.5,y:d.y-.5}},t.intersect=function(c){return this.calcIntersect(t,c)},l}$(Qs,"question");async function Us(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?21:l??0,p=t.look==="neo"?12:l??0,{shapeSvg:i,bbox:n,label:e}=await O(u,t,Y(t)),s=(t?.width??n.width)+(t.look==="neo"?r*2:r),a=(t?.height??n.height)+(t.look==="neo"?p*2:p),g=-s/2,c=-a/2,f=c/2,y=[{x:g+f,y:c},{x:g,y:0},{x:g+f,y:-c},{x:-g,y:-c},{x:-g,y:c}],{cssStyles:m}=t,d=v.svg(i),w=I(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let x=G(y),S=d.path(x,w),b=i.insert(()=>S,":first-child");return b.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",m),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),b.attr("transform",`translate(${-f/2},0)`),e.attr("transform",`translate(${-f/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),T(t,b),t.intersect=function(k){return N.polygon(t,y,k)},i}$(Us,"rect_left_inv_arrow");async function Ks(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l;t.cssClasses?l="node "+t.cssClasses:l="node default";let r=u.insert("g").attr("class",l).attr("id",t.domId||t.id),p=r.insert("g"),i=r.insert("g").attr("class","label").attr("style",h),n=t.description,e=t.label,s=await At(i,e,t.labelStyle,!0,!0),a={width:0,height:0};if(at(U())){let D=s.children[0],B=Z(s);a=D.getBoundingClientRect(),B.attr("width",a.width),B.attr("height",a.height)}z.info("Text 2",n);let g=n||[],c=s.getBBox(),f=await At(i,Array.isArray(g)?g.join("
"):g,t.labelStyle,!0,!0),y=f.children[0],m=Z(f);a=y.getBoundingClientRect(),m.attr("width",a.width),m.attr("height",a.height);let d=(t.padding||0)/2;Z(f).attr("transform","translate( "+(a.width>c.width?0:(c.width-a.width)/2)+", "+(c.height+d+5)+")"),Z(s).attr("transform","translate( "+(a.width(z.debug("Rough node insert CXC",M),C),":first-child"),k=r.insert(()=>(z.debug("Rough node insert CXC",M),M),":first-child")}else k=p.insert("rect",":first-child"),P=p.insert("line"),k.attr("class","outer title-state").attr("style",h).attr("x",-a.width/2-d).attr("y",-a.height/2-d).attr("width",a.width+(t.padding||0)).attr("height",a.height+(t.padding||0)),P.attr("class","divider").attr("x1",-a.width/2-d).attr("x2",a.width/2+d).attr("y1",-a.height/2-d+c.height+d).attr("y2",-a.height/2-d+c.height+d);return T(t,k),t.intersect=function(D){return N.rect(t,D)},r}$(Ks,"rectWithTitle");async function ta(u,t,{config:{themeVariables:o}}){let h=o?.radius??5,l={rx:h,ry:h,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return vt(u,t,l)}$(ta,"roundedRect");var dt=8;async function sa(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.look==="neo"?16:t.padding??0,r=t.look==="neo"?12:t.padding??0,{shapeSvg:p,bbox:i,label:n}=await O(u,t,Y(t)),e=(t?.width??i.width)+l*2+(t.look==="neo"?dt:dt*2),s=(t?.height??i.height)+r*2,a=e-dt,g=s,c=dt-e/2,f=-s/2,{cssStyles:y}=t,m=v.svg(p),d=I(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let w=[{x:c,y:f},{x:c+a,y:f},{x:c+a,y:f+g},{x:c-dt,y:f+g},{x:c-dt,y:f},{x:c,y:f},{x:c,y:f+g}],x=m.polygon(w.map(b=>[b.x,b.y]),d),S=p.insert(()=>x,":first-child");return S.attr("class","basic label-container outer-path").attr("style",K(y)),h&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",h),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",h),n.attr("transform",`translate(${dt/2-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),T(t,S),t.intersect=function(b){return N.rect(t,b)},p}$(sa,"shadedProcess");async function aa(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-r*2,10),t.height=Math.max((t?.height??0)/1.5-p*2,10));let{shapeSvg:i,bbox:n,label:e}=await O(u,t,Y(t)),s=(t?.width?t?.width:n.width)+r*2,a=((t?.height?t?.height:n.height)+p*2)*1.5,g=s,c=a/1.5,f=-g/2,y=-c/2,{cssStyles:m}=t,d=v.svg(i),w=I(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let x=[{x:f,y},{x:f,y:y+c},{x:f+g,y:y+c},{x:f+g,y:y-c/2}],S=G(x),b=d.path(S,w),k=i.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),h&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",h),k.attr("transform",`translate(0, ${c/4})`),e.attr("transform",`translate(${-g/2+(t.padding??0)-(n.x-(n.left??0))}, ${-c/4+(t.padding??0)-(n.y-(n.top??0))})`),T(t,k),t.intersect=function(P){return N.polygon(t,x,P)},i}$(aa,"slopedRect");async function ea(u,t){let o=t.padding??0,h=t.look==="neo"?16:o*2,l=t.look==="neo"?12:o,r={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??h,labelPaddingY:l};return vt(u,t,r)}$(ea,"squareRect");async function ia(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?20:l,p=t.look==="neo"?12:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=n.height+(t.look==="neo"?p*2:p),s=n.width+e/4+(t.look==="neo"?r*2:r),a=e/2,{cssStyles:g}=t,c=v.svg(i),f=I(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let y=[{x:-s/2+a,y:-e/2},{x:s/2-a,y:-e/2},...Ct(-s/2+a,0,a,50,90,270),{x:s/2-a,y:e/2},...Ct(s/2-a,0,a,50,270,450)],m=G(y),d=c.path(m,f),w=i.insert(()=>d,":first-child");return w.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",g),h&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",h),T(t,w),t.intersect=function(x){return N.polygon(t,y,x)},i}$(ia,"stadium");async function ra(u,t){let o={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return vt(u,t,o)}$(ra,"state");function la(u,t,{config:{themeVariables:o}}){let{labelStyles:h,nodeStyles:l}=W(t);t.labelStyle=h;let{cssStyles:r}=t,{lineColor:p,stateBorder:i,nodeBorder:n,nodeShadow:e}=o;(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);let s=u.insert("g").attr("class","node default").attr("id",t.domId??t.id),a=v.svg(s),g=I(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let c=a.circle(0,0,t.width,{...g,stroke:p,strokeWidth:2}),f=i??n,y=(t.width??0)*5/14,m=a.circle(0,0,y,{...g,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),d=s.insert(()=>c,":first-child");if(d.insert(()=>m),t.look!=="handDrawn"&&d.attr("class","outer-path"),r&&d.selectAll("path").attr("style",r),l&&d.selectAll("path").attr("style",l),t.width<25&&e&&t.look!=="handDrawn"){let w=u.node()?.ownerSVGElement?.id??"",x=w?`${w}-drop-shadow-small`:"drop-shadow-small";d.attr("style",`filter:url(#${x})`)}return T(t,d),t.intersect=function(w){return N.circle(t,(t.width??0)/2,w)},s}$(la,"stateEnd");function na(u,t,{config:{themeVariables:o}}){let{lineColor:h,nodeShadow:l}=o;(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);let r=u.insert("g").attr("class","node default").attr("id",t.domId||t.id),p;if(t.look==="handDrawn"){let n=v.svg(r).circle(0,0,t.width,Zt(h));p=r.insert(()=>n),p.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else p=r.insert("circle",":first-child"),p.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&l&&t.look!=="handDrawn"){let i=u.node()?.ownerSVGElement?.id??"",n=i?`${i}-drop-shadow-small`:"drop-shadow-small";p.attr("style",`filter:url(#${n})`)}return T(t,p),t.intersect=function(i){return N.circle(t,(t.width??7)/2,i)},r}$(na,"stateStart");var xt=8;async function ca(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t?.padding??8,r=t.look==="neo"?28:l,p=t.look==="neo"?12:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.width??n.width)+2*xt+r,s=(t?.height??n.height)+p,a=e-2*xt,g=s,c=-e/2,f=-s/2,y=[{x:0,y:0},{x:a,y:0},{x:a,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if(t.look==="handDrawn"){let m=v.svg(i),d=I(t,{}),w=m.rectangle(c,f,a+16,g,d),x=m.line(c+xt,f,c+xt,f+g,d),S=m.line(c+xt+a,f,c+xt+a,f+g,d);i.insert(()=>x,":first-child"),i.insert(()=>S,":first-child");let b=i.insert(()=>w,":first-child"),{cssStyles:k}=t;b.attr("class","basic label-container").attr("style",K(k)),T(t,b)}else{let m=ht(i,a,g,y);h&&m.attr("style",h),T(t,m)}return t.intersect=function(m){return N.polygon(t,y,m)},i}$(ca,"subroutine");var _t=.2;async function oa(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-p*2,10),t.width=Math.max((t?.width??0)-r*2-_t*(t.height+p*2),10));let{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.height?t?.height:n.height)+p*2,s=_t*e,a=_t*e,c=(t?.width?t?.width:n.width)+r*2+s-s,f=e,y=-c/2,m=-f/2,{cssStyles:d}=t,w=v.svg(i),x=I(t,{}),S=[{x:y-s/2,y:m},{x:y+c+s/2,y:m},{x:y+c+s/2,y:m+f},{x:y-s/2,y:m+f}],b=[{x:y+c-s/2,y:m+f},{x:y+c+s/2,y:m+f},{x:y+c+s/2,y:m+f-a}];t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=G(S),P=w.path(k,x),D=G(b),B=w.path(D,{...x,fillStyle:"solid"}),M=i.insert(()=>B,":first-child");return M.insert(()=>P,":first-child"),M.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",d),h&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",h),T(t,M),t.intersect=function(C){return N.polygon(t,S,C)},i}$(oa,"taggedRect");async function ha(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let{shapeSvg:l,bbox:r,label:p}=await O(u,t,Y(t)),i=Math.max(r.width+(t.padding??0)*2,t?.width??0),n=Math.max(r.height+(t.padding??0)*2,t?.height??0),e=n/8,s=.2*i,a=.2*n,g=n+e,{cssStyles:c}=t,f=v.svg(l),y=I(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let m=[{x:-i/2-i/2*.1,y:g/2},...ft(-i/2-i/2*.1,g/2,i/2+i/2*.1,g/2,e,.8),{x:i/2+i/2*.1,y:-g/2},{x:-i/2-i/2*.1,y:-g/2}],d=-i/2+i/2*.1,w=-g/2-a*.4,x=[{x:d+i-s,y:(w+n)*1.3},{x:d+i,y:w+n-a},{x:d+i,y:(w+n)*.9},...ft(d+i,(w+n)*1.25,d+i-s,(w+n)*1.3,-n*.02,.5)],S=G(m),b=f.path(S,y),k=G(x),P=f.path(k,{...y,fillStyle:"solid"}),D=l.insert(()=>P,":first-child");return D.insert(()=>b,":first-child"),D.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",c),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),D.attr("transform",`translate(0,${-e/2})`),p.attr("transform",`translate(${-i/2+(t.padding??0)-(r.x-(r.left??0))},${-n/2+(t.padding??0)-e/2-(r.y-(r.top??0))})`),T(t,D),t.intersect=function(B){return N.polygon(t,m,B)},l}$(ha,"taggedWaveEdgedRectangle");async function ga(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let{shapeSvg:l,bbox:r}=await O(u,t,Y(t)),p=Math.max(r.width+(t.padding??0),t?.width||0),i=Math.max(r.height+(t.padding??0),t?.height||0),n=-p/2,e=-i/2,s=l.insert("rect",":first-child");return s.attr("class","text").attr("style",h).attr("rx",0).attr("ry",0).attr("x",n).attr("y",e).attr("width",p).attr("height",i),T(t,s),t.intersect=function(a){return N.rect(t,a)},l}$(ga,"text");var Va=$((u,t,o,h,l,r)=>`M${u},${t} + a${l},${r} 0,0,1 0,${-h} + l${o},0 + a${l},${r} 0,0,1 0,${h} + M${o},${-h} + a${l},${r} 0,0,0 0,${h} + l${-o},0`,"createCylinderPathD"),Za=$((u,t,o,h,l,r)=>[`M${u},${t}`,`M${u+o},${t}`,`a${l},${r} 0,0,0 0,${-h}`,`l${-o},0`,`a${l},${r} 0,0,0 0,${h}`,`l${o},0`].join(" "),"createOuterCylinderPathD"),Ja=$((u,t,o,h,l,r)=>[`M${u+o/2},${-h/2}`,`a${l},${r} 0,0,0 0,${h}`].join(" "),"createInnerCylinderPathD"),as=5,es=10;async function fa(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?12:l/2;if(t.width||t.height){let y=t.height??0;t.height=(t.height??0)-r,t.heightx,":first-child"),f=p.insert(()=>w,":first-child"),f.attr("class","basic label-container"),c&&f.attr("style",c)}else{let y=Va(0,0,g,e,a,s);f=p.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",K(c)).attr("style",h),f.attr("class","basic label-container outer-path"),c&&f.selectAll("path").attr("style",c),h&&f.selectAll("path").attr("style",h)}return f.attr("label-offset-x",a),f.attr("transform",`translate(${-g/2}, ${e/2} )`),n.attr("transform",`translate(${-(i.width/2)-a-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),T(t,f),t.intersect=function(y){let m=N.rect(t,y),d=m.y-(t.y??0);if(s!=0&&(Math.abs(d)<(t.height??0)/2||Math.abs(d)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-a)){let w=a*a*(1-d*d/(s*s));w!=0&&(w=Math.sqrt(Math.abs(w))),w=a-w,y.x-(t.x??0)>0&&(w=-w),m.x+=w}return m},p}$(fa,"tiltedCylinder");async function ya(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=(t.look==="neo",l),p=t.look==="neo"?l*2:l,{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.height??n.height)+r,s=(t?.width??n.width)+p,a=[{x:-3*e/6,y:0},{x:s+3*e/6,y:0},{x:s,y:-e},{x:0,y:-e}],g,{cssStyles:c}=t;if(t.look==="handDrawn"){let f=v.svg(i),y=I(t,{}),m=G(a),d=f.path(m,y);g=i.insert(()=>d,":first-child").attr("transform",`translate(${-s/2}, ${e/2})`),c&&g.attr("style",c)}else g=ht(i,s,e,a);return h&&g.attr("style",h),t.width=s,t.height=e,T(t,g),t.intersect=function(f){return N.polygon(t,a,f)},i}$(ya,"trapezoid");async function pa(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l,i=15,n=5;(t.width||t.height)&&(t.height=(t.height??0)-p*2,t.heightw,":first-child");return x.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",c),h&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",h),T(t,x),t.intersect=function(S){return N.polygon(t,m,S)},e}$(pa,"trapezoidalPentagon");var is=10,rs=10;async function ua(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?l*2:l;(t.width||t.height)&&(t.width=((t?.width??0)-r)/2,t.widthw,":first-child").attr("transform",`translate(${-a/2}, ${a/2})`).attr("class","outer-path");return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),h&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",h),t.width=s,t.height=a,T(t,x),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${a/2-(i.height+(t.padding??0)/(e?2:1)-(i.y-(i.top??0)))})`),t.intersect=function(S){return z.info("Triangle intersect",t,c,S),N.polygon(t,c,S)},p}$(ua,"triangle");async function da(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?12:l,i=!0;(t.width||t.height)&&(i=!1,t.width=(t?.width??0)-r*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-p*2,t.height<10&&(t.height=10));let{shapeSvg:n,bbox:e,label:s}=await O(u,t,Y(t)),a=(t?.width?t?.width:e.width)+(r??0)*2,g=(t?.height?t?.height:e.height)+(p??0)*2,c=t.look==="neo"?g/4:g/8,f=g+(i?c:-c),{cssStyles:y}=t,d=14-a,w=d>0?d/2:0,x=v.svg(n),S=I(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let b=[{x:-a/2-w,y:f/2},...ft(-a/2-w,f/2,a/2+w,f/2,c,.8),{x:a/2+w,y:-f/2},{x:-a/2-w,y:-f/2}],k=G(b),P=x.path(k,S),D=n.insert(()=>P,":first-child");return D.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",y),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),D.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))},${-g/2+(t.padding??0)-c-(e.y-(e.top??0))})`),T(t,D),t.intersect=function(B){return N.polygon(t,b,B)},n}$(da,"waveEdgedRectangle");async function ma(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.padding??0,r=t.look==="neo"?16:l,p=t.look==="neo"?20:l;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-p-S*(20/9)),t.width=t.width-r*2}let{shapeSvg:i,bbox:n}=await O(u,t,Y(t)),e=(t?.width?t?.width:n.width)+r*2,s=(t?.height?t?.height:n.height)+p,a=s/8,g=s+a*2,{cssStyles:c}=t,f=v.svg(i),y=I(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let m=[{x:-e/2,y:g/2},...ft(-e/2,g/2,e/2,g/2,a,1),{x:e/2,y:-g/2},...ft(e/2,-g/2,-e/2,-g/2,a,-1)],d=G(m),w=f.path(d,y),x=i.insert(()=>w,":first-child");return x.attr("class","basic label-container"),c&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",c),h&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",h),T(t,x),t.intersect=function(S){return N.polygon(t,m,S)},i}$(ma,"waveRectangle");var J=10;async function wa(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t.look==="neo"?16:t.padding??0,r=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-l*2-J,10),t.height=Math.max((t?.height??0)-r*2-J,10));let{shapeSvg:p,bbox:i,label:n}=await O(u,t,Y(t)),e=(t?.width?t?.width:i.width)+l*2+J,s=(t?.height?t?.height:i.height)+r*2+J,a=e-J,g=s-J,c=-a/2,f=-g/2,{cssStyles:y}=t,m=v.svg(p),d=I(t,{}),w=[{x:c-J,y:f-J},{x:c-J,y:f+g},{x:c+a,y:f+g},{x:c+a,y:f-J}],x=`M${c-J},${f-J} L${c+a},${f-J} L${c+a},${f+g} L${c-J},${f+g} L${c-J},${f-J} + M${c-J},${f} L${c+a},${f} + M${c},${f-J} L${c},${f+g}`;t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");let S=m.path(x,d),b=p.insert(()=>S,":first-child");return b.attr("transform",`translate(${J/2}, ${J/2})`),b.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",y),h&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",h),n.attr("transform",`translate(${-(i.width/2)+J/2-(i.x-(i.left??0))}, ${-(i.height/2)+J/2-(i.y-(i.top??0))})`),T(t,b),t.intersect=function(k){return N.polygon(t,w,k)},p}$(wa,"windowPane");var ls=new Set(["redux-color","redux-dark-color"]),Qa=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Ft(u,t){let o=t;o.alias&&(t.label=o.alias);let{theme:h,themeVariables:l}=wt(),{rowEven:r,rowOdd:p,nodeBorder:i,borderColorArray:n}=l;if(t.look==="handDrawn"){let{themeVariables:j}=wt(),{background:V}=j,Q={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${V}`]};await Ft(u,Q)}let e=wt();t.useHtmlLabels=e.htmlLabels;let s=e.er?.diagramPadding??10,a=e.er?.entityPadding??6,{cssStyles:g}=t,{labelStyles:c,nodeStyles:f}=W(t);if(o.attributes.length===0&&t.label){let j={rx:0,ry:0,labelPaddingX:s,labelPaddingY:s*1.5,classes:""};Pt(t.label,e)+j.labelPaddingX*20){let j=d.width+s*2-(b+k+P+D);b+=j/C,k+=j/C,P>0&&(P+=j/C),D>0&&(D+=j/C)}let R=b+k+P+D,L=v.svg(m),H=I(t,{});t.look!=="handDrawn"&&(H.roughness=0,H.fillStyle="solid");let A=0;S.length>0&&(A=S.reduce((j,V)=>j+(V?.rowHeight??0),0));let E=Math.max(X.width+s*2,t?.width||0,R),_=Math.max((A??0)+d.height,t?.height||0),F=-E/2,q=-_/2;if(m.selectAll("g:not(:first-child)").each((j,V,Q)=>{let st=Z(Q[V]),pt=st.attr("transform"),gt=0,qt=0;if(pt){let It=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(pt);It&&(gt=parseFloat(It[1]),qt=parseFloat(It[2]),st.attr("class").includes("attribute-name")?gt+=b:st.attr("class").includes("attribute-keys")?gt+=b+k:st.attr("class").includes("attribute-comment")&&(gt+=b+k+P))}st.attr("transform",`translate(${F+s/2+gt}, ${qt+q+d.height+a/2})`)}),m.select(".name").attr("transform","translate("+-d.width/2+", "+(q+a/2)+")"),h!=null&&ls.has(h)){let j=o.colorIndex??0;m.attr("data-color-id",`color-${j%n.length}`)}let kt=L.rectangle(F,q,E,_,H),mt=m.insert(()=>kt,":first-child").attr("class","outer-path").attr("style",g.join(""));x.push(0);for(let[j,V]of S.entries()){let st=(j+1)%2===0&&V.yOffset!==0,pt=L.rectangle(F,d.height+q+V?.yOffset,E,V?.rowHeight,{...H,fill:st?r:p,stroke:i});m.insert(()=>pt,"g.label").attr("style",g.join("")).attr("class",`row-rect-${st?"even":"odd"}`)}let it=1e-4,et=St(F,d.height+q,E+F,d.height+q,it),lt=L.polygon(et.map(j=>[j.x,j.y]),H);if(m.insert(()=>lt).attr("class","divider"),et=St(b+F,d.height+q,b+F,_+q,it),lt=L.polygon(et.map(j=>[j.x,j.y]),H),m.insert(()=>lt).attr("class","divider"),B){let j=b+k+F;et=St(j,d.height+q,j,_+q,it),lt=L.polygon(et.map(V=>[V.x,V.y]),H),m.insert(()=>lt).attr("class","divider")}if(M){let j=b+k+P+F;et=St(j,d.height+q,j,_+q,it),lt=L.polygon(et.map(V=>[V.x,V.y]),H),m.insert(()=>lt).attr("class","divider")}for(let j of x){let V=d.height+q+j;et=St(F,V,E+F,V,it),lt=L.polygon(et.map(Q=>[Q.x,Q.y]),H),m.insert(()=>lt).attr("class","divider")}if(T(t,mt),f&&t.look!=="handDrawn")if(h!=null&&Qa.has(h))m.selectAll("path").attr("style",f);else{let V=f.split(";")?.filter(Q=>Q.includes("stroke"))?.map(Q=>`${Q}`).join("; ");m.selectAll("path").attr("style",V??""),m.selectAll(".row-rect-even path").attr("style",f)}return t.intersect=function(j){return N.rect(t,j)},m}$(Ft,"erBox");async function bt(u,t,o,h=0,l=0,r=[],p=""){let i=u.insert("g").attr("class",`label ${r.join(" ")}`).attr("transform",`translate(${h}, ${l})`).attr("style",p);t!==Wt(t)&&(t=Wt(t),t=t.replaceAll("<","<").replaceAll(">",">"));let n=i.node().appendChild(await nt(i,t,{width:Pt(t,o)+100,style:p,useHtmlLabels:o.htmlLabels},o));if(t.includes("<")||t.includes(">")){let s=n.children[0];for(s.textContent=s.textContent.replaceAll("<","<").replaceAll(">",">");s.childNodes[0];)s=s.childNodes[0],s.textContent=s.textContent.replaceAll("<","<").replaceAll(">",">")}let e=n.getBBox();if(ut(o.htmlLabels)){let s=n.children[0];s.style.textAlign="start";let a=Z(n);e=s.getBoundingClientRect(),a.attr("width",e.width),a.attr("height",e.height)}return e}$(bt,"addText");function St(u,t,o,h,l){return u===o?[{x:u-l/2,y:t},{x:u+l/2,y:t},{x:o+l/2,y:h},{x:o-l/2,y:h}]:[{x:u,y:t-l/2},{x:u,y:t+l/2},{x:o,y:h+l/2},{x:o,y:h-l/2}]}$(St,"lineToPolygon");async function xa(u,t,o,h,l=o.class.padding??12){let r=h?0:3,p=u.insert("g").attr("class",Y(t)).attr("id",t.domId||t.id),i=null,n=null,e=null,s=null,a=0,g=0,c=0;if(i=p.insert("g").attr("class","annotation-group text"),t.annotations.length>0){let w=t.annotations[0];await Nt(i,{text:`\xAB${w}\xBB`},0),a=i.node().getBBox().height}n=p.insert("g").attr("class","label-group text"),await Nt(n,t,0,["font-weight: bolder"]);let f=n.node().getBBox();g=f.height,e=p.insert("g").attr("class","members-group text");let y=0;for(let w of t.members){let x=await Nt(e,w,y,[w.parseClassifier()]);y+=x+r}c=e.node().getBBox().height,c<=0&&(c=l/2),s=p.insert("g").attr("class","methods-group text");let m=0;for(let w of t.methods){let x=await Nt(s,w,m,[w.parseClassifier()]);m+=x+r}let d=p.node().getBBox();if(i!==null){let w=i.node().getBBox();i.attr("transform",`translate(${-w.width/2})`)}return n.attr("transform",`translate(${-f.width/2}, ${a})`),d=p.node().getBBox(),e.attr("transform",`translate(0, ${a+g+l*2})`),d=p.node().getBBox(),s.attr("transform",`translate(0, ${a+g+(c?c+l*4:l*2)})`),d=p.node().getBBox(),{shapeSvg:p,bbox:d}}$(xa,"textHelper");async function Nt(u,t,o,h=[]){let l=u.insert("g").attr("class","label").attr("style",h.join("; ")),r=wt(),p="useHtmlLabels"in t?t.useHtmlLabels:ut(r.htmlLabels)??!0,i="";"text"in t?i=t.text:i=t.label,!p&&i.startsWith("\\")&&(i=i.substring(1)),zt(i)&&(p=!0);let n=await nt(l,Et(Dt(i)),{width:Pt(i,r)+50,classes:"markdown-node-label",useHtmlLabels:p},r),e,s=1;if(p){let a=n.children[0],g=Z(n);s=a.innerHTML.split("
").length,a.innerHTML.includes("")&&(s+=a.innerHTML.split("").length-1);let c=a.getElementsByTagName("img");if(c){let f=i.replace(/]*>/g,"").trim()==="";await Promise.all([...c].map(y=>new Promise(m=>{function d(){if(y.style.display="flex",y.style.flexDirection="column",f){let w=r.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,S=parseInt(w,10)*5+"px";y.style.minWidth=S,y.style.maxWidth=S}else y.style.width="100%";m(y)}$(d,"setupImage"),setTimeout(()=>{y.complete&&d()}),y.addEventListener("error",d),y.addEventListener("load",d)})))}e=a.getBoundingClientRect(),g.attr("width",e.width),g.attr("height",e.height)}else{h.includes("font-weight: bolder")&&Z(n).selectAll("tspan").attr("font-weight",""),s=n.children.length;let a=n.children[0];(n.textContent===""||n.textContent.includes(">"))&&(a.textContent=i[0]+i.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),i[1]===" "&&(a.textContent=a.textContent[0]+" "+a.textContent.substring(1))),a.textContent==="undefined"&&(a.textContent=""),e=n.getBBox()}return l.attr("transform","translate(0,"+(-e.height/(2*s)+o)+")"),e.height}$(Nt,"addText");async function ba(u,t){let o=U(),{themeVariables:h}=o,{useGradient:l}=h,r=o.class.padding??12,p=r,i=t.useHtmlLabels??ut(o.htmlLabels)??!0,n=t;n.annotations=n.annotations??[],n.members=n.members??[],n.methods=n.methods??[];let{shapeSvg:e,bbox:s}=await xa(u,t,o,i,p),{labelStyles:a,nodeStyles:g}=W(t);t.labelStyle=a,t.cssStyles=n.styles||"";let c=n.styles?.join(";")||g||"";t.cssStyles||(t.cssStyles=c.replaceAll("!important","").split(";"));let f=n.members.length===0&&n.methods.length===0&&!o.class?.hideEmptyMembersBox,y=v.svg(e),m=I(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let d=Math.max(t.width??0,s.width),w=Math.max(t.height??0,s.height),x=(t.height??0)>s.height;n.members.length===0&&n.methods.length===0?w+=p:n.members.length>0&&n.methods.length===0&&(w+=p*2);let S=-d/2,b=-w/2,k=f?r*2:n.members.length===0&&n.methods.length===0?-r:0;x&&(k=r*2);let P=y.rectangle(S-r,b-r-(f?r:n.members.length===0&&n.methods.length===0?-r/2:0),d+2*r,w+2*r+k,m),D=e.insert(()=>P,":first-child");D.attr("class","basic label-container outer-path");let B=D.node().getBBox(),M=e.select(".annotation-group").node().getBBox().height-(f?r/2:0)||0,C=e.select(".label-group").node().getBBox().height-(f?r/2:0)||0,X=e.select(".members-group").node().getBBox().height-(f?r/2:0)||0,R=(M+C+b+r-(b-r-(f?r:n.members.length===0&&n.methods.length===0?-r/2:0)))/2;if(e.selectAll(".text").each((L,H,A)=>{let E=Z(A[H]),_=E.attr("transform"),F=0;if(_){let it=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(_);it&&(F=parseFloat(it[2]))}let q=F+b+r-(f?r:n.members.length===0&&n.methods.length===0?-r/2:0);if(E.attr("class").includes("methods-group")){let mt=Math.max(X,p/2);x?q=Math.max(R,M+C+mt+b+p*2+r)+p*2:q=M+C+mt+b+p*4+r}n.members.length===0&&n.methods.length===0&&o.class?.hideEmptyMembersBox&&(n.annotations.length>0?q=F-p:q=F),i||(q-=4);let kt=S;(E.attr("class").includes("label-group")||E.attr("class").includes("annotation-group"))&&(kt=-E.node()?.getBBox().width/2||0,e.selectAll("text").each(function(mt,it,et){window.getComputedStyle(et[it]).textAnchor==="middle"&&(kt=0)})),E.attr("transform",`translate(${kt}, ${q})`)}),n.members.length>0||n.methods.length>0||f){let L=M+C+b+r,H=y.line(B.x,L,B.x+B.width,L+.001,m);e.insert(()=>H).attr("class",`divider${t.look==="neo"&&!l?" neo-line":""}`).attr("style",c)}if(f||n.members.length>0||n.methods.length>0){let L=M+C+X+b+p*2+r,H=y.line(B.x,x?Math.max(R,L):L,B.x+B.width,(x?Math.max(R,L):L)+.001,m);e.insert(()=>H).attr("class",`divider${t.look==="neo"&&!l?" neo-line":""}`).attr("style",c)}if(n.look!=="handDrawn"&&e.selectAll("path").attr("style",c),D.select(":nth-child(2)").attr("style",c),e.selectAll(".divider").select("path").attr("style",c),t.labelStyle?e.selectAll("span").attr("style",t.labelStyle):e.selectAll("span").attr("style",c),!i){let L=RegExp(/color\s*:\s*([^;]*)/),H=L.exec(c);if(H){let A=H[0].replace("color","fill");e.selectAll("tspan").attr("style",A)}else if(a){let A=L.exec(a);if(A){let E=A[0].replace("color","fill");e.selectAll("tspan").attr("style",E)}}}return T(t,D),t.intersect=function(L){return N.rect(t,L)},e}$(ba,"classBox");async function Sa(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let l=t,r=t,p=20,i=20,n="verifyMethod"in t,e=Y(t),{themeVariables:s}=U(),{borderColorArray:a,requirementEdgeLabelBackground:g}=s,c=u.insert("g").attr("class",e).attr("id",t.domId??t.id),f;n?f=await rt(c,`<<${l.type}>>`,0,t.labelStyle):f=await rt(c,"<<Element>>",0,t.labelStyle);let y=f,m=await rt(c,l.name,y,t.labelStyle+"; font-weight: bold;");if(y+=m+i,n){let B=await rt(c,`${l.requirementId?`ID: ${l.requirementId}`:""}`,y,t.labelStyle);y+=B;let M=await rt(c,`${l.text?`Text: ${l.text}`:""}`,y,t.labelStyle);y+=M;let C=await rt(c,`${l.risk?`Risk: ${l.risk}`:""}`,y,t.labelStyle);y+=C,await rt(c,`${l.verifyMethod?`Verification: ${l.verifyMethod}`:""}`,y,t.labelStyle)}else{let B=await rt(c,`${r.type?`Type: ${r.type}`:""}`,y,t.labelStyle);y+=B,await rt(c,`${r.docRef?`Doc Ref: ${r.docRef}`:""}`,y,t.labelStyle)}let d=(c.node()?.getBBox().width??200)+p,w=(c.node()?.getBBox().height??200)+p,x=-d/2,S=-w/2,b=v.svg(c),k=I(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let P=b.rectangle(x,S,d,w,k),D=c.insert(()=>P,":first-child");if(D.attr("class","basic label-container outer-path").attr("style",h),a?.length){let B=t.colorIndex??0;c.attr("data-color-id",`color-${B%a.length}`)}if(c.selectAll(".label").each((B,M,C)=>{let X=Z(C[M]),R=X.attr("transform"),L=0,H=0;if(R){let F=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);F&&(L=parseFloat(F[1]),H=parseFloat(F[2]))}let A=H-w/2,E=x+p/2;(M===0||M===1)&&(E=L),X.attr("transform",`translate(${E}, ${A+p})`)}),y>f+m+i){let B=S+f+m+i,M;if(t.look==="neo"){let R=[[x,B],[x+d,B],[x+d,B+.001],[x,B+.001]];M=b.polygon(R,k)}else M=b.line(x,B,x+d,B,k);c.insert(()=>M).attr("class","divider")}return T(t,D),t.intersect=function(B){return N.rect(t,B)},h&&t.look!=="handDrawn"&&(g||a?.length)&&c.selectAll("path").attr("style",h),c}$(Sa,"requirementBox");async function rt(u,t,o,h=""){if(t==="")return 0;let l=u.insert("g").attr("class","label").attr("style",h),r=U(),p=r.htmlLabels??!0,i=await nt(l,Et(Dt(t)),{width:Pt(t,r)+50,classes:"markdown-node-label",useHtmlLabels:p,style:h},r),n;if(p){let e=i.children[0],s=Z(i);n=e.getBoundingClientRect(),s.attr("width",n.width),s.attr("height",n.height)}else{let e=i.children[0];for(let s of e.children)h&&s.setAttribute("style",h);n=i.getBBox(),n.height+=6}return l.attr("transform",`translate(${-n.width/2},${-n.height/2+o})`),n.height}$(rt,"addText");var Ua=$(u=>{switch(u){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 $a(u,t,{config:o}){let{labelStyles:h,nodeStyles:l}=W(t);t.labelStyle=h||"";let r=10,p=t.width;t.width=(t.width??200)-10;let{shapeSvg:i,bbox:n,label:e}=await O(u,t,Y(t)),s=t.padding||10,a="",g;"ticket"in t&&t.ticket&&o?.kanban?.ticketBaseUrl&&(a=o?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),g=i.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",a).attr("target","_blank"));let c={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},f,y;g?{label:f,bbox:y}=await Xt(g,"ticket"in t&&t.ticket||"",c):{label:f,bbox:y}=await Xt(i,"ticket"in t&&t.ticket||"",c);let{label:m,bbox:d}=await Xt(i,"assigned"in t&&t.assigned||"",c);t.width=p;let w=10,x=t?.width||0,S=Math.max(y.height,d.height)/2,b=Math.max(n.height+w*2,t?.height||0)+S,k=-x/2,P=-b/2;e.attr("transform","translate("+(s-x/2)+", "+(-S-n.height/2)+")"),f.attr("transform","translate("+(s-x/2)+", "+(-S+n.height/2)+")"),m.attr("transform","translate("+(s+x/2-d.width-2*r)+", "+(-S+n.height/2)+")");let D,{rx:B,ry:M}=t,{cssStyles:C}=t;if(t.look==="handDrawn"){let X=v.svg(i),R=I(t,{}),L=B||M?X.path(yt(k,P,x,b,B||0),R):X.rectangle(k,P,x,b,R);D=i.insert(()=>L,":first-child"),D.attr("class","basic label-container").attr("style",C||null)}else{D=i.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",l).attr("rx",B??5).attr("ry",M??5).attr("x",k).attr("y",P).attr("width",x).attr("height",b);let X="priority"in t&&t.priority;if(X){let R=i.append("line"),L=k+2,H=P+Math.floor((B??0)/2),A=P+b-Math.floor((B??0)/2);R.attr("x1",L).attr("y1",H).attr("x2",L).attr("y2",A).attr("stroke-width","4").attr("stroke",Ua(X))}}return T(t,D),t.height=b,t.intersect=function(X){return N.rect(t,X)},i}$($a,"kanbanItem");async function va(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let{shapeSvg:l,bbox:r,halfPadding:p,label:i}=await O(u,t,Y(t)),n=r.width+10*p,e=r.height+8*p,s=.15*n,{cssStyles:a}=t,g=r.width+20,c=r.height+20,f=Math.max(n,g),y=Math.max(e,c);i.attr("transform",`translate(${-r.width/2}, ${-r.height/2})`);let m,d=`M0 0 + a${s},${s} 1 0,0 ${f*.25},${-1*y*.1} + a${s},${s} 1 0,0 ${f*.25},0 + a${s},${s} 1 0,0 ${f*.25},0 + a${s},${s} 1 0,0 ${f*.25},${y*.1} + + a${s},${s} 1 0,0 ${f*.15},${y*.33} + a${s*.8},${s*.8} 1 0,0 0,${y*.34} + a${s},${s} 1 0,0 ${-1*f*.15},${y*.33} + + a${s},${s} 1 0,0 ${-1*f*.25},${y*.15} + a${s},${s} 1 0,0 ${-1*f*.25},0 + a${s},${s} 1 0,0 ${-1*f*.25},0 + a${s},${s} 1 0,0 ${-1*f*.25},${-1*y*.15} + + a${s},${s} 1 0,0 ${-1*f*.1},${-1*y*.33} + a${s*.8},${s*.8} 1 0,0 0,${-1*y*.34} + a${s},${s} 1 0,0 ${f*.1},${-1*y*.33} + H0 V0 Z`;if(t.look==="handDrawn"){let w=v.svg(l),x=I(t,{}),S=w.path(d,x);m=l.insert(()=>S,":first-child"),m.attr("class","basic label-container").attr("style",K(a))}else m=l.insert("path",":first-child").attr("class","basic label-container").attr("style",h).attr("d",d);return m.attr("transform",`translate(${-f/2}, ${-y/2})`),T(t,m),t.calcIntersect=function(w,x){return N.rect(w,x)},t.intersect=function(w){return z.info("Bang intersect",t,w),N.rect(t,w)},l}$(va,"bang");async function ka(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let{shapeSvg:l,bbox:r,halfPadding:p,label:i}=await O(u,t,Y(t)),n=r.width+2*p,e=r.height+2*p,s=.15*n,a=.25*n,g=.35*n,c=.2*n,{cssStyles:f}=t,y,m=`M0 0 + a${s},${s} 0 0,1 ${n*.25},${-1*n*.1} + a${g},${g} 1 0,1 ${n*.4},${-1*n*.1} + a${a},${a} 1 0,1 ${n*.35},${n*.2} + + a${s},${s} 1 0,1 ${n*.15},${e*.35} + a${c},${c} 1 0,1 ${-1*n*.15},${e*.65} + + a${a},${s} 1 0,1 ${-1*n*.25},${n*.15} + a${g},${g} 1 0,1 ${-1*n*.5},0 + a${s},${s} 1 0,1 ${-1*n*.25},${-1*n*.15} + + a${s},${s} 1 0,1 ${-1*n*.1},${-1*e*.35} + a${c},${c} 1 0,1 ${n*.1},${-1*e*.65} + H0 V0 Z`;if(t.look==="handDrawn"){let d=v.svg(l),w=I(t,{}),x=d.path(m,w);y=l.insert(()=>x,":first-child"),y.attr("class","basic label-container").attr("style",K(f))}else y=l.insert("path",":first-child").attr("class","basic label-container").attr("style",h).attr("d",m);return i.attr("transform",`translate(${-r.width/2}, ${-r.height/2})`),y.attr("transform",`translate(${-n/2}, ${-e/2})`),T(t,y),t.calcIntersect=function(d,w){return N.rect(d,w)},t.intersect=function(d){return z.info("Cloud intersect",t,d),N.rect(t,d)},l}$(ka,"cloud");async function Pa(u,t){let{labelStyles:o,nodeStyles:h}=W(t);t.labelStyle=o;let{shapeSvg:l,bbox:r,halfPadding:p,label:i}=await O(u,t,Y(t)),n=r.width+8*p,e=r.height+2*p,s=5,a=t.look==="neo"?` + M${-n/2} ${e/2-s} + v${-e+2*s} + q0,-${s} ${s},-${s} + h${n-2*s} + q${s},0 ${s},${s} + v${e-s} + H${-n/2} + Z + `:` + M${-n/2} ${e/2-s} + v${-e+2*s} + q0,-${s} ${s},-${s} + h${n-2*s} + q${s},0 ${s},${s} + v${e-2*s} + q0,${s} ${-s},${s} + h${-(n-2*s)} + q${-s},0 ${-s},${-s} + Z + `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let g=l.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",h).attr("d",a);return l.append("line").attr("class","node-line-").attr("x1",-n/2).attr("y1",e/2).attr("x2",n/2).attr("y2",e/2),i.attr("transform",`translate(${-r.width/2}, ${-r.height/2})`),l.append(()=>i.node()),T(t,g),t.calcIntersect=function(c,f){return N.rect(c,f)},t.intersect=function(c){return N.rect(t,c)},l}$(Pa,"defaultMindmapNode");async function Da(u,t){let o={padding:t.padding??0};return Gt(u,t,o)}$(Da,"mindmapCircle");var Ka=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:ea},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:ta},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ia},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ca},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Ds},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Bs},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Gt},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:va},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ka},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Qs},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Is},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Gs},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:js},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ya},{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:Ys},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Ns},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:ga},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ws},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:sa},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:na},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:la},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:As},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Ls},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:$s},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:vs},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ks},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Fs},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:da},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Hs},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:fa},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:qs},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Ps},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ms},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ua},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:wa},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Cs},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:pa},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Rs},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:aa},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Zs},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Vs},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:ms},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Ss},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ha},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:oa},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ma},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Us},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:zs}],te=$(()=>{let t=[...Object.entries({state:ra,choice:xs,note:Js,rectWithTitle:Ks,labelRect:Os,iconSquare:Xs,iconCircle:Es,icon:Ws,iconRounded:Ts,imageSquare:_s,anchor:us,kanbanItem:$a,mindmapCircle:Da,defaultMindmapNode:Pa,classBox:ba,erBox:Ft,requirementBox:Sa}),...Ka.flatMap(o=>[o.shortName,..."aliases"in o?o.aliases:[],..."internalAliases"in o?o.internalAliases:[]].map(l=>[l,o.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Ba=te();function se(u){return u in Ba}$(se,"isValidShape");var Ht=new Map;async function ae(u,t,o){let h,l;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let r=t.shape?Ba[t.shape]:void 0;if(!r)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let p;o.config.securityLevel==="sandbox"?p="_top":t.linkTarget&&(p=t.linkTarget||"_blank"),h=u.insert("svg:a").attr("xlink:href",t.link).attr("target",p??null),l=await r(h,t,o)}else l=await r(u,t,o),h=l;return h.attr("data-look",K(t.look)),t.tooltip&&l.attr("title",t.tooltip),Ht.set(t.id,h),t.haveCallback&&h.attr("class",h.attr("class")+" clickable"),h}$(ae,"insertNode");var Pi=$((u,t)=>{Ht.set(t.id,u)},"setNodeElem"),Di=$(()=>{Ht.clear()},"clear"),Bi=$(u=>{let t=Ht.get(u.id);z.trace("Transforming node",u.diff,u,"translate("+(u.x-u.width/2-5)+", "+u.width/2+")");let o=8,h=u.diff||0;return u.clusterNode?t.attr("transform","translate("+(u.x+h-u.width/2)+", "+(u.y-u.height/2-o)+")"):t.attr("transform","translate("+u.x+", "+u.y+")"),h},"positionNode");export{O as a,T as b,At as c,ye as d,pe as e,se as f,ae as g,Pi as h,Di as i,Bi as j}; +//# sourceMappingURL=chunk-2WVNBDAO.min.js.map diff --git a/templates/tabulareditor/public/chunk-2WVNBDAO.min.js.map b/templates/tabulareditor/public/chunk-2WVNBDAO.min.js.map new file mode 100644 index 000000000..6c4350b0b --- /dev/null +++ b/templates/tabulareditor/public/chunk-2WVNBDAO.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.mjs"], + "sourcesContent": ["import {\n configureLabelImages,\n getSubGraphTitleMargins\n} from \"./chunk-L5ZTLDWV.mjs\";\nimport {\n compileStyles,\n solidStateFill,\n styles2String,\n userNodeOverrides\n} from \"./chunk-NZK2D7GU.mjs\";\nimport {\n createText,\n getIconSVG\n} from \"./chunk-O5CBEL6O.mjs\";\nimport {\n calculateTextWidth,\n decodeEntities,\n handleUndefinedAttr\n} from \"./chunk-5ZQYHXKU.mjs\";\nimport {\n evaluate,\n getConfig,\n getConfig2,\n getEffectiveHtmlLabels,\n hasKatex,\n parseGenericTypes,\n sanitizeText,\n sanitizeText2\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/rendering-util/rendering-elements/shapes/util.ts\nimport { select } from \"d3\";\nvar labelHelper = /* @__PURE__ */ __name(async (parent, node, _classes) => {\n let cssClasses;\n const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig2()?.htmlLabels);\n if (!_classes) {\n cssClasses = \"node default\";\n } else {\n cssClasses = _classes;\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", cssClasses).attr(\"id\", node.domId || node.id);\n const labelEl = shapeSvg.insert(\"g\").attr(\"class\", \"label\").attr(\"style\", handleUndefinedAttr(node.labelStyle));\n let label;\n if (node.label === void 0) {\n label = \"\";\n } else {\n label = typeof node.label === \"string\" ? node.label : node.label[0];\n }\n const addBackground = !!node.icon || !!node.img;\n const isMarkdown = node.labelType === \"markdown\";\n const text2 = await createText(\n labelEl,\n sanitizeText(decodeEntities(label), getConfig2()),\n {\n useHtmlLabels,\n width: node.width || getConfig2().flowchart?.wrappingWidth,\n classes: isMarkdown ? \"markdown-node-label\" : \"\",\n style: node.labelStyle,\n addSvgBackground: addBackground,\n markdown: isMarkdown\n },\n getConfig2()\n );\n let bbox = text2.getBBox();\n const halfPadding = (node?.padding ?? 0) / 2;\n if (useHtmlLabels) {\n const div = text2.children[0];\n const dv = select(text2);\n await configureLabelImages(div, label);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n if (useHtmlLabels) {\n labelEl.attr(\"transform\", \"translate(\" + -bbox.width / 2 + \", \" + -bbox.height / 2 + \")\");\n } else {\n labelEl.attr(\"transform\", \"translate(0, \" + -bbox.height / 2 + \")\");\n }\n if (node.centerLabel) {\n labelEl.attr(\"transform\", \"translate(\" + -bbox.width / 2 + \", \" + -bbox.height / 2 + \")\");\n }\n labelEl.insert(\"rect\", \":first-child\");\n return { shapeSvg, bbox, halfPadding, label: labelEl };\n}, \"labelHelper\");\nvar insertLabel = /* @__PURE__ */ __name(async (parent, label, options) => {\n const useHtmlLabels = options.useHtmlLabels ?? getEffectiveHtmlLabels(getConfig2());\n const labelEl = parent.insert(\"g\").attr(\"class\", \"label\").attr(\"style\", options.labelStyle || \"\");\n const text2 = await createText(labelEl, sanitizeText(decodeEntities(label), getConfig2()), {\n useHtmlLabels,\n width: options.width || getConfig2()?.flowchart?.wrappingWidth,\n style: options.labelStyle,\n addSvgBackground: !!options.icon || !!options.img\n });\n let bbox = text2.getBBox();\n const halfPadding = options.padding / 2;\n if (getEffectiveHtmlLabels(getConfig2())) {\n const div = text2.children[0];\n const dv = select(text2);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n if (useHtmlLabels) {\n labelEl.attr(\"transform\", \"translate(\" + -bbox.width / 2 + \", \" + -bbox.height / 2 + \")\");\n } else {\n labelEl.attr(\"transform\", \"translate(0, \" + -bbox.height / 2 + \")\");\n }\n if (options.centerLabel) {\n labelEl.attr(\"transform\", \"translate(\" + -bbox.width / 2 + \", \" + -bbox.height / 2 + \")\");\n }\n labelEl.insert(\"rect\", \":first-child\");\n return { shapeSvg: parent, bbox, halfPadding, label: labelEl };\n}, \"insertLabel\");\nvar updateNodeBounds = /* @__PURE__ */ __name((node, element) => {\n const bbox = element.node().getBBox();\n node.width = bbox.width;\n node.height = bbox.height;\n}, \"updateNodeBounds\");\nvar getNodeClasses = /* @__PURE__ */ __name((node, extra) => (node.look === \"handDrawn\" ? \"rough-node\" : \"node\") + \" \" + node.cssClasses + \" \" + (extra || \"\"), \"getNodeClasses\");\nfunction createPathFromPoints(points) {\n const pointStrings = points.map((p, i) => `${i === 0 ? \"M\" : \"L\"}${p.x},${p.y}`);\n pointStrings.push(\"Z\");\n return pointStrings.join(\" \");\n}\n__name(createPathFromPoints, \"createPathFromPoints\");\nfunction generateFullSineWavePoints(x1, y1, x2, y2, amplitude, numCycles) {\n const points = [];\n const steps = 50;\n const deltaX = x2 - x1;\n const deltaY = y2 - y1;\n const cycleLength = deltaX / numCycles;\n const frequency = 2 * Math.PI / cycleLength;\n const midY = y1 + deltaY / 2;\n for (let i = 0; i <= steps; i++) {\n const t = i / steps;\n const x = x1 + t * deltaX;\n const y = midY + amplitude * Math.sin(frequency * (x - x1));\n points.push({ x, y });\n }\n return points;\n}\n__name(generateFullSineWavePoints, \"generateFullSineWavePoints\");\nfunction generateCirclePoints(centerX, centerY, radius, numPoints, startAngle, endAngle) {\n const points = [];\n const startAngleRad = startAngle * Math.PI / 180;\n const endAngleRad = endAngle * Math.PI / 180;\n const angleRange = endAngleRad - startAngleRad;\n const angleStep = angleRange / (numPoints - 1);\n for (let i = 0; i < numPoints; i++) {\n const angle = startAngleRad + i * angleStep;\n const x = centerX + radius * Math.cos(angle);\n const y = centerY + radius * Math.sin(angle);\n points.push({ x: -x, y: -y });\n }\n return points;\n}\n__name(generateCirclePoints, \"generateCirclePoints\");\nfunction mergePaths(roughElement) {\n const paths = Array.from(roughElement.childNodes).filter(\n (node) => node.tagName === \"path\"\n );\n const mergedPath = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n const combinedPathData = paths.map((path) => path.getAttribute(\"d\")).filter((d) => d !== null).join(\" \");\n mergedPath.setAttribute(\"d\", combinedPathData);\n const fillPath = paths.find((path) => path.getAttribute(\"fill\") !== \"none\");\n const strokePath = paths.find((path) => path.getAttribute(\"stroke\") !== \"none\");\n const getAttr = /* @__PURE__ */ __name((element, attr) => {\n return element?.getAttribute(attr) ?? void 0;\n }, \"getAttr\");\n if (fillPath) {\n const fillAttrs = {\n fill: getAttr(fillPath, \"fill\"),\n \"fill-opacity\": getAttr(fillPath, \"fill-opacity\") ?? \"1\"\n };\n Object.entries(fillAttrs).forEach(([attr, value]) => {\n if (value) {\n mergedPath.setAttribute(attr, value);\n }\n });\n }\n if (strokePath) {\n const strokeAttrs = {\n stroke: getAttr(strokePath, \"stroke\"),\n \"stroke-width\": getAttr(strokePath, \"stroke-width\") ?? \"1\",\n \"stroke-opacity\": getAttr(strokePath, \"stroke-opacity\") ?? \"1\"\n };\n Object.entries(strokeAttrs).forEach(([attr, value]) => {\n if (value) {\n mergedPath.setAttribute(attr, value);\n }\n });\n }\n const group = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n group.appendChild(mergedPath);\n return group;\n}\n__name(mergePaths, \"mergePaths\");\n\n// src/rendering-util/rendering-elements/clusters.js\nimport { select as select2 } from \"d3\";\nimport rough from \"roughjs\";\n\n// src/rendering-util/rendering-elements/intersect/intersect-rect.js\nvar intersectRect = /* @__PURE__ */ __name((node, point) => {\n var x = node.x;\n var y = node.y;\n var dx = point.x - x;\n var dy = point.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n if (dy < 0) {\n h = -h;\n }\n sx = dy === 0 ? 0 : h * dx / dy;\n sy = h;\n } else {\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = dx === 0 ? 0 : w * dy / dx;\n }\n return { x: x + sx, y: y + sy };\n}, \"intersectRect\");\nvar intersect_rect_default = intersectRect;\n\n// src/rendering-util/rendering-elements/createLabel.js\nvar createLabel = /* @__PURE__ */ __name(async (element, _vertexText, style, isTitle = false, isNode = false) => {\n let vertexText = _vertexText || \"\";\n if (typeof vertexText === \"object\") {\n vertexText = vertexText[0];\n }\n const config = getConfig2();\n const useHtmlLabels = getEffectiveHtmlLabels(config);\n return await createText(\n element,\n vertexText,\n {\n style,\n isTitle,\n useHtmlLabels,\n markdown: false,\n isNode,\n width: Number.POSITIVE_INFINITY\n },\n config\n );\n}, \"createLabel\");\nvar createLabel_default = createLabel;\n\n// src/rendering-util/rendering-elements/shapes/roundedRectPath.ts\nvar createRoundedRectPathD = /* @__PURE__ */ __name((x, y, totalWidth, totalHeight, radius) => [\n \"M\",\n x + radius,\n y,\n // Move to the first point\n \"H\",\n x + totalWidth - radius,\n // Draw horizontal line to the beginning of the right corner\n \"A\",\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth,\n y + radius,\n // Draw arc to the right top corner\n \"V\",\n y + totalHeight - radius,\n // Draw vertical line down to the beginning of the right bottom corner\n \"A\",\n radius,\n radius,\n 0,\n 0,\n 1,\n x + totalWidth - radius,\n y + totalHeight,\n // Draw arc to the right bottom corner\n \"H\",\n x + radius,\n // Draw horizontal line to the beginning of the left bottom corner\n \"A\",\n radius,\n radius,\n 0,\n 0,\n 1,\n x,\n y + totalHeight - radius,\n // Draw arc to the left bottom corner\n \"V\",\n y + radius,\n // Draw vertical line up to the beginning of the left top corner\n \"A\",\n radius,\n radius,\n 0,\n 0,\n 1,\n x + radius,\n y,\n // Draw arc to the left top corner\n \"Z\"\n // Close the path\n].join(\" \"), \"createRoundedRectPathD\");\n\n// src/rendering-util/rendering-elements/clusters.js\nvar rect = /* @__PURE__ */ __name(async (parent, node) => {\n log.info(\"Creating subgraph rect for \", node.id, node);\n const siteConfig = getConfig2();\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { clusterBkg, clusterBorder } = themeVariables;\n const { labelStyles, nodeStyles, borderStyles, backgroundStyles } = styles2String(node);\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"cluster \" + node.cssClasses).attr(\"id\", node.domId).attr(\"data-look\", node.look);\n const useHtmlLabels = getEffectiveHtmlLabels(siteConfig);\n const labelEl = shapeSvg.insert(\"g\").attr(\"class\", \"cluster-label \");\n let text2;\n if (node.labelType === \"markdown\") {\n text2 = await createText(labelEl, node.label, {\n style: node.labelStyle,\n useHtmlLabels,\n isNode: true,\n width: node.width\n });\n } else {\n text2 = await createLabel_default(labelEl, node.label, node.labelStyle || \"\", false, true);\n }\n let bbox = text2.getBBox();\n if (getEffectiveHtmlLabels(siteConfig)) {\n const div = text2.children[0];\n const dv = select2(text2);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (width - node.width) / 2 - node.padding;\n } else {\n node.diff = -node.padding;\n }\n const height = node.height;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n log.trace(\"Data \", node, JSON.stringify(node));\n let rect2;\n if (node.look === \"handDrawn\") {\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {\n roughness: 0.7,\n fill: clusterBkg,\n // fill: 'red',\n stroke: clusterBorder,\n fillWeight: 3,\n seed: handDrawnSeed\n });\n const roughNode = rc.path(createRoundedRectPathD(x, y, width, height, 0), options);\n rect2 = shapeSvg.insert(() => {\n log.debug(\"Rough node insert CXC\", roughNode);\n return roughNode;\n }, \":first-child\");\n rect2.select(\"path:nth-child(2)\").attr(\"style\", borderStyles.join(\";\"));\n rect2.select(\"path\").attr(\"style\", backgroundStyles.join(\";\").replace(\"fill\", \"stroke\"));\n } else {\n rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n rect2.attr(\"style\", nodeStyles).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"x\", x).attr(\"y\", y).attr(\"width\", width).attr(\"height\", height);\n }\n const { subGraphTitleTopMargin } = getSubGraphTitleMargins(siteConfig);\n labelEl.attr(\n \"transform\",\n // This puts the label on top of the box instead of inside it\n `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`\n );\n if (labelStyles) {\n const span = labelEl.select(\"span\");\n if (span) {\n span.attr(\"style\", labelStyles);\n }\n }\n const rectBox = rect2.node().getBBox();\n node.offsetX = 0;\n node.width = rectBox.width;\n node.height = rectBox.height;\n node.offsetY = bbox.height - node.padding / 2;\n node.intersect = function(point) {\n return intersect_rect_default(node, point);\n };\n return { cluster: shapeSvg, labelBBox: bbox };\n}, \"rect\");\nvar noteGroup = /* @__PURE__ */ __name((parent, node) => {\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"note-cluster\").attr(\"id\", node.domId);\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n rect2.attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"x\", node.x - node.width / 2 - halfPadding).attr(\"y\", node.y - node.height / 2 - halfPadding).attr(\"width\", node.width + padding).attr(\"height\", node.height + padding).attr(\"fill\", \"none\");\n const rectBox = rect2.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n node.intersect = function(point) {\n return intersect_rect_default(node, point);\n };\n return { cluster: shapeSvg, labelBBox: { width: 0, height: 0 } };\n}, \"noteGroup\");\nvar roundedWithTitle = /* @__PURE__ */ __name(async (parent, node) => {\n const siteConfig = getConfig2();\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { altBackground, compositeBackground, compositeTitleBackground, nodeBorder } = themeVariables;\n const shapeSvg = parent.insert(\"g\").attr(\"class\", node.cssClasses).attr(\"id\", node.domId).attr(\"data-id\", node.id).attr(\"data-look\", node.look);\n const outerRectG = shapeSvg.insert(\"g\", \":first-child\");\n const label = shapeSvg.insert(\"g\").attr(\"class\", \"cluster-label\");\n let innerRect = shapeSvg.append(\"rect\");\n const text2 = await createLabel_default(label, node.label, node.labelStyle, void 0, true);\n let bbox = text2.getBBox();\n if (getEffectiveHtmlLabels(siteConfig)) {\n const div = text2.children[0];\n const dv = select2(text2);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n const width = (node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width) + padding;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (width - node.width) / 2 - node.padding;\n } else {\n node.diff = -node.padding;\n }\n const height = node.height + padding;\n const innerHeight = node.height + padding - bbox.height - 6;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n node.width = width;\n const innerY = node.y - node.height / 2 - halfPadding + bbox.height + 2;\n let rect2;\n if (node.look === \"handDrawn\") {\n const isAlt = node.cssClasses.includes(\"statediagram-cluster-alt\");\n const rc = rough.svg(shapeSvg);\n const roughOuterNode = node.rx || node.ry ? rc.path(createRoundedRectPathD(x, y, width, height, 10), {\n roughness: 0.7,\n fill: compositeTitleBackground,\n fillStyle: \"solid\",\n stroke: nodeBorder,\n seed: handDrawnSeed\n }) : rc.rectangle(x, y, width, height, { seed: handDrawnSeed });\n rect2 = shapeSvg.insert(() => roughOuterNode, \":first-child\");\n const roughInnerNode = rc.rectangle(x, innerY, width, innerHeight, {\n fill: isAlt ? altBackground : compositeBackground,\n fillStyle: isAlt ? \"hachure\" : \"solid\",\n stroke: nodeBorder,\n seed: handDrawnSeed\n });\n rect2 = shapeSvg.insert(() => roughOuterNode, \":first-child\");\n innerRect = shapeSvg.insert(() => roughInnerNode);\n } else {\n rect2 = outerRectG.insert(\"rect\", \":first-child\");\n const outerRectClass = \"outer\";\n rect2.attr(\"class\", outerRectClass).attr(\"x\", x).attr(\"y\", y).attr(\"width\", width).attr(\"height\", height).attr(\"data-look\", node.look);\n innerRect.attr(\"class\", \"inner\").attr(\"x\", x).attr(\"y\", innerY).attr(\"width\", width).attr(\"height\", innerHeight);\n }\n label.attr(\n \"transform\",\n `translate(${node.x - bbox.width / 2}, ${y + 1 - (getEffectiveHtmlLabels(siteConfig) ? 0 : 3)})`\n );\n const rectBox = rect2.node().getBBox();\n node.height = rectBox.height;\n node.offsetX = 0;\n node.offsetY = bbox.height - node.padding / 2;\n node.labelBBox = bbox;\n node.intersect = function(point) {\n return intersect_rect_default(node, point);\n };\n return { cluster: shapeSvg, labelBBox: bbox };\n}, \"roundedWithTitle\");\nvar kanbanSection = /* @__PURE__ */ __name(async (parent, node) => {\n log.info(\"Creating subgraph rect for \", node.id, node);\n const siteConfig = getConfig2();\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { clusterBkg, clusterBorder } = themeVariables;\n const { labelStyles, nodeStyles, borderStyles, backgroundStyles } = styles2String(node);\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"cluster \" + node.cssClasses).attr(\"id\", node.domId).attr(\"data-look\", node.look);\n const useHtmlLabels = getEffectiveHtmlLabels(siteConfig);\n const labelEl = shapeSvg.insert(\"g\").attr(\"class\", \"cluster-label \");\n const text2 = await createText(labelEl, node.label, {\n style: node.labelStyle,\n useHtmlLabels,\n isNode: true,\n width: node.width\n });\n let bbox = text2.getBBox();\n if (getEffectiveHtmlLabels(siteConfig)) {\n const div = text2.children[0];\n const dv = select2(text2);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (width - node.width) / 2 - node.padding;\n } else {\n node.diff = -node.padding;\n }\n const height = node.height;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n log.trace(\"Data \", node, JSON.stringify(node));\n let rect2;\n if (node.look === \"handDrawn\") {\n const rc = rough.svg(shapeSvg);\n const options = userNodeOverrides(node, {\n roughness: 0.7,\n fill: clusterBkg,\n // fill: 'red',\n stroke: clusterBorder,\n fillWeight: 4,\n seed: handDrawnSeed\n });\n const roughNode = rc.path(createRoundedRectPathD(x, y, width, height, node.rx), options);\n rect2 = shapeSvg.insert(() => {\n log.debug(\"Rough node insert CXC\", roughNode);\n return roughNode;\n }, \":first-child\");\n rect2.select(\"path:nth-child(2)\").attr(\"style\", borderStyles.join(\";\"));\n rect2.select(\"path\").attr(\"style\", backgroundStyles.join(\";\").replace(\"fill\", \"stroke\"));\n } else {\n rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n rect2.attr(\"style\", nodeStyles).attr(\"rx\", node.rx).attr(\"ry\", node.ry).attr(\"x\", x).attr(\"y\", y).attr(\"width\", width).attr(\"height\", height);\n }\n const { subGraphTitleTopMargin } = getSubGraphTitleMargins(siteConfig);\n labelEl.attr(\n \"transform\",\n // This puts the label on top of the box instead of inside it\n `translate(${node.x - bbox.width / 2}, ${node.y - node.height / 2 + subGraphTitleTopMargin})`\n );\n if (labelStyles) {\n const span = labelEl.select(\"span\");\n if (span) {\n span.attr(\"style\", labelStyles);\n }\n }\n const rectBox = rect2.node().getBBox();\n node.offsetX = 0;\n node.width = rectBox.width;\n node.height = rectBox.height;\n node.offsetY = bbox.height - node.padding / 2;\n node.intersect = function(point) {\n return intersect_rect_default(node, point);\n };\n return { cluster: shapeSvg, labelBBox: bbox };\n}, \"kanbanSection\");\nvar divider = /* @__PURE__ */ __name((parent, node) => {\n const siteConfig = getConfig2();\n const { themeVariables, handDrawnSeed } = siteConfig;\n const { nodeBorder } = themeVariables;\n const shapeSvg = parent.insert(\"g\").attr(\"class\", node.cssClasses).attr(\"id\", node.domId).attr(\"data-look\", node.look);\n const outerRectG = shapeSvg.insert(\"g\", \":first-child\");\n const padding = 0 * node.padding;\n const width = node.width + padding;\n node.diff = -node.padding;\n const height = node.height + padding;\n const x = node.x - width / 2;\n const y = node.y - height / 2;\n node.width = width;\n let rect2;\n if (node.look === \"handDrawn\") {\n const rc = rough.svg(shapeSvg);\n const roughOuterNode = rc.rectangle(x, y, width, height, {\n fill: \"lightgrey\",\n roughness: 0.5,\n strokeLineDash: [5],\n stroke: nodeBorder,\n seed: handDrawnSeed\n });\n rect2 = shapeSvg.insert(() => roughOuterNode, \":first-child\");\n } else {\n rect2 = outerRectG.insert(\"rect\", \":first-child\");\n let outerRectClass = \"outer\";\n if (node.look === \"neo\") {\n outerRectClass = \"divider\";\n } else {\n outerRectClass = \"divider\";\n }\n rect2.attr(\"class\", outerRectClass).attr(\"x\", x).attr(\"y\", y).attr(\"width\", width).attr(\"height\", height).attr(\"data-look\", node.look);\n }\n const rectBox = rect2.node().getBBox();\n node.height = rectBox.height;\n node.offsetX = 0;\n node.offsetY = 0;\n node.intersect = function(point) {\n return intersect_rect_default(node, point);\n };\n return { cluster: shapeSvg, labelBBox: {} };\n}, \"divider\");\nvar squareRect = rect;\nvar shapes = {\n rect,\n squareRect,\n roundedWithTitle,\n noteGroup,\n divider,\n kanbanSection\n};\nvar clusterElems = /* @__PURE__ */ new Map();\nvar insertCluster = /* @__PURE__ */ __name(async (elem, node) => {\n const shape = node.shape || \"rect\";\n const cluster = await shapes[shape](elem, node);\n clusterElems.set(node.id, cluster);\n return cluster;\n}, \"insertCluster\");\nvar clear = /* @__PURE__ */ __name(() => {\n clusterElems = /* @__PURE__ */ new Map();\n}, \"clear\");\n\n// src/rendering-util/rendering-elements/intersect/intersect-node.js\nfunction intersectNode(node, point) {\n return node.intersect(point);\n}\n__name(intersectNode, \"intersectNode\");\nvar intersect_node_default = intersectNode;\n\n// src/rendering-util/rendering-elements/intersect/intersect-ellipse.js\nfunction intersectEllipse(node, rx, ry, point) {\n var cx = node.x;\n var cy = node.y;\n var px = cx - point.x;\n var py = cy - point.y;\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n var dx = Math.abs(rx * ry * px / det);\n if (point.x < cx) {\n dx = -dx;\n }\n var dy = Math.abs(rx * ry * py / det);\n if (point.y < cy) {\n dy = -dy;\n }\n return { x: cx + dx, y: cy + dy };\n}\n__name(intersectEllipse, \"intersectEllipse\");\nvar intersect_ellipse_default = intersectEllipse;\n\n// src/rendering-util/rendering-elements/intersect/intersect-circle.js\nfunction intersectCircle(node, rx, point) {\n return intersect_ellipse_default(node, rx, rx, point);\n}\n__name(intersectCircle, \"intersectCircle\");\nvar intersect_circle_default = intersectCircle;\n\n// src/rendering-util/rendering-elements/intersect/intersect-line.js\nfunction intersectLine(p1, p2, q1, q2) {\n {\n const a1 = p2.y - p1.y;\n const b1 = p1.x - p2.x;\n const c1 = p2.x * p1.y - p1.x * p2.y;\n const r3 = a1 * q1.x + b1 * q1.y + c1;\n const r4 = a1 * q2.x + b1 * q2.y + c1;\n const epsilon = 1e-6;\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return;\n }\n const a2 = q2.y - q1.y;\n const b2 = q1.x - q2.x;\n const c2 = q2.x * q1.y - q1.x * q2.y;\n const r1 = a2 * p1.x + b2 * p1.y + c2;\n const r2 = a2 * p2.x + b2 * p2.y + c2;\n if (Math.abs(r1) < epsilon && Math.abs(r2) < epsilon && sameSign(r1, r2)) {\n return;\n }\n const denom = a1 * b2 - a2 * b1;\n if (denom === 0) {\n return;\n }\n const offset = Math.abs(denom / 2);\n let num = b1 * c2 - b2 * c1;\n const x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n num = a2 * c1 - a1 * c2;\n const y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n return { x, y };\n }\n}\n__name(intersectLine, \"intersectLine\");\nfunction sameSign(r1, r2) {\n return r1 * r2 > 0;\n}\n__name(sameSign, \"sameSign\");\nvar intersect_line_default = intersectLine;\n\n// src/rendering-util/rendering-elements/intersect/intersect-polygon.js\nfunction intersectPolygon(node, polyPoints, point) {\n let x1 = node.x;\n let y1 = node.y;\n let intersections = [];\n let minX = Number.POSITIVE_INFINITY;\n let minY = Number.POSITIVE_INFINITY;\n if (typeof polyPoints.forEach === \"function\") {\n polyPoints.forEach(function(entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n } else {\n minX = Math.min(minX, polyPoints.x);\n minY = Math.min(minY, polyPoints.y);\n }\n let left = x1 - node.width / 2 - minX;\n let top = y1 - node.height / 2 - minY;\n for (let i = 0; i < polyPoints.length; i++) {\n let p1 = polyPoints[i];\n let p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n let intersect = intersect_line_default(\n node,\n point,\n { x: left + p1.x, y: top + p1.y },\n { x: left + p2.x, y: top + p2.y }\n );\n if (intersect) {\n intersections.push(intersect);\n }\n }\n if (!intersections.length) {\n return node;\n }\n if (intersections.length > 1) {\n intersections.sort(function(p, q) {\n let pdx = p.x - point.x;\n let pdy = p.y - point.y;\n let distp = Math.sqrt(pdx * pdx + pdy * pdy);\n let qdx = q.x - point.x;\n let qdy = q.y - point.y;\n let distq = Math.sqrt(qdx * qdx + qdy * qdy);\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n return intersections[0];\n}\n__name(intersectPolygon, \"intersectPolygon\");\nvar intersect_polygon_default = intersectPolygon;\n\n// src/rendering-util/rendering-elements/intersect/index.js\nvar intersect_default = {\n node: intersect_node_default,\n circle: intersect_circle_default,\n ellipse: intersect_ellipse_default,\n polygon: intersect_polygon_default,\n rect: intersect_rect_default\n};\n\n// src/rendering-util/rendering-elements/shapes/anchor.ts\nimport rough2 from \"roughjs\";\nfunction anchor(parent, node) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const classes = getNodeClasses(node);\n let cssClasses = classes;\n if (!classes) {\n cssClasses = \"anchor\";\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", cssClasses).attr(\"id\", node.domId || node.id);\n const radius = 1;\n const { cssStyles } = node;\n const rc = rough2.svg(shapeSvg);\n const options = userNodeOverrides(node, { fill: \"black\", stroke: \"none\", fillStyle: \"solid\" });\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n }\n const roughNode = rc.circle(0, 0, radius * 2, options);\n const circleElem = shapeSvg.insert(() => roughNode, \":first-child\");\n circleElem.attr(\"class\", \"anchor\").attr(\"style\", handleUndefinedAttr(cssStyles));\n updateNodeBounds(node, circleElem);\n node.intersect = function(point) {\n log.info(\"Circle intersect\", node, radius, point);\n return intersect_default.circle(node, radius, point);\n };\n return shapeSvg;\n}\n__name(anchor, \"anchor\");\n\n// src/rendering-util/rendering-elements/shapes/bowTieRect.ts\nimport rough3 from \"roughjs\";\nfunction generateArcPoints(x1, y1, x2, y2, rx, ry, clockwise) {\n const numPoints = 20;\n const midX = (x1 + x2) / 2;\n const midY = (y1 + y2) / 2;\n const angle = Math.atan2(y2 - y1, x2 - x1);\n const dx = (x2 - x1) / 2;\n const dy = (y2 - y1) / 2;\n const transformedX = dx / rx;\n const transformedY = dy / ry;\n const distance = Math.sqrt(transformedX ** 2 + transformedY ** 2);\n if (distance > 1) {\n throw new Error(\"The given radii are too small to create an arc between the points.\");\n }\n const scaledCenterDistance = Math.sqrt(1 - distance ** 2);\n const centerX = midX + scaledCenterDistance * ry * Math.sin(angle) * (clockwise ? -1 : 1);\n const centerY = midY - scaledCenterDistance * rx * Math.cos(angle) * (clockwise ? -1 : 1);\n const startAngle = Math.atan2((y1 - centerY) / ry, (x1 - centerX) / rx);\n const endAngle = Math.atan2((y2 - centerY) / ry, (x2 - centerX) / rx);\n let angleRange = endAngle - startAngle;\n if (clockwise && angleRange < 0) {\n angleRange += 2 * Math.PI;\n }\n if (!clockwise && angleRange > 0) {\n angleRange -= 2 * Math.PI;\n }\n const points = [];\n for (let i = 0; i < numPoints; i++) {\n const t = i / (numPoints - 1);\n const angle2 = startAngle + t * angleRange;\n const x = centerX + rx * Math.cos(angle2);\n const y = centerY + ry * Math.sin(angle2);\n points.push({ x, y });\n }\n return points;\n}\n__name(generateArcPoints, \"generateArcPoints\");\nfunction calculateArcSagitta(chord, radiusX, radiusY) {\n const [semiMajorAxis, semiMinorAxis] = [radiusX, radiusY].sort((a, b) => b - a);\n return semiMinorAxis * (1 - Math.sqrt(1 - (chord / semiMajorAxis / 2) ** 2));\n}\n__name(calculateArcSagitta, \"calculateArcSagitta\");\nasync function bowTieRect(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 16 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 12 : nodePadding;\n const calcTotalHeight = /* @__PURE__ */ __name((labelHeight) => labelHeight + labelPaddingY, \"calcTotalHeight\");\n const calcEllipseRadius = /* @__PURE__ */ __name((totalHeight2) => {\n const ry2 = totalHeight2 / 2;\n const rx2 = ry2 / (2.5 + totalHeight2 / 50);\n return [rx2, ry2];\n }, \"calcEllipseRadius\");\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const totalHeight = calcTotalHeight(node?.height ? node?.height : bbox.height);\n const [rx, ry] = calcEllipseRadius(totalHeight);\n const sagitta = calculateArcSagitta(totalHeight, rx, ry);\n const totalWidth = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2 + sagitta;\n const w = totalWidth - sagitta;\n const h = totalHeight;\n const { cssStyles } = node;\n const points = [\n { x: w / 2, y: -h / 2 },\n { x: -w / 2, y: -h / 2 },\n ...generateArcPoints(-w / 2, -h / 2, -w / 2, h / 2, rx, ry, false),\n { x: w / 2, y: h / 2 },\n ...generateArcPoints(w / 2, h / 2, w / 2, -h / 2, rx, ry, true)\n ];\n const rc = rough3.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const bowTieRectPath = createPathFromPoints(points);\n const bowTieRectShapePath = rc.path(bowTieRectPath, options);\n const bowTieRectShape = shapeSvg.insert(() => bowTieRectShapePath, \":first-child\");\n bowTieRectShape.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n bowTieRectShape.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n bowTieRectShape.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n bowTieRectShape.attr(\"transform\", `translate(${rx / 2}, 0)`);\n updateNodeBounds(node, bowTieRectShape);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(bowTieRect, \"bowTieRect\");\n\n// src/rendering-util/rendering-elements/shapes/card.ts\nimport rough4 from \"roughjs\";\n\n// src/rendering-util/rendering-elements/shapes/insertPolygonShape.ts\nfunction insertPolygonShape(parent, w, h, points) {\n return parent.insert(\"polygon\", \":first-child\").attr(\n \"points\",\n points.map(function(d) {\n return d.x + \",\" + d.y;\n }).join(\" \")\n ).attr(\"class\", \"label-container\").attr(\"transform\", \"translate(\" + -w / 2 + \",\" + h / 2 + \")\");\n}\n__name(insertPolygonShape, \"insertPolygonShape\");\n\n// src/rendering-util/rendering-elements/shapes/card.ts\nvar NOTCH_SIZE = 12;\nasync function card(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 28 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 24 : nodePadding;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = (node?.width ?? bbox.width) + (node.look === \"neo\" ? labelPaddingX * 2 : labelPaddingX + NOTCH_SIZE);\n const h = (node?.height ?? bbox.height) + (node.look === \"neo\" ? labelPaddingY * 2 : labelPaddingY);\n const left = 0;\n const right = w;\n const top = -h;\n const bottom = 0;\n const points = [\n { x: left + NOTCH_SIZE, y: top },\n { x: right, y: top },\n { x: right, y: bottom },\n { x: left, y: bottom },\n { x: left, y: top + NOTCH_SIZE },\n { x: left + NOTCH_SIZE, y: top }\n ];\n let polygon;\n const { cssStyles } = node;\n if (node.look === \"handDrawn\") {\n const rc = rough4.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n polygon = shapeSvg.insert(() => roughNode, \":first-child\").attr(\"transform\", `translate(${-w / 2}, ${h / 2})`);\n if (cssStyles) {\n polygon.attr(\"style\", cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n if (nodeStyles) {\n polygon.attr(\"style\", nodeStyles);\n }\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n return intersect_default.polygon(node, points, point);\n };\n return shapeSvg;\n}\n__name(card, \"card\");\n\n// src/rendering-util/rendering-elements/shapes/choice.ts\nimport rough5 from \"roughjs\";\nfunction choice(parent, node) {\n const { nodeStyles } = styles2String(node);\n node.label = \"\";\n const shapeSvg = parent.insert(\"g\").attr(\"class\", getNodeClasses(node)).attr(\"id\", node.domId ?? node.id);\n const { cssStyles } = node;\n const s = Math.max(28, node.width ?? 0);\n const points = [\n { x: 0, y: s / 2 },\n { x: s / 2, y: 0 },\n { x: 0, y: -s / 2 },\n { x: -s / 2, y: 0 }\n ];\n const rc = rough5.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const choicePath = createPathFromPoints(points);\n const roughNode = rc.path(choicePath, options);\n const choiceShape = shapeSvg.insert(() => roughNode, \":first-child\");\n if (cssStyles && node.look !== \"handDrawn\") {\n choiceShape.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n choiceShape.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n node.width = 28;\n node.height = 28;\n node.intersect = function(point) {\n return intersect_default.polygon(node, points, point);\n };\n return shapeSvg;\n}\n__name(choice, \"choice\");\n\n// src/rendering-util/rendering-elements/shapes/circle.ts\nimport rough6 from \"roughjs\";\nasync function circle(parent, node, options) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getNodeClasses(node));\n const labelPadding = 16;\n const padding = options?.padding ?? halfPadding;\n const radius = node.look === \"neo\" ? bbox.width / 2 + labelPadding * 2 : bbox.width / 2 + padding;\n let circleElem;\n const { cssStyles } = node;\n if (node.look === \"handDrawn\") {\n const rc = rough6.svg(shapeSvg);\n const options2 = userNodeOverrides(node, {});\n const roughNode = rc.circle(0, 0, radius * 2, options2);\n circleElem = shapeSvg.insert(() => roughNode, \":first-child\");\n circleElem.attr(\"class\", \"basic label-container\").attr(\"style\", handleUndefinedAttr(cssStyles));\n } else {\n circleElem = shapeSvg.insert(\"circle\", \":first-child\").attr(\"class\", \"basic label-container\").attr(\"style\", nodeStyles).attr(\"r\", radius).attr(\"cx\", 0).attr(\"cy\", 0);\n }\n updateNodeBounds(node, circleElem);\n node.calcIntersect = function(bounds, point) {\n const radius2 = bounds.width / 2;\n return intersect_default.circle(bounds, radius2, point);\n };\n node.intersect = function(point) {\n log.info(\"Circle intersect\", node, radius, point);\n return intersect_default.circle(node, radius, point);\n };\n return shapeSvg;\n}\n__name(circle, \"circle\");\n\n// src/rendering-util/rendering-elements/shapes/crossedCircle.ts\nimport rough7 from \"roughjs\";\nfunction createLine(r) {\n const xAxis45 = Math.cos(Math.PI / 4);\n const yAxis45 = Math.sin(Math.PI / 4);\n const lineLength = r * 2;\n const pointQ1 = { x: lineLength / 2 * xAxis45, y: lineLength / 2 * yAxis45 };\n const pointQ2 = { x: -(lineLength / 2) * xAxis45, y: lineLength / 2 * yAxis45 };\n const pointQ3 = { x: -(lineLength / 2) * xAxis45, y: -(lineLength / 2) * yAxis45 };\n const pointQ4 = { x: lineLength / 2 * xAxis45, y: -(lineLength / 2) * yAxis45 };\n return `M ${pointQ2.x},${pointQ2.y} L ${pointQ4.x},${pointQ4.y}\n M ${pointQ1.x},${pointQ1.y} L ${pointQ3.x},${pointQ3.y}`;\n}\n__name(createLine, \"createLine\");\nfunction crossedCircle(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n node.label = \"\";\n const shapeSvg = parent.insert(\"g\").attr(\"class\", getNodeClasses(node)).attr(\"id\", node.domId ?? node.id);\n const radius = Math.max(30, node?.width ?? 0);\n const { cssStyles } = node;\n const rc = rough7.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const circleNode = rc.circle(0, 0, radius * 2, options);\n const linePath = createLine(radius);\n const lineNode = rc.path(linePath, options);\n const crossedCircle2 = shapeSvg.insert(() => circleNode, \":first-child\");\n crossedCircle2.insert(() => lineNode);\n crossedCircle2.attr(\"class\", \"outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n crossedCircle2.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n crossedCircle2.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n updateNodeBounds(node, crossedCircle2);\n node.intersect = function(point) {\n log.info(\"crossedCircle intersect\", node, { radius, point });\n const pos = intersect_default.circle(node, radius, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(crossedCircle, \"crossedCircle\");\n\n// src/rendering-util/rendering-elements/shapes/curlyBraceLeft.ts\nimport rough8 from \"roughjs\";\nfunction generateCirclePoints2(centerX, centerY, radius, numPoints = 100, startAngle = 0, endAngle = 180) {\n const points = [];\n const startAngleRad = startAngle * Math.PI / 180;\n const endAngleRad = endAngle * Math.PI / 180;\n const angleRange = endAngleRad - startAngleRad;\n const angleStep = angleRange / (numPoints - 1);\n for (let i = 0; i < numPoints; i++) {\n const angle = startAngleRad + i * angleStep;\n const x = centerX + radius * Math.cos(angle);\n const y = centerY + radius * Math.sin(angle);\n points.push({ x: -x, y: -y });\n }\n return points;\n}\n__name(generateCirclePoints2, \"generateCirclePoints\");\nasync function curlyBraceLeft(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const paddingX = node.look === \"neo\" ? 18 : node.padding ?? 0;\n const paddingY = node.look === \"neo\" ? 12 : node.padding ?? 0;\n const w = bbox.width + paddingX;\n const h = bbox.height + paddingY;\n const radius = Math.max(5, h * 0.1);\n const { cssStyles } = node;\n const points = [\n ...generateCirclePoints2(w / 2, -h / 2, radius, 30, -90, 0),\n { x: -w / 2 - radius, y: radius },\n ...generateCirclePoints2(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints2(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: -w / 2 - radius, y: -h / 2 },\n ...generateCirclePoints2(w / 2, h / 2, radius, 20, 0, 90)\n ];\n const rectPoints = [\n { x: w / 2, y: -h / 2 - radius },\n { x: -w / 2, y: -h / 2 - radius },\n ...generateCirclePoints2(w / 2, -h / 2, radius, 20, -90, 0),\n { x: -w / 2 - radius, y: -radius },\n ...generateCirclePoints2(w / 2 + w * 0.1, -radius, radius, 20, -180, -270),\n ...generateCirclePoints2(w / 2 + w * 0.1, radius, radius, 20, -90, -180),\n { x: -w / 2 - radius, y: h / 2 },\n ...generateCirclePoints2(w / 2, h / 2, radius, 20, 0, 90),\n { x: -w / 2, y: h / 2 + radius },\n { x: w / 2, y: h / 2 + radius }\n ];\n const rc = rough8.svg(shapeSvg);\n const options = userNodeOverrides(node, { fill: \"none\" });\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const curlyBraceLeftPath = createPathFromPoints(points);\n const newCurlyBracePath = curlyBraceLeftPath.replace(\"Z\", \"\");\n const curlyBraceLeftNode = rc.path(newCurlyBracePath, options);\n const rectPath = createPathFromPoints(rectPoints);\n const rectShape = rc.path(rectPath, { ...options });\n const curlyBraceLeftShape = shapeSvg.insert(\"g\", \":first-child\");\n curlyBraceLeftShape.insert(() => rectShape, \":first-child\").attr(\"stroke-opacity\", 0);\n curlyBraceLeftShape.insert(() => curlyBraceLeftNode, \":first-child\");\n curlyBraceLeftShape.attr(\"class\", \"text\");\n if (cssStyles && node.look !== \"handDrawn\") {\n curlyBraceLeftShape.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n curlyBraceLeftShape.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n curlyBraceLeftShape.attr(\"transform\", `translate(${radius}, 0)`);\n label.attr(\n \"transform\",\n `translate(${-w / 2 + radius - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, curlyBraceLeftShape);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, rectPoints, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(curlyBraceLeft, \"curlyBraceLeft\");\n\n// src/rendering-util/rendering-elements/shapes/curlyBraceRight.ts\nimport rough9 from \"roughjs\";\nfunction generateCirclePoints3(centerX, centerY, radius, numPoints = 100, startAngle = 0, endAngle = 180) {\n const points = [];\n const startAngleRad = startAngle * Math.PI / 180;\n const endAngleRad = endAngle * Math.PI / 180;\n const angleRange = endAngleRad - startAngleRad;\n const angleStep = angleRange / (numPoints - 1);\n for (let i = 0; i < numPoints; i++) {\n const angle = startAngleRad + i * angleStep;\n const x = centerX + radius * Math.cos(angle);\n const y = centerY + radius * Math.sin(angle);\n points.push({ x, y });\n }\n return points;\n}\n__name(generateCirclePoints3, \"generateCirclePoints\");\nasync function curlyBraceRight(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const labelPaddingX = node.look === \"neo\" ? 18 : node.padding ?? 0;\n const labelPaddingY = node.look === \"neo\" ? 12 : node.padding ?? 0;\n const w = bbox.width + (node.look === \"neo\" ? labelPaddingX * 2 : labelPaddingX);\n const h = bbox.height + (node.look === \"neo\" ? labelPaddingY * 2 : labelPaddingY);\n const radius = Math.max(5, h * 0.1);\n const { cssStyles } = node;\n const points = [\n ...generateCirclePoints3(w / 2, -h / 2, radius, 20, -90, 0),\n { x: w / 2 + radius, y: -radius },\n ...generateCirclePoints3(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints3(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: w / 2 + radius, y: h / 2 },\n ...generateCirclePoints3(w / 2, h / 2, radius, 20, 0, 90)\n ];\n const rectPoints = [\n { x: -w / 2, y: -h / 2 - radius },\n { x: w / 2, y: -h / 2 - radius },\n ...generateCirclePoints3(w / 2, -h / 2, radius, 20, -90, 0),\n { x: w / 2 + radius, y: -radius },\n ...generateCirclePoints3(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints3(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: w / 2 + radius, y: h / 2 },\n ...generateCirclePoints3(w / 2, h / 2, radius, 20, 0, 90),\n { x: w / 2, y: h / 2 + radius },\n { x: -w / 2, y: h / 2 + radius }\n ];\n const rc = rough9.svg(shapeSvg);\n const options = userNodeOverrides(node, { fill: \"none\" });\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const curlyBraceRightPath = createPathFromPoints(points);\n const newCurlyBracePath = curlyBraceRightPath.replace(\"Z\", \"\");\n const curlyBraceRightNode = rc.path(newCurlyBracePath, options);\n const rectPath = createPathFromPoints(rectPoints);\n const rectShape = rc.path(rectPath, { ...options });\n const curlyBraceRightShape = shapeSvg.insert(\"g\", \":first-child\");\n curlyBraceRightShape.insert(() => rectShape, \":first-child\").attr(\"stroke-opacity\", 0);\n curlyBraceRightShape.insert(() => curlyBraceRightNode, \":first-child\");\n curlyBraceRightShape.attr(\"class\", \"text\");\n if (cssStyles && node.look !== \"handDrawn\") {\n curlyBraceRightShape.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n curlyBraceRightShape.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n curlyBraceRightShape.attr(\"transform\", `translate(${-radius}, 0)`);\n label.attr(\n \"transform\",\n `translate(${-w / 2 + (node.padding ?? 0) / 2 - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, curlyBraceRightShape);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, rectPoints, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(curlyBraceRight, \"curlyBraceRight\");\n\n// src/rendering-util/rendering-elements/shapes/curlyBraces.ts\nimport rough10 from \"roughjs\";\nfunction generateCirclePoints4(centerX, centerY, radius, numPoints = 100, startAngle = 0, endAngle = 180) {\n const points = [];\n const startAngleRad = startAngle * Math.PI / 180;\n const endAngleRad = endAngle * Math.PI / 180;\n const angleRange = endAngleRad - startAngleRad;\n const angleStep = angleRange / (numPoints - 1);\n for (let i = 0; i < numPoints; i++) {\n const angle = startAngleRad + i * angleStep;\n const x = centerX + radius * Math.cos(angle);\n const y = centerY + radius * Math.sin(angle);\n points.push({ x: -x, y: -y });\n }\n return points;\n}\n__name(generateCirclePoints4, \"generateCirclePoints\");\nasync function curlyBraces(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const labelPaddingX = node.look === \"neo\" ? 18 : node.padding ?? 0;\n const labelPaddingY = node.look === \"neo\" ? 12 : node.padding ?? 0;\n const w = bbox.width + (node.look === \"neo\" ? labelPaddingX * 2 : labelPaddingX);\n const h = bbox.height + (node.look === \"neo\" ? labelPaddingY * 2 : labelPaddingY);\n const radius = Math.max(5, h * 0.1);\n const { cssStyles } = node;\n const leftCurlyBracePoints = [\n ...generateCirclePoints4(w / 2, -h / 2, radius, 30, -90, 0),\n { x: -w / 2 - radius, y: radius },\n ...generateCirclePoints4(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints4(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: -w / 2 - radius, y: -h / 2 },\n ...generateCirclePoints4(w / 2, h / 2, radius, 20, 0, 90)\n ];\n const rightCurlyBracePoints = [\n ...generateCirclePoints4(-w / 2 + radius + radius / 2, -h / 2, radius, 20, -90, -180),\n { x: w / 2 - radius / 2, y: radius },\n ...generateCirclePoints4(-w / 2 - radius / 2, -radius, radius, 20, 0, 90),\n ...generateCirclePoints4(-w / 2 - radius / 2, radius, radius, 20, -90, 0),\n { x: w / 2 - radius / 2, y: -radius },\n ...generateCirclePoints4(-w / 2 + radius + radius / 2, h / 2, radius, 30, -180, -270)\n ];\n const rectPoints = [\n { x: w / 2, y: -h / 2 - radius },\n { x: -w / 2, y: -h / 2 - radius },\n ...generateCirclePoints4(w / 2, -h / 2, radius, 20, -90, 0),\n { x: -w / 2 - radius, y: -radius },\n ...generateCirclePoints4(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n ...generateCirclePoints4(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n { x: -w / 2 - radius, y: h / 2 },\n ...generateCirclePoints4(w / 2, h / 2, radius, 20, 0, 90),\n { x: -w / 2, y: h / 2 + radius },\n { x: w / 2 - radius - radius / 2, y: h / 2 + radius },\n ...generateCirclePoints4(-w / 2 + radius + radius / 2, -h / 2, radius, 20, -90, -180),\n { x: w / 2 - radius / 2, y: radius },\n ...generateCirclePoints4(-w / 2 - radius / 2, -radius, radius, 20, 0, 90),\n ...generateCirclePoints4(-w / 2 - radius / 2, radius, radius, 20, -90, 0),\n { x: w / 2 - radius / 2, y: -radius },\n ...generateCirclePoints4(-w / 2 + radius + radius / 2, h / 2, radius, 30, -180, -270)\n ];\n const rc = rough10.svg(shapeSvg);\n const options = userNodeOverrides(node, { fill: \"none\" });\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const leftCurlyBracePath = createPathFromPoints(leftCurlyBracePoints);\n const newLeftCurlyBracePath = leftCurlyBracePath.replace(\"Z\", \"\");\n const leftCurlyBraceNode = rc.path(newLeftCurlyBracePath, options);\n const rightCurlyBracePath = createPathFromPoints(rightCurlyBracePoints);\n const newRightCurlyBracePath = rightCurlyBracePath.replace(\"Z\", \"\");\n const rightCurlyBraceNode = rc.path(newRightCurlyBracePath, options);\n const rectPath = createPathFromPoints(rectPoints);\n const rectShape = rc.path(rectPath, { ...options });\n const curlyBracesShape = shapeSvg.insert(\"g\", \":first-child\");\n curlyBracesShape.insert(() => rectShape, \":first-child\").attr(\"stroke-opacity\", 0);\n curlyBracesShape.insert(() => leftCurlyBraceNode, \":first-child\");\n curlyBracesShape.insert(() => rightCurlyBraceNode, \":first-child\");\n curlyBracesShape.attr(\"class\", \"text\");\n if (cssStyles && node.look !== \"handDrawn\") {\n curlyBracesShape.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n curlyBracesShape.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n curlyBracesShape.attr(\"transform\", `translate(${radius - radius / 4}, 0)`);\n label.attr(\n \"transform\",\n `translate(${-w / 2 + (node.padding ?? 0) / 2 - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, curlyBracesShape);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, rectPoints, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(curlyBraces, \"curlyBraces\");\n\n// src/rendering-util/rendering-elements/shapes/curvedTrapezoid.ts\nimport rough11 from \"roughjs\";\nasync function curvedTrapezoid(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 16 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 12 : nodePadding;\n const minWidth = 20, minHeight = 5;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(minWidth, (bbox.width + labelPaddingX * 2) * 1.25, node?.width ?? 0);\n const h = Math.max(minHeight, bbox.height + labelPaddingY * 2, node?.height ?? 0);\n const radius = h / 2;\n const { cssStyles } = node;\n const rc = rough11.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const totalWidth = w, totalHeight = h;\n const rw = totalWidth - radius;\n const tw = totalHeight / 4;\n const points = [\n { x: rw, y: 0 },\n { x: tw, y: 0 },\n { x: 0, y: totalHeight / 2 },\n { x: tw, y: totalHeight },\n { x: rw, y: totalHeight },\n ...generateCirclePoints(-rw, -totalHeight / 2, radius, 50, 270, 90)\n ];\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n const polygon = shapeSvg.insert(() => shapeNode, \":first-child\");\n polygon.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", nodeStyles);\n }\n polygon.attr(\"transform\", `translate(${-w / 2}, ${-h / 2})`);\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(curvedTrapezoid, \"curvedTrapezoid\");\n\n// src/rendering-util/rendering-elements/shapes/cylinder.ts\nimport rough12 from \"roughjs\";\nvar createCylinderPathD = /* @__PURE__ */ __name((x, y, width, height, rx, ry) => {\n return [\n `M${x},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`\n ].join(\" \");\n}, \"createCylinderPathD\");\nvar createOuterCylinderPathD = /* @__PURE__ */ __name((x, y, width, height, rx, ry) => {\n return [\n `M${x},${y + ry}`,\n `M${x + width},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`\n ].join(\" \");\n}, \"createOuterCylinderPathD\");\nvar createInnerCylinderPathD = /* @__PURE__ */ __name((x, y, width, height, rx, ry) => {\n return [`M${x - width / 2},${-height / 2}`, `a${rx},${ry} 0,0,0 ${width},0`].join(\" \");\n}, \"createInnerCylinderPathD\");\nvar MIN_HEIGHT = 8;\nvar MIN_WIDTH = 8;\nasync function cylinder(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 24 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 24 : nodePadding;\n if (node.width || node.height) {\n const originalWidth = node.width ?? 0;\n node.width = (node.width ?? 0) - labelPaddingY;\n if (node.width < MIN_WIDTH) {\n node.width = MIN_WIDTH;\n }\n const rx2 = originalWidth / 2;\n const ry2 = rx2 / (2.5 + originalWidth / 50);\n node.height = (node.height ?? 0) - labelPaddingX - ry2 * 3;\n if (node.height < MIN_HEIGHT) {\n node.height = MIN_HEIGHT;\n }\n }\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = (node.width ? node.width : bbox.width) + labelPaddingY;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = (node.height ? node.height : bbox.height) + labelPaddingX + ry;\n let cylinder2;\n const { cssStyles } = node;\n if (node.look === \"handDrawn\") {\n const rc = rough12.svg(shapeSvg);\n const outerPathData = createOuterCylinderPathD(0, 0, w, h, rx, ry);\n const innerPathData = createInnerCylinderPathD(0, ry, w, h, rx, ry);\n const options = userNodeOverrides(node, {});\n const outerNode = rc.path(outerPathData, options);\n const innerLine = rc.path(innerPathData, userNodeOverrides(node, { fill: \"none\" }));\n cylinder2 = shapeSvg.insert(() => innerLine, \":first-child\");\n cylinder2 = shapeSvg.insert(() => outerNode, \":first-child\");\n cylinder2.attr(\"class\", \"basic label-container\");\n if (cssStyles) {\n cylinder2.attr(\"style\", cssStyles);\n }\n } else {\n const pathData = createCylinderPathD(0, 0, w, h, rx, ry);\n cylinder2 = shapeSvg.insert(\"path\", \":first-child\").attr(\"d\", pathData).attr(\"class\", \"basic label-container outer-path\").attr(\"style\", handleUndefinedAttr(cssStyles)).attr(\"style\", nodeStyles);\n }\n cylinder2.attr(\"label-offset-y\", ry);\n cylinder2.attr(\"transform\", `translate(${-w / 2}, ${-(h / 2 + ry)})`);\n updateNodeBounds(node, cylinder2);\n label.attr(\n \"transform\",\n `translate(${-(bbox.width / 2) - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + (node.padding ?? 0) / 1.5 - (bbox.y - (bbox.top ?? 0))})`\n );\n node.intersect = function(point) {\n const pos = intersect_default.rect(node, point);\n const x = pos.x - (node.x ?? 0);\n if (rx != 0 && (Math.abs(x) < (node.width ?? 0) / 2 || Math.abs(x) == (node.width ?? 0) / 2 && Math.abs(pos.y - (node.y ?? 0)) > (node.height ?? 0) / 2 - ry)) {\n let y = ry * ry * (1 - x * x / (rx * rx));\n if (y > 0) {\n y = Math.sqrt(y);\n }\n y = ry - y;\n if (point.y - (node.y ?? 0) > 0) {\n y = -y;\n }\n pos.y += y;\n }\n return pos;\n };\n return shapeSvg;\n}\n__name(cylinder, \"cylinder\");\n\n// src/rendering-util/rendering-elements/shapes/drawRect.ts\nimport rough13 from \"roughjs\";\nasync function drawRect(parent, node, options) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const totalWidth = Math.max(bbox.width + options.labelPaddingX * 2, node?.width || 0);\n const totalHeight = Math.max(bbox.height + options.labelPaddingY * 2, node?.height || 0);\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n let rect2;\n let { rx, ry } = node;\n const { cssStyles } = node;\n if (options?.rx && options.ry) {\n rx = options.rx;\n ry = options.ry;\n }\n if (node.look === \"handDrawn\") {\n const rc = rough13.svg(shapeSvg);\n const options2 = userNodeOverrides(node, {});\n const roughNode = rx || ry ? rc.path(createRoundedRectPathD(x, y, totalWidth, totalHeight, rx || 0), options2) : rc.rectangle(x, y, totalWidth, totalHeight, options2);\n rect2 = shapeSvg.insert(() => roughNode, \":first-child\");\n rect2.attr(\"class\", \"basic label-container\").attr(\"style\", handleUndefinedAttr(cssStyles));\n } else {\n rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n rect2.attr(\"class\", \"basic label-container\").attr(\"style\", nodeStyles).attr(\"rx\", handleUndefinedAttr(rx)).attr(\"ry\", handleUndefinedAttr(ry)).attr(\"x\", x).attr(\"y\", y).attr(\"width\", totalWidth).attr(\"height\", totalHeight);\n }\n updateNodeBounds(node, rect2);\n node.calcIntersect = function(bounds, point) {\n return intersect_default.rect(bounds, point);\n };\n node.intersect = function(point) {\n return intersect_default.rect(node, point);\n };\n return shapeSvg;\n}\n__name(drawRect, \"drawRect\");\n\n// src/rendering-util/rendering-elements/shapes/datastore.ts\nimport rough14 from \"roughjs\";\nasync function datastore(parent, node) {\n const { cssClasses, labelPaddingX, labelPaddingY, padding, width, height } = node;\n const rectOptions = {\n rx: 0,\n ry: 0,\n classes: cssClasses ?? \"\",\n labelPaddingX: labelPaddingX ?? (padding ?? 0) * 2,\n labelPaddingY: labelPaddingY ?? padding ?? 0\n };\n const rect2 = await drawRect(parent, node, rectOptions);\n if (node.look === \"handDrawn\") {\n const rc = rough14.svg(rect2);\n const nodeOverrideOptions = userNodeOverrides(node, {});\n const borderSelection = rect2.select(\".basic.label-container > path:nth-child(2)\");\n const borderPath = borderSelection.node();\n if (!borderPath) {\n return rect2;\n }\n let bbox = null;\n if (borderPath instanceof SVGGraphicsElement) {\n bbox = borderPath.getBBox();\n } else {\n return rect2;\n }\n rect2.insert(\n () => rc.line(bbox.x, bbox.y, bbox.x + bbox.width, bbox.y, nodeOverrideOptions),\n \".basic.label-container g.label\"\n );\n rect2.insert(\n () => rc.line(\n bbox.x,\n bbox.y + bbox.height,\n bbox.x + bbox.width,\n bbox.y + bbox.height,\n nodeOverrideOptions\n ),\n \".basic.label-container g.label\"\n );\n borderSelection.remove();\n return rect2;\n }\n const selection = rect2.select(\".basic.label-container\");\n const datastoreWidth = (Number(selection.attr(\"width\")) || width) ?? 0;\n const datastoreHeight = (Number(selection.attr(\"height\")) || height) ?? 0;\n if (datastoreWidth > 0 && datastoreHeight > 0) {\n selection.attr(\"stroke-dasharray\", `${datastoreWidth} ${datastoreHeight}`);\n }\n return rect2;\n}\n__name(datastore, \"datastore\");\n\n// src/rendering-util/rendering-elements/shapes/dividedRect.ts\nimport rough15 from \"roughjs\";\nasync function dividedRectangle(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const paddingX = node.look === \"neo\" ? 16 : node.padding ?? 0;\n const paddingY = node.look === \"neo\" ? 16 : node.padding ?? 0;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = bbox.width + paddingX;\n const h = bbox.height + paddingY;\n const rectOffset2 = h * 0.2;\n const x = -w / 2;\n const y = -h / 2 - rectOffset2 / 2;\n const { cssStyles } = node;\n const rc = rough15.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const pts = [\n { x, y: y + rectOffset2 },\n { x: -x, y: y + rectOffset2 },\n { x: -x, y: -y },\n { x, y: -y },\n { x, y },\n { x: -x, y },\n { x: -x, y: y + rectOffset2 }\n ];\n const poly = rc.polygon(\n pts.map((p) => [p.x, p.y]),\n options\n );\n const polygon = shapeSvg.insert(() => poly, \":first-child\");\n polygon.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n polygon.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n polygon.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n label.attr(\n \"transform\",\n `translate(${x + (node.padding ?? 0) / 2 - (bbox.x - (bbox.left ?? 0))}, ${y + rectOffset2 + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n const pos = intersect_default.rect(node, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(dividedRectangle, \"dividedRectangle\");\n\n// src/rendering-util/rendering-elements/shapes/doubleCircle.ts\nimport rough16 from \"roughjs\";\nasync function doublecircle(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n const gap = node.look === \"neo\" ? 12 : 5;\n node.labelStyle = labelStyles;\n const padding = node.padding ?? 0;\n const labelPadding = node.look === \"neo\" ? 16 : padding;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const outerRadius = (node?.width ? node?.width / 2 : bbox.width / 2) + (labelPadding ?? 0);\n const innerRadius = outerRadius - gap;\n let circleGroup;\n const { cssStyles } = node;\n if (node.look === \"handDrawn\") {\n const rc = rough16.svg(shapeSvg);\n const outerOptions = userNodeOverrides(node, { roughness: 0.2, strokeWidth: 2.5 });\n const innerOptions = userNodeOverrides(node, { roughness: 0.2, strokeWidth: 1.5 });\n const outerRoughNode = rc.circle(0, 0, outerRadius * 2, outerOptions);\n const innerRoughNode = rc.circle(0, 0, innerRadius * 2, innerOptions);\n circleGroup = shapeSvg.insert(\"g\", \":first-child\");\n circleGroup.attr(\"class\", handleUndefinedAttr(node.cssClasses)).attr(\"style\", handleUndefinedAttr(cssStyles));\n circleGroup.node()?.appendChild(outerRoughNode);\n circleGroup.node()?.appendChild(innerRoughNode);\n } else {\n circleGroup = shapeSvg.insert(\"g\", \":first-child\");\n const outerCircle = circleGroup.insert(\"circle\", \":first-child\");\n const innerCircle = circleGroup.insert(\"circle\");\n circleGroup.attr(\"class\", \"basic label-container\").attr(\"style\", nodeStyles);\n outerCircle.attr(\"class\", \"outer-circle\").attr(\"style\", nodeStyles).attr(\"r\", outerRadius).attr(\"cx\", 0).attr(\"cy\", 0);\n innerCircle.attr(\"class\", \"inner-circle\").attr(\"style\", nodeStyles).attr(\"r\", innerRadius).attr(\"cx\", 0).attr(\"cy\", 0);\n }\n updateNodeBounds(node, circleGroup);\n node.intersect = function(point) {\n log.info(\"DoubleCircle intersect\", node, outerRadius, point);\n return intersect_default.circle(node, outerRadius, point);\n };\n return shapeSvg;\n}\n__name(doublecircle, \"doublecircle\");\n\n// src/rendering-util/rendering-elements/shapes/filledCircle.ts\nimport rough17 from \"roughjs\";\nfunction filledCircle(parent, node, { config: { themeVariables } }) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.label = \"\";\n node.labelStyle = labelStyles;\n const shapeSvg = parent.insert(\"g\").attr(\"class\", getNodeClasses(node)).attr(\"id\", node.domId ?? node.id);\n const radius = 7;\n const { cssStyles } = node;\n const rc = rough17.svg(shapeSvg);\n const { nodeBorder } = themeVariables;\n const options = userNodeOverrides(node, { fillStyle: \"solid\" });\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n }\n const circleNode = rc.circle(0, 0, radius * 2, options);\n const filledCircle2 = shapeSvg.insert(() => circleNode, \":first-child\");\n filledCircle2.selectAll(\"path\").attr(\"style\", `fill: ${nodeBorder} !important;`);\n if (cssStyles && cssStyles.length > 0 && node.look !== \"handDrawn\") {\n filledCircle2.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n filledCircle2.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n updateNodeBounds(node, filledCircle2);\n node.intersect = function(point) {\n log.info(\"filledCircle intersect\", node, { radius, point });\n const pos = intersect_default.circle(node, radius, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(filledCircle, \"filledCircle\");\n\n// src/rendering-util/rendering-elements/shapes/flippedTriangle.ts\nimport rough18 from \"roughjs\";\nvar MIN_HEIGHT2 = 10;\nvar MIN_WIDTH2 = 10;\nasync function flippedTriangle(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? nodePadding * 2 : nodePadding;\n if (node.width || node.height) {\n node.height = node?.height ?? 0;\n if (node.height < MIN_HEIGHT2) {\n node.height = MIN_HEIGHT2;\n }\n node.width = (node?.width ?? 0) - labelPaddingX - labelPaddingX / 2;\n if (node.width < MIN_WIDTH2) {\n node.width = MIN_WIDTH2;\n }\n }\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = (node?.width ? node?.width : bbox.width) + (labelPaddingX ?? 0);\n const h = node?.height ? node?.height : w + bbox.height;\n const tw = h;\n const points = [\n { x: 0, y: -h },\n { x: tw, y: -h },\n { x: tw / 2, y: 0 }\n ];\n const { cssStyles } = node;\n const rc = rough18.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n const flippedTriangle2 = shapeSvg.insert(() => roughNode, \":first-child\").attr(\"transform\", `translate(${-h / 2}, ${h / 2})`).attr(\"class\", \"outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n flippedTriangle2.selectChildren(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n flippedTriangle2.selectChildren(\"path\").attr(\"style\", nodeStyles);\n }\n node.width = w;\n node.height = h;\n updateNodeBounds(node, flippedTriangle2);\n label.attr(\n \"transform\",\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-h / 2 + (node.padding ?? 0) / 2 + (bbox.y - (bbox.top ?? 0))})`\n );\n node.intersect = function(point) {\n log.info(\"Triangle intersect\", node, points, point);\n return intersect_default.polygon(node, points, point);\n };\n return shapeSvg;\n}\n__name(flippedTriangle, \"flippedTriangle\");\n\n// src/rendering-util/rendering-elements/shapes/forkJoin.ts\nimport rough19 from \"roughjs\";\nfunction forkJoin(parent, node, { dir, config: { state: state2, themeVariables } }) {\n const { nodeStyles } = styles2String(node);\n node.label = \"\";\n const shapeSvg = parent.insert(\"g\").attr(\"class\", getNodeClasses(node)).attr(\"id\", node.domId ?? node.id);\n const { cssStyles } = node;\n let width = Math.max(70, node?.width ?? 0);\n let height = Math.max(10, node?.height ?? 0);\n if (dir === \"LR\") {\n width = Math.max(10, node?.width ?? 0);\n height = Math.max(70, node?.height ?? 0);\n }\n const x = -1 * width / 2;\n const y = -1 * height / 2;\n const rc = rough19.svg(shapeSvg);\n const options = userNodeOverrides(node, {\n stroke: themeVariables.lineColor,\n fill: themeVariables.lineColor\n });\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const roughNode = rc.rectangle(x, y, width, height, options);\n const shape = shapeSvg.insert(() => roughNode, \":first-child\");\n if (cssStyles && node.look !== \"handDrawn\") {\n shape.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n shape.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n updateNodeBounds(node, shape);\n const padding = state2?.padding ?? 0;\n if (node.width && node.height) {\n node.width += padding / 2 || 0;\n node.height += padding / 2 || 0;\n }\n node.intersect = function(point) {\n return intersect_default.rect(node, point);\n };\n return shapeSvg;\n}\n__name(forkJoin, \"forkJoin\");\n\n// src/rendering-util/rendering-elements/shapes/halfRoundedRectangle.ts\nimport rough20 from \"roughjs\";\nasync function halfRoundedRectangle(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const minWidth = 15, minHeight = 10;\n const paddingX = node.look === \"neo\" ? 16 : node.padding ?? 0;\n const paddingY = node.look === \"neo\" ? 12 : node.padding ?? 0;\n if (node.width || node.height) {\n node.height = (node?.height ?? 0) - paddingY * 2;\n if (node.height < minHeight) {\n node.height = minHeight;\n }\n node.width = (node?.width ?? 0) - paddingX * 2;\n if (node.width < minWidth) {\n node.width = minWidth;\n }\n }\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = (node?.width ? node?.width : Math.max(minWidth, bbox.width)) + paddingX * 2;\n const h = (node?.height ? node?.height : Math.max(minHeight, bbox.height)) + paddingY * 2;\n const radius = h / 2;\n const { cssStyles } = node;\n const rc = rough20.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const points = [\n { x: -w / 2, y: -h / 2 },\n { x: w / 2 - radius, y: -h / 2 },\n ...generateCirclePoints(-w / 2 + radius, 0, radius, 50, 90, 270),\n { x: w / 2 - radius, y: h / 2 },\n { x: -w / 2, y: h / 2 }\n ];\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n const polygon = shapeSvg.insert(() => shapeNode, \":first-child\");\n polygon.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", nodeStyles);\n }\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n log.info(\"Pill intersect\", node, { radius, point });\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(halfRoundedRectangle, \"halfRoundedRectangle\");\n\n// src/rendering-util/rendering-elements/shapes/hexagon.ts\nimport rough21 from \"roughjs\";\nvar createHexagonPathD = /* @__PURE__ */ __name((x, y, width, height, m) => {\n return [\n `M${x + m},${y}`,\n `L${x + width - m},${y}`,\n `L${x + width},${y - height / 2}`,\n `L${x + width - m},${y - height}`,\n `L${x + m},${y - height}`,\n `L${x},${y - height / 2}`,\n \"Z\"\n ].join(\" \");\n}, \"createHexagonPathD\");\nasync function hexagon(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n const f = node.look === \"neo\" ? 3.5 : 4;\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const wa = 70;\n const ha = 32;\n const labelPaddingX = node.look === \"neo\" ? wa : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? ha : nodePadding;\n if (node.width || node.height) {\n const originalHeight = node.height ?? 0;\n const m2 = originalHeight / f;\n node.width = (node?.width ?? 0) - 2 * m2 - labelPaddingY;\n node.height = (node.height ?? 0) - labelPaddingX;\n }\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const h = (node?.height ? node?.height : bbox.height) + labelPaddingX;\n const m = h / f;\n const w = (node?.width ? node?.width : bbox.width) + 2 * m + labelPaddingY;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 }\n ];\n let polygon;\n const { cssStyles } = node;\n if (node.look === \"handDrawn\") {\n const rc = rough21.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createHexagonPathD(0, 0, w, h, m);\n const roughNode = rc.path(pathData, options);\n polygon = shapeSvg.insert(() => roughNode, \":first-child\").attr(\"transform\", `translate(${-w / 2}, ${h / 2})`);\n if (cssStyles) {\n polygon.attr(\"style\", cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n if (nodeStyles) {\n polygon.attr(\"style\", nodeStyles);\n }\n node.width = w;\n node.height = h;\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n return intersect_default.polygon(node, points, point);\n };\n return shapeSvg;\n}\n__name(hexagon, \"hexagon\");\n\n// src/rendering-util/rendering-elements/shapes/hourglass.ts\nimport rough22 from \"roughjs\";\nasync function hourglass(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.label = \"\";\n node.labelStyle = labelStyles;\n const { shapeSvg } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(30, node?.width ?? 0);\n const h = Math.max(30, node?.height ?? 0);\n const { cssStyles } = node;\n const rc = rough22.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: 0, y: h },\n { x: w, y: h }\n ];\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n const polygon = shapeSvg.insert(() => shapeNode, \":first-child\");\n polygon.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", nodeStyles);\n }\n polygon.attr(\"transform\", `translate(${-w / 2}, ${-h / 2})`);\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n log.info(\"Pill intersect\", node, { points });\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(hourglass, \"hourglass\");\n\n// src/rendering-util/rendering-elements/shapes/icon.ts\nimport rough23 from \"roughjs\";\nasync function icon(parent, node, { config: { themeVariables, flowchart } }) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const assetHeight = node.assetHeight ?? 48;\n const assetWidth = node.assetWidth ?? 48;\n const iconSize = Math.max(assetHeight, assetWidth);\n const defaultWidth = flowchart?.wrappingWidth;\n node.width = Math.max(iconSize, defaultWidth ?? 0);\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, \"icon-shape default\");\n const topLabel = node.pos === \"t\";\n const height = iconSize;\n const width = iconSize;\n const { nodeBorder } = themeVariables;\n const { stylesMap } = compileStyles(node);\n const x = -width / 2;\n const y = -height / 2;\n const labelPadding = node.label ? 8 : 0;\n const rc = rough23.svg(shapeSvg);\n const options = userNodeOverrides(node, { stroke: \"none\", fill: \"none\" });\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const iconNode = rc.rectangle(x, y, width, height, options);\n const outerWidth = Math.max(width, bbox.width);\n const outerHeight = height + bbox.height + labelPadding;\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: \"transparent\",\n stroke: \"none\"\n });\n const iconShape = shapeSvg.insert(() => iconNode, \":first-child\");\n const outerShape = shapeSvg.insert(() => outerNode);\n if (node.icon) {\n const iconElem = shapeSvg.append(\"g\");\n iconElem.html(\n `${await getIconSVG(node.icon, {\n height: iconSize,\n width: iconSize,\n fallbackPrefix: \"\"\n })}`\n );\n const iconBBox = iconElem.node().getBBox();\n const iconWidth = iconBBox.width;\n const iconHeight = iconBBox.height;\n const iconX = iconBBox.x;\n const iconY = iconBBox.y;\n iconElem.attr(\n \"transform\",\n `translate(${-iconWidth / 2 - iconX},${topLabel ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY})`\n );\n iconElem.attr(\"style\", `color: ${stylesMap.get(\"stroke\") ?? nodeBorder};`);\n }\n label.attr(\n \"transform\",\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height})`\n );\n iconShape.attr(\n \"transform\",\n `translate(${0},${topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2})`\n );\n updateNodeBounds(node, outerShape);\n node.intersect = function(point) {\n log.info(\"iconSquare intersect\", node, point);\n if (!node.label) {\n return intersect_default.rect(node, point);\n }\n const dx = node.x ?? 0;\n const dy = node.y ?? 0;\n const nodeHeight = node.height ?? 0;\n let points = [];\n if (topLabel) {\n points = [\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding }\n ];\n } else {\n points = [\n { x: dx - width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + height }\n ];\n }\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(icon, \"icon\");\n\n// src/rendering-util/rendering-elements/shapes/iconCircle.ts\nimport rough24 from \"roughjs\";\nasync function iconCircle(parent, node, { config: { themeVariables, flowchart } }) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const assetHeight = node.assetHeight ?? 48;\n const assetWidth = node.assetWidth ?? 48;\n const iconSize = Math.max(assetHeight, assetWidth);\n const defaultWidth = flowchart?.wrappingWidth;\n node.width = Math.max(iconSize, defaultWidth ?? 0);\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, \"icon-shape default\");\n const padding = 20;\n const labelPadding = node.label ? 8 : 0;\n const topLabel = node.pos === \"t\";\n const { nodeBorder, mainBkg } = themeVariables;\n const { stylesMap } = compileStyles(node);\n const rc = rough24.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const fill = stylesMap.get(\"fill\");\n options.stroke = fill ?? mainBkg;\n const iconElem = shapeSvg.append(\"g\");\n if (node.icon) {\n iconElem.html(\n `${await getIconSVG(node.icon, {\n height: iconSize,\n width: iconSize,\n fallbackPrefix: \"\"\n })}`\n );\n }\n const iconBBox = iconElem.node().getBBox();\n const iconWidth = iconBBox.width;\n const iconHeight = iconBBox.height;\n const iconX = iconBBox.x;\n const iconY = iconBBox.y;\n const diameter = Math.max(iconWidth, iconHeight) * Math.SQRT2 + padding * 2;\n const iconNode = rc.circle(0, 0, diameter, options);\n const outerWidth = Math.max(diameter, bbox.width);\n const outerHeight = diameter + bbox.height + labelPadding;\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: \"transparent\",\n stroke: \"none\"\n });\n const iconShape = shapeSvg.insert(() => iconNode, \":first-child\");\n const outerShape = shapeSvg.insert(() => outerNode);\n iconElem.attr(\n \"transform\",\n `translate(${-iconWidth / 2 - iconX},${topLabel ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY})`\n );\n iconElem.attr(\"style\", `color: ${stylesMap.get(\"stroke\") ?? nodeBorder};`);\n label.attr(\n \"transform\",\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height})`\n );\n iconShape.attr(\n \"transform\",\n `translate(${0},${topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2})`\n );\n updateNodeBounds(node, outerShape);\n node.intersect = function(point) {\n log.info(\"iconSquare intersect\", node, point);\n const pos = intersect_default.rect(node, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(iconCircle, \"iconCircle\");\n\n// src/rendering-util/rendering-elements/shapes/iconRounded.ts\nimport rough25 from \"roughjs\";\nasync function iconRounded(parent, node, { config: { themeVariables, flowchart } }) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const assetHeight = node.assetHeight ?? 48;\n const assetWidth = node.assetWidth ?? 48;\n const iconSize = Math.max(assetHeight, assetWidth);\n const defaultWidth = flowchart?.wrappingWidth;\n node.width = Math.max(iconSize, defaultWidth ?? 0);\n const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n parent,\n node,\n \"icon-shape default\"\n );\n const topLabel = node.pos === \"t\";\n const height = iconSize + halfPadding * 2;\n const width = iconSize + halfPadding * 2;\n const { nodeBorder, mainBkg } = themeVariables;\n const { stylesMap } = compileStyles(node);\n const x = -width / 2;\n const y = -height / 2;\n const labelPadding = node.label ? 8 : 0;\n const rc = rough25.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const fill = stylesMap.get(\"fill\");\n options.stroke = fill ?? mainBkg;\n const iconNode = rc.path(createRoundedRectPathD(x, y, width, height, 5), options);\n const outerWidth = Math.max(width, bbox.width);\n const outerHeight = height + bbox.height + labelPadding;\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: \"transparent\",\n stroke: \"none\"\n });\n const iconShape = shapeSvg.insert(() => iconNode, \":first-child\").attr(\"class\", \"icon-shape2\");\n const outerShape = shapeSvg.insert(() => outerNode);\n if (node.icon) {\n const iconElem = shapeSvg.append(\"g\");\n iconElem.html(\n `${await getIconSVG(node.icon, {\n height: iconSize,\n width: iconSize,\n fallbackPrefix: \"\"\n })}`\n );\n const iconBBox = iconElem.node().getBBox();\n const iconWidth = iconBBox.width;\n const iconHeight = iconBBox.height;\n const iconX = iconBBox.x;\n const iconY = iconBBox.y;\n iconElem.attr(\n \"transform\",\n `translate(${-iconWidth / 2 - iconX},${topLabel ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY})`\n );\n iconElem.attr(\"style\", `color: ${stylesMap.get(\"stroke\") ?? nodeBorder};`);\n }\n label.attr(\n \"transform\",\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height})`\n );\n iconShape.attr(\n \"transform\",\n `translate(${0},${topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2})`\n );\n updateNodeBounds(node, outerShape);\n node.intersect = function(point) {\n log.info(\"iconSquare intersect\", node, point);\n if (!node.label) {\n return intersect_default.rect(node, point);\n }\n const dx = node.x ?? 0;\n const dy = node.y ?? 0;\n const nodeHeight = node.height ?? 0;\n let points = [];\n if (topLabel) {\n points = [\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding }\n ];\n } else {\n points = [\n { x: dx - width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + height }\n ];\n }\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(iconRounded, \"iconRounded\");\n\n// src/rendering-util/rendering-elements/shapes/iconSquare.ts\nimport rough26 from \"roughjs\";\nasync function iconSquare(parent, node, { config: { themeVariables, flowchart } }) {\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const assetHeight = node.assetHeight ?? 48;\n const assetWidth = node.assetWidth ?? 48;\n const iconSize = Math.max(assetHeight, assetWidth);\n const defaultWidth = flowchart?.wrappingWidth;\n node.width = Math.max(iconSize, defaultWidth ?? 0);\n const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n parent,\n node,\n \"icon-shape default\"\n );\n const topLabel = node.pos === \"t\";\n const height = iconSize + halfPadding * 2;\n const width = iconSize + halfPadding * 2;\n const { nodeBorder, mainBkg } = themeVariables;\n const { stylesMap } = compileStyles(node);\n const x = -width / 2;\n const y = -height / 2;\n const labelPadding = node.label ? 8 : 0;\n const rc = rough26.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const fill = stylesMap.get(\"fill\");\n options.stroke = fill ?? mainBkg;\n const iconNode = rc.path(createRoundedRectPathD(x, y, width, height, 0.1), options);\n const outerWidth = Math.max(width, bbox.width);\n const outerHeight = height + bbox.height + labelPadding;\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: \"transparent\",\n stroke: \"none\"\n });\n const iconShape = shapeSvg.insert(() => iconNode, \":first-child\");\n const outerShape = shapeSvg.insert(() => outerNode);\n if (node.icon) {\n const iconElem = shapeSvg.append(\"g\");\n iconElem.html(\n `${await getIconSVG(node.icon, {\n height: iconSize,\n width: iconSize,\n fallbackPrefix: \"\"\n })}`\n );\n const iconBBox = iconElem.node().getBBox();\n const iconWidth = iconBBox.width;\n const iconHeight = iconBBox.height;\n const iconX = iconBBox.x;\n const iconY = iconBBox.y;\n iconElem.attr(\n \"transform\",\n `translate(${-iconWidth / 2 - iconX},${topLabel ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY})`\n );\n iconElem.attr(\"style\", `color: ${stylesMap.get(\"stroke\") ?? nodeBorder};`);\n }\n label.attr(\n \"transform\",\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height})`\n );\n iconShape.attr(\n \"transform\",\n `translate(${0},${topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2})`\n );\n updateNodeBounds(node, outerShape);\n node.intersect = function(point) {\n log.info(\"iconSquare intersect\", node, point);\n if (!node.label) {\n return intersect_default.rect(node, point);\n }\n const dx = node.x ?? 0;\n const dy = node.y ?? 0;\n const nodeHeight = node.height ?? 0;\n let points = [];\n if (topLabel) {\n points = [\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy + nodeHeight / 2 },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding }\n ];\n } else {\n points = [\n { x: dx - width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 },\n { x: dx + width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + height },\n { x: dx - width / 2, y: dy - nodeHeight / 2 + height }\n ];\n }\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(iconSquare, \"iconSquare\");\n\n// src/rendering-util/rendering-elements/shapes/imageSquare.ts\nimport rough27 from \"roughjs\";\nasync function imageSquare(parent, node, { config: { flowchart } }) {\n const img = new Image();\n img.src = node?.img ?? \"\";\n await img.decode();\n const imageNaturalWidth = Number(img.naturalWidth.toString().replace(\"px\", \"\"));\n const imageNaturalHeight = Number(img.naturalHeight.toString().replace(\"px\", \"\"));\n node.imageAspectRatio = imageNaturalWidth / imageNaturalHeight;\n const { labelStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const defaultWidth = flowchart?.wrappingWidth;\n node.defaultWidth = flowchart?.wrappingWidth;\n const imageRawWidth = Math.max(\n node.label ? defaultWidth ?? 0 : 0,\n node?.assetWidth ?? imageNaturalWidth\n );\n const imageWidth = node.constraint === \"on\" ? node?.assetHeight ? node.assetHeight * node.imageAspectRatio : imageRawWidth : imageRawWidth;\n const imageHeight = node.constraint === \"on\" ? imageWidth / node.imageAspectRatio : node?.assetHeight ?? imageNaturalHeight;\n node.width = Math.max(imageWidth, defaultWidth ?? 0);\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, \"image-shape default\");\n const topLabel = node.pos === \"t\";\n const x = -imageWidth / 2;\n const y = -imageHeight / 2;\n const labelPadding = node.label ? 8 : 0;\n const rc = rough27.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const imageNode = rc.rectangle(x, y, imageWidth, imageHeight, options);\n const outerWidth = Math.max(imageWidth, bbox.width);\n const outerHeight = imageHeight + bbox.height + labelPadding;\n const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n ...options,\n fill: \"none\",\n stroke: \"none\"\n });\n const iconShape = shapeSvg.insert(() => imageNode, \":first-child\");\n const outerShape = shapeSvg.insert(() => outerNode);\n if (node.img) {\n const image = shapeSvg.append(\"image\");\n image.attr(\"href\", node.img);\n image.attr(\"width\", imageWidth);\n image.attr(\"height\", imageHeight);\n image.attr(\"preserveAspectRatio\", \"none\");\n image.attr(\n \"transform\",\n `translate(${-imageWidth / 2},${topLabel ? outerHeight / 2 - imageHeight : -outerHeight / 2})`\n );\n }\n label.attr(\n \"transform\",\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${topLabel ? -imageHeight / 2 - bbox.height / 2 - labelPadding / 2 : imageHeight / 2 - bbox.height / 2 + labelPadding / 2})`\n );\n iconShape.attr(\n \"transform\",\n `translate(${0},${topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2})`\n );\n updateNodeBounds(node, outerShape);\n node.intersect = function(point) {\n log.info(\"iconSquare intersect\", node, point);\n if (!node.label) {\n return intersect_default.rect(node, point);\n }\n const dx = node.x ?? 0;\n const dy = node.y ?? 0;\n const nodeHeight = node.height ?? 0;\n let points = [];\n if (topLabel) {\n points = [\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + imageWidth / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx + imageWidth / 2, y: dy + nodeHeight / 2 },\n { x: dx - imageWidth / 2, y: dy + nodeHeight / 2 },\n { x: dx - imageWidth / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding }\n ];\n } else {\n points = [\n { x: dx - imageWidth / 2, y: dy - nodeHeight / 2 },\n { x: dx + imageWidth / 2, y: dy - nodeHeight / 2 },\n { x: dx + imageWidth / 2, y: dy - nodeHeight / 2 + imageHeight },\n { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + imageHeight },\n { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + imageHeight },\n { x: dx - imageWidth / 2, y: dy - nodeHeight / 2 + imageHeight }\n ];\n }\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(imageSquare, \"imageSquare\");\n\n// src/rendering-util/rendering-elements/shapes/invertedTrapezoid.ts\nimport rough28 from \"roughjs\";\nasync function inv_trapezoid(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingY = nodePadding;\n const labelPaddingX = node.look === \"neo\" ? nodePadding * 2 : nodePadding;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (labelPaddingX ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (labelPaddingY ?? 0) * 2, node?.height ?? 0);\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w + 3 * h / 6, y: -h },\n { x: -3 * h / 6, y: -h }\n ];\n let polygon;\n const { cssStyles } = node;\n if (node.look === \"handDrawn\") {\n const rc = rough28.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n polygon = shapeSvg.insert(() => roughNode, \":first-child\").attr(\"transform\", `translate(${-w / 2}, ${h / 2})`);\n if (cssStyles) {\n polygon.attr(\"style\", cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n if (nodeStyles) {\n polygon.attr(\"style\", nodeStyles);\n }\n node.width = w;\n node.height = h;\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n return intersect_default.polygon(node, points, point);\n };\n return shapeSvg;\n}\n__name(inv_trapezoid, \"inv_trapezoid\");\n\n// src/rendering-util/rendering-elements/shapes/labelRect.ts\nasync function labelRect(parent, node) {\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, \"label\");\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n const totalWidth = 0.1;\n const totalHeight = 0.1;\n rect2.attr(\"width\", totalWidth).attr(\"height\", totalHeight);\n shapeSvg.attr(\"class\", \"label edgeLabel\");\n label.attr(\n \"transform\",\n `translate(${-(bbox.width / 2) - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, rect2);\n node.intersect = function(point) {\n return intersect_default.rect(node, point);\n };\n return shapeSvg;\n}\n__name(labelRect, \"labelRect\");\n\n// src/rendering-util/rendering-elements/shapes/leanLeft.ts\nimport rough29 from \"roughjs\";\nasync function lean_left(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingY = nodePadding;\n const labelPaddingX = node.look === \"neo\" ? nodePadding * 2 : nodePadding;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const h = (node?.height ?? bbox.height) + labelPaddingY;\n const w = (node?.width ?? bbox.width) + labelPaddingX;\n const points = [\n { x: 0, y: 0 },\n { x: w + 3 * h / 6, y: 0 },\n { x: w, y: -h },\n { x: -(3 * h) / 6, y: -h }\n ];\n let polygon;\n const { cssStyles } = node;\n if (node.look === \"handDrawn\") {\n const rc = rough29.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n polygon = shapeSvg.insert(() => roughNode, \":first-child\").attr(\"transform\", `translate(${-w / 2}, ${h / 2})`);\n if (cssStyles) {\n polygon.attr(\"style\", cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n if (nodeStyles) {\n polygon.attr(\"style\", nodeStyles);\n }\n node.width = w;\n node.height = h;\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n return intersect_default.polygon(node, points, point);\n };\n return shapeSvg;\n}\n__name(lean_left, \"lean_left\");\n\n// src/rendering-util/rendering-elements/shapes/leanRight.ts\nimport rough30 from \"roughjs\";\nasync function lean_right(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingY = nodePadding;\n const labelPaddingX = node.look === \"neo\" ? nodePadding * 2 : nodePadding;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const h = (node?.height ?? bbox.height) + labelPaddingY;\n const w = (node?.width ?? bbox.width) + labelPaddingX;\n const points = [\n { x: -3 * h / 6, y: 0 },\n { x: w, y: 0 },\n { x: w + 3 * h / 6, y: -h },\n { x: 0, y: -h }\n ];\n let polygon;\n const { cssStyles } = node;\n if (node.look === \"handDrawn\") {\n const rc = rough30.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n polygon = shapeSvg.insert(() => roughNode, \":first-child\").attr(\"transform\", `translate(${-w / 2}, ${h / 2})`);\n if (cssStyles) {\n polygon.attr(\"style\", cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n if (nodeStyles) {\n polygon.attr(\"style\", nodeStyles);\n }\n node.width = w;\n node.height = h;\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n return intersect_default.polygon(node, points, point);\n };\n return shapeSvg;\n}\n__name(lean_right, \"lean_right\");\n\n// src/rendering-util/rendering-elements/shapes/lightningBolt.ts\nimport rough31 from \"roughjs\";\nfunction lightningBolt(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.label = \"\";\n node.labelStyle = labelStyles;\n const shapeSvg = parent.insert(\"g\").attr(\"class\", getNodeClasses(node)).attr(\"id\", node.domId ?? node.id);\n const { cssStyles } = node;\n const width = Math.max(35, node?.width ?? 0);\n const height = Math.max(35, node?.height ?? 0);\n const gap = 7;\n const points = [\n { x: width, y: 0 },\n { x: 0, y: height + gap / 2 },\n { x: width - 2 * gap, y: height + gap / 2 },\n { x: 0, y: 2 * height },\n { x: width, y: height - gap / 2 },\n { x: 2 * gap, y: height - gap / 2 }\n ];\n const rc = rough31.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const linePath = createPathFromPoints(points);\n const lineNode = rc.path(linePath, options);\n const lightningBolt2 = shapeSvg.insert(() => lineNode, \":first-child\");\n lightningBolt2.attr(\"class\", \"outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n lightningBolt2.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n lightningBolt2.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n lightningBolt2.attr(\"transform\", `translate(-${width / 2},${-height})`);\n updateNodeBounds(node, lightningBolt2);\n node.intersect = function(point) {\n log.info(\"lightningBolt intersect\", node, point);\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(lightningBolt, \"lightningBolt\");\n\n// src/rendering-util/rendering-elements/shapes/linedCylinder.ts\nimport rough32 from \"roughjs\";\nvar createCylinderPathD2 = /* @__PURE__ */ __name((x, y, width, height, rx, ry, outerOffset) => {\n return [\n `M${x},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`,\n `M${x},${y + ry + outerOffset}`,\n `a${rx},${ry} 0,0,0 ${width},0`\n ].join(\" \");\n}, \"createCylinderPathD\");\nvar createOuterCylinderPathD2 = /* @__PURE__ */ __name((x, y, width, height, rx, ry, outerOffset) => {\n return [\n `M${x},${y + ry}`,\n `M${x + width},${y + ry}`,\n `a${rx},${ry} 0,0,0 ${-width},0`,\n `l0,${height}`,\n `a${rx},${ry} 0,0,0 ${width},0`,\n `l0,${-height}`,\n `M${x},${y + ry + outerOffset}`,\n `a${rx},${ry} 0,0,0 ${width},0`\n ].join(\" \");\n}, \"createOuterCylinderPathD\");\nvar createInnerCylinderPathD2 = /* @__PURE__ */ __name((x, y, width, height, rx, ry) => {\n return [`M${x - width / 2},${-height / 2}`, `a${rx},${ry} 0,0,0 ${width},0`].join(\" \");\n}, \"createInnerCylinderPathD\");\nvar MIN_HEIGHT3 = 10;\nvar MIN_WIDTH3 = 10;\nasync function linedCylinder(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 16 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 24 : nodePadding;\n if (node.width || node.height) {\n const originalWidth = node.width ?? 0;\n node.width = (node.width ?? 0) - labelPaddingX;\n if (node.width < MIN_WIDTH3) {\n node.width = MIN_WIDTH3;\n }\n const rx2 = originalWidth / 2;\n const ry2 = rx2 / (2.5 + originalWidth / 50);\n node.height = (node.height ?? 0) - labelPaddingY - ry2 * 3;\n if (node.height < MIN_HEIGHT3) {\n node.height = MIN_HEIGHT3;\n }\n }\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = (node?.height ? node?.height : bbox.height) + ry + labelPaddingY * 2;\n const outerOffset = h * 0.1;\n let cylinder2;\n const { cssStyles } = node;\n if (node.look === \"handDrawn\") {\n const rc = rough32.svg(shapeSvg);\n const outerPathData = createOuterCylinderPathD2(0, 0, w, h, rx, ry, outerOffset);\n const innerPathData = createInnerCylinderPathD2(0, ry, w, h, rx, ry);\n const options = userNodeOverrides(node, {});\n const outerNode = rc.path(outerPathData, options);\n const innerLine = rc.path(innerPathData, options);\n const innerLineEl = shapeSvg.insert(() => innerLine, \":first-child\");\n innerLineEl.attr(\"class\", \"line\");\n cylinder2 = shapeSvg.insert(() => outerNode, \":first-child\");\n cylinder2.attr(\"class\", \"basic label-container\");\n if (cssStyles) {\n cylinder2.attr(\"style\", cssStyles);\n }\n } else {\n const pathData = createCylinderPathD2(0, 0, w, h, rx, ry, outerOffset);\n cylinder2 = shapeSvg.insert(\"path\", \":first-child\").attr(\"d\", pathData).attr(\"class\", \"basic label-container outer-path\").attr(\"style\", handleUndefinedAttr(cssStyles)).attr(\"style\", nodeStyles);\n }\n cylinder2.attr(\"label-offset-y\", ry);\n cylinder2.attr(\"transform\", `translate(${-w / 2}, ${-(h / 2 + ry)})`);\n updateNodeBounds(node, cylinder2);\n label.attr(\n \"transform\",\n `translate(${-(bbox.width / 2) - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + ry - (bbox.y - (bbox.top ?? 0))})`\n );\n node.intersect = function(point) {\n const pos = intersect_default.rect(node, point);\n const x = pos.x - (node.x ?? 0);\n if (rx != 0 && (Math.abs(x) < (node.width ?? 0) / 2 || Math.abs(x) == (node.width ?? 0) / 2 && Math.abs(pos.y - (node.y ?? 0)) > (node.height ?? 0) / 2 - ry)) {\n let y = ry * ry * (1 - x * x / (rx * rx));\n if (y > 0) {\n y = Math.sqrt(y);\n }\n y = ry - y;\n if (point.y - (node.y ?? 0) > 0) {\n y = -y;\n }\n pos.y += y;\n }\n return pos;\n };\n return shapeSvg;\n}\n__name(linedCylinder, \"linedCylinder\");\n\n// src/rendering-util/rendering-elements/shapes/linedWaveEdgedRect.ts\nimport rough33 from \"roughjs\";\nasync function linedWaveEdgedRect(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 16 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 12 : nodePadding;\n if (node.width || node.height) {\n const originalWidth = node.width;\n node.width = (originalWidth ?? 0) * 10 / 11 - labelPaddingX * 2;\n if (node.width < 10) {\n node.width = 10;\n }\n node.height = (node?.height ?? 0) - labelPaddingY * 2;\n if (node.height < 10) {\n node.height = 10;\n }\n }\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = (node?.width ? node?.width : bbox.width) + (labelPaddingX ?? 0) * 2;\n const h = (node?.height ? node?.height : bbox.height) + (labelPaddingY ?? 0) * 2;\n const waveAmplitude = node.look === \"neo\" ? h / 4 : h / 8;\n const finalH = h + waveAmplitude;\n const { cssStyles } = node;\n const rc = rough33.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const points = [\n { x: -w / 2 - w / 2 * 0.1, y: -finalH / 2 },\n { x: -w / 2 - w / 2 * 0.1, y: finalH / 2 },\n ...generateFullSineWavePoints(\n -w / 2 - w / 2 * 0.1,\n finalH / 2,\n w / 2 + w / 2 * 0.1,\n finalH / 2,\n waveAmplitude,\n 0.8\n ),\n { x: w / 2 + w / 2 * 0.1, y: -finalH / 2 },\n { x: -w / 2 - w / 2 * 0.1, y: -finalH / 2 },\n { x: -w / 2, y: -finalH / 2 },\n { x: -w / 2, y: finalH / 2 * 1.1 },\n { x: -w / 2, y: -finalH / 2 }\n ];\n const poly = rc.polygon(\n points.map((p) => [p.x, p.y]),\n options\n );\n const waveEdgeRect = shapeSvg.insert(() => poly, \":first-child\");\n waveEdgeRect.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n waveEdgeRect.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n waveEdgeRect.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n waveEdgeRect.attr(\"transform\", `translate(0,${-waveAmplitude / 2})`);\n label.attr(\n \"transform\",\n `translate(${-w / 2 + (node.padding ?? 0) + w / 2 * 0.1 / 2 - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - waveAmplitude / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, waveEdgeRect);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(linedWaveEdgedRect, \"linedWaveEdgedRect\");\n\n// src/rendering-util/rendering-elements/shapes/multiRect.ts\nimport rough34 from \"roughjs\";\nasync function multiRect(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 16 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 12 : nodePadding;\n const rectOffset2 = node.look === \"neo\" ? 10 : 5;\n if (node.width || node.height) {\n node.width = Math.max((node?.width ?? 0) - labelPaddingX * 2 - 2 * rectOffset2, 10);\n node.height = Math.max((node?.height ?? 0) - labelPaddingY * 2 - 2 * rectOffset2, 10);\n }\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const totalWidth = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2 + 2 * rectOffset2;\n const totalHeight = (node?.height ? node?.height : bbox.height) + labelPaddingY * 2 + 2 * rectOffset2;\n const w = totalWidth - 2 * rectOffset2;\n const h = totalHeight - 2 * rectOffset2;\n const x = -w / 2;\n const y = -h / 2;\n const { cssStyles } = node;\n const rc = rough34.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const outerPathPoints = [\n { x: x - rectOffset2, y: y + rectOffset2 },\n { x: x - rectOffset2, y: y + h + rectOffset2 },\n { x: x + w - rectOffset2, y: y + h + rectOffset2 },\n { x: x + w - rectOffset2, y: y + h },\n { x: x + w, y: y + h },\n { x: x + w, y: y + h - rectOffset2 },\n { x: x + w + rectOffset2, y: y + h - rectOffset2 },\n { x: x + w + rectOffset2, y: y - rectOffset2 },\n { x: x + rectOffset2, y: y - rectOffset2 },\n { x: x + rectOffset2, y },\n { x, y },\n { x, y: y + rectOffset2 }\n ];\n const innerPathPoints = [\n { x, y: y + rectOffset2 },\n { x: x + w - rectOffset2, y: y + rectOffset2 },\n { x: x + w - rectOffset2, y: y + h },\n { x: x + w, y: y + h },\n { x: x + w, y },\n { x, y }\n ];\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const outerPath = createPathFromPoints(outerPathPoints);\n let outerNode = rc.path(outerPath, options);\n const innerPath = createPathFromPoints(innerPathPoints);\n let innerNode = rc.path(innerPath, options);\n if (node.look !== \"handDrawn\") {\n outerNode = mergePaths(outerNode);\n innerNode = mergePaths(innerNode);\n }\n const multiRect2 = shapeSvg.insert(\"g\", \":first-child\");\n multiRect2.insert(() => outerNode);\n multiRect2.insert(() => innerNode);\n multiRect2.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n multiRect2.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n multiRect2.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n label.attr(\n \"transform\",\n `translate(${-(bbox.width / 2) - rectOffset2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + rectOffset2 - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, multiRect2);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, outerPathPoints, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(multiRect, \"multiRect\");\n\n// src/rendering-util/rendering-elements/shapes/multiWaveEdgedRectangle.ts\nimport rough35 from \"roughjs\";\nasync function multiWaveEdgedRectangle(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 16 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 12 : nodePadding;\n let adjustFinalHeight = true;\n if (node.width || node.height) {\n adjustFinalHeight = false;\n node.width = (node?.width ?? 0) - labelPaddingX * 2;\n node.height = (node?.height ?? 0) - labelPaddingY * 3;\n }\n const w = Math.max(bbox.width, node?.width ?? 0) + labelPaddingX * 2;\n const h = Math.max(bbox.height, node?.height ?? 0) + labelPaddingY * 3;\n const waveAmplitude = node.look === \"neo\" ? h / 4 : h / 8;\n const finalH = h + (adjustFinalHeight ? waveAmplitude / 2 : -waveAmplitude / 2);\n const x = -w / 2;\n const y = -finalH / 2;\n const rectOffset2 = 10;\n const { cssStyles } = node;\n const wavePoints = generateFullSineWavePoints(\n x - rectOffset2,\n y + finalH + rectOffset2,\n x + w - rectOffset2,\n y + finalH + rectOffset2,\n waveAmplitude,\n 0.8\n );\n const lastWavePoint = wavePoints?.[wavePoints.length - 1];\n const outerPathPoints = [\n { x: x - rectOffset2, y: y + rectOffset2 },\n { x: x - rectOffset2, y: y + finalH + rectOffset2 },\n ...wavePoints,\n { x: x + w - rectOffset2, y: lastWavePoint.y - rectOffset2 },\n { x: x + w, y: lastWavePoint.y - rectOffset2 },\n { x: x + w, y: lastWavePoint.y - 2 * rectOffset2 },\n { x: x + w + rectOffset2, y: lastWavePoint.y - 2 * rectOffset2 },\n { x: x + w + rectOffset2, y: y - rectOffset2 },\n { x: x + rectOffset2, y: y - rectOffset2 },\n { x: x + rectOffset2, y },\n { x, y },\n { x, y: y + rectOffset2 }\n ];\n const innerPathPoints = [\n { x, y: y + rectOffset2 },\n { x: x + w - rectOffset2, y: y + rectOffset2 },\n { x: x + w - rectOffset2, y: lastWavePoint.y - rectOffset2 },\n { x: x + w, y: lastWavePoint.y - rectOffset2 },\n { x: x + w, y },\n { x, y }\n ];\n const rc = rough35.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const outerPath = createPathFromPoints(outerPathPoints);\n const outerNode = rc.path(outerPath, options);\n const innerPath = createPathFromPoints(innerPathPoints);\n const innerNode = rc.path(innerPath, options);\n const shape = shapeSvg.insert(() => outerNode, \":first-child\");\n shape.insert(() => innerNode);\n shape.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n shape.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n shape.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n shape.attr(\"transform\", `translate(0,${-waveAmplitude / 2})`);\n label.attr(\n \"transform\",\n `translate(${-(bbox.width / 2) - rectOffset2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + rectOffset2 - waveAmplitude / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, shape);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, outerPathPoints, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(multiWaveEdgedRectangle, \"multiWaveEdgedRectangle\");\n\n// src/rendering-util/rendering-elements/shapes/note.ts\nimport rough36 from \"roughjs\";\nasync function note(parent, node, { config: { themeVariables } }) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const useHtmlLabels = node.useHtmlLabels || getEffectiveHtmlLabels(getConfig());\n if (!useHtmlLabels) {\n node.centerLabel = true;\n }\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const totalWidth = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const totalHeight = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n const { cssStyles } = node;\n const rc = rough36.svg(shapeSvg);\n const options = userNodeOverrides(node, {\n fill: themeVariables.noteBkgColor,\n stroke: themeVariables.noteBorderColor\n });\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const noteShapeNode = rc.rectangle(x, y, totalWidth, totalHeight, options);\n const rect2 = shapeSvg.insert(() => noteShapeNode, \":first-child\");\n rect2.attr(\"class\", \"basic label-container outer-path\");\n label.attr(\"class\", \"label noteLabel\");\n if (cssStyles && node.look !== \"handDrawn\") {\n rect2.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n rect2.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n label.attr(\n \"transform\",\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, rect2);\n node.intersect = function(point) {\n return intersect_default.rect(node, point);\n };\n return shapeSvg;\n}\n__name(note, \"note\");\n\n// src/rendering-util/rendering-elements/shapes/question.ts\nimport rough37 from \"roughjs\";\nvar createDecisionBoxPathD = /* @__PURE__ */ __name((x, y, size) => {\n return [\n `M${x + size / 2},${y}`,\n `L${x + size},${y - size / 2}`,\n `L${x + size / 2},${y - size}`,\n `L${x},${y - size / 2}`,\n \"Z\"\n ].join(\" \");\n}, \"createDecisionBoxPathD\");\nasync function question(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = bbox.width + (node.padding ?? 0);\n const h = bbox.height + (node.padding ?? 0);\n const s = w + h;\n const adjustment = 0.5;\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 }\n ];\n let polygon;\n const { cssStyles } = node;\n if (node.look === \"handDrawn\") {\n const rc = rough37.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createDecisionBoxPathD(0, 0, s);\n const roughNode = rc.path(pathData, options);\n polygon = shapeSvg.insert(() => roughNode, \":first-child\").attr(\"transform\", `translate(${-s / 2 + adjustment}, ${s / 2})`);\n if (cssStyles) {\n polygon.attr(\"style\", cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, s, s, points);\n polygon.attr(\"transform\", `translate(${-s / 2 + adjustment}, ${s / 2})`);\n }\n if (nodeStyles) {\n polygon.attr(\"style\", nodeStyles);\n }\n updateNodeBounds(node, polygon);\n node.calcIntersect = function(bounds, point) {\n const s2 = bounds.width;\n const points2 = [\n { x: s2 / 2, y: 0 },\n { x: s2, y: -s2 / 2 },\n { x: s2 / 2, y: -s2 },\n { x: 0, y: -s2 / 2 }\n ];\n const res = intersect_default.polygon(bounds, points2, point);\n return { x: res.x - 0.5, y: res.y - 0.5 };\n };\n node.intersect = function(point) {\n return this.calcIntersect(node, point);\n };\n return shapeSvg;\n}\n__name(question, \"question\");\n\n// src/rendering-util/rendering-elements/shapes/rectLeftInvArrow.ts\nimport rough38 from \"roughjs\";\nasync function rect_left_inv_arrow(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 21 : nodePadding ?? 0;\n const labelPaddingY = node.look === \"neo\" ? 12 : nodePadding ?? 0;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = (node?.width ?? bbox.width) + (node.look === \"neo\" ? labelPaddingX * 2 : labelPaddingX);\n const h = (node?.height ?? bbox.height) + (node.look === \"neo\" ? labelPaddingY * 2 : labelPaddingY);\n const x = -w / 2;\n const y = -h / 2;\n const notch = y / 2;\n const points = [\n { x: x + notch, y },\n { x, y: 0 },\n { x: x + notch, y: -y },\n { x: -x, y: -y },\n { x: -x, y }\n ];\n const { cssStyles } = node;\n const rc = rough38.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n const polygon = shapeSvg.insert(() => roughNode, \":first-child\");\n polygon.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n polygon.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n polygon.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n polygon.attr(\"transform\", `translate(${-notch / 2},0)`);\n label.attr(\n \"transform\",\n `translate(${-notch / 2 - bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n return intersect_default.polygon(node, points, point);\n };\n return shapeSvg;\n}\n__name(rect_left_inv_arrow, \"rect_left_inv_arrow\");\n\n// src/rendering-util/rendering-elements/shapes/rectWithTitle.ts\nimport { select as select3 } from \"d3\";\nimport rough39 from \"roughjs\";\nasync function rectWithTitle(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n let classes;\n if (!node.cssClasses) {\n classes = \"node default\";\n } else {\n classes = \"node \" + node.cssClasses;\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", classes).attr(\"id\", node.domId || node.id);\n const g = shapeSvg.insert(\"g\");\n const label = shapeSvg.insert(\"g\").attr(\"class\", \"label\").attr(\"style\", nodeStyles);\n const description = node.description;\n const title = node.label;\n const text2 = await createLabel_default(label, title, node.labelStyle, true, true);\n let bbox = { width: 0, height: 0 };\n if (getEffectiveHtmlLabels(getConfig2())) {\n const div2 = text2.children[0];\n const dv2 = select3(text2);\n bbox = div2.getBoundingClientRect();\n dv2.attr(\"width\", bbox.width);\n dv2.attr(\"height\", bbox.height);\n }\n log.info(\"Text 2\", description);\n const textRows = description || [];\n const titleBox = text2.getBBox();\n const descr = await createLabel_default(\n label,\n Array.isArray(textRows) ? textRows.join(\"
\") : textRows,\n node.labelStyle,\n true,\n true\n );\n const div = descr.children[0];\n const dv = select3(descr);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n const halfPadding = (node.padding || 0) / 2;\n select3(descr).attr(\n \"transform\",\n \"translate( \" + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + \", \" + (titleBox.height + halfPadding + 5) + \")\"\n );\n select3(text2).attr(\n \"transform\",\n \"translate( \" + (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + \", 0)\"\n );\n bbox = label.node().getBBox();\n label.attr(\n \"transform\",\n \"translate(\" + -bbox.width / 2 + \", \" + (-bbox.height / 2 - halfPadding + 3) + \")\"\n );\n const totalWidth = bbox.width + (node.padding || 0);\n const totalHeight = bbox.height + (node.padding || 0);\n const x = -bbox.width / 2 - halfPadding;\n const y = -bbox.height / 2 - halfPadding;\n let rect2;\n let innerLine;\n if (node.look === \"handDrawn\") {\n const rc = rough39.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const roughNode = rc.path(\n createRoundedRectPathD(x, y, totalWidth, totalHeight, node.rx || 0),\n options\n );\n const roughLine = rc.line(\n -bbox.width / 2 - halfPadding,\n -bbox.height / 2 - halfPadding + titleBox.height + halfPadding,\n bbox.width / 2 + halfPadding,\n -bbox.height / 2 - halfPadding + titleBox.height + halfPadding,\n options\n );\n innerLine = shapeSvg.insert(() => {\n log.debug(\"Rough node insert CXC\", roughNode);\n return roughLine;\n }, \":first-child\");\n rect2 = shapeSvg.insert(() => {\n log.debug(\"Rough node insert CXC\", roughNode);\n return roughNode;\n }, \":first-child\");\n } else {\n rect2 = g.insert(\"rect\", \":first-child\");\n innerLine = g.insert(\"line\");\n rect2.attr(\"class\", \"outer title-state\").attr(\"style\", nodeStyles).attr(\"x\", -bbox.width / 2 - halfPadding).attr(\"y\", -bbox.height / 2 - halfPadding).attr(\"width\", bbox.width + (node.padding || 0)).attr(\"height\", bbox.height + (node.padding || 0));\n innerLine.attr(\"class\", \"divider\").attr(\"x1\", -bbox.width / 2 - halfPadding).attr(\"x2\", bbox.width / 2 + halfPadding).attr(\"y1\", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr(\"y2\", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n }\n updateNodeBounds(node, rect2);\n node.intersect = function(point) {\n return intersect_default.rect(node, point);\n };\n return shapeSvg;\n}\n__name(rectWithTitle, \"rectWithTitle\");\n\n// src/rendering-util/rendering-elements/shapes/roundedRect.ts\nasync function roundedRect(parent, node, { config: { themeVariables } }) {\n const radius = themeVariables?.radius ?? 5;\n const options = {\n rx: radius,\n ry: radius,\n classes: \"\",\n labelPaddingX: (node?.padding ?? 0) * 1,\n labelPaddingY: (node?.padding ?? 0) * 1\n };\n return drawRect(parent, node, options);\n}\n__name(roundedRect, \"roundedRect\");\n\n// src/rendering-util/rendering-elements/shapes/shadedProcess.ts\nimport rough40 from \"roughjs\";\nvar FRAME_WIDTH = 8;\nasync function shadedProcess(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const paddingX = node.look === \"neo\" ? 16 : node.padding ?? 0;\n const paddingY = node.look === \"neo\" ? 12 : node.padding ?? 0;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const totalWidth = (node?.width ?? bbox.width) + paddingX * 2 + (node.look === \"neo\" ? FRAME_WIDTH : FRAME_WIDTH * 2);\n const totalHeight = (node?.height ?? bbox.height) + paddingY * 2;\n const w = totalWidth - FRAME_WIDTH;\n const h = totalHeight;\n const x = FRAME_WIDTH - totalWidth / 2;\n const y = -totalHeight / 2;\n const { cssStyles } = node;\n const rc = rough40.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const points = [\n { x, y },\n { x: x + w, y },\n { x: x + w, y: y + h },\n { x: x - FRAME_WIDTH, y: y + h },\n { x: x - FRAME_WIDTH, y },\n { x, y },\n { x, y: y + h }\n ];\n const roughNode = rc.polygon(\n points.map((p) => [p.x, p.y]),\n options\n );\n const rect2 = shapeSvg.insert(() => roughNode, \":first-child\");\n rect2.attr(\"class\", \"basic label-container outer-path\").attr(\"style\", handleUndefinedAttr(cssStyles));\n if (nodeStyles && node.look !== \"handDrawn\") {\n rect2.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n if (cssStyles && node.look !== \"handDrawn\") {\n rect2.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n label.attr(\n \"transform\",\n `translate(${FRAME_WIDTH / 2 - bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, rect2);\n node.intersect = function(point) {\n return intersect_default.rect(node, point);\n };\n return shapeSvg;\n}\n__name(shadedProcess, \"shadedProcess\");\n\n// src/rendering-util/rendering-elements/shapes/slopedRect.ts\nimport rough41 from \"roughjs\";\nasync function slopedRect(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 16 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 12 : nodePadding;\n if (node.width || node.height) {\n node.width = Math.max((node?.width ?? 0) - labelPaddingX * 2, 10);\n node.height = Math.max((node?.height ?? 0) / 1.5 - labelPaddingY * 2, 10);\n }\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const totalWidth = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2;\n const totalHeight = ((node?.height ? node?.height : bbox.height) + labelPaddingY * 2) * 1.5;\n const w = totalWidth;\n const h = totalHeight / 1.5;\n const x = -w / 2;\n const y = -h / 2;\n const { cssStyles } = node;\n const rc = rough41.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const points = [\n { x, y },\n { x, y: y + h },\n { x: x + w, y: y + h },\n { x: x + w, y: y - h / 2 }\n ];\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n const polygon = shapeSvg.insert(() => shapeNode, \":first-child\");\n polygon.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", nodeStyles);\n }\n polygon.attr(\"transform\", `translate(0, ${h / 4})`);\n label.attr(\n \"transform\",\n `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))}, ${-h / 4 + (node.padding ?? 0) - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(slopedRect, \"slopedRect\");\n\n// src/rendering-util/rendering-elements/shapes/squareRect.ts\nasync function squareRect2(parent, node) {\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 16 : nodePadding * 2;\n const labelPaddingY = node.look === \"neo\" ? 12 : nodePadding;\n const options = {\n rx: 0,\n ry: 0,\n classes: \"\",\n labelPaddingX: node.labelPaddingX ?? labelPaddingX,\n labelPaddingY\n };\n return drawRect(parent, node, options);\n}\n__name(squareRect2, \"squareRect\");\n\n// src/rendering-util/rendering-elements/shapes/stadium.ts\nimport rough42 from \"roughjs\";\nasync function stadium(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 20 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 12 : nodePadding;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const h = bbox.height + (node.look === \"neo\" ? labelPaddingY * 2 : labelPaddingY);\n const w = bbox.width + h / 4 + (node.look === \"neo\" ? labelPaddingX * 2 : labelPaddingX);\n const radius = h / 2;\n const { cssStyles } = node;\n const rc = rough42.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const points = [\n { x: -w / 2 + radius, y: -h / 2 },\n { x: w / 2 - radius, y: -h / 2 },\n ...generateCirclePoints(-w / 2 + radius, 0, radius, 50, 90, 270),\n { x: w / 2 - radius, y: h / 2 },\n ...generateCirclePoints(w / 2 - radius, 0, radius, 50, 270, 450)\n ];\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n const polygon = shapeSvg.insert(() => shapeNode, \":first-child\");\n polygon.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", nodeStyles);\n }\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(stadium, \"stadium\");\n\n// src/rendering-util/rendering-elements/shapes/state.ts\nasync function state(parent, node) {\n const options = {\n rx: node.look === \"neo\" ? 3 : 5,\n ry: node.look === \"neo\" ? 3 : 5,\n classes: \"flowchart-node\"\n };\n return drawRect(parent, node, options);\n}\n__name(state, \"state\");\n\n// src/rendering-util/rendering-elements/shapes/stateEnd.ts\nimport rough43 from \"roughjs\";\nfunction stateEnd(parent, node, { config: { themeVariables } }) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { cssStyles } = node;\n const { lineColor, stateBorder, nodeBorder, nodeShadow } = themeVariables;\n if (node.width || node.height) {\n if ((node.width ?? 0) < 14) {\n node.width = 14;\n }\n if ((node.height ?? 0) < 14) {\n node.height = 14;\n }\n }\n if (!node.width) {\n node.width = 14;\n }\n if (!node.height) {\n node.height = 14;\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId ?? node.id);\n const rc = rough43.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const roughNode = rc.circle(0, 0, node.width, {\n ...options,\n stroke: lineColor,\n strokeWidth: 2\n });\n const innerFill = stateBorder ?? nodeBorder;\n const innerNodeRadius = (node.width ?? 0) * 5 / 14;\n const roughInnerNode = rc.circle(0, 0, innerNodeRadius, {\n ...options,\n fill: innerFill,\n stroke: innerFill,\n strokeWidth: 2,\n fillStyle: \"solid\"\n });\n const circle2 = shapeSvg.insert(() => roughNode, \":first-child\");\n circle2.insert(() => roughInnerNode);\n if (node.look !== \"handDrawn\") {\n circle2.attr(\"class\", \"outer-path\");\n }\n if (cssStyles) {\n circle2.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles) {\n circle2.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n if (node.width < 25 && nodeShadow && node.look !== \"handDrawn\") {\n const svgId = parent.node()?.ownerSVGElement?.id ?? \"\";\n const filterId = svgId ? `${svgId}-drop-shadow-small` : \"drop-shadow-small\";\n circle2.attr(\"style\", `filter:url(#${filterId})`);\n }\n updateNodeBounds(node, circle2);\n node.intersect = function(point) {\n return intersect_default.circle(node, (node.width ?? 0) / 2, point);\n };\n return shapeSvg;\n}\n__name(stateEnd, \"stateEnd\");\n\n// src/rendering-util/rendering-elements/shapes/stateStart.ts\nimport rough44 from \"roughjs\";\nfunction stateStart(parent, node, { config: { themeVariables } }) {\n const { lineColor, nodeShadow } = themeVariables;\n if (node.width || node.height) {\n if ((node.width ?? 0) < 14) {\n node.width = 14;\n }\n if ((node.height ?? 0) < 14) {\n node.height = 14;\n }\n }\n if (!node.width) {\n node.width = 14;\n }\n if (!node.height) {\n node.height = 14;\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", \"node default\").attr(\"id\", node.domId || node.id);\n let circle2;\n if (node.look === \"handDrawn\") {\n const rc = rough44.svg(shapeSvg);\n const roughNode = rc.circle(0, 0, node.width, solidStateFill(lineColor));\n circle2 = shapeSvg.insert(() => roughNode);\n circle2.attr(\"class\", \"state-start\").attr(\"r\", (node.width ?? 7) / 2).attr(\"width\", node.width ?? 14).attr(\"height\", node.height ?? 14);\n } else {\n circle2 = shapeSvg.insert(\"circle\", \":first-child\");\n circle2.attr(\"class\", \"state-start\").attr(\"r\", (node.width ?? 7) / 2).attr(\"width\", node.width ?? 14).attr(\"height\", node.height ?? 14);\n }\n if (node.width < 25 && nodeShadow && node.look !== \"handDrawn\") {\n const svgId = parent.node()?.ownerSVGElement?.id ?? \"\";\n const filterId = svgId ? `${svgId}-drop-shadow-small` : \"drop-shadow-small\";\n circle2.attr(\"style\", `filter:url(#${filterId})`);\n }\n updateNodeBounds(node, circle2);\n node.intersect = function(point) {\n return intersect_default.circle(node, (node.width ?? 7) / 2, point);\n };\n return shapeSvg;\n}\n__name(stateStart, \"stateStart\");\n\n// src/rendering-util/rendering-elements/shapes/subroutine.ts\nimport rough45 from \"roughjs\";\nvar FRAME_WIDTH2 = 8;\nasync function subroutine(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node?.padding ?? 8;\n const labelPaddingX = node.look === \"neo\" ? 28 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 12 : nodePadding;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const totalWidth = (node?.width ?? bbox.width) + 2 * FRAME_WIDTH2 + labelPaddingX;\n const totalHeight = (node?.height ?? bbox.height) + labelPaddingY;\n const w = totalWidth - 2 * FRAME_WIDTH2;\n const h = totalHeight;\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 }\n ];\n if (node.look === \"handDrawn\") {\n const rc = rough45.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const roughNode = rc.rectangle(x, y, w + 16, h, options);\n const l1 = rc.line(x + FRAME_WIDTH2, y, x + FRAME_WIDTH2, y + h, options);\n const l2 = rc.line(x + FRAME_WIDTH2 + w, y, x + FRAME_WIDTH2 + w, y + h, options);\n shapeSvg.insert(() => l1, \":first-child\");\n shapeSvg.insert(() => l2, \":first-child\");\n const rect2 = shapeSvg.insert(() => roughNode, \":first-child\");\n const { cssStyles } = node;\n rect2.attr(\"class\", \"basic label-container\").attr(\"style\", handleUndefinedAttr(cssStyles));\n updateNodeBounds(node, rect2);\n } else {\n const el = insertPolygonShape(shapeSvg, w, h, points);\n if (nodeStyles) {\n el.attr(\"style\", nodeStyles);\n }\n updateNodeBounds(node, el);\n }\n node.intersect = function(point) {\n return intersect_default.polygon(node, points, point);\n };\n return shapeSvg;\n}\n__name(subroutine, \"subroutine\");\n\n// src/rendering-util/rendering-elements/shapes/taggedRect.ts\nimport rough46 from \"roughjs\";\nvar TAG_RATIO = 0.2;\nasync function taggedRect(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 16 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 12 : nodePadding;\n if (node.width || node.height) {\n node.height = Math.max((node?.height ?? 0) - labelPaddingY * 2, 10);\n node.width = Math.max(\n (node?.width ?? 0) - labelPaddingX * 2 - TAG_RATIO * (node.height + labelPaddingY * 2),\n 10\n );\n }\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const totalHeight = (node?.height ? node?.height : bbox.height) + labelPaddingY * 2;\n const tagWidth = TAG_RATIO * totalHeight;\n const tagHeight = TAG_RATIO * totalHeight;\n const totalWidth = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2 + tagWidth;\n const w = totalWidth - tagWidth;\n const h = totalHeight;\n const x = -w / 2;\n const y = -h / 2;\n const { cssStyles } = node;\n const rc = rough46.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const rectPoints = [\n { x: x - tagWidth / 2, y },\n { x: x + w + tagWidth / 2, y },\n { x: x + w + tagWidth / 2, y: y + h },\n { x: x - tagWidth / 2, y: y + h }\n ];\n const tagPoints = [\n { x: x + w - tagWidth / 2, y: y + h },\n { x: x + w + tagWidth / 2, y: y + h },\n { x: x + w + tagWidth / 2, y: y + h - tagHeight }\n ];\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const rectPath = createPathFromPoints(rectPoints);\n const rectNode = rc.path(rectPath, options);\n const tagPath = createPathFromPoints(tagPoints);\n const tagNode = rc.path(tagPath, { ...options, fillStyle: \"solid\" });\n const taggedRect2 = shapeSvg.insert(() => tagNode, \":first-child\");\n taggedRect2.insert(() => rectNode, \":first-child\");\n taggedRect2.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n taggedRect2.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n taggedRect2.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n updateNodeBounds(node, taggedRect2);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, rectPoints, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(taggedRect, \"taggedRect\");\n\n// src/rendering-util/rendering-elements/shapes/taggedWaveEdgedRectangle.ts\nimport rough47 from \"roughjs\";\nasync function taggedWaveEdgedRectangle(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n const waveAmplitude = h / 8;\n const tagWidth = 0.2 * w;\n const tagHeight = 0.2 * h;\n const finalH = h + waveAmplitude;\n const { cssStyles } = node;\n const rc = rough47.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const points = [\n { x: -w / 2 - w / 2 * 0.1, y: finalH / 2 },\n ...generateFullSineWavePoints(\n -w / 2 - w / 2 * 0.1,\n finalH / 2,\n w / 2 + w / 2 * 0.1,\n finalH / 2,\n waveAmplitude,\n 0.8\n ),\n { x: w / 2 + w / 2 * 0.1, y: -finalH / 2 },\n { x: -w / 2 - w / 2 * 0.1, y: -finalH / 2 }\n ];\n const x = -w / 2 + w / 2 * 0.1;\n const y = -finalH / 2 - tagHeight * 0.4;\n const tagPoints = [\n { x: x + w - tagWidth, y: (y + h) * 1.3 },\n { x: x + w, y: y + h - tagHeight },\n { x: x + w, y: (y + h) * 0.9 },\n ...generateFullSineWavePoints(\n x + w,\n (y + h) * 1.25,\n x + w - tagWidth,\n (y + h) * 1.3,\n -h * 0.02,\n 0.5\n )\n ];\n const waveEdgeRectPath = createPathFromPoints(points);\n const waveEdgeRectNode = rc.path(waveEdgeRectPath, options);\n const taggedWaveEdgeRectPath = createPathFromPoints(tagPoints);\n const taggedWaveEdgeRectNode = rc.path(taggedWaveEdgeRectPath, {\n ...options,\n fillStyle: \"solid\"\n });\n const waveEdgeRect = shapeSvg.insert(() => taggedWaveEdgeRectNode, \":first-child\");\n waveEdgeRect.insert(() => waveEdgeRectNode, \":first-child\");\n waveEdgeRect.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n waveEdgeRect.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n waveEdgeRect.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n waveEdgeRect.attr(\"transform\", `translate(0,${-waveAmplitude / 2})`);\n label.attr(\n \"transform\",\n `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - waveAmplitude / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, waveEdgeRect);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(taggedWaveEdgedRectangle, \"taggedWaveEdgedRectangle\");\n\n// src/rendering-util/rendering-elements/shapes/text.ts\nasync function text(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const totalWidth = Math.max(bbox.width + (node.padding ?? 0), node?.width || 0);\n const totalHeight = Math.max(bbox.height + (node.padding ?? 0), node?.height || 0);\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n const rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n rect2.attr(\"class\", \"text\").attr(\"style\", nodeStyles).attr(\"rx\", 0).attr(\"ry\", 0).attr(\"x\", x).attr(\"y\", y).attr(\"width\", totalWidth).attr(\"height\", totalHeight);\n updateNodeBounds(node, rect2);\n node.intersect = function(point) {\n return intersect_default.rect(node, point);\n };\n return shapeSvg;\n}\n__name(text, \"text\");\n\n// src/rendering-util/rendering-elements/shapes/tiltedCylinder.ts\nimport rough48 from \"roughjs\";\nvar createCylinderPathD3 = /* @__PURE__ */ __name((x, y, width, height, rx, ry) => {\n return `M${x},${y}\n a${rx},${ry} 0,0,1 ${0},${-height}\n l${width},${0}\n a${rx},${ry} 0,0,1 ${0},${height}\n M${width},${-height}\n a${rx},${ry} 0,0,0 ${0},${height}\n l${-width},${0}`;\n}, \"createCylinderPathD\");\nvar createOuterCylinderPathD3 = /* @__PURE__ */ __name((x, y, width, height, rx, ry) => {\n return [\n `M${x},${y}`,\n `M${x + width},${y}`,\n `a${rx},${ry} 0,0,0 ${0},${-height}`,\n `l${-width},0`,\n `a${rx},${ry} 0,0,0 ${0},${height}`,\n `l${width},0`\n ].join(\" \");\n}, \"createOuterCylinderPathD\");\nvar createInnerCylinderPathD3 = /* @__PURE__ */ __name((x, y, width, height, rx, ry) => {\n return [`M${x + width / 2},${-height / 2}`, `a${rx},${ry} 0,0,0 0,${height}`].join(\" \");\n}, \"createInnerCylinderPathD\");\nvar MIN_HEIGHT4 = 5;\nvar MIN_WIDTH4 = 10;\nasync function tiltedCylinder(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPadding = node.look === \"neo\" ? 12 : nodePadding / 2;\n if (node.width || node.height) {\n const originalHeight = node.height ?? 0;\n node.height = (node.height ?? 0) - labelPadding;\n if (node.height < MIN_HEIGHT4) {\n node.height = MIN_HEIGHT4;\n }\n const ry2 = originalHeight / 2;\n const rx2 = ry2 / (2.5 + originalHeight / 50);\n node.width = (node.width ?? 0) - labelPadding - rx2 * 3;\n if (node.width < MIN_WIDTH4) {\n node.width = MIN_WIDTH4;\n }\n }\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const h = (node.height ? node.height : bbox.height) + labelPadding;\n const ry = h / 2;\n const rx = ry / (2.5 + h / 50);\n const w = (node.width ? node.width : bbox.width) + rx + labelPadding;\n const { cssStyles } = node;\n let cylinder2;\n if (node.look === \"handDrawn\") {\n const rc = rough48.svg(shapeSvg);\n const outerPathData = createOuterCylinderPathD3(0, 0, w, h, rx, ry);\n const innerPathData = createInnerCylinderPathD3(0, 0, w, h, rx, ry);\n const outerNode = rc.path(outerPathData, userNodeOverrides(node, {}));\n const innerLine = rc.path(innerPathData, userNodeOverrides(node, { fill: \"none\" }));\n cylinder2 = shapeSvg.insert(() => innerLine, \":first-child\");\n cylinder2 = shapeSvg.insert(() => outerNode, \":first-child\");\n cylinder2.attr(\"class\", \"basic label-container\");\n if (cssStyles) {\n cylinder2.attr(\"style\", cssStyles);\n }\n } else {\n const pathData = createCylinderPathD3(0, 0, w, h, rx, ry);\n cylinder2 = shapeSvg.insert(\"path\", \":first-child\").attr(\"d\", pathData).attr(\"class\", \"basic label-container\").attr(\"style\", handleUndefinedAttr(cssStyles)).attr(\"style\", nodeStyles);\n cylinder2.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles) {\n cylinder2.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles) {\n cylinder2.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n }\n cylinder2.attr(\"label-offset-x\", rx);\n cylinder2.attr(\"transform\", `translate(${-w / 2}, ${h / 2} )`);\n label.attr(\n \"transform\",\n `translate(${-(bbox.width / 2) - rx - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, cylinder2);\n node.intersect = function(point) {\n const pos = intersect_default.rect(node, point);\n const y = pos.y - (node.y ?? 0);\n if (ry != 0 && (Math.abs(y) < (node.height ?? 0) / 2 || Math.abs(y) == (node.height ?? 0) / 2 && Math.abs(pos.x - (node.x ?? 0)) > (node.width ?? 0) / 2 - rx)) {\n let x = rx * rx * (1 - y * y / (ry * ry));\n if (x != 0) {\n x = Math.sqrt(Math.abs(x));\n }\n x = rx - x;\n if (point.x - (node.x ?? 0) > 0) {\n x = -x;\n }\n pos.x += x;\n }\n return pos;\n };\n return shapeSvg;\n}\n__name(tiltedCylinder, \"tiltedCylinder\");\n\n// src/rendering-util/rendering-elements/shapes/trapezoid.ts\nimport rough49 from \"roughjs\";\nasync function trapezoid(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingY = node.look === \"neo\" ? nodePadding : nodePadding;\n const labelPaddingX = node.look === \"neo\" ? nodePadding * 2 : nodePadding;\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const h = (node?.height ?? bbox.height) + labelPaddingY;\n const w = (node?.width ?? bbox.width) + labelPaddingX;\n const points = [\n { x: -3 * h / 6, y: 0 },\n { x: w + 3 * h / 6, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h }\n ];\n let polygon;\n const { cssStyles } = node;\n if (node.look === \"handDrawn\") {\n const rc = rough49.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n polygon = shapeSvg.insert(() => roughNode, \":first-child\").attr(\"transform\", `translate(${-w / 2}, ${h / 2})`);\n if (cssStyles) {\n polygon.attr(\"style\", cssStyles);\n }\n } else {\n polygon = insertPolygonShape(shapeSvg, w, h, points);\n }\n if (nodeStyles) {\n polygon.attr(\"style\", nodeStyles);\n }\n node.width = w;\n node.height = h;\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n return intersect_default.polygon(node, points, point);\n };\n return shapeSvg;\n}\n__name(trapezoid, \"trapezoid\");\n\n// src/rendering-util/rendering-elements/shapes/trapezoidalPentagon.ts\nimport rough50 from \"roughjs\";\nasync function trapezoidalPentagon(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 16 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 12 : nodePadding;\n const minWidth = 15, minHeight = 5;\n if (node.width || node.height) {\n node.height = (node.height ?? 0) - labelPaddingY * 2;\n if (node.height < minHeight) {\n node.height = minHeight;\n }\n node.width = (node.width ?? 0) - labelPaddingX * 2;\n if (node.width < minWidth) {\n node.width = minWidth;\n }\n }\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2;\n const h = (node?.height ? node?.height : bbox.height) + labelPaddingY * 2;\n const { cssStyles } = node;\n const rc = rough50.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const points = [\n { x: -w / 2 * 0.8, y: -h / 2 },\n { x: w / 2 * 0.8, y: -h / 2 },\n { x: w / 2, y: -h / 2 * 0.6 },\n { x: w / 2, y: h / 2 },\n { x: -w / 2, y: h / 2 },\n { x: -w / 2, y: -h / 2 * 0.6 }\n ];\n const pathData = createPathFromPoints(points);\n const shapeNode = rc.path(pathData, options);\n const polygon = shapeSvg.insert(() => shapeNode, \":first-child\");\n polygon.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", nodeStyles);\n }\n updateNodeBounds(node, polygon);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(trapezoidalPentagon, \"trapezoidalPentagon\");\n\n// src/rendering-util/rendering-elements/shapes/triangle.ts\nimport rough51 from \"roughjs\";\nvar MIN_HEIGHT5 = 10;\nvar MIN_WIDTH5 = 10;\nasync function triangle(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? nodePadding * 2 : nodePadding;\n if (node.width || node.height) {\n node.width = ((node?.width ?? 0) - labelPaddingX) / 2;\n if (node.width < MIN_WIDTH5) {\n node.width = MIN_WIDTH5;\n }\n node.height = node?.height ?? 0;\n if (node.height < MIN_HEIGHT5) {\n node.height = MIN_HEIGHT5;\n }\n }\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const useHtmlLabels = evaluate(getConfig2().flowchart?.htmlLabels);\n const w = (node?.width ? node?.width : bbox.width) + labelPaddingX;\n const h = node?.height ? node?.height : w + bbox.height;\n const tw = h;\n const points = [\n { x: 0, y: 0 },\n { x: tw, y: 0 },\n { x: tw / 2, y: -h }\n ];\n const { cssStyles } = node;\n const rc = rough51.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const pathData = createPathFromPoints(points);\n const roughNode = rc.path(pathData, options);\n const polygon = shapeSvg.insert(() => roughNode, \":first-child\").attr(\"transform\", `translate(${-h / 2}, ${h / 2})`).attr(\"class\", \"outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n polygon.selectChildren(\"path\").attr(\"style\", nodeStyles);\n }\n node.width = w;\n node.height = h;\n updateNodeBounds(node, polygon);\n label.attr(\n \"transform\",\n `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${h / 2 - (bbox.height + (node.padding ?? 0) / (useHtmlLabels ? 2 : 1) - (bbox.y - (bbox.top ?? 0)))})`\n );\n node.intersect = function(point) {\n log.info(\"Triangle intersect\", node, points, point);\n return intersect_default.polygon(node, points, point);\n };\n return shapeSvg;\n}\n__name(triangle, \"triangle\");\n\n// src/rendering-util/rendering-elements/shapes/waveEdgedRectangle.ts\nimport rough52 from \"roughjs\";\nasync function waveEdgedRectangle(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 16 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 12 : nodePadding;\n let adjustFinalHeight = true;\n if (node.width || node.height) {\n adjustFinalHeight = false;\n node.width = (node?.width ?? 0) - labelPaddingX * 2;\n if (node.width < 10) {\n node.width = 10;\n }\n node.height = (node?.height ?? 0) - labelPaddingY * 2;\n if (node.height < 10) {\n node.height = 10;\n }\n }\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const w = (node?.width ? node?.width : bbox.width) + (labelPaddingX ?? 0) * 2;\n const h = (node?.height ? node?.height : bbox.height) + (labelPaddingY ?? 0) * 2;\n const waveAmplitude = node.look === \"neo\" ? h / 4 : h / 8;\n const finalH = h + (adjustFinalHeight ? waveAmplitude : -waveAmplitude);\n const { cssStyles } = node;\n const minWidth = 14;\n const widthDif = minWidth - w;\n const extraW = widthDif > 0 ? widthDif / 2 : 0;\n const rc = rough52.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const points = [\n { x: -w / 2 - extraW, y: finalH / 2 },\n ...generateFullSineWavePoints(\n -w / 2 - extraW,\n finalH / 2,\n w / 2 + extraW,\n finalH / 2,\n waveAmplitude,\n 0.8\n ),\n { x: w / 2 + extraW, y: -finalH / 2 },\n { x: -w / 2 - extraW, y: -finalH / 2 }\n ];\n const waveEdgeRectPath = createPathFromPoints(points);\n const waveEdgeRectNode = rc.path(waveEdgeRectPath, options);\n const waveEdgeRect = shapeSvg.insert(() => waveEdgeRectNode, \":first-child\");\n waveEdgeRect.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n waveEdgeRect.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n waveEdgeRect.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n waveEdgeRect.attr(\"transform\", `translate(0,${-waveAmplitude / 2})`);\n label.attr(\n \"transform\",\n `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - waveAmplitude - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, waveEdgeRect);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(waveEdgedRectangle, \"waveEdgedRectangle\");\n\n// src/rendering-util/rendering-elements/shapes/waveRectangle.ts\nimport rough53 from \"roughjs\";\nasync function waveRectangle(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const nodePadding = node.padding ?? 0;\n const labelPaddingX = node.look === \"neo\" ? 16 : nodePadding;\n const labelPaddingY = node.look === \"neo\" ? 20 : nodePadding;\n if (node.width || node.height) {\n node.width = node?.width ?? 0;\n if (node.width < 20) {\n node.width = 20;\n }\n node.height = node?.height ?? 0;\n if (node.height < 10) {\n node.height = 10;\n }\n const waveAmplitude2 = Math.min(node.height * 0.2, node.height / 4);\n node.height = Math.ceil(node.height - labelPaddingY - waveAmplitude2 * (20 / 9));\n node.width = node.width - labelPaddingX * 2;\n }\n const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n const w = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2;\n const h = (node?.height ? node?.height : bbox.height) + labelPaddingY;\n const waveAmplitude = h / 8;\n const finalH = h + waveAmplitude * 2;\n const { cssStyles } = node;\n const rc = rough53.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const points = [\n { x: -w / 2, y: finalH / 2 },\n ...generateFullSineWavePoints(-w / 2, finalH / 2, w / 2, finalH / 2, waveAmplitude, 1),\n { x: w / 2, y: -finalH / 2 },\n ...generateFullSineWavePoints(w / 2, -finalH / 2, -w / 2, -finalH / 2, waveAmplitude, -1)\n ];\n const waveRectPath = createPathFromPoints(points);\n const waveRectNode = rc.path(waveRectPath, options);\n const waveRect = shapeSvg.insert(() => waveRectNode, \":first-child\");\n waveRect.attr(\"class\", \"basic label-container\");\n if (cssStyles && node.look !== \"handDrawn\") {\n waveRect.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n waveRect.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n updateNodeBounds(node, waveRect);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, points, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(waveRectangle, \"waveRectangle\");\n\n// src/rendering-util/rendering-elements/shapes/windowPane.ts\nimport rough54 from \"roughjs\";\nvar rectOffset = 10;\nasync function windowPane(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const paddingX = node.look === \"neo\" ? 16 : node.padding ?? 0;\n const paddingY = node.look === \"neo\" ? 12 : node.padding ?? 0;\n if (node.width || node.height) {\n node.width = Math.max((node?.width ?? 0) - paddingX * 2 - rectOffset, 10);\n node.height = Math.max((node?.height ?? 0) - paddingY * 2 - rectOffset, 10);\n }\n const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n const totalWidth = (node?.width ? node?.width : bbox.width) + paddingX * 2 + rectOffset;\n const totalHeight = (node?.height ? node?.height : bbox.height) + paddingY * 2 + rectOffset;\n const w = totalWidth - rectOffset;\n const h = totalHeight - rectOffset;\n const x = -w / 2;\n const y = -h / 2;\n const { cssStyles } = node;\n const rc = rough54.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const outerPathPoints = [\n { x: x - rectOffset, y: y - rectOffset },\n { x: x - rectOffset, y: y + h },\n { x: x + w, y: y + h },\n { x: x + w, y: y - rectOffset }\n ];\n const path = `M${x - rectOffset},${y - rectOffset} L${x + w},${y - rectOffset} L${x + w},${y + h} L${x - rectOffset},${y + h} L${x - rectOffset},${y - rectOffset}\n M${x - rectOffset},${y} L${x + w},${y}\n M${x},${y - rectOffset} L${x},${y + h}`;\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const no = rc.path(path, options);\n const windowPane2 = shapeSvg.insert(() => no, \":first-child\");\n windowPane2.attr(\"transform\", `translate(${rectOffset / 2}, ${rectOffset / 2})`);\n windowPane2.attr(\"class\", \"basic label-container outer-path\");\n if (cssStyles && node.look !== \"handDrawn\") {\n windowPane2.selectAll(\"path\").attr(\"style\", cssStyles);\n }\n if (nodeStyles && node.look !== \"handDrawn\") {\n windowPane2.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n label.attr(\n \"transform\",\n `translate(${-(bbox.width / 2) + rectOffset / 2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + rectOffset / 2 - (bbox.y - (bbox.top ?? 0))})`\n );\n updateNodeBounds(node, windowPane2);\n node.intersect = function(point) {\n const pos = intersect_default.polygon(node, outerPathPoints, point);\n return pos;\n };\n return shapeSvg;\n}\n__name(windowPane, \"windowPane\");\n\n// src/rendering-util/rendering-elements/shapes/erBox.ts\nimport rough55 from \"roughjs\";\nimport { select as select4 } from \"d3\";\nvar COLOR_THEMES = /* @__PURE__ */ new Set([\"redux-color\", \"redux-dark-color\"]);\nvar REDUX_THEMES = /* @__PURE__ */ new Set([\"redux\", \"redux-dark\", \"redux-color\", \"redux-dark-color\"]);\nasync function erBox(parent, node) {\n const entityNode = node;\n if (entityNode.alias) {\n node.label = entityNode.alias;\n }\n const { theme, themeVariables } = getConfig();\n const { rowEven, rowOdd, nodeBorder, borderColorArray } = themeVariables;\n if (node.look === \"handDrawn\") {\n const { themeVariables: themeVariables2 } = getConfig();\n const { background } = themeVariables2;\n const backgroundNode = {\n ...node,\n id: node.id + \"-background\",\n domId: (node.domId || node.id) + \"-background\",\n look: \"default\",\n cssStyles: [\"stroke: none\", `fill: ${background}`]\n };\n await erBox(parent, backgroundNode);\n }\n const config = getConfig();\n node.useHtmlLabels = config.htmlLabels;\n let PADDING = config.er?.diagramPadding ?? 10;\n let TEXT_PADDING = config.er?.entityPadding ?? 6;\n const { cssStyles } = node;\n const { labelStyles, nodeStyles } = styles2String(node);\n if (entityNode.attributes.length === 0 && node.label) {\n const options2 = {\n rx: 0,\n ry: 0,\n labelPaddingX: PADDING,\n labelPaddingY: PADDING * 1.5,\n classes: \"\"\n };\n if (calculateTextWidth(node.label, config) + options2.labelPaddingX * 2 < config.er.minEntityWidth) {\n node.width = config.er.minEntityWidth;\n }\n const shapeSvg2 = await drawRect(parent, node, options2);\n if (theme != null && COLOR_THEMES.has(theme)) {\n const colorIndex = entityNode.colorIndex ?? 0;\n shapeSvg2.attr(\"data-color-id\", `color-${colorIndex % borderColorArray.length}`);\n }\n if (!evaluate(config.htmlLabels)) {\n const textElement = shapeSvg2.select(\"text\");\n const bbox = textElement.node()?.getBBox();\n textElement.attr(\"transform\", `translate(${-bbox.width / 2}, 0)`);\n }\n return shapeSvg2;\n }\n if (!config.htmlLabels) {\n PADDING *= 1.25;\n TEXT_PADDING *= 1.25;\n }\n let cssClasses = getNodeClasses(node);\n if (!cssClasses) {\n cssClasses = \"node default\";\n }\n const shapeSvg = parent.insert(\"g\").attr(\"class\", cssClasses).attr(\"id\", node.domId || node.id);\n const nameBBox = await addText(shapeSvg, node.label ?? \"\", config, 0, 0, [\"name\"], labelStyles);\n nameBBox.height += TEXT_PADDING;\n let yOffset = 0;\n const yOffsets = [];\n const rows = [];\n let maxTypeWidth = 0;\n let maxNameWidth = 0;\n let maxKeysWidth = 0;\n let maxCommentWidth = 0;\n let keysPresent = true;\n let commentPresent = true;\n for (const attribute of entityNode.attributes) {\n const typeBBox = await addText(\n shapeSvg,\n attribute.type,\n config,\n 0,\n yOffset,\n [\"attribute-type\"],\n labelStyles\n );\n maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width + PADDING);\n const nameBBox2 = await addText(\n shapeSvg,\n attribute.name,\n config,\n 0,\n yOffset,\n [\"attribute-name\"],\n labelStyles\n );\n maxNameWidth = Math.max(maxNameWidth, nameBBox2.width + PADDING);\n const keysBBox = await addText(\n shapeSvg,\n attribute.keys.join(),\n config,\n 0,\n yOffset,\n [\"attribute-keys\"],\n labelStyles\n );\n maxKeysWidth = Math.max(maxKeysWidth, keysBBox.width + PADDING);\n const commentBBox = await addText(\n shapeSvg,\n attribute.comment,\n config,\n 0,\n yOffset,\n [\"attribute-comment\"],\n labelStyles\n );\n maxCommentWidth = Math.max(maxCommentWidth, commentBBox.width + PADDING);\n const rowHeight = Math.max(typeBBox.height, nameBBox2.height, keysBBox.height, commentBBox.height) + TEXT_PADDING;\n rows.push({ yOffset, rowHeight });\n yOffset += rowHeight;\n }\n let totalWidthSections = 4;\n if (maxKeysWidth <= PADDING) {\n keysPresent = false;\n maxKeysWidth = 0;\n totalWidthSections--;\n }\n if (maxCommentWidth <= PADDING) {\n commentPresent = false;\n maxCommentWidth = 0;\n totalWidthSections--;\n }\n const shapeBBox = shapeSvg.node().getBBox();\n if (nameBBox.width + PADDING * 2 - (maxTypeWidth + maxNameWidth + maxKeysWidth + maxCommentWidth) > 0) {\n const difference = nameBBox.width + PADDING * 2 - (maxTypeWidth + maxNameWidth + maxKeysWidth + maxCommentWidth);\n maxTypeWidth += difference / totalWidthSections;\n maxNameWidth += difference / totalWidthSections;\n if (maxKeysWidth > 0) {\n maxKeysWidth += difference / totalWidthSections;\n }\n if (maxCommentWidth > 0) {\n maxCommentWidth += difference / totalWidthSections;\n }\n }\n const maxWidth = maxTypeWidth + maxNameWidth + maxKeysWidth + maxCommentWidth;\n const rc = rough55.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n let totalShapeBBoxHeight = 0;\n if (rows.length > 0) {\n totalShapeBBoxHeight = rows.reduce((sum, row) => sum + (row?.rowHeight ?? 0), 0);\n }\n const w = Math.max(shapeBBox.width + PADDING * 2, node?.width || 0, maxWidth);\n const h = Math.max((totalShapeBBoxHeight ?? 0) + nameBBox.height, node?.height || 0);\n const x = -w / 2;\n const y = -h / 2;\n shapeSvg.selectAll(\"g:not(:first-child)\").each((_, i, nodes) => {\n const text2 = select4(nodes[i]);\n const transform = text2.attr(\"transform\");\n let translateX = 0;\n let translateY = 0;\n if (transform) {\n const regex = RegExp(/translate\\(([^,]+),([^)]+)\\)/);\n const translate = regex.exec(transform);\n if (translate) {\n translateX = parseFloat(translate[1]);\n translateY = parseFloat(translate[2]);\n if (text2.attr(\"class\").includes(\"attribute-name\")) {\n translateX += maxTypeWidth;\n } else if (text2.attr(\"class\").includes(\"attribute-keys\")) {\n translateX += maxTypeWidth + maxNameWidth;\n } else if (text2.attr(\"class\").includes(\"attribute-comment\")) {\n translateX += maxTypeWidth + maxNameWidth + maxKeysWidth;\n }\n }\n }\n text2.attr(\n \"transform\",\n `translate(${x + PADDING / 2 + translateX}, ${translateY + y + nameBBox.height + TEXT_PADDING / 2})`\n );\n });\n shapeSvg.select(\".name\").attr(\"transform\", \"translate(\" + -nameBBox.width / 2 + \", \" + (y + TEXT_PADDING / 2) + \")\");\n if (theme != null && COLOR_THEMES.has(theme)) {\n const colorIndex = entityNode.colorIndex ?? 0;\n shapeSvg.attr(\"data-color-id\", `color-${colorIndex % borderColorArray.length}`);\n }\n const roughRect = rc.rectangle(x, y, w, h, options);\n const rect2 = shapeSvg.insert(() => roughRect, \":first-child\").attr(\"class\", \"outer-path\").attr(\"style\", cssStyles.join(\"\"));\n yOffsets.push(0);\n for (const [i, row] of rows.entries()) {\n const contentRowIndex = i + 1;\n const isEven = contentRowIndex % 2 === 0 && row.yOffset !== 0;\n const roughRect2 = rc.rectangle(x, nameBBox.height + y + row?.yOffset, w, row?.rowHeight, {\n ...options,\n fill: isEven ? rowEven : rowOdd,\n stroke: nodeBorder\n });\n shapeSvg.insert(() => roughRect2, \"g.label\").attr(\"style\", cssStyles.join(\"\")).attr(\"class\", `row-rect-${isEven ? \"even\" : \"odd\"}`);\n }\n const thickness = 1e-4;\n let points = lineToPolygon(x, nameBBox.height + y, w + x, nameBBox.height + y, thickness);\n let roughLine = rc.polygon(\n points.map((p) => [p.x, p.y]),\n options\n );\n shapeSvg.insert(() => roughLine).attr(\"class\", \"divider\");\n points = lineToPolygon(maxTypeWidth + x, nameBBox.height + y, maxTypeWidth + x, h + y, thickness);\n roughLine = rc.polygon(\n points.map((p) => [p.x, p.y]),\n options\n );\n shapeSvg.insert(() => roughLine).attr(\"class\", \"divider\");\n if (keysPresent) {\n const xCoord = maxTypeWidth + maxNameWidth + x;\n points = lineToPolygon(xCoord, nameBBox.height + y, xCoord, h + y, thickness);\n roughLine = rc.polygon(\n points.map((p) => [p.x, p.y]),\n options\n );\n shapeSvg.insert(() => roughLine).attr(\"class\", \"divider\");\n }\n if (commentPresent) {\n const xCoord = maxTypeWidth + maxNameWidth + maxKeysWidth + x;\n points = lineToPolygon(xCoord, nameBBox.height + y, xCoord, h + y, thickness);\n roughLine = rc.polygon(\n points.map((p) => [p.x, p.y]),\n options\n );\n shapeSvg.insert(() => roughLine).attr(\"class\", \"divider\");\n }\n for (const yOffset2 of yOffsets) {\n const yCoord = nameBBox.height + y + yOffset2;\n points = lineToPolygon(x, yCoord, w + x, yCoord, thickness);\n roughLine = rc.polygon(\n points.map((p) => [p.x, p.y]),\n options\n );\n shapeSvg.insert(() => roughLine).attr(\"class\", \"divider\");\n }\n updateNodeBounds(node, rect2);\n if (nodeStyles && node.look !== \"handDrawn\") {\n if (theme != null && REDUX_THEMES.has(theme)) {\n shapeSvg.selectAll(\"path\").attr(\"style\", nodeStyles);\n } else {\n const allStyle = nodeStyles.split(\";\");\n const strokeStyles = allStyle?.filter((e) => {\n return e.includes(\"stroke\");\n })?.map((s) => `${s}`).join(\"; \");\n shapeSvg.selectAll(\"path\").attr(\"style\", strokeStyles ?? \"\");\n shapeSvg.selectAll(\".row-rect-even path\").attr(\"style\", nodeStyles);\n }\n }\n node.intersect = function(point) {\n return intersect_default.rect(node, point);\n };\n return shapeSvg;\n}\n__name(erBox, \"erBox\");\nasync function addText(shapeSvg, labelText, config, translateX = 0, translateY = 0, classes = [], style = \"\") {\n const label = shapeSvg.insert(\"g\").attr(\"class\", `label ${classes.join(\" \")}`).attr(\"transform\", `translate(${translateX}, ${translateY})`).attr(\"style\", style);\n if (labelText !== parseGenericTypes(labelText)) {\n labelText = parseGenericTypes(labelText);\n labelText = labelText.replaceAll(\"<\", \"<\").replaceAll(\">\", \">\");\n }\n const text2 = label.node().appendChild(\n await createText(\n label,\n labelText,\n {\n width: calculateTextWidth(labelText, config) + 100,\n style,\n useHtmlLabels: config.htmlLabels\n },\n config\n )\n );\n if (labelText.includes(\"<\") || labelText.includes(\">\")) {\n let child = text2.children[0];\n child.textContent = child.textContent.replaceAll(\"<\", \"<\").replaceAll(\">\", \">\");\n while (child.childNodes[0]) {\n child = child.childNodes[0];\n child.textContent = child.textContent.replaceAll(\"<\", \"<\").replaceAll(\">\", \">\");\n }\n }\n let bbox = text2.getBBox();\n if (evaluate(config.htmlLabels)) {\n const div = text2.children[0];\n div.style.textAlign = \"start\";\n const dv = select4(text2);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n return bbox;\n}\n__name(addText, \"addText\");\nfunction lineToPolygon(x1, y1, x2, y2, thickness) {\n if (x1 === x2) {\n return [\n { x: x1 - thickness / 2, y: y1 },\n { x: x1 + thickness / 2, y: y1 },\n { x: x2 + thickness / 2, y: y2 },\n { x: x2 - thickness / 2, y: y2 }\n ];\n }\n return [\n { x: x1, y: y1 - thickness / 2 },\n { x: x1, y: y1 + thickness / 2 },\n { x: x2, y: y2 + thickness / 2 },\n { x: x2, y: y2 - thickness / 2 }\n ];\n}\n__name(lineToPolygon, \"lineToPolygon\");\n\n// src/rendering-util/rendering-elements/shapes/classBox.ts\nimport { select as select6 } from \"d3\";\nimport rough56 from \"roughjs\";\n\n// src/diagrams/class/shapeUtil.ts\nimport { select as select5 } from \"d3\";\nasync function textHelper(parent, node, config, useHtmlLabels, GAP = config.class.padding ?? 12) {\n const TEXT_PADDING = !useHtmlLabels ? 3 : 0;\n const shapeSvg = parent.insert(\"g\").attr(\"class\", getNodeClasses(node)).attr(\"id\", node.domId || node.id);\n let annotationGroup = null;\n let labelGroup = null;\n let membersGroup = null;\n let methodsGroup = null;\n let annotationGroupHeight = 0;\n let labelGroupHeight = 0;\n let membersGroupHeight = 0;\n annotationGroup = shapeSvg.insert(\"g\").attr(\"class\", \"annotation-group text\");\n if (node.annotations.length > 0) {\n const annotation = node.annotations[0];\n await addText2(annotationGroup, { text: `\\xAB${annotation}\\xBB` }, 0);\n const annotationGroupBBox = annotationGroup.node().getBBox();\n annotationGroupHeight = annotationGroupBBox.height;\n }\n labelGroup = shapeSvg.insert(\"g\").attr(\"class\", \"label-group text\");\n await addText2(labelGroup, node, 0, [\"font-weight: bolder\"]);\n const labelGroupBBox = labelGroup.node().getBBox();\n labelGroupHeight = labelGroupBBox.height;\n membersGroup = shapeSvg.insert(\"g\").attr(\"class\", \"members-group text\");\n let yOffset = 0;\n for (const member of node.members) {\n const height = await addText2(membersGroup, member, yOffset, [member.parseClassifier()]);\n yOffset += height + TEXT_PADDING;\n }\n membersGroupHeight = membersGroup.node().getBBox().height;\n if (membersGroupHeight <= 0) {\n membersGroupHeight = GAP / 2;\n }\n methodsGroup = shapeSvg.insert(\"g\").attr(\"class\", \"methods-group text\");\n let methodsYOffset = 0;\n for (const method of node.methods) {\n const height = await addText2(methodsGroup, method, methodsYOffset, [method.parseClassifier()]);\n methodsYOffset += height + TEXT_PADDING;\n }\n let bbox = shapeSvg.node().getBBox();\n if (annotationGroup !== null) {\n const annotationGroupBBox = annotationGroup.node().getBBox();\n annotationGroup.attr(\"transform\", `translate(${-annotationGroupBBox.width / 2})`);\n }\n labelGroup.attr(\"transform\", `translate(${-labelGroupBBox.width / 2}, ${annotationGroupHeight})`);\n bbox = shapeSvg.node().getBBox();\n membersGroup.attr(\n \"transform\",\n `translate(${0}, ${annotationGroupHeight + labelGroupHeight + GAP * 2})`\n );\n bbox = shapeSvg.node().getBBox();\n methodsGroup.attr(\n \"transform\",\n `translate(${0}, ${annotationGroupHeight + labelGroupHeight + (membersGroupHeight ? membersGroupHeight + GAP * 4 : GAP * 2)})`\n );\n bbox = shapeSvg.node().getBBox();\n return { shapeSvg, bbox };\n}\n__name(textHelper, \"textHelper\");\nasync function addText2(parentGroup, node, yOffset, styles = []) {\n const textEl = parentGroup.insert(\"g\").attr(\"class\", \"label\").attr(\"style\", styles.join(\"; \"));\n const config = getConfig();\n let useHtmlLabels = \"useHtmlLabels\" in node ? node.useHtmlLabels : evaluate(config.htmlLabels) ?? true;\n let textContent = \"\";\n if (\"text\" in node) {\n textContent = node.text;\n } else {\n textContent = node.label;\n }\n if (!useHtmlLabels && textContent.startsWith(\"\\\\\")) {\n textContent = textContent.substring(1);\n }\n if (hasKatex(textContent)) {\n useHtmlLabels = true;\n }\n const text2 = await createText(\n textEl,\n sanitizeText2(decodeEntities(textContent)),\n {\n width: calculateTextWidth(textContent, config) + 50,\n // Add room for error when splitting text into multiple lines\n classes: \"markdown-node-label\",\n useHtmlLabels\n },\n config\n );\n let bbox;\n let numberOfLines = 1;\n if (!useHtmlLabels) {\n if (styles.includes(\"font-weight: bolder\")) {\n select5(text2).selectAll(\"tspan\").attr(\"font-weight\", \"\");\n }\n numberOfLines = text2.children.length;\n const textChild = text2.children[0];\n if (text2.textContent === \"\" || text2.textContent.includes(\">\")) {\n textChild.textContent = textContent[0] + textContent.substring(1).replaceAll(\">\", \">\").replaceAll(\"<\", \"<\").trim();\n const preserveSpace = textContent[1] === \" \";\n if (preserveSpace) {\n textChild.textContent = textChild.textContent[0] + \" \" + textChild.textContent.substring(1);\n }\n }\n if (textChild.textContent === \"undefined\") {\n textChild.textContent = \"\";\n }\n bbox = text2.getBBox();\n } else {\n const div = text2.children[0];\n const dv = select5(text2);\n numberOfLines = div.innerHTML.split(\"
\").length;\n if (div.innerHTML.includes(\"\")) {\n numberOfLines += div.innerHTML.split(\"\").length - 1;\n }\n const images = div.getElementsByTagName(\"img\");\n if (images) {\n const noImgText = textContent.replace(/]*>/g, \"\").trim() === \"\";\n await Promise.all(\n [...images].map(\n (img) => new Promise((res) => {\n function setupImage() {\n img.style.display = \"flex\";\n img.style.flexDirection = \"column\";\n if (noImgText) {\n const bodyFontSize = config.fontSize?.toString() ?? window.getComputedStyle(document.body).fontSize;\n const enlargingFactor = 5;\n const width = parseInt(bodyFontSize, 10) * enlargingFactor + \"px\";\n img.style.minWidth = width;\n img.style.maxWidth = width;\n } else {\n img.style.width = \"100%\";\n }\n res(img);\n }\n __name(setupImage, \"setupImage\");\n setTimeout(() => {\n if (img.complete) {\n setupImage();\n }\n });\n img.addEventListener(\"error\", setupImage);\n img.addEventListener(\"load\", setupImage);\n })\n )\n );\n }\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n textEl.attr(\"transform\", \"translate(0,\" + (-bbox.height / (2 * numberOfLines) + yOffset) + \")\");\n return bbox.height;\n}\n__name(addText2, \"addText\");\n\n// src/rendering-util/rendering-elements/shapes/classBox.ts\nasync function classBox(parent, node) {\n const config = getConfig2();\n const { themeVariables } = config;\n const { useGradient } = themeVariables;\n const PADDING = config.class.padding ?? 12;\n const GAP = PADDING;\n const useHtmlLabels = node.useHtmlLabels ?? evaluate(config.htmlLabels) ?? true;\n const classNode = node;\n classNode.annotations = classNode.annotations ?? [];\n classNode.members = classNode.members ?? [];\n classNode.methods = classNode.methods ?? [];\n const { shapeSvg, bbox } = await textHelper(parent, node, config, useHtmlLabels, GAP);\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n node.cssStyles = classNode.styles || \"\";\n const styles = classNode.styles?.join(\";\") || nodeStyles || \"\";\n if (!node.cssStyles) {\n node.cssStyles = styles.replaceAll(\"!important\", \"\").split(\";\");\n }\n const renderExtraBox = classNode.members.length === 0 && classNode.methods.length === 0 && !config.class?.hideEmptyMembersBox;\n const rc = rough56.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const w = Math.max(node.width ?? 0, bbox.width);\n let h = Math.max(node.height ?? 0, bbox.height);\n const nodeHeightGreater = (node.height ?? 0) > bbox.height;\n if (classNode.members.length === 0 && classNode.methods.length === 0) {\n h += GAP;\n } else if (classNode.members.length > 0 && classNode.methods.length === 0) {\n h += GAP * 2;\n }\n const x = -w / 2;\n const y = -h / 2;\n let extraHeight = renderExtraBox ? PADDING * 2 : classNode.members.length === 0 && classNode.methods.length === 0 ? -PADDING : 0;\n if (nodeHeightGreater) {\n extraHeight = PADDING * 2;\n }\n const roughRect = rc.rectangle(\n x - PADDING,\n y - PADDING - (renderExtraBox ? PADDING : classNode.members.length === 0 && classNode.methods.length === 0 ? -PADDING / 2 : 0),\n w + 2 * PADDING,\n h + 2 * PADDING + extraHeight,\n options\n );\n const rect2 = shapeSvg.insert(() => roughRect, \":first-child\");\n rect2.attr(\"class\", \"basic label-container outer-path\");\n const rectBBox = rect2.node().getBBox();\n const annotationGroupHeight = shapeSvg.select(\".annotation-group\").node().getBBox().height - (renderExtraBox ? PADDING / 2 : 0) || 0;\n const labelGroupHeight = shapeSvg.select(\".label-group\").node().getBBox().height - (renderExtraBox ? PADDING / 2 : 0) || 0;\n const membersGroupHeight = shapeSvg.select(\".members-group\").node().getBBox().height - (renderExtraBox ? PADDING / 2 : 0) || 0;\n const methodsAreaPlacement = (annotationGroupHeight + labelGroupHeight + y + PADDING - (y - PADDING - (renderExtraBox ? PADDING : classNode.members.length === 0 && classNode.methods.length === 0 ? -PADDING / 2 : 0))) / 2;\n shapeSvg.selectAll(\".text\").each((_, i, nodes) => {\n const text2 = select6(nodes[i]);\n const transform = text2.attr(\"transform\");\n let translateY = 0;\n if (transform) {\n const regex = RegExp(/translate\\(([^,]+),([^)]+)\\)/);\n const translate = regex.exec(transform);\n if (translate) {\n translateY = parseFloat(translate[2]);\n }\n }\n let newTranslateY = translateY + y + PADDING - (renderExtraBox ? PADDING : classNode.members.length === 0 && classNode.methods.length === 0 ? -PADDING / 2 : 0);\n if (text2.attr(\"class\").includes(\"methods-group\")) {\n const membersGroupHeightForMethods = Math.max(membersGroupHeight, GAP / 2);\n if (nodeHeightGreater) {\n newTranslateY = Math.max(\n methodsAreaPlacement,\n annotationGroupHeight + labelGroupHeight + membersGroupHeightForMethods + y + GAP * 2 + PADDING\n ) + GAP * 2;\n } else {\n newTranslateY = annotationGroupHeight + labelGroupHeight + membersGroupHeightForMethods + y + GAP * 4 + PADDING;\n }\n }\n if (classNode.members.length === 0 && classNode.methods.length === 0 && config.class?.hideEmptyMembersBox) {\n if (classNode.annotations.length > 0) {\n newTranslateY = translateY - GAP;\n } else {\n newTranslateY = translateY;\n }\n }\n if (!useHtmlLabels) {\n newTranslateY -= 4;\n }\n let newTranslateX = x;\n if (text2.attr(\"class\").includes(\"label-group\") || text2.attr(\"class\").includes(\"annotation-group\")) {\n newTranslateX = -text2.node()?.getBBox().width / 2 || 0;\n shapeSvg.selectAll(\"text\").each(function(_2, i2, nodes2) {\n if (window.getComputedStyle(nodes2[i2]).textAnchor === \"middle\") {\n newTranslateX = 0;\n }\n });\n }\n text2.attr(\"transform\", `translate(${newTranslateX}, ${newTranslateY})`);\n });\n if (classNode.members.length > 0 || classNode.methods.length > 0 || renderExtraBox) {\n const firstLineY = annotationGroupHeight + labelGroupHeight + y + PADDING;\n const roughLine = rc.line(\n rectBBox.x,\n firstLineY,\n rectBBox.x + rectBBox.width,\n firstLineY + 1e-3,\n options\n );\n const line = shapeSvg.insert(() => roughLine);\n line.attr(\"class\", `divider${node.look === \"neo\" && !useGradient ? \" neo-line\" : \"\"}`).attr(\"style\", styles);\n }\n if (renderExtraBox || classNode.members.length > 0 || classNode.methods.length > 0) {\n const secondLineY = annotationGroupHeight + labelGroupHeight + membersGroupHeight + y + GAP * 2 + PADDING;\n const roughLine = rc.line(\n rectBBox.x,\n nodeHeightGreater ? Math.max(methodsAreaPlacement, secondLineY) : secondLineY,\n rectBBox.x + rectBBox.width,\n (nodeHeightGreater ? Math.max(methodsAreaPlacement, secondLineY) : secondLineY) + 1e-3,\n options\n );\n const line = shapeSvg.insert(() => roughLine);\n line.attr(\"class\", `divider${node.look === \"neo\" && !useGradient ? \" neo-line\" : \"\"}`).attr(\"style\", styles);\n }\n if (classNode.look !== \"handDrawn\") {\n shapeSvg.selectAll(\"path\").attr(\"style\", styles);\n }\n rect2.select(\":nth-child(2)\").attr(\"style\", styles);\n shapeSvg.selectAll(\".divider\").select(\"path\").attr(\"style\", styles);\n if (node.labelStyle) {\n shapeSvg.selectAll(\"span\").attr(\"style\", node.labelStyle);\n } else {\n shapeSvg.selectAll(\"span\").attr(\"style\", styles);\n }\n if (!useHtmlLabels) {\n const colorRegex = RegExp(/color\\s*:\\s*([^;]*)/);\n const match = colorRegex.exec(styles);\n if (match) {\n const colorStyle = match[0].replace(\"color\", \"fill\");\n shapeSvg.selectAll(\"tspan\").attr(\"style\", colorStyle);\n } else if (labelStyles) {\n const match2 = colorRegex.exec(labelStyles);\n if (match2) {\n const colorStyle = match2[0].replace(\"color\", \"fill\");\n shapeSvg.selectAll(\"tspan\").attr(\"style\", colorStyle);\n }\n }\n }\n updateNodeBounds(node, rect2);\n node.intersect = function(point) {\n return intersect_default.rect(node, point);\n };\n return shapeSvg;\n}\n__name(classBox, \"classBox\");\n\n// src/rendering-util/rendering-elements/shapes/requirementBox.ts\nimport rough57 from \"roughjs\";\nimport { select as select7 } from \"d3\";\nasync function requirementBox(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const requirementNode = node;\n const elementNode = node;\n const padding = 20;\n const gap = 20;\n const isRequirementNode = \"verifyMethod\" in node;\n const classes = getNodeClasses(node);\n const { themeVariables } = getConfig2();\n const { borderColorArray, requirementEdgeLabelBackground } = themeVariables;\n const shapeSvg = parent.insert(\"g\").attr(\"class\", classes).attr(\"id\", node.domId ?? node.id);\n let typeHeight;\n if (isRequirementNode) {\n typeHeight = await addText3(\n shapeSvg,\n `<<${requirementNode.type}>>`,\n 0,\n node.labelStyle\n );\n } else {\n typeHeight = await addText3(shapeSvg, \"<<Element>>\", 0, node.labelStyle);\n }\n let accumulativeHeight = typeHeight;\n const nameHeight = await addText3(\n shapeSvg,\n requirementNode.name,\n accumulativeHeight,\n node.labelStyle + \"; font-weight: bold;\"\n );\n accumulativeHeight += nameHeight + gap;\n if (isRequirementNode) {\n const idHeight = await addText3(\n shapeSvg,\n `${requirementNode.requirementId ? `ID: ${requirementNode.requirementId}` : \"\"}`,\n accumulativeHeight,\n node.labelStyle\n );\n accumulativeHeight += idHeight;\n const textHeight = await addText3(\n shapeSvg,\n `${requirementNode.text ? `Text: ${requirementNode.text}` : \"\"}`,\n accumulativeHeight,\n node.labelStyle\n );\n accumulativeHeight += textHeight;\n const riskHeight = await addText3(\n shapeSvg,\n `${requirementNode.risk ? `Risk: ${requirementNode.risk}` : \"\"}`,\n accumulativeHeight,\n node.labelStyle\n );\n accumulativeHeight += riskHeight;\n await addText3(\n shapeSvg,\n `${requirementNode.verifyMethod ? `Verification: ${requirementNode.verifyMethod}` : \"\"}`,\n accumulativeHeight,\n node.labelStyle\n );\n } else {\n const typeHeight2 = await addText3(\n shapeSvg,\n `${elementNode.type ? `Type: ${elementNode.type}` : \"\"}`,\n accumulativeHeight,\n node.labelStyle\n );\n accumulativeHeight += typeHeight2;\n await addText3(\n shapeSvg,\n `${elementNode.docRef ? `Doc Ref: ${elementNode.docRef}` : \"\"}`,\n accumulativeHeight,\n node.labelStyle\n );\n }\n const totalWidth = (shapeSvg.node()?.getBBox().width ?? 200) + padding;\n const totalHeight = (shapeSvg.node()?.getBBox().height ?? 200) + padding;\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n const rc = rough57.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n if (node.look !== \"handDrawn\") {\n options.roughness = 0;\n options.fillStyle = \"solid\";\n }\n const roughRect = rc.rectangle(x, y, totalWidth, totalHeight, options);\n const rect2 = shapeSvg.insert(() => roughRect, \":first-child\");\n rect2.attr(\"class\", \"basic label-container outer-path\").attr(\"style\", nodeStyles);\n if (borderColorArray?.length) {\n const colorIndex = node.colorIndex ?? 0;\n shapeSvg.attr(\"data-color-id\", `color-${colorIndex % borderColorArray.length}`);\n }\n shapeSvg.selectAll(\".label\").each((_, i, nodes) => {\n const text2 = select7(nodes[i]);\n const transform = text2.attr(\"transform\");\n let translateX = 0;\n let translateY = 0;\n if (transform) {\n const regex = RegExp(/translate\\(([^,]+),([^)]+)\\)/);\n const translate = regex.exec(transform);\n if (translate) {\n translateX = parseFloat(translate[1]);\n translateY = parseFloat(translate[2]);\n }\n }\n const newTranslateY = translateY - totalHeight / 2;\n let newTranslateX = x + padding / 2;\n if (i === 0 || i === 1) {\n newTranslateX = translateX;\n }\n text2.attr(\"transform\", `translate(${newTranslateX}, ${newTranslateY + padding})`);\n });\n if (accumulativeHeight > typeHeight + nameHeight + gap) {\n const lineY = y + typeHeight + nameHeight + gap;\n let roughLine;\n if (node.look === \"neo\") {\n const thickness = 1e-3;\n const polygonPoints = [\n [x, lineY],\n [x + totalWidth, lineY],\n [x + totalWidth, lineY + thickness],\n [x, lineY + thickness]\n ];\n roughLine = rc.polygon(polygonPoints, options);\n } else {\n roughLine = rc.line(x, lineY, x + totalWidth, lineY, options);\n }\n const dividerLine = shapeSvg.insert(() => roughLine);\n dividerLine.attr(\"class\", \"divider\");\n }\n updateNodeBounds(node, rect2);\n node.intersect = function(point) {\n return intersect_default.rect(node, point);\n };\n if (nodeStyles && node.look !== \"handDrawn\" && (requirementEdgeLabelBackground || borderColorArray?.length)) {\n shapeSvg.selectAll(\"path\").attr(\"style\", nodeStyles);\n }\n return shapeSvg;\n}\n__name(requirementBox, \"requirementBox\");\nasync function addText3(parentGroup, inputText, yOffset, style = \"\") {\n if (inputText === \"\") {\n return 0;\n }\n const textEl = parentGroup.insert(\"g\").attr(\"class\", \"label\").attr(\"style\", style);\n const config = getConfig2();\n const useHtmlLabels = config.htmlLabels ?? true;\n const text2 = await createText(\n textEl,\n sanitizeText2(decodeEntities(inputText)),\n {\n width: calculateTextWidth(inputText, config) + 50,\n // Add room for error when splitting text into multiple lines\n classes: \"markdown-node-label\",\n useHtmlLabels,\n style\n },\n config\n );\n let bbox;\n if (!useHtmlLabels) {\n const textChild = text2.children[0];\n for (const child of textChild.children) {\n if (style) {\n child.setAttribute(\"style\", style);\n }\n }\n bbox = text2.getBBox();\n bbox.height += 6;\n } else {\n const div = text2.children[0];\n const dv = select7(text2);\n bbox = div.getBoundingClientRect();\n dv.attr(\"width\", bbox.width);\n dv.attr(\"height\", bbox.height);\n }\n textEl.attr(\"transform\", `translate(${-bbox.width / 2},${-bbox.height / 2 + yOffset})`);\n return bbox.height;\n}\n__name(addText3, \"addText\");\n\n// src/rendering-util/rendering-elements/shapes/kanbanItem.ts\nimport rough58 from \"roughjs\";\nvar colorFromPriority = /* @__PURE__ */ __name((priority) => {\n switch (priority) {\n case \"Very High\":\n return \"red\";\n case \"High\":\n return \"orange\";\n case \"Medium\":\n return null;\n // no stroke\n case \"Low\":\n return \"blue\";\n case \"Very Low\":\n return \"lightblue\";\n }\n}, \"colorFromPriority\");\nasync function kanbanItem(parent, kanbanNode, { config }) {\n const { labelStyles, nodeStyles } = styles2String(kanbanNode);\n kanbanNode.labelStyle = labelStyles || \"\";\n const labelPaddingX = 10;\n const orgWidth = kanbanNode.width;\n kanbanNode.width = (kanbanNode.width ?? 200) - 10;\n const {\n shapeSvg,\n bbox,\n label: labelElTitle\n } = await labelHelper(parent, kanbanNode, getNodeClasses(kanbanNode));\n const padding = kanbanNode.padding || 10;\n let ticketUrl = \"\";\n let link;\n if (\"ticket\" in kanbanNode && kanbanNode.ticket && config?.kanban?.ticketBaseUrl) {\n ticketUrl = config?.kanban?.ticketBaseUrl.replace(\"#TICKET#\", kanbanNode.ticket);\n link = shapeSvg.insert(\"svg:a\", \":first-child\").attr(\"class\", \"kanban-ticket-link\").attr(\"xlink:href\", ticketUrl).attr(\"target\", \"_blank\");\n }\n const options = {\n useHtmlLabels: kanbanNode.useHtmlLabels,\n labelStyle: kanbanNode.labelStyle || \"\",\n width: kanbanNode.width,\n img: kanbanNode.img,\n padding: kanbanNode.padding || 8,\n centerLabel: false\n };\n let labelEl, bbox2;\n if (link) {\n ({ label: labelEl, bbox: bbox2 } = await insertLabel(\n link,\n \"ticket\" in kanbanNode && kanbanNode.ticket || \"\",\n options\n ));\n } else {\n ({ label: labelEl, bbox: bbox2 } = await insertLabel(\n shapeSvg,\n \"ticket\" in kanbanNode && kanbanNode.ticket || \"\",\n options\n ));\n }\n const { label: labelElAssigned, bbox: bboxAssigned } = await insertLabel(\n shapeSvg,\n \"assigned\" in kanbanNode && kanbanNode.assigned || \"\",\n options\n );\n kanbanNode.width = orgWidth;\n const labelPaddingY = 10;\n const totalWidth = kanbanNode?.width || 0;\n const heightAdj = Math.max(bbox2.height, bboxAssigned.height) / 2;\n const totalHeight = Math.max(bbox.height + labelPaddingY * 2, kanbanNode?.height || 0) + heightAdj;\n const x = -totalWidth / 2;\n const y = -totalHeight / 2;\n labelElTitle.attr(\n \"transform\",\n \"translate(\" + (padding - totalWidth / 2) + \", \" + (-heightAdj - bbox.height / 2) + \")\"\n );\n labelEl.attr(\n \"transform\",\n \"translate(\" + (padding - totalWidth / 2) + \", \" + (-heightAdj + bbox.height / 2) + \")\"\n );\n labelElAssigned.attr(\n \"transform\",\n \"translate(\" + (padding + totalWidth / 2 - bboxAssigned.width - 2 * labelPaddingX) + \", \" + (-heightAdj + bbox.height / 2) + \")\"\n );\n let rect2;\n const { rx, ry } = kanbanNode;\n const { cssStyles } = kanbanNode;\n if (kanbanNode.look === \"handDrawn\") {\n const rc = rough58.svg(shapeSvg);\n const options2 = userNodeOverrides(kanbanNode, {});\n const roughNode = rx || ry ? rc.path(createRoundedRectPathD(x, y, totalWidth, totalHeight, rx || 0), options2) : rc.rectangle(x, y, totalWidth, totalHeight, options2);\n rect2 = shapeSvg.insert(() => roughNode, \":first-child\");\n rect2.attr(\"class\", \"basic label-container\").attr(\"style\", cssStyles ? cssStyles : null);\n } else {\n rect2 = shapeSvg.insert(\"rect\", \":first-child\");\n rect2.attr(\"class\", \"basic label-container __APA__\").attr(\"style\", nodeStyles).attr(\"rx\", rx ?? 5).attr(\"ry\", ry ?? 5).attr(\"x\", x).attr(\"y\", y).attr(\"width\", totalWidth).attr(\"height\", totalHeight);\n const priority = \"priority\" in kanbanNode && kanbanNode.priority;\n if (priority) {\n const line = shapeSvg.append(\"line\");\n const lineX = x + 2;\n const y1 = y + Math.floor((rx ?? 0) / 2);\n const y2 = y + totalHeight - Math.floor((rx ?? 0) / 2);\n line.attr(\"x1\", lineX).attr(\"y1\", y1).attr(\"x2\", lineX).attr(\"y2\", y2).attr(\"stroke-width\", \"4\").attr(\"stroke\", colorFromPriority(priority));\n }\n }\n updateNodeBounds(kanbanNode, rect2);\n kanbanNode.height = totalHeight;\n kanbanNode.intersect = function(point) {\n return intersect_default.rect(kanbanNode, point);\n };\n return shapeSvg;\n}\n__name(kanbanItem, \"kanbanItem\");\n\n// src/rendering-util/rendering-elements/shapes/bang.ts\nimport rough59 from \"roughjs\";\nasync function bang(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n parent,\n node,\n getNodeClasses(node)\n );\n const w = bbox.width + 10 * halfPadding;\n const h = bbox.height + 8 * halfPadding;\n const r = 0.15 * w;\n const { cssStyles } = node;\n const minWidth = bbox.width + 20;\n const minHeight = bbox.height + 20;\n const effectiveWidth = Math.max(w, minWidth);\n const effectiveHeight = Math.max(h, minHeight);\n label.attr(\"transform\", `translate(${-bbox.width / 2}, ${-bbox.height / 2})`);\n let bangElem;\n const path = `M0 0 \n a${r},${r} 1 0,0 ${effectiveWidth * 0.25},${-1 * effectiveHeight * 0.1}\n a${r},${r} 1 0,0 ${effectiveWidth * 0.25},${0}\n a${r},${r} 1 0,0 ${effectiveWidth * 0.25},${0}\n a${r},${r} 1 0,0 ${effectiveWidth * 0.25},${effectiveHeight * 0.1}\n\n a${r},${r} 1 0,0 ${effectiveWidth * 0.15},${effectiveHeight * 0.33}\n a${r * 0.8},${r * 0.8} 1 0,0 0,${effectiveHeight * 0.34}\n a${r},${r} 1 0,0 ${-1 * effectiveWidth * 0.15},${effectiveHeight * 0.33}\n\n a${r},${r} 1 0,0 ${-1 * effectiveWidth * 0.25},${effectiveHeight * 0.15}\n a${r},${r} 1 0,0 ${-1 * effectiveWidth * 0.25},0\n a${r},${r} 1 0,0 ${-1 * effectiveWidth * 0.25},0\n a${r},${r} 1 0,0 ${-1 * effectiveWidth * 0.25},${-1 * effectiveHeight * 0.15}\n\n a${r},${r} 1 0,0 ${-1 * effectiveWidth * 0.1},${-1 * effectiveHeight * 0.33}\n a${r * 0.8},${r * 0.8} 1 0,0 0,${-1 * effectiveHeight * 0.34}\n a${r},${r} 1 0,0 ${effectiveWidth * 0.1},${-1 * effectiveHeight * 0.33}\n H0 V0 Z`;\n if (node.look === \"handDrawn\") {\n const rc = rough59.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const roughNode = rc.path(path, options);\n bangElem = shapeSvg.insert(() => roughNode, \":first-child\");\n bangElem.attr(\"class\", \"basic label-container\").attr(\"style\", handleUndefinedAttr(cssStyles));\n } else {\n bangElem = shapeSvg.insert(\"path\", \":first-child\").attr(\"class\", \"basic label-container\").attr(\"style\", nodeStyles).attr(\"d\", path);\n }\n bangElem.attr(\"transform\", `translate(${-effectiveWidth / 2}, ${-effectiveHeight / 2})`);\n updateNodeBounds(node, bangElem);\n node.calcIntersect = function(bounds, point) {\n return intersect_default.rect(bounds, point);\n };\n node.intersect = function(point) {\n log.info(\"Bang intersect\", node, point);\n return intersect_default.rect(node, point);\n };\n return shapeSvg;\n}\n__name(bang, \"bang\");\n\n// src/rendering-util/rendering-elements/shapes/cloud.ts\nimport rough60 from \"roughjs\";\nasync function cloud(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n parent,\n node,\n getNodeClasses(node)\n );\n const w = bbox.width + 2 * halfPadding;\n const h = bbox.height + 2 * halfPadding;\n const r1 = 0.15 * w;\n const r2 = 0.25 * w;\n const r3 = 0.35 * w;\n const r4 = 0.2 * w;\n const { cssStyles } = node;\n let cloudElem;\n const path = `M0 0 \n a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1}\n a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1}\n a${r2},${r2} 1 0,1 ${w * 0.35},${w * 0.2}\n\n a${r1},${r1} 1 0,1 ${w * 0.15},${h * 0.35}\n a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${h * 0.65}\n\n a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15}\n a${r3},${r3} 1 0,1 ${-1 * w * 0.5},0\n a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15}\n\n a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35}\n a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65}\n H0 V0 Z`;\n if (node.look === \"handDrawn\") {\n const rc = rough60.svg(shapeSvg);\n const options = userNodeOverrides(node, {});\n const roughNode = rc.path(path, options);\n cloudElem = shapeSvg.insert(() => roughNode, \":first-child\");\n cloudElem.attr(\"class\", \"basic label-container\").attr(\"style\", handleUndefinedAttr(cssStyles));\n } else {\n cloudElem = shapeSvg.insert(\"path\", \":first-child\").attr(\"class\", \"basic label-container\").attr(\"style\", nodeStyles).attr(\"d\", path);\n }\n label.attr(\"transform\", `translate(${-bbox.width / 2}, ${-bbox.height / 2})`);\n cloudElem.attr(\"transform\", `translate(${-w / 2}, ${-h / 2})`);\n updateNodeBounds(node, cloudElem);\n node.calcIntersect = function(bounds, point) {\n return intersect_default.rect(bounds, point);\n };\n node.intersect = function(point) {\n log.info(\"Cloud intersect\", node, point);\n return intersect_default.rect(node, point);\n };\n return shapeSvg;\n}\n__name(cloud, \"cloud\");\n\n// src/rendering-util/rendering-elements/shapes/defaultMindmapNode.ts\nasync function defaultMindmapNode(parent, node) {\n const { labelStyles, nodeStyles } = styles2String(node);\n node.labelStyle = labelStyles;\n const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n parent,\n node,\n getNodeClasses(node)\n );\n const w = bbox.width + 8 * halfPadding;\n const h = bbox.height + 2 * halfPadding;\n const rd = 5;\n const rectPath = node.look === \"neo\" ? `\n M${-w / 2} ${h / 2 - rd}\n v${-h + 2 * rd}\n q0,-${rd} ${rd},-${rd}\n h${w - 2 * rd}\n q${rd},0 ${rd},${rd}\n v${h - rd}\n H${-w / 2}\n Z\n ` : `\n M${-w / 2} ${h / 2 - rd}\n v${-h + 2 * rd}\n q0,-${rd} ${rd},-${rd}\n h${w - 2 * rd}\n q${rd},0 ${rd},${rd}\n v${h - 2 * rd}\n q0,${rd} ${-rd},${rd}\n h${-(w - 2 * rd)}\n q${-rd},0 ${-rd},${-rd}\n Z\n `;\n if (!node.domId) {\n throw new Error(\n `defaultMindmapNode: node \"${node.id}\" is missing a domId \\u2014 was render.ts domId prefixing skipped?`\n );\n }\n const bg = shapeSvg.append(\"path\").attr(\"id\", node.domId).attr(\"class\", \"node-bkg node-\" + node.type).attr(\"style\", nodeStyles).attr(\"d\", rectPath);\n shapeSvg.append(\"line\").attr(\"class\", \"node-line-\").attr(\"x1\", -w / 2).attr(\"y1\", h / 2).attr(\"x2\", w / 2).attr(\"y2\", h / 2);\n label.attr(\"transform\", `translate(${-bbox.width / 2}, ${-bbox.height / 2})`);\n shapeSvg.append(() => label.node());\n updateNodeBounds(node, bg);\n node.calcIntersect = function(bounds, point) {\n return intersect_default.rect(bounds, point);\n };\n node.intersect = function(point) {\n return intersect_default.rect(node, point);\n };\n return shapeSvg;\n}\n__name(defaultMindmapNode, \"defaultMindmapNode\");\n\n// src/rendering-util/rendering-elements/shapes/mindmapCircle.ts\nasync function mindmapCircle(parent, node) {\n const options = {\n padding: node.padding ?? 0\n };\n return circle(parent, node, options);\n}\n__name(mindmapCircle, \"mindmapCircle\");\n\n// src/rendering-util/rendering-elements/shapes.ts\nvar shapesDefs = [\n {\n semanticName: \"Process\",\n name: \"Rectangle\",\n shortName: \"rect\",\n description: \"Standard process shape\",\n aliases: [\"proc\", \"process\", \"rectangle\"],\n internalAliases: [\"squareRect\"],\n handler: squareRect2\n },\n {\n semanticName: \"Event\",\n name: \"Rounded Rectangle\",\n shortName: \"rounded\",\n description: \"Represents an event\",\n aliases: [\"event\"],\n internalAliases: [\"roundedRect\"],\n handler: roundedRect\n },\n {\n semanticName: \"Terminal Point\",\n name: \"Stadium\",\n shortName: \"stadium\",\n description: \"Terminal point\",\n aliases: [\"terminal\", \"pill\"],\n handler: stadium\n },\n {\n semanticName: \"Subprocess\",\n name: \"Framed Rectangle\",\n shortName: \"fr-rect\",\n description: \"Subprocess\",\n aliases: [\"subprocess\", \"subproc\", \"framed-rectangle\", \"subroutine\"],\n handler: subroutine\n },\n {\n semanticName: \"Database\",\n name: \"Cylinder\",\n shortName: \"cyl\",\n description: \"Database storage\",\n aliases: [\"db\", \"database\", \"cylinder\"],\n handler: cylinder\n },\n {\n semanticName: \"Data Store\",\n name: \"Data Store\",\n shortName: \"datastore\",\n description: \"Data flow diagram data store\",\n aliases: [\"data-store\"],\n handler: datastore\n },\n {\n semanticName: \"Start\",\n name: \"Circle\",\n shortName: \"circle\",\n description: \"Starting point\",\n aliases: [\"circ\"],\n handler: circle\n },\n {\n semanticName: \"Bang\",\n name: \"Bang\",\n shortName: \"bang\",\n description: \"Bang\",\n aliases: [\"bang\"],\n handler: bang\n },\n {\n semanticName: \"Cloud\",\n name: \"Cloud\",\n shortName: \"cloud\",\n description: \"cloud\",\n aliases: [\"cloud\"],\n handler: cloud\n },\n {\n semanticName: \"Decision\",\n name: \"Diamond\",\n shortName: \"diam\",\n description: \"Decision-making step\",\n aliases: [\"decision\", \"diamond\", \"question\"],\n handler: question\n },\n {\n semanticName: \"Prepare Conditional\",\n name: \"Hexagon\",\n shortName: \"hex\",\n description: \"Preparation or condition step\",\n aliases: [\"hexagon\", \"prepare\"],\n handler: hexagon\n },\n {\n semanticName: \"Data Input/Output\",\n name: \"Lean Right\",\n shortName: \"lean-r\",\n description: \"Represents input or output\",\n aliases: [\"lean-right\", \"in-out\"],\n internalAliases: [\"lean_right\"],\n handler: lean_right\n },\n {\n semanticName: \"Data Input/Output\",\n name: \"Lean Left\",\n shortName: \"lean-l\",\n description: \"Represents output or input\",\n aliases: [\"lean-left\", \"out-in\"],\n internalAliases: [\"lean_left\"],\n handler: lean_left\n },\n {\n semanticName: \"Priority Action\",\n name: \"Trapezoid Base Bottom\",\n shortName: \"trap-b\",\n description: \"Priority action\",\n aliases: [\"priority\", \"trapezoid-bottom\", \"trapezoid\"],\n handler: trapezoid\n },\n {\n semanticName: \"Manual Operation\",\n name: \"Trapezoid Base Top\",\n shortName: \"trap-t\",\n description: \"Represents a manual task\",\n aliases: [\"manual\", \"trapezoid-top\", \"inv-trapezoid\"],\n internalAliases: [\"inv_trapezoid\"],\n handler: inv_trapezoid\n },\n {\n semanticName: \"Stop\",\n name: \"Double Circle\",\n shortName: \"dbl-circ\",\n description: \"Represents a stop point\",\n aliases: [\"double-circle\"],\n internalAliases: [\"doublecircle\"],\n handler: doublecircle\n },\n {\n semanticName: \"Text Block\",\n name: \"Text Block\",\n shortName: \"text\",\n description: \"Text block\",\n handler: text\n },\n {\n semanticName: \"Card\",\n name: \"Notched Rectangle\",\n shortName: \"notch-rect\",\n description: \"Represents a card\",\n aliases: [\"card\", \"notched-rectangle\"],\n handler: card\n },\n {\n semanticName: \"Lined/Shaded Process\",\n name: \"Lined Rectangle\",\n shortName: \"lin-rect\",\n description: \"Lined process shape\",\n aliases: [\"lined-rectangle\", \"lined-process\", \"lin-proc\", \"shaded-process\"],\n handler: shadedProcess\n },\n {\n semanticName: \"Start\",\n name: \"Small Circle\",\n shortName: \"sm-circ\",\n description: \"Small starting point\",\n aliases: [\"start\", \"small-circle\"],\n internalAliases: [\"stateStart\"],\n handler: stateStart\n },\n {\n semanticName: \"Stop\",\n name: \"Framed Circle\",\n shortName: \"fr-circ\",\n description: \"Stop point\",\n aliases: [\"stop\", \"framed-circle\"],\n internalAliases: [\"stateEnd\"],\n handler: stateEnd\n },\n {\n semanticName: \"Fork/Join\",\n name: \"Filled Rectangle\",\n shortName: \"fork\",\n description: \"Fork or join in process flow\",\n aliases: [\"join\"],\n internalAliases: [\"forkJoin\"],\n handler: forkJoin\n },\n {\n semanticName: \"Collate\",\n name: \"Hourglass\",\n shortName: \"hourglass\",\n description: \"Represents a collate operation\",\n aliases: [\"hourglass\", \"collate\"],\n handler: hourglass\n },\n {\n semanticName: \"Comment\",\n name: \"Curly Brace\",\n shortName: \"brace\",\n description: \"Adds a comment\",\n aliases: [\"comment\", \"brace-l\"],\n handler: curlyBraceLeft\n },\n {\n semanticName: \"Comment Right\",\n name: \"Curly Brace\",\n shortName: \"brace-r\",\n description: \"Adds a comment\",\n handler: curlyBraceRight\n },\n {\n semanticName: \"Comment with braces on both sides\",\n name: \"Curly Braces\",\n shortName: \"braces\",\n description: \"Adds a comment\",\n handler: curlyBraces\n },\n {\n semanticName: \"Com Link\",\n name: \"Lightning Bolt\",\n shortName: \"bolt\",\n description: \"Communication link\",\n aliases: [\"com-link\", \"lightning-bolt\"],\n handler: lightningBolt\n },\n {\n semanticName: \"Document\",\n name: \"Document\",\n shortName: \"doc\",\n description: \"Represents a document\",\n aliases: [\"doc\", \"document\"],\n handler: waveEdgedRectangle\n },\n {\n semanticName: \"Delay\",\n name: \"Half-Rounded Rectangle\",\n shortName: \"delay\",\n description: \"Represents a delay\",\n aliases: [\"half-rounded-rectangle\"],\n handler: halfRoundedRectangle\n },\n {\n semanticName: \"Direct Access Storage\",\n name: \"Horizontal Cylinder\",\n shortName: \"h-cyl\",\n description: \"Direct access storage\",\n aliases: [\"das\", \"horizontal-cylinder\"],\n handler: tiltedCylinder\n },\n {\n semanticName: \"Disk Storage\",\n name: \"Lined Cylinder\",\n shortName: \"lin-cyl\",\n description: \"Disk storage\",\n aliases: [\"disk\", \"lined-cylinder\"],\n handler: linedCylinder\n },\n {\n semanticName: \"Display\",\n name: \"Curved Trapezoid\",\n shortName: \"curv-trap\",\n description: \"Represents a display\",\n aliases: [\"curved-trapezoid\", \"display\"],\n handler: curvedTrapezoid\n },\n {\n semanticName: \"Divided Process\",\n name: \"Divided Rectangle\",\n shortName: \"div-rect\",\n description: \"Divided process shape\",\n aliases: [\"div-proc\", \"divided-rectangle\", \"divided-process\"],\n handler: dividedRectangle\n },\n {\n semanticName: \"Extract\",\n name: \"Triangle\",\n shortName: \"tri\",\n description: \"Extraction process\",\n aliases: [\"extract\", \"triangle\"],\n handler: triangle\n },\n {\n semanticName: \"Internal Storage\",\n name: \"Window Pane\",\n shortName: \"win-pane\",\n description: \"Internal storage\",\n aliases: [\"internal-storage\", \"window-pane\"],\n handler: windowPane\n },\n {\n semanticName: \"Junction\",\n name: \"Filled Circle\",\n shortName: \"f-circ\",\n description: \"Junction point\",\n aliases: [\"junction\", \"filled-circle\"],\n handler: filledCircle\n },\n {\n semanticName: \"Loop Limit\",\n name: \"Trapezoidal Pentagon\",\n shortName: \"notch-pent\",\n description: \"Loop limit step\",\n aliases: [\"loop-limit\", \"notched-pentagon\"],\n handler: trapezoidalPentagon\n },\n {\n semanticName: \"Manual File\",\n name: \"Flipped Triangle\",\n shortName: \"flip-tri\",\n description: \"Manual file operation\",\n aliases: [\"manual-file\", \"flipped-triangle\"],\n handler: flippedTriangle\n },\n {\n semanticName: \"Manual Input\",\n name: \"Sloped Rectangle\",\n shortName: \"sl-rect\",\n description: \"Manual input step\",\n aliases: [\"manual-input\", \"sloped-rectangle\"],\n handler: slopedRect\n },\n {\n semanticName: \"Multi-Document\",\n name: \"Stacked Document\",\n shortName: \"docs\",\n description: \"Multiple documents\",\n aliases: [\"documents\", \"st-doc\", \"stacked-document\"],\n handler: multiWaveEdgedRectangle\n },\n {\n semanticName: \"Multi-Process\",\n name: \"Stacked Rectangle\",\n shortName: \"st-rect\",\n description: \"Multiple processes\",\n aliases: [\"procs\", \"processes\", \"stacked-rectangle\"],\n handler: multiRect\n },\n {\n semanticName: \"Stored Data\",\n name: \"Bow Tie Rectangle\",\n shortName: \"bow-rect\",\n description: \"Stored data\",\n aliases: [\"stored-data\", \"bow-tie-rectangle\"],\n handler: bowTieRect\n },\n {\n semanticName: \"Summary\",\n name: \"Crossed Circle\",\n shortName: \"cross-circ\",\n description: \"Summary\",\n aliases: [\"summary\", \"crossed-circle\"],\n handler: crossedCircle\n },\n {\n semanticName: \"Tagged Document\",\n name: \"Tagged Document\",\n shortName: \"tag-doc\",\n description: \"Tagged document\",\n aliases: [\"tag-doc\", \"tagged-document\"],\n handler: taggedWaveEdgedRectangle\n },\n {\n semanticName: \"Tagged Process\",\n name: \"Tagged Rectangle\",\n shortName: \"tag-rect\",\n description: \"Tagged process\",\n aliases: [\"tagged-rectangle\", \"tag-proc\", \"tagged-process\"],\n handler: taggedRect\n },\n {\n semanticName: \"Paper Tape\",\n name: \"Flag\",\n shortName: \"flag\",\n description: \"Paper tape\",\n aliases: [\"paper-tape\"],\n handler: waveRectangle\n },\n {\n semanticName: \"Odd\",\n name: \"Odd\",\n shortName: \"odd\",\n description: \"Odd shape\",\n internalAliases: [\"rect_left_inv_arrow\"],\n handler: rect_left_inv_arrow\n },\n {\n semanticName: \"Lined Document\",\n name: \"Lined Document\",\n shortName: \"lin-doc\",\n description: \"Lined document\",\n aliases: [\"lined-document\"],\n handler: linedWaveEdgedRect\n }\n];\nvar generateShapeMap = /* @__PURE__ */ __name(() => {\n const undocumentedShapes = {\n // States\n state,\n choice,\n note,\n // Rectangles\n rectWithTitle,\n labelRect,\n // Icons\n iconSquare,\n iconCircle,\n icon,\n iconRounded,\n imageSquare,\n anchor,\n // Kanban diagram\n kanbanItem,\n //Mindmap diagram\n mindmapCircle,\n defaultMindmapNode,\n // class diagram\n classBox,\n // er diagram\n erBox,\n // Requirement diagram\n requirementBox\n };\n const entries = [\n ...Object.entries(undocumentedShapes),\n ...shapesDefs.flatMap((shape) => {\n const aliases = [\n shape.shortName,\n ...\"aliases\" in shape ? shape.aliases : [],\n ...\"internalAliases\" in shape ? shape.internalAliases : []\n ];\n return aliases.map((alias) => [alias, shape.handler]);\n })\n ];\n return Object.fromEntries(entries);\n}, \"generateShapeMap\");\nvar shapes2 = generateShapeMap();\nfunction isValidShape(shape) {\n return shape in shapes2;\n}\n__name(isValidShape, \"isValidShape\");\n\n// src/rendering-util/rendering-elements/nodes.ts\nvar nodeElems = /* @__PURE__ */ new Map();\nasync function insertNode(elem, node, renderOptions) {\n let newEl;\n let el;\n if (node.shape === \"rect\") {\n if (node.rx && node.ry) {\n node.shape = \"roundedRect\";\n } else {\n node.shape = \"squareRect\";\n }\n }\n const shapeHandler = node.shape ? shapes2[node.shape] : void 0;\n if (!shapeHandler) {\n throw new Error(`No such shape: ${node.shape}. Please check your syntax.`);\n }\n if (node.link) {\n let target;\n if (renderOptions.config.securityLevel === \"sandbox\") {\n target = \"_top\";\n } else if (node.linkTarget) {\n target = node.linkTarget || \"_blank\";\n }\n newEl = elem.insert(\"svg:a\").attr(\"xlink:href\", node.link).attr(\"target\", target ?? null);\n el = await shapeHandler(newEl, node, renderOptions);\n } else {\n el = await shapeHandler(elem, node, renderOptions);\n newEl = el;\n }\n newEl.attr(\"data-look\", handleUndefinedAttr(node.look));\n if (node.tooltip) {\n el.attr(\"title\", node.tooltip);\n }\n nodeElems.set(node.id, newEl);\n if (node.haveCallback) {\n newEl.attr(\"class\", newEl.attr(\"class\") + \" clickable\");\n }\n return newEl;\n}\n__name(insertNode, \"insertNode\");\nvar setNodeElem = /* @__PURE__ */ __name((elem, node) => {\n nodeElems.set(node.id, elem);\n}, \"setNodeElem\");\nvar clear2 = /* @__PURE__ */ __name(() => {\n nodeElems.clear();\n}, \"clear\");\nvar positionNode = /* @__PURE__ */ __name((node) => {\n const el = nodeElems.get(node.id);\n log.trace(\n \"Transforming node\",\n node.diff,\n node,\n \"translate(\" + (node.x - node.width / 2 - 5) + \", \" + node.width / 2 + \")\"\n );\n const padding = 8;\n const diff = node.diff || 0;\n if (node.clusterNode) {\n el.attr(\n \"transform\",\n \"translate(\" + (node.x + diff - node.width / 2) + \", \" + (node.y - node.height / 2 - padding) + \")\"\n );\n } else {\n el.attr(\"transform\", \"translate(\" + node.x + \", \" + node.y + \")\");\n }\n return diff;\n}, \"positionNode\");\n\nexport {\n labelHelper,\n updateNodeBounds,\n createLabel_default,\n isValidShape,\n insertCluster,\n clear,\n insertNode,\n setNodeElem,\n clear2,\n positionNode\n};\n"], + "mappings": "obAoCA,IAAIA,EAA8BC,EAAO,MAAOC,EAAQC,EAAMC,IAAa,CACzE,IAAIC,EACEC,EAAgBH,EAAK,eAAiBI,GAASC,EAAW,GAAG,UAAU,EACxEJ,EAGHC,EAAaD,EAFbC,EAAa,eAIf,IAAMI,EAAWP,EAAO,OAAO,GAAG,EAAE,KAAK,QAASG,CAAU,EAAE,KAAK,KAAMF,EAAK,OAASA,EAAK,EAAE,EACxFO,EAAUD,EAAS,OAAO,GAAG,EAAE,KAAK,QAAS,OAAO,EAAE,KAAK,QAASE,EAAoBR,EAAK,UAAU,CAAC,EAC1GS,EACAT,EAAK,QAAU,OACjBS,EAAQ,GAERA,EAAQ,OAAOT,EAAK,OAAU,SAAWA,EAAK,MAAQA,EAAK,MAAM,CAAC,EAEpE,IAAMU,EAAgB,CAAC,CAACV,EAAK,MAAQ,CAAC,CAACA,EAAK,IACtCW,EAAaX,EAAK,YAAc,WAChCY,EAAQ,MAAMC,GAClBN,EACAO,GAAaC,GAAeN,CAAK,EAAGJ,EAAW,CAAC,EAChD,CACE,cAAAF,EACA,MAAOH,EAAK,OAASK,EAAW,EAAE,WAAW,cAC7C,QAASM,EAAa,sBAAwB,GAC9C,MAAOX,EAAK,WACZ,iBAAkBU,EAClB,SAAUC,CACZ,EACAN,EAAW,CACb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,aAAc,UACd,KAAM,YACN,UAAW,YACX,YAAa,iCACb,QAAS,CAAC,YAAa,SAAS,EAChC,QAASW,EACX,EACA,CACE,aAAc,UACd,KAAM,cACN,UAAW,QACX,YAAa,iBACb,QAAS,CAAC,UAAW,SAAS,EAC9B,QAASlF,EACX,EACA,CACE,aAAc,gBACd,KAAM,cACN,UAAW,UACX,YAAa,iBACb,QAASU,EACX,EACA,CACE,aAAc,oCACd,KAAM,eACN,UAAW,SACX,YAAa,iBACb,QAASI,EACX,EACA,CACE,aAAc,WACd,KAAM,iBACN,UAAW,OACX,YAAa,qBACb,QAAS,CAAC,WAAY,gBAAgB,EACtC,QAAS8G,EACX,EACA,CACE,aAAc,WACd,KAAM,WACN,UAAW,MACX,YAAa,wBACb,QAAS,CAAC,MAAO,UAAU,EAC3B,QAASiG,EACX,EACA,CACE,aAAc,QACd,KAAM,yBACN,UAAW,QACX,YAAa,qBACb,QAAS,CAAC,wBAAwB,EAClC,QAASnJ,EACX,EACA,CACE,aAAc,wBACd,KAAM,sBACN,UAAW,QACX,YAAa,wBACb,QAAS,CAAC,MAAO,qBAAqB,EACtC,QAAS2I,EACX,EACA,CACE,aAAc,eACd,KAAM,iBACN,UAAW,UACX,YAAa,eACb,QAAS,CAAC,OAAQ,gBAAgB,EAClC,QAASjF,EACX,EACA,CACE,aAAc,UACd,KAAM,mBACN,UAAW,YACX,YAAa,uBACb,QAAS,CAAC,mBAAoB,SAAS,EACvC,QAAS9G,EACX,EACA,CACE,aAAc,kBACd,KAAM,oBACN,UAAW,WACX,YAAa,wBACb,QAAS,CAAC,WAAY,oBAAqB,iBAAiB,EAC5D,QAAS4B,EACX,EACA,CACE,aAAc,UACd,KAAM,WACN,UAAW,MACX,YAAa,qBACb,QAAS,CAAC,UAAW,UAAU,EAC/B,QAAS0K,EACX,EACA,CACE,aAAc,mBACd,KAAM,cACN,UAAW,WACX,YAAa,mBACb,QAAS,CAAC,mBAAoB,aAAa,EAC3C,QAASU,EACX,EACA,CACE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", "evaluate", "getConfig2", "shapeSvg", "labelEl", "handleUndefinedAttr", "label", "addBackground", "isMarkdown", "text2", "createText", "sanitizeText", "decodeEntities", "bbox", "halfPadding", "div", "dv", "select_default", "configureLabelImages", "insertLabel", "options", "getEffectiveHtmlLabels", "updateNodeBounds", "element", "getNodeClasses", "extra", "createPathFromPoints", "points", "pointStrings", "p", "i", "generateFullSineWavePoints", "x1", "y1", "x2", "y2", "amplitude", "numCycles", "deltaX", "deltaY", "cycleLength", "frequency", "midY", "t", "x", "y", "generateCirclePoints", "centerX", "centerY", "radius", "numPoints", "startAngle", "endAngle", "startAngleRad", "angleStep", "angle", "mergePaths", "roughElement", "paths", "mergedPath", "combinedPathData", "path", "d", "fillPath", "strokePath", "getAttr", "attr", "fillAttrs", "value", "strokeAttrs", "group", "intersectRect", "point", "dx", "dy", "w", "h", "sx", "sy", "intersect_rect_default", "createLabel", "_vertexText", "style", "isTitle", "isNode", "vertexText", "config", "createLabel_default", "createRoundedRectPathD", "totalWidth", "totalHeight", "rect", "log", "siteConfig", "themeVariables", "handDrawnSeed", "clusterBkg", "clusterBorder", "labelStyles", "nodeStyles", "borderStyles", "backgroundStyles", "styles2String", "width", "height", "rect2", "rc", "at", "userNodeOverrides", "roughNode", "subGraphTitleTopMargin", "getSubGraphTitleMargins", "span", "rectBox", "noteGroup", "padding", "roundedWithTitle", "altBackground", "compositeBackground", "compositeTitleBackground", "nodeBorder", "outerRectG", "innerRect", "innerHeight", "innerY", "isAlt", "roughOuterNode", "roughInnerNode", "kanbanSection", "divider", "outerRectClass", "squareRect", "shapes", "clusterElems", "insertCluster", "elem", "shape", "cluster", "clear", "intersectNode", "intersect_node_default", "intersectEllipse", "rx", "ry", "cx", "cy", "px", "py", "det", "intersect_ellipse_default", "intersectCircle", "intersect_circle_default", "intersectLine", "p1", "p2", "q1", "q2", "a1", "b1", "c1", "r3", "r4", "epsilon", "sameSign", "a2", "b2", "c2", "r1", "r2", "denom", "offset", "num", "intersect_line_default", "intersectPolygon", "polyPoints", "intersections", "minX", "minY", "entry", "left", "top", "intersect", "q", "pdx", "pdy", "distp", "qdx", "qdy", "distq", "intersect_polygon_default", "intersect_default", "anchor", "classes", "cssStyles", "circleElem", "generateArcPoints", "clockwise", "midX", "transformedX", "transformedY", "distance", "scaledCenterDistance", "angleRange", "angle2", "calculateArcSagitta", "chord", "radiusX", "radiusY", "semiMajorAxis", "semiMinorAxis", "a", "b", "bowTieRect", "nodePadding", "labelPaddingX", "labelPaddingY", "calcTotalHeight", "labelHeight", "calcEllipseRadius", "totalHeight2", "ry2", "sagitta", "bowTieRectPath", "bowTieRectShapePath", "bowTieRectShape", "insertPolygonShape", "NOTCH_SIZE", "card", "right", "bottom", "polygon", "pathData", "choice", "s", "choicePath", "choiceShape", "circle", "labelPadding", "options2", "bounds", "radius2", "createLine", "r", "xAxis45", "yAxis45", "lineLength", "pointQ1", "pointQ2", "pointQ3", "pointQ4", "crossedCircle", "circleNode", "linePath", "lineNode", "crossedCircle2", "generateCirclePoints2", "curlyBraceLeft", "paddingX", "paddingY", "rectPoints", "newCurlyBracePath", "curlyBraceLeftNode", "rectPath", "rectShape", "curlyBraceLeftShape", "generateCirclePoints3", "curlyBraceRight", "curlyBraceRightNode", "curlyBraceRightShape", "generateCirclePoints4", "curlyBraces", "leftCurlyBracePoints", "rightCurlyBracePoints", "newLeftCurlyBracePath", "leftCurlyBraceNode", "newRightCurlyBracePath", "rightCurlyBraceNode", "curlyBracesShape", "curvedTrapezoid", "minWidth", "minHeight", "rw", "tw", "shapeNode", "createCylinderPathD", "createOuterCylinderPathD", "createInnerCylinderPathD", "MIN_HEIGHT", "MIN_WIDTH", "cylinder", "originalWidth", "cylinder2", "outerPathData", "innerPathData", "outerNode", "innerLine", "pos", "drawRect", "datastore", "rectOptions", "nodeOverrideOptions", "borderSelection", "borderPath", "selection", "datastoreWidth", "datastoreHeight", "dividedRectangle", "rectOffset2", "pts", "poly", "doublecircle", "gap", "outerRadius", "innerRadius", "circleGroup", "outerOptions", "innerOptions", "outerRoughNode", "innerRoughNode", "outerCircle", "innerCircle", "filledCircle", "filledCircle2", "MIN_HEIGHT2", "MIN_WIDTH2", "flippedTriangle", "flippedTriangle2", "forkJoin", "dir", "state2", "halfRoundedRectangle", "createHexagonPathD", "m", "hexagon", "f", "wa", "ha", "m2", "hourglass", "icon", "flowchart", "assetHeight", "assetWidth", "iconSize", "defaultWidth", "topLabel", "stylesMap", "compileStyles", "iconNode", "outerWidth", "outerHeight", "iconShape", "outerShape", "iconElem", "getIconSVG", "iconBBox", "iconWidth", "iconHeight", "iconX", "iconY", "nodeHeight", "iconCircle", "mainBkg", "fill", "diameter", "iconRounded", "iconSquare", "imageSquare", "img", "imageNaturalWidth", "imageNaturalHeight", "imageRawWidth", "imageWidth", "imageHeight", "imageNode", "image", "inv_trapezoid", "labelRect", "lean_left", "lean_right", "lightningBolt", "lightningBolt2", "createCylinderPathD2", "outerOffset", "createOuterCylinderPathD2", "createInnerCylinderPathD2", "MIN_HEIGHT3", "MIN_WIDTH3", "linedCylinder", "linedWaveEdgedRect", "waveAmplitude", "finalH", "waveEdgeRect", "multiRect", "outerPathPoints", "innerPathPoints", "outerPath", "innerPath", "innerNode", "multiRect2", "multiWaveEdgedRectangle", "adjustFinalHeight", "wavePoints", "lastWavePoint", "note", "getConfig", "noteShapeNode", "createDecisionBoxPathD", "size", "question", "adjustment", "s2", "points2", "res", "rect_left_inv_arrow", "notch", "rectWithTitle", "g", "description", "title", "div2", "dv2", "textRows", "titleBox", "descr", "roughLine", "roundedRect", "FRAME_WIDTH", "shadedProcess", "slopedRect", "squareRect2", "stadium", "state", "stateEnd", "lineColor", "stateBorder", "nodeShadow", "innerFill", "innerNodeRadius", "circle2", "svgId", "filterId", "stateStart", "solidStateFill", "FRAME_WIDTH2", "subroutine", "l1", "l2", "el", "TAG_RATIO", "taggedRect", "tagWidth", "tagHeight", "tagPoints", "rectNode", "tagPath", "tagNode", "taggedRect2", "taggedWaveEdgedRectangle", "waveEdgeRectPath", "waveEdgeRectNode", "taggedWaveEdgeRectPath", "taggedWaveEdgeRectNode", "text", "createCylinderPathD3", "createOuterCylinderPathD3", "createInnerCylinderPathD3", "MIN_HEIGHT4", "MIN_WIDTH4", "tiltedCylinder", "originalHeight", "rx2", "trapezoid", "trapezoidalPentagon", "MIN_HEIGHT5", "MIN_WIDTH5", "triangle", "waveEdgedRectangle", "widthDif", "extraW", "waveRectangle", "waveAmplitude2", "waveRectPath", "waveRectNode", "waveRect", "rectOffset", "windowPane", "no", "windowPane2", "COLOR_THEMES", "REDUX_THEMES", "erBox", "entityNode", "theme", "rowEven", "rowOdd", "borderColorArray", "themeVariables2", "background", "backgroundNode", "PADDING", "TEXT_PADDING", "calculateTextWidth", "shapeSvg2", "colorIndex", "textElement", "nameBBox", "addText", "yOffset", "yOffsets", "rows", "maxTypeWidth", "maxNameWidth", "maxKeysWidth", "maxCommentWidth", "keysPresent", "commentPresent", "attribute", "typeBBox", "nameBBox2", "keysBBox", "commentBBox", "rowHeight", "totalWidthSections", "shapeBBox", "difference", "maxWidth", "totalShapeBBoxHeight", "sum", "row", "_", "nodes", "transform", "translateX", "translateY", "translate", "roughRect", "isEven", "roughRect2", "thickness", "lineToPolygon", "xCoord", "yOffset2", "yCoord", "strokeStyles", "e", "labelText", "parseGenericTypes", "child", "textHelper", "GAP", "annotationGroup", "labelGroup", "membersGroup", "methodsGroup", "annotationGroupHeight", "labelGroupHeight", "membersGroupHeight", "annotation", "addText2", "labelGroupBBox", "member", "methodsYOffset", "method", "annotationGroupBBox", "parentGroup", "styles", "textEl", "textContent", "hasKatex", "sanitizeText3", "numberOfLines", "images", "noImgText", "setupImage", "bodyFontSize", "textChild", "classBox", "useGradient", "classNode", "renderExtraBox", "nodeHeightGreater", "extraHeight", "rectBBox", "methodsAreaPlacement", "newTranslateY", "membersGroupHeightForMethods", "newTranslateX", "_2", "i2", "nodes2", "firstLineY", "secondLineY", "colorRegex", "match", "colorStyle", "match2", "requirementBox", "requirementNode", "elementNode", "isRequirementNode", "requirementEdgeLabelBackground", "typeHeight", "addText3", "accumulativeHeight", "nameHeight", "idHeight", "textHeight", "riskHeight", "typeHeight2", "lineY", "polygonPoints", "inputText", "colorFromPriority", "priority", "kanbanItem", "kanbanNode", "orgWidth", "labelElTitle", "ticketUrl", "link", "bbox2", "labelElAssigned", "bboxAssigned", "heightAdj", "line", "lineX", "bang", "effectiveWidth", "effectiveHeight", "bangElem", "cloud", "cloudElem", "defaultMindmapNode", "rd", "bg", "mindmapCircle", "shapesDefs", "generateShapeMap", "entries", "alias", "shapes2", "isValidShape", "nodeElems", "insertNode", "renderOptions", "newEl", "shapeHandler", "target", "setNodeElem", "clear2", "positionNode", "diff"] +} diff --git a/templates/tabulareditor/public/chunk-5JDMXW2E.min.js b/templates/tabulareditor/public/chunk-5JDMXW2E.min.js new file mode 100644 index 000000000..51f770364 --- /dev/null +++ b/templates/tabulareditor/public/chunk-5JDMXW2E.min.js @@ -0,0 +1,207 @@ +import{a as lt}from"./chunk-MZ3CL6N5.min.js";import{a as ct}from"./chunk-INAAVCJQ.min.js";import{a as ot}from"./chunk-B7ZLSGB4.min.js";import{b as rt,c as nt}from"./chunk-PNGYEUMH.min.js";import{h as ut}from"./chunk-CLGT2SZG.min.js";import{p as Ae,s as at}from"./chunk-YPRWTSV5.min.js";import{H as He,J as P,N as v,T as Je,U as Ze,V as $e,W as et,X as tt,Y as st,Z as it,_ as F,g as qe}from"./chunk-LXXU3C6C.min.js";import{b,d as pe,j as Z}from"./chunk-BJGJ3C53.min.js";var Ve=(function(){var t=b(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],c=[1,26],l=[1,42],d=[1,24],k=[1,25],f=[1,32],N=[1,33],fe=[1,34],m=[1,45],ke=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],Ee=[1,27],Te=[1,28],ye=[1,29],De=[1,30],Fe=[1,31],C=[1,44],E=[1,46],T=[1,43],y=[1,47],Be=[1,9],A=[1,8,9],$=[1,58],ee=[1,59],te=[1,60],se=[1,61],ie=[1,62],_e=[1,63],Se=[1,64],_=[1,8,9,41],Me=[1,77],R=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ae=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],re=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Re=[13,60,68,69,70,71,72,86,100,102,103],ne=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Ge=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],ue=[12,39],Ne=[1,8,9,39,41,44,46],le=[1,8,9,22],ze=[1,153],Ye=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Le={trace:b(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:b(function(o,h,p,u,g,e,J){var s=e.length-1;switch(g){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:u.addRelation(e[s]);break;case 20:e[s-1].title=u.cleanupLabel(e[s]),u.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),u.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),u.setAccDescription(this.$);break;case 34:u.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 35:u.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 36:this.$=u.addNamespace(e[s]);break;case 37:this.$=u.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:u.setCssClass(e[s-2],e[s]);break;case 49:u.addMembers(e[s-3],e[s-1]);break;case 51:u.setCssClass(e[s-5],e[s-3]),u.addMembers(e[s-5],e[s-1]);break;case 52:u.addAnnotation(e[s-3],e[s-1]);break;case 53:u.addAnnotation(e[s-6],e[s-4]),u.addMembers(e[s-6],e[s-1]);break;case 54:u.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],u.addClass(e[s]);break;case 56:this.$=e[s-1],u.addClass(e[s-1]),u.setClassLabel(e[s-1],e[s]);break;case 60:u.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:u.addMember(e[s-1],u.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=u.addNote(e[s],e[s-1]);break;case 72:this.$=u.addNote(e[s]);break;case 73:this.$=e[s-2],u.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:u.setDirection("TB");break;case 77:u.setDirection("BT");break;case 78:u.setDirection("RL");break;case 79:u.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=u.relationType.AGGREGATION;break;case 85:this.$=u.relationType.EXTENSION;break;case 86:this.$=u.relationType.COMPOSITION;break;case 87:this.$=u.relationType.DEPENDENCY;break;case 88:this.$=u.relationType.LOLLIPOP;break;case 89:this.$=u.lineType.LINE;break;case 90:this.$=u.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],u.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],u.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],u.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],u.setLink(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],u.setLink(e[s-3],e[s-2],e[s]),u.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],u.setClickEvent(e[s-3],e[s-2],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],u.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],u.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],u.setLink(e[s-3],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],u.setLink(e[s-4],e[s-2],e[s]),u.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],u.setCssStyle(e[s-1],e[s]);break;case 106:u.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:c,48:l,51:d,52:k,54:f,56:N,57:fe,60:m,62:ke,63:ge,64:me,65:Ce,75:Ee,76:Te,78:ye,82:De,83:Fe,86:C,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(Be,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:$,69:ee,70:te,71:se,72:ie,73:_e,74:Se}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(A,[2,66]),{16:69,60:m,86:C,100:E,102:T},{16:39,17:40,19:70,60:m,86:C,100:E,102:T,103:y},{16:39,17:40,19:71,60:m,86:C,100:E,102:T,103:y},{16:39,17:40,19:72,60:m,86:C,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:m,86:C,100:E,102:T,103:y},{13:Me,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(R,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:m,86:C,100:E,102:T,103:y}),t(R,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:m,86:C,100:E,102:T,103:y},{16:39,17:40,19:87,60:m,86:C,100:E,102:T,103:y},t(ae,[2,133]),t(ae,[2,134]),t(ae,[2,135]),t(ae,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(Be,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:c,48:l,51:d,52:k,54:f,56:N,57:fe,60:m,62:ke,63:ge,64:me,65:Ce,75:Ee,76:Te,78:ye,82:De,83:Fe,86:C,100:E,102:T,103:y}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:r,38:22,42:n,43:23,46:c,48:l,51:d,52:k,54:f,56:N,57:fe,60:m,62:ke,63:ge,64:me,65:Ce,75:Ee,76:Te,78:ye,82:De,83:Fe,86:C,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:m,86:C,100:E,102:T,103:y},{53:92,66:56,67:57,68:$,69:ee,70:te,71:se,72:ie,73:_e,74:Se},t(A,[2,64]),{67:93,73:_e,74:Se},t(re,[2,83],{66:94,68:$,69:ee,70:te,71:se,72:ie}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Re,[2,89]),t(Re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:l,54:f,56:N},{16:100,60:m,86:C,100:E,102:T},{41:[1,102],45:101,51:ne},{16:104,60:m,86:C,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Me,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Ge,[2,74]),{16:39,17:40,19:126,60:m,86:C,100:E,102:T,103:y},t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),{11:127,12:Ue,39:[2,36]},t(ue,[2,9],{16:85,17:86,15:130,18:[1,129],60:m,86:C,100:E,102:T,103:y}),t(ue,[2,10]),t(Ne,[2,55],{11:131,12:Ue}),t(Be,[2,7]),{9:[1,132]},t(le,[2,67]),{16:39,17:40,19:133,60:m,86:C,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:m,86:C,100:E,102:T,103:y},t(re,[2,82],{66:136,68:$,69:ee,70:te,71:se,72:ie}),t(re,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:l,54:f,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:ne},{47:[1,145]},{16:39,17:40,19:146,60:m,86:C,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:ze}),t(Ye,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:ze}),{60:[1,155]},t(R,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:m,86:C,100:E,102:T,103:y},t(ue,[2,12]),t(Ne,[2,56]),{1:[2,4]},t(le,[2,69]),t(le,[2,68]),{16:39,17:40,19:158,60:m,86:C,100:E,102:T,103:y},t(re,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:l,54:f,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:l,54:f,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:l,54:f,56:N},{45:163,51:ne},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Ge,[2,75]),{14:[1,170]},t(ue,[2,11]),t(le,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:ne},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(Ye,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(Ne,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:b(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:b(function(o){var h=this,p=[0],u=[],g=[null],e=[],J=this.table,s="",oe=0,Ke=0,We=0,bt=2,Qe=1,ft=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(w.yy[xe]=this.yy[xe]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ve=D.yylloc;e.push(ve);var kt=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gt(S){p.length=p.length-2*S,g.length=g.length-S,e.length=e.length-S}b(gt,"popStack");function je(){var S;return S=u.pop()||D.lex()||Qe,typeof S!="number"&&(S instanceof Array&&(u=S,S=u.pop()),S=h.symbols_[S]||S),S}b(je,"lex");for(var B,Ie,V,L,yt,Oe,G={},he,I,Xe,de;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=je()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var we="";de=[];for(he in J[V])this.terminals_[he]&&he>bt&&de.push("'"+this.terminals_[he]+"'");D.showPosition?we="Parse error on line "+(oe+1)+`: +`+D.showPosition()+` +Expecting `+de.join(", ")+", got '"+(this.terminals_[B]||B)+"'":we="Parse error on line "+(oe+1)+": Unexpected "+(B==Qe?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(we,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:ve,expected:de})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+B);switch(L[0]){case 1:p.push(B),g.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ie?(B=Ie,Ie=null):(Ke=D.yyleng,s=D.yytext,oe=D.yylineno,ve=D.yylloc,We>0&&We--);break;case 2:if(I=this.productions_[L[1]][1],G.$=g[g.length-I],G._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},kt&&(G._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Oe=this.performAction.apply(G,[s,Ke,oe,w.yy,L[1],g,e].concat(ft)),typeof Oe<"u")return Oe;I&&(p=p.slice(0,-1*I*2),g=g.slice(0,-1*I),e=e.slice(0,-1*I)),p.push(this.productions_[L[1]][0]),g.push(G.$),e.push(G._$),Xe=J[p[p.length-2]][p[p.length-1]],p.push(Xe);break;case 3:return!0}}return!0},"parse")},At=(function(){var O={EOF:1,parseError:b(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:b(function(o,h){return this.yy=h||this.yy||{},this._input=o,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:b(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:b(function(o){var h=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var u=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),p.length-1&&(this.yylineno-=p.length-1);var g=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:p?(p.length===u.length?this.yylloc.first_column:0)+u[u.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:b(function(){return this._more=!0,this},"more"),reject:b(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:b(function(o){this.unput(this.match.slice(o))},"less"),pastInput:b(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:b(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:b(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+` +`+h+"^"},"showPosition"),test_match:b(function(o,h){var p,u,g;if(this.options.backtrack_lexer&&(g={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&&(g.yylloc.range=this.yylloc.range.slice(0))),u=o[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],p=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var e in g)this[e]=g[e];return!1}return!1},"test_match"),next:b(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,h,p,u;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),e=0;eh[0].length)){if(h=p,u=e,this.options.backtrack_lexer){if(o=this.test_match(p,g[e]),o!==!1)return o;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(o=this.test_match(h,g[u]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:b(function(){var h=this.next();return h||this.lex()},"lex"),begin:b(function(h){this.conditionStack.push(h)},"begin"),popState:b(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:b(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:b(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:b(function(h){this.begin(h)},"pushState"),stateStackSize:b(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:b(function(h,p,u,g){var e=g;switch(u){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;break;case 35:return"EOF_IN_STRUCT";case 36:return 8;case 37:break;case 38:return"EDGE_STATE";case 39:return this.begin("class"),48;break;case 40:return this.popState(),8;break;case 41:break;case 42:return this.popState(),this.popState(),41;break;case 43:return this.begin("class-body"),39;break;case 44:return this.popState(),41;break;case 45:return"EOF_IN_STRUCT";case 46:return"EDGE_STATE";case 47:return"OPEN_IN_STRUCT";case 48:break;case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 62:this.popState();break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return"EQUALS";case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}};return O})();Le.lexer=At;function ce(){this.yy={}}return b(ce,"Parser"),ce.prototype=Le,Le.Parser=ce,new ce})();Ve.parser=Ve;var vt=Ve,ht=["#","+","~","-",""],dt=class{static{b(this,"ClassMember")}constructor(t,i){this.memberType=i,this.visibility="",this.classifier="",this.text="";let a=He(t,F());this.parseMember(a)}getDisplayDetails(){let t=this.visibility+P(this.id);this.memberType==="method"&&(t+=`(${P(this.parameters.trim())})`,this.returnType&&(t+=" : "+P(this.returnType))),t=t.trim();let i=this.parseClassifier();return{displayText:t,cssStyle:i}}parseMember(t){let i="";if(this.memberType==="method"){let n=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(n){let c=n[1]?n[1].trim():"";if(ht.includes(c)&&(this.visibility=c),this.id=n[2],this.parameters=n[3]?n[3].trim():"",i=n[4]?n[4].trim():"",this.returnType=n[5]?n[5].trim():"",i===""){let l=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(l)&&(i=l,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let r=t.length,n=t.substring(0,1),c=t.substring(r-1);ht.includes(n)&&(this.visibility=n),/[$*]/.exec(c)&&(i=c),this.id=t.substring(this.visibility===""?0:1,i===""?r:r-1)}this.classifier=i,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let a=`${this.visibility?"\\"+this.visibility:""}${P(this.id)}${this.memberType==="method"?`(${P(this.parameters)})${this.returnType?" : "+P(this.returnType):""}`:""}`;this.text=a.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},be="classId-",pt=0,M=b(t=>v.sanitizeText(t,F()),"sanitizeText"),wt=class Pe{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=b(i=>{let a=ut();Z(i).select("svg").selectAll("g").filter(function(){return Z(this).attr("title")!==null}).on("mouseover",c=>{let l=Z(c.currentTarget),d=l.attr("title");if(!d)return;let k=c.currentTarget.getBoundingClientRect();a.transition().duration(200).style("opacity",".9"),a.html(qe.sanitize(d)).style("left",`${window.scrollX+k.left+k.width/2}px`).style("top",`${window.scrollY+k.bottom+4}px`),l.classed("hover",!0)}).on("mouseout",c=>{a.transition().duration(500).style("opacity",0),Z(c.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=Ze,this.getAccTitle=$e,this.setAccDescription=et,this.getAccDescription=tt,this.setDiagramTitle=st,this.getDiagramTitle=it,this.getConfig=b(()=>F().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{b(this,"ClassDB")}splitClassNameAndType(i){let a=v.sanitizeText(i,F()),r="",n=a;if(a.indexOf("~")>0){let c=a.split("~");n=M(c[0]),r=M(c[1])}return{className:n,type:r}}setClassLabel(i,a){let r=v.sanitizeText(i,F());a&&(a=M(a));let{className:n}=this.splitClassNameAndType(r);this.classes.get(n).label=a,this.classes.get(n).text=`${a}${this.classes.get(n).type?`<${this.classes.get(n).type}>`:""}`}addClass(i){let a=v.sanitizeText(i,F()),{className:r,type:n}=this.splitClassNameAndType(a);if(this.classes.has(r))return;let c=v.sanitizeText(r,F());this.classes.set(c,{id:c,type:n,label:c,text:`${c}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:be+c+"-"+pt}),pt++}addInterface(i,a){let r={id:`interface${this.interfaces.length}`,label:i,classId:a};this.interfaces.push(r)}setDiagramId(i){this.diagramId=i}lookUpDomId(i){let a=v.sanitizeText(i,F());if(this.classes.has(a)){let r=this.classes.get(a).domId;return this.diagramId?`${this.diagramId}-${r}`:r}throw new Error("Class not found: "+a)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",Je()}getClass(i){return this.classes.get(i)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(i){let a=typeof i=="number"?`note${i}`:i;return this.notes.get(a)}getNotes(){return this.notes}addRelation(i){pe.debug("Adding relation: "+JSON.stringify(i));let a=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];i.relation.type1===this.relationType.LOLLIPOP&&!a.includes(i.relation.type2)?(this.addClass(i.id2),this.addInterface(i.id1,i.id2),i.id1=`interface${this.interfaces.length-1}`):i.relation.type2===this.relationType.LOLLIPOP&&!a.includes(i.relation.type1)?(this.addClass(i.id1),this.addInterface(i.id2,i.id1),i.id2=`interface${this.interfaces.length-1}`):(this.addClass(i.id1),this.addClass(i.id2)),i.id1=this.splitClassNameAndType(i.id1).className,i.id2=this.splitClassNameAndType(i.id2).className,i.relationTitle1=v.sanitizeText(i.relationTitle1.trim(),F()),i.relationTitle2=v.sanitizeText(i.relationTitle2.trim(),F()),this.relations.push(i)}addAnnotation(i,a){let r=this.splitClassNameAndType(i).className;this.classes.get(r).annotations.push(a)}addMember(i,a){this.addClass(i);let r=this.splitClassNameAndType(i).className,n=this.classes.get(r);if(typeof a=="string"){let c=a.trim();c.startsWith("<<")&&c.endsWith(">>")?n.annotations.push(M(c.substring(2,c.length-2))):c.indexOf(")")>0?n.methods.push(new dt(c,"method")):c&&n.members.push(new dt(c,"attribute"))}}addMembers(i,a){Array.isArray(a)&&(a.reverse(),a.forEach(r=>this.addMember(i,r)))}addNote(i,a){let r=this.notes.size,n={id:`note${r}`,class:a,text:i,index:r};return this.notes.set(n.id,n),n.id}cleanupLabel(i){return i.startsWith(":")&&(i=i.substring(1)),M(i.trim())}setCssClass(i,a){i.split(",").forEach(r=>{let n=r;/\d/.exec(r[0])&&(n=be+n);let c=this.classes.get(n);c&&(c.cssClasses+=" "+a)})}defineClass(i,a){for(let r of i){let n=this.styleClasses.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},this.styleClasses.set(r,n)),a&&a.forEach(c=>{if(/color/.exec(c)){let l=c.replace("fill","bgFill");n.textStyles.push(l)}n.styles.push(c)}),this.classes.forEach(c=>{c.cssClasses.includes(r)&&c.styles.push(...a.flatMap(l=>l.split(",")))})}}setTooltip(i,a){i.split(",").forEach(r=>{a!==void 0&&(this.classes.get(r).tooltip=M(a))})}getTooltip(i,a){return a&&this.namespaces.has(a)?this.namespaces.get(a).classes.get(i).tooltip:this.classes.get(i).tooltip}setLink(i,a,r){let n=F();i.split(",").forEach(c=>{let l=c;/\d/.exec(c[0])&&(l=be+l);let d=this.classes.get(l);d&&(d.link=Ae.formatUrl(a,n),n.securityLevel==="sandbox"?d.linkTarget="_top":typeof r=="string"?d.linkTarget=M(r):d.linkTarget="_blank")}),this.setCssClass(i,"clickable")}setClickEvent(i,a,r){i.split(",").forEach(n=>{this.setClickFunc(n,a,r),this.classes.get(n).haveCallback=!0}),this.setCssClass(i,"clickable")}setClickFunc(i,a,r){let n=v.sanitizeText(i,F());if(F().securityLevel!=="loose"||a===void 0)return;let l=n;if(this.classes.has(l)){let d=[];if(typeof r=="string"){d=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k{let k=this.lookUpDomId(l),f=document.querySelector(`[id="${k}"]`);f!==null&&f.addEventListener("click",()=>{Ae.runFunc(a,...d)},!1)})}}bindFunctions(i){this.functions.forEach(a=>{a(i)})}escapeHtml(i){return i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(i){this.direction=i}static resolveQualifiedId(i,a){let r=a.at(-1);return r?`${r}.${i}`:i}static getAncestorIds(i){let a=i.split("."),r=new Array(a.length);r[0]=a[0];for(let n=1;n0?c[l-1]:void 0,f=l===c.length-1,N=f&&a?a:n[l];this.namespaces.has(d)?f&&(this.namespaces.get(d).explicit=!0):this.namespaces.set(d,this.createNamespaceNode(d,N,k,f)),k&&this.linkParentChild(k,d)}return r}popNamespace(){this.namespaceStack.pop()}getNamespace(i){return this.namespaces.get(i)}getNamespaces(){return this.namespaces}addClassesToNamespace(i,a,r){if(this.namespaces.has(i)){for(let n of a){let{className:c}=this.splitClassNameAndType(n),l=this.getClass(c);l.parent=i,this.namespaces.get(i).classes.set(c,l)}for(let n of r){let c=this.getNote(n);c.parent=i,this.namespaces.get(i).notes.set(n,c)}}}setCssStyle(i,a){let r=this.classes.get(i);if(!(!a||!r))for(let n of a)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)}getArrowMarker(i){let a;switch(i){case 0:a="aggregation";break;case 1:a="extension";break;case 2:a="composition";break;case 3:a="dependency";break;case 4:a="lollipop";break;default:a="none"}return a}resolveExplicitAncestor(i){let a=i;for(;a;){let r=this.namespaces.get(a);if(!r)return;if(r.explicit)return a;a=r.parent}}getData(){let i=[],a=[],r=F(),n=r.class?.hierarchicalNamespaces??!0;for(let l of this.namespaces.values()){if(!n&&!l.explicit)continue;let d={id:l.id,label:n?l.label:l.id,isGroup:!0,padding:r.class.padding??16,shape:"rect",cssStyles:[],look:r.look,parentId:n?l.parent:void 0};i.push(d)}for(let l of this.classes.values()){let d=n?l.parent:this.resolveExplicitAncestor(l.parent),k={...l,type:void 0,isGroup:!1,parentId:d,look:r.look};i.push(k)}for(let l of this.notes.values()){let d=n?l.parent:this.resolveExplicitAncestor(l.parent),k={id:l.id,label:l.text,isGroup:!1,shape:"note",padding:r.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${r.themeVariables.noteBkgColor}`,`stroke: ${r.themeVariables.noteBorderColor}`],look:r.look,parentId:d,labelType:"markdown"};i.push(k);let f=this.classes.get(l.class)?.id;if(f){let N={id:`edgeNote${l.index}`,start:l.id,end:f,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:r.look};a.push(N)}}for(let l of this.interfaces){let d={id:l.id,label:l.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:r.look};i.push(d)}let c=0;for(let l of this.relations){c++;let d={id:at(l.id1,l.id2,{prefix:"id",counter:c}),start:l.id1,end:l.id2,type:"normal",label:l.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(l.relation.type1),arrowTypeEnd:this.getArrowMarker(l.relation.type2),startLabelRight:l.relationTitle1==="none"?"":l.relationTitle1,endLabelLeft:l.relationTitle2==="none"?"":l.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:l.style||"",pattern:l.relation.lineType==1?"dashed":"solid",look:r.look,labelType:"markdown"};a.push(d)}return{nodes:i,edges:a,other:{},config:r,direction:this.getDirection()}}},mt=b(t=>`g.classGroup text { + fill: ${t.nodeBorder||t.classText}; + stroke: none; + font-family: ${t.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + + .cluster-label text { + fill: ${t.titleColor}; + } + .cluster-label span { + color: ${t.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .cluster rect { + fill: ${t.clusterBkg}; + stroke: ${t.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${t.titleColor}; + } + + .cluster span { + color: ${t.titleColor}; + } + +.nodeLabel, .edgeLabel { + color: ${t.classText}; +} + +.noteLabel .nodeLabel, .noteLabel .edgeLabel { + color: ${t.noteTextColor}; +} +.edgeLabel .label rect { + fill: ${t.mainBkg}; +} +.label text { + fill: ${t.classText}; +} + +.labelBkg { + background: ${t.mainBkg}; +} +.edgeLabel .label span { + background: ${t.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: ${t.strokeWidth}; + } + + +.divider { + stroke: ${t.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.classGroup line { + stroke: ${t.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${t.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${t.lineColor}; + stroke-width: ${t.strokeWidth}; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +[id$="-compositionStart"], .composition { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-compositionEnd"], .composition { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyStart"], .dependency { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyEnd"], .dependency { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionStart"], .extension { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionEnd"], .extension { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationStart"], .aggregation { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationEnd"], .aggregation { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-lollipopStart"], .lollipop { + fill: ${t.mainBkg} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +[id$="-lollipopEnd"], .lollipop { + fill: ${t.mainBkg} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} + +.edgeLabel[data-look="neo"] { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; +} + ${lt()} +`,"getStyles"),Vt=mt,Ct=b((t,i="TB")=>{if(!t.doc)return i;let a=i;for(let r of t.doc)r.stmt==="dir"&&(a=r.value);return a},"getDir"),Et=b(function(t,i){return i.db.getClasses()},"getClasses"),Tt=b(async function(t,i,a,r){pe.info("REF0:"),pe.info("Drawing class diagram (v3)",i);let{securityLevel:n,state:c,layout:l}=F();r.db.setDiagramId(i);let d=r.db.getData(),k=ct(i,n);d.type=r.type,d.layoutAlgorithm=nt(l),d.nodeSpacing=c?.nodeSpacing||50,d.rankSpacing=c?.rankSpacing||50,d.markers=["aggregation","extension","composition","dependency","lollipop"],d.diagramId=i,await rt(d,k);let f=8;Ae.insertTitle(k,"classDiagramTitleText",c?.titleTopMargin??25,r.db.getDiagramTitle()),ot(k,f,"classDiagram",c?.useMaxWidth??!0)},"draw"),Pt={getClasses:Et,draw:Tt,getDir:Ct};export{vt as a,wt as b,Vt as c,Pt as d}; +//# sourceMappingURL=chunk-5JDMXW2E.min.js.map diff --git a/templates/tabulareditor/public/chunk-5JDMXW2E.min.js.map b/templates/tabulareditor/public/chunk-5JDMXW2E.min.js.map new file mode 100644 index 000000000..5f96206fd --- /dev/null +++ b/templates/tabulareditor/public/chunk-5JDMXW2E.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../node_modules/mermaid/dist/chunks/mermaid.core/chunk-727SXJPM.mjs"], + "sourcesContent": ["import {\n getIconStyles\n} from \"./chunk-FMBD7UC4.mjs\";\nimport {\n createTooltip\n} from \"./chunk-ND2GUHAM.mjs\";\nimport {\n getDiagramElement\n} from \"./chunk-55IACEB6.mjs\";\nimport {\n setupViewPortForSVG\n} from \"./chunk-2J33WTMH.mjs\";\nimport {\n getRegisteredLayoutAlgorithm,\n render\n} from \"./chunk-LZXEDZCA.mjs\";\nimport {\n getEdgeId,\n utils_default\n} from \"./chunk-5ZQYHXKU.mjs\";\nimport {\n clear,\n common_default,\n getAccDescription,\n getAccTitle,\n getConfig2 as getConfig,\n getDiagramTitle,\n parseGenericTypes,\n sanitizeText,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/class/parser/classDiagram.jison\nvar parser = (function() {\n var o = /* @__PURE__ */ __name(function(k, v, o2, l) {\n for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;\n return o2;\n }, \"o\"), $V0 = [1, 18], $V1 = [1, 19], $V2 = [1, 20], $V3 = [1, 41], $V4 = [1, 26], $V5 = [1, 42], $V6 = [1, 24], $V7 = [1, 25], $V8 = [1, 32], $V9 = [1, 33], $Va = [1, 34], $Vb = [1, 45], $Vc = [1, 35], $Vd = [1, 36], $Ve = [1, 37], $Vf = [1, 38], $Vg = [1, 27], $Vh = [1, 28], $Vi = [1, 29], $Vj = [1, 30], $Vk = [1, 31], $Vl = [1, 44], $Vm = [1, 46], $Vn = [1, 43], $Vo = [1, 47], $Vp = [1, 9], $Vq = [1, 8, 9], $Vr = [1, 58], $Vs = [1, 59], $Vt = [1, 60], $Vu = [1, 61], $Vv = [1, 62], $Vw = [1, 63], $Vx = [1, 64], $Vy = [1, 8, 9, 41], $Vz = [1, 77], $VA = [1, 8, 9, 12, 13, 22, 39, 41, 44, 46, 68, 69, 70, 71, 72, 73, 74, 79, 81], $VB = [1, 8, 9, 12, 13, 18, 20, 22, 39, 41, 44, 46, 47, 60, 68, 69, 70, 71, 72, 73, 74, 79, 81, 86, 100, 102, 103], $VC = [13, 60, 86, 100, 102, 103], $VD = [13, 60, 73, 74, 86, 100, 102, 103], $VE = [13, 60, 68, 69, 70, 71, 72, 86, 100, 102, 103], $VF = [1, 103], $VG = [1, 121], $VH = [1, 117], $VI = [1, 113], $VJ = [1, 119], $VK = [1, 114], $VL = [1, 115], $VM = [1, 116], $VN = [1, 118], $VO = [1, 120], $VP = [22, 50, 60, 61, 82, 86, 87, 88, 89, 90], $VQ = [1, 128], $VR = [12, 39], $VS = [1, 8, 9, 39, 41, 44, 46], $VT = [1, 8, 9, 22], $VU = [1, 153], $VV = [1, 8, 9, 61], $VW = [1, 8, 9, 22, 50, 60, 61, 82, 86, 87, 88, 89, 90];\n var parser2 = {\n trace: /* @__PURE__ */ __name(function trace() {\n }, \"trace\"),\n yy: {},\n symbols_: { \"error\": 2, \"start\": 3, \"mermaidDoc\": 4, \"statements\": 5, \"graphConfig\": 6, \"CLASS_DIAGRAM\": 7, \"NEWLINE\": 8, \"EOF\": 9, \"statement\": 10, \"classLabel\": 11, \"SQS\": 12, \"STR\": 13, \"SQE\": 14, \"namespaceName\": 15, \"alphaNumToken\": 16, \"classLiteralName\": 17, \"DOT\": 18, \"className\": 19, \"GENERICTYPE\": 20, \"relationStatement\": 21, \"LABEL\": 22, \"namespaceStatement\": 23, \"classStatement\": 24, \"memberStatement\": 25, \"annotationStatement\": 26, \"clickStatement\": 27, \"styleStatement\": 28, \"cssClassStatement\": 29, \"noteStatement\": 30, \"classDefStatement\": 31, \"direction\": 32, \"acc_title\": 33, \"acc_title_value\": 34, \"acc_descr\": 35, \"acc_descr_value\": 36, \"acc_descr_multiline_value\": 37, \"namespaceIdentifier\": 38, \"STRUCT_START\": 39, \"classStatements\": 40, \"STRUCT_STOP\": 41, \"NAMESPACE\": 42, \"classIdentifier\": 43, \"STYLE_SEPARATOR\": 44, \"members\": 45, \"ANNOTATION_START\": 46, \"ANNOTATION_END\": 47, \"CLASS\": 48, \"emptyBody\": 49, \"SPACE\": 50, \"MEMBER\": 51, \"SEPARATOR\": 52, \"relation\": 53, \"NOTE_FOR\": 54, \"noteText\": 55, \"NOTE\": 56, \"CLASSDEF\": 57, \"classList\": 58, \"stylesOpt\": 59, \"ALPHA\": 60, \"COMMA\": 61, \"direction_tb\": 62, \"direction_bt\": 63, \"direction_rl\": 64, \"direction_lr\": 65, \"relationType\": 66, \"lineType\": 67, \"AGGREGATION\": 68, \"EXTENSION\": 69, \"COMPOSITION\": 70, \"DEPENDENCY\": 71, \"LOLLIPOP\": 72, \"LINE\": 73, \"DOTTED_LINE\": 74, \"CALLBACK\": 75, \"LINK\": 76, \"LINK_TARGET\": 77, \"CLICK\": 78, \"CALLBACK_NAME\": 79, \"CALLBACK_ARGS\": 80, \"HREF\": 81, \"STYLE\": 82, \"CSSCLASS\": 83, \"style\": 84, \"styleComponent\": 85, \"NUM\": 86, \"COLON\": 87, \"UNIT\": 88, \"BRKT\": 89, \"PCT\": 90, \"commentToken\": 91, \"textToken\": 92, \"graphCodeTokens\": 93, \"textNoTagsToken\": 94, \"TAGSTART\": 95, \"TAGEND\": 96, \"==\": 97, \"--\": 98, \"DEFAULT\": 99, \"MINUS\": 100, \"keywords\": 101, \"UNICODE_TEXT\": 102, \"BQUOTE_STR\": 103, \"$accept\": 0, \"$end\": 1 },\n terminals_: { 2: \"error\", 7: \"CLASS_DIAGRAM\", 8: \"NEWLINE\", 9: \"EOF\", 12: \"SQS\", 13: \"STR\", 14: \"SQE\", 18: \"DOT\", 20: \"GENERICTYPE\", 22: \"LABEL\", 33: \"acc_title\", 34: \"acc_title_value\", 35: \"acc_descr\", 36: \"acc_descr_value\", 37: \"acc_descr_multiline_value\", 39: \"STRUCT_START\", 41: \"STRUCT_STOP\", 42: \"NAMESPACE\", 44: \"STYLE_SEPARATOR\", 46: \"ANNOTATION_START\", 47: \"ANNOTATION_END\", 48: \"CLASS\", 50: \"SPACE\", 51: \"MEMBER\", 52: \"SEPARATOR\", 54: \"NOTE_FOR\", 56: \"NOTE\", 57: \"CLASSDEF\", 60: \"ALPHA\", 61: \"COMMA\", 62: \"direction_tb\", 63: \"direction_bt\", 64: \"direction_rl\", 65: \"direction_lr\", 68: \"AGGREGATION\", 69: \"EXTENSION\", 70: \"COMPOSITION\", 71: \"DEPENDENCY\", 72: \"LOLLIPOP\", 73: \"LINE\", 74: \"DOTTED_LINE\", 75: \"CALLBACK\", 76: \"LINK\", 77: \"LINK_TARGET\", 78: \"CLICK\", 79: \"CALLBACK_NAME\", 80: \"CALLBACK_ARGS\", 81: \"HREF\", 82: \"STYLE\", 83: \"CSSCLASS\", 86: \"NUM\", 87: \"COLON\", 88: \"UNIT\", 89: \"BRKT\", 90: \"PCT\", 93: \"graphCodeTokens\", 95: \"TAGSTART\", 96: \"TAGEND\", 97: \"==\", 98: \"--\", 99: \"DEFAULT\", 100: \"MINUS\", 101: \"keywords\", 102: \"UNICODE_TEXT\", 103: \"BQUOTE_STR\" },\n productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 1], [15, 3], [15, 2], [19, 1], [19, 3], [19, 1], [19, 2], [19, 2], [19, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [23, 4], [23, 5], [38, 2], [38, 3], [40, 1], [40, 2], [40, 3], [40, 1], [40, 2], [40, 3], [40, 1], [40, 2], [40, 3], [24, 1], [24, 3], [24, 4], [24, 3], [24, 6], [24, 4], [24, 7], [24, 6], [43, 2], [43, 3], [49, 0], [49, 2], [49, 2], [26, 4], [45, 1], [45, 2], [25, 1], [25, 2], [25, 1], [25, 1], [21, 3], [21, 4], [21, 4], [21, 5], [30, 3], [30, 2], [31, 3], [58, 1], [58, 3], [32, 1], [32, 1], [32, 1], [32, 1], [53, 3], [53, 2], [53, 2], [53, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [67, 1], [67, 1], [27, 3], [27, 4], [27, 3], [27, 4], [27, 4], [27, 5], [27, 3], [27, 4], [27, 4], [27, 5], [27, 4], [27, 5], [27, 5], [27, 6], [28, 3], [29, 3], [59, 1], [59, 3], [84, 1], [84, 2], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [85, 1], [91, 1], [91, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [92, 1], [94, 1], [94, 1], [94, 1], [94, 1], [16, 1], [16, 1], [16, 1], [16, 1], [17, 1], [55, 1]],\n performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {\n var $0 = $$.length - 1;\n switch (yystate) {\n case 8:\n this.$ = $$[$0 - 1];\n break;\n case 9:\n case 10:\n case 13:\n case 15:\n this.$ = $$[$0];\n break;\n case 11:\n case 14:\n this.$ = $$[$0 - 2] + \".\" + $$[$0];\n break;\n case 12:\n case 16:\n this.$ = $$[$0 - 1] + $$[$0];\n break;\n case 17:\n case 18:\n this.$ = $$[$0 - 1] + \"~\" + $$[$0] + \"~\";\n break;\n case 19:\n yy.addRelation($$[$0]);\n break;\n case 20:\n $$[$0 - 1].title = yy.cleanupLabel($$[$0]);\n yy.addRelation($$[$0 - 1]);\n break;\n case 31:\n this.$ = $$[$0].trim();\n yy.setAccTitle(this.$);\n break;\n case 32:\n case 33:\n this.$ = $$[$0].trim();\n yy.setAccDescription(this.$);\n break;\n case 34:\n yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1][0], $$[$0 - 1][1]);\n yy.popNamespace();\n break;\n case 35:\n yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1][0], $$[$0 - 1][1]);\n yy.popNamespace();\n break;\n case 36:\n this.$ = yy.addNamespace($$[$0]);\n break;\n case 37:\n this.$ = yy.addNamespace($$[$0 - 1], $$[$0]);\n break;\n case 38:\n this.$ = [[$$[$0]], []];\n break;\n case 39:\n this.$ = [[$$[$0 - 1]], []];\n break;\n case 40:\n $$[$0][0].unshift($$[$0 - 2]);\n this.$ = $$[$0];\n break;\n case 41:\n this.$ = [[], [$$[$0]]];\n break;\n case 42:\n this.$ = [[], [$$[$0 - 1]]];\n break;\n case 43:\n $$[$0][1].unshift($$[$0 - 2]);\n this.$ = $$[$0];\n break;\n case 44:\n case 45:\n this.$ = [[], []];\n break;\n case 46:\n this.$ = $$[$0];\n break;\n case 48:\n yy.setCssClass($$[$0 - 2], $$[$0]);\n break;\n case 49:\n yy.addMembers($$[$0 - 3], $$[$0 - 1]);\n break;\n case 51:\n yy.setCssClass($$[$0 - 5], $$[$0 - 3]);\n yy.addMembers($$[$0 - 5], $$[$0 - 1]);\n break;\n case 52:\n yy.addAnnotation($$[$0 - 3], $$[$0 - 1]);\n break;\n case 53:\n yy.addAnnotation($$[$0 - 6], $$[$0 - 4]);\n yy.addMembers($$[$0 - 6], $$[$0 - 1]);\n break;\n case 54:\n yy.addAnnotation($$[$0 - 5], $$[$0 - 3]);\n break;\n case 55:\n this.$ = $$[$0];\n yy.addClass($$[$0]);\n break;\n case 56:\n this.$ = $$[$0 - 1];\n yy.addClass($$[$0 - 1]);\n yy.setClassLabel($$[$0 - 1], $$[$0]);\n break;\n case 60:\n yy.addAnnotation($$[$0], $$[$0 - 2]);\n break;\n case 61:\n case 74:\n this.$ = [$$[$0]];\n break;\n case 62:\n $$[$0].push($$[$0 - 1]);\n this.$ = $$[$0];\n break;\n case 63:\n break;\n case 64:\n yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0]));\n break;\n case 65:\n break;\n case 66:\n break;\n case 67:\n this.$ = { \"id1\": $$[$0 - 2], \"id2\": $$[$0], relation: $$[$0 - 1], relationTitle1: \"none\", relationTitle2: \"none\" };\n break;\n case 68:\n this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: \"none\" };\n break;\n case 69:\n this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: \"none\", relationTitle2: $$[$0 - 1] };\n break;\n case 70:\n this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] };\n break;\n case 71:\n this.$ = yy.addNote($$[$0], $$[$0 - 1]);\n break;\n case 72:\n this.$ = yy.addNote($$[$0]);\n break;\n case 73:\n this.$ = $$[$0 - 2];\n yy.defineClass($$[$0 - 1], $$[$0]);\n break;\n case 75:\n this.$ = $$[$0 - 2].concat([$$[$0]]);\n break;\n case 76:\n yy.setDirection(\"TB\");\n break;\n case 77:\n yy.setDirection(\"BT\");\n break;\n case 78:\n yy.setDirection(\"RL\");\n break;\n case 79:\n yy.setDirection(\"LR\");\n break;\n case 80:\n this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] };\n break;\n case 81:\n this.$ = { type1: \"none\", type2: $$[$0], lineType: $$[$0 - 1] };\n break;\n case 82:\n this.$ = { type1: $$[$0 - 1], type2: \"none\", lineType: $$[$0] };\n break;\n case 83:\n this.$ = { type1: \"none\", type2: \"none\", lineType: $$[$0] };\n break;\n case 84:\n this.$ = yy.relationType.AGGREGATION;\n break;\n case 85:\n this.$ = yy.relationType.EXTENSION;\n break;\n case 86:\n this.$ = yy.relationType.COMPOSITION;\n break;\n case 87:\n this.$ = yy.relationType.DEPENDENCY;\n break;\n case 88:\n this.$ = yy.relationType.LOLLIPOP;\n break;\n case 89:\n this.$ = yy.lineType.LINE;\n break;\n case 90:\n this.$ = yy.lineType.DOTTED_LINE;\n break;\n case 91:\n case 97:\n this.$ = $$[$0 - 2];\n yy.setClickEvent($$[$0 - 1], $$[$0]);\n break;\n case 92:\n case 98:\n this.$ = $$[$0 - 3];\n yy.setClickEvent($$[$0 - 2], $$[$0 - 1]);\n yy.setTooltip($$[$0 - 2], $$[$0]);\n break;\n case 93:\n this.$ = $$[$0 - 2];\n yy.setLink($$[$0 - 1], $$[$0]);\n break;\n case 94:\n this.$ = $$[$0 - 3];\n yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]);\n break;\n case 95:\n this.$ = $$[$0 - 3];\n yy.setLink($$[$0 - 2], $$[$0 - 1]);\n yy.setTooltip($$[$0 - 2], $$[$0]);\n break;\n case 96:\n this.$ = $$[$0 - 4];\n yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);\n yy.setTooltip($$[$0 - 3], $$[$0 - 1]);\n break;\n case 99:\n this.$ = $$[$0 - 3];\n yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);\n break;\n case 100:\n this.$ = $$[$0 - 4];\n yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);\n yy.setTooltip($$[$0 - 3], $$[$0]);\n break;\n case 101:\n this.$ = $$[$0 - 3];\n yy.setLink($$[$0 - 2], $$[$0]);\n break;\n case 102:\n this.$ = $$[$0 - 4];\n yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]);\n break;\n case 103:\n this.$ = $$[$0 - 4];\n yy.setLink($$[$0 - 3], $$[$0 - 1]);\n yy.setTooltip($$[$0 - 3], $$[$0]);\n break;\n case 104:\n this.$ = $$[$0 - 5];\n yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);\n yy.setTooltip($$[$0 - 4], $$[$0 - 1]);\n break;\n case 105:\n this.$ = $$[$0 - 2];\n yy.setCssStyle($$[$0 - 1], $$[$0]);\n break;\n case 106:\n yy.setCssClass($$[$0 - 1], $$[$0]);\n break;\n case 107:\n this.$ = [$$[$0]];\n break;\n case 108:\n $$[$0 - 2].push($$[$0]);\n this.$ = $$[$0 - 2];\n break;\n case 110:\n this.$ = $$[$0 - 1] + $$[$0];\n break;\n }\n }, \"anonymous\"),\n table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 39, 17: 40, 19: 21, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 33: $V0, 35: $V1, 37: $V2, 38: 22, 42: $V3, 43: 23, 46: $V4, 48: $V5, 51: $V6, 52: $V7, 54: $V8, 56: $V9, 57: $Va, 60: $Vb, 62: $Vc, 63: $Vd, 64: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 83: $Vk, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($Vp, [2, 5], { 8: [1, 48] }), { 8: [1, 49] }, o($Vq, [2, 19], { 22: [1, 50] }), o($Vq, [2, 21]), o($Vq, [2, 22]), o($Vq, [2, 23]), o($Vq, [2, 24]), o($Vq, [2, 25]), o($Vq, [2, 26]), o($Vq, [2, 27]), o($Vq, [2, 28]), o($Vq, [2, 29]), o($Vq, [2, 30]), { 34: [1, 51] }, { 36: [1, 52] }, o($Vq, [2, 33]), o($Vq, [2, 63], { 53: 53, 66: 56, 67: 57, 13: [1, 54], 22: [1, 55], 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv, 73: $Vw, 74: $Vx }), { 39: [1, 65] }, o($Vy, [2, 47], { 39: [1, 67], 44: [1, 66], 46: [1, 68] }), o($Vq, [2, 65]), o($Vq, [2, 66]), { 16: 69, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn }, { 16: 39, 17: 40, 19: 70, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 16: 39, 17: 40, 19: 71, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 16: 39, 17: 40, 19: 72, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 60: [1, 73] }, { 13: [1, 74] }, { 16: 39, 17: 40, 19: 75, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 13: $Vz, 55: 76 }, { 58: 78, 60: [1, 79] }, o($Vq, [2, 76]), o($Vq, [2, 77]), o($Vq, [2, 78]), o($Vq, [2, 79]), o($VA, [2, 13], { 16: 39, 17: 40, 19: 81, 18: [1, 80], 20: [1, 82], 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }), o($VA, [2, 15], { 20: [1, 83] }), { 15: 84, 16: 85, 17: 86, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 16: 39, 17: 40, 19: 87, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VB, [2, 133]), o($VB, [2, 134]), o($VB, [2, 135]), o($VB, [2, 136]), o([1, 8, 9, 12, 13, 20, 22, 39, 41, 44, 46, 68, 69, 70, 71, 72, 73, 74, 79, 81], [2, 137]), o($Vp, [2, 6], { 10: 5, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 19: 21, 38: 22, 43: 23, 16: 39, 17: 40, 5: 88, 33: $V0, 35: $V1, 37: $V2, 42: $V3, 46: $V4, 48: $V5, 51: $V6, 52: $V7, 54: $V8, 56: $V9, 57: $Va, 60: $Vb, 62: $Vc, 63: $Vd, 64: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 83: $Vk, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }), { 5: 89, 10: 5, 16: 39, 17: 40, 19: 21, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 33: $V0, 35: $V1, 37: $V2, 38: 22, 42: $V3, 43: 23, 46: $V4, 48: $V5, 51: $V6, 52: $V7, 54: $V8, 56: $V9, 57: $Va, 60: $Vb, 62: $Vc, 63: $Vd, 64: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 83: $Vk, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($Vq, [2, 20]), o($Vq, [2, 31]), o($Vq, [2, 32]), { 13: [1, 91], 16: 39, 17: 40, 19: 90, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 53: 92, 66: 56, 67: 57, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv, 73: $Vw, 74: $Vx }, o($Vq, [2, 64]), { 67: 93, 73: $Vw, 74: $Vx }, o($VC, [2, 83], { 66: 94, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv }), o($VD, [2, 84]), o($VD, [2, 85]), o($VD, [2, 86]), o($VD, [2, 87]), o($VD, [2, 88]), o($VE, [2, 89]), o($VE, [2, 90]), { 8: [1, 96], 23: 99, 24: 97, 30: 98, 38: 22, 40: 95, 42: $V3, 43: 23, 48: $V5, 54: $V8, 56: $V9 }, { 16: 100, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn }, { 41: [1, 102], 45: 101, 51: $VF }, { 16: 104, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn }, { 47: [1, 105] }, { 13: [1, 106] }, { 13: [1, 107] }, { 79: [1, 108], 81: [1, 109] }, { 22: $VG, 50: $VH, 59: 110, 60: $VI, 82: $VJ, 84: 111, 85: 112, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }, { 60: [1, 122] }, { 13: $Vz, 55: 123 }, o($Vy, [2, 72]), o($Vy, [2, 138]), { 22: $VG, 50: $VH, 59: 124, 60: $VI, 61: [1, 125], 82: $VJ, 84: 111, 85: 112, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }, o($VP, [2, 74]), { 16: 39, 17: 40, 19: 126, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VA, [2, 16]), o($VA, [2, 17]), o($VA, [2, 18]), { 11: 127, 12: $VQ, 39: [2, 36] }, o($VR, [2, 9], { 16: 85, 17: 86, 15: 130, 18: [1, 129], 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }), o($VR, [2, 10]), o($VS, [2, 55], { 11: 131, 12: $VQ }), o($Vp, [2, 7]), { 9: [1, 132] }, o($VT, [2, 67]), { 16: 39, 17: 40, 19: 133, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, { 13: [1, 135], 16: 39, 17: 40, 19: 134, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VC, [2, 82], { 66: 136, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv }), o($VC, [2, 81]), { 41: [1, 137] }, { 23: 99, 24: 97, 30: 98, 38: 22, 40: 138, 42: $V3, 43: 23, 48: $V5, 54: $V8, 56: $V9 }, { 8: [1, 139], 41: [2, 38] }, { 8: [1, 140], 41: [2, 41] }, { 8: [1, 141], 41: [2, 44] }, o($Vy, [2, 48], { 39: [1, 142] }), { 41: [1, 143] }, o($Vy, [2, 50]), { 41: [2, 61], 45: 144, 51: $VF }, { 47: [1, 145] }, { 16: 39, 17: 40, 19: 146, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($Vq, [2, 91], { 13: [1, 147] }), o($Vq, [2, 93], { 13: [1, 149], 77: [1, 148] }), o($Vq, [2, 97], { 13: [1, 150], 80: [1, 151] }), { 13: [1, 152] }, o($Vq, [2, 105], { 61: $VU }), o($VV, [2, 107], { 85: 154, 22: $VG, 50: $VH, 60: $VI, 82: $VJ, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }), o($VW, [2, 109]), o($VW, [2, 111]), o($VW, [2, 112]), o($VW, [2, 113]), o($VW, [2, 114]), o($VW, [2, 115]), o($VW, [2, 116]), o($VW, [2, 117]), o($VW, [2, 118]), o($VW, [2, 119]), o($Vq, [2, 106]), o($Vy, [2, 71]), o($Vq, [2, 73], { 61: $VU }), { 60: [1, 155] }, o($VA, [2, 14]), { 39: [2, 37] }, { 13: [1, 156] }, { 15: 157, 16: 85, 17: 86, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VR, [2, 12]), o($VS, [2, 56]), { 1: [2, 4] }, o($VT, [2, 69]), o($VT, [2, 68]), { 16: 39, 17: 40, 19: 158, 60: $Vb, 86: $Vl, 100: $Vm, 102: $Vn, 103: $Vo }, o($VC, [2, 80]), o($Vy, [2, 34]), { 41: [1, 159] }, { 23: 99, 24: 97, 30: 98, 38: 22, 40: 160, 41: [2, 39], 42: $V3, 43: 23, 48: $V5, 54: $V8, 56: $V9 }, { 23: 99, 24: 97, 30: 98, 38: 22, 40: 161, 41: [2, 42], 42: $V3, 43: 23, 48: $V5, 54: $V8, 56: $V9 }, { 23: 99, 24: 97, 30: 98, 38: 22, 40: 162, 41: [2, 45], 42: $V3, 43: 23, 48: $V5, 54: $V8, 56: $V9 }, { 45: 163, 51: $VF }, o($Vy, [2, 49]), { 41: [2, 62] }, o($Vy, [2, 52], { 39: [1, 164] }), o($Vq, [2, 60]), o($Vq, [2, 92]), o($Vq, [2, 94]), o($Vq, [2, 95], { 77: [1, 165] }), o($Vq, [2, 98]), o($Vq, [2, 99], { 13: [1, 166] }), o($Vq, [2, 101], { 13: [1, 168], 77: [1, 167] }), { 22: $VG, 50: $VH, 60: $VI, 82: $VJ, 84: 169, 85: 112, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }, o($VW, [2, 110]), o($VP, [2, 75]), { 14: [1, 170] }, o($VR, [2, 11]), o($VT, [2, 70]), o($Vy, [2, 35]), { 41: [2, 40] }, { 41: [2, 43] }, { 41: [2, 46] }, { 41: [1, 171] }, { 41: [1, 173], 45: 172, 51: $VF }, o($Vq, [2, 96]), o($Vq, [2, 100]), o($Vq, [2, 102]), o($Vq, [2, 103], { 77: [1, 174] }), o($VV, [2, 108], { 85: 154, 22: $VG, 50: $VH, 60: $VI, 82: $VJ, 86: $VK, 87: $VL, 88: $VM, 89: $VN, 90: $VO }), o($VS, [2, 8]), o($Vy, [2, 51]), { 41: [1, 175] }, o($Vy, [2, 54]), o($Vq, [2, 104]), o($Vy, [2, 53])],\n defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 127: [2, 37], 132: [2, 4], 144: [2, 62], 160: [2, 40], 161: [2, 43], 162: [2, 46] },\n parseError: /* @__PURE__ */ __name(function parseError(str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n }, \"parseError\"),\n parse: /* @__PURE__ */ __name(function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer2 = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer2.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer2;\n sharedState.yy.parser = this;\n if (typeof lexer2.yylloc == \"undefined\") {\n lexer2.yylloc = {};\n }\n var yyloc = lexer2.yylloc;\n lstack.push(yyloc);\n var ranges = lexer2.options && lexer2.options.ranges;\n if (typeof sharedState.yy.parseError === \"function\") {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n __name(popStack, \"popStack\");\n function lex() {\n var token;\n token = tstack.pop() || lexer2.lex() || EOF;\n if (typeof token !== \"number\") {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n __name(lex, \"lex\");\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == \"undefined\") {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === \"undefined\" || !action.length || !action[0]) {\n var errStr = \"\";\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push(\"'\" + this.terminals_[p] + \"'\");\n }\n }\n if (lexer2.showPosition) {\n errStr = \"Parse error on line \" + (yylineno + 1) + \":\\n\" + lexer2.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n } else {\n errStr = \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == EOF ? \"end of input\" : \"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n }\n this.parseError(errStr, {\n text: lexer2.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer2.yylineno,\n loc: yyloc,\n expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer2.yytext);\n lstack.push(lexer2.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer2.yyleng;\n yytext = lexer2.yytext;\n yylineno = lexer2.yylineno;\n yyloc = lexer2.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== \"undefined\") {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n }, \"parse\")\n };\n var lexer = /* @__PURE__ */ (function() {\n var lexer2 = {\n EOF: 1,\n parseError: /* @__PURE__ */ __name(function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n }, \"parseError\"),\n // resets the lexer, sets new input\n setInput: /* @__PURE__ */ __name(function(input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = \"\";\n this.conditionStack = [\"INITIAL\"];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0, 0];\n }\n this.offset = 0;\n return this;\n }, \"setInput\"),\n // consumes and returns one char from the input\n input: /* @__PURE__ */ __name(function() {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n this._input = this._input.slice(1);\n return ch;\n }, \"input\"),\n // unshifts one char (or a string) into the input\n unput: /* @__PURE__ */ __name(function(ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len\n };\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n }, \"unput\"),\n // When called from action, caches matched text and appends it on next action\n more: /* @__PURE__ */ __name(function() {\n this._more = true;\n return this;\n }, \"more\"),\n // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\n reject: /* @__PURE__ */ __name(function() {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n return this;\n }, \"reject\"),\n // retain first n characters of the match\n less: /* @__PURE__ */ __name(function(n) {\n this.unput(this.match.slice(n));\n }, \"less\"),\n // displays already matched input, i.e. for error messages\n pastInput: /* @__PURE__ */ __name(function() {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? \"...\" : \"\") + past.substr(-20).replace(/\\n/g, \"\");\n }, \"pastInput\"),\n // displays upcoming input, i.e. for error messages\n upcomingInput: /* @__PURE__ */ __name(function() {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20 - next.length);\n }\n return (next.substr(0, 20) + (next.length > 20 ? \"...\" : \"\")).replace(/\\n/g, \"\");\n }, \"upcomingInput\"),\n // displays the character position where the lexing error occurred, i.e. for error messages\n showPosition: /* @__PURE__ */ __name(function() {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n }, \"showPosition\"),\n // test the lexed token: return FALSE when not a match, otherwise return token\n test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {\n var token, lines, backup;\n if (this.options.backtrack_lexer) {\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false;\n }\n return false;\n }, \"test_match\"),\n // return next match in input\n next: /* @__PURE__ */ __name(function() {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n var token, match, tempMatch, index;\n if (!this._more) {\n this.yytext = \"\";\n this.match = \"\";\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue;\n } else {\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". Unrecognized text.\\n\" + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n }, \"next\"),\n // return next match that has a token\n lex: /* @__PURE__ */ __name(function lex() {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n }, \"lex\"),\n // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n begin: /* @__PURE__ */ __name(function begin(condition) {\n this.conditionStack.push(condition);\n }, \"begin\"),\n // pop the previously active lexer condition state off the condition stack\n popState: /* @__PURE__ */ __name(function popState() {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n }, \"popState\"),\n // produce the lexer rule set which is active for the currently active lexer condition state\n _currentRules: /* @__PURE__ */ __name(function _currentRules() {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n }, \"_currentRules\"),\n // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n topState: /* @__PURE__ */ __name(function topState(n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n }, \"topState\"),\n // alias for begin(condition)\n pushState: /* @__PURE__ */ __name(function pushState(condition) {\n this.begin(condition);\n }, \"pushState\"),\n // return the number of states currently on the stack\n stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {\n return this.conditionStack.length;\n }, \"stateStackSize\"),\n options: {},\n performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n var YYSTATE = YY_START;\n switch ($avoiding_name_collisions) {\n case 0:\n return 62;\n break;\n case 1:\n return 63;\n break;\n case 2:\n return 64;\n break;\n case 3:\n return 65;\n break;\n case 4:\n break;\n case 5:\n break;\n case 6:\n this.begin(\"acc_title\");\n return 33;\n break;\n case 7:\n this.popState();\n return \"acc_title_value\";\n break;\n case 8:\n this.begin(\"acc_descr\");\n return 35;\n break;\n case 9:\n this.popState();\n return \"acc_descr_value\";\n break;\n case 10:\n this.begin(\"acc_descr_multiline\");\n break;\n case 11:\n this.popState();\n break;\n case 12:\n return \"acc_descr_multiline_value\";\n break;\n case 13:\n return 8;\n break;\n case 14:\n break;\n case 15:\n return 7;\n break;\n case 16:\n return 7;\n break;\n case 17:\n return \"EDGE_STATE\";\n break;\n case 18:\n this.begin(\"callback_name\");\n break;\n case 19:\n this.popState();\n break;\n case 20:\n this.popState();\n this.begin(\"callback_args\");\n break;\n case 21:\n return 79;\n break;\n case 22:\n this.popState();\n break;\n case 23:\n return 80;\n break;\n case 24:\n this.popState();\n break;\n case 25:\n return \"STR\";\n break;\n case 26:\n this.begin(\"string\");\n break;\n case 27:\n return 82;\n break;\n case 28:\n return 57;\n break;\n case 29:\n this.begin(\"namespace\");\n return 42;\n break;\n case 30:\n this.popState();\n return 8;\n break;\n case 31:\n break;\n case 32:\n this.begin(\"namespace-body\");\n return 39;\n break;\n case 33:\n this.popState();\n this.less(0);\n break;\n case 34:\n this.popState();\n return 41;\n break;\n case 35:\n return \"EOF_IN_STRUCT\";\n break;\n case 36:\n return 8;\n break;\n case 37:\n break;\n case 38:\n return \"EDGE_STATE\";\n break;\n case 39:\n this.begin(\"class\");\n return 48;\n break;\n case 40:\n this.popState();\n return 8;\n break;\n case 41:\n break;\n case 42:\n this.popState();\n this.popState();\n return 41;\n break;\n case 43:\n this.begin(\"class-body\");\n return 39;\n break;\n case 44:\n this.popState();\n return 41;\n break;\n case 45:\n return \"EOF_IN_STRUCT\";\n break;\n case 46:\n return \"EDGE_STATE\";\n break;\n case 47:\n return \"OPEN_IN_STRUCT\";\n break;\n case 48:\n break;\n case 49:\n return \"MEMBER\";\n break;\n case 50:\n return 83;\n break;\n case 51:\n return 75;\n break;\n case 52:\n return 76;\n break;\n case 53:\n return 78;\n break;\n case 54:\n return 54;\n break;\n case 55:\n return 56;\n break;\n case 56:\n return 46;\n break;\n case 57:\n return 47;\n break;\n case 58:\n return 81;\n break;\n case 59:\n this.popState();\n break;\n case 60:\n return \"GENERICTYPE\";\n break;\n case 61:\n this.begin(\"generic\");\n break;\n case 62:\n this.popState();\n break;\n case 63:\n return \"BQUOTE_STR\";\n break;\n case 64:\n this.begin(\"bqstring\");\n break;\n case 65:\n return 77;\n break;\n case 66:\n return 77;\n break;\n case 67:\n return 77;\n break;\n case 68:\n return 77;\n break;\n case 69:\n return 69;\n break;\n case 70:\n return 69;\n break;\n case 71:\n return 71;\n break;\n case 72:\n return 71;\n break;\n case 73:\n return 70;\n break;\n case 74:\n return 68;\n break;\n case 75:\n return 72;\n break;\n case 76:\n return 73;\n break;\n case 77:\n return 74;\n break;\n case 78:\n return 22;\n break;\n case 79:\n return 44;\n break;\n case 80:\n return 100;\n break;\n case 81:\n return 18;\n break;\n case 82:\n return \"PLUS\";\n break;\n case 83:\n return 87;\n break;\n case 84:\n return 61;\n break;\n case 85:\n return 89;\n break;\n case 86:\n return 89;\n break;\n case 87:\n return 90;\n break;\n case 88:\n return \"EQUALS\";\n break;\n case 89:\n return \"EQUALS\";\n break;\n case 90:\n return 60;\n break;\n case 91:\n return 12;\n break;\n case 92:\n return 14;\n break;\n case 93:\n return \"PUNCTUATION\";\n break;\n case 94:\n return 86;\n break;\n case 95:\n return 102;\n break;\n case 96:\n return 50;\n break;\n case 97:\n return 50;\n break;\n case 98:\n return 9;\n break;\n }\n }, \"anonymous\"),\n rules: [/^(?:.*direction\\s+TB[^\\n]*)/, /^(?:.*direction\\s+BT[^\\n]*)/, /^(?:.*direction\\s+RL[^\\n]*)/, /^(?:.*direction\\s+LR[^\\n]*)/, /^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/, /^(?:%%[^\\n]*(\\r?\\n)*)/, /^(?:accTitle\\s*:\\s*)/, /^(?:(?!\\n||)*[^\\n]*)/, /^(?:accDescr\\s*:\\s*)/, /^(?:(?!\\n||)*[^\\n]*)/, /^(?:accDescr\\s*\\{\\s*)/, /^(?:[\\}])/, /^(?:[^\\}]*)/, /^(?:\\s*(\\r?\\n)+)/, /^(?:\\s+)/, /^(?:classDiagram-v2\\b)/, /^(?:classDiagram\\b)/, /^(?:\\[\\*\\])/, /^(?:call[\\s]+)/, /^(?:\\([\\s]*\\))/, /^(?:\\()/, /^(?:[^(]*)/, /^(?:\\))/, /^(?:[^)]*)/, /^(?:[\"])/, /^(?:[^\"]*)/, /^(?:[\"])/, /^(?:style\\b)/, /^(?:classDef\\b)/, /^(?:namespace\\b)/, /^(?:\\s*(\\r?\\n)+)/, /^(?:\\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:[}])/, /^(?:$)/, /^(?:\\s*(\\r?\\n)+)/, /^(?:\\s+)/, /^(?:\\[\\*\\])/, /^(?:class\\b)/, /^(?:\\s*(\\r?\\n)+)/, /^(?:\\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\\[\\*\\])/, /^(?:[{])/, /^(?:[\\n])/, /^(?:[^{}\\n]*)/, /^(?:cssClass\\b)/, /^(?:callback\\b)/, /^(?:link\\b)/, /^(?:click\\b)/, /^(?:note for\\b)/, /^(?:note\\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\\b)/, /^(?:_blank\\b)/, /^(?:_parent\\b)/, /^(?:_top\\b)/, /^(?:\\s*<\\|)/, /^(?:\\s*\\|>)/, /^(?:\\s*>)/, /^(?:\\s*<)/, /^(?:\\s*\\*)/, /^(?:\\s*o\\b)/, /^(?:\\s*\\(\\))/, /^(?:--)/, /^(?:\\.\\.)/, /^(?::{1}[^:\\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\\.)/, /^(?:\\+)/, /^(?::)/, /^(?:,)/, /^(?:#)/, /^(?:#)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\\w+)/, /^(?:\\[)/, /^(?:\\])/, /^(?:[!\"#$%&'*+,-.`?\\\\/])/, /^(?:[0-9]+)/, /^(?:[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|[\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39]|[\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8]|[\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C]|[\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C]|[\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99]|[\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0]|[\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D]|[\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3]|[\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10]|[\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1]|[\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81]|[\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3]|[\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6]|[\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC])/, /^(?:\\s)/, /^(?:\\s)/, /^(?:$)/],\n conditions: { \"namespace-body\": { \"rules\": [26, 29, 34, 35, 36, 37, 38, 39, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"namespace\": { \"rules\": [26, 29, 30, 31, 32, 33, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"class-body\": { \"rules\": [26, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"class\": { \"rules\": [26, 40, 41, 42, 43, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"acc_descr_multiline\": { \"rules\": [11, 12, 26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"acc_descr\": { \"rules\": [9, 26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"acc_title\": { \"rules\": [7, 26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"callback_args\": { \"rules\": [22, 23, 26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"callback_name\": { \"rules\": [19, 20, 21, 26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"href\": { \"rules\": [26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"struct\": { \"rules\": [26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"generic\": { \"rules\": [26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"bqstring\": { \"rules\": [26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"string\": { \"rules\": [24, 25, 26, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98], \"inclusive\": false }, \"INITIAL\": { \"rules\": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 28, 29, 39, 50, 51, 52, 53, 54, 55, 56, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98], \"inclusive\": true } }\n };\n return lexer2;\n })();\n parser2.lexer = lexer;\n function Parser() {\n this.yy = {};\n }\n __name(Parser, \"Parser\");\n Parser.prototype = parser2;\n parser2.Parser = Parser;\n return new Parser();\n})();\nparser.parser = parser;\nvar classDiagram_default = parser;\n\n// src/diagrams/class/classDb.ts\nimport { select } from \"d3\";\n\n// src/diagrams/class/classTypes.ts\nvar visibilityValues = [\"#\", \"+\", \"~\", \"-\", \"\"];\nvar ClassMember = class {\n static {\n __name(this, \"ClassMember\");\n }\n constructor(input, memberType) {\n this.memberType = memberType;\n this.visibility = \"\";\n this.classifier = \"\";\n this.text = \"\";\n const sanitizedInput = sanitizeText(input, getConfig());\n this.parseMember(sanitizedInput);\n }\n getDisplayDetails() {\n let displayText = this.visibility + parseGenericTypes(this.id);\n if (this.memberType === \"method\") {\n displayText += `(${parseGenericTypes(this.parameters.trim())})`;\n if (this.returnType) {\n displayText += \" : \" + parseGenericTypes(this.returnType);\n }\n }\n displayText = displayText.trim();\n const cssStyle = this.parseClassifier();\n return {\n displayText,\n cssStyle\n };\n }\n parseMember(input) {\n let potentialClassifier = \"\";\n if (this.memberType === \"method\") {\n const methodRegEx = /([#+~-])?(.+)\\((.*)\\)([\\s$*])?(.*)([$*])?/;\n const match = methodRegEx.exec(input);\n if (match) {\n const detectedVisibility = match[1] ? match[1].trim() : \"\";\n if (visibilityValues.includes(detectedVisibility)) {\n this.visibility = detectedVisibility;\n }\n this.id = match[2];\n this.parameters = match[3] ? match[3].trim() : \"\";\n potentialClassifier = match[4] ? match[4].trim() : \"\";\n this.returnType = match[5] ? match[5].trim() : \"\";\n if (potentialClassifier === \"\") {\n const lastChar = this.returnType.substring(this.returnType.length - 1);\n if (/[$*]/.exec(lastChar)) {\n potentialClassifier = lastChar;\n this.returnType = this.returnType.substring(0, this.returnType.length - 1);\n }\n }\n }\n } else {\n const length = input.length;\n const firstChar = input.substring(0, 1);\n const lastChar = input.substring(length - 1);\n if (visibilityValues.includes(firstChar)) {\n this.visibility = firstChar;\n }\n if (/[$*]/.exec(lastChar)) {\n potentialClassifier = lastChar;\n }\n this.id = input.substring(\n this.visibility === \"\" ? 0 : 1,\n potentialClassifier === \"\" ? length : length - 1\n );\n }\n this.classifier = potentialClassifier;\n this.id = this.id.startsWith(\" \") ? \" \" + this.id.trim() : this.id.trim();\n const combinedText = `${this.visibility ? \"\\\\\" + this.visibility : \"\"}${parseGenericTypes(this.id)}${this.memberType === \"method\" ? `(${parseGenericTypes(this.parameters)})${this.returnType ? \" : \" + parseGenericTypes(this.returnType) : \"\"}` : \"\"}`;\n this.text = combinedText.replaceAll(\"<\", \"<\").replaceAll(\">\", \">\");\n if (this.text.startsWith(\"\\\\<\")) {\n this.text = this.text.replace(\"\\\\<\", \"~\");\n }\n }\n parseClassifier() {\n switch (this.classifier) {\n case \"*\":\n return \"font-style:italic;\";\n case \"$\":\n return \"text-decoration:underline;\";\n default:\n return \"\";\n }\n }\n};\n\n// src/diagrams/class/classDb.ts\nimport DOMPurify from \"dompurify\";\nvar MERMAID_DOM_ID_PREFIX = \"classId-\";\nvar classCounter = 0;\nvar sanitizeText2 = /* @__PURE__ */ __name((txt) => common_default.sanitizeText(txt, getConfig()), \"sanitizeText\");\nvar ClassDB = class _ClassDB {\n constructor() {\n this.relations = [];\n this.classes = /* @__PURE__ */ new Map();\n this.styleClasses = /* @__PURE__ */ new Map();\n this.notes = /* @__PURE__ */ new Map();\n this.interfaces = [];\n // private static classCounter = 0;\n this.namespaces = /* @__PURE__ */ new Map();\n this.namespaceCounter = 0;\n this.namespaceStack = [];\n this.diagramId = \"\";\n // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\n this.functions = [];\n this.lineType = {\n LINE: 0,\n DOTTED_LINE: 1\n };\n this.relationType = {\n AGGREGATION: 0,\n EXTENSION: 1,\n COMPOSITION: 2,\n DEPENDENCY: 3,\n LOLLIPOP: 4\n };\n this.setupToolTips = /* @__PURE__ */ __name((element) => {\n const tooltipElem = createTooltip();\n const svg = select(element).select(\"svg\");\n const nodes = svg.selectAll(\"g\").filter(function() {\n return select(this).attr(\"title\") !== null;\n });\n nodes.on(\"mouseover\", (event) => {\n const el = select(event.currentTarget);\n const title = el.attr(\"title\");\n if (!title) {\n return;\n }\n const rect = event.currentTarget.getBoundingClientRect();\n tooltipElem.transition().duration(200).style(\"opacity\", \".9\");\n tooltipElem.html(DOMPurify.sanitize(title)).style(\"left\", `${window.scrollX + rect.left + rect.width / 2}px`).style(\"top\", `${window.scrollY + rect.bottom + 4}px`);\n el.classed(\"hover\", true);\n }).on(\"mouseout\", (event) => {\n tooltipElem.transition().duration(500).style(\"opacity\", 0);\n select(event.currentTarget).classed(\"hover\", false);\n });\n }, \"setupToolTips\");\n this.direction = \"TB\";\n this.setAccTitle = setAccTitle;\n this.getAccTitle = getAccTitle;\n this.setAccDescription = setAccDescription;\n this.getAccDescription = getAccDescription;\n this.setDiagramTitle = setDiagramTitle;\n this.getDiagramTitle = getDiagramTitle;\n this.getConfig = /* @__PURE__ */ __name(() => getConfig().class, \"getConfig\");\n this.functions.push(this.setupToolTips.bind(this));\n this.clear();\n this.addRelation = this.addRelation.bind(this);\n this.addClassesToNamespace = this.addClassesToNamespace.bind(this);\n this.addNamespace = this.addNamespace.bind(this);\n this.popNamespace = this.popNamespace.bind(this);\n this.setCssClass = this.setCssClass.bind(this);\n this.addMembers = this.addMembers.bind(this);\n this.addClass = this.addClass.bind(this);\n this.setClassLabel = this.setClassLabel.bind(this);\n this.addAnnotation = this.addAnnotation.bind(this);\n this.addMember = this.addMember.bind(this);\n this.cleanupLabel = this.cleanupLabel.bind(this);\n this.addNote = this.addNote.bind(this);\n this.defineClass = this.defineClass.bind(this);\n this.setDirection = this.setDirection.bind(this);\n this.setLink = this.setLink.bind(this);\n this.bindFunctions = this.bindFunctions.bind(this);\n this.clear = this.clear.bind(this);\n this.setTooltip = this.setTooltip.bind(this);\n this.setClickEvent = this.setClickEvent.bind(this);\n this.setCssStyle = this.setCssStyle.bind(this);\n }\n static {\n __name(this, \"ClassDB\");\n }\n splitClassNameAndType(_id) {\n const id = common_default.sanitizeText(_id, getConfig());\n let genericType = \"\";\n let className = id;\n if (id.indexOf(\"~\") > 0) {\n const split = id.split(\"~\");\n className = sanitizeText2(split[0]);\n genericType = sanitizeText2(split[1]);\n }\n return { className, type: genericType };\n }\n setClassLabel(_id, label) {\n const id = common_default.sanitizeText(_id, getConfig());\n if (label) {\n label = sanitizeText2(label);\n }\n const { className } = this.splitClassNameAndType(id);\n this.classes.get(className).label = label;\n this.classes.get(className).text = `${label}${this.classes.get(className).type ? `<${this.classes.get(className).type}>` : \"\"}`;\n }\n /**\n * Function called by parser when a node definition has been found.\n *\n * @param id - ID of the class to add\n * @public\n */\n addClass(_id) {\n const id = common_default.sanitizeText(_id, getConfig());\n const { className, type } = this.splitClassNameAndType(id);\n if (this.classes.has(className)) {\n return;\n }\n const name = common_default.sanitizeText(className, getConfig());\n this.classes.set(name, {\n id: name,\n type,\n label: name,\n text: `${name}${type ? `<${type}>` : \"\"}`,\n shape: \"classBox\",\n cssClasses: \"default\",\n methods: [],\n members: [],\n annotations: [],\n styles: [],\n domId: MERMAID_DOM_ID_PREFIX + name + \"-\" + classCounter\n });\n classCounter++;\n }\n addInterface(label, classId) {\n const classInterface = {\n id: `interface${this.interfaces.length}`,\n label,\n classId\n };\n this.interfaces.push(classInterface);\n }\n /**\n * Sets the diagram's SVG element ID, used to prefix domIds for uniqueness\n * across multiple diagrams on the same page.\n */\n setDiagramId(svgElementId) {\n this.diagramId = svgElementId;\n }\n /**\n * Function to lookup domId from id in the graph definition.\n * When diagramId is set, returns the prefixed version for DOM uniqueness.\n *\n * @param id - class ID to lookup\n * @public\n */\n lookUpDomId(_id) {\n const id = common_default.sanitizeText(_id, getConfig());\n if (this.classes.has(id)) {\n const domId = this.classes.get(id).domId;\n return this.diagramId ? `${this.diagramId}-${domId}` : domId;\n }\n throw new Error(\"Class not found: \" + id);\n }\n clear() {\n this.relations = [];\n this.classes = /* @__PURE__ */ new Map();\n this.notes = /* @__PURE__ */ new Map();\n this.interfaces = [];\n this.functions = [];\n this.functions.push(this.setupToolTips.bind(this));\n this.namespaces = /* @__PURE__ */ new Map();\n this.namespaceCounter = 0;\n this.namespaceStack = [];\n this.diagramId = \"\";\n this.direction = \"TB\";\n clear();\n }\n getClass(id) {\n return this.classes.get(id);\n }\n getClasses() {\n return this.classes;\n }\n getRelations() {\n return this.relations;\n }\n getNote(id) {\n const key = typeof id === \"number\" ? `note${id}` : id;\n return this.notes.get(key);\n }\n getNotes() {\n return this.notes;\n }\n addRelation(classRelation) {\n log.debug(\"Adding relation: \" + JSON.stringify(classRelation));\n const invalidTypes = [\n this.relationType.LOLLIPOP,\n this.relationType.AGGREGATION,\n this.relationType.COMPOSITION,\n this.relationType.DEPENDENCY,\n this.relationType.EXTENSION\n ];\n if (classRelation.relation.type1 === this.relationType.LOLLIPOP && !invalidTypes.includes(classRelation.relation.type2)) {\n this.addClass(classRelation.id2);\n this.addInterface(classRelation.id1, classRelation.id2);\n classRelation.id1 = `interface${this.interfaces.length - 1}`;\n } else if (classRelation.relation.type2 === this.relationType.LOLLIPOP && !invalidTypes.includes(classRelation.relation.type1)) {\n this.addClass(classRelation.id1);\n this.addInterface(classRelation.id2, classRelation.id1);\n classRelation.id2 = `interface${this.interfaces.length - 1}`;\n } else {\n this.addClass(classRelation.id1);\n this.addClass(classRelation.id2);\n }\n classRelation.id1 = this.splitClassNameAndType(classRelation.id1).className;\n classRelation.id2 = this.splitClassNameAndType(classRelation.id2).className;\n classRelation.relationTitle1 = common_default.sanitizeText(\n classRelation.relationTitle1.trim(),\n getConfig()\n );\n classRelation.relationTitle2 = common_default.sanitizeText(\n classRelation.relationTitle2.trim(),\n getConfig()\n );\n this.relations.push(classRelation);\n }\n /**\n * Adds an annotation to the specified class Annotations mark special properties of the given type\n * (like 'interface' or 'service')\n *\n * @param className - The class name\n * @param annotation - The name of the annotation without any brackets\n * @public\n */\n addAnnotation(className, annotation) {\n const validatedClassName = this.splitClassNameAndType(className).className;\n this.classes.get(validatedClassName).annotations.push(annotation);\n }\n /**\n * Adds a member to the specified class\n *\n * @param className - The class name\n * @param member - The full name of the member. If the member is enclosed in `<>` it is\n * treated as an annotation If the member is ending with a closing bracket ) it is treated as a\n * method Otherwise the member will be treated as a normal property\n * @public\n */\n addMember(className, member) {\n this.addClass(className);\n const validatedClassName = this.splitClassNameAndType(className).className;\n const theClass = this.classes.get(validatedClassName);\n if (typeof member === \"string\") {\n const memberString = member.trim();\n if (memberString.startsWith(\"<<\") && memberString.endsWith(\">>\")) {\n theClass.annotations.push(sanitizeText2(memberString.substring(2, memberString.length - 2)));\n } else if (memberString.indexOf(\")\") > 0) {\n theClass.methods.push(new ClassMember(memberString, \"method\"));\n } else if (memberString) {\n theClass.members.push(new ClassMember(memberString, \"attribute\"));\n }\n }\n }\n addMembers(className, members) {\n if (Array.isArray(members)) {\n members.reverse();\n members.forEach((member) => this.addMember(className, member));\n }\n }\n addNote(text, className) {\n const index = this.notes.size;\n const note = {\n id: `note${index}`,\n class: className,\n text,\n index\n };\n this.notes.set(note.id, note);\n return note.id;\n }\n cleanupLabel(label) {\n if (label.startsWith(\":\")) {\n label = label.substring(1);\n }\n return sanitizeText2(label.trim());\n }\n /**\n * Called by parser when assigning cssClass to a class\n *\n * @param ids - Comma separated list of ids\n * @param className - Class to add\n */\n setCssClass(ids, className) {\n ids.split(\",\").forEach((_id) => {\n let id = _id;\n if (/\\d/.exec(_id[0])) {\n id = MERMAID_DOM_ID_PREFIX + id;\n }\n const classNode = this.classes.get(id);\n if (classNode) {\n classNode.cssClasses += \" \" + className;\n }\n });\n }\n defineClass(ids, style) {\n for (const id of ids) {\n let styleClass = this.styleClasses.get(id);\n if (styleClass === void 0) {\n styleClass = { id, styles: [], textStyles: [] };\n this.styleClasses.set(id, styleClass);\n }\n if (style) {\n style.forEach((s) => {\n if (/color/.exec(s)) {\n const newStyle = s.replace(\"fill\", \"bgFill\");\n styleClass.textStyles.push(newStyle);\n }\n styleClass.styles.push(s);\n });\n }\n this.classes.forEach((value) => {\n if (value.cssClasses.includes(id)) {\n value.styles.push(...style.flatMap((s) => s.split(\",\")));\n }\n });\n }\n }\n /**\n * Called by parser when a tooltip is found, e.g. a clickable element.\n *\n * @param ids - Comma separated list of ids\n * @param tooltip - Tooltip to add\n */\n setTooltip(ids, tooltip) {\n ids.split(\",\").forEach((id) => {\n if (tooltip !== void 0) {\n this.classes.get(id).tooltip = sanitizeText2(tooltip);\n }\n });\n }\n getTooltip(id, namespace) {\n if (namespace && this.namespaces.has(namespace)) {\n return this.namespaces.get(namespace).classes.get(id).tooltip;\n }\n return this.classes.get(id).tooltip;\n }\n /**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n *\n * @param ids - Comma separated list of ids\n * @param linkStr - URL to create a link for\n * @param target - Target of the link, _blank by default as originally defined in the svgDraw.js file\n */\n setLink(ids, linkStr, target) {\n const config = getConfig();\n ids.split(\",\").forEach((_id) => {\n let id = _id;\n if (/\\d/.exec(_id[0])) {\n id = MERMAID_DOM_ID_PREFIX + id;\n }\n const theClass = this.classes.get(id);\n if (theClass) {\n theClass.link = utils_default.formatUrl(linkStr, config);\n if (config.securityLevel === \"sandbox\") {\n theClass.linkTarget = \"_top\";\n } else if (typeof target === \"string\") {\n theClass.linkTarget = sanitizeText2(target);\n } else {\n theClass.linkTarget = \"_blank\";\n }\n }\n });\n this.setCssClass(ids, \"clickable\");\n }\n /**\n * Called by parser when a click definition is found. Registers an event handler.\n *\n * @param ids - Comma separated list of ids\n * @param functionName - Function to be called on click\n * @param functionArgs - Function args the function should be called with\n */\n setClickEvent(ids, functionName, functionArgs) {\n ids.split(\",\").forEach((id) => {\n this.setClickFunc(id, functionName, functionArgs);\n this.classes.get(id).haveCallback = true;\n });\n this.setCssClass(ids, \"clickable\");\n }\n setClickFunc(_domId, functionName, functionArgs) {\n const domId = common_default.sanitizeText(_domId, getConfig());\n const config = getConfig();\n if (config.securityLevel !== \"loose\") {\n return;\n }\n if (functionName === void 0) {\n return;\n }\n const id = domId;\n if (this.classes.has(id)) {\n let argList = [];\n if (typeof functionArgs === \"string\") {\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n for (let i = 0; i < argList.length; i++) {\n let item = argList[i].trim();\n if (item.startsWith('\"') && item.endsWith('\"')) {\n item = item.substr(1, item.length - 2);\n }\n argList[i] = item;\n }\n }\n if (argList.length === 0) {\n argList.push(id);\n }\n this.functions.push(() => {\n const elemId = this.lookUpDomId(id);\n const elem = document.querySelector(`[id=\"${elemId}\"]`);\n if (elem !== null) {\n elem.addEventListener(\n \"click\",\n () => {\n utils_default.runFunc(functionName, ...argList);\n },\n false\n );\n }\n });\n }\n }\n bindFunctions(element) {\n this.functions.forEach((fun) => {\n fun(element);\n });\n }\n // Utility function to escape HTML meta-characters\n escapeHtml(str) {\n return str.replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\");\n }\n getDirection() {\n return this.direction;\n }\n setDirection(dir) {\n this.direction = dir;\n }\n static resolveQualifiedId(id, stack) {\n const prefix = stack.at(-1);\n return prefix ? `${prefix}.${id}` : id;\n }\n static getAncestorIds(qualifiedId) {\n const parts = qualifiedId.split(\".\");\n const ids = new Array(parts.length);\n ids[0] = parts[0];\n for (let i = 1; i < parts.length; i++) {\n ids[i] = `${ids[i - 1]}.${parts[i]}`;\n }\n return ids;\n }\n createNamespaceNode(id, label, parentId, explicit = false) {\n return {\n id,\n label,\n classes: /* @__PURE__ */ new Map(),\n notes: /* @__PURE__ */ new Map(),\n children: /* @__PURE__ */ new Map(),\n domId: MERMAID_DOM_ID_PREFIX + id + \"-\" + this.namespaceCounter++,\n parent: parentId,\n explicit\n };\n }\n linkParentChild(parentId, childId) {\n const parent = this.namespaces.get(parentId);\n const child = this.namespaces.get(childId);\n if (!parent || !child) {\n return;\n }\n if (!parent.children.has(childId)) {\n parent.children.set(childId, child);\n }\n child.parent ??= parentId;\n }\n addNamespace(id, label) {\n const qualifiedId = _ClassDB.resolveQualifiedId(id, this.namespaceStack);\n this.namespaceStack.push(qualifiedId);\n if (this.namespaces.has(qualifiedId)) {\n const existing = this.namespaces.get(qualifiedId);\n existing.explicit = true;\n if (label) {\n existing.label = label;\n }\n return qualifiedId;\n }\n const parts = qualifiedId.split(\".\");\n const ancestorIds = _ClassDB.getAncestorIds(qualifiedId);\n for (let i = 0; i < ancestorIds.length; i++) {\n const currentId = ancestorIds[i];\n const parentId = i > 0 ? ancestorIds[i - 1] : void 0;\n const isLeaf = i === ancestorIds.length - 1;\n const nodeLabel = isLeaf && label ? label : parts[i];\n if (!this.namespaces.has(currentId)) {\n this.namespaces.set(\n currentId,\n this.createNamespaceNode(currentId, nodeLabel, parentId, isLeaf)\n );\n } else if (isLeaf) {\n this.namespaces.get(currentId).explicit = true;\n }\n if (parentId) {\n this.linkParentChild(parentId, currentId);\n }\n }\n return qualifiedId;\n }\n popNamespace() {\n this.namespaceStack.pop();\n }\n getNamespace(name) {\n return this.namespaces.get(name);\n }\n getNamespaces() {\n return this.namespaces;\n }\n /**\n * Function called by parser when a namespace definition has been found.\n *\n * @param id - ID of the namespace to add\n * @param classNames - IDs of the class to add\n * @param noteNames - IDs of the notes to add\n * @public\n */\n addClassesToNamespace(id, classNames, noteNames) {\n if (!this.namespaces.has(id)) {\n return;\n }\n for (const name of classNames) {\n const { className } = this.splitClassNameAndType(name);\n const classNode = this.getClass(className);\n classNode.parent = id;\n this.namespaces.get(id).classes.set(className, classNode);\n }\n for (const noteName of noteNames) {\n const noteNode = this.getNote(noteName);\n noteNode.parent = id;\n this.namespaces.get(id).notes.set(noteName, noteNode);\n }\n }\n setCssStyle(id, styles) {\n const thisClass = this.classes.get(id);\n if (!styles || !thisClass) {\n return;\n }\n for (const s of styles) {\n if (s.includes(\",\")) {\n thisClass.styles.push(...s.split(\",\"));\n } else {\n thisClass.styles.push(s);\n }\n }\n }\n /**\n * Gets the arrow marker for a type index\n *\n * @param type - The type to look for\n * @returns The arrow marker\n */\n getArrowMarker(type) {\n let marker;\n switch (type) {\n case 0:\n marker = \"aggregation\";\n break;\n case 1:\n marker = \"extension\";\n break;\n case 2:\n marker = \"composition\";\n break;\n case 3:\n marker = \"dependency\";\n break;\n case 4:\n marker = \"lollipop\";\n break;\n default:\n marker = \"none\";\n }\n return marker;\n }\n /**\n * Walks up the namespace tree from the given id and returns the nearest ancestor\n * (or the id itself) that is marked as explicit. Used by compact rendering mode\n * to reassign children to the nearest user-declared namespace.\n */\n resolveExplicitAncestor(id) {\n let current = id;\n while (current) {\n const ns = this.namespaces.get(current);\n if (!ns) {\n return void 0;\n }\n if (ns.explicit) {\n return current;\n }\n current = ns.parent;\n }\n return void 0;\n }\n getData() {\n const nodes = [];\n const edges = [];\n const config = getConfig();\n const hierarchical = config.class?.hierarchicalNamespaces ?? true;\n for (const namespace of this.namespaces.values()) {\n if (!hierarchical && !namespace.explicit) {\n continue;\n }\n const node = {\n id: namespace.id,\n label: hierarchical ? namespace.label : namespace.id,\n isGroup: true,\n padding: config.class.padding ?? 16,\n // parent node must be one of [rect, roundedWithTitle, noteGroup, divider]\n shape: \"rect\",\n cssStyles: [],\n look: config.look,\n parentId: hierarchical ? namespace.parent : void 0\n };\n nodes.push(node);\n }\n for (const classNode of this.classes.values()) {\n const parentId = hierarchical ? classNode.parent : this.resolveExplicitAncestor(classNode.parent);\n const node = {\n ...classNode,\n type: void 0,\n isGroup: false,\n parentId,\n look: config.look\n };\n nodes.push(node);\n }\n for (const note of this.notes.values()) {\n const noteParentId = hierarchical ? note.parent : this.resolveExplicitAncestor(note.parent);\n const noteNode = {\n id: note.id,\n label: note.text,\n isGroup: false,\n shape: \"note\",\n padding: config.class.padding ?? 6,\n cssStyles: [\n \"text-align: left\",\n \"white-space: nowrap\",\n `fill: ${config.themeVariables.noteBkgColor}`,\n `stroke: ${config.themeVariables.noteBorderColor}`\n ],\n look: config.look,\n parentId: noteParentId,\n labelType: \"markdown\"\n };\n nodes.push(noteNode);\n const noteClassId = this.classes.get(note.class)?.id;\n if (noteClassId) {\n const edge = {\n id: `edgeNote${note.index}`,\n start: note.id,\n end: noteClassId,\n type: \"normal\",\n thickness: \"normal\",\n classes: \"relation\",\n arrowTypeStart: \"none\",\n arrowTypeEnd: \"none\",\n arrowheadStyle: \"\",\n labelStyle: [\"\"],\n style: [\"fill: none\"],\n pattern: \"dotted\",\n look: config.look\n };\n edges.push(edge);\n }\n }\n for (const _interface of this.interfaces) {\n const interfaceNode = {\n id: _interface.id,\n label: _interface.label,\n isGroup: false,\n shape: \"rect\",\n cssStyles: [\"opacity: 0;\"],\n look: config.look\n };\n nodes.push(interfaceNode);\n }\n let cnt = 0;\n for (const classRelation of this.relations) {\n cnt++;\n const edge = {\n id: getEdgeId(classRelation.id1, classRelation.id2, {\n prefix: \"id\",\n counter: cnt\n }),\n start: classRelation.id1,\n end: classRelation.id2,\n type: \"normal\",\n label: classRelation.title,\n labelpos: \"c\",\n thickness: \"normal\",\n classes: \"relation\",\n arrowTypeStart: this.getArrowMarker(classRelation.relation.type1),\n arrowTypeEnd: this.getArrowMarker(classRelation.relation.type2),\n startLabelRight: classRelation.relationTitle1 === \"none\" ? \"\" : classRelation.relationTitle1,\n endLabelLeft: classRelation.relationTitle2 === \"none\" ? \"\" : classRelation.relationTitle2,\n arrowheadStyle: \"\",\n labelStyle: [\"display: inline-block\"],\n style: classRelation.style || \"\",\n pattern: classRelation.relation.lineType == 1 ? \"dashed\" : \"solid\",\n look: config.look,\n labelType: \"markdown\"\n };\n edges.push(edge);\n }\n return { nodes, edges, other: {}, config, direction: this.getDirection() };\n }\n};\n\n// src/diagrams/class/styles.js\nvar getStyles = /* @__PURE__ */ __name((options) => `g.classGroup text {\n fill: ${options.nodeBorder || options.classText};\n stroke: none;\n font-family: ${options.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n .cluster-label text {\n fill: ${options.titleColor};\n }\n .cluster-label span {\n color: ${options.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .cluster rect {\n fill: ${options.clusterBkg};\n stroke: ${options.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n .cluster span {\n color: ${options.titleColor};\n }\n\n.nodeLabel, .edgeLabel {\n color: ${options.classText};\n}\n\n.noteLabel .nodeLabel, .noteLabel .edgeLabel {\n color: ${options.noteTextColor};\n}\n.edgeLabel .label rect {\n fill: ${options.mainBkg};\n}\n.label text {\n fill: ${options.classText};\n}\n\n.labelBkg {\n background: ${options.mainBkg};\n}\n.edgeLabel .label span {\n background: ${options.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: ${options.strokeWidth};\n }\n\n\n.divider {\n stroke: ${options.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${options.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${options.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${options.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${options.lineColor};\n stroke-width: ${options.strokeWidth};\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n[id$=\"-compositionStart\"], .composition {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$=\"-compositionEnd\"], .composition {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$=\"-dependencyStart\"], .dependency {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$=\"-dependencyEnd\"], .dependency {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$=\"-extensionStart\"], .extension {\n fill: transparent !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$=\"-extensionEnd\"], .extension {\n fill: transparent !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$=\"-aggregationStart\"], .aggregation {\n fill: transparent !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$=\"-aggregationEnd\"], .aggregation {\n fill: transparent !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$=\"-lollipopStart\"], .lollipop {\n fill: ${options.mainBkg} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$=\"-lollipopEnd\"], .lollipop {\n fill: ${options.mainBkg} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n}\n\n.edgeLabel[data-look=\"neo\"] {\n background-color: ${options.edgeLabelBackground};\n p {\n background-color: ${options.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n}\n ${getIconStyles()}\n`, \"getStyles\");\nvar styles_default = getStyles;\n\n// src/diagrams/class/classRenderer-v3-unified.ts\nvar getDir = /* @__PURE__ */ __name((parsedItem, defaultDir = \"TB\") => {\n if (!parsedItem.doc) {\n return defaultDir;\n }\n let dir = defaultDir;\n for (const parsedItemDoc of parsedItem.doc) {\n if (parsedItemDoc.stmt === \"dir\") {\n dir = parsedItemDoc.value;\n }\n }\n return dir;\n}, \"getDir\");\nvar getClasses = /* @__PURE__ */ __name(function(text, diagramObj) {\n return diagramObj.db.getClasses();\n}, \"getClasses\");\nvar draw = /* @__PURE__ */ __name(async function(text, id, _version, diag) {\n log.info(\"REF0:\");\n log.info(\"Drawing class diagram (v3)\", id);\n const { securityLevel, state: conf, layout } = getConfig();\n diag.db.setDiagramId(id);\n const data4Layout = diag.db.getData();\n const svg = getDiagramElement(id, securityLevel);\n data4Layout.type = diag.type;\n data4Layout.layoutAlgorithm = getRegisteredLayoutAlgorithm(layout);\n data4Layout.nodeSpacing = conf?.nodeSpacing || 50;\n data4Layout.rankSpacing = conf?.rankSpacing || 50;\n data4Layout.markers = [\"aggregation\", \"extension\", \"composition\", \"dependency\", \"lollipop\"];\n data4Layout.diagramId = id;\n await render(data4Layout, svg);\n const padding = 8;\n utils_default.insertTitle(\n svg,\n \"classDiagramTitleText\",\n conf?.titleTopMargin ?? 25,\n diag.db.getDiagramTitle()\n );\n setupViewPortForSVG(svg, padding, \"classDiagram\", conf?.useMaxWidth ?? true);\n}, \"draw\");\nvar classRenderer_v3_unified_default = {\n getClasses,\n draw,\n getDir\n};\n\nexport {\n classDiagram_default,\n ClassDB,\n styles_default,\n classRenderer_v3_unified_default\n};\n"], + "mappings": "sdAuCA,IAAIA,IAAU,UAAW,CACvB,IAAIC,EAAoBC,EAAO,SAASC,EAAGC,EAAGC,EAAIC,EAAG,CACnD,IAAKD,EAAKA,GAAM,CAAC,EAAGC,EAAIH,EAAE,OAAQG,IAAKD,EAAGF,EAA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AKC,EAA2BC,EAAU,CACrG,IAAIC,EAAUD,EACd,OAAQD,EAA2B,CACjC,IAAK,GACH,MAAO,IAET,IAAK,GACH,MAAO,IAET,IAAK,GACH,MAAO,IAET,IAAK,GACH,MAAO,IAET,IAAK,GACH,MACF,IAAK,GACH,MACF,IAAK,GACH,YAAK,MAAM,WAAW,EACf,GACP,MACF,IAAK,GACH,YAAK,SAAS,EACP,kBACP,MACF,IAAK,GACH,YAAK,MAAM,WAAW,EACf,GACP,MACF,IAAK,GACH,YAAK,SAAS,EACP,kBACP,MACF,IAAK,IACH,KAAK,MAAM,qBAAqB,EAChC,MACF,IAAK,IACH,KAAK,SAAS,EACd,MACF,IAAK,IACH,MAAO,4BAET,IAAK,IACH,MAAO,GAET,IAAK,IACH,MACF,IAAK,IACH,MAAO,GAET,IAAK,IACH,MAAO,GAET,IAAK,IACH,MAAO,aAET,IAAK,IACH,KAAK,MAAM,eAAe,EAC1B,MACF,IAAK,IACH,KAAK,SAAS,EACd,MACF,IAAK,IACH,KAAK,SAAS,EACd,KAAK,MAAM,eAAe,EAC1B,MACF,IAAK,IACH,MAAO,IAET,IAAK,IACH,KAAK,SAAS,EACd,MACF,IAAK,IACH,MAAO,IAET,IAAK,IACH,KAAK,SAAS,EACd,MACF,IAAK,IACH,MAAO,MAET,IAAK,IACH,KAAK,MAAM,QAAQ,EACnB,MACF,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,YAAK,MAAM,WAAW,EACf,GACP,MACF,IAAK,IACH,YAAK,SAAS,EACP,EACP,MACF,IAAK,IACH,MACF,IAAK,IACH,YAAK,MAAM,gBAAgB,EACpB,GACP,MACF,IAAK,IACH,KAAK,SAAS,EACd,KAAK,KAAK,CAAC,EACX,MACF,IAAK,IACH,YAAK,SAAS,EACP,GACP,MACF,IAAK,IACH,MAAO,gBAET,IAAK,IACH,MAAO,GAET,IAAK,IACH,MACF,IAAK,IACH,MAAO,aAET,IAAK,IACH,YAAK,MAAM,OAAO,EACX,GACP,MACF,IAAK,IACH,YAAK,SAAS,EACP,EACP,MACF,IAAK,IACH,MACF,IAAK,IACH,YAAK,SAAS,EACd,KAAK,SAAS,EACP,GACP,MACF,IAAK,IACH,YAAK,MAAM,YAAY,EAChB,GACP,MACF,IAAK,IACH,YAAK,SAAS,EACP,GACP,MACF,IAAK,IACH,MAAO,gBAET,IAAK,IACH,MAAO,aAET,IAAK,IACH,MAAO,iBAET,IAAK,IACH,MACF,IAAK,IACH,MAAO,SAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,KAAK,SAAS,EACd,MACF,IAAK,IACH,MAAO,cAET,IAAK,IACH,KAAK,MAAM,SAAS,EACpB,MACF,IAAK,IACH,KAAK,SAAS,EACd,MACF,IAAK,IACH,MAAO,aAET,IAAK,IACH,KAAK,MAAM,UAAU,EACrB,MACF,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,KAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,OAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,IAET,IAAK,IACH,MAAO,SAET,IAAK,IACH,MAAO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"$Vi", "$Vj", "$Vk", "$Vl", "$Vm", "$Vn", "$Vo", "$Vp", "$Vq", "$Vr", "$Vs", "$Vt", "$Vu", "$Vv", "$Vw", "$Vx", "$Vy", "$Vz", "$VA", "$VB", "$VC", "$VD", "$VE", "$VF", "$VG", "$VH", "$VI", "$VJ", "$VK", "$VL", "$VM", "$VN", "$VO", "$VP", "$VQ", "$VR", "$VS", "$VT", "$VU", "$VV", "$VW", "parser2", "yytext", "yyleng", "yylineno", "yy", "yystate", "$$", "_$", "$0", "str", "hash", "error", "input", "self", "stack", "tstack", "vstack", "lstack", "table", "recovering", "TERROR", "EOF", "args", "lexer2", "sharedState", "yyloc", "ranges", "popStack", "n", "lex", "token", "symbol", "preErrorSymbol", "state", "action", "a", "r", "yyval", "p", "len", "newState", "expected", "errStr", "lexer", "ch", "lines", "oldLines", "past", "next", "pre", "c", "match", "indexed_rule", "backup", "tempMatch", "index", "rules", "i", "condition", "yy_", "$avoiding_name_collisions", "YY_START", "YYSTATE", "Parser", "classDiagram_default", "visibilityValues", "ClassMember", "memberType", "sanitizedInput", "sanitizeText", "getConfig2", "displayText", "parseGenericTypes", "cssStyle", "potentialClassifier", "detectedVisibility", "lastChar", "length", "firstChar", "combinedText", "MERMAID_DOM_ID_PREFIX", "classCounter", "sanitizeText2", "txt", "common_default", "ClassDB", "_ClassDB", "element", "tooltipElem", "createTooltip", "select_default", "event", "el", "title", "rect", "purify", "setAccTitle", "getAccTitle", "setAccDescription", "getAccDescription", "setDiagramTitle", "getDiagramTitle", "_id", "id", "genericType", "className", "split", "label", "type", "name", "classId", "classInterface", "svgElementId", "domId", "clear", "key", "classRelation", "log", "invalidTypes", "annotation", "validatedClassName", "member", "theClass", "memberString", "members", "text", "note", "ids", "classNode", "style", "styleClass", "s", "newStyle", "value", "tooltip", "namespace", "linkStr", "target", "config", "utils_default", "functionName", "functionArgs", "_domId", "argList", "item", "elemId", "elem", "fun", "dir", "prefix", "qualifiedId", "parts", "parentId", "explicit", "childId", "parent", "child", "existing", "ancestorIds", "currentId", "isLeaf", "nodeLabel", "classNames", "noteNames", "noteName", "noteNode", "styles", "thisClass", "marker", "current", "ns", "nodes", "edges", "hierarchical", "node", "noteParentId", "noteClassId", "edge", "_interface", "interfaceNode", "cnt", "getEdgeId", "getStyles", "options", "getIconStyles", "styles_default", "getDir", "parsedItem", "defaultDir", "parsedItemDoc", "getClasses", "diagramObj", "draw", "_version", "diag", "securityLevel", "conf", "layout", "data4Layout", "svg", "getDiagramElement", "getRegisteredLayoutAlgorithm", "render", "padding", "setupViewPortForSVG", "classRenderer_v3_unified_default"] +} diff --git a/templates/tabulareditor/public/chunk-7XSRMU6L.min.js b/templates/tabulareditor/public/chunk-7XSRMU6L.min.js new file mode 100644 index 000000000..0adf8af27 --- /dev/null +++ b/templates/tabulareditor/public/chunk-7XSRMU6L.min.js @@ -0,0 +1,2 @@ +import{n as p}from"./chunk-YPRWTSV5.min.js";import{_ as s,r as g}from"./chunk-LXXU3C6C.min.js";import{b as a}from"./chunk-BJGJ3C53.min.js";var h=a(({flowchart:o})=>{let n=o?.subGraphTitleMargin?.top??0,t=o?.subGraphTitleMargin?.bottom??0,r=n+t;return{subGraphTitleTopMargin:n,subGraphTitleBottomMargin:t,subGraphTitleTotalMargin:r}},"getSubGraphTitleMargins");async function d(o,n){let t=o.getElementsByTagName("img");if(!t||t.length===0)return;let r=n.replace(/]*>/g,"").trim()==="";await Promise.all([...t].map(e=>new Promise(m=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",r){let u=s().fontSize?s().fontSize:window.getComputedStyle(document.body).fontSize,f=5,[c=g.fontSize]=p(u),l=c*f+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";m(e)}a(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}a(d,"configureLabelImages");export{h as a,d as b}; +//# sourceMappingURL=chunk-7XSRMU6L.min.js.map diff --git a/templates/tabulareditor/public/chunk-7XSRMU6L.min.js.map b/templates/tabulareditor/public/chunk-7XSRMU6L.min.js.map new file mode 100644 index 000000000..91bae8da8 --- /dev/null +++ b/templates/tabulareditor/public/chunk-7XSRMU6L.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../node_modules/mermaid/dist/chunks/mermaid.core/chunk-L5ZTLDWV.mjs"], + "sourcesContent": ["import {\n parseFontSize\n} from \"./chunk-5ZQYHXKU.mjs\";\nimport {\n defaultConfig_default,\n getConfig2 as getConfig\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/utils/subGraphTitleMargins.ts\nvar getSubGraphTitleMargins = /* @__PURE__ */ __name(({\n flowchart\n}) => {\n const subGraphTitleTopMargin = flowchart?.subGraphTitleMargin?.top ?? 0;\n const subGraphTitleBottomMargin = flowchart?.subGraphTitleMargin?.bottom ?? 0;\n const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin;\n return {\n subGraphTitleTopMargin,\n subGraphTitleBottomMargin,\n subGraphTitleTotalMargin\n };\n}, \"getSubGraphTitleMargins\");\n\n// src/rendering-util/rendering-elements/shapes/labelImageUtils.ts\nasync function configureLabelImages(container, labelText) {\n const images = container.getElementsByTagName(\"img\");\n if (!images || images.length === 0) {\n return;\n }\n const noImgText = labelText.replace(/]*>/g, \"\").trim() === \"\";\n await Promise.all(\n [...images].map(\n (img) => new Promise((res) => {\n function setupImage() {\n img.style.display = \"flex\";\n img.style.flexDirection = \"column\";\n if (noImgText) {\n const bodyFontSize = getConfig().fontSize ? getConfig().fontSize : window.getComputedStyle(document.body).fontSize;\n const enlargingFactor = 5;\n const [parsedBodyFontSize = defaultConfig_default.fontSize] = parseFontSize(bodyFontSize);\n const width = parsedBodyFontSize * enlargingFactor + \"px\";\n img.style.minWidth = width;\n img.style.maxWidth = width;\n } else {\n img.style.width = \"100%\";\n }\n res(img);\n }\n __name(setupImage, \"setupImage\");\n setTimeout(() => {\n if (img.complete) {\n setupImage();\n }\n });\n img.addEventListener(\"error\", setupImage);\n img.addEventListener(\"load\", setupImage);\n })\n )\n );\n}\n__name(configureLabelImages, \"configureLabelImages\");\n\nexport {\n configureLabelImages,\n getSubGraphTitleMargins\n};\n"], + "mappings": "2IAYA,IAAIA,EAA0CC,EAAO,CAAC,CACpD,UAAAC,CACF,IAAM,CACJ,IAAMC,EAAyBD,GAAW,qBAAqB,KAAO,EAChEE,EAA4BF,GAAW,qBAAqB,QAAU,EACtEG,EAA2BF,EAAyBC,EAC1D,MAAO,CACL,uBAAAD,EACA,0BAAAC,EACA,yBAAAC,CACF,CACF,EAAG,yBAAyB,EAG5B,eAAeC,EAAqBC,EAAWC,EAAW,CACxD,IAAMC,EAASF,EAAU,qBAAqB,KAAK,EACnD,GAAI,CAACE,GAAUA,EAAO,SAAW,EAC/B,OAEF,IAAMC,EAAYF,EAAU,QAAQ,cAAe,EAAE,EAAE,KAAK,IAAM,GAClE,MAAM,QAAQ,IACZ,CAAC,GAAGC,CAAM,EAAE,IACTE,GAAQ,IAAI,QAASC,GAAQ,CAC5B,SAASC,GAAa,CAGpB,GAFAF,EAAI,MAAM,QAAU,OACpBA,EAAI,MAAM,cAAgB,SACtBD,EAAW,CACb,IAAMI,EAAeC,EAAU,EAAE,SAAWA,EAAU,EAAE,SAAW,OAAO,iBAAiB,SAAS,IAAI,EAAE,SACpGC,EAAkB,EAClB,CAACC,EAAqBC,EAAsB,QAAQ,EAAIC,EAAcL,CAAY,EAClFM,EAAQH,EAAqBD,EAAkB,KACrDL,EAAI,MAAM,SAAWS,EACrBT,EAAI,MAAM,SAAWS,CACvB,MACET,EAAI,MAAM,MAAQ,OAEpBC,EAAID,CAAG,CACT,CACAV,EAAOY,EAAY,YAAY,EAC/B,WAAW,IAAM,CACXF,EAAI,UACNE,EAAW,CAEf,CAAC,EACDF,EAAI,iBAAiB,QAASE,CAAU,EACxCF,EAAI,iBAAiB,OAAQE,CAAU,CACzC,CAAC,CACH,CACF,CACF,CACAZ,EAAOK,EAAsB,sBAAsB", + "names": ["getSubGraphTitleMargins", "__name", "flowchart", "subGraphTitleTopMargin", "subGraphTitleBottomMargin", "subGraphTitleTotalMargin", "configureLabelImages", "container", "labelText", "images", "noImgText", "img", "res", "setupImage", "bodyFontSize", "getConfig2", "enlargingFactor", "parsedBodyFontSize", "defaultConfig_default", "parseFontSize", "width"] +} diff --git a/templates/tabulareditor/public/chunk-B7ZLSGB4.min.js b/templates/tabulareditor/public/chunk-B7ZLSGB4.min.js new file mode 100644 index 000000000..7b9d995ce --- /dev/null +++ b/templates/tabulareditor/public/chunk-B7ZLSGB4.min.js @@ -0,0 +1,2 @@ +import{O as w}from"./chunk-LXXU3C6C.min.js";import{b as r,d as c}from"./chunk-BJGJ3C53.min.js";var g=r((t,e,i,h)=>{t.attr("class",i);let{width:o,height:n,x,y:u}=s(t,e);w(t,n,o,h);let a=m(x,u,o,n,e);t.attr("viewBox",a),c.debug(`viewBox configured: ${a} with padding: ${e}`)},"setupViewPortForSVG"),s=r((t,e)=>{let i=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+e*2,height:i.height+e*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),m=r((t,e,i,h,o)=>`${t-o} ${e-o} ${i} ${h}`,"createViewBox");export{g as a}; +//# sourceMappingURL=chunk-B7ZLSGB4.min.js.map diff --git a/templates/tabulareditor/public/chunk-B7ZLSGB4.min.js.map b/templates/tabulareditor/public/chunk-B7ZLSGB4.min.js.map new file mode 100644 index 000000000..53d42f017 --- /dev/null +++ b/templates/tabulareditor/public/chunk-B7ZLSGB4.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../node_modules/mermaid/dist/chunks/mermaid.core/chunk-2J33WTMH.mjs"], + "sourcesContent": ["import {\n configureSvgSize\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/rendering-util/setupViewPortForSVG.ts\nvar setupViewPortForSVG = /* @__PURE__ */ __name((svg, padding, cssDiagram, useMaxWidth) => {\n svg.attr(\"class\", cssDiagram);\n const { width, height, x, y } = calculateDimensionsWithPadding(svg, padding);\n configureSvgSize(svg, height, width, useMaxWidth);\n const viewBox = createViewBox(x, y, width, height, padding);\n svg.attr(\"viewBox\", viewBox);\n log.debug(`viewBox configured: ${viewBox} with padding: ${padding}`);\n}, \"setupViewPortForSVG\");\nvar calculateDimensionsWithPadding = /* @__PURE__ */ __name((svg, padding) => {\n const bounds = svg.node()?.getBBox() || { width: 0, height: 0, x: 0, y: 0 };\n return {\n width: bounds.width + padding * 2,\n height: bounds.height + padding * 2,\n x: bounds.x,\n y: bounds.y\n };\n}, \"calculateDimensionsWithPadding\");\nvar createViewBox = /* @__PURE__ */ __name((x, y, width, height, padding) => {\n return `${x - padding} ${y - padding} ${width} ${height}`;\n}, \"createViewBox\");\n\nexport {\n setupViewPortForSVG\n};\n"], + "mappings": "+FASA,IAAIA,EAAsCC,EAAO,CAACC,EAAKC,EAASC,EAAYC,IAAgB,CAC1FH,EAAI,KAAK,QAASE,CAAU,EAC5B,GAAM,CAAE,MAAAE,EAAO,OAAAC,EAAQ,EAAG,EAAAC,CAAE,EAAIC,EAA+BP,EAAKC,CAAO,EAC3EO,EAAiBR,EAAKK,EAAQD,EAAOD,CAAW,EAChD,IAAMM,EAAUC,EAAc,EAAGJ,EAAGF,EAAOC,EAAQJ,CAAO,EAC1DD,EAAI,KAAK,UAAWS,CAAO,EAC3BE,EAAI,MAAM,uBAAuBF,CAAO,kBAAkBR,CAAO,EAAE,CACrE,EAAG,qBAAqB,EACpBM,EAAiDR,EAAO,CAACC,EAAKC,IAAY,CAC5E,IAAMW,EAASZ,EAAI,KAAK,GAAG,QAAQ,GAAK,CAAE,MAAO,EAAG,OAAQ,EAAG,EAAG,EAAG,EAAG,CAAE,EAC1E,MAAO,CACL,MAAOY,EAAO,MAAQX,EAAU,EAChC,OAAQW,EAAO,OAASX,EAAU,EAClC,EAAGW,EAAO,EACV,EAAGA,EAAO,CACZ,CACF,EAAG,gCAAgC,EAC/BF,EAAgCX,EAAO,CAACc,EAAGP,EAAGF,EAAOC,EAAQJ,IACxD,GAAGY,EAAIZ,CAAO,IAAIK,EAAIL,CAAO,IAAIG,CAAK,IAAIC,CAAM,GACtD,eAAe", + "names": ["setupViewPortForSVG", "__name", "svg", "padding", "cssDiagram", "useMaxWidth", "width", "height", "y", "calculateDimensionsWithPadding", "configureSvgSize", "viewBox", "createViewBox", "log", "bounds", "x"] +} diff --git a/templates/tabulareditor/public/chunk-CLGT2SZG.min.js b/templates/tabulareditor/public/chunk-CLGT2SZG.min.js new file mode 100644 index 000000000..80fa39008 --- /dev/null +++ b/templates/tabulareditor/public/chunk-CLGT2SZG.min.js @@ -0,0 +1,2 @@ +import{a as x}from"./chunk-HCOLC5CQ.min.js";import{G as d}from"./chunk-LXXU3C6C.min.js";import{b as i,j as o}from"./chunk-BJGJ3C53.min.js";import{c as p}from"./chunk-MY7PHHTQ.min.js";var l=p(x(),1);var c=i((r,t)=>{let e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(let s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),f=i((r,t)=>{let e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};c(r,e).lower()},"drawBackgroundRect"),h=i((r,t)=>{let e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);let a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),w=i((r,t,e,s)=>{let a=r.append("image");a.attr("x",t),a.attr("y",e);let n=(0,l.sanitizeUrl)(s);a.attr("xlink:href",n)},"drawImage"),k=i((r,t,e,s)=>{let a=r.append("use");a.attr("x",t),a.attr("y",e);let n=(0,l.sanitizeUrl)(s);a.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),v=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),E=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),R=i(()=>{let r=o(".mermaidTooltip");return r.empty()&&(r=o("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),r},"createTooltip");export{c as a,f as b,h as c,w as d,k as e,v as f,E as g,R as h}; +//# sourceMappingURL=chunk-CLGT2SZG.min.js.map diff --git a/templates/tabulareditor/public/chunk-CLGT2SZG.min.js.map b/templates/tabulareditor/public/chunk-CLGT2SZG.min.js.map new file mode 100644 index 000000000..c8fea0053 --- /dev/null +++ b/templates/tabulareditor/public/chunk-CLGT2SZG.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../node_modules/mermaid/dist/chunks/mermaid.core/chunk-ND2GUHAM.mjs"], + "sourcesContent": ["import {\n lineBreakRegex\n} from \"./chunk-CSCIHK7Q.mjs\";\nimport {\n __name\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/common/svgDrawCommon.ts\nimport { sanitizeUrl } from \"@braintree/sanitize-url\";\nimport { select } from \"d3\";\nvar drawRect = /* @__PURE__ */ __name((element, rectData) => {\n const rectElement = element.append(\"rect\");\n rectElement.attr(\"x\", rectData.x);\n rectElement.attr(\"y\", rectData.y);\n rectElement.attr(\"fill\", rectData.fill);\n rectElement.attr(\"stroke\", rectData.stroke);\n rectElement.attr(\"width\", rectData.width);\n rectElement.attr(\"height\", rectData.height);\n if (rectData.name) {\n rectElement.attr(\"name\", rectData.name);\n }\n if (rectData.rx) {\n rectElement.attr(\"rx\", rectData.rx);\n }\n if (rectData.ry) {\n rectElement.attr(\"ry\", rectData.ry);\n }\n if (rectData.attrs !== void 0) {\n for (const attrKey in rectData.attrs) {\n rectElement.attr(attrKey, rectData.attrs[attrKey]);\n }\n }\n if (rectData.class) {\n rectElement.attr(\"class\", rectData.class);\n }\n return rectElement;\n}, \"drawRect\");\nvar drawBackgroundRect = /* @__PURE__ */ __name((element, bounds) => {\n const rectData = {\n x: bounds.startx,\n y: bounds.starty,\n width: bounds.stopx - bounds.startx,\n height: bounds.stopy - bounds.starty,\n fill: bounds.fill,\n stroke: bounds.stroke,\n class: \"rect\"\n };\n const rectElement = drawRect(element, rectData);\n rectElement.lower();\n}, \"drawBackgroundRect\");\nvar drawText = /* @__PURE__ */ __name((element, textData) => {\n const nText = textData.text.replace(lineBreakRegex, \" \");\n const textElem = element.append(\"text\");\n textElem.attr(\"x\", textData.x);\n textElem.attr(\"y\", textData.y);\n textElem.attr(\"class\", \"legend\");\n textElem.style(\"text-anchor\", textData.anchor);\n if (textData.class) {\n textElem.attr(\"class\", textData.class);\n }\n const tspan = textElem.append(\"tspan\");\n tspan.attr(\"x\", textData.x + textData.textMargin * 2);\n tspan.text(nText);\n return textElem;\n}, \"drawText\");\nvar drawImage = /* @__PURE__ */ __name((elem, x, y, link) => {\n const imageElement = elem.append(\"image\");\n imageElement.attr(\"x\", x);\n imageElement.attr(\"y\", y);\n const sanitizedLink = sanitizeUrl(link);\n imageElement.attr(\"xlink:href\", sanitizedLink);\n}, \"drawImage\");\nvar drawEmbeddedImage = /* @__PURE__ */ __name((element, x, y, link) => {\n const imageElement = element.append(\"use\");\n imageElement.attr(\"x\", x);\n imageElement.attr(\"y\", y);\n const sanitizedLink = sanitizeUrl(link);\n imageElement.attr(\"xlink:href\", `#${sanitizedLink}`);\n}, \"drawEmbeddedImage\");\nvar getNoteRect = /* @__PURE__ */ __name(() => {\n const noteRectData = {\n x: 0,\n y: 0,\n width: 100,\n height: 100,\n fill: \"#EDF2AE\",\n stroke: \"#666\",\n anchor: \"start\",\n rx: 0,\n ry: 0\n };\n return noteRectData;\n}, \"getNoteRect\");\nvar getTextObj = /* @__PURE__ */ __name(() => {\n const testObject = {\n x: 0,\n y: 0,\n width: 100,\n height: 100,\n \"text-anchor\": \"start\",\n style: \"#666\",\n textMargin: 0,\n rx: 0,\n ry: 0,\n tspan: true\n };\n return testObject;\n}, \"getTextObj\");\nvar createTooltip = /* @__PURE__ */ __name(() => {\n let tooltipElem = select(\".mermaidTooltip\");\n if (tooltipElem.empty()) {\n tooltipElem = select(\"body\").append(\"div\").attr(\"class\", \"mermaidTooltip\").style(\"opacity\", 0).style(\"position\", \"absolute\").style(\"text-align\", \"center\").style(\"max-width\", \"200px\").style(\"padding\", \"2px\").style(\"font-size\", \"12px\").style(\"background\", \"#ffffde\").style(\"border\", \"1px solid #333\").style(\"border-radius\", \"2px\").style(\"pointer-events\", \"none\").style(\"z-index\", \"100\");\n }\n return tooltipElem;\n}, \"createTooltip\");\n\nexport {\n drawRect,\n drawBackgroundRect,\n drawText,\n drawImage,\n drawEmbeddedImage,\n getNoteRect,\n getTextObj,\n createTooltip\n};\n"], + "mappings": "uLAQA,IAAAA,EAA4B,SAE5B,IAAIC,EAA2BC,EAAO,CAACC,EAASC,IAAa,CAC3D,IAAMC,EAAcF,EAAQ,OAAO,MAAM,EAgBzC,GAfAE,EAAY,KAAK,IAAKD,EAAS,CAAC,EAChCC,EAAY,KAAK,IAAKD,EAAS,CAAC,EAChCC,EAAY,KAAK,OAAQD,EAAS,IAAI,EACtCC,EAAY,KAAK,SAAUD,EAAS,MAAM,EAC1CC,EAAY,KAAK,QAASD,EAAS,KAAK,EACxCC,EAAY,KAAK,SAAUD,EAAS,MAAM,EACtCA,EAAS,MACXC,EAAY,KAAK,OAA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AgB,eAAYF,CAAI,EACtCC,EAAa,KAAK,aAAcC,CAAa,CAC/C,EAAG,WAAW,EACVC,EAAoCpB,EAAO,CAACC,EAASc,EAAGC,EAAGC,IAAS,CACtE,IAAMC,EAAejB,EAAQ,OAAO,KAAK,EACzCiB,EAAa,KAAK,IAAKH,CAAC,EACxBG,EAAa,KAAK,IAAKF,CAAC,EACxB,IAAMG,KAAgB,eAAYF,CAAI,EACtCC,EAAa,KAAK,aAAc,IAAIC,CAAa,EAAE,CACrD,EAAG,mBAAmB,EAClBE,EAA8BrB,EAAO,KAClB,CACnB,EAAG,EACH,EAAG,EACH,MAAO,IACP,OAAQ,IACR,KAAM,UACN,OAAQ,OACR,OAAQ,QACR,GAAI,EACJ,GAAI,CACN,GAEC,aAAa,EACZsB,EAA6BtB,EAAO,KACnB,CACjB,EAAG,EACH,EAAG,EACH,MAAO,IACP,OAAQ,IACR,cAAe,QACf,MAAO,OACP,WAAY,EACZ,GAAI,EACJ,GAAI,EACJ,MAAO,EACT,GAEC,YAAY,EACXuB,EAAgCvB,EAAO,IAAM,CAC/C,IAAIwB,EAAcC,EAAO,iBAAiB,EAC1C,OAAID,EAAY,MAAM,IACpBA,EAAcC,EAAO,MAAM,EAAE,OAAO,KAAK,EAAE,KAAK,QAAS,gBAAgB,EAAE,MAAM,UAAW,CAAC,EAAE,MAAM,WAAY,UAAU,EAAE,MAAM,aAAc,QAAQ,EAAE,MAAM,YAAa,OAAO,EAAE,MAAM,UAAW,KAAK,EAAE,MAAM,YAAa,MAAM,EAAE,MAAM,aAAc,SAAS,EAAE,MAAM,SAAU,gBAAgB,EAAE,MAAM,gBAAiB,KAAK,EAAE,MAAM,iBAAkB,MAAM,EAAE,MAAM,UAAW,KAAK,GAE1XD,CACT,EAAG,eAAe", + "names": ["import_sanitize_url", "drawRect", "__name", "element", "rectData", "rectElement", "attrKey", "drawBackgroundRect", "bounds", "drawText", "textData", "nText", "lineBreakRegex", "textElem", "tspan", "drawImage", "elem", "x", "y", "link", "imageElement", "sanitizedLink", "drawEmbeddedImage", "getNoteRect", "getTextObj", "createTooltip", "tooltipElem", "select_default"] +} diff --git a/templates/tabulareditor/public/chunk-LXXU3C6C.min.js b/templates/tabulareditor/public/chunk-LXXU3C6C.min.js new file mode 100644 index 000000000..7d8bd77e8 --- /dev/null +++ b/templates/tabulareditor/public/chunk-LXXU3C6C.min.js @@ -0,0 +1,130 @@ +import{b as d,c as qr,d as R,e as Or}from"./chunk-BJGJ3C53.min.js";var ni={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:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{let i=t/255;return t>.03928?Math.pow((i+.055)/1.055,2.4):i/12.92},hue2rgb:(t,i,e)=>(e<0&&(e+=1),e>1&&(e-=1),e<.16666666666666666?t+(i-t)*6*e:e<.5?i:e<.6666666666666666?t+(i-t)*(.6666666666666666-e)*6:t),hsl2rgb:({h:t,s:i,l:e},l)=>{if(!i)return e*2.55;t/=360,i/=100,e/=100;let s=e<.5?e*(1+i):e+i-e*i,u=2*e-s;switch(l){case"r":return ni.hue2rgb(u,s,t+.3333333333333333)*255;case"g":return ni.hue2rgb(u,s,t)*255;case"b":return ni.hue2rgb(u,s,t-.3333333333333333)*255}},rgb2hsl:({r:t,g:i,b:e},l)=>{t/=255,i/=255,e/=255;let s=Math.max(t,i,e),u=Math.min(t,i,e),T=(s+u)/2;if(l==="l")return T*100;if(s===u)return 0;let b=s-u,B=T>.5?b/(2-s-u):b/(s+u);if(l==="s")return B*100;switch(s){case t:return((i-e)/b+(ii>e?Math.min(i,Math.max(e,t)):Math.min(e,Math.max(i,t)),round:t=>Math.round(t*1e10)/1e10},Ir=Qe;var to={dec2hex:t=>{let i=Math.round(t).toString(16);return i.length>1?i:`0${i}`}},Dr=to;var io={channel:Mr,lang:Ir,unit:Dr},m=io;var ct={};for(let t=0;t<=255;t++)ct[t]=m.unit.dec2hex(t);var q={ALL:0,RGB:1,HSL:2};var Wi=class{constructor(){this.type=q.ALL}get(){return this.type}set(i){if(this.type&&this.type!==i)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=i}reset(){this.type=q.ALL}is(i){return this.type===i}},zr=Wi;var Ni=class{constructor(i,e){this.color=e,this.changed=!1,this.data=i,this.type=new zr}set(i,e){return this.color=e,this.changed=!1,this.data=i,this.type.type=q.ALL,this}_ensureHSL(){let i=this.data,{h:e,s:l,l:s}=i;e===void 0&&(i.h=m.channel.rgb2hsl(i,"h")),l===void 0&&(i.s=m.channel.rgb2hsl(i,"s")),s===void 0&&(i.l=m.channel.rgb2hsl(i,"l"))}_ensureRGB(){let i=this.data,{r:e,g:l,b:s}=i;e===void 0&&(i.r=m.channel.hsl2rgb(i,"r")),l===void 0&&(i.g=m.channel.hsl2rgb(i,"g")),s===void 0&&(i.b=m.channel.hsl2rgb(i,"b"))}get r(){let i=this.data,e=i.r;return!this.type.is(q.HSL)&&e!==void 0?e:(this._ensureHSL(),m.channel.hsl2rgb(i,"r"))}get g(){let i=this.data,e=i.g;return!this.type.is(q.HSL)&&e!==void 0?e:(this._ensureHSL(),m.channel.hsl2rgb(i,"g"))}get b(){let i=this.data,e=i.b;return!this.type.is(q.HSL)&&e!==void 0?e:(this._ensureHSL(),m.channel.hsl2rgb(i,"b"))}get h(){let i=this.data,e=i.h;return!this.type.is(q.RGB)&&e!==void 0?e:(this._ensureRGB(),m.channel.rgb2hsl(i,"h"))}get s(){let i=this.data,e=i.s;return!this.type.is(q.RGB)&&e!==void 0?e:(this._ensureRGB(),m.channel.rgb2hsl(i,"s"))}get l(){let i=this.data,e=i.l;return!this.type.is(q.RGB)&&e!==void 0?e:(this._ensureRGB(),m.channel.rgb2hsl(i,"l"))}get a(){return this.data.a}set r(i){this.type.set(q.RGB),this.changed=!0,this.data.r=i}set g(i){this.type.set(q.RGB),this.changed=!0,this.data.g=i}set b(i){this.type.set(q.RGB),this.changed=!0,this.data.b=i}set h(i){this.type.set(q.HSL),this.changed=!0,this.data.h=i}set s(i){this.type.set(q.HSL),this.changed=!0,this.data.s=i}set l(i){this.type.set(q.HSL),this.changed=!0,this.data.l=i}set a(i){this.changed=!0,this.data.a=i}},Rr=Ni;var ro=new Rr({r:0,g:0,b:0,a:0},"transparent"),mt=ro;var Pr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;let i=t.match(Pr.re);if(!i)return;let e=i[1],l=parseInt(e,16),s=e.length,u=s%4===0,T=s>4,b=T?1:17,B=T?8:4,D=u?0:-1,K=T?255:15;return mt.set({r:(l>>B*(D+3)&K)*b,g:(l>>B*(D+2)&K)*b,b:(l>>B*(D+1)&K)*b,a:u?(l&K)*b/255:1},t)},stringify:t=>{let{r:i,g:e,b:l,a:s}=t;return s<1?`#${ct[Math.round(i)]}${ct[Math.round(e)]}${ct[Math.round(l)]}${ct[Math.round(s*255)]}`:`#${ct[Math.round(i)]}${ct[Math.round(e)]}${ct[Math.round(l)]}`}},bt=Pr;var ci={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:t=>{let i=t.match(ci.hueRe);if(i){let[,e,l]=i;switch(l){case"grad":return m.channel.clamp.h(parseFloat(e)*.9);case"rad":return m.channel.clamp.h(parseFloat(e)*180/Math.PI);case"turn":return m.channel.clamp.h(parseFloat(e)*360)}}return m.channel.clamp.h(parseFloat(t))},parse:t=>{let i=t.charCodeAt(0);if(i!==104&&i!==72)return;let e=t.match(ci.re);if(!e)return;let[,l,s,u,T,b]=e;return mt.set({h:ci._hue2deg(l),s:m.channel.clamp.s(parseFloat(s)),l:m.channel.clamp.l(parseFloat(u)),a:T?m.channel.clamp.a(b?parseFloat(T)/100:parseFloat(T)):1},t)},stringify:t=>{let{h:i,s:e,l,a:s}=t;return s<1?`hsla(${m.lang.round(i)}, ${m.lang.round(e)}%, ${m.lang.round(l)}%, ${s})`:`hsl(${m.lang.round(i)}, ${m.lang.round(e)}%, ${m.lang.round(l)}%)`}},jt=ci;var di={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:t=>{t=t.toLowerCase();let i=di.colors[t];if(i)return bt.parse(i)},stringify:t=>{let i=bt.stringify(t);for(let e in di.colors)if(di.colors[e]===i)return e}},Hi=di;var Wr={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:t=>{let i=t.charCodeAt(0);if(i!==114&&i!==82)return;let e=t.match(Wr.re);if(!e)return;let[,l,s,u,T,b,B,D,K]=e;return mt.set({r:m.channel.clamp.r(s?parseFloat(l)*2.55:parseFloat(l)),g:m.channel.clamp.g(T?parseFloat(u)*2.55:parseFloat(u)),b:m.channel.clamp.b(B?parseFloat(b)*2.55:parseFloat(b)),a:D?m.channel.clamp.a(K?parseFloat(D)/100:parseFloat(D)):1},t)},stringify:t=>{let{r:i,g:e,b:l,a:s}=t;return s<1?`rgba(${m.lang.round(i)}, ${m.lang.round(e)}, ${m.lang.round(l)}, ${m.lang.round(s)})`:`rgb(${m.lang.round(i)}, ${m.lang.round(e)}, ${m.lang.round(l)})`}},$t=Wr;var eo={format:{keyword:Hi,hex:bt,rgb:$t,rgba:$t,hsl:jt,hsla:jt},parse:t=>{if(typeof t!="string")return t;let i=bt.parse(t)||$t.parse(t)||jt.parse(t)||Hi.parse(t);if(i)return i;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(q.HSL)||t.data.r===void 0?jt.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?$t.stringify(t):bt.stringify(t)},O=eo;var oo=(t,i)=>{let e=O.parse(t);for(let l in i)e[l]=m.channel.clamp[l](i[l]);return O.stringify(e)},Ci=oo;var so=(t,i,e=0,l=1)=>{if(typeof t!="number")return Ci(t,{a:i});let s=mt.set({r:m.channel.clamp.r(t),g:m.channel.clamp.g(i),b:m.channel.clamp.b(e),a:m.channel.clamp.a(l)});return O.stringify(s)},G=so;var ao=(t,i)=>m.lang.round(O.parse(t)[i]),lo=ao;var ho=t=>{let{r:i,g:e,b:l}=O.parse(t),s=.2126*m.channel.toLinear(i)+.7152*m.channel.toLinear(e)+.0722*m.channel.toLinear(l);return m.lang.round(s)},Nr=ho;var no=t=>Nr(t)>=.5,Hr=no;var co=t=>!Hr(t),F=co;var Co=(t,i,e)=>{let l=O.parse(t),s=l[i],u=m.channel.clamp[i](s+e);return s!==u&&(l[i]=u),O.stringify(l)},qt=Co;var go=(t,i)=>qt(t,"l",i),h=go;var uo=(t,i)=>qt(t,"l",-i),n=uo;var po=(t,i)=>qt(t,"a",-i),mo=po;var yo=(t,i)=>{let e=O.parse(t),l={};for(let s in i)i[s]&&(l[s]=e[s]+i[s]);return Ci(t,l)},r=yo;var xo=(t,i,e=50)=>{let{r:l,g:s,b:u,a:T}=O.parse(t),{r:b,g:B,b:D,a:K}=O.parse(i),dt=e/100,J=dt*2-1,Pt=T-K,Ft=((J*Pt===-1?J:(J+Pt)/(1+J*Pt))+1)/2,it=1-Ft,nt=l*Ft+b*it,Qt=s*Ft+B*it,Wt=u*Ft+D*it,z=T*dt+K*(1-dt);return G(nt,Qt,Wt,z)},Ur=xo;var fo=(t,i=100)=>{let e=O.parse(t);return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,Ur(e,t,i)},a=fo;function Gr(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,l=Array(i);e2?l-2:0),u=2;u1?e-1:0),s=1;s"u"?null:w(BigInt.prototype.toString),Kr=typeof Symbol>"u"?null:w(Symbol.prototype.toString),I=w(Object.prototype.hasOwnProperty),Yt=w(Object.prototype.toString),M=w(RegExp.prototype.test),Bt=Oo(TypeError);function w(t){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var e=arguments.length,l=new Array(e>1?e-1:0),s=1;s2&&arguments[2]!==void 0?arguments[2]:Xt;if(jr&&jr(t,null),!xt(i))return t;let l=i.length;for(;l--;){let s=i[l];if(typeof s=="string"){let u=e(s);u!==s&&(Fo(i)||(i[l]=u),s=u)}t[s]=!0}return t}function Mo(t){for(let i=0;i/g),No=W(/\${[\w\W]*/g),Ho=W(/^data-[\-\w.\u00B7-\uFFFF]+$/),Uo=W(/^aria-[\-\w]+$/),ie=W(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Go=W(/^(?:\w+script|data):/i),jo=W(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$o=W(/^html$/i),Vo=W(/^[a-z][.\w]*(-[.\w]+)+$/i),re=W(/<[/\w!]/g),ee=W(/<[/\w]/g),Yo=W(/<\/no(script|embed|frames)/i),Xo=W(/\/>/i),Z={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ko=function(){return typeof window>"u"?null:window},Zo=function(i,e){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let l=null,s="data-tt-policy-suffix";e&&e.hasAttribute(s)&&(l=e.getAttribute(s));let u="dompurify"+(l?"#"+l:"");try{return i.createPolicy(u,{createHTML(T){return T},createScriptURL(T){return T}})}catch{return console.warn("TrustedTypes policy "+u+" could not be created."),null}},oe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},yt=function(i,e,l,s){return I(i,e)&&xt(i[e])?k(s.base?j(s.base):{},i[e],s.transform):l};function le(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ko(),i=g=>le(g);if(i.version="3.4.12",i.removed=[],!t||!t.document||t.document.nodeType!==Z.document||!t.Element)return i.isSupported=!1,i;let e=t.document,l=e,s=l.currentScript;t.DocumentFragment;let u=t.HTMLTemplateElement,T=t.Node,b=t.Element,B=t.NodeFilter,D=t.NamedNodeMap;D===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;let K=t.DOMParser,dt=t.trustedTypes,J=b.prototype,Pt=at(J,"cloneNode"),Jt=at(J,"remove"),Ft=at(J,"nextSibling"),it=at(J,"childNodes"),nt=at(J,"parentNode"),Qt=at(J,"shadowRoot"),Wt=at(J,"attributes"),z=T&&T.prototype?at(T.prototype,"nodeType"):null,rt=T&&T.prototype?at(T.prototype,"nodeName"):null;if(typeof u=="function"){let g=e.createElement("template");g.content&&g.content.ownerDocument&&(e=g.content.ownerDocument)}let V,ft="",ki,or=!1,Nt=0,sr=function(){if(Nt>0)throw Bt('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.')},Lt=function(o){sr(),Nt++;try{return V.createHTML(o)}finally{Nt--}},Fe=function(o){sr(),Nt++;try{return V.createScriptURL(o)}finally{Nt--}},Le=function(){return or||(ki=Zo(dt,s),or=!0),ki},ti=e,bi=ti.implementation,ar=ti.createNodeIterator,_e=ti.createDocumentFragment,Ee=ti.getElementsByTagName,ve=l.importNode,L=oe();i.isSupported=typeof se=="function"&&typeof nt=="function"&&bi&&bi.createHTMLDocument!==void 0;let Ae=Po,we=Wo,qe=No,Oe=Ho,Me=Uo,Ie=Go,lr=jo,De=Vo,hr=ie,_=null,nr=k({},[...Zr,...Gi,...ji,...$i,...Jr]),E=null,cr=k({},[...Qr,...Vi,...te,...gi]),v=Object.seal(It(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}})),Ht=null,dr=null,Ct=Object.seal(It(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Cr=!0,Bi=!0,gr=!1,ur=!0,gt=!1,ut=!0,Tt=!1,Si=!1,Fi=null,Li=null,_i=!1,_t=!1,ii=!1,ri=!1,pr=!0,mr=!1,yr="user-content-",Ei=!0,vi=!1,Et={},et=null,Ai=k({},["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"]),xr=null,fr=k({},["audio","video","img","source","image","track"]),wi=null,Tr=k({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ei="http://www.w3.org/1998/Math/MathML",oi="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml",vt=ot,qi=!1,Oi=null,ze=k({},[ei,oi,ot],Ui),kr=P(["mi","mo","mn","ms","mtext"]),Mi=k({},kr),br=P(["annotation-xml"]),Ii=k({},br),Re=k({},["title","style","font","a","script"]),Ut=null,Pe=["application/xhtml+xml","text/html"],We="text/html",S=null,At=null,Ne=e.createElement("form"),Br=function(o){return o instanceof RegExp||o instanceof Function},Di=function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(At&&At===o)return;(!o||typeof o!="object")&&(o={}),o=j(o),Ut=Pe.indexOf(o.PARSER_MEDIA_TYPE)===-1?We:o.PARSER_MEDIA_TYPE,S=Ut==="application/xhtml+xml"?Ui:Xt,_=yt(o,"ALLOWED_TAGS",nr,{transform:S}),E=yt(o,"ALLOWED_ATTR",cr,{transform:S}),Oi=yt(o,"ALLOWED_NAMESPACES",ze,{transform:Ui}),wi=yt(o,"ADD_URI_SAFE_ATTR",Tr,{transform:S,base:Tr}),xr=yt(o,"ADD_DATA_URI_TAGS",fr,{transform:S,base:fr}),et=yt(o,"FORBID_CONTENTS",Ai,{transform:S}),Ht=yt(o,"FORBID_TAGS",j({}),{transform:S}),dr=yt(o,"FORBID_ATTR",j({}),{transform:S}),Et=I(o,"USE_PROFILES")?o.USE_PROFILES&&typeof o.USE_PROFILES=="object"?j(o.USE_PROFILES):o.USE_PROFILES:!1,Cr=o.ALLOW_ARIA_ATTR!==!1,Bi=o.ALLOW_DATA_ATTR!==!1,gr=o.ALLOW_UNKNOWN_PROTOCOLS||!1,ur=o.ALLOW_SELF_CLOSE_IN_ATTR!==!1,gt=o.SAFE_FOR_TEMPLATES||!1,ut=o.SAFE_FOR_XML!==!1,Tt=o.WHOLE_DOCUMENT||!1,_t=o.RETURN_DOM||!1,ii=o.RETURN_DOM_FRAGMENT||!1,ri=o.RETURN_TRUSTED_TYPE||!1,_i=o.FORCE_BODY||!1,pr=o.SANITIZE_DOM!==!1,mr=o.SANITIZE_NAMED_PROPS||!1,Ei=o.KEEP_CONTENT!==!1,vi=o.IN_PLACE||!1,hr=Do(o.ALLOWED_URI_REGEXP)?o.ALLOWED_URI_REGEXP:ie,vt=typeof o.NAMESPACE=="string"?o.NAMESPACE:ot,Mi=I(o,"MATHML_TEXT_INTEGRATION_POINTS")&&o.MATHML_TEXT_INTEGRATION_POINTS&&typeof o.MATHML_TEXT_INTEGRATION_POINTS=="object"?j(o.MATHML_TEXT_INTEGRATION_POINTS):k({},kr),Ii=I(o,"HTML_INTEGRATION_POINTS")&&o.HTML_INTEGRATION_POINTS&&typeof o.HTML_INTEGRATION_POINTS=="object"?j(o.HTML_INTEGRATION_POINTS):k({},br);let c=I(o,"CUSTOM_ELEMENT_HANDLING")&&o.CUSTOM_ELEMENT_HANDLING&&typeof o.CUSTOM_ELEMENT_HANDLING=="object"?j(o.CUSTOM_ELEMENT_HANDLING):It(null);if(v=It(null),I(c,"tagNameCheck")&&Br(c.tagNameCheck)&&(v.tagNameCheck=c.tagNameCheck),I(c,"attributeNameCheck")&&Br(c.attributeNameCheck)&&(v.attributeNameCheck=c.attributeNameCheck),I(c,"allowCustomizedBuiltInElements")&&typeof c.allowCustomizedBuiltInElements=="boolean"&&(v.allowCustomizedBuiltInElements=c.allowCustomizedBuiltInElements),W(v),gt&&(Bi=!1),ii&&(_t=!0),Et&&(_=k({},Jr),E=It(null),Et.html===!0&&(k(_,Zr),k(E,Qr)),Et.svg===!0&&(k(_,Gi),k(E,Vi),k(E,gi)),Et.svgFilters===!0&&(k(_,ji),k(E,Vi),k(E,gi)),Et.mathMl===!0&&(k(_,$i),k(E,te),k(E,gi))),Ct.tagCheck=null,Ct.attributeCheck=null,I(o,"ADD_TAGS")&&(typeof o.ADD_TAGS=="function"?Ct.tagCheck=o.ADD_TAGS:xt(o.ADD_TAGS)&&(_===nr&&(_=j(_)),k(_,o.ADD_TAGS,S))),I(o,"ADD_ATTR")&&(typeof o.ADD_ATTR=="function"?Ct.attributeCheck=o.ADD_ATTR:xt(o.ADD_ATTR)&&(E===cr&&(E=j(E)),k(E,o.ADD_ATTR,S))),I(o,"ADD_URI_SAFE_ATTR")&&xt(o.ADD_URI_SAFE_ATTR)&&k(wi,o.ADD_URI_SAFE_ATTR,S),I(o,"FORBID_CONTENTS")&&xt(o.FORBID_CONTENTS)&&(et===Ai&&(et=j(et)),k(et,o.FORBID_CONTENTS,S)),I(o,"ADD_FORBID_CONTENTS")&&xt(o.ADD_FORBID_CONTENTS)&&(et===Ai&&(et=j(et)),k(et,o.ADD_FORBID_CONTENTS,S)),Ei&&(_["#text"]=!0),Tt&&k(_,["html","head","body"]),_.table&&(k(_,["tbody"]),delete Ht.tbody),o.TRUSTED_TYPES_POLICY){if(typeof o.TRUSTED_TYPES_POLICY.createHTML!="function")throw Bt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof o.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Bt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let C=V;V=o.TRUSTED_TYPES_POLICY;try{ft=Lt("")}catch(p){throw V=C,p}}else o.TRUSTED_TYPES_POLICY===null?(V=void 0,ft=""):(V===void 0&&(V=Le()),V&&typeof ft=="string"&&(ft=Lt("")));P&&P(o),At=o},Sr=k({},[...Gi,...ji,...zo]),Fr=k({},[...$i,...Ro]),He=function(o,c,C){return c.namespaceURI===ot?o==="svg":c.namespaceURI===ei?o==="svg"&&(C==="annotation-xml"||Mi[C]):!!Sr[o]},Ue=function(o,c,C){return c.namespaceURI===ot?o==="math":c.namespaceURI===oi?o==="math"&&Ii[C]:!!Fr[o]},Ge=function(o,c,C){return c.namespaceURI===oi&&!Ii[C]||c.namespaceURI===ei&&!Mi[C]?!1:!Fr[o]&&(Re[o]||!Sr[o])},je=function(o){let c=nt(o);(!c||!c.tagName)&&(c={namespaceURI:vt,tagName:"template"});let C=Xt(o.tagName),p=Xt(c.tagName);return Oi[o.namespaceURI]?o.namespaceURI===oi?He(C,c,p):o.namespaceURI===ei?Ue(C,c,p):o.namespaceURI===ot?Ge(C,c,p):!!(Ut==="application/xhtml+xml"&&Oi[o.namespaceURI]):!1},pt=function(o){Mt(i.removed,{element:o});try{nt(o).removeChild(o)}catch{if(Jt(o),!nt(o))throw Bt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},si=function(o){zi(o);let c=it(o);if(c){let p=[];Ot(c,y=>{Mt(p,y)}),Ot(p,y=>{try{Jt(y)}catch{}})}let C=Wt(o);if(C)for(let p=C.length-1;p>=0;--p){let y=C[p],f=y&&y.name;if(typeof f=="string")try{o.removeAttribute(f)}catch{}}},kt=function(o,c){try{Mt(i.removed,{attribute:c.getAttributeNode(o),from:c})}catch{Mt(i.removed,{attribute:null,from:c})}if(c.removeAttribute(o),o==="is")if(_t||ii)try{pt(c)}catch{}else try{c.setAttribute(o,"")}catch{}},$e=function(o){let c=Wt(o);if(c)for(let C=c.length-1;C>=0;--C){let p=c[C],y=p&&p.name;if(!(typeof y!="string"||E[S(y)]))try{o.removeAttribute(y)}catch{}}},zi=function(o){let c=[o];for(;c.length>0;){let C=c.pop();(z?z(C):C.nodeType)===Z.element&&$e(C);let y=it(C);if(y)for(let f=y.length-1;f>=0;--f)c.push(y[f])}},Ve=function(o){if(!ut)return;let c=[o];for(;c.length>0;){let C=c.pop(),p=z?z(C):C.nodeType;if(p===Z.processingInstruction||p===Z.comment&&M(ee,C.data)){try{Jt(C)}catch{}continue}if(p===Z.element){let f=C,A=S(rt?rt(C):C.nodeName);try{f.hasAttribute&&f.hasAttribute("patchsrc")&&f.removeAttribute("patchsrc"),f.hasAttribute&&f.hasAttribute("for")&&A!=="label"&&A!=="output"&&f.removeAttribute("for")}catch{}}let y=it(C);if(y)for(let f=y.length-1;f>=0;--f)c.push(y[f])}},Lr=function(o){let c=null,C=null;if(_i)o=""+o;else{let f=Vr(o,/^[\r\n\t ]+/);C=f&&f[0]}Ut==="application/xhtml+xml"&&vt===ot&&(o=''+o+"");let p=V?Lt(o):o;if(vt===ot)try{c=new K().parseFromString(p,Ut)}catch{}if(!c||!c.documentElement){c=bi.createDocument(vt,"template",null);try{c.documentElement.innerHTML=qi?ft:p}catch{}}let y=c.body||c.documentElement;return o&&C&&y.insertBefore(e.createTextNode(C),y.childNodes[0]||null),vt===ot?Ee.call(c,Tt?"html":"body")[0]:Tt?c.documentElement:y},_r=function(o){return ar.call(o.ownerDocument||o,o,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},ai=function(o){return o=Vt(o,Ae," "),o=Vt(o,we," "),o=Vt(o,qe," "),o},Ri=function(o){var c;o.normalize();let C=ar.call(o.ownerDocument||o,o,B.SHOW_TEXT|B.SHOW_COMMENT|B.SHOW_CDATA_SECTION|B.SHOW_PROCESSING_INSTRUCTION,null),p=C.nextNode();for(;p;)p.data=ai(p.data),p=C.nextNode();let y=(c=o.querySelectorAll)===null||c===void 0?void 0:c.call(o,"template");y&&Ot(y,f=>{wt(f.content)&&Ri(f.content)})},li=function(o){let c=rt?rt(o):null;return typeof c!="string"||S(c)!=="form"?!1:typeof o.nodeName!="string"||typeof o.textContent!="string"||typeof o.removeChild!="function"||o.attributes!==Wt(o)||typeof o.removeAttribute!="function"||typeof o.setAttribute!="function"||typeof o.namespaceURI!="string"||typeof o.insertBefore!="function"||typeof o.hasChildNodes!="function"||o.nodeType!==z(o)||o.childNodes!==it(o)},wt=function(o){if(!z||typeof o!="object"||o===null)return!1;try{return z(o)===Z.documentFragment}catch{return!1}},Gt=function(o){if(!z||typeof o!="object"||o===null)return!1;try{return typeof z(o)=="number"}catch{return!1}};function st(g,o,c){g.length!==0&&Ot(g,C=>{C.call(i,o,c,At)})}let Ye=function(o,c){return!!(ut&&o.hasChildNodes()&&!Gt(o.firstElementChild)&&M(re,o.textContent)&&M(re,o.innerHTML)||ut&&o.namespaceURI===ot&&c==="style"&&Gt(o.firstElementChild)||o.nodeType===Z.processingInstruction||ut&&o.nodeType===Z.comment&&M(ee,o.data))},Xe=function(o,c){if(!Ht[c]&&Ar(c)&&(v.tagNameCheck instanceof RegExp&&M(v.tagNameCheck,c)||v.tagNameCheck instanceof Function&&v.tagNameCheck(c)))return!1;if(Ei&&!et[c]){let C=nt(o),p=it(o);if(p&&C){let y=p.length;for(let f=y-1;f>=0;--f){let A=vi?p[f]:Pt(p[f],!0);C.insertBefore(A,Ft(o))}}}return pt(o),!0},Er=function(o,c){if(st(L.beforeSanitizeElements,o,null),o!==c&&nt(o)===null)return!0;if(li(o))return pt(o),!0;let C=S(rt?rt(o):o.nodeName);if(st(L.uponSanitizeElement,o,{tagName:C,allowedTags:_}),o!==c&&nt(o)===null)return!0;if(Ye(o,C))return pt(o),!0;if(Ht[C]||!(Ct.tagCheck instanceof Function&&Ct.tagCheck(C))&&!_[C]){let y=Xe(o,C);return y===!1&&st(L.afterSanitizeElements,o,null),y}if((z?z(o):o.nodeType)===Z.element&&!je(o)||(C==="noscript"||C==="noembed"||C==="noframes")&&M(Yo,o.innerHTML))return pt(o),!0;if(gt&&o.nodeType===Z.text){let y=ai(o.textContent);o.textContent!==y&&(Mt(i.removed,{element:o.cloneNode()}),o.textContent=y)}return st(L.afterSanitizeElements,o,null),!1},vr=function(o,c,C){if(dr[c]||ut&&c==="patchsrc"||ut&&c==="for"&&o!=="label"&&o!=="output"||pr&&(c==="id"||c==="name")&&(C in e||C in Ne))return!1;let p=E[c]||Ct.attributeCheck instanceof Function&&Ct.attributeCheck(c,o);if(!(Bi&&M(Oe,c))){if(!(Cr&&M(Me,c))){if(p){if(!wi[c]){if(!M(hr,Vt(C,lr,""))){if(!((c==="src"||c==="xlink:href"||c==="href")&&o!=="script"&&Yr(C,"data:")===0&&xr[o])){if(!(gr&&!M(Ie,Vt(C,lr,"")))){if(C)return!1}}}}}else if(!(Ar(o)&&(v.tagNameCheck instanceof RegExp&&M(v.tagNameCheck,o)||v.tagNameCheck instanceof Function&&v.tagNameCheck(o))&&(v.attributeNameCheck instanceof RegExp&&M(v.attributeNameCheck,c)||v.attributeNameCheck instanceof Function&&v.attributeNameCheck(c,o))||c==="is"&&v.allowCustomizedBuiltInElements&&(v.tagNameCheck instanceof RegExp&&M(v.tagNameCheck,C)||v.tagNameCheck instanceof Function&&v.tagNameCheck(C))))return!1}}return!0},Ke=k({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ar=function(o){return!Ke[Xt(o)]&&M(De,o)},Ze=function(o,c,C,p){if(V&&typeof dt=="object"&&typeof dt.getAttributeType=="function"&&!C)switch(dt.getAttributeType(o,c)){case"TrustedHTML":return Lt(p);case"TrustedScriptURL":return Fe(p)}return p},Je=function(o,c,C,p){try{C?o.setAttributeNS(C,c,p):o.setAttribute(c,p),li(o)?pt(o):$r(i.removed)}catch{kt(c,o)}},wr=function(o){st(L.beforeSanitizeAttributes,o,null);let c=o.attributes;if(!c||li(o))return;let C={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:E,forceKeepAttr:void 0},p=c.length,y=S(o.nodeName);for(;p--;){let f=c[p],A=f.name,N=f.namespaceURI,Q=f.value,Y=S(A),tt=Q,U=A==="value"?tt:Ao(tt);if(C.attrName=Y,C.attrValue=U,C.keepAttr=!0,C.forceKeepAttr=void 0,st(L.uponSanitizeAttribute,o,C),U=C.attrValue,mr&&(Y==="id"||Y==="name")&&Yr(U,yr)!==0&&(kt(A,o),U=yr+U),ut&&M(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,U)){kt(A,o);continue}if(Y==="attributename"&&Vr(U,"href")){kt(A,o);continue}if(!C.forceKeepAttr){if(!C.keepAttr){kt(A,o);continue}if(!ur&&M(Xo,U)){kt(A,o);continue}if(gt&&(U=ai(U)),!vr(y,Y,U)){kt(A,o);continue}U=Ze(y,Y,N,U),U!==tt&&Je(o,A,N,U)}}st(L.afterSanitizeAttributes,o,null)},hi=function(o){let c=null,C=_r(o);for(st(L.beforeSanitizeShadowDOM,o,null);c=C.nextNode();)if(st(L.uponSanitizeShadowNode,c,null),Er(c,o),wr(c),wt(c.content)&&hi(c.content),(z?z(c):c.nodeType)===Z.element){let y=Qt(c);wt(y)&&(Pi(y),hi(y))}st(L.afterSanitizeShadowDOM,o,null)},Pi=function(o){let c=[{node:o,shadow:null}];for(;c.length>0;){let C=c.pop();if(C.shadow){hi(C.shadow);continue}let p=C.node,f=(z?z(p):p.nodeType)===Z.element,A=it(p);if(A)for(let N=A.length-1;N>=0;--N)c.push({node:A[N],shadow:null});if(f){let N=rt?rt(p):null;if(typeof N=="string"&&S(N)==="template"){let Q=p.content;wt(Q)&&c.push({node:Q,shadow:null})}}if(f){let N=Qt(p);wt(N)&&c.push({node:null,shadow:N},{node:N,shadow:null})}}};return i.sanitize=function(g){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=null,C=null,p=null,y=null;if(qi=!g,qi&&(g=""),typeof g!="string"&&!Gt(g)&&(g=Io(g),typeof g!="string"))throw Bt("dirty is not a string, aborting");if(!i.isSupported)return g;Si?(_=Fi,E=Li):Di(o),(L.uponSanitizeElement.length>0||L.uponSanitizeAttribute.length>0)&&(_=j(_)),L.uponSanitizeAttribute.length>0&&(E=j(E)),i.removed=[];let f=vi&&typeof g!="string"&&Gt(g);if(f){Ve(g);let Y=rt?rt(g):g.nodeName;if(typeof Y=="string"){let tt=S(Y);if(!_[tt]||Ht[tt])throw si(g),Bt("root node is forbidden and cannot be sanitized in-place")}if(li(g))throw si(g),Bt("root node is clobbered and cannot be sanitized in-place");try{Pi(g)}catch(tt){throw si(g),tt}}else if(Gt(g))c=Lr(""),C=c.ownerDocument.importNode(g,!0),C.nodeType===Z.element&&C.nodeName==="BODY"||C.nodeName==="HTML"?c=C:c.appendChild(C),Pi(C);else{if(!_t&&!gt&&!Tt&&g.indexOf("<")===-1)return V&&ri?Lt(g):g;if(c=Lr(g),!c)return _t?null:ri?ft:""}c&&_i&&pt(c.firstChild);let A=f?g:c,N=_r(A);try{for(;p=N.nextNode();)Er(p,A),wr(p),wt(p.content)&&hi(p.content)}catch(Y){throw f&&(si(g),Ot(i.removed,tt=>{tt.element&&zi(tt.element)})),Y}if(f)return Ot(i.removed,Y=>{Y.element&&zi(Y.element)}),gt&&Ri(g),g;if(_t){if(gt&&Ri(c),ii)for(y=_e.call(c.ownerDocument);c.firstChild;)y.appendChild(c.firstChild);else y=c;return(E.shadowroot||E.shadowrootmode)&&(y=ve.call(l,y,!0)),y}let Q=Tt?c.outerHTML:c.innerHTML;return Tt&&_["!doctype"]&&c.ownerDocument&&c.ownerDocument.doctype&&c.ownerDocument.doctype.name&&M($o,c.ownerDocument.doctype.name)&&(Q=" +`+Q),gt&&(Q=ai(Q)),V&&ri?Lt(Q):Q},i.setConfig=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Di(g),Si=!0,Fi=_,Li=E},i.clearConfig=function(){At=null,Si=!1,Fi=null,Li=null,V=ki,ft=""},i.isValidAttribute=function(g,o,c){At||Di({});let C=S(g),p=S(o);return vr(C,p,c)},i.addHook=function(g,o){typeof o=="function"&&I(L,g)&&Mt(L[g],o)},i.removeHook=function(g,o){if(I(L,g)){if(o!==void 0){let c=Eo(L[g],o);return c===-1?void 0:vo(L[g],c,1)[0]}return $r(L[g])}},i.removeHooks=function(g){I(L,g)&&(L[g]=[])},i.removeAllHooks=function(){L=oe()},i}var Dt=le();var Jo=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Qo=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ts=/\s*%%.*\n/gm,is=class extends Error{static{d(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},mi={},Il=d(function(t,i){t=t.replace(Jo,"").replace(Qo,"").replace(ts,` +`);for(let[e,{detector:l}]of Object.entries(mi))if(l(t,i))return e;throw new is(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),Dl=d((...t)=>{for(let{id:i,detector:e,loader:l}of t)ge(i,e,l)},"registerLazyLoadedDiagrams"),ge=d((t,i,e)=>{mi[t]&&R.warn(`Detector with key ${t} already exists. Overwriting.`),mi[t]={detector:i,loader:e},R.debug(`Detector with key ${t} added${e?" with loader":""}`)},"addDetector"),zl=d(t=>mi[t].loader,"getDiagramLoader"),Ki=d((t,i,{depth:e=2,clobber:l=!1}={})=>{let s={depth:e,clobber:l};return Array.isArray(i)&&!Array.isArray(t)?(i.forEach(u=>Ki(t,u,s)),t):Array.isArray(i)&&Array.isArray(t)?(i.forEach(u=>{t.includes(u)||t.push(u)}),t):t===void 0||e<=0?t!=null&&typeof t=="object"&&typeof i=="object"?Object.assign(t,i):i:(i!==void 0&&typeof t=="object"&&typeof i=="object"&&Object.keys(i).forEach(u=>{typeof i[u]=="object"&&i[u]!==null&&(t[u]===void 0||typeof t[u]=="object")?(t[u]===void 0&&(t[u]=Array.isArray(i[u])?[]:{}),t[u]=Ki(t[u],i[u],{depth:e-1,clobber:l})):(l||typeof t[u]!="object"&&typeof i[u]!="object")&&(t[u]=i[u])}),t)},"assignWithDepth"),H=Ki,lt="#ffffff",ht="#f2f2f2",x=d((t,i)=>i?r(t,{s:-40,l:10}):r(t,{s:-40,l:-10}),"mkBorder"),rs=class{static{d(this,"Theme")}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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?n(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||n(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor),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||h(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||n(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||n(this.mainBkg,10)):(this.rowOdd=this.rowOdd||h(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||h(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.darkMode)for(let i=0;i{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},es=d(t=>{let i=new rs;return i.calculate(t),i},"getThemeVariables"),os=class{static{d(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=h(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.lineColor=a(this.background),this.textColor=a(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=h(a("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=G(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=n("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=n(this.sectionBkgColor,10),this.taskBorderColor=G(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=G(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||h(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||n(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(){this.secondBkg=h(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=h(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.altSectionBkgColor=this.background,this.taskBkgColor=h(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=a(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=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},ss=d(t=>{let i=new os;return i.calculate(t),i},"getThemeVariables"),as=class{static{d(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=r(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=x(this.primaryColor,this.darkMode),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.lineColor=a(this.background),this.textColor=a(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=x(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=G(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(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||n(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||n(this.tertiaryColor,40);for(let t=0;t{this[e]==="calculated"&&(this[e]=void 0)}),typeof t!="object"){this.updateColors();return}let i=Object.keys(t);i.forEach(e=>{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},ls=d(t=>{let i=new as;return i.calculate(t),i},"getThemeVariables"),hs=class{static{d(this,"Theme")}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=h("#cde498",10),this.primaryBorderColor=x(this.primaryColor,this.darkMode),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.primaryColor),this.lineColor=a(this.background),this.textColor=a(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(){this.actorBorder=n(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.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||n(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||n(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},ns=d(t=>{let i=new hs;return i.calculate(t),i},"getThemeVariables"),cs=class{static{d(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=h(this.contrast,55),this.background="#ffffff",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=x(this.primaryColor,this.darkMode),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.lineColor=a(this.background),this.textColor=a(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||h(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(){this.secondBkg=h(this.contrast,55),this.border2=this.contrast,this.actorBorder=h(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,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 t=0;t{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},ds=d(t=>{let i=new cs;return i.calculate(t),i},"getThemeVariables"),Cs=class{static{d(this,"Theme")}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=x(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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?n(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||n(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor);let t="#ECECFE",i="#E9E9F1",e=r(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||e,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,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||h(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||i,this.cScale2=this.cScale2||e,this.cScale3=this.cScale3||r(t,{h:30}),this.cScale4=this.cScale4||r(t,{h:60}),this.cScale5=this.cScale5||r(t,{h:90}),this.cScale6=this.cScale6||r(t,{h:120}),this.cScale7=this.cScale7||r(t,{h:150}),this.cScale8=this.cScale8||r(t,{h:210,l:150}),this.cScale9=this.cScale9||r(t,{h:270}),this.cScale10=this.cScale10||r(t,{h:300}),this.cScale11=this.cScale11||r(t,{h:330}),this.darkMode)for(let s=0;s{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},gs=d(t=>{let i=new Cs;return i.calculate(t),i},"getThemeVariables"),us=class{static{d(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=h(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=h(a("#323D47"),10),this.border1="#ccc",this.border2=G(255,255,255,.25),this.arrowheadColor=a(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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?n(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||n(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor),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||h(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.darkMode)for(let i=0;i{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},ps=d(t=>{let i=new us;return i.calculate(t),i},"getThemeVariables"),ms=class{static{d(this,"Theme")}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=x("#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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?n(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||n(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor);let t="#ECECFE",i="#E9E9F1",e=r(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||e,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,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||h(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 s=0;s{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},ys=d(t=>{let i=new ms;return i.calculate(t),i},"getThemeVariables"),xs=class{static{d(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=h(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=h(a("#323D47"),10),this.border1="#ccc",this.border2=G(255,255,255,.25),this.arrowheadColor=a(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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?n(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||n(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor),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||h(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.darkMode)for(let i=0;i{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},fs=d(t=>{let i=new xs;return i.calculate(t),i},"getThemeVariables"),Ts=class{static{d(this,"Theme")}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=x(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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?n(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||n(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor);let t="#ECECFE",i="#E9E9F1",e=r(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||e,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||i,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||h(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 s=0;s{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},ks=d(t=>{let i=new Ts;return i.calculate(t),i},"getThemeVariables"),bs=class{static{d(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=h(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=a(this.background),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=a(this.primaryColor),this.secondaryTextColor=a(this.secondaryColor),this.tertiaryTextColor=a(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=h(a("#323D47"),10),this.border1="#ccc",this.border2=G(255,255,255,.25),this.arrowheadColor=a(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(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||a(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||a(this.tertiaryColor),this.lineColor=this.lineColor||a(this.background),this.arrowheadColor=this.arrowheadColor||a(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?n(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||n(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||a(this.lineColor),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||h(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 i=0;i{this[e]=t[e]}),this.updateColors(),i.forEach(e=>{this[e]=t[e]})}},Bs=d(t=>{let i=new bs;return i.calculate(t),i},"getThemeVariables"),zt={base:{getThemeVariables:es},dark:{getThemeVariables:ss},default:{getThemeVariables:ls},forest:{getThemeVariables:ns},neutral:{getThemeVariables:ds},neo:{getThemeVariables:gs},"neo-dark":{getThemeVariables:ps},redux:{getThemeVariables:ys},"redux-dark":{getThemeVariables:fs},"redux-color":{getThemeVariables:ks},"redux-dark-color":{getThemeVariables:Bs}},$={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},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},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,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},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},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},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},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},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},ue={...$,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:zt.default.getThemeVariables(),sequence:{...$.sequence,messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:d(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:d(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...$.gantt,tickInterval:void 0,useWidth:void 0},c4:{...$.c4,useWidth:void 0,personFont:d(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...$.flowchart,inheritDir:!1},external_personFont:d(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:d(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:d(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:d(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:d(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:d(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:d(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:d(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:d(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:d(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:d(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:d(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:d(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:d(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:d(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:d(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:d(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:d(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:d(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:d(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...$.pie,useWidth:984},xyChart:{...$.xyChart,useWidth:void 0},requirement:{...$.requirement,useWidth:void 0},packet:{...$.packet},eventmodeling:{...$.eventmodeling},treeView:{...$.treeView,useWidth:void 0},radar:{...$.radar},ishikawa:{...$.ishikawa},sankey:{...$.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:{...$.venn}},pe=d((t,i="")=>Object.keys(t).reduce((e,l)=>Array.isArray(t[l])?e:typeof t[l]=="object"&&t[l]!==null?[...e,i+l,...pe(t[l],"")]:[...e,i+l],[]),"keyify"),Ss=new Set(pe(ue,"")),Fs=ue,Zi=d(t=>{if(R.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(i=>Zi(i));return}for(let i of Object.keys(t)){if(R.debug("Checking key",i),i.startsWith("__")||i.includes("proto")||i.includes("constr")||!Ss.has(i)||t[i]==null){R.debug("sanitize deleting key: ",i),delete t[i];continue}if(typeof t[i]=="object"){if(i==="nodeColors"){let l=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(let s of Object.keys(t[i]))(typeof t[i][s]!="string"||!l.test(t[i][s]))&&(R.debug("sanitize deleting invalid color:",s,t[i][s]),delete t[i][s])}else R.debug("sanitizing object",i),Zi(t[i]);continue}let e=["themeCSS","fontFamily","altFontFamily"];for(let l of e)i.includes(l)&&(R.debug("sanitizing css option",i),t[i]=Ls(t[i]))}if(t.themeVariables)for(let i of Object.keys(t.themeVariables)){let e=t.themeVariables[i];e?.match&&!e.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[i]="")}R.debug("After sanitization",t)}},"sanitizeDirective"),Ls=d(t=>{let i=0,e=0;for(let l of t){if(i!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),X=H({},fi),yi,St=[],Kt=H({},fi),Ti=d((t,i)=>{let e=H({},t),l={};for(let s of i)ye(s),l=H(l,s);if(e=H(e,l),l.theme&&l.theme in zt){let s=H({},yi),u=H(s.themeVariables||{},l.themeVariables);e.theme&&e.theme in zt&&(e.themeVariables=zt[e.theme].getThemeVariables(u))}return Kt=e,fe(Kt),Kt},"updateCurrentConfig"),Kl=d(t=>(X=H({},fi),X=H(X,t),t.theme&&zt[t.theme]&&(X.themeVariables=zt[t.theme].getThemeVariables(t.themeVariables)),Ti(X,St),X),"setSiteConfig"),Zl=d(t=>{yi=H({},t)},"saveConfigFromInitialize"),Jl=d(t=>(X=H(X,t),Ti(X,St),X),"updateSiteConfig"),Ql=d(()=>H({},X),"getSiteConfig"),_s=d(t=>(fe(t),H(Kt,t),Qi()),"setConfig"),Qi=d(()=>H({},Kt),"getConfig"),ye=d(t=>{t&&(["secure",...X.secure??[]].forEach(i=>{Object.hasOwn(t,i)&&(R.debug(`Denied attempt to modify a secure key ${i}`,t[i]),delete t[i])}),Object.keys(t).forEach(i=>{i.startsWith("__")&&delete t[i]}),Object.keys(t).forEach(i=>{typeof t[i]=="string"&&(t[i].includes("<")||t[i].includes(">")||t[i].includes("url(data:"))&&delete t[i],typeof t[i]=="object"&&ye(t[i])}))},"sanitize"),th=d(t=>{Zi(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),St.push(t),Ti(X,St)},"addDirective"),ih=d((t=X)=>{St=[],Ti(t,St)},"reset"),Es={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."},he={},xe=d(t=>{he[t]||(R.warn(Es[t]),he[t]=!0)},"issueWarning"),fe=d(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&xe("LAZY_LOAD_DEPRECATED")},"checkConfig"),rh=d(()=>{let t={};yi&&(t=H(t,yi));for(let i of St)t=H(t,i);return t},"getUserDefinedConfig"),vs=d(t=>(t.flowchart?.htmlLabels!=null&&xe("FLOWCHART_HTML_LABELS_DEPRECATED"),me(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Zt=//gi,As=d(t=>t?be(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),ws=(()=>{let t=!1;return()=>{t||(Te(),t=!0)}})();function Te(){let t="data-temp-href-target";Dt.addHook("beforeSanitizeAttributes",i=>{i.tagName==="A"&&i.hasAttribute("target")&&i.setAttribute(t,i.getAttribute("target")??"")}),Dt.addHook("afterSanitizeAttributes",i=>{i.tagName==="A"&&i.hasAttribute(t)&&(i.setAttribute("target",i.getAttribute(t)??""),i.removeAttribute(t),i.getAttribute("target")==="_blank"&&i.setAttribute("rel","noopener"))})}d(Te,"setupDompurifyHooks");var ke=d(t=>(ws(),Dt.sanitize(t)),"removeScript"),ne=d((t,i)=>{if(vs(i)){let e=i.securityLevel;e==="antiscript"||e==="strict"||e==="sandbox"?t=ke(t):e!=="loose"&&(t=be(t),t=t.replace(//g,">"),t=t.replace(/=/g,"="),t=Is(t))}return t},"sanitizeMore"),Rt=d((t,i)=>t&&(i.dompurifyConfig?t=Dt.sanitize(ne(t,i),i.dompurifyConfig).toString():t=Dt.sanitize(ne(t,i),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),qs=d((t,i)=>typeof t=="string"?Rt(t,i):t.flat().map(e=>Rt(e,i)),"sanitizeTextOrArray"),Os=d(t=>Zt.test(t),"hasBreaks"),Ms=d(t=>t.split(Zt),"splitBreaks"),Is=d(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),be=d(t=>t.replace(Zt,"#br#"),"breakToPlaceholder"),Ds=d(t=>{let i="";return t&&(i=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,i=CSS.escape(i)),i},"getUrl"),zs=d(function(...t){let i=t.filter(e=>!isNaN(e));return Math.max(...i)},"getMax"),Rs=d(function(...t){let i=t.filter(e=>!isNaN(e));return Math.min(...i)},"getMin"),oh=d(function(t){let i=t.split(/(,)/),e=[];for(let l=0;l0&&l+1Math.max(0,t.split(i).length-1),"countOccurrence"),Ps=d((t,i)=>{let e=Ji(t,"~"),l=Ji(i,"~");return e===1&&l===1},"shouldCombineSets"),Ws=d(t=>{let i=Ji(t,"~"),e=!1;if(i<=1)return t;i%2!==0&&t.startsWith("~")&&(t=t.substring(1),e=!0);let l=[...t],s=l.indexOf("~"),u=l.lastIndexOf("~");for(;s!==-1&&u!==-1&&s!==u;)l[s]="<",l[u]=">",s=l.indexOf("~"),u=l.lastIndexOf("~");return e&&l.unshift("~"),l.join("")},"processSet"),ce=d(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ui=/\$\$(.*)\$\$/g,de=d(t=>(t.match(ui)?.length??0)>0,"hasKatex"),sh=d(async(t,i)=>{let e=document.createElement("div");e.innerHTML=await Hs(t,i),e.id="katex-temp",e.style.visibility="hidden",e.style.position="absolute",e.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",e);let s={width:e.clientWidth,height:e.clientHeight};return e.remove(),s},"calculateMathMLDimensions"),Ns=d(async(t,i)=>{if(!de(t))return t;if(!(ce()||i.legacyMathML||i.forceLegacyMathML))return t.replace(ui,"MathML is unsupported in this environment.");{let{default:e}=await import("./katex-GDFLULNE.min.js"),l=i.forceLegacyMathML||!ce()&&i.legacyMathML?"htmlAndMathml":"mathml";return t.split(Zt).map(s=>de(s)?`

${s}
`:`
${s}
`).join("").replace(ui,(s,u)=>e.renderToString(u,{throwOnError:!0,displayMode:!0,output:l}).replace(/\n/g," ").replace(//g,""))}return t.replace(ui,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),Hs=d(async(t,i)=>Rt(await Ns(t,i),i),"renderKatexSanitized"),ah={getRows:As,sanitizeText:Rt,sanitizeTextOrArray:qs,hasBreaks:Os,splitBreaks:Ms,lineBreakRegex:Zt,removeScript:ke,getUrl:Ds,evaluate:me,getMax:zs,getMin:Rs},Us=d(function(t,i){for(let e of i)t.attr(e[0],e[1])},"d3Attrs"),Gs=d(function(t,i,e){let l=new Map;return e?(l.set("width","100%"),l.set("style",`max-width: ${i}px;`)):(l.set("height",t),l.set("width",i)),l},"calculateSvgSizeAttrs"),js=d(function(t,i,e,l){let s=Gs(i,e,l);Us(t,s)},"configureSvgSize"),$s=d(function(t,i,e,l){let s=i.node().getBBox(),u=s.width,T=s.height;R.info(`SVG bounds: ${u}x${T}`,s);let b=0,B=0;R.info(`Graph bounds: ${b}x${B}`,t),b=u+e*2,B=T+e*2,R.info(`Calculated bounds: ${b}x${B}`),js(i,B,b,l);let D=`${s.x-e} ${s.y-e} ${s.width+2*e} ${s.height+2*e}`;i.attr("viewBox",D)},"setupGraphViewbox"),pi={};function Vs(t){return[...t.cssRules].map(i=>i.cssText).join(` +`)}d(Vs,"cssStyleSheetToString");var Ys=d((t,i,e,l)=>{let s="";return t in pi&&pi[t]?s=pi[t]({...e,svgId:l}):R.warn(`No theme found for ${t}`),` & { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + fill: ${e.textColor} + } + @keyframes edge-animation-frame { + from { + stroke-dashoffset: 0; + } + } + @keyframes dash { + to { + stroke-dashoffset: 0; + } + } + & .edge-animation-slow { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 50s linear infinite; + stroke-linecap: round; + } + & .edge-animation-fast { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 20s linear infinite; + stroke-linecap: round; + } + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${e.errorBkgColor}; + } + & .error-text { + fill: ${e.errorTextColor}; + stroke: ${e.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: ${e.strokeWidth??1}px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + & .edge-thickness-invisible { + stroke-width: 0; + fill: none; + } + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${e.lineColor}; + stroke: ${e.lineColor}; + } + & .marker.cross { + stroke: ${e.lineColor}; + } + + & svg { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + } + & p { + margin: 0 + } + + ${s} + .node .neo-node { + stroke: ${e.nodeBorder}; + } + + [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { + stroke: ${e.useGradient?"url("+l+"-gradient)":e.nodeBorder}; + filter: ${e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${l}-drop-shadow)`):"none"}; + } + + + [data-look="neo"].node path { + stroke: ${e.useGradient?"url("+l+"-gradient)":e.nodeBorder}; + stroke-width: ${e.strokeWidth??1}px; + } + + [data-look="neo"].node .outer-path { + filter: ${e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${l}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node .neo-line path { + stroke: ${e.nodeBorder}; + filter: none; + } + + [data-look="neo"].node circle{ + stroke: ${e.useGradient?"url("+l+"-gradient)":e.nodeBorder}; + filter: ${e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${l}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node circle .state-start{ + fill: #000000; + } + + [data-look="neo"].icon-shape .icon { + fill: ${e.useGradient?"url("+l+"-gradient)":e.nodeBorder}; + filter: ${e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${l}-drop-shadow)`):"none"}; + } + + [data-look="neo"].icon-shape .icon-neo path { + stroke: ${e.useGradient?"url("+l+"-gradient)":e.nodeBorder}; + filter: ${e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${l}-drop-shadow)`):"none"}; + } + + ${i} +`},"getStyles"),Xs=d((t,i)=>{i!==void 0&&(pi[t]=i)},"addStylesForDiagram"),lh=Ys,Be={};qr(Be,{clear:()=>Ks,getAccDescription:()=>ta,getAccTitle:()=>Js,getDiagramTitle:()=>ra,setAccDescription:()=>Qs,setAccTitle:()=>Zs,setDiagramTitle:()=>ia});var tr="",ir="",rr="",er=d(t=>Rt(t,Qi()),"sanitizeText"),Ks=d(()=>{tr="",rr="",ir=""},"clear"),Zs=d(t=>{tr=er(t).replace(/^\s+/g,"")},"setAccTitle"),Js=d(()=>tr,"getAccTitle"),Qs=d(t=>{rr=er(t).replace(/\n\s+/g,` +`)},"setAccDescription"),ta=d(()=>rr,"getAccDescription"),ia=d(t=>{ir=er(t)},"setDiagramTitle"),ra=d(()=>ir,"getDiagramTitle"),Ce=R,ea=Or,Se=Qi,hh=_s,nh=fi,oa=d(t=>Rt(t,Se()),"sanitizeText"),sa=$s,aa=d(()=>Be,"getCommonDb"),xi={},ch=d((t,i,e)=>{xi[t]&&Ce.warn(`Diagram with id ${t} already registered. Overwriting.`),xi[t]=i,e&&ge(t,e),Xs(t,i.styles),i.injectUtils?.(Ce,ea,Se,oa,sa,aa(),()=>{})},"registerDiagram"),dh=d(t=>{if(t in xi)return xi[t];throw new la(t)},"getDiagram"),la=class extends Error{static{d(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}};export{G as a,lo as b,F as c,h as d,n as e,mo as f,Dt as g,Jo as h,Qo as i,is as j,mi as k,Il as l,Dl as m,zl as n,H as o,ls as p,zt as q,Fs as r,Zi as s,Ls as t,fi as u,me as v,Kl as w,Zl as x,Jl as y,Ql as z,_s as A,Qi as B,th as C,ih as D,rh as E,vs as F,Zt as G,Rt as H,Ds as I,oh as J,de as K,sh as L,Hs as M,ah as N,js as O,$s as P,Vs as Q,lh as R,Be as S,Ks as T,Zs as U,Js as V,Qs as W,ta as X,ia as Y,ra as Z,Se as _,hh as $,nh as aa,oa as ba,sa as ca,ch as da,dh as ea}; +/*! Bundled license information: + +dompurify/dist/purify.es.mjs: + (*! @license DOMPurify 3.4.12 | (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.12/LICENSE *) +*/ +//# sourceMappingURL=chunk-LXXU3C6C.min.js.map diff --git a/templates/tabulareditor/public/chunk-LXXU3C6C.min.js.map b/templates/tabulareditor/public/chunk-LXXU3C6C.min.js.map new file mode 100644 index 000000000..2f266630c --- /dev/null +++ b/templates/tabulareditor/public/chunk-LXXU3C6C.min.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../node_modules/khroma/dist/utils/channel.js", "../../node_modules/khroma/dist/utils/lang.js", "../../node_modules/khroma/dist/utils/unit.js", "../../node_modules/khroma/dist/utils/index.js", "../../node_modules/khroma/dist/constants.js", "../../node_modules/khroma/dist/channels/type.js", "../../node_modules/khroma/dist/channels/index.js", "../../node_modules/khroma/dist/channels/reusable.js", "../../node_modules/khroma/dist/color/hex.js", "../../node_modules/khroma/dist/color/hsl.js", "../../node_modules/khroma/dist/color/keyword.js", "../../node_modules/khroma/dist/color/rgb.js", "../../node_modules/khroma/dist/color/index.js", "../../node_modules/khroma/dist/methods/change.js", "../../node_modules/khroma/dist/methods/rgba.js", "../../node_modules/khroma/dist/methods/channel.js", "../../node_modules/khroma/dist/methods/luminance.js", "../../node_modules/khroma/dist/methods/is_light.js", "../../node_modules/khroma/dist/methods/is_dark.js", "../../node_modules/khroma/dist/methods/adjust_channel.js", "../../node_modules/khroma/dist/methods/lighten.js", "../../node_modules/khroma/dist/methods/darken.js", "../../node_modules/khroma/dist/methods/transparentize.js", "../../node_modules/khroma/dist/methods/adjust.js", "../../node_modules/khroma/dist/methods/mix.js", "../../node_modules/khroma/dist/methods/invert.js", "../../node_modules/dompurify/src/utils.ts", "../../node_modules/dompurify/src/tags.ts", "../../node_modules/dompurify/src/attrs.ts", "../../node_modules/dompurify/src/regexp.ts", "../../node_modules/dompurify/src/purify.ts", "../../node_modules/mermaid/dist/chunks/mermaid.core/chunk-CSCIHK7Q.mjs"], + "sourcesContent": ["/* IMPORT */\n/* MAIN */\nconst Channel = {\n /* CLAMP */\n min: {\n r: 0,\n g: 0,\n b: 0,\n s: 0,\n l: 0,\n a: 0\n },\n max: {\n r: 255,\n g: 255,\n b: 255,\n h: 360,\n s: 100,\n l: 100,\n a: 1\n },\n clamp: {\n r: (r) => r >= 255 ? 255 : (r < 0 ? 0 : r),\n g: (g) => g >= 255 ? 255 : (g < 0 ? 0 : g),\n b: (b) => b >= 255 ? 255 : (b < 0 ? 0 : b),\n h: (h) => h % 360,\n s: (s) => s >= 100 ? 100 : (s < 0 ? 0 : s),\n l: (l) => l >= 100 ? 100 : (l < 0 ? 0 : l),\n a: (a) => a >= 1 ? 1 : (a < 0 ? 0 : a)\n },\n /* CONVERSION */\n //SOURCE: https://planetcalc.com/7779\n toLinear: (c) => {\n const n = c / 255;\n return c > .03928 ? Math.pow(((n + .055) / 1.055), 2.4) : n / 12.92;\n },\n //SOURCE: https://gist.github.com/mjackson/5311256\n hue2rgb: (p, q, t) => {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n },\n hsl2rgb: ({ h, s, l }, channel) => {\n if (!s)\n return l * 2.55; // Achromatic\n h /= 360;\n s /= 100;\n l /= 100;\n const q = (l < .5) ? l * (1 + s) : (l + s) - (l * s);\n const p = 2 * l - q;\n switch (channel) {\n case 'r': return Channel.hue2rgb(p, q, h + 1 / 3) * 255;\n case 'g': return Channel.hue2rgb(p, q, h) * 255;\n case 'b': return Channel.hue2rgb(p, q, h - 1 / 3) * 255;\n }\n },\n rgb2hsl: ({ r, g, b }, channel) => {\n r /= 255;\n g /= 255;\n b /= 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n if (channel === 'l')\n return l * 100;\n if (max === min)\n return 0; // Achromatic\n const d = max - min;\n const s = (l > .5) ? d / (2 - max - min) : d / (max + min);\n if (channel === 's')\n return s * 100;\n switch (max) {\n case r: return ((g - b) / d + (g < b ? 6 : 0)) * 60;\n case g: return ((b - r) / d + 2) * 60;\n case b: return ((r - g) / d + 4) * 60;\n default: return -1; //TSC: TypeScript is stupid and complains if there isn't this useless default statement\n }\n }\n};\n/* EXPORT */\nexport default Channel;\n", "/* MAIN */\nconst Lang = {\n /* API */\n clamp: (number, lower, upper) => {\n if (lower > upper)\n return Math.min(lower, Math.max(upper, number));\n return Math.min(upper, Math.max(lower, number));\n },\n round: (number) => {\n return Math.round(number * 10000000000) / 10000000000;\n }\n};\n/* EXPORT */\nexport default Lang;\n", "/* MAIN */\nconst Unit = {\n /* API */\n dec2hex: (dec) => {\n const hex = Math.round(dec).toString(16);\n return hex.length > 1 ? hex : `0${hex}`;\n }\n};\n/* EXPORT */\nexport default Unit;\n", "/* IMPORT */\nimport channel from './channel.js';\nimport lang from './lang.js';\nimport unit from './unit.js';\n/* MAIN */\nconst Utils = {\n channel,\n lang,\n unit\n};\n/* EXPORT */\nexport default Utils;\n", "/* IMPORT */\nimport _ from './utils/index.js';\n/* MAIN */\nconst DEC2HEX = {};\nfor (let i = 0; i <= 255; i++)\n DEC2HEX[i] = _.unit.dec2hex(i); // Populating dynamically, striking a balance between code size and performance\nconst TYPE = {\n ALL: 0,\n RGB: 1,\n HSL: 2\n};\n/* EXPORT */\nexport { DEC2HEX, TYPE };\n", "/* IMPORT */\nimport { TYPE } from '../constants.js';\n/* MAIN */\nclass Type {\n constructor() {\n /* VARIABLES */\n this.type = TYPE.ALL;\n }\n /* API */\n get() {\n return this.type;\n }\n set(type) {\n if (this.type && this.type !== type)\n throw new Error('Cannot change both RGB and HSL channels at the same time');\n this.type = type;\n }\n reset() {\n this.type = TYPE.ALL;\n }\n is(type) {\n return this.type === type;\n }\n}\n/* EXPORT */\nexport default Type;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Type from './type.js';\nimport { TYPE } from '../constants.js';\n/* MAIN */\nclass Channels {\n /* CONSTRUCTOR */\n constructor(data, color) {\n this.color = color;\n this.changed = false;\n this.data = data; //TSC\n this.type = new Type();\n }\n /* API */\n set(data, color) {\n this.color = color;\n this.changed = false;\n this.data = data; //TSC\n this.type.type = TYPE.ALL;\n return this;\n }\n /* HELPERS */\n _ensureHSL() {\n const data = this.data;\n const { h, s, l } = data;\n if (h === undefined)\n data.h = _.channel.rgb2hsl(data, 'h');\n if (s === undefined)\n data.s = _.channel.rgb2hsl(data, 's');\n if (l === undefined)\n data.l = _.channel.rgb2hsl(data, 'l');\n }\n _ensureRGB() {\n const data = this.data;\n const { r, g, b } = data;\n if (r === undefined)\n data.r = _.channel.hsl2rgb(data, 'r');\n if (g === undefined)\n data.g = _.channel.hsl2rgb(data, 'g');\n if (b === undefined)\n data.b = _.channel.hsl2rgb(data, 'b');\n }\n /* GETTERS */\n get r() {\n const data = this.data;\n const r = data.r;\n if (!this.type.is(TYPE.HSL) && r !== undefined)\n return r;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'r');\n }\n get g() {\n const data = this.data;\n const g = data.g;\n if (!this.type.is(TYPE.HSL) && g !== undefined)\n return g;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'g');\n }\n get b() {\n const data = this.data;\n const b = data.b;\n if (!this.type.is(TYPE.HSL) && b !== undefined)\n return b;\n this._ensureHSL();\n return _.channel.hsl2rgb(data, 'b');\n }\n get h() {\n const data = this.data;\n const h = data.h;\n if (!this.type.is(TYPE.RGB) && h !== undefined)\n return h;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 'h');\n }\n get s() {\n const data = this.data;\n const s = data.s;\n if (!this.type.is(TYPE.RGB) && s !== undefined)\n return s;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 's');\n }\n get l() {\n const data = this.data;\n const l = data.l;\n if (!this.type.is(TYPE.RGB) && l !== undefined)\n return l;\n this._ensureRGB();\n return _.channel.rgb2hsl(data, 'l');\n }\n get a() {\n return this.data.a;\n }\n /* SETTERS */\n set r(r) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.r = r;\n }\n set g(g) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.g = g;\n }\n set b(b) {\n this.type.set(TYPE.RGB);\n this.changed = true;\n this.data.b = b;\n }\n set h(h) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.h = h;\n }\n set s(s) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.s = s;\n }\n set l(l) {\n this.type.set(TYPE.HSL);\n this.changed = true;\n this.data.l = l;\n }\n set a(a) {\n this.changed = true;\n this.data.a = a;\n }\n}\n/* EXPORT */\nexport default Channels;\n", "/* IMPORT */\nimport Channels from './/index.js';\n/* MAIN */\nconst channels = new Channels({ r: 0, g: 0, b: 0, a: 0 }, 'transparent');\n/* EXPORT */\nexport default channels;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\nimport { DEC2HEX } from '../constants.js';\n/* MAIN */\nconst Hex = {\n /* VARIABLES */\n re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,\n /* API */\n parse: (color) => {\n if (color.charCodeAt(0) !== 35)\n return; // '#'\n const match = color.match(Hex.re);\n if (!match)\n return;\n const hex = match[1];\n const dec = parseInt(hex, 16);\n const length = hex.length;\n const hasAlpha = length % 4 === 0;\n const isFullLength = length > 4;\n const multiplier = isFullLength ? 1 : 17;\n const bits = isFullLength ? 8 : 4;\n const bitsOffset = hasAlpha ? 0 : -1;\n const mask = isFullLength ? 255 : 15;\n return ChannelsReusable.set({\n r: ((dec >> (bits * (bitsOffset + 3))) & mask) * multiplier,\n g: ((dec >> (bits * (bitsOffset + 2))) & mask) * multiplier,\n b: ((dec >> (bits * (bitsOffset + 1))) & mask) * multiplier,\n a: hasAlpha ? (dec & mask) * multiplier / 255 : 1\n }, color);\n },\n stringify: (channels) => {\n const { r, g, b, a } = channels;\n if (a < 1) { // #RRGGBBAA\n return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}${DEC2HEX[Math.round(a * 255)]}`;\n }\n else { // #RRGGBB\n return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}`;\n }\n }\n};\n/* EXPORT */\nexport default Hex;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\n/* MAIN */\nconst HSL = {\n /* VARIABLES */\n 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,\n hueRe: /^(.+?)(deg|grad|rad|turn)$/i,\n /* HELPERS */\n _hue2deg: (hue) => {\n const match = hue.match(HSL.hueRe);\n if (match) {\n const [, number, unit] = match;\n switch (unit) {\n case 'grad': return _.channel.clamp.h(parseFloat(number) * .9);\n case 'rad': return _.channel.clamp.h(parseFloat(number) * 180 / Math.PI);\n case 'turn': return _.channel.clamp.h(parseFloat(number) * 360);\n }\n }\n return _.channel.clamp.h(parseFloat(hue));\n },\n /* API */\n parse: (color) => {\n const charCode = color.charCodeAt(0);\n if (charCode !== 104 && charCode !== 72)\n return; // 'h'/'H'\n const match = color.match(HSL.re);\n if (!match)\n return;\n const [, h, s, l, a, isAlphaPercentage] = match;\n return ChannelsReusable.set({\n h: HSL._hue2deg(h),\n s: _.channel.clamp.s(parseFloat(s)),\n l: _.channel.clamp.l(parseFloat(l)),\n a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n }, color);\n },\n stringify: (channels) => {\n const { h, s, l, a } = channels;\n if (a < 1) { // HSLA\n return `hsla(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%, ${a})`;\n }\n else { // HSL\n return `hsl(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%)`;\n }\n }\n};\n/* EXPORT */\nexport default HSL;\n", "/* IMPORT */\nimport Hex from './hex.js';\n/* MAIN */\nconst Keyword = {\n /* VARIABLES */\n colors: {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyanaqua: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n gold: '#ffd700',\n goldenrod: '#daa520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavender: '#e6e6fa',\n lavenderblush: '#fff0f5',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n transparent: '#00000000',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32'\n },\n /* API */\n parse: (color) => {\n color = color.toLowerCase();\n const hex = Keyword.colors[color];\n if (!hex)\n return;\n return Hex.parse(hex);\n },\n stringify: (channels) => {\n const hex = Hex.stringify(channels);\n for (const name in Keyword.colors) {\n if (Keyword.colors[name] === hex)\n return name;\n }\n return;\n }\n};\n/* EXPORT */\nexport default Keyword;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\n/* MAIN */\nconst RGB = {\n /* VARIABLES */\n 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,\n /* API */\n parse: (color) => {\n const charCode = color.charCodeAt(0);\n if (charCode !== 114 && charCode !== 82)\n return; // 'r'/'R'\n const match = color.match(RGB.re);\n if (!match)\n return;\n const [, r, isRedPercentage, g, isGreenPercentage, b, isBluePercentage, a, isAlphaPercentage] = match;\n return ChannelsReusable.set({\n r: _.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)),\n g: _.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)),\n b: _.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)),\n a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n }, color);\n },\n stringify: (channels) => {\n const { r, g, b, a } = channels;\n if (a < 1) { // RGBA\n return `rgba(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)}, ${_.lang.round(a)})`;\n }\n else { // RGB\n return `rgb(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)})`;\n }\n }\n};\n/* EXPORT */\nexport default RGB;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Hex from './hex.js';\nimport HSL from './hsl.js';\nimport Keyword from './keyword.js';\nimport RGB from './rgb.js';\nimport { TYPE } from '../constants.js';\n/* MAIN */\nconst Color = {\n /* VARIABLES */\n format: {\n keyword: Keyword,\n hex: Hex,\n rgb: RGB,\n rgba: RGB,\n hsl: HSL,\n hsla: HSL\n },\n /* API */\n parse: (color) => {\n if (typeof color !== 'string')\n return color;\n const channels = Hex.parse(color) || RGB.parse(color) || HSL.parse(color) || Keyword.parse(color); // Color providers ordered with performance in mind\n if (channels)\n return channels;\n throw new Error(`Unsupported color format: \"${color}\"`);\n },\n stringify: (channels) => {\n // SASS returns a keyword if possible, but we avoid doing that as it's slower and doesn't really add any value\n if (!channels.changed && channels.color)\n return channels.color;\n if (channels.type.is(TYPE.HSL) || channels.data.r === undefined) {\n return HSL.stringify(channels);\n }\n else if (channels.a < 1 || !Number.isInteger(channels.r) || !Number.isInteger(channels.g) || !Number.isInteger(channels.b)) {\n return RGB.stringify(channels);\n }\n else {\n return Hex.stringify(channels);\n }\n }\n};\n/* EXPORT */\nexport default Color;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst change = (color, channels) => {\n const ch = Color.parse(color);\n for (const c in channels) {\n ch[c] = _.channel.clamp[c](channels[c]);\n }\n return Color.stringify(ch);\n};\n/* EXPORT */\nexport default change;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\nimport Color from '../color/index.js';\nimport change from './change.js';\n/* MAIN */\nconst rgba = (r, g, b = 0, a = 1) => {\n if (typeof r !== 'number')\n return change(r, { a: g });\n const channels = ChannelsReusable.set({\n r: _.channel.clamp.r(r),\n g: _.channel.clamp.g(g),\n b: _.channel.clamp.b(b),\n a: _.channel.clamp.a(a)\n });\n return Color.stringify(channels);\n};\n/* EXPORT */\nexport default rgba;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst channel = (color, channel) => {\n return _.lang.round(Color.parse(color)[channel]);\n};\n/* EXPORT */\nexport default channel;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\n//SOURCE: https://planetcalc.com/7779\nconst luminance = (color) => {\n const { r, g, b } = Color.parse(color);\n const luminance = .2126 * _.channel.toLinear(r) + .7152 * _.channel.toLinear(g) + .0722 * _.channel.toLinear(b);\n return _.lang.round(luminance);\n};\n/* EXPORT */\nexport default luminance;\n", "/* IMPORT */\nimport luminance from './luminance.js';\n/* MAIN */\nconst isLight = (color) => {\n return luminance(color) >= .5;\n};\n/* EXPORT */\nexport default isLight;\n", "/* IMPORT */\nimport isLight from './is_light.js';\n/* MAIN */\nconst isDark = (color) => {\n return !isLight(color);\n};\n/* EXPORT */\nexport default isDark;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst adjustChannel = (color, channel, amount) => {\n const channels = Color.parse(color);\n const amountCurrent = channels[channel];\n const amountNext = _.channel.clamp[channel](amountCurrent + amount);\n if (amountCurrent !== amountNext)\n channels[channel] = amountNext;\n return Color.stringify(channels);\n};\n/* EXPORT */\nexport default adjustChannel;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst lighten = (color, amount) => {\n return adjustChannel(color, 'l', amount);\n};\n/* EXPORT */\nexport default lighten;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst darken = (color, amount) => {\n return adjustChannel(color, 'l', -amount);\n};\n/* EXPORT */\nexport default darken;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst transparentize = (color, amount) => {\n return adjustChannel(color, 'a', -amount);\n};\n/* EXPORT */\nexport default transparentize;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport change from './change.js';\n/* MAIN */\nconst adjust = (color, channels) => {\n const ch = Color.parse(color);\n const changes = {};\n for (const c in channels) {\n if (!channels[c])\n continue;\n changes[c] = ch[c] + channels[c];\n }\n return change(color, changes);\n};\n/* EXPORT */\nexport default adjust;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport rgba from './rgba.js';\n/* MAIN */\n//SOURCE: https://github.com/sass/dart-sass/blob/7457d2e9e7e623d9844ffd037a070cf32d39c348/lib/src/functions/color.dart#L718-L756\nconst mix = (color1, color2, weight = 50) => {\n const { r: r1, g: g1, b: b1, a: a1 } = Color.parse(color1);\n const { r: r2, g: g2, b: b2, a: a2 } = Color.parse(color2);\n const weightScale = weight / 100;\n const weightNormalized = (weightScale * 2) - 1;\n const alphaDelta = a1 - a2;\n const weight1combined = ((weightNormalized * alphaDelta) === -1) ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta);\n const weight1 = (weight1combined + 1) / 2;\n const weight2 = 1 - weight1;\n const r = (r1 * weight1) + (r2 * weight2);\n const g = (g1 * weight1) + (g2 * weight2);\n const b = (b1 * weight1) + (b2 * weight2);\n const a = (a1 * weightScale) + (a2 * (1 - weightScale));\n return rgba(r, g, b, a);\n};\n/* EXPORT */\nexport default mix;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport mix from './mix.js';\n/* MAIN */\nconst invert = (color, weight = 100) => {\n const inverse = Color.parse(color);\n inverse.r = 255 - inverse.r;\n inverse.g = 255 - inverse.g;\n inverse.b = 255 - inverse.b;\n return mix(inverse, color, weight);\n};\n/* EXPORT */\nexport default invert;\n", "const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n} = Object;\n\nlet { freeze, seal, create } = Object; // eslint-disable-line import/no-mutable-exports\nlet { apply, construct } = typeof Reflect !== 'undefined' && Reflect;\n\nif (!freeze) {\n freeze = function (x: T): T {\n return x;\n };\n}\n\nif (!seal) {\n seal = function (x: T): T {\n return x;\n };\n}\n\nif (!apply) {\n apply = function (\n func: (thisArg: any, ...args: any[]) => T,\n thisArg: any,\n ...args: any[]\n ): T {\n return func.apply(thisArg, args);\n };\n}\n\nif (!construct) {\n construct = function (Func: new (...args: any[]) => T, ...args: any[]): T {\n return new Func(...args);\n };\n}\n\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayIndexOf = unapply(Array.prototype.indexOf);\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySlice = unapply(Array.prototype.slice);\nconst arraySplice = unapply(Array.prototype.splice);\nconst arrayIsArray = Array.isArray;\n\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\n\nconst numberToString = unapply(Number.prototype.toString);\nconst booleanToString = unapply(Boolean.prototype.toString);\nconst bigintToString =\n typeof BigInt === 'undefined' ? null : unapply(BigInt.prototype.toString);\nconst symbolToString =\n typeof Symbol === 'undefined' ? null : unapply(Symbol.prototype.toString);\n\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\nconst objectToString = unapply(Object.prototype.toString);\n\nconst regExpTest = unapply(RegExp.prototype.test);\n\nconst typeErrorCreate = unconstruct(TypeError);\n\n/**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param func - The function to be wrapped and called.\n * @returns A new function that calls the given function with a specified thisArg and arguments.\n */\nfunction unapply(\n func: (thisArg: any, ...args: any[]) => T\n): (thisArg: any, ...args: any[]) => T {\n return (thisArg: any, ...args: any[]): T => {\n if (thisArg instanceof RegExp) {\n thisArg.lastIndex = 0;\n }\n\n return apply(func, thisArg, args);\n };\n}\n\n/**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param func - The constructor function to be wrapped and called.\n * @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n */\nfunction unconstruct(\n Func: new (...args: any[]) => T\n): (...args: any[]) => T {\n return (...args: any[]): T => construct(Func, args);\n}\n\n/**\n * Add properties to a lookup table\n *\n * @param set - The set to which elements will be added.\n * @param array - The array containing elements to be added to the set.\n * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns The modified set with added elements.\n */\nfunction addToSet(\n set: Record,\n array: readonly unknown[],\n transformCaseFunc: ReturnType> = stringToLowerCase\n): Record {\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n if (!arrayIsArray(array)) {\n return set;\n }\n\n let l = array.length;\n while (l--) {\n let element = array[l];\n\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n (array as unknown[])[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element as string] = true;\n }\n\n return set;\n}\n\n/**\n * Clean up an array to harden against CSPP\n *\n * @param array - The array to be cleaned.\n * @returns The cleaned version of the array\n */\nfunction cleanArray(array: T[]): Array {\n for (let index = 0; index < array.length; index++) {\n const isPropertyExist = objectHasOwnProperty(array, index);\n\n if (!isPropertyExist) {\n array[index] = null;\n }\n }\n\n return array;\n}\n\n/**\n * Shallow clone an object\n *\n * @param object - The object to be cloned.\n * @returns A new object that copies the original.\n */\nfunction clone>(object: T): T {\n const newObject = create(null);\n\n for (const [property, value] of entries(object)) {\n const isPropertyExist = objectHasOwnProperty(object, property);\n\n if (isPropertyExist) {\n if (arrayIsArray(value)) {\n newObject[property] = cleanArray(value);\n } else if (\n value &&\n typeof value === 'object' &&\n value.constructor === Object\n ) {\n newObject[property] = clone(value);\n } else {\n newObject[property] = value;\n }\n }\n }\n\n return newObject;\n}\n\n/**\n * Convert non-node values into strings without depending on direct property access.\n *\n * @param value - The value to stringify.\n * @returns A string representation of the provided value.\n */\nfunction stringifyValue(value: unknown): string {\n switch (typeof value) {\n case 'string': {\n return value;\n }\n\n case 'number': {\n return numberToString(value);\n }\n\n case 'boolean': {\n return booleanToString(value);\n }\n\n case 'bigint': {\n return bigintToString ? bigintToString(value) : '0';\n }\n\n case 'symbol': {\n return symbolToString ? symbolToString(value) : 'Symbol()';\n }\n\n case 'undefined': {\n return objectToString(value);\n }\n\n case 'function':\n case 'object': {\n if (value === null) {\n return objectToString(value);\n }\n\n const valueAsRecord = value as Record;\n const valueToString = lookupGetter(valueAsRecord, 'toString');\n\n if (typeof valueToString === 'function') {\n const stringified = valueToString(valueAsRecord);\n\n return typeof stringified === 'string'\n ? stringified\n : objectToString(stringified);\n }\n\n return objectToString(value);\n }\n\n default: {\n return objectToString(value);\n }\n }\n}\n\n/**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param object - The object to look up the getter function in its prototype chain.\n * @param prop - The property name for which to find the getter function.\n * @returns The getter function found in the prototype chain or a fallback function.\n */\nfunction lookupGetter>(\n object: T,\n prop: string\n): ReturnType> | (() => null) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(): null {\n return null;\n }\n\n return fallbackValue;\n}\n\nfunction isRegex(value: unknown): value is RegExp {\n try {\n regExpTest(value as RegExp, '');\n return true;\n } catch {\n return false;\n }\n}\n\nexport {\n // Array\n arrayForEach,\n arrayIndexOf,\n arrayIsArray,\n arrayLastIndexOf,\n arrayPop,\n arrayPush,\n arraySlice,\n arraySplice,\n // Object\n entries,\n freeze,\n getPrototypeOf,\n getOwnPropertyDescriptor,\n isFrozen,\n setPrototypeOf,\n seal,\n clone,\n create,\n objectHasOwnProperty,\n objectToString,\n // RegExp\n regExpTest,\n isRegex,\n // String\n stringIndexOf,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringTrim,\n // Other conversion\n stringifyValue,\n // Errors\n typeErrorCreate,\n // Other\n lookupGetter,\n addToSet,\n // Reflect\n unapply,\n unconstruct,\n};\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'a',\n 'abbr',\n 'acronym',\n 'address',\n 'area',\n 'article',\n 'aside',\n 'audio',\n 'b',\n 'bdi',\n 'bdo',\n 'big',\n 'blink',\n 'blockquote',\n 'body',\n 'br',\n 'button',\n 'canvas',\n 'caption',\n 'center',\n 'cite',\n 'code',\n 'col',\n 'colgroup',\n 'content',\n 'data',\n 'datalist',\n 'dd',\n 'decorator',\n 'del',\n 'details',\n 'dfn',\n 'dialog',\n 'dir',\n 'div',\n 'dl',\n 'dt',\n 'element',\n 'em',\n 'fieldset',\n 'figcaption',\n 'figure',\n 'font',\n 'footer',\n 'form',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'head',\n 'header',\n 'hgroup',\n 'hr',\n 'html',\n 'i',\n 'img',\n 'input',\n 'ins',\n 'kbd',\n 'label',\n 'legend',\n 'li',\n 'main',\n 'map',\n 'mark',\n 'marquee',\n 'menu',\n 'menuitem',\n 'meter',\n 'nav',\n 'nobr',\n 'ol',\n 'optgroup',\n 'option',\n 'output',\n 'p',\n 'picture',\n 'pre',\n 'progress',\n 'q',\n 'rp',\n 'rt',\n 'ruby',\n 's',\n 'samp',\n 'search',\n 'section',\n 'select',\n 'shadow',\n 'slot',\n 'small',\n 'source',\n 'spacer',\n 'span',\n 'strike',\n 'strong',\n 'style',\n 'sub',\n 'summary',\n 'sup',\n 'table',\n 'tbody',\n 'td',\n 'template',\n 'textarea',\n 'tfoot',\n 'th',\n 'thead',\n 'time',\n 'tr',\n 'track',\n 'tt',\n 'u',\n 'ul',\n 'var',\n 'video',\n 'wbr',\n] as const);\n\nexport const svg = freeze([\n 'svg',\n 'a',\n 'altglyph',\n 'altglyphdef',\n 'altglyphitem',\n 'animatecolor',\n 'animatemotion',\n 'animatetransform',\n 'circle',\n 'clippath',\n 'defs',\n 'desc',\n 'ellipse',\n 'enterkeyhint',\n 'exportparts',\n 'filter',\n 'font',\n 'g',\n 'glyph',\n 'glyphref',\n 'hkern',\n 'image',\n 'inputmode',\n 'line',\n 'lineargradient',\n 'marker',\n 'mask',\n 'metadata',\n 'mpath',\n 'part',\n 'path',\n 'pattern',\n 'polygon',\n 'polyline',\n 'radialgradient',\n 'rect',\n 'stop',\n 'style',\n 'switch',\n 'symbol',\n 'text',\n 'textpath',\n 'title',\n 'tref',\n 'tspan',\n 'view',\n 'vkern',\n] as const);\n\nexport const svgFilters = freeze([\n 'feBlend',\n 'feColorMatrix',\n 'feComponentTransfer',\n 'feComposite',\n 'feConvolveMatrix',\n 'feDiffuseLighting',\n 'feDisplacementMap',\n 'feDistantLight',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feImage',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'fePointLight',\n 'feSpecularLighting',\n 'feSpotLight',\n 'feTile',\n 'feTurbulence',\n] as const);\n\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nexport const svgDisallowed = freeze([\n 'animate',\n 'color-profile',\n 'cursor',\n 'discard',\n 'font-face',\n 'font-face-format',\n 'font-face-name',\n 'font-face-src',\n 'font-face-uri',\n 'foreignobject',\n 'hatch',\n 'hatchpath',\n 'mesh',\n 'meshgradient',\n 'meshpatch',\n 'meshrow',\n 'missing-glyph',\n 'script',\n 'set',\n 'solidcolor',\n 'unknown',\n 'use',\n] as const);\n\nexport const mathMl = freeze([\n 'math',\n 'menclose',\n 'merror',\n 'mfenced',\n 'mfrac',\n 'mglyph',\n 'mi',\n 'mlabeledtr',\n 'mmultiscripts',\n 'mn',\n 'mo',\n 'mover',\n 'mpadded',\n 'mphantom',\n 'mroot',\n 'mrow',\n 'ms',\n 'mspace',\n 'msqrt',\n 'mstyle',\n 'msub',\n 'msup',\n 'msubsup',\n 'mtable',\n 'mtd',\n 'mtext',\n 'mtr',\n 'munder',\n 'munderover',\n 'mprescripts',\n] as const);\n\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nexport const mathMlDisallowed = freeze([\n 'maction',\n 'maligngroup',\n 'malignmark',\n 'mlongdiv',\n 'mscarries',\n 'mscarry',\n 'msgroup',\n 'mstack',\n 'msline',\n 'msrow',\n 'semantics',\n 'annotation',\n 'annotation-xml',\n 'mprescripts',\n 'none',\n] as const);\n\nexport const text = freeze(['#text'] as const);\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n 'accept',\n 'action',\n 'align',\n 'alt',\n 'autocapitalize',\n 'autocomplete',\n 'autopictureinpicture',\n 'autoplay',\n 'background',\n 'bgcolor',\n 'border',\n 'capture',\n 'cellpadding',\n 'cellspacing',\n 'checked',\n 'cite',\n 'class',\n 'clear',\n 'color',\n 'cols',\n 'colspan',\n 'command',\n 'commandfor',\n 'controls',\n 'controlslist',\n 'coords',\n 'crossorigin',\n 'datetime',\n 'decoding',\n 'default',\n 'dir',\n 'disabled',\n 'disablepictureinpicture',\n 'disableremoteplayback',\n 'download',\n 'draggable',\n 'enctype',\n 'enterkeyhint',\n 'exportparts',\n 'face',\n 'for',\n 'headers',\n 'height',\n 'hidden',\n 'high',\n 'href',\n 'hreflang',\n 'id',\n 'inert',\n 'inputmode',\n 'integrity',\n 'ismap',\n 'kind',\n 'label',\n 'lang',\n 'list',\n 'loading',\n 'loop',\n 'low',\n 'max',\n 'maxlength',\n 'media',\n 'method',\n 'min',\n 'minlength',\n 'multiple',\n 'muted',\n 'name',\n 'nonce',\n 'noshade',\n 'novalidate',\n 'nowrap',\n 'open',\n 'optimum',\n 'part',\n 'pattern',\n 'placeholder',\n 'playsinline',\n 'popover',\n 'popovertarget',\n 'popovertargetaction',\n 'poster',\n 'preload',\n 'pubdate',\n 'radiogroup',\n 'readonly',\n 'rel',\n 'required',\n 'rev',\n 'reversed',\n 'role',\n 'rows',\n 'rowspan',\n 'spellcheck',\n 'scope',\n 'selected',\n 'shape',\n 'size',\n 'sizes',\n 'slot',\n 'span',\n 'srclang',\n 'start',\n 'src',\n 'srcset',\n 'step',\n 'style',\n 'summary',\n 'tabindex',\n 'title',\n 'translate',\n 'type',\n 'usemap',\n 'valign',\n 'value',\n 'width',\n 'wrap',\n 'xmlns',\n] as const);\n\nexport const svg = freeze([\n 'accent-height',\n 'accumulate',\n 'additive',\n 'alignment-baseline',\n 'amplitude',\n 'ascent',\n 'attributename',\n 'attributetype',\n 'azimuth',\n 'basefrequency',\n 'baseline-shift',\n 'begin',\n 'bias',\n 'by',\n 'class',\n 'clip',\n 'clippathunits',\n 'clip-path',\n 'clip-rule',\n 'color',\n 'color-interpolation',\n 'color-interpolation-filters',\n 'color-profile',\n 'color-rendering',\n 'cx',\n 'cy',\n 'd',\n 'dx',\n 'dy',\n 'diffuseconstant',\n 'direction',\n 'display',\n 'divisor',\n 'dominant-baseline',\n 'dur',\n 'edgemode',\n 'elevation',\n 'end',\n 'exponent',\n 'fill',\n 'fill-opacity',\n 'fill-rule',\n 'filter',\n 'filterunits',\n 'flood-color',\n 'flood-opacity',\n 'font-family',\n 'font-size',\n 'font-size-adjust',\n 'font-stretch',\n 'font-style',\n 'font-variant',\n 'font-weight',\n 'fx',\n 'fy',\n 'g1',\n 'g2',\n 'glyph-name',\n 'glyphref',\n 'gradientunits',\n 'gradienttransform',\n 'height',\n 'href',\n 'id',\n 'image-rendering',\n 'in',\n 'in2',\n 'intercept',\n 'k',\n 'k1',\n 'k2',\n 'k3',\n 'k4',\n 'kerning',\n 'keypoints',\n 'keysplines',\n 'keytimes',\n 'lang',\n 'lengthadjust',\n 'letter-spacing',\n 'kernelmatrix',\n 'kernelunitlength',\n 'lighting-color',\n 'local',\n 'marker-end',\n 'marker-mid',\n 'marker-start',\n 'markerheight',\n 'markerunits',\n 'markerwidth',\n 'maskcontentunits',\n 'maskunits',\n 'max',\n 'mask',\n 'mask-type',\n 'media',\n 'method',\n 'mode',\n 'min',\n 'name',\n 'numoctaves',\n 'offset',\n 'operator',\n 'opacity',\n 'order',\n 'orient',\n 'orientation',\n 'origin',\n 'overflow',\n 'paint-order',\n 'path',\n 'pathlength',\n 'patterncontentunits',\n 'patterntransform',\n 'patternunits',\n 'points',\n 'preservealpha',\n 'preserveaspectratio',\n 'primitiveunits',\n 'r',\n 'rx',\n 'ry',\n 'radius',\n 'refx',\n 'refy',\n 'repeatcount',\n 'repeatdur',\n 'restart',\n 'result',\n 'rotate',\n 'scale',\n 'seed',\n 'shape-rendering',\n 'slope',\n 'specularconstant',\n 'specularexponent',\n 'spreadmethod',\n 'startoffset',\n 'stddeviation',\n 'stitchtiles',\n 'stop-color',\n 'stop-opacity',\n 'stroke-dasharray',\n 'stroke-dashoffset',\n 'stroke-linecap',\n 'stroke-linejoin',\n 'stroke-miterlimit',\n 'stroke-opacity',\n 'stroke',\n 'stroke-width',\n 'style',\n 'surfacescale',\n 'systemlanguage',\n 'tabindex',\n 'tablevalues',\n 'targetx',\n 'targety',\n 'transform',\n 'transform-origin',\n 'text-anchor',\n 'text-decoration',\n 'text-orientation',\n 'text-rendering',\n 'textlength',\n 'type',\n 'u1',\n 'u2',\n 'unicode',\n 'values',\n 'viewbox',\n 'visibility',\n 'version',\n 'vert-adv-y',\n 'vert-origin-x',\n 'vert-origin-y',\n 'width',\n 'word-spacing',\n 'wrap',\n 'writing-mode',\n 'xchannelselector',\n 'ychannelselector',\n 'x',\n 'x1',\n 'x2',\n 'xmlns',\n 'y',\n 'y1',\n 'y2',\n 'z',\n 'zoomandpan',\n] as const);\n\nexport const mathMl = freeze([\n 'accent',\n 'accentunder',\n 'align',\n 'bevelled',\n 'close',\n 'columnalign',\n 'columnlines',\n 'columnspacing',\n 'columnspan',\n 'denomalign',\n 'depth',\n 'dir',\n 'display',\n 'displaystyle',\n 'encoding',\n 'fence',\n 'frame',\n 'height',\n 'href',\n 'id',\n 'largeop',\n 'length',\n 'linethickness',\n 'lquote',\n 'lspace',\n 'mathbackground',\n 'mathcolor',\n 'mathsize',\n 'mathvariant',\n 'maxsize',\n 'minsize',\n 'movablelimits',\n 'notation',\n 'numalign',\n 'open',\n 'rowalign',\n 'rowlines',\n 'rowspacing',\n 'rowspan',\n 'rspace',\n 'rquote',\n 'scriptlevel',\n 'scriptminsize',\n 'scriptsizemultiplier',\n 'selection',\n 'separator',\n 'separators',\n 'stretchy',\n 'subscriptshift',\n 'supscriptshift',\n 'symmetric',\n 'voffset',\n 'width',\n 'xmlns',\n]);\n\nexport const xml = freeze([\n 'xlink:href',\n 'xml:id',\n 'xlink:title',\n 'xml:space',\n 'xmlns:xlink',\n] as const);\n", "import { seal } from './utils.js';\n\nexport const MUSTACHE_EXPR = seal(/{{[\\w\\W]*|^[\\w\\W]*}}/g);\nexport const ERB_EXPR = seal(/<%[\\w\\W]*|^[\\w\\W]*%>/g);\nexport const TMPLIT_EXPR = seal(/\\${[\\w\\W]*/g);\nexport const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/); // eslint-disable-line no-useless-escape\nexport const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nexport const IS_ALLOWED_URI = seal(\n /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nexport const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nexport const ATTR_WHITESPACE = seal(\n /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nexport const DOCTYPE_NAME = seal(/^html$/i);\nexport const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n\n// Markup-significant character probes used by _sanitizeElements.\n// Shared module-level instances are safe despite the sticky /g flags:\n// unapply() resets lastIndex for RegExp receivers before every call.\nexport const ELEMENT_MARKUP_PROBE = seal(/<[/\\w!]/g);\nexport const COMMENT_MARKUP_PROBE = seal(/<[/\\w]/g);\nexport const FALLBACK_TAG_CLOSE = seal(/<\\/no(script|embed|frames)/i);\nexport const SELF_CLOSING_TAG = seal(/\\/>/i);\n", "import type { Config, UseProfilesConfig } from './config';\nimport type { DOMPurify, HooksMap, HookFunction, WindowLike } from './types';\nimport * as TAGS from './tags.js';\nimport * as ATTRS from './attrs.js';\nimport * as EXPRESSIONS from './regexp.js';\nimport {\n addToSet,\n clone,\n entries,\n freeze,\n seal,\n arrayForEach,\n arrayIsArray,\n arrayLastIndexOf,\n arrayPop,\n arrayPush,\n arraySplice,\n stringMatch,\n stringReplace,\n stringToLowerCase,\n stringToString,\n stringIndexOf,\n stringTrim,\n regExpTest,\n isRegex,\n typeErrorCreate,\n lookupGetter,\n create,\n objectHasOwnProperty,\n stringifyValue,\n} from './utils.js';\n\nexport type { Config } from './config';\n\nexport type {\n DOMPurify,\n RemovedElement,\n RemovedAttribute,\n HookName,\n NodeHook,\n ElementHook,\n DocumentFragmentHook,\n UponSanitizeElementHook,\n UponSanitizeAttributeHook,\n UponSanitizeElementHookEvent,\n UponSanitizeAttributeHookEvent,\n WindowLike,\n} from './types';\n\ndeclare const VERSION: string;\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\nconst NODE_TYPE = {\n element: 1,\n attribute: 2,\n text: 3,\n cdataSection: 4,\n entityReference: 5, // Deprecated\n entityNode: 6, // Deprecated\n processingInstruction: 7,\n comment: 8,\n document: 9,\n documentType: 10,\n documentFragment: 11,\n notation: 12, // Deprecated\n};\n\nconst getGlobal = function (): WindowLike {\n return typeof window === 'undefined' ? null : window;\n};\n\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param trustedTypes The policy factory.\n * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\nconst _createTrustedTypesPolicy = function (\n trustedTypes: TrustedTypePolicyFactory,\n purifyHostElement: HTMLScriptElement\n) {\n if (\n typeof trustedTypes !== 'object' ||\n typeof trustedTypes.createPolicy !== 'function'\n ) {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n createScriptURL(scriptUrl) {\n return scriptUrl;\n },\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn(\n 'TrustedTypes policy ' + policyName + ' could not be created.'\n );\n return null;\n }\n};\n\nconst _createHooksMap = function (): HooksMap {\n return {\n afterSanitizeAttributes: [],\n afterSanitizeElements: [],\n afterSanitizeShadowDOM: [],\n beforeSanitizeAttributes: [],\n beforeSanitizeElements: [],\n beforeSanitizeShadowDOM: [],\n uponSanitizeAttribute: [],\n uponSanitizeElement: [],\n uponSanitizeShadowNode: [],\n };\n};\n\n/**\n * Resolve a set-valued configuration option: a fresh set built from\n * cfg[key] when it is an own array property (seeded with a clone of\n * options.base when given, case-normalized via options.transform),\n * the fallback set otherwise.\n *\n * @param cfg the cloned, prototype-free configuration object\n * @param key the configuration property to read\n * @param fallback the set to use when the option is absent or not an array\n * @param options transform and optional base set to merge into\n * @returns the resolved set\n */\nconst _resolveSetOption = function (\n cfg: Config,\n key: keyof Config,\n fallback: Record,\n options: {\n transform: Parameters[2];\n base?: Record;\n }\n): Record {\n return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key])\n ? addToSet(\n options.base ? clone(options.base) : {},\n cfg[key] as readonly unknown[],\n options.transform\n )\n : fallback;\n};\n\nfunction createDOMPurify(window: WindowLike = getGlobal()): DOMPurify {\n const DOMPurify: DOMPurify = (root: WindowLike) => createDOMPurify(root);\n\n DOMPurify.version = VERSION;\n\n DOMPurify.removed = [];\n\n if (\n !window ||\n !window.document ||\n window.document.nodeType !== NODE_TYPE.document ||\n !window.Element\n ) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n\n return DOMPurify;\n }\n\n let { document } = window;\n\n const originalDocument = document;\n const currentScript: HTMLScriptElement =\n originalDocument.currentScript as HTMLScriptElement;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || (window as any).MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes,\n } = window;\n\n const ElementPrototype = Element.prototype;\n\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const remove = lookupGetter(ElementPrototype, 'remove');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n const getShadowRoot = lookupGetter(ElementPrototype, 'shadowRoot');\n const getAttributes = lookupGetter(ElementPrototype, 'attributes');\n const getNodeType =\n Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeType') : null;\n const getNodeName =\n Node && Node.prototype ? lookupGetter(Node.prototype, 'nodeName') : null;\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n let trustedTypesPolicy;\n let emptyHTML = '';\n\n // The instance's own internal Trusted Types policy. Unlike a caller-supplied\n // `TRUSTED_TYPES_POLICY`, this is created at most once \u2014 Trusted Types throws\n // on duplicate policy names \u2014 and is the only policy allowed to persist\n // across configurations and survive `clearConfig()`.\n let defaultTrustedTypesPolicy;\n let defaultTrustedTypesPolicyResolved = false;\n\n // Tracks whether we are already inside a call to the configured Trusted Types\n // policy (`createHTML` or `createScriptURL`). If a supplied policy callback\n // itself calls `DOMPurify.sanitize` (the cause of #1422), `sanitize` would\n // re-enter the policy and recurse until the stack overflows. We detect that\n // re-entry and throw a clear, actionable error instead. The guard is shared\n // across both callbacks, because either one re-entering `sanitize` triggers\n // the same unbounded recursion.\n let IN_TRUSTED_TYPES_POLICY = 0;\n const _assertNotInTrustedTypesPolicy = function (): void {\n if (IN_TRUSTED_TYPES_POLICY > 0) {\n throw typeErrorCreate(\n 'A configured TRUSTED_TYPES_POLICY callback (createHTML or ' +\n 'createScriptURL) must not call DOMPurify.sanitize, as that causes ' +\n 'infinite recursion. Do not pass a policy whose callbacks wrap ' +\n 'DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted ' +\n 'Types\" section of the README.'\n );\n }\n };\n\n const _createTrustedHTML = function (html: string): string {\n _assertNotInTrustedTypesPolicy();\n\n IN_TRUSTED_TYPES_POLICY++;\n try {\n return trustedTypesPolicy.createHTML(html);\n } finally {\n IN_TRUSTED_TYPES_POLICY--;\n }\n };\n\n const _createTrustedScriptURL = function (scriptUrl: string): string {\n _assertNotInTrustedTypesPolicy();\n\n IN_TRUSTED_TYPES_POLICY++;\n try {\n return trustedTypesPolicy.createScriptURL(scriptUrl);\n } finally {\n IN_TRUSTED_TYPES_POLICY--;\n }\n };\n\n // Lazily resolve (and cache) the instance's internal default policy.\n // Resolution is attempted at most once: a successful `createPolicy` cannot be\n // repeated (Trusted Types throws on duplicate names), and a failed or\n // unsupported attempt must not be retried on every parse.\n const _getDefaultTrustedTypesPolicy = function () {\n if (!defaultTrustedTypesPolicyResolved) {\n defaultTrustedTypesPolicy = _createTrustedTypesPolicy(\n trustedTypes,\n currentScript\n );\n defaultTrustedTypesPolicyResolved = true;\n }\n\n return defaultTrustedTypesPolicy;\n };\n\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName,\n } = document;\n const { importNode } = originalDocument;\n\n let hooks = _createHooksMap();\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported =\n typeof entries === 'function' &&\n typeof getParentNode === 'function' &&\n implementation &&\n implementation.createHTMLDocument !== undefined;\n\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE,\n CUSTOM_ELEMENT,\n } = EXPRESSIONS;\n\n let { IS_ALLOWED_URI } = EXPRESSIONS;\n\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [\n ...TAGS.html,\n ...TAGS.svg,\n ...TAGS.svgFilters,\n ...TAGS.mathMl,\n ...TAGS.text,\n ]);\n\n /* Allowed attribute names */\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [\n ...ATTRS.html,\n ...ATTRS.svg,\n ...ATTRS.mathMl,\n ...ATTRS.xml,\n ]);\n\n /*\n * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n let CUSTOM_ELEMENT_HANDLING = Object.seal(\n create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false,\n },\n })\n );\n\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n let FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n let FORBID_ATTR = null;\n\n /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */\n const EXTRA_ELEMENT_HANDLING = Object.seal(\n create(null, {\n tagCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n attributeCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null,\n },\n })\n );\n\n /* Decide if ARIA attributes are okay */\n let ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n let ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n let SAFE_FOR_TEMPLATES = false;\n\n /* Output should be safe even for XML used within HTML and alike.\n * This means, DOMPurify removes comments when containing risky content.\n */\n let SAFE_FOR_XML = true;\n\n /* Decide if document with ... should be returned */\n let WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n let SET_CONFIG = false;\n\n /* Pristine allowlist bindings captured at setConfig() time. On the\n * persistent-config path sanitize() restores the sets from these before\n * the per-walk hook clone-guard, so a hook's in-call widening cannot\n * carry across calls. Null until setConfig() is called; reset by\n * clearConfig(). */\n let SET_CONFIG_ALLOWED_TAGS = null;\n let SET_CONFIG_ALLOWED_ATTR = null;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n let FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n let RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n let RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n let RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n let SANITIZE_DOM = true;\n\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (\u00A77.3.3)\n * - DOM Tree Accessors (\u00A73.1.5)\n * - Form Element Parent-Child Relations (\u00A74.10.3)\n * - Iframe srcdoc / Nested WindowProxies (\u00A74.8.5)\n * - HTMLCollection (\u00A74.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n /* Keep element content when removing element? */\n let KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n let IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n let USE_PROFILES: UseProfilesConfig | false = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, [\n 'annotation-xml',\n 'audio',\n 'colgroup',\n 'desc',\n 'foreignobject',\n 'head',\n 'iframe',\n 'math',\n 'mi',\n 'mn',\n 'mo',\n 'ms',\n 'mtext',\n 'noembed',\n 'noframes',\n 'noscript',\n 'plaintext',\n 'script',\n // mirrors the selected