@marimo-team/frontend 0.14.11-dev50 → 0.14.11-dev7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-CUoL500U.js → ConnectedDataExplorerComponent-C0P31a5y.js} +3 -3
  2. package/dist/assets/{ImageComparisonComponent-DDHwIJ8Q.js → ImageComparisonComponent-DXDeGx2f.js} +1 -1
  3. package/dist/assets/{VegaLite-Czmx_ECO.js → VegaLite-CUqFyetE.js} +1 -1
  4. package/dist/assets/_baseEach-BHb51vC7.js +1 -0
  5. package/dist/assets/_baseMap--rH4lBFQ.js +1 -0
  6. package/dist/assets/_baseUniq-CABXtSlj.js +1 -0
  7. package/dist/assets/{_createAggregator-CcihYROi.js → _createAggregator-SoA2y5HH.js} +1 -1
  8. package/dist/assets/{any-language-editor-bqVsHwiH.js → any-language-editor-Bw2cdBsS.js} +1 -1
  9. package/dist/assets/architectureDiagram-IEHRJDOE-rGoAHYH8.js +36 -0
  10. package/dist/assets/blockDiagram-JOT3LUYC-ZBJWq8Z_.js +121 -0
  11. package/dist/assets/{c4Diagram-6F6E4RAY-m6sAlCzp.js → c4Diagram-VJAJSXHY-BHtN7uMz.js} +2 -2
  12. package/dist/assets/channel-C96bdTqW.js +1 -0
  13. package/dist/assets/{chunk-353BL4L5-CnAx5AF0.js → chunk-4BMEZGHF-BO5DiwLV.js} +1 -1
  14. package/dist/assets/{chunk-QEP2MXWD-BxExN6Lp.js → chunk-A2AXSNBT-B07L-F60.js} +3 -4
  15. package/dist/assets/chunk-AEK57VVT-DN2-tsCz.js +220 -0
  16. package/dist/assets/{chunk-67H74DCK-Cto_4Bir.js → chunk-D6G4REZN-CbYGlbyQ.js} +1 -1
  17. package/dist/assets/chunk-RZ5BOZE2-DVex9AD8.js +1 -0
  18. package/dist/assets/{chunk-AACKK3MU-B_HaHcJu.js → chunk-XZIHB7SX-COKmet6t.js} +1 -1
  19. package/dist/assets/{circle-play-8nMu2iYy.js → circle-play-DSXPiHO0.js} +2 -2
  20. package/dist/assets/classDiagram-GIVACNV2-CehC5H1T.js +1 -0
  21. package/dist/assets/classDiagram-v2-COTLJTTW-CehC5H1T.js +1 -0
  22. package/dist/assets/clone-H0gxlZXI.js +1 -0
  23. package/dist/assets/compile-DEz1Y6_F.js +10 -0
  24. package/dist/assets/dagre-OKDRZEBW-CymbL2JX.js +4 -0
  25. package/dist/assets/{data-editor-BeWagiEI.js → data-editor-CTGVBJdC.js} +22 -22
  26. package/dist/assets/diagram-SSKATNLV-DY5vs_Bj.js +43 -0
  27. package/dist/assets/diagram-VNBRO52H-ZuQiOKh8.js +24 -0
  28. package/dist/assets/edit-page-DcQ6ZhfW.js +144 -0
  29. package/dist/assets/{erDiagram-R3QVA2FD-3xyAvrIh.js → erDiagram-Q7BY3M3F-l-V_9Yws.js} +1 -1
  30. package/dist/assets/flowDiagram-4HSFHLVR-BsHIJJTe.js +161 -0
  31. package/dist/assets/ganttDiagram-APWFNJXF-2gy5YbWU.js +257 -0
  32. package/dist/assets/gitGraphDiagram-7IBYFJ6S-B_ELHLbw.js +65 -0
  33. package/dist/assets/{graph-C4PkZZxf.js → graph-DpLAfWzk.js} +1 -1
  34. package/dist/assets/home-page-6auHzaGk.js +9 -0
  35. package/dist/assets/index-8IZtaDUn.css +1 -0
  36. package/dist/assets/index-B-mClP__.js +1 -0
  37. package/dist/assets/{index-DjJ-bG6v.js → index-BuqjbKw0.js} +1 -1
  38. package/dist/assets/{index-B-zQMBKJ.js → index-Bz3Lb65G.js} +1 -1
  39. package/dist/assets/{index-CKQeO2Lm.js → index-C9EPiaCd.js} +1 -1
  40. package/dist/assets/{index-DjpcQgUn.js → index-C9EbJL5c.js} +1 -1
  41. package/dist/assets/{index--PV_n6OT.js → index-Cig6xGYH.js} +1 -1
  42. package/dist/assets/{index-CEEx86Vd.js → index-CmVTfWOx.js} +1 -1
  43. package/dist/assets/{index-DnxVQzYt.js → index-Cs9jrmWP.js} +1 -1
  44. package/dist/assets/{index-BGwXzM6i.js → index-CxQo8Qlm.js} +1 -1
  45. package/dist/assets/{index-DGXmlIKQ.js → index-Czo055fo.js} +1 -1
  46. package/dist/assets/{index-tWtqwKDR.js → index-DAMc4rP9.js} +1 -1
  47. package/dist/assets/index-DDVWq6NK.js +501 -0
  48. package/dist/assets/{index-CqGB7278.js → index-DP4HiwTU.js} +1 -1
  49. package/dist/assets/{index-CtmLvKwt.js → index-DQwFB8dN.js} +1 -1
  50. package/dist/assets/{index-hzUC1b41.js → index-DZWCSqpf.js} +1 -1
  51. package/dist/assets/{index-Dx9C9kBl.js → index-DbunLlvf.js} +1 -1
  52. package/dist/assets/{index-grhOS4NZ.js → index-FYYNNs_X.js} +1 -1
  53. package/dist/assets/{index-TLD151he.js → index-N67HDT2u.js} +1 -1
  54. package/dist/assets/{index-BU0kTvje.js → index-kmp97oxc.js} +1 -1
  55. package/dist/assets/infoDiagram-PH2N3AL5-BwbaSo89.js +2 -0
  56. package/dist/assets/journeyDiagram-U35MCT3I-NKSvtlZA.js +138 -0
  57. package/dist/assets/{kanban-definition-ILFWEQ3N-CcX8Odhv.js → kanban-definition-NDS4AKOZ-Cw4Vh4wD.js} +8 -9
  58. package/dist/assets/{layout-CMZskpMv.js → layout-DodQLUx6.js} +1 -1
  59. package/dist/assets/linear-B_OPGLLI.js +1 -0
  60. package/dist/assets/loro_wasm_bg-DHBNbovs.wasm +0 -0
  61. package/dist/assets/mermaid-CVRC4Ruz.js +152 -0
  62. package/dist/assets/min-VmgWsmJ_.js +1 -0
  63. package/dist/assets/{mindmap-definition-CZNETY7S-CxqCAn65.js → mindmap-definition-ALO5MXBD-C0KGo_i_.js} +4 -4
  64. package/dist/assets/{pieDiagram-NIOCPIFQ-PRsPDCUf.js → pieDiagram-IB7DONF6-DCnELF9y.js} +1 -1
  65. package/dist/assets/{quadrantDiagram-2OG54O6I-pLLKFYFN.js → quadrantDiagram-7GDLP6J5-D0cP5ixt.js} +1 -1
  66. package/dist/assets/radar-MK3ICKWK-D8LhkSau.js +126 -0
  67. package/dist/assets/{react-plotly-O8CNh3yr.js → react-plotly-BmDAcz3M.js} +1 -1
  68. package/dist/assets/{requirementDiagram-SO3GGRV7-yjxijDDw.js → requirementDiagram-KVF5MWMF-BTksN04O.js} +3 -3
  69. package/dist/assets/run-page-17VQxU3e.js +1 -0
  70. package/dist/assets/{sankeyDiagram-4UZDY2LN-7AVzF911.js → sankeyDiagram-QLVOVGJD-DECOJIMC.js} +1 -1
  71. package/dist/assets/save-worker-DZnx0AG9.js +1 -0
  72. package/dist/assets/sequenceDiagram-X6HHIX6F-C5eDWwoH.js +122 -0
  73. package/dist/assets/shutdown-button-QvkERkPd.js +17 -0
  74. package/dist/assets/slides-component-DchvPU9C.js +1 -0
  75. package/dist/assets/sortBy-7ke7bFD2.js +1 -0
  76. package/dist/assets/stateDiagram-DGXRK772-D6Kwy963.js +1 -0
  77. package/dist/assets/stateDiagram-v2-YXO3MK2T-Bk10XR94.js +1 -0
  78. package/dist/assets/storage-BeNhlsrY.js +27 -0
  79. package/dist/assets/{terminal-Dxa0NUTG.js → terminal-MtCDBvKs.js} +1 -1
  80. package/dist/assets/{time-D69fB1YD.js → time-BoP93jle.js} +1 -1
  81. package/dist/assets/timeline-definition-BDJGKUSR-T1la59d1.js +61 -0
  82. package/dist/assets/tracing-CCltm96L.js +2 -0
  83. package/dist/assets/vega-component-j1BDb2QJ.js +1 -0
  84. package/dist/assets/worker-BbdB3qWL.js +1 -0
  85. package/dist/assets/worker-CnoOKJWk.js +1 -0
  86. package/dist/assets/xychartDiagram-VJFVF3MP-CoJqer7_.js +7 -0
  87. package/dist/index.html +2 -2
  88. package/package.json +42 -42
  89. package/dist/assets/_baseEach-C52A37kN.js +0 -1
  90. package/dist/assets/_baseMap-CErDCA3r.js +0 -1
  91. package/dist/assets/_baseUniq-hliKyzdp.js +0 -1
  92. package/dist/assets/architectureDiagram-NQ2NVSRB-BLiKdlfK.js +0 -36
  93. package/dist/assets/blockDiagram-PHRCVELO-Dj7uU_bm.js +0 -122
  94. package/dist/assets/channel-eH-Wxlwg.js +0 -1
  95. package/dist/assets/chunk-6OLS64BW-CrFJnDjp.js +0 -220
  96. package/dist/assets/chunk-BFAMUDN2-Di38VBDn.js +0 -1
  97. package/dist/assets/chunk-E2GYISFI-CPwLrORh.js +0 -15
  98. package/dist/assets/chunk-SKB7J2MH-CZ1cNiyn.js +0 -1
  99. package/dist/assets/classDiagram-BGRH5UQR-BnjY0hFP.js +0 -1
  100. package/dist/assets/classDiagram-v2-O24JOBDK-BnjY0hFP.js +0 -1
  101. package/dist/assets/clone-BqBqvZp5.js +0 -1
  102. package/dist/assets/compile-BFoHfP_H.js +0 -10
  103. package/dist/assets/dagre-FFZHY6LT-B2xtEGm4.js +0 -4
  104. package/dist/assets/diagram-3EMPZRKU-DSUnwT8T.js +0 -24
  105. package/dist/assets/diagram-5UYTHUR4-BKm2hW4S.js +0 -24
  106. package/dist/assets/diagram-ZTM2IBQH-BQuWD834.js +0 -43
  107. package/dist/assets/edit-page-Dp71Rq_B.js +0 -144
  108. package/dist/assets/flowDiagram-PKI6S5ZS-ZMlsBCaU.js +0 -162
  109. package/dist/assets/ganttDiagram-EK5VF46D-BCKhVKFb.js +0 -267
  110. package/dist/assets/gitGraphDiagram-GW3U2K7C-pHdDh1du.js +0 -65
  111. package/dist/assets/home-page-CmEC47AR.js +0 -9
  112. package/dist/assets/index-BEQfoZiP.js +0 -1
  113. package/dist/assets/index-D2Z1hqrf.js +0 -1
  114. package/dist/assets/index-DDdlzLJw.js +0 -503
  115. package/dist/assets/index-DnCBJYuC.css +0 -1
  116. package/dist/assets/infoDiagram-RLU2ROGC-CQRQmWBF.js +0 -2
  117. package/dist/assets/journeyDiagram-EWQZEKCU-DoTMV7Ld.js +0 -139
  118. package/dist/assets/linear-RD9P-hfS.js +0 -1
  119. package/dist/assets/links-BddFPrre.js +0 -17
  120. package/dist/assets/loro_wasm_bg-bPYKkGLG.wasm +0 -0
  121. package/dist/assets/mermaid-CjHlE8Co.js +0 -152
  122. package/dist/assets/min-DrLXTftx.js +0 -1
  123. package/dist/assets/run-page-CxZg57Ra.js +0 -1
  124. package/dist/assets/save-worker-B8gk1S9x.js +0 -1
  125. package/dist/assets/sequenceDiagram-ZIKVLSP4-CYsC6JlV.js +0 -122
  126. package/dist/assets/slides-component-t8hWAw30.js +0 -1
  127. package/dist/assets/sortBy-6rZ1GeDf.js +0 -1
  128. package/dist/assets/stateDiagram-XX37X6EN-DkOa47Ba.js +0 -1
  129. package/dist/assets/stateDiagram-v2-GD6S3NHB-CtNUX2HF.js +0 -1
  130. package/dist/assets/storage-DFM0grbQ.js +0 -25
  131. package/dist/assets/timeline-definition-RI47OAVP-Cv4RoOGw.js +0 -61
  132. package/dist/assets/tracing-CYcKBnLY.js +0 -2
  133. package/dist/assets/treemap-FKARHQ26-DIAQw-dY.js +0 -126
  134. package/dist/assets/vega-component-CzIbLUf6.js +0 -1
  135. package/dist/assets/worker-BYA2ASe8.js +0 -1
  136. package/dist/assets/worker-Ch6cKXnI.js +0 -1
  137. package/dist/assets/xychartDiagram-H2YORKM3-pYUlM72N.js +0 -7
  138. /package/dist/assets/{links-C1rhMrxo.css → shutdown-button-C1rhMrxo.css} +0 -0
@@ -1 +1 @@
1
- import{aG as D,c as k,j as x}from"./index-DDdlzLJw.js";var T,M,p={},L={},P=function(){if(M)return p;M=1;var E=p&&p.__createBinding||(Object.create?function(d,c,l,t){t===void 0&&(t=l),Object.defineProperty(d,t,{enumerable:!0,get:function(){return c[l]}})}:function(d,c,l,t){t===void 0&&(t=l),d[t]=c[l]}),i=p&&p.__setModuleDefault||(Object.create?function(d,c){Object.defineProperty(d,"default",{enumerable:!0,value:c})}:function(d,c){d.default=c}),y=p&&p.__importStar||function(d){if(d&&d.__esModule)return d;var c={};if(d!=null)for(var l in d)l!=="default"&&Object.prototype.hasOwnProperty.call(d,l)&&E(c,d,l);return i(c,d),c};Object.defineProperty(p,"__esModule",{value:!0}),p.ImgComparisonSlider=void 0;const w=D();return typeof document<"u"&&Promise.resolve().then(()=>y((T||(T=1,(()=>{var d={792:(t,a,r)=>{r.d(a,{Z:()=>v});var n=r(609),u=r.n(n)()(function(f){return f[1]});u.push([t.id,':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}:host(:focus){outline:2px solid -webkit-focus-ring-color}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:" ";display:block;height:100%;border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}',""]);const v=u},609:t=>{t.exports=function(a){var r=[];return r.toString=function(){return this.map(function(n){var u=a(n);return n[2]?"@media ".concat(n[2]," {").concat(u,"}"):u}).join("")},r.i=function(n,u,v){typeof n=="string"&&(n=[[null,n,""]]);var f={};if(v)for(var m=0;m<this.length;m++){var g=this[m][0];g!=null&&(f[g]=!0)}for(var e=0;e<n.length;e++){var s=[].concat(n[e]);v&&f[s[0]]||(u&&(s[2]?s[2]="".concat(u," and ").concat(s[2]):s[2]=u),r.push(s))}},r}}},c={};function l(t){var a=c[t];if(a!==void 0)return a.exports;var r=c[t]={id:t,exports:{}};return d[t](r,r.exports,l),r.exports}l.n=t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return l.d(a,{a}),a},l.d=(t,a)=>{for(var r in a)l.o(a,r)&&!l.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:a[r]})},l.o=(t,a)=>Object.prototype.hasOwnProperty.call(t,a),(()=>{var t=l(792);const a="rendered",r=(e,s)=>{const o=e.getBoundingClientRect();let h,b;return s.type==="mousedown"?(h=s.clientX,b=s.clientY):(h=s.touches[0].clientX,b=s.touches[0].clientY),h>=o.x&&h<=o.x+o.width&&b>=o.y&&b<=o.y+o.height};let n;const u={ArrowLeft:-1,ArrowRight:1},v=["horizontal","vertical"],f=e=>({x:e.touches[0].pageX,y:e.touches[0].pageY}),m=e=>({x:e.pageX,y:e.pageY}),g=typeof window<"u"&&(window==null?void 0:window.HTMLElement);typeof window<"u"&&(window.document&&(n=document.createElement("template"),n.innerHTML='<div class="second" id="second"> <slot name="second"><slot name="before"></slot></slot> </div> <div class="first" id="first"> <div class="first-overlay"> <div class="first-overlay-container" id="firstImageContainer"> <slot name="first"><slot name="after"></slot></slot> </div> </div> <div class="handle-container"> <div class="divider"></div> <div class="handle" id="handle"> <slot name="handle"> <svg xmlns="http://www.w3.org/2000/svg" class="default-handle" viewBox="-8 -3 16 6"> <path d="M -5 -2 L -7 0 L -5 2 M 5 -2 L 7 0 L 5 2" fill="none" vector-effect="non-scaling-stroke"/> </svg> </slot> </div> </div> </div> '),window.customElements.define("img-comparison-slider",class extends g{constructor(){super(),this.exposure=this.hasAttribute("value")?parseFloat(this.getAttribute("value")):50,this.slideOnHover=!1,this.slideDirection="horizontal",this.keyboard="enabled",this.isMouseDown=!1,this.animationDirection=0,this.isFocused=!1,this.dragByHandle=!1,this.onMouseMove=o=>{if(this.isMouseDown||this.slideOnHover){const h=m(o);this.slideToPage(h)}},this.bodyUserSelectStyle="",this.bodyWebkitUserSelectStyle="",this.onMouseDown=o=>{if(this.slideOnHover||this.handle&&!r(this.handleElement,o))return;o.preventDefault(),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.isMouseDown=!0,this.enableTransition();const h=m(o);this.slideToPage(h),this.focus(),this.bodyUserSelectStyle=window.document.body.style.userSelect,this.bodyWebkitUserSelectStyle=window.document.body.style.webkitUserSelect,window.document.body.style.userSelect="none",window.document.body.style.webkitUserSelect="none"},this.onWindowMouseUp=()=>{this.isMouseDown=!1,window.document.body.style.userSelect=this.bodyUserSelectStyle,window.document.body.style.webkitUserSelect=this.bodyWebkitUserSelectStyle,window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp)},this.touchStartPoint=null,this.isTouchComparing=!1,this.hasTouchMoved=!1,this.onTouchStart=o=>{this.dragByHandle&&!r(this.handleElement,o)||(this.touchStartPoint=f(o),this.isFocused&&(this.enableTransition(),this.slideToPage(this.touchStartPoint)))},this.onTouchMove=o=>{if(this.touchStartPoint===null)return;const h=f(o);if(this.isTouchComparing)return this.slideToPage(h),o.preventDefault(),!1;if(!this.hasTouchMoved){const b=Math.abs(h.y-this.touchStartPoint.y),S=Math.abs(h.x-this.touchStartPoint.x);if(this.slideDirection==="horizontal"&&b<S||this.slideDirection==="vertical"&&b>S)return this.isTouchComparing=!0,this.focus(),this.slideToPage(h),o.preventDefault(),!1;this.hasTouchMoved=!0}},this.onTouchEnd=()=>{this.isTouchComparing=!1,this.hasTouchMoved=!1,this.touchStartPoint=null},this.onBlur=()=>{this.stopSlideAnimation(),this.isFocused=!1,this.firstElement.classList.remove("focused")},this.onFocus=()=>{this.isFocused=!0,this.firstElement.classList.add("focused")},this.onKeyDown=o=>{if(this.keyboard==="disabled")return;const h=u[o.key];this.animationDirection!==h&&h!==void 0&&(this.animationDirection=h,this.startSlideAnimation())},this.onKeyUp=o=>{if(this.keyboard==="disabled")return;const h=u[o.key];h!==void 0&&this.animationDirection===h&&this.stopSlideAnimation()},this.resetDimensions=()=>{this.imageWidth=this.offsetWidth,this.imageHeight=this.offsetHeight};const e=this.attachShadow({mode:"open"}),s=document.createElement("style");s.innerHTML=t.Z,this.getAttribute("nonce")&&s.setAttribute("nonce",this.getAttribute("nonce")),e.appendChild(s),e.appendChild(n.content.cloneNode(!0)),this.firstElement=e.getElementById("first"),this.handleElement=e.getElementById("handle")}set handle(e){this.dragByHandle=e.toString().toLowerCase()!=="false"}get handle(){return this.dragByHandle}get value(){return this.exposure}set value(e){const s=parseFloat(e);s!==this.exposure&&(this.exposure=s,this.enableTransition(),this.setExposure())}get hover(){return this.slideOnHover}set hover(e){this.slideOnHover=e.toString().toLowerCase()!=="false",this.removeEventListener("mousemove",this.onMouseMove),this.slideOnHover&&this.addEventListener("mousemove",this.onMouseMove)}get direction(){return this.slideDirection}set direction(e){this.slideDirection=e.toString().toLowerCase(),this.slide(0),this.firstElement.classList.remove(...v),v.includes(this.slideDirection)&&this.firstElement.classList.add(this.slideDirection)}static get observedAttributes(){return["hover","direction"]}connectedCallback(){this.hasAttribute("tabindex")||(this.tabIndex=0),this.addEventListener("dragstart",e=>(e.preventDefault(),!1)),new ResizeObserver(this.resetDimensions).observe(this),this.setExposure(0),this.keyboard=this.hasAttribute("keyboard")&&this.getAttribute("keyboard")==="disabled"?"disabled":"enabled",this.addEventListener("keydown",this.onKeyDown),this.addEventListener("keyup",this.onKeyUp),this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("touchstart",this.onTouchStart,{passive:!0}),this.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.addEventListener("touchend",this.onTouchEnd),this.addEventListener("mousedown",this.onMouseDown),this.handle=this.hasAttribute("handle")?this.getAttribute("handle"):this.dragByHandle,this.hover=this.hasAttribute("hover")?this.getAttribute("hover"):this.slideOnHover,this.direction=this.hasAttribute("direction")?this.getAttribute("direction"):this.slideDirection,this.resetDimensions(),this.classList.contains(a)||this.classList.add(a)}disconnectedCallback(){this.transitionTimer&&window.clearTimeout(this.transitionTimer)}attributeChangedCallback(e,s,o){e==="hover"&&(this.hover=o),e==="direction"&&(this.direction=o),e==="keyboard"&&(this.keyboard=o==="disabled"?"disabled":"enabled")}setExposure(e=0){var s;this.exposure=(s=this.exposure+e)<0?0:s>100?100:s,this.firstElement.style.setProperty("--exposure",100-this.exposure+"%")}slide(e=0){this.setExposure(e);const s=new Event("slide");this.dispatchEvent(s)}slideToPage(e){this.slideDirection==="horizontal"&&this.slideToPageX(e.x),this.slideDirection==="vertical"&&this.slideToPageY(e.y)}slideToPageX(e){const s=e-this.getBoundingClientRect().left-window.scrollX;this.exposure=s/this.imageWidth*100,this.slide(0)}slideToPageY(e){const s=e-this.getBoundingClientRect().top-window.scrollY;this.exposure=s/this.imageHeight*100,this.slide(0)}enableTransition(){this.firstElement.style.setProperty("--transition-time","100ms"),this.transitionTimer=window.setTimeout(()=>{this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)"),this.transitionTimer=null},100)}startSlideAnimation(){let e=null,s=this.animationDirection;this.firstElement.style.setProperty("--transition-time","var(--keyboard-transition-time)");const o=h=>{if(this.animationDirection===0||s!==this.animationDirection)return;e===null&&(e=h);const b=(h-e)/16.666666666666668*this.animationDirection;this.slide(b),setTimeout(()=>window.requestAnimationFrame(o),0),e=h};window.requestAnimationFrame(o)}stopSlideAnimation(){this.animationDirection=0,this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)")}}))})()})()),L))),p.ImgComparisonSlider=(0,w.forwardRef)(({children:d,onSlide:c,value:l,className:t,...a},r)=>{const n=(0,w.useRef)();return(0,w.useEffect)(()=>{l!==void 0&&(n.current.value=parseFloat(l.toString()))},[l,n]),(0,w.useEffect)(()=>{c&&n.current.addEventListener("slide",c)},[]),(0,w.useImperativeHandle)(r,()=>n.current,[n]),(0,w.createElement)("img-comparison-slider",Object.assign({class:t?`${t} rendered`:"rendered",tabIndex:0,ref:n},a),d)}),p}();const A=E=>{const i=k.c(15),{beforeSrc:y,afterSrc:w,value:d,direction:c,width:l,height:t}=E,a=l||"100%",r=t||(c==="vertical"?"400px":"auto");let n;i[0]!==a||i[1]!==r?(n={width:a,height:r,maxWidth:"100%"},i[0]=a,i[1]=r,i[2]=n):n=i[2];const u=n;let v,f,m,g;return i[3]!==y?(v=x.jsx("img",{slot:"first",src:y,alt:"Before",width:"100%"}),i[3]=y,i[4]=v):v=i[4],i[5]!==w?(f=x.jsx("img",{slot:"second",src:w,alt:"After",width:"100%"}),i[5]=w,i[6]=f):f=i[6],i[7]!==c||i[8]!==v||i[9]!==f||i[10]!==d?(m=x.jsxs(P.ImgComparisonSlider,{value:d,direction:c,children:[v,f]}),i[7]=c,i[8]=v,i[9]=f,i[10]=d,i[11]=m):m=i[11],i[12]!==u||i[13]!==m?(g=x.jsx("div",{style:u,children:m}),i[12]=u,i[13]=m,i[14]=g):g=i[14],g};export{A as default};
1
+ import{aF as D,c as k,j as x}from"./index-DDVWq6NK.js";var T,M,p={},L={},P=function(){if(M)return p;M=1;var E=p&&p.__createBinding||(Object.create?function(d,c,l,t){t===void 0&&(t=l),Object.defineProperty(d,t,{enumerable:!0,get:function(){return c[l]}})}:function(d,c,l,t){t===void 0&&(t=l),d[t]=c[l]}),i=p&&p.__setModuleDefault||(Object.create?function(d,c){Object.defineProperty(d,"default",{enumerable:!0,value:c})}:function(d,c){d.default=c}),y=p&&p.__importStar||function(d){if(d&&d.__esModule)return d;var c={};if(d!=null)for(var l in d)l!=="default"&&Object.prototype.hasOwnProperty.call(d,l)&&E(c,d,l);return i(c,d),c};Object.defineProperty(p,"__esModule",{value:!0}),p.ImgComparisonSlider=void 0;const w=D();return typeof document<"u"&&Promise.resolve().then(()=>y((T||(T=1,(()=>{var d={792:(t,a,r)=>{r.d(a,{Z:()=>v});var n=r(609),u=r.n(n)()(function(f){return f[1]});u.push([t.id,':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}:host(:focus){outline:2px solid -webkit-focus-ring-color}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:" ";display:block;height:100%;border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}',""]);const v=u},609:t=>{t.exports=function(a){var r=[];return r.toString=function(){return this.map(function(n){var u=a(n);return n[2]?"@media ".concat(n[2]," {").concat(u,"}"):u}).join("")},r.i=function(n,u,v){typeof n=="string"&&(n=[[null,n,""]]);var f={};if(v)for(var m=0;m<this.length;m++){var g=this[m][0];g!=null&&(f[g]=!0)}for(var e=0;e<n.length;e++){var s=[].concat(n[e]);v&&f[s[0]]||(u&&(s[2]?s[2]="".concat(u," and ").concat(s[2]):s[2]=u),r.push(s))}},r}}},c={};function l(t){var a=c[t];if(a!==void 0)return a.exports;var r=c[t]={id:t,exports:{}};return d[t](r,r.exports,l),r.exports}l.n=t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return l.d(a,{a}),a},l.d=(t,a)=>{for(var r in a)l.o(a,r)&&!l.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:a[r]})},l.o=(t,a)=>Object.prototype.hasOwnProperty.call(t,a),(()=>{var t=l(792);const a="rendered",r=(e,s)=>{const o=e.getBoundingClientRect();let h,b;return s.type==="mousedown"?(h=s.clientX,b=s.clientY):(h=s.touches[0].clientX,b=s.touches[0].clientY),h>=o.x&&h<=o.x+o.width&&b>=o.y&&b<=o.y+o.height};let n;const u={ArrowLeft:-1,ArrowRight:1},v=["horizontal","vertical"],f=e=>({x:e.touches[0].pageX,y:e.touches[0].pageY}),m=e=>({x:e.pageX,y:e.pageY}),g=typeof window<"u"&&(window==null?void 0:window.HTMLElement);typeof window<"u"&&(window.document&&(n=document.createElement("template"),n.innerHTML='<div class="second" id="second"> <slot name="second"><slot name="before"></slot></slot> </div> <div class="first" id="first"> <div class="first-overlay"> <div class="first-overlay-container" id="firstImageContainer"> <slot name="first"><slot name="after"></slot></slot> </div> </div> <div class="handle-container"> <div class="divider"></div> <div class="handle" id="handle"> <slot name="handle"> <svg xmlns="http://www.w3.org/2000/svg" class="default-handle" viewBox="-8 -3 16 6"> <path d="M -5 -2 L -7 0 L -5 2 M 5 -2 L 7 0 L 5 2" fill="none" vector-effect="non-scaling-stroke"/> </svg> </slot> </div> </div> </div> '),window.customElements.define("img-comparison-slider",class extends g{constructor(){super(),this.exposure=this.hasAttribute("value")?parseFloat(this.getAttribute("value")):50,this.slideOnHover=!1,this.slideDirection="horizontal",this.keyboard="enabled",this.isMouseDown=!1,this.animationDirection=0,this.isFocused=!1,this.dragByHandle=!1,this.onMouseMove=o=>{if(this.isMouseDown||this.slideOnHover){const h=m(o);this.slideToPage(h)}},this.bodyUserSelectStyle="",this.bodyWebkitUserSelectStyle="",this.onMouseDown=o=>{if(this.slideOnHover||this.handle&&!r(this.handleElement,o))return;o.preventDefault(),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onWindowMouseUp),this.isMouseDown=!0,this.enableTransition();const h=m(o);this.slideToPage(h),this.focus(),this.bodyUserSelectStyle=window.document.body.style.userSelect,this.bodyWebkitUserSelectStyle=window.document.body.style.webkitUserSelect,window.document.body.style.userSelect="none",window.document.body.style.webkitUserSelect="none"},this.onWindowMouseUp=()=>{this.isMouseDown=!1,window.document.body.style.userSelect=this.bodyUserSelectStyle,window.document.body.style.webkitUserSelect=this.bodyWebkitUserSelectStyle,window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onWindowMouseUp)},this.touchStartPoint=null,this.isTouchComparing=!1,this.hasTouchMoved=!1,this.onTouchStart=o=>{this.dragByHandle&&!r(this.handleElement,o)||(this.touchStartPoint=f(o),this.isFocused&&(this.enableTransition(),this.slideToPage(this.touchStartPoint)))},this.onTouchMove=o=>{if(this.touchStartPoint===null)return;const h=f(o);if(this.isTouchComparing)return this.slideToPage(h),o.preventDefault(),!1;if(!this.hasTouchMoved){const b=Math.abs(h.y-this.touchStartPoint.y),S=Math.abs(h.x-this.touchStartPoint.x);if(this.slideDirection==="horizontal"&&b<S||this.slideDirection==="vertical"&&b>S)return this.isTouchComparing=!0,this.focus(),this.slideToPage(h),o.preventDefault(),!1;this.hasTouchMoved=!0}},this.onTouchEnd=()=>{this.isTouchComparing=!1,this.hasTouchMoved=!1,this.touchStartPoint=null},this.onBlur=()=>{this.stopSlideAnimation(),this.isFocused=!1,this.firstElement.classList.remove("focused")},this.onFocus=()=>{this.isFocused=!0,this.firstElement.classList.add("focused")},this.onKeyDown=o=>{if(this.keyboard==="disabled")return;const h=u[o.key];this.animationDirection!==h&&h!==void 0&&(this.animationDirection=h,this.startSlideAnimation())},this.onKeyUp=o=>{if(this.keyboard==="disabled")return;const h=u[o.key];h!==void 0&&this.animationDirection===h&&this.stopSlideAnimation()},this.resetDimensions=()=>{this.imageWidth=this.offsetWidth,this.imageHeight=this.offsetHeight};const e=this.attachShadow({mode:"open"}),s=document.createElement("style");s.innerHTML=t.Z,this.getAttribute("nonce")&&s.setAttribute("nonce",this.getAttribute("nonce")),e.appendChild(s),e.appendChild(n.content.cloneNode(!0)),this.firstElement=e.getElementById("first"),this.handleElement=e.getElementById("handle")}set handle(e){this.dragByHandle=e.toString().toLowerCase()!=="false"}get handle(){return this.dragByHandle}get value(){return this.exposure}set value(e){const s=parseFloat(e);s!==this.exposure&&(this.exposure=s,this.enableTransition(),this.setExposure())}get hover(){return this.slideOnHover}set hover(e){this.slideOnHover=e.toString().toLowerCase()!=="false",this.removeEventListener("mousemove",this.onMouseMove),this.slideOnHover&&this.addEventListener("mousemove",this.onMouseMove)}get direction(){return this.slideDirection}set direction(e){this.slideDirection=e.toString().toLowerCase(),this.slide(0),this.firstElement.classList.remove(...v),v.includes(this.slideDirection)&&this.firstElement.classList.add(this.slideDirection)}static get observedAttributes(){return["hover","direction"]}connectedCallback(){this.hasAttribute("tabindex")||(this.tabIndex=0),this.addEventListener("dragstart",e=>(e.preventDefault(),!1)),new ResizeObserver(this.resetDimensions).observe(this),this.setExposure(0),this.keyboard=this.hasAttribute("keyboard")&&this.getAttribute("keyboard")==="disabled"?"disabled":"enabled",this.addEventListener("keydown",this.onKeyDown),this.addEventListener("keyup",this.onKeyUp),this.addEventListener("focus",this.onFocus),this.addEventListener("blur",this.onBlur),this.addEventListener("touchstart",this.onTouchStart,{passive:!0}),this.addEventListener("touchmove",this.onTouchMove,{passive:!1}),this.addEventListener("touchend",this.onTouchEnd),this.addEventListener("mousedown",this.onMouseDown),this.handle=this.hasAttribute("handle")?this.getAttribute("handle"):this.dragByHandle,this.hover=this.hasAttribute("hover")?this.getAttribute("hover"):this.slideOnHover,this.direction=this.hasAttribute("direction")?this.getAttribute("direction"):this.slideDirection,this.resetDimensions(),this.classList.contains(a)||this.classList.add(a)}disconnectedCallback(){this.transitionTimer&&window.clearTimeout(this.transitionTimer)}attributeChangedCallback(e,s,o){e==="hover"&&(this.hover=o),e==="direction"&&(this.direction=o),e==="keyboard"&&(this.keyboard=o==="disabled"?"disabled":"enabled")}setExposure(e=0){var s;this.exposure=(s=this.exposure+e)<0?0:s>100?100:s,this.firstElement.style.setProperty("--exposure",100-this.exposure+"%")}slide(e=0){this.setExposure(e);const s=new Event("slide");this.dispatchEvent(s)}slideToPage(e){this.slideDirection==="horizontal"&&this.slideToPageX(e.x),this.slideDirection==="vertical"&&this.slideToPageY(e.y)}slideToPageX(e){const s=e-this.getBoundingClientRect().left-window.scrollX;this.exposure=s/this.imageWidth*100,this.slide(0)}slideToPageY(e){const s=e-this.getBoundingClientRect().top-window.scrollY;this.exposure=s/this.imageHeight*100,this.slide(0)}enableTransition(){this.firstElement.style.setProperty("--transition-time","100ms"),this.transitionTimer=window.setTimeout(()=>{this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)"),this.transitionTimer=null},100)}startSlideAnimation(){let e=null,s=this.animationDirection;this.firstElement.style.setProperty("--transition-time","var(--keyboard-transition-time)");const o=h=>{if(this.animationDirection===0||s!==this.animationDirection)return;e===null&&(e=h);const b=(h-e)/16.666666666666668*this.animationDirection;this.slide(b),setTimeout(()=>window.requestAnimationFrame(o),0),e=h};window.requestAnimationFrame(o)}stopSlideAnimation(){this.animationDirection=0,this.firstElement.style.setProperty("--transition-time","var(--default-transition-time)")}}))})()})()),L))),p.ImgComparisonSlider=(0,w.forwardRef)(({children:d,onSlide:c,value:l,className:t,...a},r)=>{const n=(0,w.useRef)();return(0,w.useEffect)(()=>{l!==void 0&&(n.current.value=parseFloat(l.toString()))},[l,n]),(0,w.useEffect)(()=>{c&&n.current.addEventListener("slide",c)},[]),(0,w.useImperativeHandle)(r,()=>n.current,[n]),(0,w.createElement)("img-comparison-slider",Object.assign({class:t?`${t} rendered`:"rendered",tabIndex:0,ref:n},a),d)}),p}();const A=E=>{const i=k.c(15),{beforeSrc:y,afterSrc:w,value:d,direction:c,width:l,height:t}=E,a=l||"100%",r=t||(c==="vertical"?"400px":"auto");let n;i[0]!==a||i[1]!==r?(n={width:a,height:r,maxWidth:"100%"},i[0]=a,i[1]=r,i[2]=n):n=i[2];const u=n;let v,f,m,g;return i[3]!==y?(v=x.jsx("img",{slot:"first",src:y,alt:"Before",width:"100%"}),i[3]=y,i[4]=v):v=i[4],i[5]!==w?(f=x.jsx("img",{slot:"second",src:w,alt:"After",width:"100%"}),i[5]=w,i[6]=f):f=i[6],i[7]!==c||i[8]!==v||i[9]!==f||i[10]!==d?(m=x.jsxs(P.ImgComparisonSlider,{value:d,direction:c,children:[v,f]}),i[7]=c,i[8]=v,i[9]=f,i[10]=d,i[11]=m):m=i[11],i[12]!==u||i[13]!==m?(g=x.jsx("div",{style:u,children:m}),i[12]=u,i[13]=m,i[14]=g):g=i[14],g};export{A as default};
@@ -1,4 +1,4 @@
1
- var Ir;import{cH as xr,cI as Ar,cJ as oe,cK as $e,cL as ot,cM as Lr,cN as Rr,a as V,cO as st}from"./index-DDdlzLJw.js";import{a as $r,b as Sr,d as Tr,c as Cr,e as Fr,f as Dr,g as Pr,h as kr,i as _r,j as Mr,k as jr,l as zr,m as Ur,n as Gr,o as Br,p as Vr,q as Wr,r as Xr,s as Hr,t as Yr,u as qr,v as Jr,w as Qr,x as Kr,y as Zr,z as en,A as tn,B as rn,C as nn,D as on,E as sn,F as an,G as ln,H as cn,I as dn,J as fn,K as pn,L as hn,N as un,O as mn,P as gn,Q as En,R as vn,S as bn,T as yn}from"./compile-BFoHfP_H.js";import{e as wn}from"./index-Dx9C9kBl.js";const at={};function Se(e,t){e===void 0&&(e=at),t===void 0&&(t=at);const r=Object.keys(e),n=Object.keys(t);return e===t||r.length===n.length&&r.every(a=>e[a]===t[a])}const On=/("(?:[^\\"]|\\.)*")|[:,]/g;function Te(e,t={}){const r=JSON.stringify([1],void 0,t.indent===void 0?2:t.indent).slice(2,-3),n=r===""?1/0:t.maxLength===void 0?80:t.maxLength;let{replacer:a}=t;return function l(s,f,o){s&&typeof s.toJSON=="function"&&(s=s.toJSON());const i=JSON.stringify(s,a);if(i===void 0)return i;const u=n-f.length-o;if(i.length<=u){const c=i.replace(On,(d,b)=>b||`${d} `);if(c.length<=u)return c}if(a!=null&&(s=JSON.parse(i),a=void 0),typeof s=="object"&&s!==null){const c=f+r,d=[];let b,T,x=0;if(Array.isArray(s)){b="[",T="]";const{length:S}=s;for(;x<S;x++)d.push(l(s[x],c,x===S-1?0:1)||"null")}else{b="{",T="}";const S=Object.keys(s),{length:G}=S;for(;x<G;x++){const N=S[x],_=`${JSON.stringify(N)}: `,L=l(s[N],c,_.length+(x===G-1?0:1));L!==void 0&&d.push(_+L)}}if(d.length>0)return[b,r+d.join(`,
1
+ var Ir;import{cH as xr,cI as Ar,cJ as oe,cK as $e,cL as ot,cM as Lr,cN as Rr,a as V,cO as st}from"./index-DDVWq6NK.js";import{a as $r,b as Sr,d as Tr,c as Cr,e as Fr,f as Dr,g as Pr,h as kr,i as _r,j as Mr,k as jr,l as zr,m as Ur,n as Gr,o as Br,p as Vr,q as Wr,r as Xr,s as Hr,t as Yr,u as qr,v as Jr,w as Qr,x as Kr,y as Zr,z as en,A as tn,B as rn,C as nn,D as on,E as sn,F as an,G as ln,H as cn,I as dn,J as fn,K as pn,L as hn,N as un,O as mn,P as gn,Q as En,R as vn,S as bn,T as yn}from"./compile-DEz1Y6_F.js";import{e as wn}from"./index-DbunLlvf.js";const at={};function Se(e,t){e===void 0&&(e=at),t===void 0&&(t=at);const r=Object.keys(e),n=Object.keys(t);return e===t||r.length===n.length&&r.every(a=>e[a]===t[a])}const On=/("(?:[^\\"]|\\.)*")|[:,]/g;function Te(e,t={}){const r=JSON.stringify([1],void 0,t.indent===void 0?2:t.indent).slice(2,-3),n=r===""?1/0:t.maxLength===void 0?80:t.maxLength;let{replacer:a}=t;return function l(s,f,o){s&&typeof s.toJSON=="function"&&(s=s.toJSON());const i=JSON.stringify(s,a);if(i===void 0)return i;const u=n-f.length-o;if(i.length<=u){const c=i.replace(On,(d,b)=>b||`${d} `);if(c.length<=u)return c}if(a!=null&&(s=JSON.parse(i),a=void 0),typeof s=="object"&&s!==null){const c=f+r,d=[];let b,T,x=0;if(Array.isArray(s)){b="[",T="]";const{length:S}=s;for(;x<S;x++)d.push(l(s[x],c,x===S-1?0:1)||"null")}else{b="{",T="}";const S=Object.keys(s),{length:G}=S;for(;x<G;x++){const N=S[x],_=`${JSON.stringify(N)}: `,L=l(s[N],c,_.length+(x===G-1?0:1));L!==void 0&&d.push(_+L)}}if(d.length>0)return[b,r+d.join(`,
2
2
  ${c}`),T].join(`
3
3
  ${f}`)}return i}(e,"",0)}var In={NaN:NaN,E:Math.E,LN2:Math.LN2,LN10:Math.LN10,LOG2E:Math.LOG2E,LOG10E:Math.LOG10E,PI:Math.PI,SQRT1_2:Math.SQRT1_2,SQRT2:Math.SQRT2,MIN_VALUE:Number.MIN_VALUE,MAX_VALUE:Number.MAX_VALUE},Nn={"*":(e,t)=>e*t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"%":(e,t)=>e%t,">":(e,t)=>e>t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,"&":(e,t)=>e&t,"|":(e,t)=>e|t,"^":(e,t)=>e^t,"<<":(e,t)=>e<<t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t},xn={"+":e=>+e,"-":e=>-e,"~":e=>~e,"!":e=>!e};const An=Array.prototype.slice,W=(e,t,r)=>{const n=r?r(t[0]):t[0];return n[e].apply(n,An.call(t,1))};var Ln={isNaN:Number.isNaN,isFinite:Number.isFinite,abs:Math.abs,acos:Math.acos,asin:Math.asin,atan:Math.atan,atan2:Math.atan2,ceil:Math.ceil,cos:Math.cos,exp:Math.exp,floor:Math.floor,log:Math.log,max:Math.max,min:Math.min,pow:Math.pow,random:Math.random,round:Math.round,sin:Math.sin,sqrt:Math.sqrt,tan:Math.tan,clamp:(e,t,r)=>Math.max(t,Math.min(r,e)),now:Date.now,utc:Date.UTC,datetime:(e,t,r,n,a,l,s)=>new Date(e,t||0,r??1,n||0,a||0,l||0,s||0),date:e=>new Date(e).getDate(),day:e=>new Date(e).getDay(),year:e=>new Date(e).getFullYear(),month:e=>new Date(e).getMonth(),hours:e=>new Date(e).getHours(),minutes:e=>new Date(e).getMinutes(),seconds:e=>new Date(e).getSeconds(),milliseconds:e=>new Date(e).getMilliseconds(),time:e=>new Date(e).getTime(),timezoneoffset:e=>new Date(e).getTimezoneOffset(),utcdate:e=>new Date(e).getUTCDate(),utcday:e=>new Date(e).getUTCDay(),utcyear:e=>new Date(e).getUTCFullYear(),utcmonth:e=>new Date(e).getUTCMonth(),utchours:e=>new Date(e).getUTCHours(),utcminutes:e=>new Date(e).getUTCMinutes(),utcseconds:e=>new Date(e).getUTCSeconds(),utcmilliseconds:e=>new Date(e).getUTCMilliseconds(),length:e=>e.length,join:function(){return W("join",arguments)},indexof:function(){return W("indexOf",arguments)},lastindexof:function(){return W("lastIndexOf",arguments)},slice:function(){return W("slice",arguments)},reverse:e=>e.slice().reverse(),sort:e=>e.slice().sort(xr),parseFloat,parseInt,upper:e=>String(e).toUpperCase(),lower:e=>String(e).toLowerCase(),substring:function(){return W("substring",arguments,String)},split:function(){return W("split",arguments,String)},replace:function(){return W("replace",arguments,String)},trim:e=>String(e).trim(),btoa:e=>btoa(e),atob:e=>atob(e),regexp:RegExp,test:(e,t)=>RegExp(e).test(t)};const Rn=["view","item","group","xy","x","y"],Ce=new Set([Function,eval,setTimeout,setInterval]);typeof setImmediate=="function"&&Ce.add(setImmediate);const $n={Literal:(e,t)=>t.value,Identifier:(e,t)=>{const r=t.name;return e.memberDepth>0?r:r==="datum"?e.datum:r==="event"?e.event:r==="item"?e.item:In[r]||e.params["$"+r]},MemberExpression:(e,t)=>{const r=!t.computed,n=e(t.object);r&&(e.memberDepth+=1);const a=e(t.property);if(r&&(e.memberDepth-=1),!Ce.has(n[a]))return n[a];console.error(`Prevented interpretation of member "${a}" which could lead to insecure code execution`)},CallExpression:(e,t)=>{const r=t.arguments;let n=t.callee.name;return n.startsWith("_")&&(n=n.slice(1)),n==="if"?e(r[0])?e(r[1]):e(r[2]):(e.fn[n]||Ln[n]).apply(e.fn,r.map(e))},ArrayExpression:(e,t)=>t.elements.map(e),BinaryExpression:(e,t)=>Nn[t.operator](e(t.left),e(t.right)),UnaryExpression:(e,t)=>xn[t.operator](e(t.argument)),ConditionalExpression:(e,t)=>e(t.test)?e(t.consequent):e(t.alternate),LogicalExpression:(e,t)=>t.operator==="&&"?e(t.left)&&e(t.right):e(t.left)||e(t.right),ObjectExpression:(e,t)=>t.properties.reduce((r,n)=>{e.memberDepth+=1;const a=e(n.key);return e.memberDepth-=1,Ce.has(e(n.value))?console.error(`Prevented interpretation of property "${a}" which could lead to insecure code execution`):r[a]=e(n.value),r},{})};function se(e,t,r,n,a,l){const s=f=>$n[f.type](s,f);return s.memberDepth=0,s.fn=Object.create(t),s.params=r,s.datum=n,s.event=a,s.item=l,Rn.forEach(f=>s.fn[f]=function(){return a.vega[f](...arguments)}),s(e)}var Sn={operator(e,t){const r=t.ast,n=e.functions;return a=>se(r,n,a)},parameter(e,t){const r=t.ast,n=e.functions;return(a,l)=>se(r,n,l,a)},event(e,t){const r=t.ast,n=e.functions;return a=>se(r,n,void 0,void 0,a)},handler(e,t){const r=t.ast,n=e.functions;return(a,l)=>{const s=l.item&&l.item.datum;return se(r,n,a,s,l)}},encode(e,t){const{marktype:r,channels:n}=t,a=e.functions,l=r==="group"||r==="image"||r==="rect";return(s,f)=>{const o=s.datum;let i,u=0;for(const c in n)i=se(n[c].ast,a,f,o,void 0,s),s[c]!==i&&(s[c]=i,u=1);return r!=="rule"&&function(c,d,b){let T;d.x2&&(d.x?(b&&c.x>c.x2&&(T=c.x,c.x=c.x2,c.x2=T),c.width=c.x2-c.x):c.x=c.x2-(c.width||0)),d.xc&&(c.x=c.xc-(c.width||0)/2),d.y2&&(d.y?(b&&c.y>c.y2&&(T=c.y,c.y=c.y2,c.y2=T),c.height=c.y2-c.y):c.y=c.y2-(c.height||0)),d.yc&&(c.y=c.yc-(c.height||0)/2)}(s,n,l),u}}};const Tn="5.23.0",Cn=Object.freeze(Object.defineProperty({__proto__:null,accessPathDepth:$r,accessPathWithDatum:Sr,accessWithDatumToUnescapedPath:Tr,compile:Cr,contains:Fr,deepEqual:Dr,deleteNestedProperty:Pr,duplicate:kr,entries:_r,every:Mr,fieldIntersection:jr,flatAccessWithDatum:zr,getFirstDefined:Ur,hasIntersection:Gr,hasProperty:Br,hash:Vr,internalField:Wr,isBoolean:Xr,isEmpty:Hr,isEqual:Yr,isInternalField:qr,isNullOrFalse:Jr,isNumeric:Qr,keys:Kr,logicalExpr:Zr,mergeDeep:en,never:tn,normalize:rn,normalizeAngle:nn,omit:on,pick:sn,prefixGenerator:an,removePathFromField:ln,replaceAll:cn,replacePathInField:dn,resetIdCounter:fn,setEqual:pn,some:hn,stringify:un,titleCase:mn,unique:gn,uniqueId:En,vals:vn,varName:bn,version:Tn},Symbol.toStringTag,{value:"Module"}));function lt(e){const[t,r]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:r}}var Fn="2.15.0";const re="#fff",ct="#888",Dn={background:"#333",view:{stroke:ct},title:{color:re,subtitleColor:re},style:{"guide-label":{fill:re},"guide-title":{fill:re}},axis:{domainColor:re,gridColor:ct,tickColor:re}},X="#4572a7",Pn={background:"#fff",arc:{fill:X},area:{fill:X},line:{stroke:X,strokeWidth:2},path:{stroke:X},rect:{fill:X},shape:{stroke:X},symbol:{fill:X,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},H="#30a2da",Fe="#cbcbcb",dt="#f0f0f0",ft="#333",kn={arc:{fill:H},area:{fill:H},axis:{domainColor:Fe,grid:!0,gridColor:Fe,gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:Fe,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:dt,group:{fill:dt},legend:{labelColor:ft,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:ft,titleFontSize:14,titlePadding:10},line:{stroke:H,strokeWidth:2},path:{stroke:H,strokeWidth:.5},rect:{fill:H},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:H},bar:{binSpacing:2,fill:H,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},Y="#000",_n={group:{fill:"#e5e5e5"},arc:{fill:Y},area:{fill:Y},line:{stroke:Y},path:{stroke:Y},rect:{fill:Y},shape:{stroke:Y},symbol:{fill:Y,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},pt="Benton Gothic, sans-serif",q="#82c6df",De="Benton Gothic Bold, sans-serif",ht="normal",ae={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"]},Mn={background:"#ffffff",title:{anchor:"start",color:"#000000",font:De,fontSize:22,fontWeight:"normal"},arc:{fill:q},area:{fill:q},line:{stroke:q,strokeWidth:2},path:{stroke:q},rect:{fill:q},shape:{stroke:q},symbol:{fill:q,size:30},axis:{labelFont:pt,labelFontSize:11.5,labelFontWeight:"normal",titleFont:De,titleFontSize:13,titleFontWeight:ht},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:pt,labelFontSize:11.5,symbolType:"square",titleFont:De,titleFontSize:13,titleFontWeight:ht},range:{category:ae["category-6"],diverging:ae["fireandice-6"],heatmap:ae["fire-7"],ordinal:ae["fire-7"],ramp:ae["fire-7"]}},J="#ab5787",ge="#979797",jn={background:"#f9f9f9",arc:{fill:J},area:{fill:J},line:{stroke:J},path:{stroke:J},rect:{fill:J},shape:{stroke:J},symbol:{fill:J,size:30},axis:{domainColor:ge,domainWidth:.5,gridWidth:.2,labelColor:ge,tickColor:ge,tickWidth:.2,titleColor:ge},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},Q="#3e5c69",zn={background:"#fff",arc:{fill:Q},area:{fill:Q},line:{stroke:Q},path:{stroke:Q},rect:{fill:Q},shape:{stroke:Q},symbol:{fill:Q},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},z="#1696d2",ut="#000000",Ee="Lato",Pe="Lato",le={"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},Un={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:Ee},axisX:{domain:!0,domainColor:ut,domainWidth:1,grid:!1,labelFontSize:12,labelFont:Pe,labelAngle:0,tickColor:ut,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:Ee},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:Pe,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:Ee,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:Pe,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:Ee,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:le["six-groups-cat-1"],diverging:le["diverging-colors"],heatmap:le["diverging-colors"],ordinal:le["six-groups-seq"],ramp:le["shades-blue"]},area:{fill:z},rect:{fill:z},line:{color:z,stroke:z,strokeWidth:5},trail:{color:z,stroke:z,strokeWidth:0,size:1},path:{stroke:z,strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:z,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:z,stroke:null}},arc:{fill:z},shape:{stroke:z},symbol:{fill:z,size:30}},K="#3366CC",mt="#ccc",ve="Arial, sans-serif",Gn={arc:{fill:K},area:{fill:K},path:{stroke:K},rect:{fill:K},shape:{stroke:K},symbol:{stroke:K},circle:{fill:K},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:ve,fontSize:12},"guide-title":{font:ve,fontSize:12},"group-title":{font:ve,fontSize:12}},title:{font:ve,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:mt,tickColor:mt,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},ke=e=>e*(1/3+1),gt=ke(9),Et=ke(10),vt=ke(12),ce="Segoe UI",bt="wf_standard-font, helvetica, arial, sans-serif",yt="#252423",de="#605E5C",wt="transparent",U="#118DFF",Ot="#DEEFFF",It=[Ot,U],Bn={view:{stroke:wt},background:wt,font:ce,header:{titleFont:bt,titleFontSize:vt,titleColor:yt,labelFont:ce,labelFontSize:Et,labelColor:de},axis:{ticks:!1,grid:!1,domain:!1,labelColor:de,labelFontSize:gt,titleFont:bt,titleColor:yt,titleFontSize:vt,titleFontWeight:"normal"},axisQuantitative:{tickCount:3,grid:!0,gridColor:"#C8C6C4",gridDash:[1,5],labelFlush:!1},axisBand:{tickExtra:!0},axisX:{labelPadding:5},axisY:{labelPadding:10},bar:{fill:U},line:{stroke:U,strokeWidth:3,strokeCap:"round",strokeJoin:"round"},text:{font:ce,fontSize:gt,fill:de},arc:{fill:U},area:{fill:U,line:!0,opacity:.6},path:{stroke:U},rect:{fill:U},point:{fill:U,filled:!0,size:75},shape:{stroke:U},symbol:{fill:U,strokeWidth:1.5,size:50},legend:{titleFont:ce,titleFontWeight:"bold",titleColor:de,labelFont:ce,labelFontSize:Et,labelColor:de,symbolType:"circle",symbolSize:75},range:{category:[U,"#12239E","#E66C37","#6B007B","#E044A7","#744EC2","#D9B300","#D64550"],diverging:It,heatmap:It,ordinal:[Ot,"#c7e4ff","#b0d9ff","#9aceff","#83c3ff","#6cb9ff","#55aeff","#3fa3ff","#2898ff",U]}},_e='IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif',be={textPrimary:{g90:"#f4f4f4",g100:"#f4f4f4",white:"#161616",g10:"#161616"},textSecondary:{g90:"#c6c6c6",g100:"#c6c6c6",white:"#525252",g10:"#525252"},layerAccent01:{white:"#e0e0e0",g10:"#e0e0e0",g90:"#525252",g100:"#393939"},gridBg:{white:"#ffffff",g10:"#ffffff",g90:"#161616",g100:"#161616"}},Vn=["#8a3ffc","#33b1ff","#007d79","#ff7eb6","#fa4d56","#fff1f1","#6fdc8c","#4589ff","#d12771","#d2a106","#08bdba","#bae6ff","#ba4e00","#d4bbff"],Wn=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"];function ye({theme:e,background:t}){const r=["white","g10"].includes(e)?"light":"dark",n=be.gridBg[e],a=be.textPrimary[e],l=be.textSecondary[e],s=r==="dark"?Vn:Wn,f=r==="dark"?"#d4bbff":"#6929c4";return{background:t,arc:{fill:f},area:{fill:f},path:{stroke:f},rect:{fill:f},shape:{stroke:f},symbol:{stroke:f},circle:{fill:f},view:{fill:n,stroke:n},group:{fill:n},title:{color:a,anchor:"start",dy:-15,fontSize:16,font:_e,fontWeight:600},axis:{labelColor:l,labelFontSize:12,labelFont:'IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif',labelFontWeight:400,titleColor:a,titleFontWeight:600,titleFontSize:12,grid:!0,gridColor:be.layerAccent01[e],labelAngle:0},axisX:{titlePadding:10},axisY:{titlePadding:2.5},style:{"guide-label":{font:_e,fill:l,fontWeight:400},"guide-title":{font:_e,fill:l,fontWeight:400}},range:{category:s,diverging:["#750e13","#a2191f","#da1e28","#fa4d56","#ff8389","#ffb3b8","#ffd7d9","#fff1f1","#e5f6ff","#bae6ff","#82cfff","#33b1ff","#1192e8","#0072c3","#00539a","#003a6d"],heatmap:["#f6f2ff","#e8daff","#d4bbff","#be95ff","#a56eff","#8a3ffc","#6929c4","#491d8b","#31135e","#1c0f30"]}}}const Xn=ye({theme:"white",background:"#ffffff"}),Hn=ye({theme:"g10",background:"#f4f4f4"}),Yn=ye({theme:"g90",background:"#262626"}),qn=ye({theme:"g100",background:"#161616"}),Jn=Fn,Qn=Object.freeze(Object.defineProperty({__proto__:null,carbong10:Hn,carbong100:qn,carbong90:Yn,carbonwhite:Xn,dark:Dn,excel:Pn,fivethirtyeight:kn,ggplot2:_n,googlecharts:Gn,latimes:Mn,powerbi:Bn,quartz:jn,urbaninstitute:Un,version:Jn,vox:zn},Symbol.toStringTag,{value:"Module"}));function Nt(e,t){return JSON.stringify(e,function(r){const n=[];return function(a,l){if(typeof l!="object"||l===null)return l;const s=n.indexOf(this)+1;return n.length=s,n.length>r?"[Object]":n.indexOf(l)>=0?"[Circular]":(n.push(l),l)}}(t))}var Kn=`#vg-tooltip-element {
4
4
  visibility: hidden;
@@ -0,0 +1 @@
1
+ import{cg as y,ch as v,ci as k,P as b,cj as g,ck as h,cl as w,cm as B,aB as C,cn as P,aC as Y,Y as q,co as z,x as A}from"./index-DDVWq6NK.js";function j(r){return r==r&&!k(r)}function p(r,n){return function(u){return u!=null&&u[r]===n&&(n!==void 0||r in Object(u))}}function D(r){var n=function(u){for(var t=b(u),e=t.length;e--;){var a=t[e],o=u[a];t[e]=[a,o,j(o)]}return t}(r);return n.length==1&&n[0][2]?p(n[0][0],n[0][1]):function(u){return u===r||function(t,e,a,o){var c=a.length,f=c;if(t==null)return!f;for(t=Object(t);c--;){var i=a[c];if(i[2]?i[1]!==t[i[0]]:!(i[0]in t))return!1}for(;++c<f;){var s=(i=a[c])[0],l=t[s],O=i[1];if(i[2]){if(l===void 0&&!(s in t))return!1}else{var x=new y;if(!v(O,l,3,o,x))return!1}}return!0}(u,0,n)}}function E(r){return g(r)?P(h(r)):function(n){return function(u){return C(u,n)}}(r)}function F(r){return typeof r=="function"?r:r==null?Y:typeof r=="object"?q(r)?(n=r[0],u=r[1],g(n)&&j(u)?p(h(n),u):function(t){var e=w(t,n);return e===void 0&&e===u?B(t,n):v(u,e,3)}):D(r):E(r);var n,u}function d(r,n){return r&&z(r,n,b)}var m,G=(m=d,function(r,n){if(r==null)return r;if(!A(r))return m(r,n);for(var u=r.length,t=-1,e=Object(r);++t<u&&n(e[t],t,e)!==!1;);return r});export{F as a,G as b,d as c};
@@ -0,0 +1 @@
1
+ import{b as m}from"./_baseEach-BHb51vC7.js";import{x as s}from"./index-DDVWq6NK.js";function e(r,o){var a=-1,t=s(r)?Array(r.length):[];return m(r,function(n,f,i){t[++a]=o(n,f,i)}),t}export{e as b};
@@ -0,0 +1 @@
1
+ import{cP as p,P as w,bW as m,cQ as F,cR as H,cS as J,cT as K,cU as rr,cV as D,cW as M,cX as er,cY as B,cZ as S,aD as P,c_ as d,ci as nr,c$ as tr,d0 as cr,d1 as or,d2 as ar,cg as ur,d3 as sr,Y as A,d4 as ir,aC as fr,d5 as br,aA as jr,d6 as lr,d7 as x,d8 as U,d9 as vr,da as yr}from"./index-DDVWq6NK.js";import{b as O,a as C}from"./_baseEach-BHb51vC7.js";function R(){}function V(r,e){for(var n=-1,u=r==null?0:r.length;++n<u&&e(r[n],n,r)!==!1;);return r}function W(r,e,n,u){for(var i=r.length,a=n+-1;++a<i;)if(e(r[a],a,r))return a;return-1}function pr(r){return r!=r}function k(r,e,n){return e==e?function(u,i,a){for(var c=a-1,s=u.length;++c<s;)if(u[c]===i)return c;return-1}(r,e,n):W(r,pr,n)}function N(r,e){return!!(r!=null&&r.length)&&k(r,e,0)>-1}var Y=Object.getOwnPropertySymbols?function(r){for(var e=[];r;)J(e,F(r)),r=K(r);return e}:H;function $(r){return rr(r,m,Y)}var dr=Object.prototype.hasOwnProperty,Ar=/\w*$/,G=M?M.prototype:void 0,L=G?G.valueOf:void 0;function gr(r,e,n){var u,i,a,c=r.constructor;switch(e){case"[object ArrayBuffer]":return D(r);case"[object Boolean]":case"[object Date]":return new c(+r);case"[object DataView]":return function(s,b){var v=b?D(s.buffer):s.buffer;return new s.constructor(v,s.byteOffset,s.byteLength)}(r,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return er(r,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(r);case"[object RegExp]":return(a=new(i=r).constructor(i.source,Ar.exec(i))).lastIndex=i.lastIndex,a;case"[object Symbol]":return u=r,L?Object(L.call(u)):{}}}var Q=d&&d.isMap,hr=Q?P(Q):function(r){return B(r)&&S(r)=="[object Map]"},T=d&&d.isSet,wr=T?P(T):function(r){return B(r)&&S(r)=="[object Set]"},X="[object Arguments]",Z="[object Function]",_="[object Object]",o={};function g(r,e,n,u,i,a){var c,s=1&e,b=2&e,v=4&e;if(c!==void 0)return c;if(!nr(r))return r;var l=A(r);if(l){if(c=function(t){var f=t.length,h=new t.constructor(f);return f&&typeof t[0]=="string"&&dr.call(t,"index")&&(h.index=t.index,h.input=t.input),h}(r),!s)return tr(r,c)}else{var j=S(r),y=j==Z||j=="[object GeneratorFunction]";if(cr(r))return or(r,s);if(j==_||j==X||y&&!i){if(c=b||y?{}:ar(r),!s)return b?function(t,f){return p(t,Y(t),f)}(r,function(t,f){return t&&p(f,m(f),t)}(c,r)):function(t,f){return p(t,F(t),f)}(r,function(t,f){return t&&p(f,w(f),t)}(c,r))}else{if(!o[j])return i?r:{};c=gr(r,j,s)}}a||(a=new ur);var I=a.get(r);if(I)return I;a.set(r,c),wr(r)?r.forEach(function(t){c.add(g(t,e,n,t,r,a))}):hr(r)&&r.forEach(function(t,f){c.set(f,g(t,e,n,f,r,a))});var E=l?void 0:(v?b?$:sr:b?m:w)(r);return V(E||r,function(t,f){E&&(t=r[f=t]),ir(c,f,g(t,e,n,f,r,a))}),c}function q(r){return typeof r=="function"?r:fr}function mr(r,e){return(A(r)?V:O)(r,q(e))}function z(r,e){var n=[];return O(r,function(u,i,a){e(u,i,a)&&n.push(u)}),n}function Sr(r,e){return(A(r)?br:z)(r,C(e))}function xr(r){return r==null?[]:function(e,n){return jr(n,function(u){return e[u]})}(r,w(r))}function Or(r){return r===void 0}function Ir(r,e,n,u,i){return i(r,function(a,c,s){n=u?(u=!1,a):e(n,a,c,s)}),n}function Er(r,e,n){var u=A(r)?lr:Ir,i=arguments.length<3;return u(r,C(e),n,i,O)}o[X]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object DataView]"]=o["[object Boolean]"]=o["[object Date]"]=o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Map]"]=o["[object Number]"]=o[_]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object Symbol]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Error]"]=o[Z]=o["[object WeakMap]"]=!1;var Fr=x&&1/U(new x([,-0]))[1]==1/0?function(r){return new x(r)}:R;function Dr(r,e,n){var u=-1,i=N,a=r.length,c=!0,s=[],b=s;if(a>=200){var v=e?null:Fr(r);if(v)return U(v);c=!1,i=yr,b=new vr}else b=e?[]:s;r:for(;++u<a;){var l=r[u],j=e?e(l):l;if(l=l!==0?l:0,c&&j==j){for(var y=b.length;y--;)if(b[y]===j)continue r;e&&b.push(j),s.push(l)}else i(b,j,n)||(b!==s&&b.push(j),s.push(l))}return s}export{Dr as a,g as b,mr as c,W as d,q as e,Sr as f,N as g,k as h,Or as i,$ as j,z as k,R as n,Er as r,xr as v};
@@ -1 +1 @@
1
- import{b as a,a as c}from"./_baseEach-C52A37kN.js";import{Z as e}from"./index-DDdlzLJw.js";function m(r,o,u,t){for(var n=-1,f=r==null?0:r.length;++n<f;){var i=r[n];o(t,i,u(i),r)}return t}function s(r,o,u,t){return a(r,function(n,f,i){o(t,n,u(n),i)}),t}function l(r,o){return function(u,t){var n=e(u)?m:s,f=o?o():{};return n(u,r,c(t),f)}}export{l as c};
1
+ import{b as a,a as c}from"./_baseEach-BHb51vC7.js";import{Y as e}from"./index-DDVWq6NK.js";function m(r,o,u,t){for(var n=-1,f=r==null?0:r.length;++n<f;){var i=r[n];o(t,i,u(i),r)}return t}function s(r,o,u,t){return a(r,function(n,f,i){o(t,n,u(n),i)}),t}function l(r,o){return function(u,t){var n=e(u)?m:s,f=o?o():{};return n(u,r,c(t),f)}}export{l as c};
@@ -1,3 +1,3 @@
1
- import{c as h,L as C,j as g,E as k,C as w,R as y}from"./index-DDdlzLJw.js";import{l as L,a as b}from"./index-CEEx86Vd.js";import"./index-B-zQMBKJ.js";import"./index-grhOS4NZ.js";import"./index-CKQeO2Lm.js";import"./index-TLD151he.js";import"./index-DnxVQzYt.js";import"./index--PV_n6OT.js";import"./index-hzUC1b41.js";import"./index-CqGB7278.js";import"./index-DGXmlIKQ.js";import"./index-DjpcQgUn.js";import"./index-DjJ-bG6v.js";import"./index-BGwXzM6i.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asterisk-B46aRdXb.js";import"./brainfuck-CtZaYBKt.js";import"./clike-BgBwzOhw.js";import"./cmake-DXn5xaP-.js";import"./cobol-stawOqaz.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./crystal-CRzZ78HM.js";import"./cypher-gJDei3ni.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dockerfile-knGOOxt4.js";import"./simple-mode-C3vEBAcb.js";import"./dtd-DI9Herc-.js";import"./dylan-DkEP81N9.js";import"./ebnf-B-Df8AvO.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-DompmV0j.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./fcl-CVaBTCzQ.js";import"./forth-POgR1ypr.js";import"./fortran-DL7KluxX.js";import"./gas-bV0CklSb.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CLQs6EAM.js";import"./haxe-D25e-2l-.js";import"./http-BKJkqRj4.js";import"./idl-pcmmZuaN.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mathematica-IIbmv7SK.js";import"./mbox-z_N2Mo3d.js";import"./mirc-DkvFAiy5.js";import"./modelica-DSrSSXCg.js";import"./mscgen-B2igx18G.js";import"./mumps-zvxmGV4l.js";import"./nginx-B4hAVlXN.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-BSwWqoLa.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./solr-78MBEUkU.js";import"./sparql-BRLJFz69.js";import"./spreadsheet-CGlWr0eM.js";import"./stylus-Bdo_Aemu.js";import"./swift-B_XXVlXX.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./tiddlywiki-BgR6AEZu.js";import"./tiki-CI-ztowC.js";import"./toml-wcPdHu67.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./turtle-BkSuIpt-.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./verilog-B4LBqg_1.js";import"./vhdl-CWWH2SUo.js";import"./webidl-CGwyPRYs.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";const N=f=>{const o=h.c(26);let t,r,m,i,l;o[0]!==f?({language:t,showCopyButton:m,extensions:i,...r}=f,o[0]=f,o[1]=t,o[2]=r,o[3]=m,o[4]=i):(t=o[1],r=o[2],m=o[3],i=o[4]),o[5]!==i?(l=i===void 0?[]:i,o[5]=i,o[6]=l):l=o[6];const u=l,p=t&&!(t in b);let x;p&&C.warn(`Language ${t} not found in CodeMirror.`);o:{if(!t){x=u;break o}const v=t;let n,d;o[7]!==v?(n=L(v),o[7]=v,o[8]=n):n=o[8],o[9]!==u||o[10]!==n?(d=[n,...u].filter(Boolean),o[9]=u,o[10]=n,o[11]=d):d=o[11],x=d}const j=x;let e,a,s,c;return o[12]!==p||o[13]!==t?(e=p&&g.jsx(k,{className:"mb-1 rounded-sm",error:`Language ${t} not supported.
1
+ import{c as h,L as C,j as g,E as k,C as w,R as y}from"./index-DDVWq6NK.js";import{l as L,a as b}from"./index-CmVTfWOx.js";import"./index-Bz3Lb65G.js";import"./index-FYYNNs_X.js";import"./index-C9EPiaCd.js";import"./index-N67HDT2u.js";import"./index-Cs9jrmWP.js";import"./index-Cig6xGYH.js";import"./index-DZWCSqpf.js";import"./index-DP4HiwTU.js";import"./index-Czo055fo.js";import"./index-C9EbJL5c.js";import"./index-BuqjbKw0.js";import"./index-CxQo8Qlm.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asterisk-B46aRdXb.js";import"./brainfuck-CtZaYBKt.js";import"./clike-BgBwzOhw.js";import"./cmake-DXn5xaP-.js";import"./cobol-stawOqaz.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./crystal-CRzZ78HM.js";import"./cypher-gJDei3ni.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dockerfile-knGOOxt4.js";import"./simple-mode-C3vEBAcb.js";import"./dtd-DI9Herc-.js";import"./dylan-DkEP81N9.js";import"./ebnf-B-Df8AvO.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-DompmV0j.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./fcl-CVaBTCzQ.js";import"./forth-POgR1ypr.js";import"./fortran-DL7KluxX.js";import"./gas-bV0CklSb.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CLQs6EAM.js";import"./haxe-D25e-2l-.js";import"./http-BKJkqRj4.js";import"./idl-pcmmZuaN.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mathematica-IIbmv7SK.js";import"./mbox-z_N2Mo3d.js";import"./mirc-DkvFAiy5.js";import"./modelica-DSrSSXCg.js";import"./mscgen-B2igx18G.js";import"./mumps-zvxmGV4l.js";import"./nginx-B4hAVlXN.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-BSwWqoLa.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./solr-78MBEUkU.js";import"./sparql-BRLJFz69.js";import"./spreadsheet-CGlWr0eM.js";import"./stylus-Bdo_Aemu.js";import"./swift-B_XXVlXX.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./tiddlywiki-BgR6AEZu.js";import"./tiki-CI-ztowC.js";import"./toml-wcPdHu67.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./turtle-BkSuIpt-.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./verilog-B4LBqg_1.js";import"./vhdl-CWWH2SUo.js";import"./webidl-CGwyPRYs.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";const N=f=>{const o=h.c(26);let t,r,m,i,l;o[0]!==f?({language:t,showCopyButton:m,extensions:i,...r}=f,o[0]=f,o[1]=t,o[2]=r,o[3]=m,o[4]=i):(t=o[1],r=o[2],m=o[3],i=o[4]),o[5]!==i?(l=i===void 0?[]:i,o[5]=i,o[6]=l):l=o[6];const u=l,p=t&&!(t in b);let x;p&&C.warn(`Language ${t} not found in CodeMirror.`);o:{if(!t){x=u;break o}const v=t;let n,d;o[7]!==v?(n=L(v),o[7]=v,o[8]=n):n=o[8],o[9]!==u||o[10]!==n?(d=[n,...u].filter(Boolean),o[9]=u,o[10]=n,o[11]=d):d=o[11],x=d}const j=x;let e,a,s,c;return o[12]!==p||o[13]!==t?(e=p&&g.jsx(k,{className:"mb-1 rounded-sm",error:`Language ${t} not supported.
2
2
 
3
3
  Supported languages are: ${Object.keys(b).join(", ")}`}),o[12]=p,o[13]=t,o[14]=e):e=o[14],o[15]!==p||o[16]!==r||o[17]!==m?(a=m&&!p&&g.jsx(w,{tooltip:!1,className:"absolute top-2 right-2 p-1 hover-action z-10 text-muted-foreground",value:r.value||"",toastTitle:"Copied to clipboard"}),o[15]=p,o[16]=r,o[17]=m,o[18]=a):a=o[18],o[19]!==j||o[20]!==r?(s=g.jsx(y,{...r,extensions:j}),o[19]=j,o[20]=r,o[21]=s):s=o[21],o[22]!==e||o[23]!==a||o[24]!==s?(c=g.jsxs("div",{className:"relative w-full group hover-actions-parent",children:[e,a,s]}),o[22]=e,o[23]=a,o[24]=s,o[25]=c):c=o[25],c};export{N as default};
@@ -0,0 +1,36 @@
1
+ import{_ as Q,g as We,s as Be,a as je,b as qe,q as $e,p as Ze,I as Qe,S as Je,y as Ke,l as Te,a3 as le,c as re,aj as de,G as tr,ak as er,al as rr}from"./mermaid-CVRC4Ruz.js";import{p as nr}from"./chunk-4BMEZGHF-BO5DiwLV.js";import{I as or}from"./chunk-XZIHB7SX-COKmet6t.js";import{p as ir}from"./radar-MK3ICKWK-D8LhkSau.js";import{c as Ae}from"./cytoscape.esm-UYyVlru8.js";import{y as ar}from"./index-DDVWq6NK.js";import{s as sr}from"./transform-DetRMEbJ.js";import"./step-BwsUM5iJ.js";import"./_baseEach-BHb51vC7.js";import"./_baseUniq-CABXtSlj.js";import"./min-VmgWsmJ_.js";import"./_baseMap--rH4lBFQ.js";import"./clone-H0gxlZXI.js";import"./_createAggregator-SoA2y5HH.js";import"./timer-Bqd5yn_a.js";var we,Ie={exports:{}},Le={exports:{}},_e={exports:{}};function hr(){return we?_e.exports:(we=1,N=function(){return function(w){var _={};function T(c){if(_[c])return _[c].exports;var o=_[c]={i:c,l:!1,exports:{}};return w[c].call(o.exports,o,o.exports,T),o.l=!0,o.exports}return T.m=w,T.c=_,T.i=function(c){return c},T.d=function(c,o,s){T.o(c,o)||Object.defineProperty(c,o,{configurable:!1,enumerable:!0,get:s})},T.n=function(c){var o=c&&c.__esModule?function(){return c.default}:function(){return c};return T.d(o,"a",o),o},T.o=function(c,o){return Object.prototype.hasOwnProperty.call(c,o)},T.p="",T(T.s=28)}([function(w,_,T){function c(){}c.QUALITY=1,c.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,c.DEFAULT_INCREMENTAL=!1,c.DEFAULT_ANIMATION_ON_LAYOUT=!0,c.DEFAULT_ANIMATION_DURING_LAYOUT=!1,c.DEFAULT_ANIMATION_PERIOD=50,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,c.DEFAULT_GRAPH_MARGIN=15,c.NODE_DIMENSIONS_INCLUDE_LABELS=!1,c.SIMPLE_NODE_SIZE=40,c.SIMPLE_NODE_HALF_SIZE=c.SIMPLE_NODE_SIZE/2,c.EMPTY_COMPOUND_NODE_SIZE=40,c.MIN_EDGE_LENGTH=1,c.WORLD_BOUNDARY=1e6,c.INITIAL_WORLD_BOUNDARY=c.WORLD_BOUNDARY/1e3,c.WORLD_CENTER_X=1200,c.WORLD_CENTER_Y=900,w.exports=c},function(w,_,T){var c=T(2),o=T(8),s=T(9);function e(n,i,t){c.call(this,t),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=t,this.bendpoints=[],this.source=n,this.target=i}for(var r in e.prototype=Object.create(c.prototype),c)e[r]=c[r];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.prototype.getOtherEnd=function(n){if(this.source===n)return this.target;if(this.target===n)return this.source;throw"Node is not incident with this edge"},e.prototype.getOtherEndInGraph=function(n,i){for(var t=this.getOtherEnd(n),h=i.getGraphManager().getRoot();;){if(t.getOwner()==i)return t;if(t.getOwner()==h)break;t=t.getOwner().getParent()}return null},e.prototype.updateLength=function(){var n=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),n),this.isOverlapingSourceAndTarget||(this.lengthX=n[0]-n[2],this.lengthY=n[1]-n[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.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=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},w.exports=e},function(w,_,T){w.exports=function(c){this.vGraphObject=c}},function(w,_,T){var c=T(2),o=T(10),s=T(13),e=T(0),r=T(16),n=T(5);function i(h,l,g,d){g==null&&d==null&&(d=l),c.call(this,d),h.graphManager!=null&&(h=h.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=d,this.edges=[],this.graphManager=h,this.rect=g!=null&&l!=null?new s(l.x,l.y,g.width,g.height):new s}for(var t in i.prototype=Object.create(c.prototype),c)i[t]=c[t];i.prototype.getEdges=function(){return this.edges},i.prototype.getChild=function(){return this.child},i.prototype.getOwner=function(){return this.owner},i.prototype.getWidth=function(){return this.rect.width},i.prototype.setWidth=function(h){this.rect.width=h},i.prototype.getHeight=function(){return this.rect.height},i.prototype.setHeight=function(h){this.rect.height=h},i.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},i.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},i.prototype.getCenter=function(){return new n(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},i.prototype.getLocation=function(){return new n(this.rect.x,this.rect.y)},i.prototype.getRect=function(){return this.rect},i.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},i.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},i.prototype.setRect=function(h,l){this.rect.x=h.x,this.rect.y=h.y,this.rect.width=l.width,this.rect.height=l.height},i.prototype.setCenter=function(h,l){this.rect.x=h-this.rect.width/2,this.rect.y=l-this.rect.height/2},i.prototype.setLocation=function(h,l){this.rect.x=h,this.rect.y=l},i.prototype.moveBy=function(h,l){this.rect.x+=h,this.rect.y+=l},i.prototype.getEdgeListToNode=function(h){var l=[],g=this;return g.edges.forEach(function(d){if(d.target==h){if(d.source!=g)throw"Incorrect edge source!";l.push(d)}}),l},i.prototype.getEdgesBetween=function(h){var l=[],g=this;return g.edges.forEach(function(d){if(d.source!=g&&d.target!=g)throw"Incorrect edge source and/or target";d.target!=h&&d.source!=h||l.push(d)}),l},i.prototype.getNeighborsList=function(){var h=new Set,l=this;return l.edges.forEach(function(g){if(g.source==l)h.add(g.target);else{if(g.target!=l)throw"Incorrect incidency!";h.add(g.source)}}),h},i.prototype.withChildren=function(){var h=new Set;if(h.add(this),this.child!=null)for(var l=this.child.getNodes(),g=0;g<l.length;g++)l[g].withChildren().forEach(function(d){h.add(d)});return h},i.prototype.getNoOfChildren=function(){var h=0;if(this.child==null)h=1;else for(var l=this.child.getNodes(),g=0;g<l.length;g++)h+=l[g].getNoOfChildren();return h==0&&(h=1),h},i.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},i.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},i.prototype.scatter=function(){var h,l,g=-e.INITIAL_WORLD_BOUNDARY,d=e.INITIAL_WORLD_BOUNDARY;h=e.WORLD_CENTER_X+r.nextDouble()*(d-g)+g;var y=-e.INITIAL_WORLD_BOUNDARY,v=e.INITIAL_WORLD_BOUNDARY;l=e.WORLD_CENTER_Y+r.nextDouble()*(v-y)+y,this.rect.x=h,this.rect.y=l},i.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var h=this.getChild();if(h.updateBounds(!0),this.rect.x=h.getLeft(),this.rect.y=h.getTop(),this.setWidth(h.getRight()-h.getLeft()),this.setHeight(h.getBottom()-h.getTop()),e.NODE_DIMENSIONS_INCLUDE_LABELS){var l=h.getRight()-h.getLeft(),g=h.getBottom()-h.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(l+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>l?(this.rect.x-=(this.labelWidth-l)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(l+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(g+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>g?(this.rect.y-=(this.labelHeight-g)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(g+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(h){var l=this.rect.x;l>e.WORLD_BOUNDARY?l=e.WORLD_BOUNDARY:l<-e.WORLD_BOUNDARY&&(l=-e.WORLD_BOUNDARY);var g=this.rect.y;g>e.WORLD_BOUNDARY?g=e.WORLD_BOUNDARY:g<-e.WORLD_BOUNDARY&&(g=-e.WORLD_BOUNDARY);var d=new n(l,g),y=h.inverseTransformPoint(d);this.setLocation(y.x,y.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},w.exports=i},function(w,_,T){var c=T(0);function o(){}for(var s in c)o[s]=c[s];o.MAX_ITERATIONS=2500,o.DEFAULT_EDGE_LENGTH=50,o.DEFAULT_SPRING_STRENGTH=.45,o.DEFAULT_REPULSION_STRENGTH=4500,o.DEFAULT_GRAVITY_STRENGTH=.4,o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,o.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,o.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,o.COOLING_ADAPTATION_FACTOR=.33,o.ADAPTATION_LOWER_NODE_LIMIT=1e3,o.ADAPTATION_UPPER_NODE_LIMIT=5e3,o.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,o.MAX_NODE_DISPLACEMENT=3*o.MAX_NODE_DISPLACEMENT_INCREMENTAL,o.MIN_REPULSION_DIST=o.DEFAULT_EDGE_LENGTH/10,o.CONVERGENCE_CHECK_PERIOD=100,o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,o.MIN_EDGE_LENGTH=1,o.GRID_CALCULATION_CHECK_PERIOD=10,w.exports=o},function(w,_,T){function c(o,s){o==null&&s==null?(this.x=0,this.y=0):(this.x=o,this.y=s)}c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.setX=function(o){this.x=o},c.prototype.setY=function(o){this.y=o},c.prototype.getDifference=function(o){return new DimensionD(this.x-o.x,this.y-o.y)},c.prototype.getCopy=function(){return new c(this.x,this.y)},c.prototype.translate=function(o){return this.x+=o.width,this.y+=o.height,this},w.exports=c},function(w,_,T){var c=T(2),o=T(10),s=T(0),e=T(7),r=T(3),n=T(1),i=T(13),t=T(12),h=T(11);function l(d,y,v){c.call(this,v),this.estimatedSize=o.MIN_VALUE,this.margin=s.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=d,y!=null&&y instanceof e?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}for(var g in l.prototype=Object.create(c.prototype),c)l[g]=c[g];l.prototype.getNodes=function(){return this.nodes},l.prototype.getEdges=function(){return this.edges},l.prototype.getGraphManager=function(){return this.graphManager},l.prototype.getParent=function(){return this.parent},l.prototype.getLeft=function(){return this.left},l.prototype.getRight=function(){return this.right},l.prototype.getTop=function(){return this.top},l.prototype.getBottom=function(){return this.bottom},l.prototype.isConnected=function(){return this.isConnected},l.prototype.add=function(d,y,v){if(y==null&&v==null){var E=d;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(E)>-1)throw"Node already in graph!";return E.owner=this,this.getNodes().push(E),E}var A=d;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(y.owner!=v.owner||y.owner!=this)throw"Both owners must be this graph!";return y.owner!=v.owner?null:(A.source=y,A.target=v,A.isInterGraph=!1,this.getEdges().push(A),y.edges.push(A),v!=y&&v.edges.push(A),A)},l.prototype.remove=function(d){var y=d;if(d instanceof r){if(y==null)throw"Node is null!";if(y.owner==null||y.owner!=this)throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=y.edges.slice(),E=v.length,A=0;A<E;A++)(M=v[A]).isInterGraph?this.graphManager.remove(M):M.source.owner.remove(M);if((P=this.nodes.indexOf(y))==-1)throw"Node not in owner node list!";this.nodes.splice(P,1)}else if(d instanceof n){var M;if((M=d)==null)throw"Edge is null!";if(M.source==null||M.target==null)throw"Source and/or target is null!";if(M.source.owner==null||M.target.owner==null||M.source.owner!=this||M.target.owner!=this)throw"Source and/or target owner is invalid!";var P,b=M.source.edges.indexOf(M),Y=M.target.edges.indexOf(M);if(!(b>-1&&Y>-1))throw"Source and/or target doesn't know this edge!";if(M.source.edges.splice(b,1),M.target!=M.source&&M.target.edges.splice(Y,1),(P=M.source.owner.getEdges().indexOf(M))==-1)throw"Not in owner's edge list!";M.source.owner.getEdges().splice(P,1)}},l.prototype.updateLeftTop=function(){for(var d,y,v,E=o.MAX_VALUE,A=o.MAX_VALUE,M=this.getNodes(),P=M.length,b=0;b<P;b++){var Y=M[b];E>(d=Y.getTop())&&(E=d),A>(y=Y.getLeft())&&(A=y)}return E==o.MAX_VALUE?null:(v=M[0].getParent().paddingLeft!=null?M[0].getParent().paddingLeft:this.margin,this.left=A-v,this.top=E-v,new t(this.left,this.top))},l.prototype.updateBounds=function(d){for(var y,v,E,A,M,P=o.MAX_VALUE,b=-o.MAX_VALUE,Y=o.MAX_VALUE,H=-o.MAX_VALUE,q=this.nodes,x=q.length,B=0;B<x;B++){var a=q[B];d&&a.child!=null&&a.updateBounds(),P>(y=a.getLeft())&&(P=y),b<(v=a.getRight())&&(b=v),Y>(E=a.getTop())&&(Y=E),H<(A=a.getBottom())&&(H=A)}var m=new i(P,Y,b-P,H-Y);P==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),M=q[0].getParent().paddingLeft!=null?q[0].getParent().paddingLeft:this.margin,this.left=m.x-M,this.right=m.x+m.width+M,this.top=m.y-M,this.bottom=m.y+m.height+M},l.calculateBounds=function(d){for(var y,v,E,A,M=o.MAX_VALUE,P=-o.MAX_VALUE,b=o.MAX_VALUE,Y=-o.MAX_VALUE,H=d.length,q=0;q<H;q++){var x=d[q];M>(y=x.getLeft())&&(M=y),P<(v=x.getRight())&&(P=v),b>(E=x.getTop())&&(b=E),Y<(A=x.getBottom())&&(Y=A)}return new i(M,b,P-M,Y-b)},l.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},l.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},l.prototype.calcEstimatedSize=function(){for(var d=0,y=this.nodes,v=y.length,E=0;E<v;E++)d+=y[E].calcEstimatedSize();return this.estimatedSize=d==0?s.EMPTY_COMPOUND_NODE_SIZE:d/Math.sqrt(this.nodes.length),this.estimatedSize},l.prototype.updateConnected=function(){var d=this;if(this.nodes.length!=0){var y,v,E=new h,A=new Set,M=this.nodes[0];for(M.withChildren().forEach(function(H){E.push(H),A.add(H)});E.length!==0;)for(var P=(y=(M=E.shift()).getEdges()).length,b=0;b<P;b++)(v=y[b].getOtherEndInGraph(M,this))==null||A.has(v)||v.withChildren().forEach(function(H){E.push(H),A.add(H)});if(this.isConnected=!1,A.size>=this.nodes.length){var Y=0;A.forEach(function(H){H.owner==d&&Y++}),Y==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},w.exports=l},function(w,_,T){var c,o=T(1);function s(e){c=T(6),this.layout=e,this.graphs=[],this.edges=[]}s.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),n=this.add(e,r);return this.setRootGraph(n),this.rootGraph},s.prototype.add=function(e,r,n,i,t){if(n==null&&i==null&&t==null){if(e==null)throw"Graph is null!";if(r==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}t=n,n=e;var h=(i=r).getOwner(),l=t.getOwner();if(h==null||h.getGraphManager()!=this)throw"Source not in this graph mgr!";if(l==null||l.getGraphManager()!=this)throw"Target not in this graph mgr!";if(h==l)return n.isInterGraph=!1,h.add(n,i,t);if(n.isInterGraph=!0,n.source=i,n.target=t,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),n.source==null||n.target==null)throw"Edge source and/or target is null!";if(n.source.edges.indexOf(n)!=-1||n.target.edges.indexOf(n)!=-1)throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},s.prototype.remove=function(e){if(e instanceof c){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(r!=this.rootGraph&&(r.parent==null||r.parent.graphManager!=this))throw"Invalid parent node!";for(var n,i=[],t=(i=i.concat(r.getEdges())).length,h=0;h<t;h++)n=i[h],r.remove(n);var l,g=[];for(t=(g=g.concat(r.getNodes())).length,h=0;h<t;h++)l=g[h],r.remove(l);r==this.rootGraph&&this.setRootGraph(null);var d=this.graphs.indexOf(r);this.graphs.splice(d,1),r.parent=null}else if(e instanceof o){if((n=e)==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(n.source==null||n.target==null)throw"Source and/or target is null!";if(n.source.edges.indexOf(n)==-1||n.target.edges.indexOf(n)==-1)throw"Source and/or target doesn't know this edge!";if(d=n.source.edges.indexOf(n),n.source.edges.splice(d,1),d=n.target.edges.indexOf(n),n.target.edges.splice(d,1),n.source.owner==null||n.source.owner.getGraphManager()==null)throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";d=n.source.owner.getGraphManager().edges.indexOf(n),n.source.owner.getGraphManager().edges.splice(d,1)}},s.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},s.prototype.getGraphs=function(){return this.graphs},s.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],r=this.getGraphs(),n=r.length,i=0;i<n;i++)e=e.concat(r[i].getNodes());this.allNodes=e}return this.allNodes},s.prototype.resetAllNodes=function(){this.allNodes=null},s.prototype.resetAllEdges=function(){this.allEdges=null},s.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},s.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],r=this.getGraphs();r.length;for(var n=0;n<r.length;n++)e=e.concat(r[n].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},s.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},s.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=e},s.prototype.getRoot=function(){return this.rootGraph},s.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=e,e.parent==null&&(e.parent=this.layout.newNode("Root node"))},s.prototype.getLayout=function(){return this.layout},s.prototype.isOneAncestorOfOther=function(e,r){if(e==null||r==null)throw"assert failed";if(e==r)return!0;for(var n,i=e.getOwner();(n=i.getParent())!=null;){if(n==r)return!0;if((i=n.getOwner())==null)break}for(i=r.getOwner();(n=i.getParent())!=null;){if(n==e)return!0;if((i=n.getOwner())==null)break}return!1},s.prototype.calcLowestCommonAncestors=function(){for(var e,r,n,i,t,h=this.getAllEdges(),l=h.length,g=0;g<l;g++)if(r=(e=h[g]).source,n=e.target,e.lca=null,e.sourceInLca=r,e.targetInLca=n,r!=n){for(i=r.getOwner();e.lca==null;){for(e.targetInLca=n,t=n.getOwner();e.lca==null;){if(t==i){e.lca=t;break}if(t==this.rootGraph)break;if(e.lca!=null)throw"assert failed";e.targetInLca=t.getParent(),t=e.targetInLca.getOwner()}if(i==this.rootGraph)break;e.lca==null&&(e.sourceInLca=i.getParent(),i=e.sourceInLca.getOwner())}if(e.lca==null)throw"assert failed"}else e.lca=r.getOwner()},s.prototype.calcLowestCommonAncestor=function(e,r){if(e==r)return e.getOwner();for(var n=e.getOwner();n!=null;){for(var i=r.getOwner();i!=null;){if(i==n)return i;i=i.getParent().getOwner()}n=n.getParent().getOwner()}return n},s.prototype.calcInclusionTreeDepths=function(e,r){var n;e==null&&r==null&&(e=this.rootGraph,r=1);for(var i=e.getNodes(),t=i.length,h=0;h<t;h++)(n=i[h]).inclusionTreeDepth=r,n.child!=null&&this.calcInclusionTreeDepths(n.child,r+1)},s.prototype.includesInvalidEdge=function(){for(var e,r=[],n=this.edges.length,i=0;i<n;i++)e=this.edges[i],this.isOneAncestorOfOther(e.source,e.target)&&r.push(e);for(i=0;i<r.length;i++)this.remove(r[i]);return!1},w.exports=s},function(w,_,T){var c=T(12);function o(){}o.calcSeparationAmount=function(s,e,r,n){if(!s.intersects(e))throw"assert failed";var i=new Array(2);this.decideDirectionsForOverlappingNodes(s,e,i),r[0]=Math.min(s.getRight(),e.getRight())-Math.max(s.x,e.x),r[1]=Math.min(s.getBottom(),e.getBottom())-Math.max(s.y,e.y),s.getX()<=e.getX()&&s.getRight()>=e.getRight()?r[0]+=Math.min(e.getX()-s.getX(),s.getRight()-e.getRight()):e.getX()<=s.getX()&&e.getRight()>=s.getRight()&&(r[0]+=Math.min(s.getX()-e.getX(),e.getRight()-s.getRight())),s.getY()<=e.getY()&&s.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-s.getY(),s.getBottom()-e.getBottom()):e.getY()<=s.getY()&&e.getBottom()>=s.getBottom()&&(r[1]+=Math.min(s.getY()-e.getY(),e.getBottom()-s.getBottom()));var t=Math.abs((e.getCenterY()-s.getCenterY())/(e.getCenterX()-s.getCenterX()));e.getCenterY()===s.getCenterY()&&e.getCenterX()===s.getCenterX()&&(t=1);var h=t*r[0],l=r[1]/t;r[0]<l?l=r[0]:h=r[1],r[0]=-1*i[0]*(l/2+n),r[1]=-1*i[1]*(h/2+n)},o.decideDirectionsForOverlappingNodes=function(s,e,r){s.getCenterX()<e.getCenterX()?r[0]=-1:r[0]=1,s.getCenterY()<e.getCenterY()?r[1]=-1:r[1]=1},o.getIntersection2=function(s,e,r){var n=s.getCenterX(),i=s.getCenterY(),t=e.getCenterX(),h=e.getCenterY();if(s.intersects(e))return r[0]=n,r[1]=i,r[2]=t,r[3]=h,!0;var l=s.getX(),g=s.getY(),d=s.getRight(),y=s.getX(),v=s.getBottom(),E=s.getRight(),A=s.getWidthHalf(),M=s.getHeightHalf(),P=e.getX(),b=e.getY(),Y=e.getRight(),H=e.getX(),q=e.getBottom(),x=e.getRight(),B=e.getWidthHalf(),a=e.getHeightHalf(),m=!1,u=!1;if(n===t){if(i>h)return r[0]=n,r[1]=g,r[2]=t,r[3]=q,!1;if(i<h)return r[0]=n,r[1]=v,r[2]=t,r[3]=b,!1}else if(i===h){if(n>t)return r[0]=l,r[1]=i,r[2]=Y,r[3]=h,!1;if(n<t)return r[0]=d,r[1]=i,r[2]=P,r[3]=h,!1}else{var f=s.height/s.width,p=e.height/e.width,I=(h-i)/(t-n),L=void 0,C=void 0,G=void 0,S=void 0,F=void 0,D=void 0;if(-f===I?n>t?(r[0]=y,r[1]=v,m=!0):(r[0]=d,r[1]=g,m=!0):f===I&&(n>t?(r[0]=l,r[1]=g,m=!0):(r[0]=E,r[1]=v,m=!0)),-p===I?t>n?(r[2]=H,r[3]=q,u=!0):(r[2]=Y,r[3]=b,u=!0):p===I&&(t>n?(r[2]=P,r[3]=b,u=!0):(r[2]=x,r[3]=q,u=!0)),m&&u)return!1;if(n>t?i>h?(L=this.getCardinalDirection(f,I,4),C=this.getCardinalDirection(p,I,2)):(L=this.getCardinalDirection(-f,I,3),C=this.getCardinalDirection(-p,I,1)):i>h?(L=this.getCardinalDirection(-f,I,1),C=this.getCardinalDirection(-p,I,3)):(L=this.getCardinalDirection(f,I,2),C=this.getCardinalDirection(p,I,4)),!m)switch(L){case 1:S=g,G=n+-M/I,r[0]=G,r[1]=S;break;case 2:G=E,S=i+A*I,r[0]=G,r[1]=S;break;case 3:S=v,G=n+M/I,r[0]=G,r[1]=S;break;case 4:G=y,S=i+-A*I,r[0]=G,r[1]=S}if(!u)switch(C){case 1:D=b,F=t+-a/I,r[2]=F,r[3]=D;break;case 2:F=x,D=h+B*I,r[2]=F,r[3]=D;break;case 3:D=q,F=t+a/I,r[2]=F,r[3]=D;break;case 4:F=H,D=h+-B*I,r[2]=F,r[3]=D}}return!1},o.getCardinalDirection=function(s,e,r){return s>e?r:1+r%4},o.getIntersection=function(s,e,r,n){if(n==null)return this.getIntersection2(s,e,r);var i,t,h,l,g,d,y,v=s.x,E=s.y,A=e.x,M=e.y,P=r.x,b=r.y,Y=n.x,H=n.y;return(y=(i=M-E)*(l=P-Y)-(t=H-b)*(h=v-A))===0?null:new c((h*(d=Y*b-P*H)-l*(g=A*E-v*M))/y,(t*g-i*d)/y)},o.angleOfVector=function(s,e,r,n){var i=void 0;return s!==r?(i=Math.atan((n-e)/(r-s)),r<s?i+=Math.PI:n<e&&(i+=this.TWO_PI)):i=n<e?this.ONE_AND_HALF_PI:this.HALF_PI,i},o.doIntersect=function(s,e,r,n){var i=s.x,t=s.y,h=e.x,l=e.y,g=r.x,d=r.y,y=n.x,v=n.y,E=(h-i)*(v-d)-(y-g)*(l-t);if(E===0)return!1;var A=((v-d)*(y-i)+(g-y)*(v-t))/E,M=((t-l)*(y-i)+(h-i)*(v-t))/E;return 0<A&&A<1&&0<M&&M<1},o.findCircleLineIntersections=function(s,e,r,n,i,t,h){var l=(r-s)*(r-s)+(n-e)*(n-e),g=2*((s-i)*(r-s)+(e-t)*(n-e)),d=(s-i)*(s-i)+(e-t)*(e-t)-h*h;if(g*g-4*l*d>=0){var y=(-g+Math.sqrt(g*g-4*l*d))/(2*l),v=(-g-Math.sqrt(g*g-4*l*d))/(2*l);return y>=0&&y<=1?[y]:v>=0&&v<=1?[v]:null}return null},o.HALF_PI=.5*Math.PI,o.ONE_AND_HALF_PI=1.5*Math.PI,o.TWO_PI=2*Math.PI,o.THREE_PI=3*Math.PI,w.exports=o},function(w,_,T){function c(){}c.sign=function(o){return o>0?1:o<0?-1:0},c.floor=function(o){return o<0?Math.ceil(o):Math.floor(o)},c.ceil=function(o){return o<0?Math.floor(o):Math.ceil(o)},w.exports=c},function(w,_,T){function c(){}c.MAX_VALUE=2147483647,c.MIN_VALUE=-2147483648,w.exports=c},function(w,_,T){var c=function(){function n(i,t){for(var h=0;h<t.length;h++){var l=t[h];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(i,l.key,l)}}return function(i,t,h){return t&&n(i.prototype,t),h&&n(i,h),i}}(),o=function(n){return{value:n,next:null,prev:null}},s=function(n,i,t,h){return n!==null?n.next=i:h.head=i,t!==null?t.prev=i:h.tail=i,i.prev=n,i.next=t,h.length++,i},e=function(n,i){var t=n.prev,h=n.next;return t!==null?t.next=h:i.head=h,h!==null?h.prev=t:i.tail=t,n.prev=n.next=null,i.length--,n},r=function(){function n(i){var t=this;(function(h,l){if(!(h instanceof l))throw new TypeError("Cannot call a class as a function")})(this,n),this.length=0,this.head=null,this.tail=null,i!=null&&i.forEach(function(h){return t.push(h)})}return c(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(i,t){return s(t.prev,o(i),t,this)}},{key:"insertAfter",value:function(i,t){return s(t,o(i),t.next,this)}},{key:"insertNodeBefore",value:function(i,t){return s(t.prev,i,t,this)}},{key:"insertNodeAfter",value:function(i,t){return s(t,i,t.next,this)}},{key:"push",value:function(i){return s(this.tail,o(i),null,this)}},{key:"unshift",value:function(i){return s(null,o(i),this.head,this)}},{key:"remove",value:function(i){return e(i,this)}},{key:"pop",value:function(){return e(this.tail,this).value}},{key:"popNode",value:function(){return e(this.tail,this)}},{key:"shift",value:function(){return e(this.head,this).value}},{key:"shiftNode",value:function(){return e(this.head,this)}},{key:"get_object_at",value:function(i){if(i<=this.length()){for(var t=1,h=this.head;t<i;)h=h.next,t++;return h.value}}},{key:"set_object_at",value:function(i,t){if(i<=this.length()){for(var h=1,l=this.head;h<i;)l=l.next,h++;l.value=t}}}]),n}();w.exports=r},function(w,_,T){function c(o,s,e){this.x=null,this.y=null,o==null&&s==null&&e==null?(this.x=0,this.y=0):typeof o=="number"&&typeof s=="number"&&e==null?(this.x=o,this.y=s):o.constructor.name=="Point"&&s==null&&e==null&&(e=o,this.x=e.x,this.y=e.y)}c.prototype.getX=function(){return this.x},c.prototype.getY=function(){return this.y},c.prototype.getLocation=function(){return new c(this.x,this.y)},c.prototype.setLocation=function(o,s,e){o.constructor.name=="Point"&&s==null&&e==null?(e=o,this.setLocation(e.x,e.y)):typeof o=="number"&&typeof s=="number"&&e==null&&(parseInt(o)==o&&parseInt(s)==s?this.move(o,s):(this.x=Math.floor(o+.5),this.y=Math.floor(s+.5)))},c.prototype.move=function(o,s){this.x=o,this.y=s},c.prototype.translate=function(o,s){this.x+=o,this.y+=s},c.prototype.equals=function(o){if(o.constructor.name=="Point"){var s=o;return this.x==s.x&&this.y==s.y}return this==o},c.prototype.toString=function(){return new c().constructor.name+"[x="+this.x+",y="+this.y+"]"},w.exports=c},function(w,_,T){function c(o,s,e,r){this.x=0,this.y=0,this.width=0,this.height=0,o!=null&&s!=null&&e!=null&&r!=null&&(this.x=o,this.y=s,this.width=e,this.height=r)}c.prototype.getX=function(){return this.x},c.prototype.setX=function(o){this.x=o},c.prototype.getY=function(){return this.y},c.prototype.setY=function(o){this.y=o},c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(o){this.width=o},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(o){this.height=o},c.prototype.getRight=function(){return this.x+this.width},c.prototype.getBottom=function(){return this.y+this.height},c.prototype.intersects=function(o){return!(this.getRight()<o.x||this.getBottom()<o.y||o.getRight()<this.x||o.getBottom()<this.y)},c.prototype.getCenterX=function(){return this.x+this.width/2},c.prototype.getMinX=function(){return this.getX()},c.prototype.getMaxX=function(){return this.getX()+this.width},c.prototype.getCenterY=function(){return this.y+this.height/2},c.prototype.getMinY=function(){return this.getY()},c.prototype.getMaxY=function(){return this.getY()+this.height},c.prototype.getWidthHalf=function(){return this.width/2},c.prototype.getHeightHalf=function(){return this.height/2},w.exports=c},function(w,_,T){var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s};function o(){}o.lastID=0,o.createID=function(s){return o.isPrimitive(s)?s:(s.uniqueID!=null||(s.uniqueID=o.getString(),o.lastID++),s.uniqueID)},o.getString=function(s){return s==null&&(s=o.lastID),"Object#"+s},o.isPrimitive=function(s){var e=s===void 0?"undefined":c(s);return s==null||e!="object"&&e!="function"},w.exports=o},function(w,_,T){function c(g){if(Array.isArray(g)){for(var d=0,y=Array(g.length);d<g.length;d++)y[d]=g[d];return y}return Array.from(g)}var o=T(0),s=T(7),e=T(3),r=T(1),n=T(6),i=T(5),t=T(17),h=T(29);function l(g){h.call(this),this.layoutQuality=o.QUALITY,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=o.DEFAULT_INCREMENTAL,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new s(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,g!=null&&(this.isRemoteUse=g)}l.RANDOM_SEED=1,l.prototype=Object.create(h.prototype),l.prototype.getGraphManager=function(){return this.graphManager},l.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},l.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},l.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},l.prototype.newGraphManager=function(){var g=new s(this);return this.graphManager=g,g},l.prototype.newGraph=function(g){return new n(null,this.graphManager,g)},l.prototype.newNode=function(g){return new e(this.graphManager,g)},l.prototype.newEdge=function(g){return new r(null,null,g)},l.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},l.prototype.runLayout=function(){var g;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),g=!this.checkLayoutSuccess()&&this.layout(),o.ANIMATE!=="during"&&(g&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,g)},l.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},l.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var g=this.graphManager.getAllEdges(),d=0;d<g.length;d++)g[d];var y=this.graphManager.getRoot().getNodes();for(d=0;d<y.length;d++)y[d];this.update(this.graphManager.getRoot())}},l.prototype.update=function(g){if(g==null)this.update2();else if(g instanceof e){var d=g;if(d.getChild()!=null)for(var y=d.getChild().getNodes(),v=0;v<y.length;v++)update(y[v]);d.vGraphObject!=null&&d.vGraphObject.update(d)}else if(g instanceof r){var E=g;E.vGraphObject!=null&&E.vGraphObject.update(E)}else if(g instanceof n){var A=g;A.vGraphObject!=null&&A.vGraphObject.update(A)}},l.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=o.QUALITY,this.animationDuringLayout=o.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=o.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=o.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=o.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=o.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=o.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},l.prototype.transform=function(g){if(g==null)this.transform(new i(0,0));else{var d=new t,y=this.graphManager.getRoot().updateLeftTop();if(y!=null){d.setWorldOrgX(g.x),d.setWorldOrgY(g.y),d.setDeviceOrgX(y.x),d.setDeviceOrgY(y.y);for(var v=this.getAllNodes(),E=0;E<v.length;E++)v[E].transform(d)}}},l.prototype.positionNodesRandomly=function(g){if(g==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var d,y,v=g.getNodes(),E=0;E<v.length;E++)(y=(d=v[E]).getChild())==null||y.getNodes().length==0?d.scatter():(this.positionNodesRandomly(y),d.updateBounds())},l.prototype.getFlatForest=function(){for(var g=[],d=!0,y=this.graphManager.getRoot().getNodes(),v=!0,E=0;E<y.length;E++)y[E].getChild()!=null&&(v=!1);if(!v)return g;var A=new Set,M=[],P=new Map,b=[];for(b=b.concat(y);b.length>0&&d;){for(M.push(b[0]);M.length>0&&d;){var Y=M[0];M.splice(0,1),A.add(Y);var H=Y.getEdges();for(E=0;E<H.length;E++){var q=H[E].getOtherEnd(Y);if(P.get(Y)!=q){if(A.has(q)){d=!1;break}M.push(q),P.set(q,Y)}}}if(d){var x=[].concat(c(A));for(g.push(x),E=0;E<x.length;E++){var B=x[E],a=b.indexOf(B);a>-1&&b.splice(a,1)}A=new Set,P=new Map}else g=[]}return g},l.prototype.createDummyNodesForBendpoints=function(g){for(var d=[],y=g.source,v=this.graphManager.calcLowestCommonAncestor(g.source,g.target),E=0;E<g.bendpoints.length;E++){var A=this.newNode(null);A.setRect(new Point(0,0),new Dimension(1,1)),v.add(A);var M=this.newEdge(null);this.graphManager.add(M,y,A),d.add(A),y=A}return M=this.newEdge(null),this.graphManager.add(M,y,g.target),this.edgeToDummyNodes.set(g,d),g.isInterGraph()?this.graphManager.remove(g):v.remove(g),d},l.prototype.createBendpointsFromDummyNodes=function(){var g=[];g=g.concat(this.graphManager.getAllEdges()),g=[].concat(c(this.edgeToDummyNodes.keys())).concat(g);for(var d=0;d<g.length;d++){var y=g[d];if(y.bendpoints.length>0){for(var v=this.edgeToDummyNodes.get(y),E=0;E<v.length;E++){var A=v[E],M=new i(A.getCenterX(),A.getCenterY()),P=y.bendpoints.get(E);P.x=M.x,P.y=M.y,A.getOwner().remove(A)}this.graphManager.add(y,y.source,y.target)}}},l.transform=function(g,d,y,v){if(y!=null&&v!=null){var E=d;return g<=50?E-=(d-d/y)/50*(50-g):E+=(d*v-d)/50*(g-50),E}var A,M;return g<=50?(A=9*d/500,M=d/10):(A=9*d/50,M=-8*d),A*g+M},l.findCenterOfTree=function(g){var d=[];d=d.concat(g);var y=[],v=new Map,E=!1,A=null;d.length!=1&&d.length!=2||(E=!0,A=d[0]);for(var M=0;M<d.length;M++){var P=(H=d[M]).getNeighborsList().size;v.set(H,H.getNeighborsList().size),P==1&&y.push(H)}var b=[];for(b=b.concat(y);!E;){var Y=[];for(Y=Y.concat(b),b=[],M=0;M<d.length;M++){var H=d[M],q=d.indexOf(H);q>=0&&d.splice(q,1),H.getNeighborsList().forEach(function(x){if(y.indexOf(x)<0){var B=v.get(x)-1;B==1&&b.push(x),v.set(x,B)}})}y=y.concat(b),d.length!=1&&d.length!=2||(E=!0,A=d[0])}return A},l.prototype.setGraphManager=function(g){this.graphManager=g},w.exports=l},function(w,_,T){function c(){}c.seed=1,c.x=0,c.nextDouble=function(){return c.x=1e4*Math.sin(c.seed++),c.x-Math.floor(c.x)},w.exports=c},function(w,_,T){var c=T(5);function o(s,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}o.prototype.getWorldOrgX=function(){return this.lworldOrgX},o.prototype.setWorldOrgX=function(s){this.lworldOrgX=s},o.prototype.getWorldOrgY=function(){return this.lworldOrgY},o.prototype.setWorldOrgY=function(s){this.lworldOrgY=s},o.prototype.getWorldExtX=function(){return this.lworldExtX},o.prototype.setWorldExtX=function(s){this.lworldExtX=s},o.prototype.getWorldExtY=function(){return this.lworldExtY},o.prototype.setWorldExtY=function(s){this.lworldExtY=s},o.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},o.prototype.setDeviceOrgX=function(s){this.ldeviceOrgX=s},o.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},o.prototype.setDeviceOrgY=function(s){this.ldeviceOrgY=s},o.prototype.getDeviceExtX=function(){return this.ldeviceExtX},o.prototype.setDeviceExtX=function(s){this.ldeviceExtX=s},o.prototype.getDeviceExtY=function(){return this.ldeviceExtY},o.prototype.setDeviceExtY=function(s){this.ldeviceExtY=s},o.prototype.transformX=function(s){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(s-this.lworldOrgX)*this.ldeviceExtX/r),e},o.prototype.transformY=function(s){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(s-this.lworldOrgY)*this.ldeviceExtY/r),e},o.prototype.inverseTransformX=function(s){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(s-this.ldeviceOrgX)*this.lworldExtX/r),e},o.prototype.inverseTransformY=function(s){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(s-this.ldeviceOrgY)*this.lworldExtY/r),e},o.prototype.inverseTransformPoint=function(s){return new c(this.inverseTransformX(s.x),this.inverseTransformY(s.y))},w.exports=o},function(w,_,T){var c=T(15),o=T(4),s=T(0),e=T(8),r=T(9);function n(){c.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}for(var i in n.prototype=Object.create(c.prototype),c)n[i]=c[i];n.prototype.initParameters=function(){c.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var t,h,l,g,d,y,v,E=this.getGraphManager().getAllEdges(),A=0;A<E.length;A++)h=(t=E[A]).idealLength,t.isInterGraph&&(g=t.getSource(),d=t.getTarget(),y=t.getSourceInLca().getEstimatedSize(),v=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=y+v-2*s.SIMPLE_NODE_SIZE),l=t.getLca().getInclusionTreeDepth(),t.idealLength+=h*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(g.getInclusionTreeDepth()+d.getInclusionTreeDepth()-2*l))},n.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>o.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(t-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var t,h=this.getAllEdges(),l=0;l<h.length;l++)t=h[l],this.calcSpringForce(t,t.idealLength)},n.prototype.calcRepulsionForces=function(){var t,h,l,g,d,y=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],v=arguments.length>1&&arguments[1]!==void 0&&arguments[1],E=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&y&&this.updateGrid(),d=new Set,t=0;t<E.length;t++)l=E[t],this.calculateRepulsionForceOfANode(l,d,y,v),d.add(l);else for(t=0;t<E.length;t++)for(l=E[t],h=t+1;h<E.length;h++)g=E[h],l.getOwner()==g.getOwner()&&this.calcRepulsionForce(l,g)},n.prototype.calcGravitationalForces=function(){for(var t,h=this.getAllNodesToApplyGravitation(),l=0;l<h.length;l++)t=h[l],this.calcGravitationalForce(t)},n.prototype.moveNodes=function(){for(var t=this.getAllNodes(),h=0;h<t.length;h++)t[h].move()},n.prototype.calcSpringForce=function(t,h){var l,g,d,y,v=t.getSource(),E=t.getTarget();if(this.uniformLeafNodeSizes&&v.getChild()==null&&E.getChild()==null)t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;(l=t.getLength())!=0&&(d=(g=t.edgeElasticity*(l-h))*(t.lengthX/l),y=g*(t.lengthY/l),v.springForceX+=d,v.springForceY+=y,E.springForceX-=d,E.springForceY-=y)},n.prototype.calcRepulsionForce=function(t,h){var l,g,d,y,v,E,A,M=t.getRect(),P=h.getRect(),b=new Array(2),Y=new Array(4);if(M.intersects(P)){e.calcSeparationAmount(M,P,b,o.DEFAULT_EDGE_LENGTH/2),E=2*b[0],A=2*b[1];var H=t.noOfChildren*h.noOfChildren/(t.noOfChildren+h.noOfChildren);t.repulsionForceX-=H*E,t.repulsionForceY-=H*A,h.repulsionForceX+=H*E,h.repulsionForceY+=H*A}else this.uniformLeafNodeSizes&&t.getChild()==null&&h.getChild()==null?(l=P.getCenterX()-M.getCenterX(),g=P.getCenterY()-M.getCenterY()):(e.getIntersection(M,P,Y),l=Y[2]-Y[0],g=Y[3]-Y[1]),Math.abs(l)<o.MIN_REPULSION_DIST&&(l=r.sign(l)*o.MIN_REPULSION_DIST),Math.abs(g)<o.MIN_REPULSION_DIST&&(g=r.sign(g)*o.MIN_REPULSION_DIST),d=l*l+g*g,y=Math.sqrt(d),E=(v=(t.nodeRepulsion/2+h.nodeRepulsion/2)*t.noOfChildren*h.noOfChildren/d)*l/y,A=v*g/y,t.repulsionForceX-=E,t.repulsionForceY-=A,h.repulsionForceX+=E,h.repulsionForceY+=A},n.prototype.calcGravitationalForce=function(t){var h,l,g,d,y,v,E,A;l=((h=t.getOwner()).getRight()+h.getLeft())/2,g=(h.getTop()+h.getBottom())/2,d=t.getCenterX()-l,y=t.getCenterY()-g,v=Math.abs(d)+t.getWidth()/2,E=Math.abs(y)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(v>(A=h.getEstimatedSize()*this.gravityRangeFactor)||E>A)&&(t.gravitationForceX=-this.gravityConstant*d,t.gravitationForceY=-this.gravityConstant*y):(v>(A=h.getEstimatedSize()*this.compoundGravityRangeFactor)||E>A)&&(t.gravitationForceX=-this.gravityConstant*d*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*y*this.compoundGravityConstant)},n.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,h=this.graphManager.getAllNodes(),l=0;l<h.length;l++)(t=h[l]).noOfChildren=t.getNoOfChildren()},n.prototype.calcGrid=function(t){var h,l;h=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),l=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var g=new Array(h),d=0;d<h;d++)g[d]=new Array(l);for(d=0;d<h;d++)for(var y=0;y<l;y++)g[d][y]=new Array;return g},n.prototype.addNodeToGrid=function(t,h,l){var g,d,y,v;g=parseInt(Math.floor((t.getRect().x-h)/this.repulsionRange)),d=parseInt(Math.floor((t.getRect().width+t.getRect().x-h)/this.repulsionRange)),y=parseInt(Math.floor((t.getRect().y-l)/this.repulsionRange)),v=parseInt(Math.floor((t.getRect().height+t.getRect().y-l)/this.repulsionRange));for(var E=g;E<=d;E++)for(var A=y;A<=v;A++)this.grid[E][A].push(t),t.setGridCoordinates(g,d,y,v)},n.prototype.updateGrid=function(){var t,h,l=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<l.length;t++)h=l[t],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(t,h,l,g){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&l||g){var d,y=new Set;t.surrounding=new Array;for(var v=this.grid,E=t.startX-1;E<t.finishX+2;E++)for(var A=t.startY-1;A<t.finishY+2;A++)if(!(E<0||A<0||E>=v.length||A>=v[0].length)){for(var M=0;M<v[E][A].length;M++)if(d=v[E][A][M],t.getOwner()==d.getOwner()&&t!=d&&!h.has(d)&&!y.has(d)){var P=Math.abs(t.getCenterX()-d.getCenterX())-(t.getWidth()/2+d.getWidth()/2),b=Math.abs(t.getCenterY()-d.getCenterY())-(t.getHeight()/2+d.getHeight()/2);P<=this.repulsionRange&&b<=this.repulsionRange&&y.add(d)}}t.surrounding=[].concat(function(Y){if(Array.isArray(Y)){for(var H=0,q=Array(Y.length);H<Y.length;H++)q[H]=Y[H];return q}return Array.from(Y)}(y))}for(E=0;E<t.surrounding.length;E++)this.calcRepulsionForce(t,t.surrounding[E])},n.prototype.calcRepulsionRange=function(){return 0},w.exports=n},function(w,_,T){var c=T(1),o=T(4);function s(r,n,i){c.call(this,r,n,i),this.idealLength=o.DEFAULT_EDGE_LENGTH,this.edgeElasticity=o.DEFAULT_SPRING_STRENGTH}for(var e in s.prototype=Object.create(c.prototype),c)s[e]=c[e];w.exports=s},function(w,_,T){var c=T(3),o=T(4);function s(r,n,i,t){c.call(this,r,n,i,t),this.nodeRepulsion=o.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var e in s.prototype=Object.create(c.prototype),c)s[e]=c[e];s.prototype.setGridCoordinates=function(r,n,i,t){this.startX=r,this.finishX=n,this.startY=i,this.finishY=t},w.exports=s},function(w,_,T){function c(o,s){this.width=0,this.height=0,o!==null&&s!==null&&(this.height=s,this.width=o)}c.prototype.getWidth=function(){return this.width},c.prototype.setWidth=function(o){this.width=o},c.prototype.getHeight=function(){return this.height},c.prototype.setHeight=function(o){this.height=o},w.exports=c},function(w,_,T){var c=T(14);function o(){this.map={},this.keys=[]}o.prototype.put=function(s,e){var r=c.createID(s);this.contains(r)||(this.map[r]=e,this.keys.push(s))},o.prototype.contains=function(s){return c.createID(s),this.map[s]!=null},o.prototype.get=function(s){var e=c.createID(s);return this.map[e]},o.prototype.keySet=function(){return this.keys},w.exports=o},function(w,_,T){var c=T(14);function o(){this.set={}}o.prototype.add=function(s){var e=c.createID(s);this.contains(e)||(this.set[e]=s)},o.prototype.remove=function(s){delete this.set[c.createID(s)]},o.prototype.clear=function(){this.set={}},o.prototype.contains=function(s){return this.set[c.createID(s)]==s},o.prototype.isEmpty=function(){return this.size()===0},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAllTo=function(s){for(var e=Object.keys(this.set),r=e.length,n=0;n<r;n++)s.push(this.set[e[n]])},o.prototype.size=function(){return Object.keys(this.set).length},o.prototype.addAll=function(s){for(var e=s.length,r=0;r<e;r++){var n=s[r];this.add(n)}},w.exports=o},function(w,_,T){function c(){}c.multMat=function(o,s){for(var e=[],r=0;r<o.length;r++){e[r]=[];for(var n=0;n<s[0].length;n++){e[r][n]=0;for(var i=0;i<o[0].length;i++)e[r][n]+=o[r][i]*s[i][n]}}return e},c.transpose=function(o){for(var s=[],e=0;e<o[0].length;e++){s[e]=[];for(var r=0;r<o.length;r++)s[e][r]=o[r][e]}return s},c.multCons=function(o,s){for(var e=[],r=0;r<o.length;r++)e[r]=o[r]*s;return e},c.minusOp=function(o,s){for(var e=[],r=0;r<o.length;r++)e[r]=o[r]-s[r];return e},c.dotProduct=function(o,s){for(var e=0,r=0;r<o.length;r++)e+=o[r]*s[r];return e},c.mag=function(o){return Math.sqrt(this.dotProduct(o,o))},c.normalize=function(o){for(var s=[],e=this.mag(o),r=0;r<o.length;r++)s[r]=o[r]/e;return s},c.multGamma=function(o){for(var s=[],e=0,r=0;r<o.length;r++)e+=o[r];e*=-1/o.length;for(var n=0;n<o.length;n++)s[n]=e+o[n];return s},c.multL=function(o,s,e){for(var r=[],n=[],i=[],t=0;t<s[0].length;t++){for(var h=0,l=0;l<s.length;l++)h+=-.5*s[l][t]*o[l];n[t]=h}for(var g=0;g<e.length;g++){for(var d=0,y=0;y<e.length;y++)d+=e[g][y]*n[y];i[g]=d}for(var v=0;v<s.length;v++){for(var E=0,A=0;A<s[0].length;A++)E+=s[v][A]*i[A];r[v]=E}return r},w.exports=c},function(w,_,T){var c=function(){function e(r,n){for(var i=0;i<n.length;i++){var t=n[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,t.key,t)}}return function(r,n,i){return n&&e(r.prototype,n),i&&e(r,i),r}}(),o=T(11),s=function(){function e(r,n){(function(t,h){if(!(t instanceof h))throw new TypeError("Cannot call a class as a function")})(this,e),n===null&&n===void 0||(this.compareFunction=this._defaultCompareFunction);var i=void 0;i=r instanceof o?r.size():r.length,this._quicksort(r,0,i-1)}return c(e,[{key:"_quicksort",value:function(r,n,i){if(n<i){var t=this._partition(r,n,i);this._quicksort(r,n,t),this._quicksort(r,t+1,i)}}},{key:"_partition",value:function(r,n,i){for(var t=this._get(r,n),h=n,l=i;;){for(;this.compareFunction(t,this._get(r,l));)l--;for(;this.compareFunction(this._get(r,h),t);)h++;if(!(h<l))return l;this._swap(r,h,l),h++,l--}}},{key:"_get",value:function(r,n){return r instanceof o?r.get_object_at(n):r[n]}},{key:"_set",value:function(r,n,i){r instanceof o?r.set_object_at(n,i):r[n]=i}},{key:"_swap",value:function(r,n,i){var t=this._get(r,n);this._set(r,n,this._get(r,i)),this._set(r,i,t)}},{key:"_defaultCompareFunction",value:function(r,n){return n>r}}]),e}();w.exports=s},function(w,_,T){function c(){}c.svd=function(o){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=o.length,this.n=o[0].length;var s=Math.min(this.m,this.n);this.s=function(wt){for(var ut=[];wt-- >0;)ut.push(0);return ut}(Math.min(this.m+1,this.n)),this.U=function wt(ut){if(ut.length==0)return 0;for(var Ft=[],Mt=0;Mt<ut[0];Mt++)Ft.push(wt(ut.slice(1)));return Ft}([this.m,s]),this.V=function(wt){return function ut(Ft){if(Ft.length==0)return 0;for(var Mt=[],Ht=0;Ht<Ft[0];Ht++)Mt.push(ut(Ft.slice(1)));return Mt}(wt)}([this.n,this.n]);for(var e=function(wt){for(var ut=[];wt-- >0;)ut.push(0);return ut}(this.n),r=function(wt){for(var ut=[];wt-- >0;)ut.push(0);return ut}(this.m),n=Math.min(this.m-1,this.n),i=Math.max(0,Math.min(this.n-2,this.m)),t=0;t<Math.max(n,i);t++){if(t<n){this.s[t]=0;for(var h=t;h<this.m;h++)this.s[t]=c.hypot(this.s[t],o[h][t]);if(this.s[t]!==0){o[t][t]<0&&(this.s[t]=-this.s[t]);for(var l=t;l<this.m;l++)o[l][t]/=this.s[t];o[t][t]+=1}this.s[t]=-this.s[t]}for(var g=t+1;g<this.n;g++){if(function(wt,ut){return wt&&ut}(t<n,this.s[t]!==0)){for(var d=0,y=t;y<this.m;y++)d+=o[y][t]*o[y][g];d=-d/o[t][t];for(var v=t;v<this.m;v++)o[v][g]+=d*o[v][t]}e[g]=o[t][g]}if(function(wt,ut){return ut}(0,t<n))for(var E=t;E<this.m;E++)this.U[E][t]=o[E][t];if(t<i){e[t]=0;for(var A=t+1;A<this.n;A++)e[t]=c.hypot(e[t],e[A]);if(e[t]!==0){e[t+1]<0&&(e[t]=-e[t]);for(var M=t+1;M<this.n;M++)e[M]/=e[t];e[t+1]+=1}if(e[t]=-e[t],function(wt,ut){return wt&&ut}(t+1<this.m,e[t]!==0)){for(var P=t+1;P<this.m;P++)r[P]=0;for(var b=t+1;b<this.n;b++)for(var Y=t+1;Y<this.m;Y++)r[Y]+=e[b]*o[Y][b];for(var H=t+1;H<this.n;H++)for(var q=-e[H]/e[t+1],x=t+1;x<this.m;x++)o[x][H]+=q*r[x]}for(var B=t+1;B<this.n;B++)this.V[B][t]=e[B]}}var a=Math.min(this.n,this.m+1);n<this.n&&(this.s[n]=o[n][n]),this.m<a&&(this.s[a-1]=0),i+1<a&&(e[i]=o[i][a-1]),e[a-1]=0;for(var m=n;m<s;m++){for(var u=0;u<this.m;u++)this.U[u][m]=0;this.U[m][m]=1}for(var f=n-1;f>=0;f--)if(this.s[f]!==0){for(var p=f+1;p<s;p++){for(var I=0,L=f;L<this.m;L++)I+=this.U[L][f]*this.U[L][p];I=-I/this.U[f][f];for(var C=f;C<this.m;C++)this.U[C][p]+=I*this.U[C][f]}for(var G=f;G<this.m;G++)this.U[G][f]=-this.U[G][f];this.U[f][f]=1+this.U[f][f];for(var S=0;S<f-1;S++)this.U[S][f]=0}else{for(var F=0;F<this.m;F++)this.U[F][f]=0;this.U[f][f]=1}for(var D=this.n-1;D>=0;D--){if(function(wt,ut){return wt&&ut}(D<i,e[D]!==0))for(var z=D+1;z<s;z++){for(var W=0,U=D+1;U<this.n;U++)W+=this.V[U][D]*this.V[U][z];W=-W/this.V[D+1][D];for(var O=D+1;O<this.n;O++)this.V[O][z]+=W*this.V[O][D]}for(var X=0;X<this.n;X++)this.V[X][D]=0;this.V[D][D]=1}for(var j=a-1,tt=Math.pow(2,-52),ot=Math.pow(2,-966);a>0;){var V=void 0,Et=void 0;for(V=a-2;V>=-1&&V!==-1;V--)if(Math.abs(e[V])<=ot+tt*(Math.abs(this.s[V])+Math.abs(this.s[V+1]))){e[V]=0;break}if(V===a-2)Et=4;else{var Lt=void 0;for(Lt=a-1;Lt>=V&&Lt!==V;Lt--){var kt=(Lt!==a?Math.abs(e[Lt]):0)+(Lt!==V+1?Math.abs(e[Lt-1]):0);if(Math.abs(this.s[Lt])<=ot+tt*kt){this.s[Lt]=0;break}}Lt===V?Et=3:Lt===a-1?Et=1:(Et=2,V=Lt)}switch(V++,Et){case 1:var bt=e[a-2];e[a-2]=0;for(var K=a-2;K>=V;K--){var it=c.hypot(this.s[K],bt),pt=this.s[K]/it,ct=bt/it;this.s[K]=it,K!==V&&(bt=-ct*e[K-1],e[K-1]=pt*e[K-1]);for(var yt=0;yt<this.n;yt++)it=pt*this.V[yt][K]+ct*this.V[yt][a-1],this.V[yt][a-1]=-ct*this.V[yt][K]+pt*this.V[yt][a-1],this.V[yt][K]=it}break;case 2:var Nt=e[V-1];e[V-1]=0;for(var ht=V;ht<a;ht++){var At=c.hypot(this.s[ht],Nt),Ot=this.s[ht]/At,Dt=Nt/At;this.s[ht]=At,Nt=-Dt*e[ht],e[ht]=Ot*e[ht];for(var xt=0;xt<this.m;xt++)At=Ot*this.U[xt][ht]+Dt*this.U[xt][V-1],this.U[xt][V-1]=-Dt*this.U[xt][ht]+Ot*this.U[xt][V-1],this.U[xt][ht]=At}break;case 3:var Ct=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[a-1]),Math.abs(this.s[a-2])),Math.abs(e[a-2])),Math.abs(this.s[V])),Math.abs(e[V])),R=this.s[a-1]/Ct,k=this.s[a-2]/Ct,J=e[a-2]/Ct,Z=this.s[V]/Ct,at=e[V]/Ct,_t=((k+R)*(k-R)+J*J)/2,nt=R*J*(R*J),vt=0;(function(wt,ut){return wt||ut})(_t!==0,nt!==0)&&(vt=Math.sqrt(_t*_t+nt),_t<0&&(vt=-vt),vt=nt/(_t+vt));for(var ft=(Z+R)*(Z-R)+vt,Ut=Z*at,rt=V;rt<a-1;rt++){var mt=c.hypot(ft,Ut),lt=ft/mt,$=Ut/mt;rt!==V&&(e[rt-1]=mt),ft=lt*this.s[rt]+$*e[rt],e[rt]=lt*e[rt]-$*this.s[rt],Ut=$*this.s[rt+1],this.s[rt+1]=lt*this.s[rt+1];for(var gt=0;gt<this.n;gt++)mt=lt*this.V[gt][rt]+$*this.V[gt][rt+1],this.V[gt][rt+1]=-$*this.V[gt][rt]+lt*this.V[gt][rt+1],this.V[gt][rt]=mt;if(lt=ft/(mt=c.hypot(ft,Ut)),$=Ut/mt,this.s[rt]=mt,ft=lt*e[rt]+$*this.s[rt+1],this.s[rt+1]=-$*e[rt]+lt*this.s[rt+1],Ut=$*e[rt+1],e[rt+1]=lt*e[rt+1],rt<this.m-1)for(var Tt=0;Tt<this.m;Tt++)mt=lt*this.U[Tt][rt]+$*this.U[Tt][rt+1],this.U[Tt][rt+1]=-$*this.U[Tt][rt]+lt*this.U[Tt][rt+1],this.U[Tt][rt]=mt}e[a-2]=ft;break;case 4:if(this.s[V]<=0){this.s[V]=this.s[V]<0?-this.s[V]:0;for(var st=0;st<=j;st++)this.V[st][V]=-this.V[st][V]}for(;V<j&&!(this.s[V]>=this.s[V+1]);){var Pt=this.s[V];if(this.s[V]=this.s[V+1],this.s[V+1]=Pt,V<this.n-1)for(var Gt=0;Gt<this.n;Gt++)Pt=this.V[Gt][V+1],this.V[Gt][V+1]=this.V[Gt][V],this.V[Gt][V]=Pt;if(V<this.m-1)for(var Rt=0;Rt<this.m;Rt++)Pt=this.U[Rt][V+1],this.U[Rt][V+1]=this.U[Rt][V],this.U[Rt][V]=Pt;V++}a--}}return{U:this.U,V:this.V,S:this.s}},c.hypot=function(o,s){var e=void 0;return Math.abs(o)>Math.abs(s)?(e=s/o,e=Math.abs(o)*Math.sqrt(1+e*e)):s!=0?(e=o/s,e=Math.abs(s)*Math.sqrt(1+e*e)):e=0,e},w.exports=c},function(w,_,T){var c=function(){function s(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&s(e.prototype,r),n&&s(e,n),e}}(),o=function(){function s(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;(function(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")})(this,s),this.sequence1=e,this.sequence2=r,this.match_score=n,this.mismatch_penalty=i,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=r.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.grid[h][l]=0}this.tracebackGrid=new Array(this.iMax);for(var g=0;g<this.iMax;g++){this.tracebackGrid[g]=new Array(this.jMax);for(var d=0;d<this.jMax;d++)this.tracebackGrid[g][d]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return c(s,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var r=1;r<this.iMax;r++)this.grid[r][0]=this.grid[r-1][0]+this.gap_penalty,this.tracebackGrid[r][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var i=1;i<this.jMax;i++){var t=[this.sequence1[n-1]===this.sequence2[i-1]?this.grid[n-1][i-1]+this.match_score:this.grid[n-1][i-1]+this.mismatch_penalty,this.grid[n-1][i]+this.gap_penalty,this.grid[n][i-1]+this.gap_penalty],h=this.arrayAllMaxIndexes(t);this.grid[n][i]=t[h[0]],this.tracebackGrid[n][i]=[h.includes(0),h.includes(1),h.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});e[0];){var r=e[0],n=this.tracebackGrid[r.pos[0]][r.pos[1]];n[0]&&e.push({pos:[r.pos[0]-1,r.pos[1]-1],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),n[1]&&e.push({pos:[r.pos[0]-1,r.pos[1]],seq1:this.sequence1[r.pos[0]-1]+r.seq1,seq2:"-"+r.seq2}),n[2]&&e.push({pos:[r.pos[0],r.pos[1]-1],seq1:"-"+r.seq1,seq2:this.sequence2[r.pos[1]-1]+r.seq2}),r.pos[0]===0&&r.pos[1]===0&&this.alignments.push({sequence1:r.seq1,sequence2:r.seq2}),e.shift()}return this.alignments}},{key:"getAllIndexes",value:function(e,r){for(var n=[],i=-1;(i=e.indexOf(r,i+1))!==-1;)n.push(i);return n}},{key:"arrayAllMaxIndexes",value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),s}();w.exports=o},function(w,_,T){var c=function(){};c.FDLayout=T(18),c.FDLayoutConstants=T(4),c.FDLayoutEdge=T(19),c.FDLayoutNode=T(20),c.DimensionD=T(21),c.HashMap=T(22),c.HashSet=T(23),c.IGeometry=T(8),c.IMath=T(9),c.Integer=T(10),c.Point=T(12),c.PointD=T(5),c.RandomSeed=T(16),c.RectangleD=T(13),c.Transform=T(17),c.UniqueIDGeneretor=T(14),c.Quicksort=T(25),c.LinkedList=T(11),c.LGraphObject=T(2),c.LGraph=T(6),c.LEdge=T(1),c.LGraphManager=T(7),c.LNode=T(3),c.Layout=T(15),c.LayoutConstants=T(0),c.NeedlemanWunsch=T(27),c.Matrix=T(24),c.SVD=T(26),w.exports=c},function(w,_,T){function c(){this.listeners=[]}var o=c.prototype;o.addListener=function(s,e){this.listeners.push({event:s,callback:e})},o.removeListener=function(s,e){for(var r=this.listeners.length;r>=0;r--){var n=this.listeners[r];n.event===s&&n.callback===e&&this.listeners.splice(r,1)}},o.emit=function(s,e){for(var r=0;r<this.listeners.length;r++){var n=this.listeners[r];s===n.event&&n.callback(e)}},w.exports=c}])},_e.exports=N());var N}var Me;function lr(){return Me?Le.exports:(Me=1,N=function(w){return _={45:(o,s,e)=>{var r={};r.layoutBase=e(551),r.CoSEConstants=e(806),r.CoSEEdge=e(767),r.CoSEGraph=e(880),r.CoSEGraphManager=e(578),r.CoSELayout=e(765),r.CoSENode=e(991),r.ConstraintHandler=e(902),o.exports=r},806:(o,s,e)=>{var r=e(551).FDLayoutConstants;function n(){}for(var i in r)n[i]=r[i];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,n.ENFORCE_CONSTRAINTS=!0,n.APPLY_LAYOUT=!0,n.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,n.TREE_REDUCTION_ON_INCREMENTAL=!0,n.PURE_INCREMENTAL=n.DEFAULT_INCREMENTAL,o.exports=n},767:(o,s,e)=>{var r=e(551).FDLayoutEdge;function n(t,h,l){r.call(this,t,h,l)}for(var i in n.prototype=Object.create(r.prototype),r)n[i]=r[i];o.exports=n},880:(o,s,e)=>{var r=e(551).LGraph;function n(t,h,l){r.call(this,t,h,l)}for(var i in n.prototype=Object.create(r.prototype),r)n[i]=r[i];o.exports=n},578:(o,s,e)=>{var r=e(551).LGraphManager;function n(t){r.call(this,t)}for(var i in n.prototype=Object.create(r.prototype),r)n[i]=r[i];o.exports=n},765:(o,s,e)=>{var r=e(551).FDLayout,n=e(578),i=e(880),t=e(991),h=e(767),l=e(806),g=e(902),d=e(551).FDLayoutConstants,y=e(551).LayoutConstants,v=e(551).Point,E=e(551).PointD,A=e(551).DimensionD,M=e(551).Layout,P=e(551).Integer,b=e(551).IGeometry,Y=e(551).LGraph,H=e(551).Transform,q=e(551).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var B in x.prototype=Object.create(r.prototype),r)x[B]=r[B];x.prototype.newGraphManager=function(){var a=new n(this);return this.graphManager=a,a},x.prototype.newGraph=function(a){return new i(null,this.graphManager,a)},x.prototype.newNode=function(a){return new t(this.graphManager,a)},x.prototype.newEdge=function(a){return new h(null,null,a)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(l.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return y.DEFAULT_CREATE_BENDS_AS_NEEDED&&(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)l.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(f){return m.has(f)}),this.graphManager.setAllNodesToApplyGravitation(u));else{var a=this.getFlatForest();if(a.length>0)this.positionNodesRadially(a);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(f){return m.has(f)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),l.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))return!0;this.isTreeGrowing=!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!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 a=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(p){return a.has(p)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),l.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=d.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()),l.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,f=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,f),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),m={},u=0;u<a.length;u++){var f=a[u].rect,p=a[u].id;m[p]={id:p,x:f.getCenterX(),y:f.getCenterY(),w:f.width,h:f.height}}return m},x.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var a=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!a;)a=this.tick();this.graphManager.updateBounds()}},x.prototype.moveNodes=function(){for(var a=this.getAllNodes(),m=0;m<a.length;m++)a[m].calculateDisplacement();for(Object.keys(this.constraints).length>0&&this.updateDisplacements(),m=0;m<a.length;m++)a[m].move()},x.prototype.initConstraintVariables=function(){var a=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var m=this.graphManager.getAllNodes(),u=0;u<m.length;u++){var f=m[u];this.idToNodeMap.set(f.id,f)}var p=function O(X){for(var j,tt=X.getChild().getNodes(),ot=0,V=0;V<tt.length;V++)(j=tt[V]).getChild()==null?a.fixedNodeSet.has(j.id)&&(ot+=100):ot+=O(j);return ot};if(this.constraints.fixedNodeConstraint){for(this.constraints.fixedNodeConstraint.forEach(function(O){a.fixedNodeSet.add(O.nodeId)}),m=this.graphManager.getAllNodes(),u=0;u<m.length;u++)if((f=m[u]).getChild()!=null){var I=p(f);I>0&&(f.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var L=new Map,C=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){a.fixedNodesOnHorizontal.add(O),a.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var G=this.constraints.alignmentConstraint.vertical;for(u=0;u<G.length;u++)this.dummyToNodeForVerticalAlignment.set("dummy"+u,[]),G[u].forEach(function(O){L.set(O,"dummy"+u),a.dummyToNodeForVerticalAlignment.get("dummy"+u).push(O),a.fixedNodeSet.has(O)&&a.fixedNodesOnHorizontal.add("dummy"+u)})}if(this.constraints.alignmentConstraint.horizontal){var S=this.constraints.alignmentConstraint.horizontal;for(u=0;u<S.length;u++)this.dummyToNodeForHorizontalAlignment.set("dummy"+u,[]),S[u].forEach(function(O){C.set(O,"dummy"+u),a.dummyToNodeForHorizontalAlignment.get("dummy"+u).push(O),a.fixedNodeSet.has(O)&&a.fixedNodesOnVertical.add("dummy"+u)})}}if(l.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(O){var X,j,tt;for(tt=O.length-1;tt>=2*O.length/3;tt--)X=Math.floor(Math.random()*(tt+1)),j=O[tt],O[tt]=O[X],O[X]=j;return O},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(O){if(O.left){var X=L.has(O.left)?L.get(O.left):O.left,j=L.has(O.right)?L.get(O.right):O.right;a.nodesInRelativeHorizontal.includes(X)||(a.nodesInRelativeHorizontal.push(X),a.nodeToRelativeConstraintMapHorizontal.set(X,[]),a.dummyToNodeForVerticalAlignment.has(X)?a.nodeToTempPositionMapHorizontal.set(X,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(X,a.idToNodeMap.get(X).getCenterX())),a.nodesInRelativeHorizontal.includes(j)||(a.nodesInRelativeHorizontal.push(j),a.nodeToRelativeConstraintMapHorizontal.set(j,[]),a.dummyToNodeForVerticalAlignment.has(j)?a.nodeToTempPositionMapHorizontal.set(j,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(j)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(j,a.idToNodeMap.get(j).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(X).push({right:j,gap:O.gap}),a.nodeToRelativeConstraintMapHorizontal.get(j).push({left:X,gap:O.gap})}else{var tt=C.has(O.top)?C.get(O.top):O.top,ot=C.has(O.bottom)?C.get(O.bottom):O.bottom;a.nodesInRelativeVertical.includes(tt)||(a.nodesInRelativeVertical.push(tt),a.nodeToRelativeConstraintMapVertical.set(tt,[]),a.dummyToNodeForHorizontalAlignment.has(tt)?a.nodeToTempPositionMapVertical.set(tt,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(tt,a.idToNodeMap.get(tt).getCenterY())),a.nodesInRelativeVertical.includes(ot)||(a.nodesInRelativeVertical.push(ot),a.nodeToRelativeConstraintMapVertical.set(ot,[]),a.dummyToNodeForHorizontalAlignment.has(ot)?a.nodeToTempPositionMapVertical.set(ot,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(ot)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(ot,a.idToNodeMap.get(ot).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ot,gap:O.gap}),a.nodeToRelativeConstraintMapVertical.get(ot).push({top:tt,gap:O.gap})}});else{var F=new Map,D=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=L.has(O.left)?L.get(O.left):O.left,j=L.has(O.right)?L.get(O.right):O.right;F.has(X)?F.get(X).push(j):F.set(X,[j]),F.has(j)?F.get(j).push(X):F.set(j,[X])}else{var tt=C.has(O.top)?C.get(O.top):O.top,ot=C.has(O.bottom)?C.get(O.bottom):O.bottom;D.has(tt)?D.get(tt).push(ot):D.set(tt,[ot]),D.has(ot)?D.get(ot).push(tt):D.set(ot,[tt])}});var z=function(O,X){var j=[],tt=[],ot=new q,V=new Set,Et=0;return O.forEach(function(Lt,kt){if(!V.has(kt)){j[Et]=[],tt[Et]=!1;var bt=kt;for(ot.push(bt),V.add(bt),j[Et].push(bt);ot.length!=0;)bt=ot.shift(),X.has(bt)&&(tt[Et]=!0),O.get(bt).forEach(function(K){V.has(K)||(ot.push(K),V.add(K),j[Et].push(K))});Et++}}),{components:j,isFixed:tt}},W=z(F,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=W.components,this.fixedComponentsOnHorizontal=W.isFixed;var U=z(D,a.fixedNodesOnVertical);this.componentsOnVertical=U.components,this.fixedComponentsOnVertical=U.isFixed}}},x.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(U){var O=a.idToNodeMap.get(U.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,u=0;u<m.length;u++){for(var f=0,p=0;p<m[u].length;p++){if(this.fixedNodeSet.has(m[u][p])){f=0;break}f+=this.idToNodeMap.get(m[u][p]).displacementX}var I=f/m[u].length;for(p=0;p<m[u].length;p++)this.idToNodeMap.get(m[u][p]).displacementX=I}if(this.constraints.alignmentConstraint.horizontal){var L=this.constraints.alignmentConstraint.horizontal;for(u=0;u<L.length;u++){var C=0;for(p=0;p<L[u].length;p++){if(this.fixedNodeSet.has(L[u][p])){C=0;break}C+=this.idToNodeMap.get(L[u][p]).displacementY}var G=C/L[u].length;for(p=0;p<L[u].length;p++)this.idToNodeMap.get(L[u][p]).displacementY=G}}}if(this.constraints.relativePlacementConstraint)if(l.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(U){if(!a.fixedNodesOnHorizontal.has(U)){var O=0;O=a.dummyToNodeForVerticalAlignment.has(U)?a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(U)[0]).displacementX:a.idToNodeMap.get(U).displacementX,a.nodeToRelativeConstraintMapHorizontal.get(U).forEach(function(X){var j;X.right?(j=a.nodeToTempPositionMapHorizontal.get(X.right)-a.nodeToTempPositionMapHorizontal.get(U)-O)<X.gap&&(O-=X.gap-j):(j=a.nodeToTempPositionMapHorizontal.get(U)-a.nodeToTempPositionMapHorizontal.get(X.left)+O)<X.gap&&(O+=X.gap-j)}),a.nodeToTempPositionMapHorizontal.set(U,a.nodeToTempPositionMapHorizontal.get(U)+O),a.dummyToNodeForVerticalAlignment.has(U)?a.dummyToNodeForVerticalAlignment.get(U).forEach(function(X){a.idToNodeMap.get(X).displacementX=O}):a.idToNodeMap.get(U).displacementX=O}}),this.nodesInRelativeVertical.forEach(function(U){if(!a.fixedNodesOnHorizontal.has(U)){var O=0;O=a.dummyToNodeForHorizontalAlignment.has(U)?a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(U)[0]).displacementY:a.idToNodeMap.get(U).displacementY,a.nodeToRelativeConstraintMapVertical.get(U).forEach(function(X){var j;X.bottom?(j=a.nodeToTempPositionMapVertical.get(X.bottom)-a.nodeToTempPositionMapVertical.get(U)-O)<X.gap&&(O-=X.gap-j):(j=a.nodeToTempPositionMapVertical.get(U)-a.nodeToTempPositionMapVertical.get(X.top)+O)<X.gap&&(O+=X.gap-j)}),a.nodeToTempPositionMapVertical.set(U,a.nodeToTempPositionMapVertical.get(U)+O),a.dummyToNodeForHorizontalAlignment.has(U)?a.dummyToNodeForHorizontalAlignment.get(U).forEach(function(X){a.idToNodeMap.get(X).displacementY=O}):a.idToNodeMap.get(U).displacementY=O}});else{for(u=0;u<this.componentsOnHorizontal.length;u++){var S=this.componentsOnHorizontal[u];if(this.fixedComponentsOnHorizontal[u])for(p=0;p<S.length;p++)this.dummyToNodeForVerticalAlignment.has(S[p])?this.dummyToNodeForVerticalAlignment.get(S[p]).forEach(function(U){a.idToNodeMap.get(U).displacementX=0}):this.idToNodeMap.get(S[p]).displacementX=0;else{var F=0,D=0;for(p=0;p<S.length;p++)this.dummyToNodeForVerticalAlignment.has(S[p])?(F+=(W=this.dummyToNodeForVerticalAlignment.get(S[p])).length*this.idToNodeMap.get(W[0]).displacementX,D+=W.length):(F+=this.idToNodeMap.get(S[p]).displacementX,D++);var z=F/D;for(p=0;p<S.length;p++)this.dummyToNodeForVerticalAlignment.has(S[p])?this.dummyToNodeForVerticalAlignment.get(S[p]).forEach(function(U){a.idToNodeMap.get(U).displacementX=z}):this.idToNodeMap.get(S[p]).displacementX=z}}for(u=0;u<this.componentsOnVertical.length;u++)if(S=this.componentsOnVertical[u],this.fixedComponentsOnVertical[u])for(p=0;p<S.length;p++)this.dummyToNodeForHorizontalAlignment.has(S[p])?this.dummyToNodeForHorizontalAlignment.get(S[p]).forEach(function(U){a.idToNodeMap.get(U).displacementY=0}):this.idToNodeMap.get(S[p]).displacementY=0;else{for(F=0,D=0,p=0;p<S.length;p++){var W;this.dummyToNodeForHorizontalAlignment.has(S[p])?(F+=(W=this.dummyToNodeForHorizontalAlignment.get(S[p])).length*this.idToNodeMap.get(W[0]).displacementY,D+=W.length):(F+=this.idToNodeMap.get(S[p]).displacementY,D++)}for(z=F/D,p=0;p<S.length;p++)this.dummyToNodeForHorizontalAlignment.has(S[p])?this.dummyToNodeForHorizontalAlignment.get(S[p]).forEach(function(U){a.idToNodeMap.get(U).displacementY=z}):this.idToNodeMap.get(S[p]).displacementY=z}}},x.prototype.calculateNodesToApplyGravitationTo=function(){var a,m,u=[],f=this.graphManager.getGraphs(),p=f.length;for(m=0;m<p;m++)(a=f[m]).updateConnected(),a.isConnected||(u=u.concat(a.getNodes()));return u},x.prototype.createBendpoints=function(){var a=[];a=a.concat(this.graphManager.getAllEdges());var m,u=new Set;for(m=0;m<a.length;m++){var f=a[m];if(!u.has(f)){var p=f.getSource(),I=f.getTarget();if(p==I)f.getBendpoints().push(new E),f.getBendpoints().push(new E),this.createDummyNodesForBendpoints(f),u.add(f);else{var L=[];if(L=(L=L.concat(p.getEdgeListToNode(I))).concat(I.getEdgeListToNode(p)),!u.has(L[0])){var C;if(L.length>1)for(C=0;C<L.length;C++){var G=L[C];G.getBendpoints().push(new E),this.createDummyNodesForBendpoints(G)}L.forEach(function(S){u.add(S)})}}}if(u.size==a.length)break}},x.prototype.positionNodesRadially=function(a){for(var m=new v(0,0),u=Math.ceil(Math.sqrt(a.length)),f=0,p=0,I=0,L=new E(0,0),C=0;C<a.length;C++){C%u==0&&(I=0,p=f,C!=0&&(p+=l.DEFAULT_COMPONENT_SEPERATION),f=0);var G=a[C],S=M.findCenterOfTree(G);m.x=I,m.y=p,(L=x.radialLayout(G,S,m)).y>f&&(f=Math.floor(L.y)),I=Math.floor(L.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new E(y.WORLD_CENTER_X-L.x/2,y.WORLD_CENTER_Y-L.y/2))},x.radialLayout=function(a,m,u){var f=Math.max(this.maxDiagonalInTree(a),l.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(m,null,0,359,0,f);var p=Y.calculateBounds(a),I=new H;I.setDeviceOrgX(p.getMinX()),I.setDeviceOrgY(p.getMinY()),I.setWorldOrgX(u.x),I.setWorldOrgY(u.y);for(var L=0;L<a.length;L++)a[L].transform(I);var C=new E(p.getMaxX(),p.getMaxY());return I.inverseTransformPoint(C)},x.branchRadialLayout=function(a,m,u,f,p,I){var L=(f-u+1)/2;L<0&&(L+=180);var C=(L+u)%360*b.TWO_PI/360,G=p*Math.cos(C),S=p*Math.sin(C);a.setCenter(G,S);var F=[],D=(F=F.concat(a.getEdges())).length;m!=null&&D--;for(var z,W=0,U=F.length,O=a.getEdgesBetween(m);O.length>1;){var X=O[0];O.splice(0,1);var j=F.indexOf(X);j>=0&&F.splice(j,1),U--,D--}z=m!=null?(F.indexOf(O[0])+1)%U:0;for(var tt=Math.abs(f-u)/D,ot=z;W!=D;ot=++ot%U){var V=F[ot].getOtherEnd(a);if(V!=m){var Et=(u+W*tt)%360,Lt=(Et+tt)%360;x.branchRadialLayout(V,a,Et,Lt,p+I,I),W++}}},x.maxDiagonalInTree=function(a){for(var m=P.MIN_VALUE,u=0;u<a.length;u++){var f=a[u].getDiagonal();f>m&&(m=f)}return m},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var a=this,m={};this.memberGroups={},this.idToDummyNode={};for(var u=[],f=this.graphManager.getAllNodes(),p=0;p<f.length;p++){var I=(L=f[p]).getParent();this.getNodeDegreeWithChildren(L)!==0||I.id!=null&&this.getToBeTiled(I)||u.push(L)}for(p=0;p<u.length;p++){var L,C=(L=u[p]).getParent().id;m[C]===void 0&&(m[C]=[]),m[C]=m[C].concat(L)}Object.keys(m).forEach(function(G){if(m[G].length>1){var S="DummyCompound_"+G;a.memberGroups[S]=m[G];var F=m[G][0].getParent(),D=new t(a.graphManager);D.id=S,D.paddingLeft=F.paddingLeft||0,D.paddingRight=F.paddingRight||0,D.paddingBottom=F.paddingBottom||0,D.paddingTop=F.paddingTop||0,a.idToDummyNode[S]=D;var z=a.getGraphManager().add(a.newGraph(),D),W=F.getChild();W.add(D);for(var U=0;U<m[G].length;U++){var O=m[G][U];W.remove(O),z.add(O)}}})},x.prototype.clearCompounds=function(){var a={},m={};this.performDFSOnCompounds();for(var u=0;u<this.compoundOrder.length;u++)m[this.compoundOrder[u].id]=this.compoundOrder[u],a[this.compoundOrder[u].id]=[].concat(this.compoundOrder[u].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[u].getChild()),this.compoundOrder[u].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(a,m)},x.prototype.clearZeroDegreeMembers=function(){var a=this,m=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(u){var f=a.idToDummyNode[u];if(m[u]=a.tileNodes(a.memberGroups[u],f.paddingLeft+f.paddingRight),f.rect.width=m[u].width,f.rect.height=m[u].height,f.setCenter(m[u].centerX,m[u].centerY),f.labelMarginLeft=0,f.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS){var p=f.rect.width,I=f.rect.height;f.labelWidth&&(f.labelPosHorizontal=="left"?(f.rect.x-=f.labelWidth,f.setWidth(p+f.labelWidth),f.labelMarginLeft=f.labelWidth):f.labelPosHorizontal=="center"&&f.labelWidth>p?(f.rect.x-=(f.labelWidth-p)/2,f.setWidth(f.labelWidth),f.labelMarginLeft=(f.labelWidth-p)/2):f.labelPosHorizontal=="right"&&f.setWidth(p+f.labelWidth)),f.labelHeight&&(f.labelPosVertical=="top"?(f.rect.y-=f.labelHeight,f.setHeight(I+f.labelHeight),f.labelMarginTop=f.labelHeight):f.labelPosVertical=="center"&&f.labelHeight>I?(f.rect.y-=(f.labelHeight-I)/2,f.setHeight(f.labelHeight),f.labelMarginTop=(f.labelHeight-I)/2):f.labelPosVertical=="bottom"&&f.setHeight(I+f.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var m=this.compoundOrder[a],u=m.id,f=m.paddingLeft,p=m.paddingTop,I=m.labelMarginLeft,L=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[u],m.rect.x,m.rect.y,f,p,I,L)}},x.prototype.repopulateZeroDegreeMembers=function(){var a=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(u){var f=a.idToDummyNode[u],p=f.paddingLeft,I=f.paddingTop,L=f.labelMarginLeft,C=f.labelMarginTop;a.adjustLocations(m[u],f.rect.x,f.rect.y,p,I,L,C)})},x.prototype.getToBeTiled=function(a){var m=a.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var u=a.getChild();if(u==null)return this.toBeTiled[m]=!1,!1;for(var f=u.getNodes(),p=0;p<f.length;p++){var I=f[p];if(this.getNodeDegree(I)>0)return this.toBeTiled[m]=!1,!1;if(I.getChild()!=null){if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}else this.toBeTiled[I.id]=!1}return this.toBeTiled[m]=!0,!0},x.prototype.getNodeDegree=function(a){a.id;for(var m=a.getEdges(),u=0,f=0;f<m.length;f++){var p=m[f];p.getSource().id!==p.getTarget().id&&(u+=1)}return u},x.prototype.getNodeDegreeWithChildren=function(a){var m=this.getNodeDegree(a);if(a.getChild()==null)return m;for(var u=a.getChild().getNodes(),f=0;f<u.length;f++){var p=u[f];m+=this.getNodeDegreeWithChildren(p)}return m},x.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},x.prototype.fillCompexOrderByDFS=function(a){for(var m=0;m<a.length;m++){var u=a[m];u.getChild()!=null&&this.fillCompexOrderByDFS(u.getChild().getNodes()),this.getToBeTiled(u)&&this.compoundOrder.push(u)}},x.prototype.adjustLocations=function(a,m,u,f,p,I,L){u+=p+L;for(var C=m+=f+I,G=0;G<a.rows.length;G++){var S=a.rows[G];m=C;for(var F=0,D=0;D<S.length;D++){var z=S[D];z.rect.x=m,z.rect.y=u,m+=z.rect.width+a.horizontalPadding,z.rect.height>F&&(F=z.rect.height)}u+=F+a.verticalPadding}},x.prototype.tileCompoundMembers=function(a,m){var u=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(f){var p=m[f];if(u.tiledMemberPack[f]=u.tileNodes(a[f],p.paddingLeft+p.paddingRight),p.rect.width=u.tiledMemberPack[f].width,p.rect.height=u.tiledMemberPack[f].height,p.setCenter(u.tiledMemberPack[f].centerX,u.tiledMemberPack[f].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS){var I=p.rect.width,L=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(I+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>I?(p.rect.x-=(p.labelWidth-I)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-I)/2):p.labelPosHorizontal=="right"&&p.setWidth(I+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(L+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>L?(p.rect.y-=(p.labelHeight-L)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-L)/2):p.labelPosVertical=="bottom"&&p.setHeight(L+p.labelHeight))}})},x.prototype.tileNodes=function(a,m){var u=this.tileNodesByFavoringDim(a,m,!0),f=this.tileNodesByFavoringDim(a,m,!1),p=this.getOrgRatio(u);return this.getOrgRatio(f)<p?f:u},x.prototype.getOrgRatio=function(a){var m=a.width/a.height;return m<1&&(m=1/m),m},x.prototype.calcIdealRowWidth=function(a,m){var u=l.TILING_PADDING_VERTICAL,f=l.TILING_PADDING_HORIZONTAL,p=a.length,I=0,L=0,C=0;a.forEach(function(U){I+=U.getWidth(),L+=U.getHeight(),U.getWidth()>C&&(C=U.getWidth())});var G,S=I/p,F=L/p,D=Math.pow(u-f,2)+4*(S+f)*(F+u)*p,z=(f-u+Math.sqrt(D))/(2*(S+f));m?(G=Math.ceil(z))==z&&G++:G=Math.floor(z);var W=G*(S+f)-f;return C>W&&(W=C),W+=2*f},x.prototype.tileNodesByFavoringDim=function(a,m,u){var f=l.TILING_PADDING_VERTICAL,p=l.TILING_PADDING_HORIZONTAL,I=l.TILING_COMPARE_BY,L={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:f,horizontalPadding:p,centerX:0,centerY:0};I&&(L.idealRowWidth=this.calcIdealRowWidth(a,u));var C=function(U){return U.rect.width*U.rect.height},G=function(U,O){return C(O)-C(U)};a.sort(function(U,O){var X=G;return L.idealRowWidth?(X=I)(U.id,O.id):X(U,O)});for(var S=0,F=0,D=0;D<a.length;D++)S+=(z=a[D]).getCenterX(),F+=z.getCenterY();for(L.centerX=S/a.length,L.centerY=F/a.length,D=0;D<a.length;D++){var z=a[D];if(L.rows.length==0)this.insertNodeToRow(L,z,0,m);else if(this.canAddHorizontal(L,z.rect.width,z.rect.height)){var W=L.rows.length-1;L.idealRowWidth||(W=this.getShortestRowIndex(L)),this.insertNodeToRow(L,z,W,m)}else this.insertNodeToRow(L,z,L.rows.length,m);this.shiftToLastRow(L)}return L},x.prototype.insertNodeToRow=function(a,m,u,f){var p=f;u==a.rows.length&&(a.rows.push([]),a.rowWidth.push(p),a.rowHeight.push(0));var I=a.rowWidth[u]+m.rect.width;a.rows[u].length>0&&(I+=a.horizontalPadding),a.rowWidth[u]=I,a.width<I&&(a.width=I);var L=m.rect.height;u>0&&(L+=a.verticalPadding);var C=0;L>a.rowHeight[u]&&(C=a.rowHeight[u],a.rowHeight[u]=L,C=a.rowHeight[u]-C),a.height+=C,a.rows[u].push(m)},x.prototype.getShortestRowIndex=function(a){for(var m=-1,u=Number.MAX_VALUE,f=0;f<a.rows.length;f++)a.rowWidth[f]<u&&(m=f,u=a.rowWidth[f]);return m},x.prototype.getLongestRowIndex=function(a){for(var m=-1,u=Number.MIN_VALUE,f=0;f<a.rows.length;f++)a.rowWidth[f]>u&&(m=f,u=a.rowWidth[f]);return m},x.prototype.canAddHorizontal=function(a,m,u){if(a.idealRowWidth){var f=a.rows.length-1;return a.rowWidth[f]+m+a.horizontalPadding<=a.idealRowWidth}var p=this.getShortestRowIndex(a);if(p<0)return!0;var I=a.rowWidth[p];if(I+a.horizontalPadding+m<=a.width)return!0;var L,C,G=0;return a.rowHeight[p]<u&&p>0&&(G=u+a.verticalPadding-a.rowHeight[p]),L=a.width-I>=m+a.horizontalPadding?(a.height+G)/(I+m+a.horizontalPadding):(a.height+G)/a.width,G=u+a.verticalPadding,(C=a.width<m?(a.height+G)/m:(a.height+G)/a.width)<1&&(C=1/C),L<1&&(L=1/L),L<C},x.prototype.shiftToLastRow=function(a){var m=this.getLongestRowIndex(a),u=a.rowWidth.length-1,f=a.rows[m],p=f[f.length-1],I=p.width+a.horizontalPadding;if(a.width-a.rowWidth[u]>I&&m!=u){f.splice(-1,1),a.rows[u].push(p),a.rowWidth[m]=a.rowWidth[m]-I,a.rowWidth[u]=a.rowWidth[u]+I,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var L=Number.MIN_VALUE,C=0;C<f.length;C++)f[C].height>L&&(L=f[C].height);m>0&&(L+=a.verticalPadding);var G=a.rowHeight[m]+a.rowHeight[u];a.rowHeight[m]=L,a.rowHeight[u]<p.height+a.verticalPadding&&(a.rowHeight[u]=p.height+a.verticalPadding);var S=a.rowHeight[m]+a.rowHeight[u];a.height+=S-G,this.shiftToLastRow(a)}},x.prototype.tilingPreLayout=function(){l.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},x.prototype.tilingPostLayout=function(){l.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},x.prototype.reduceTrees=function(){for(var a,m=[],u=!0;u;){var f=this.graphManager.getAllNodes(),p=[];u=!1;for(var I=0;I<f.length;I++)if((a=f[I]).getEdges().length==1&&!a.getEdges()[0].isInterGraph&&a.getChild()==null){if(l.PURE_INCREMENTAL){var L=a.getEdges()[0].getOtherEnd(a),C=new A(a.getCenterX()-L.getCenterX(),a.getCenterY()-L.getCenterY());p.push([a,a.getEdges()[0],a.getOwner(),C])}else p.push([a,a.getEdges()[0],a.getOwner()]);u=!0}if(u==1){for(var G=[],S=0;S<p.length;S++)p[S][0].getEdges().length==1&&(G.push(p[S]),p[S][0].getOwner().remove(p[S][0]));m.push(G),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=m},x.prototype.growTree=function(a){for(var m,u=a[a.length-1],f=0;f<u.length;f++)m=u[f],this.findPlaceforPrunedNode(m),m[2].add(m[0]),m[2].add(m[1],m[1].source,m[1].target);a.splice(a.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},x.prototype.findPlaceforPrunedNode=function(a){var m,u,f=a[0];if(u=f==a[1].source?a[1].target:a[1].source,l.PURE_INCREMENTAL)f.setCenter(u.getCenterX()+a[3].getWidth(),u.getCenterY()+a[3].getHeight());else{var p=u.startX,I=u.finishX,L=u.startY,C=u.finishY,G=[0,0,0,0];if(L>0)for(var S=p;S<=I;S++)G[0]+=this.grid[S][L-1].length+this.grid[S][L].length-1;if(I<this.grid.length-1)for(S=L;S<=C;S++)G[1]+=this.grid[I+1][S].length+this.grid[I][S].length-1;if(C<this.grid[0].length-1)for(S=p;S<=I;S++)G[2]+=this.grid[S][C+1].length+this.grid[S][C].length-1;if(p>0)for(S=L;S<=C;S++)G[3]+=this.grid[p-1][S].length+this.grid[p][S].length-1;for(var F,D,z=P.MAX_VALUE,W=0;W<G.length;W++)G[W]<z?(z=G[W],F=1,D=W):G[W]==z&&F++;if(F==3&&z==0)G[0]==0&&G[1]==0&&G[2]==0?m=1:G[0]==0&&G[1]==0&&G[3]==0?m=0:G[0]==0&&G[2]==0&&G[3]==0?m=3:G[1]==0&&G[2]==0&&G[3]==0&&(m=2);else if(F==2&&z==0){var U=Math.floor(2*Math.random());m=G[0]==0&&G[1]==0?U==0?0:1:G[0]==0&&G[2]==0?U==0?0:2:G[0]==0&&G[3]==0?U==0?0:3:G[1]==0&&G[2]==0?U==0?1:2:G[1]==0&&G[3]==0?U==0?1:3:U==0?2:3}else m=F==4&&z==0?U=Math.floor(4*Math.random()):D;m==0?f.setCenter(u.getCenterX(),u.getCenterY()-u.getHeight()/2-d.DEFAULT_EDGE_LENGTH-f.getHeight()/2):m==1?f.setCenter(u.getCenterX()+u.getWidth()/2+d.DEFAULT_EDGE_LENGTH+f.getWidth()/2,u.getCenterY()):m==2?f.setCenter(u.getCenterX(),u.getCenterY()+u.getHeight()/2+d.DEFAULT_EDGE_LENGTH+f.getHeight()/2):f.setCenter(u.getCenterX()-u.getWidth()/2-d.DEFAULT_EDGE_LENGTH-f.getWidth()/2,u.getCenterY())}},o.exports=x},991:(o,s,e)=>{var r=e(551).FDLayoutNode,n=e(551).IMath;function i(h,l,g,d){r.call(this,h,l,g,d)}for(var t in i.prototype=Object.create(r.prototype),r)i[t]=r[t];i.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*n.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},i.prototype.propogateDisplacementToChildren=function(h,l){for(var g,d=this.getChild().getNodes(),y=0;y<d.length;y++)(g=d[y]).getChild()==null?(g.displacementX+=h,g.displacementY+=l):g.propogateDisplacementToChildren(h,l)},i.prototype.move=function(){var h=this.graphManager.getLayout();this.child!=null&&this.child.getNodes().length!=0||(this.moveBy(this.displacementX,this.displacementY),h.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.setPred1=function(h){this.pred1=h},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(h){this.next=h},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(h){this.processed=h},i.prototype.isProcessed=function(){return processed},o.exports=i},902:(o,s,e)=>{function r(g){if(Array.isArray(g)){for(var d=0,y=Array(g.length);d<g.length;d++)y[d]=g[d];return y}return Array.from(g)}var n=e(806),i=e(551).LinkedList,t=e(551).Matrix,h=e(551).SVD;function l(){}l.handleConstraints=function(g){var d={};d.fixedNodeConstraint=g.constraints.fixedNodeConstraint,d.alignmentConstraint=g.constraints.alignmentConstraint,d.relativePlacementConstraint=g.constraints.relativePlacementConstraint;for(var y=new Map,v=new Map,E=[],A=[],M=g.getAllNodes(),P=0,b=0;b<M.length;b++){var Y=M[b];Y.getChild()==null&&(v.set(Y.id,P++),E.push(Y.getCenterX()),A.push(Y.getCenterY()),y.set(Y.id,Y))}d.relativePlacementConstraint&&d.relativePlacementConstraint.forEach(function(R){R.gap||R.gap==0||(R.left?R.gap=n.DEFAULT_EDGE_LENGTH+y.get(R.left).getWidth()/2+y.get(R.right).getWidth()/2:R.gap=n.DEFAULT_EDGE_LENGTH+y.get(R.top).getHeight()/2+y.get(R.bottom).getHeight()/2)});var H=function(R){var k=0,J=0;return R.forEach(function(Z){k+=E[v.get(Z)],J+=A[v.get(Z)]}),{x:k/R.size,y:J/R.size}},q=function(R,k,J,Z,at){var _t=new Map;R.forEach(function(lt,$){_t.set($,0)}),R.forEach(function(lt,$){lt.forEach(function(gt){_t.set(gt.id,_t.get(gt.id)+1)})});var nt=new Map,vt=new Map,ft=new i;_t.forEach(function(lt,$){lt==0?(ft.push($),J||(k=="horizontal"?nt.set($,v.has($)?E[v.get($)]:Z.get($)):nt.set($,v.has($)?A[v.get($)]:Z.get($)))):nt.set($,Number.NEGATIVE_INFINITY),J&&vt.set($,new Set([$]))}),J&&at.forEach(function(lt){var $=[];if(lt.forEach(function(st){J.has(st)&&$.push(st)}),$.length>0){var gt=0;$.forEach(function(st){k=="horizontal"?(nt.set(st,v.has(st)?E[v.get(st)]:Z.get(st)),gt+=nt.get(st)):(nt.set(st,v.has(st)?A[v.get(st)]:Z.get(st)),gt+=nt.get(st))}),gt/=$.length,lt.forEach(function(st){J.has(st)||nt.set(st,gt)})}else{var Tt=0;lt.forEach(function(st){Tt+=k=="horizontal"?v.has(st)?E[v.get(st)]:Z.get(st):v.has(st)?A[v.get(st)]:Z.get(st)}),Tt/=lt.length,lt.forEach(function(st){nt.set(st,Tt)})}});for(var Ut=function(){var lt=ft.shift();R.get(lt).forEach(function($){if(nt.get($.id)<nt.get(lt)+$.gap)if(J&&J.has($.id)){var gt=void 0;if(gt=k=="horizontal"?v.has($.id)?E[v.get($.id)]:Z.get($.id):v.has($.id)?A[v.get($.id)]:Z.get($.id),nt.set($.id,gt),gt<nt.get(lt)+$.gap){var Tt=nt.get(lt)+$.gap-gt;vt.get(lt).forEach(function(st){nt.set(st,nt.get(st)-Tt)})}}else nt.set($.id,nt.get(lt)+$.gap);_t.set($.id,_t.get($.id)-1),_t.get($.id)==0&&ft.push($.id),J&&vt.set($.id,function(st,Pt){var Gt=new Set(st),Rt=!0,wt=!1,ut=void 0;try{for(var Ft,Mt=Pt[Symbol.iterator]();!(Rt=(Ft=Mt.next()).done);Rt=!0){var Ht=Ft.value;Gt.add(Ht)}}catch(Vt){wt=!0,ut=Vt}finally{try{!Rt&&Mt.return&&Mt.return()}finally{if(wt)throw ut}}return Gt}(vt.get(lt),vt.get($.id)))})};ft.length!=0;)Ut();if(J){var rt=new Set;R.forEach(function(lt,$){lt.length==0&&rt.add($)});var mt=[];vt.forEach(function(lt,$){if(rt.has($)){var gt=!1,Tt=!0,st=!1,Pt=void 0;try{for(var Gt,Rt=lt[Symbol.iterator]();!(Tt=(Gt=Rt.next()).done);Tt=!0){var wt=Gt.value;J.has(wt)&&(gt=!0)}}catch(Mt){st=!0,Pt=Mt}finally{try{!Tt&&Rt.return&&Rt.return()}finally{if(st)throw Pt}}if(!gt){var ut=!1,Ft=void 0;mt.forEach(function(Mt,Ht){Mt.has([].concat(r(lt))[0])&&(ut=!0,Ft=Ht)}),ut?lt.forEach(function(Mt){mt[Ft].add(Mt)}):mt.push(new Set(lt))}}}),mt.forEach(function(lt,$){var gt=Number.POSITIVE_INFINITY,Tt=Number.POSITIVE_INFINITY,st=Number.NEGATIVE_INFINITY,Pt=Number.NEGATIVE_INFINITY,Gt=!0,Rt=!1,wt=void 0;try{for(var ut,Ft=lt[Symbol.iterator]();!(Gt=(ut=Ft.next()).done);Gt=!0){var Mt=ut.value,Ht=void 0;Ht=k=="horizontal"?v.has(Mt)?E[v.get(Mt)]:Z.get(Mt):v.has(Mt)?A[v.get(Mt)]:Z.get(Mt);var Vt=nt.get(Mt);Ht<gt&&(gt=Ht),Ht>st&&(st=Ht),Vt<Tt&&(Tt=Vt),Vt>Pt&&(Pt=Vt)}}catch(jt){Rt=!0,wt=jt}finally{try{!Gt&&Ft.return&&Ft.return()}finally{if(Rt)throw wt}}var ie=(gt+st)/2-(Tt+Pt)/2,Kt=!0,qt=!1,$t=void 0;try{for(var Zt,Bt=lt[Symbol.iterator]();!(Kt=(Zt=Bt.next()).done);Kt=!0){var ee=Zt.value;nt.set(ee,nt.get(ee)+ie)}}catch(jt){qt=!0,$t=jt}finally{try{!Kt&&Bt.return&&Bt.return()}finally{if(qt)throw $t}}})}return nt},x=function(R){var k=0,J=0,Z=0,at=0;if(R.forEach(function(ft){ft.left?E[v.get(ft.left)]-E[v.get(ft.right)]>=0?k++:J++:A[v.get(ft.top)]-A[v.get(ft.bottom)]>=0?Z++:at++}),k>J&&Z>at)for(var _t=0;_t<v.size;_t++)E[_t]=-1*E[_t],A[_t]=-1*A[_t];else if(k>J)for(var nt=0;nt<v.size;nt++)E[nt]=-1*E[nt];else if(Z>at)for(var vt=0;vt<v.size;vt++)A[vt]=-1*A[vt]},B=function(R){var k=[],J=new i,Z=new Set,at=0;return R.forEach(function(_t,nt){if(!Z.has(nt)){k[at]=[];var vt=nt;for(J.push(vt),Z.add(vt),k[at].push(vt);J.length!=0;)vt=J.shift(),R.get(vt).forEach(function(ft){Z.has(ft.id)||(J.push(ft.id),Z.add(ft.id),k[at].push(ft.id))});at++}}),k},a=function(R){var k=new Map;return R.forEach(function(J,Z){k.set(Z,[])}),R.forEach(function(J,Z){J.forEach(function(at){k.get(Z).push(at),k.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),k},m=function(R){var k=new Map;return R.forEach(function(J,Z){k.set(Z,[])}),R.forEach(function(J,Z){J.forEach(function(at){k.get(at.id).push({id:Z,gap:at.gap,direction:at.direction})})}),k},u=[],f=[],p=!1,I=!1,L=new Set,C=new Map,G=new Map,S=[];if(d.fixedNodeConstraint&&d.fixedNodeConstraint.forEach(function(R){L.add(R.nodeId)}),d.relativePlacementConstraint&&(d.relativePlacementConstraint.forEach(function(R){R.left?(C.has(R.left)?C.get(R.left).push({id:R.right,gap:R.gap,direction:"horizontal"}):C.set(R.left,[{id:R.right,gap:R.gap,direction:"horizontal"}]),C.has(R.right)||C.set(R.right,[])):(C.has(R.top)?C.get(R.top).push({id:R.bottom,gap:R.gap,direction:"vertical"}):C.set(R.top,[{id:R.bottom,gap:R.gap,direction:"vertical"}]),C.has(R.bottom)||C.set(R.bottom,[]))}),G=a(C),S=B(G)),n.TRANSFORM_ON_CONSTRAINT_HANDLING){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>1)d.fixedNodeConstraint.forEach(function(R,k){u[k]=[R.position.x,R.position.y],f[k]=[E[v.get(R.nodeId)],A[v.get(R.nodeId)]]}),p=!0;else if(d.alignmentConstraint)(function(){var R=0;if(d.alignmentConstraint.vertical){for(var k=d.alignmentConstraint.vertical,J=function(vt){var ft=new Set;k[vt].forEach(function(mt){ft.add(mt)});var Ut=new Set([].concat(r(ft)).filter(function(mt){return L.has(mt)})),rt=void 0;rt=Ut.size>0?E[v.get(Ut.values().next().value)]:H(ft).x,k[vt].forEach(function(mt){u[R]=[rt,A[v.get(mt)]],f[R]=[E[v.get(mt)],A[v.get(mt)]],R++})},Z=0;Z<k.length;Z++)J(Z);p=!0}if(d.alignmentConstraint.horizontal){for(var at=d.alignmentConstraint.horizontal,_t=function(vt){var ft=new Set;at[vt].forEach(function(mt){ft.add(mt)});var Ut=new Set([].concat(r(ft)).filter(function(mt){return L.has(mt)})),rt=void 0;rt=Ut.size>0?E[v.get(Ut.values().next().value)]:H(ft).y,at[vt].forEach(function(mt){u[R]=[E[v.get(mt)],rt],f[R]=[E[v.get(mt)],A[v.get(mt)]],R++})},nt=0;nt<at.length;nt++)_t(nt);p=!0}d.relativePlacementConstraint&&(I=!0)})();else if(d.relativePlacementConstraint){for(var F=0,D=0,z=0;z<S.length;z++)S[z].length>F&&(F=S[z].length,D=z);if(F<G.size/2)x(d.relativePlacementConstraint),p=!1,I=!1;else{var W=new Map,U=new Map,O=[];S[D].forEach(function(R){C.get(R).forEach(function(k){k.direction=="horizontal"?(W.has(R)?W.get(R).push(k):W.set(R,[k]),W.has(k.id)||W.set(k.id,[]),O.push({left:R,right:k.id})):(U.has(R)?U.get(R).push(k):U.set(R,[k]),U.has(k.id)||U.set(k.id,[]),O.push({top:R,bottom:k.id}))})}),x(O),I=!1;var X=q(W,"horizontal"),j=q(U,"vertical");S[D].forEach(function(R,k){f[k]=[E[v.get(R)],A[v.get(R)]],u[k]=[],X.has(R)?u[k][0]=X.get(R):u[k][0]=E[v.get(R)],j.has(R)?u[k][1]=j.get(R):u[k][1]=A[v.get(R)]}),p=!0}}if(p){for(var tt,ot=t.transpose(u),V=t.transpose(f),Et=0;Et<ot.length;Et++)ot[Et]=t.multGamma(ot[Et]),V[Et]=t.multGamma(V[Et]);var Lt=t.multMat(ot,t.transpose(V)),kt=h.svd(Lt);tt=t.multMat(kt.V,t.transpose(kt.U));for(var bt=0;bt<v.size;bt++){var K=[E[bt],A[bt]],it=[tt[0][0],tt[1][0]],pt=[tt[0][1],tt[1][1]];E[bt]=t.dotProduct(K,it),A[bt]=t.dotProduct(K,pt)}I&&x(d.relativePlacementConstraint)}}if(n.ENFORCE_CONSTRAINTS){if(d.fixedNodeConstraint&&d.fixedNodeConstraint.length>0){var ct={x:0,y:0};d.fixedNodeConstraint.forEach(function(R,k){var J,Z,at={x:E[v.get(R.nodeId)],y:A[v.get(R.nodeId)]},_t=R.position,nt=(Z=at,{x:(J=_t).x-Z.x,y:J.y-Z.y});ct.x+=nt.x,ct.y+=nt.y}),ct.x/=d.fixedNodeConstraint.length,ct.y/=d.fixedNodeConstraint.length,E.forEach(function(R,k){E[k]+=ct.x}),A.forEach(function(R,k){A[k]+=ct.y}),d.fixedNodeConstraint.forEach(function(R){E[v.get(R.nodeId)]=R.position.x,A[v.get(R.nodeId)]=R.position.y})}if(d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var yt=d.alignmentConstraint.vertical,Nt=function(R){var k=new Set;yt[R].forEach(function(at){k.add(at)});var J=new Set([].concat(r(k)).filter(function(at){return L.has(at)})),Z=void 0;Z=J.size>0?E[v.get(J.values().next().value)]:H(k).x,k.forEach(function(at){L.has(at)||(E[v.get(at)]=Z)})},ht=0;ht<yt.length;ht++)Nt(ht);if(d.alignmentConstraint.horizontal)for(var At=d.alignmentConstraint.horizontal,Ot=function(R){var k=new Set;At[R].forEach(function(at){k.add(at)});var J=new Set([].concat(r(k)).filter(function(at){return L.has(at)})),Z=void 0;Z=J.size>0?A[v.get(J.values().next().value)]:H(k).y,k.forEach(function(at){L.has(at)||(A[v.get(at)]=Z)})},Dt=0;Dt<At.length;Dt++)Ot(Dt)}d.relativePlacementConstraint&&function(){var R=new Map,k=new Map,J=new Map,Z=new Map,at=new Map,_t=new Map,nt=new Set,vt=new Set;if(L.forEach(function(et){nt.add(et),vt.add(et)}),d.alignmentConstraint){if(d.alignmentConstraint.vertical)for(var ft=d.alignmentConstraint.vertical,Ut=function(et){J.set("dummy"+et,[]),ft[et].forEach(function(It){R.set(It,"dummy"+et),J.get("dummy"+et).push(It),L.has(It)&&nt.add("dummy"+et)}),at.set("dummy"+et,E[v.get(ft[et][0])])},rt=0;rt<ft.length;rt++)Ut(rt);if(d.alignmentConstraint.horizontal)for(var mt=d.alignmentConstraint.horizontal,lt=function(et){Z.set("dummy"+et,[]),mt[et].forEach(function(It){k.set(It,"dummy"+et),Z.get("dummy"+et).push(It),L.has(It)&&vt.add("dummy"+et)}),_t.set("dummy"+et,A[v.get(mt[et][0])])},$=0;$<mt.length;$++)lt($)}var gt=new Map,Tt=new Map,st=function(et){C.get(et).forEach(function(It){var Xt=void 0,zt=void 0;It.direction=="horizontal"?(Xt=R.get(et)?R.get(et):et,zt=R.get(It.id)?{id:R.get(It.id),gap:It.gap,direction:It.direction}:It,gt.has(Xt)?gt.get(Xt).push(zt):gt.set(Xt,[zt]),gt.has(zt.id)||gt.set(zt.id,[])):(Xt=k.get(et)?k.get(et):et,zt=k.get(It.id)?{id:k.get(It.id),gap:It.gap,direction:It.direction}:It,Tt.has(Xt)?Tt.get(Xt).push(zt):Tt.set(Xt,[zt]),Tt.has(zt.id)||Tt.set(zt.id,[]))})},Pt=!0,Gt=!1,Rt=void 0;try{for(var wt,ut=C.keys()[Symbol.iterator]();!(Pt=(wt=ut.next()).done);Pt=!0)st(wt.value)}catch(et){Gt=!0,Rt=et}finally{try{!Pt&&ut.return&&ut.return()}finally{if(Gt)throw Rt}}var Ft=a(gt),Mt=a(Tt),Ht=B(Ft),Vt=B(Mt),ie=m(gt),Kt=m(Tt),qt=[],$t=[];Ht.forEach(function(et,It){qt[It]=[],et.forEach(function(Xt){ie.get(Xt).length==0&&qt[It].push(Xt)})}),Vt.forEach(function(et,It){$t[It]=[],et.forEach(function(Xt){Kt.get(Xt).length==0&&$t[It].push(Xt)})});var Zt=q(gt,"horizontal",nt,at,qt),Bt=q(Tt,"vertical",vt,_t,$t),ee=function(et){J.get(et)?J.get(et).forEach(function(It){E[v.get(It)]=Zt.get(et)}):E[v.get(et)]=Zt.get(et)},jt=!0,fe=!1,me=void 0;try{for(var ve,ae=Zt.keys()[Symbol.iterator]();!(jt=(ve=ae.next()).done);jt=!0)ee(ve.value)}catch(et){fe=!0,me=et}finally{try{!jt&&ae.return&&ae.return()}finally{if(fe)throw me}}var Ve=function(et){Z.get(et)?Z.get(et).forEach(function(It){A[v.get(It)]=Bt.get(et)}):A[v.get(et)]=Bt.get(et)},se=!0,ye=!1,Ee=void 0;try{for(var Ne,he=Bt.keys()[Symbol.iterator]();!(se=(Ne=he.next()).done);se=!0)Ve(Ne.value)}catch(et){ye=!0,Ee=et}finally{try{!se&&he.return&&he.return()}finally{if(ye)throw Ee}}}()}for(var xt=0;xt<M.length;xt++){var Ct=M[xt];Ct.getChild()==null&&Ct.setCenter(E[v.get(Ct.id)],A[v.get(Ct.id)])}},o.exports=l},551:o=>{o.exports=w}},T={},c=function o(s){var e=T[s];if(e!==void 0)return e.exports;var r=T[s]={exports:{}};return _[s](r,r.exports,o),r.exports}(45),c;var _,T,c},Le.exports=N(hr()));var N}var xe,Ce,Oe,ce;const dr=ar(xe?Ie.exports:(xe=1,Ie.exports=(Ce=lr(),Oe={658:N=>{N.exports=Object.assign!=null?Object.assign.bind(Object):function(w){for(var _=arguments.length,T=Array(_>1?_-1:0),c=1;c<_;c++)T[c-1]=arguments[c];return T.forEach(function(o){Object.keys(o).forEach(function(s){return w[s]=o[s]})}),w}},548:(N,w,_)=>{var T=function(s,e){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return function(r,n){var i=[],t=!0,h=!1,l=void 0;try{for(var g,d=r[Symbol.iterator]();!(t=(g=d.next()).done)&&(i.push(g.value),!n||i.length!==n);t=!0);}catch(y){h=!0,l=y}finally{try{!t&&d.return&&d.return()}finally{if(h)throw l}}return i}(s,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=_(140).layoutBase.LinkedList,o={getTopMostNodes:function(s){for(var e={},r=0;r<s.length;r++)e[s[r].id()]=!0;var n=s.filter(function(i,t){typeof i=="number"&&(i=t);for(var h=i.parent()[0];h!=null;){if(e[h.id()])return!1;h=h.parent()[0]}return!0});return n},connectComponents:function(s,e,r,n){var i=new c,t=new Set,h=[],l=void 0,g=void 0,d=void 0,y=!1,v=1,E=[],A=[],M=function(){var P=s.collection();A.push(P);var b=r[0],Y=s.collection();Y.merge(b).merge(b.descendants().intersection(e)),h.push(b),Y.forEach(function(x){i.push(x),t.add(x),P.merge(x)});for(var H=function(){b=i.shift();var x=s.collection();b.neighborhood().nodes().forEach(function(m){e.intersection(b.edgesWith(m)).length>0&&x.merge(m)});for(var B=0;B<x.length;B++){var a=x[B];(l=r.intersection(a.union(a.ancestors())))==null||t.has(l[0])||l.union(l.descendants()).forEach(function(m){i.push(m),t.add(m),P.merge(m),r.has(m)&&h.push(m)})}};i.length!=0;)H();if(P.forEach(function(x){e.intersection(x.connectedEdges()).forEach(function(B){P.has(B.source())&&P.has(B.target())&&P.merge(B)})}),h.length==r.length&&(y=!0),!y||y&&v>1){g=h[0],d=g.connectedEdges().length,h.forEach(function(x){x.connectedEdges().length<d&&(d=x.connectedEdges().length,g=x)}),E.push(g.id());var q=s.collection();q.merge(h[0]),h.forEach(function(x){q.merge(x)}),h=[],r=r.difference(q),v++}};do M();while(!y);return n&&E.length>0&&n.set("dummy"+(n.size+1),E),A},relocateComponent:function(s,e,r){if(!r.fixedNodeConstraint){var n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,t=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY;if(r.quality=="draft"){var l=!0,g=!1,d=void 0;try{for(var y,v=e.nodeIndexes[Symbol.iterator]();!(l=(y=v.next()).done);l=!0){var E=y.value,A=T(E,2),M=A[0],P=A[1],b=r.cy.getElementById(M);if(b){var Y=b.boundingBox(),H=e.xCoords[P]-Y.w/2,q=e.xCoords[P]+Y.w/2,x=e.yCoords[P]-Y.h/2,B=e.yCoords[P]+Y.h/2;H<n&&(n=H),q>i&&(i=q),x<t&&(t=x),B>h&&(h=B)}}}catch(p){g=!0,d=p}finally{try{!l&&v.return&&v.return()}finally{if(g)throw d}}var a=s.x-(i+n)/2,m=s.y-(h+t)/2;e.xCoords=e.xCoords.map(function(p){return p+a}),e.yCoords=e.yCoords.map(function(p){return p+m})}else{Object.keys(e).forEach(function(p){var I=e[p],L=I.getRect().x,C=I.getRect().x+I.getRect().width,G=I.getRect().y,S=I.getRect().y+I.getRect().height;L<n&&(n=L),C>i&&(i=C),G<t&&(t=G),S>h&&(h=S)});var u=s.x-(i+n)/2,f=s.y-(h+t)/2;Object.keys(e).forEach(function(p){var I=e[p];I.setCenter(I.getCenterX()+u,I.getCenterY()+f)})}}},calcBoundingBox:function(s,e,r,n){for(var i=Number.MAX_SAFE_INTEGER,t=Number.MIN_SAFE_INTEGER,h=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER,g=void 0,d=void 0,y=void 0,v=void 0,E=s.descendants().not(":parent"),A=E.length,M=0;M<A;M++){var P=E[M];i>(g=e[n.get(P.id())]-P.width()/2)&&(i=g),t<(d=e[n.get(P.id())]+P.width()/2)&&(t=d),h>(y=r[n.get(P.id())]-P.height()/2)&&(h=y),l<(v=r[n.get(P.id())]+P.height()/2)&&(l=v)}var b={};return b.topLeftX=i,b.topLeftY=h,b.width=t-i,b.height=l-h,b},calcParentsWithoutChildren:function(s,e){var r=s.collection();return e.nodes(":parent").forEach(function(n){var i=!1;n.children().forEach(function(t){t.css("display")!="none"&&(i=!0)}),i||r.merge(n)}),r}};N.exports=o},816:(N,w,_)=>{var T=_(548),c=_(140).CoSELayout,o=_(140).CoSENode,s=_(140).layoutBase.PointD,e=_(140).layoutBase.DimensionD,r=_(140).layoutBase.LayoutConstants,n=_(140).layoutBase.FDLayoutConstants,i=_(140).CoSEConstants;N.exports={coseLayout:function(t,h){var l=t.cy,g=t.eles,d=g.nodes(),y=g.edges(),v=void 0,E=void 0,A=void 0,M={};t.randomize&&(v=h.nodeIndexes,E=h.xCoords,A=h.yCoords);var P=function(x){return typeof x=="function"},b=function(x,B){return P(x)?x(B):x},Y=T.calcParentsWithoutChildren(l,g);t.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),t.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=n.DEFAULT_GRAVITY_STRENGTH=t.gravity),t.numIter!=null&&(i.MAX_ITERATIONS=n.MAX_ITERATIONS=t.numIter),t.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=n.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),t.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),t.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),t.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=n.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),t.tilingCompareBy!=null&&(i.TILING_COMPARE_BY=t.tilingCompareBy),t.quality=="proof"?r.QUALITY=2:r.QUALITY=0,i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!t.randomize,i.ANIMATE=n.ANIMATE=r.ANIMATE=t.animate,i.TILE=t.tile,i.TILING_PADDING_VERTICAL=typeof t.tilingPaddingVertical=="function"?t.tilingPaddingVertical.call():t.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof t.tilingPaddingHorizontal=="function"?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!0,i.PURE_INCREMENTAL=!t.randomize,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,t.step=="transformed"&&(i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!1,i.APPLY_LAYOUT=!1),t.step=="enforced"&&(i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!1),t.step=="cose"&&(i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,i.ENFORCE_CONSTRAINTS=!1,i.APPLY_LAYOUT=!0),t.step=="all"&&(t.randomize?i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?i.TREE_REDUCTION_ON_INCREMENTAL=!1:i.TREE_REDUCTION_ON_INCREMENTAL=!0;var H=new c,q=H.newGraphManager();return function x(B,a,m,u){for(var f=a.length,p=0;p<f;p++){var I=a[p],L=null;I.intersection(Y).length==0&&(L=I.children());var C=void 0,G=I.layoutDimensions({nodeDimensionsIncludeLabels:u.nodeDimensionsIncludeLabels});if(I.outerWidth()!=null&&I.outerHeight()!=null)if(u.randomize)if(I.isParent()){var S=T.calcBoundingBox(I,E,A,v);C=I.intersection(Y).length==0?B.add(new o(m.graphManager,new s(S.topLeftX,S.topLeftY),new e(S.width,S.height))):B.add(new o(m.graphManager,new s(S.topLeftX,S.topLeftY),new e(parseFloat(G.w),parseFloat(G.h))))}else C=B.add(new o(m.graphManager,new s(E[v.get(I.id())]-G.w/2,A[v.get(I.id())]-G.h/2),new e(parseFloat(G.w),parseFloat(G.h))));else C=B.add(new o(m.graphManager,new s(I.position("x")-G.w/2,I.position("y")-G.h/2),new e(parseFloat(G.w),parseFloat(G.h))));else C=B.add(new o(this.graphManager));C.id=I.data("id"),C.nodeRepulsion=b(u.nodeRepulsion,I),C.paddingLeft=parseInt(I.css("padding")),C.paddingTop=parseInt(I.css("padding")),C.paddingRight=parseInt(I.css("padding")),C.paddingBottom=parseInt(I.css("padding")),u.nodeDimensionsIncludeLabels&&(C.labelWidth=I.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,C.labelHeight=I.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,C.labelPosVertical=I.css("text-valign"),C.labelPosHorizontal=I.css("text-halign")),M[I.data("id")]=C,isNaN(C.rect.x)&&(C.rect.x=0),isNaN(C.rect.y)&&(C.rect.y=0),L!=null&&L.length>0&&x(m.getGraphManager().add(m.newGraph(),C),L,m,u)}}(q.addRoot(),T.getTopMostNodes(d),H,t),function(x,B,a){for(var m=0,u=0,f=0;f<a.length;f++){var p=a[f],I=M[p.data("source")],L=M[p.data("target")];if(I&&L&&I!==L&&I.getEdgesBetween(L).length==0){var C=B.add(x.newEdge(),I,L);C.id=p.id(),C.idealLength=b(t.idealEdgeLength,p),C.edgeElasticity=b(t.edgeElasticity,p),m+=C.idealLength,u++}}t.idealEdgeLength!=null&&(u>0?i.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=m/u:P(t.idealEdgeLength)?i.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=50:i.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,i.MIN_REPULSION_DIST=n.MIN_REPULSION_DIST=n.DEFAULT_EDGE_LENGTH/10,i.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH)}(H,q,y),function(x,B){B.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=B.fixedNodeConstraint),B.alignmentConstraint&&(x.constraints.alignmentConstraint=B.alignmentConstraint),B.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=B.relativePlacementConstraint)}(H,t),H.runLayout(),M}}},212:(N,w,_)=>{var T=function(){function i(t,h){for(var l=0;l<h.length;l++){var g=h[l];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(t,g.key,g)}}return function(t,h,l){return h&&i(t.prototype,h),l&&i(t,l),t}}(),c=_(658),o=_(548),s=_(657).spectralLayout,e=_(816).coseLayout,r=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:function(i){return 4500},idealEdgeLength:function(i){return 50},edgeElasticity:function(i){return .45},nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),n=function(){function i(t){(function(h,l){if(!(h instanceof l))throw new TypeError("Cannot call a class as a function")})(this,i),this.options=c({},r,t)}return T(i,[{key:"run",value:function(){var t=this.options,h=t.cy,l=t.eles,g=[],d=[],y=void 0,v=[];!t.fixedNodeConstraint||Array.isArray(t.fixedNodeConstraint)&&t.fixedNodeConstraint.length!=0||(t.fixedNodeConstraint=void 0),t.alignmentConstraint&&(!t.alignmentConstraint.vertical||Array.isArray(t.alignmentConstraint.vertical)&&t.alignmentConstraint.vertical.length!=0||(t.alignmentConstraint.vertical=void 0),!t.alignmentConstraint.horizontal||Array.isArray(t.alignmentConstraint.horizontal)&&t.alignmentConstraint.horizontal.length!=0||(t.alignmentConstraint.horizontal=void 0)),!t.relativePlacementConstraint||Array.isArray(t.relativePlacementConstraint)&&t.relativePlacementConstraint.length!=0||(t.relativePlacementConstraint=void 0),(t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint)&&(t.tile=!1,t.packComponents=!1);var E=void 0,A=!1;if(h.layoutUtilities&&t.packComponents&&((E=h.layoutUtilities("get"))||(E=h.layoutUtilities()),A=!0),l.nodes().length>0)if(A){var M=o.getTopMostNodes(t.eles.nodes());if((y=o.connectComponents(h,t.eles,M)).forEach(function(F){var D=F.boundingBox();v.push({x:D.x1+D.w/2,y:D.y1+D.h/2})}),t.randomize&&y.forEach(function(F){t.eles=F,g.push(s(t))}),t.quality=="default"||t.quality=="proof"){var P=h.collection();if(t.tile){var b=new Map,Y=0,H={nodeIndexes:b,xCoords:[],yCoords:[]},q=[];if(y.forEach(function(F,D){F.edges().length==0&&(F.nodes().forEach(function(z,W){P.merge(F.nodes()[W]),z.isParent()||(H.nodeIndexes.set(F.nodes()[W].id(),Y++),H.xCoords.push(F.nodes()[0].position().x),H.yCoords.push(F.nodes()[0].position().y))}),q.push(D))}),P.length>1){var x=P.boundingBox();v.push({x:x.x1+x.w/2,y:x.y1+x.h/2}),y.push(P),g.push(H);for(var B=q.length-1;B>=0;B--)y.splice(q[B],1),g.splice(q[B],1),v.splice(q[B],1)}}y.forEach(function(F,D){t.eles=F,d.push(e(t,g[D])),o.relocateComponent(v[D],d[D],t)})}else y.forEach(function(F,D){o.relocateComponent(v[D],g[D],t)});var a=new Set;if(y.length>1){var m=[],u=l.filter(function(F){return F.css("display")=="none"});y.forEach(function(F,D){var z=void 0;if(t.quality=="draft"&&(z=g[D].nodeIndexes),F.nodes().not(u).length>0){var W={edges:[],nodes:[]},U=void 0;F.nodes().not(u).forEach(function(O){if(t.quality=="draft")if(O.isParent()){var X=o.calcBoundingBox(O,g[D].xCoords,g[D].yCoords,z);W.nodes.push({x:X.topLeftX,y:X.topLeftY,width:X.width,height:X.height})}else U=z.get(O.id()),W.nodes.push({x:g[D].xCoords[U]-O.boundingbox().w/2,y:g[D].yCoords[U]-O.boundingbox().h/2,width:O.boundingbox().w,height:O.boundingbox().h});else d[D][O.id()]&&W.nodes.push({x:d[D][O.id()].getLeft(),y:d[D][O.id()].getTop(),width:d[D][O.id()].getWidth(),height:d[D][O.id()].getHeight()})}),F.edges().forEach(function(O){var X=O.source(),j=O.target();if(X.css("display")!="none"&&j.css("display")!="none")if(t.quality=="draft"){var tt=z.get(X.id()),ot=z.get(j.id()),V=[],Et=[];if(X.isParent()){var Lt=o.calcBoundingBox(X,g[D].xCoords,g[D].yCoords,z);V.push(Lt.topLeftX+Lt.width/2),V.push(Lt.topLeftY+Lt.height/2)}else V.push(g[D].xCoords[tt]),V.push(g[D].yCoords[tt]);if(j.isParent()){var kt=o.calcBoundingBox(j,g[D].xCoords,g[D].yCoords,z);Et.push(kt.topLeftX+kt.width/2),Et.push(kt.topLeftY+kt.height/2)}else Et.push(g[D].xCoords[ot]),Et.push(g[D].yCoords[ot]);W.edges.push({startX:V[0],startY:V[1],endX:Et[0],endY:Et[1]})}else d[D][X.id()]&&d[D][j.id()]&&W.edges.push({startX:d[D][X.id()].getCenterX(),startY:d[D][X.id()].getCenterY(),endX:d[D][j.id()].getCenterX(),endY:d[D][j.id()].getCenterY()})}),W.nodes.length>0&&(m.push(W),a.add(D))}});var f=E.packComponents(m,t.randomize).shifts;if(t.quality=="draft")g.forEach(function(F,D){var z=F.xCoords.map(function(U){return U+f[D].dx}),W=F.yCoords.map(function(U){return U+f[D].dy});F.xCoords=z,F.yCoords=W});else{var p=0;a.forEach(function(F){Object.keys(d[F]).forEach(function(D){var z=d[F][D];z.setCenter(z.getCenterX()+f[p].dx,z.getCenterY()+f[p].dy)}),p++})}}}else{var I=t.eles.boundingBox();if(v.push({x:I.x1+I.w/2,y:I.y1+I.h/2}),t.randomize){var L=s(t);g.push(L)}t.quality=="default"||t.quality=="proof"?(d.push(e(t,g[0])),o.relocateComponent(v[0],d[0],t)):o.relocateComponent(v[0],g[0],t)}var C=function(F,D){if(t.quality=="default"||t.quality=="proof"){typeof F=="number"&&(F=D);var z=void 0,W=void 0,U=F.data("id");return d.forEach(function(X){U in X&&(z={x:X[U].getRect().getCenterX(),y:X[U].getRect().getCenterY()},W=X[U])}),t.nodeDimensionsIncludeLabels&&(W.labelWidth&&(W.labelPosHorizontal=="left"?z.x+=W.labelWidth/2:W.labelPosHorizontal=="right"&&(z.x-=W.labelWidth/2)),W.labelHeight&&(W.labelPosVertical=="top"?z.y+=W.labelHeight/2:W.labelPosVertical=="bottom"&&(z.y-=W.labelHeight/2))),z==null&&(z={x:F.position("x"),y:F.position("y")}),{x:z.x,y:z.y}}var O=void 0;return g.forEach(function(X){var j=X.nodeIndexes.get(F.id());j!=null&&(O={x:X.xCoords[j],y:X.yCoords[j]})}),O==null&&(O={x:F.position("x"),y:F.position("y")}),{x:O.x,y:O.y}};if(t.quality=="default"||t.quality=="proof"||t.randomize){var G=o.calcParentsWithoutChildren(h,l),S=l.filter(function(F){return F.css("display")=="none"});t.eles=l.not(S),l.nodes().not(":parent").not(S).layoutPositions(this,t,C),G.length>0&&G.forEach(function(F){F.position(C(F))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),i}();N.exports=n},657:(N,w,_)=>{var T=_(548),c=_(140).layoutBase.Matrix,o=_(140).layoutBase.SVD;N.exports={spectralLayout:function(s){var e=s.cy,r=s.eles,n=r.nodes(),i=r.nodes(":parent"),t=new Map,h=new Map,l=new Map,g=[],d=[],y=[],v=[],E=[],A=[],M=[],P=[],b=void 0,Y=1e8,H=1e-9,q=s.piTol,x=s.samplingType,B=s.nodeSeparation,a=void 0,m=function(K,it,pt){for(var ct=[],yt=0,Nt=0,ht=0,At=void 0,Ot=[],Dt=0,xt=1,Ct=0;Ct<b;Ct++)Ot[Ct]=Y;for(ct[Nt]=K,Ot[K]=0;Nt>=yt;){ht=ct[yt++];for(var R=g[ht],k=0;k<R.length;k++)Ot[At=h.get(R[k])]==Y&&(Ot[At]=Ot[ht]+1,ct[++Nt]=At);A[ht][it]=Ot[ht]*B}if(pt){for(var J=0;J<b;J++)A[J][it]<E[J]&&(E[J]=A[J][it]);for(var Z=0;Z<b;Z++)E[Z]>Dt&&(Dt=E[Z],xt=Z)}return xt};T.connectComponents(e,r,T.getTopMostNodes(n),t),i.forEach(function(K){T.connectComponents(e,r,T.getTopMostNodes(K.descendants().intersection(r)),t)});for(var u=0,f=0;f<n.length;f++)n[f].isParent()||h.set(n[f].id(),u++);var p=!0,I=!1,L=void 0;try{for(var C,G=t.keys()[Symbol.iterator]();!(p=(C=G.next()).done);p=!0){var S=C.value;h.set(S,u++)}}catch(K){I=!0,L=K}finally{try{!p&&G.return&&G.return()}finally{if(I)throw L}}for(var F=0;F<h.size;F++)g[F]=[];i.forEach(function(K){for(var it=K.children().intersection(r);it.nodes(":childless").length==0;)it=it.nodes()[0].children().intersection(r);var pt=0,ct=it.nodes(":childless")[0].connectedEdges().length;it.nodes(":childless").forEach(function(yt,Nt){yt.connectedEdges().length<ct&&(ct=yt.connectedEdges().length,pt=Nt)}),l.set(K.id(),it.nodes(":childless")[pt].id())}),n.forEach(function(K){var it=void 0;it=K.isParent()?h.get(l.get(K.id())):h.get(K.id()),K.neighborhood().nodes().forEach(function(pt){r.intersection(K.edgesWith(pt)).length>0&&(pt.isParent()?g[it].push(l.get(pt.id())):g[it].push(pt.id()))})});var D=function(K){var it=h.get(K),pt=void 0;t.get(K).forEach(function(ct){pt=e.getElementById(ct).isParent()?l.get(ct):ct,g[it].push(pt),g[h.get(pt)].push(K)})},z=!0,W=!1,U=void 0;try{for(var O,X=t.keys()[Symbol.iterator]();!(z=(O=X.next()).done);z=!0)D(O.value)}catch(K){W=!0,U=K}finally{try{!z&&X.return&&X.return()}finally{if(W)throw U}}var j=void 0;if((b=h.size)>2){a=b<s.sampleSize?b:s.sampleSize;for(var tt=0;tt<b;tt++)A[tt]=[];for(var ot=0;ot<a;ot++)P[ot]=[];return s.quality=="draft"||s.step=="all"?(function(K){var it=void 0;if(K){it=Math.floor(Math.random()*b);for(var pt=0;pt<b;pt++)E[pt]=Y;for(var ct=0;ct<a;ct++)v[ct]=it,it=m(it,ct,K)}else{(function(){for(var xt=0,Ct=0,R=!1;Ct<a;){xt=Math.floor(Math.random()*b),R=!1;for(var k=0;k<Ct;k++)if(v[k]==xt){R=!0;break}R||(v[Ct]=xt,Ct++)}})();for(var yt=0;yt<a;yt++)m(v[yt],yt,K)}for(var Nt=0;Nt<b;Nt++)for(var ht=0;ht<a;ht++)A[Nt][ht]*=A[Nt][ht];for(var At=0;At<a;At++)M[At]=[];for(var Ot=0;Ot<a;Ot++)for(var Dt=0;Dt<a;Dt++)M[Ot][Dt]=A[v[Dt]][Ot]}(x),function(){for(var K=o.svd(M),it=K.S,pt=K.U,ct=K.V,yt=it[0]*it[0]*it[0],Nt=[],ht=0;ht<a;ht++){Nt[ht]=[];for(var At=0;At<a;At++)Nt[ht][At]=0,ht==At&&(Nt[ht][At]=it[ht]/(it[ht]*it[ht]+yt/(it[ht]*it[ht])))}P=c.multMat(c.multMat(ct,Nt),c.transpose(pt))}(),function(){for(var K=void 0,it=void 0,pt=[],ct=[],yt=[],Nt=[],ht=0;ht<b;ht++)pt[ht]=Math.random(),ct[ht]=Math.random();pt=c.normalize(pt),ct=c.normalize(ct);for(var At=H,Ot=H,Dt=void 0;;){for(var xt=0;xt<b;xt++)yt[xt]=pt[xt];if(pt=c.multGamma(c.multL(c.multGamma(yt),A,P)),K=c.dotProduct(yt,pt),pt=c.normalize(pt),At=c.dotProduct(yt,pt),(Dt=Math.abs(At/Ot))<=1+q&&Dt>=1)break;Ot=At}for(var Ct=0;Ct<b;Ct++)yt[Ct]=pt[Ct];for(Ot=H;;){for(var R=0;R<b;R++)Nt[R]=ct[R];if(Nt=c.minusOp(Nt,c.multCons(yt,c.dotProduct(yt,Nt))),ct=c.multGamma(c.multL(c.multGamma(Nt),A,P)),it=c.dotProduct(Nt,ct),ct=c.normalize(ct),At=c.dotProduct(Nt,ct),(Dt=Math.abs(At/Ot))<=1+q&&Dt>=1)break;Ot=At}for(var k=0;k<b;k++)Nt[k]=ct[k];d=c.multCons(yt,Math.sqrt(Math.abs(K))),y=c.multCons(Nt,Math.sqrt(Math.abs(it)))}(),j={nodeIndexes:h,xCoords:d,yCoords:y}):(h.forEach(function(K,it){d.push(e.getElementById(it).position("x")),y.push(e.getElementById(it).position("y"))}),j={nodeIndexes:h,xCoords:d,yCoords:y}),j}var V=h.keys(),Et=e.getElementById(V.next().value),Lt=Et.position(),kt=Et.outerWidth();if(d.push(Lt.x),y.push(Lt.y),b==2){var bt=e.getElementById(V.next().value).outerWidth();d.push(Lt.x+kt/2+bt/2+s.idealEdgeLength),y.push(Lt.y)}return j={nodeIndexes:h,xCoords:d,yCoords:y}}}},579:(N,w,_)=>{var T=_(212),c=function(o){o&&o("layout","fcose",T)};typeof cytoscape<"u"&&c(cytoscape),N.exports=c},140:N=>{N.exports=Ce}},ce={},function N(w){var _=ce[w];if(_!==void 0)return _.exports;var T=ce[w]={exports:{}};return Oe[w](T,T.exports,N),T.exports}(579))));var De={L:"left",R:"right",T:"top",B:"bottom"},Re={L:Q(N=>`${N},${N/2} 0,${N} 0,0`,"L"),R:Q(N=>`0,${N/2} ${N},0 ${N},${N}`,"R"),T:Q(N=>`0,0 ${N},0 ${N/2},${N}`,"T"),B:Q(N=>`${N/2},0 ${N},${N} 0,${N}`,"B")},ne={L:Q((N,w)=>N-w+2,"L"),R:Q((N,w)=>N-2,"R"),T:Q((N,w)=>N-w+2,"T"),B:Q((N,w)=>N-2,"B")},cr=Q(function(N){return Yt(N)?N==="L"?"R":"L":N==="T"?"B":"T"},"getOppositeArchitectureDirection"),be=Q(function(N){return N==="L"||N==="R"||N==="T"||N==="B"},"isArchitectureDirection"),Yt=Q(function(N){return N==="L"||N==="R"},"isArchitectureDirectionX"),Wt=Q(function(N){return N==="T"||N==="B"},"isArchitectureDirectionY"),ge=Q(function(N,w){const _=Yt(N)&&Wt(w),T=Wt(N)&&Yt(w);return _||T},"isArchitectureDirectionXY"),gr=Q(function(N){const w=N[0],_=N[1],T=Yt(w)&&Wt(_),c=Wt(w)&&Yt(_);return T||c},"isArchitecturePairXY"),ur=Q(function(N){return N!=="LL"&&N!=="RR"&&N!=="TT"&&N!=="BB"},"isValidArchitectureDirectionPair"),ue=Q(function(N,w){const _=`${N}${w}`;return ur(_)?_:void 0},"getArchitectureDirectionPair"),pr=Q(function([N,w],_){const T=_[0],c=_[1];return Yt(T)?Wt(c)?[N+(T==="L"?-1:1),w+(c==="T"?1:-1)]:[N+(T==="L"?-1:1),w]:Yt(c)?[N+(c==="L"?1:-1),w+(T==="T"?1:-1)]:[N,w+(T==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),fr=Q(function(N){return N==="LT"||N==="TL"?[1,1]:N==="BL"||N==="LB"?[1,-1]:N==="BR"||N==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),mr=Q(function(N,w){return ge(N,w)?"bend":Yt(N)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),vr=Q(function(N){return N.type==="service"},"isArchitectureService"),yr=Q(function(N){return N.type==="junction"},"isArchitectureJunction"),Ge=Q(N=>N.data(),"edgeData"),Qt=Q(N=>N.data(),"nodeData"),Se=tr.architecture,dt=new or(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Se,dataStructures:void 0,elements:{}})),Er=Q(()=>{dt.reset(),Ke()},"clear"),Nr=Q(function({id:N,icon:w,in:_,title:T,iconText:c}){if(dt.records.registeredIds[N]!==void 0)throw new Error(`The service id [${N}] is already in use by another ${dt.records.registeredIds[N]}`);if(_!==void 0){if(N===_)throw new Error(`The service [${N}] cannot be placed within itself`);if(dt.records.registeredIds[_]===void 0)throw new Error(`The service [${N}]'s parent does not exist. Please make sure the parent is created before this service`);if(dt.records.registeredIds[_]==="node")throw new Error(`The service [${N}]'s parent is not a group`)}dt.records.registeredIds[N]="node",dt.records.nodes[N]={id:N,type:"service",icon:w,iconText:c,title:T,edges:[],in:_}},"addService"),Tr=Q(()=>Object.values(dt.records.nodes).filter(vr),"getServices"),Ar=Q(function({id:N,in:w}){dt.records.registeredIds[N]="node",dt.records.nodes[N]={id:N,type:"junction",edges:[],in:w}},"addJunction"),wr=Q(()=>Object.values(dt.records.nodes).filter(yr),"getJunctions"),Ir=Q(()=>Object.values(dt.records.nodes),"getNodes"),pe=Q(N=>dt.records.nodes[N],"getNode"),Lr=Q(function({id:N,icon:w,in:_,title:T}){if(dt.records.registeredIds[N]!==void 0)throw new Error(`The group id [${N}] is already in use by another ${dt.records.registeredIds[N]}`);if(_!==void 0){if(N===_)throw new Error(`The group [${N}] cannot be placed within itself`);if(dt.records.registeredIds[_]===void 0)throw new Error(`The group [${N}]'s parent does not exist. Please make sure the parent is created before this group`);if(dt.records.registeredIds[_]==="node")throw new Error(`The group [${N}]'s parent is not a group`)}dt.records.registeredIds[N]="group",dt.records.groups[N]={id:N,icon:w,title:T,in:_}},"addGroup"),_r=Q(()=>Object.values(dt.records.groups),"getGroups"),Mr=Q(function({lhsId:N,rhsId:w,lhsDir:_,rhsDir:T,lhsInto:c,rhsInto:o,lhsGroup:s,rhsGroup:e,title:r}){if(!be(_))throw new Error(`Invalid direction given for left hand side of edge ${N}--${w}. Expected (L,R,T,B) got ${_}`);if(!be(T))throw new Error(`Invalid direction given for right hand side of edge ${N}--${w}. Expected (L,R,T,B) got ${T}`);if(dt.records.nodes[N]===void 0&&dt.records.groups[N]===void 0)throw new Error(`The left-hand id [${N}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(dt.records.nodes[w]===void 0&&dt.records.groups[N]===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.`);const n=dt.records.nodes[N].in,i=dt.records.nodes[w].in;if(s&&n&&i&&n==i)throw new Error(`The left-hand id [${N}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(e&&n&&i&&n==i)throw new Error(`The right-hand id [${w}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const t={lhsId:N,lhsDir:_,lhsInto:c,lhsGroup:s,rhsId:w,rhsDir:T,rhsInto:o,rhsGroup:e,title:r};dt.records.edges.push(t),dt.records.nodes[N]&&dt.records.nodes[w]&&(dt.records.nodes[N].edges.push(dt.records.edges[dt.records.edges.length-1]),dt.records.nodes[w].edges.push(dt.records.edges[dt.records.edges.length-1]))},"addEdge"),xr=Q(()=>dt.records.edges,"getEdges"),Cr=Q(()=>{if(dt.records.dataStructures===void 0){const N={},w=Object.entries(dt.records.nodes).reduce((e,[r,n])=>(e[r]=n.edges.reduce((i,t)=>{var g,d;const h=(g=pe(t.lhsId))==null?void 0:g.in,l=(d=pe(t.rhsId))==null?void 0:d.in;if(h&&l&&h!==l){const y=mr(t.lhsDir,t.rhsDir);y!=="bend"&&(N[h]??(N[h]={}),N[h][l]=y,N[l]??(N[l]={}),N[l][h]=y)}if(t.lhsId===r){const y=ue(t.lhsDir,t.rhsDir);y&&(i[y]=t.rhsId)}else{const y=ue(t.rhsDir,t.lhsDir);y&&(i[y]=t.lhsId)}return i},{}),e),{}),_=Object.keys(w)[0],T={[_]:1},c=Object.keys(w).reduce((e,r)=>r===_?e:{...e,[r]:1},{}),o=Q(e=>{const r={[e]:[0,0]},n=[e];for(;n.length>0;){const i=n.shift();if(i){T[i]=1,delete c[i];const t=w[i],[h,l]=r[i];Object.entries(t).forEach(([g,d])=>{T[d]||(r[d]=pr([h,l],g),n.push(d))})}}return r},"BFS"),s=[o(_)];for(;Object.keys(c).length>0;)s.push(o(Object.keys(c)[0]));dt.records.dataStructures={adjList:w,spatialMaps:s,groupAlignments:N}}return dt.records.dataStructures},"getDataStructures"),oe={clear:Er,setDiagramTitle:Ze,getDiagramTitle:$e,setAccTitle:qe,getAccTitle:je,setAccDescription:Be,getAccDescription:We,addService:Nr,getServices:Tr,addJunction:Ar,getJunctions:wr,getNodes:Ir,getNode:pe,addGroup:Lr,getGroups:_r,addEdge:Mr,getEdges:xr,setElementForId:Q((N,w)=>{dt.records.elements[N]=w},"setElementForId"),getElementById:Q(N=>dt.records.elements[N],"getElementById"),getDataStructures:Cr};function St(N){const w=re().architecture;return w!=null&&w[N]?w[N]:Se[N]}Q(St,"getConfigField");var Or=Q((N,w)=>{nr(N,w),N.groups.map(w.addGroup),N.services.map(_=>w.addService({..._,type:"service"})),N.junctions.map(_=>w.addJunction({..._,type:"junction"})),N.edges.map(w.addEdge)},"populateDb"),Dr={parse:Q(async N=>{const w=await ir("architecture",N);Te.debug(w),Or(w,oe)},"parse")},Rr=Q(N=>`
2
+ .edge {
3
+ stroke-width: ${N.archEdgeWidth};
4
+ stroke: ${N.archEdgeColor};
5
+ fill: none;
6
+ }
7
+
8
+ .arrow {
9
+ fill: ${N.archEdgeArrowColor};
10
+ }
11
+
12
+ .node-bkg {
13
+ fill: none;
14
+ stroke: ${N.archGroupBorderColor};
15
+ stroke-width: ${N.archGroupBorderWidth};
16
+ stroke-dasharray: 8;
17
+ }
18
+ .node-icon-text {
19
+ display: flex;
20
+ align-items: center;
21
+ }
22
+
23
+ .node-icon-text > div {
24
+ color: #fff;
25
+ margin: 1px;
26
+ height: fit-content;
27
+ text-align: center;
28
+ overflow: hidden;
29
+ display: -webkit-box;
30
+ -webkit-box-orient: vertical;
31
+ }
32
+ `,"getStyles"),Jt=Q(N=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${N}</g>`,"wrapIcon"),te={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Jt('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:Jt('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:Jt('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:Jt('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:Jt('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:rr,blank:{body:Jt("")}}},br=Q(async function(N,w){const _=St("padding"),T=St("iconSize"),c=T/2,o=T/6,s=o/2;await Promise.all(w.edges().map(async e=>{var H,q;const{source:r,sourceDir:n,sourceArrow:i,sourceGroup:t,target:h,targetDir:l,targetArrow:g,targetGroup:d,label:y}=Ge(e);let{x:v,y:E}=e[0].sourceEndpoint();const{x:A,y:M}=e[0].midpoint();let{x:P,y:b}=e[0].targetEndpoint();const Y=_+4;if(t&&(Yt(n)?v+=n==="L"?-Y:Y:E+=n==="T"?-Y:Y+18),d&&(Yt(l)?P+=l==="L"?-Y:Y:b+=l==="T"?-Y:Y+18),t||((H=oe.getNode(r))==null?void 0:H.type)!=="junction"||(Yt(n)?v+=n==="L"?c:-c:E+=n==="T"?c:-c),d||((q=oe.getNode(h))==null?void 0:q.type)!=="junction"||(Yt(l)?P+=l==="L"?c:-c:b+=l==="T"?c:-c),e[0]._private.rscratch){const x=N.insert("g");if(x.insert("path").attr("d",`M ${v},${E} L ${A},${M} L${P},${b} `).attr("class","edge"),i){const B=Yt(n)?ne[n](v,o):v-s,a=Wt(n)?ne[n](E,o):E-s;x.insert("polygon").attr("points",Re[n](o)).attr("transform",`translate(${B},${a})`).attr("class","arrow")}if(g){const B=Yt(l)?ne[l](P,o):P-s,a=Wt(l)?ne[l](b,o):b-s;x.insert("polygon").attr("points",Re[l](o)).attr("transform",`translate(${B},${a})`).attr("class","arrow")}if(y){const B=ge(n,l)?"XY":Yt(n)?"X":"Y";let a=0;a=B==="X"?Math.abs(v-P):B==="Y"?Math.abs(E-b)/1.5:Math.abs(v-P)/2;const m=x.append("g");if(await le(m,y,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},re()),m.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),B==="X")m.attr("transform","translate("+A+", "+M+")");else if(B==="Y")m.attr("transform","translate("+A+", "+M+") rotate(-90)");else if(B==="XY"){const u=ue(n,l);if(u&&gr(u)){const f=m.node().getBoundingClientRect(),[p,I]=fr(u);m.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*p*I*45})`);const L=m.node().getBoundingClientRect();m.attr("transform",`
33
+ translate(${A}, ${M-f.height/2})
34
+ translate(${p*L.width/2}, ${I*L.height/2})
35
+ rotate(${-1*p*I*45}, 0, ${f.height/2})
36
+ `)}}}}}))},"drawEdges"),Gr=Q(async function(N,w){const _=.75*St("padding"),T=St("fontSize"),c=St("iconSize")/2;await Promise.all(w.nodes().map(async o=>{const s=Qt(o);if(s.type==="group"){const{h:e,w:r,x1:n,y1:i}=o.boundingBox();N.append("rect").attr("x",n+c).attr("y",i+c).attr("width",r).attr("height",e).attr("class","node-bkg");const t=N.append("g");let h=n,l=i;if(s.icon){const g=t.append("g");g.html(`<g>${await de(s.icon,{height:_,width:_,fallbackPrefix:te.prefix})}</g>`),g.attr("transform","translate("+(h+c+1)+", "+(l+c+1)+")"),h+=_,l+=T/2-1-2}if(s.label){const g=t.append("g");await le(g,s.label,{useHtmlLabels:!1,width:r,classes:"architecture-service-label"},re()),g.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),g.attr("transform","translate("+(h+c+4)+", "+(l+c+2)+")")}}}))},"drawGroups"),Sr=Q(async function(N,w,_){for(const T of _){const c=w.append("g"),o=St("iconSize");if(T.title){const n=c.append("g");await le(n,T.title,{useHtmlLabels:!1,width:1.5*o,classes:"architecture-service-label"},re()),n.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),n.attr("transform","translate("+o/2+", "+o+")")}const s=c.append("g");if(T.icon)s.html(`<g>${await de(T.icon,{height:o,width:o,fallbackPrefix:te.prefix})}</g>`);else if(T.iconText){s.html(`<g>${await de("blank",{height:o,width:o,fallbackPrefix:te.prefix})}</g>`);const n=s.append("g").append("foreignObject").attr("width",o).attr("height",o).append("div").attr("class","node-icon-text").attr("style",`height: ${o}px;`).append("div").html(T.iconText),i=parseInt(window.getComputedStyle(n.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;n.attr("style",`-webkit-line-clamp: ${Math.floor((o-2)/i)};`)}else s.append("path").attr("class","node-bkg").attr("id","node-"+T.id).attr("d",`M0 ${o} v${-o} q0,-5 5,-5 h${o} q5,0 5,5 v${o} H0 Z`);c.attr("class","architecture-service");const{width:e,height:r}=c._groups[0][0].getBBox();T.width=e,T.height=r,N.setElementForId(T.id,c)}return 0},"drawServices"),Pr=Q(function(N,w,_){_.forEach(T=>{const c=w.append("g"),o=St("iconSize");c.append("g").append("rect").attr("id","node-"+T.id).attr("fill-opacity","0").attr("width",o).attr("height",o),c.attr("class","architecture-junction");const{width:s,height:e}=c._groups[0][0].getBBox();c.width=s,c.height=e,N.setElementForId(T.id,c)})},"drawJunctions");function Pe(N,w){N.forEach(_=>{w.add({group:"nodes",data:{type:"service",id:_.id,icon:_.icon,label:_.title,parent:_.in,width:St("iconSize"),height:St("iconSize")},classes:"node-service"})})}function Fe(N,w){N.forEach(_=>{w.add({group:"nodes",data:{type:"junction",id:_.id,parent:_.in,width:St("iconSize"),height:St("iconSize")},classes:"node-junction"})})}function Ue(N,w){w.nodes().map(_=>{const T=Qt(_);T.type!=="group"&&(T.x=_.position().x,T.y=_.position().y,N.getElementById(T.id).attr("transform","translate("+(T.x||0)+","+(T.y||0)+")"))})}function Ye(N,w){N.forEach(_=>{w.add({group:"nodes",data:{type:"group",id:_.id,icon:_.icon,label:_.title,parent:_.in},classes:"node-group"})})}function ke(N,w){N.forEach(_=>{const{lhsId:T,rhsId:c,lhsInto:o,lhsGroup:s,rhsInto:e,lhsDir:r,rhsDir:n,rhsGroup:i,title:t}=_,h=ge(_.lhsDir,_.rhsDir)?"segments":"straight",l={id:`${T}-${c}`,label:t,source:T,sourceDir:r,sourceArrow:o,sourceGroup:s,sourceEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%",target:c,targetDir:n,targetArrow:e,targetGroup:i,targetEndpoint:n==="L"?"0 50%":n==="R"?"100% 50%":n==="T"?"50% 0":"50% 100%"};w.add({group:"edges",data:l,classes:h})})}function He(N,w,_){const T=Q((e,r)=>Object.entries(e).reduce((n,[i,t])=>{var g;let h=0;const l=Object.entries(t);if(l.length===1)return n[i]=l[0][1],n;for(let d=0;d<l.length-1;d++)for(let y=d+1;y<l.length;y++){const[v,E]=l[d],[A,M]=l[y];((g=_[v])==null?void 0:g[A])===r?(n[i]??(n[i]=[]),n[i]=[...n[i],...E,...M]):v==="default"||A==="default"?(n[i]??(n[i]=[]),n[i]=[...n[i],...E,...M]):(n[`${i}-${h++}`]=E,n[`${i}-${h++}`]=M)}return n},{}),"flattenAlignments"),c=w.map(e=>{const r={},n={};return Object.entries(e).forEach(([i,[t,h]])=>{var g,d,y;const l=((g=N.getNode(i))==null?void 0:g.in)??"default";r[h]??(r[h]={}),(d=r[h])[l]??(d[l]=[]),r[h][l].push(i),n[t]??(n[t]={}),(y=n[t])[l]??(y[l]=[]),n[t][l].push(i)}),{horiz:Object.values(T(r,"horizontal")).filter(i=>i.length>1),vert:Object.values(T(n,"vertical")).filter(i=>i.length>1)}}),[o,s]=c.reduce(([e,r],{horiz:n,vert:i})=>[[...e,...n],[...r,...i]],[[],[]]);return{horizontal:o,vertical:s}}function Xe(N){const w=[],_=Q(c=>`${c[0]},${c[1]}`,"posToStr"),T=Q(c=>c.split(",").map(o=>parseInt(o)),"strToPos");return N.forEach(c=>{const o=Object.fromEntries(Object.entries(c).map(([n,i])=>[_(i),n])),s=[_([0,0])],e={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){const n=s.shift();if(n){e[n]=1;const i=o[n];if(i){const t=T(n);Object.entries(r).forEach(([h,l])=>{const g=_([t[0]+l[0],t[1]+l[1]]),d=o[g];d&&!e[g]&&(s.push(g),w.push({[De[h]]:d,[De[cr(h)]]:i,gap:1.5*St("iconSize")}))})}}}}),w}function ze(N,w,_,T,c,{spatialMaps:o,groupAlignments:s}){return new Promise(e=>{const r=sr("body").append("div").attr("id","cy").attr("style","display:none"),n=Ae({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{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":`${St("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:`${St("padding")}px`}}]});r.remove(),Ye(_,n),Pe(N,n),Fe(w,n),ke(T,n);const i=He(c,o,s),t=Xe(o),h=n.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(l){const[g,d]=l.connectedNodes(),{parent:y}=Qt(g),{parent:v}=Qt(d);return y===v?1.5*St("iconSize"):.5*St("iconSize")},edgeElasticity(l){const[g,d]=l.connectedNodes(),{parent:y}=Qt(g),{parent:v}=Qt(d);return y===v?.45:.001},alignmentConstraint:i,relativePlacementConstraint:t});h.one("layoutstop",()=>{var g;function l(d,y,v,E){let A,M;const{x:P,y:b}=d,{x:Y,y:H}=y;M=(E-b+(P-v)*(b-H)/(P-Y))/Math.sqrt(1+Math.pow((b-H)/(P-Y),2)),A=Math.sqrt(Math.pow(E-b,2)+Math.pow(v-P,2)-Math.pow(M,2)),A/=Math.sqrt(Math.pow(Y-P,2)+Math.pow(H-b,2));let q=(Y-P)*(E-b)-(H-b)*(v-P);switch(!0){case q>=0:q=1;break;case q<0:q=-1}let x=(Y-P)*(v-P)+(H-b)*(E-b);switch(!0){case x>=0:x=1;break;case x<0:x=-1}return M=Math.abs(M)*q,A*=x,{distances:M,weights:A}}Q(l,"getSegmentWeights"),n.startBatch();for(const d of Object.values(n.edges()))if((g=d.data)!=null&&g.call(d)){const{x:y,y:v}=d.source().position(),{x:E,y:A}=d.target().position();if(y!==E&&v!==A){const M=d.sourceEndpoint(),P=d.targetEndpoint(),{sourceDir:b}=Ge(d),[Y,H]=Wt(b)?[M.x,P.y]:[P.x,M.y],{weights:q,distances:x}=l(M,P,Y,H);d.style("segment-distances",x),d.style("segment-weights",q)}}n.endBatch(),h.run()}),h.run(),n.ready(l=>{Te.info("Ready",l),e(n)})})}er([{name:te.prefix,icons:te}]),Ae.use(dr),Q(Pe,"addServices"),Q(Fe,"addJunctions"),Q(Ue,"positionNodes"),Q(Ye,"addGroups"),Q(ke,"addEdges"),Q(He,"getAlignments"),Q(Xe,"getRelativeConstraints"),Q(ze,"layoutArchitecture");var Fr={parser:Dr,db:oe,renderer:{draw:Q(async(N,w,_,T)=>{const c=T.db,o=c.getServices(),s=c.getJunctions(),e=c.getGroups(),r=c.getEdges(),n=c.getDataStructures(),i=Qe(w),t=i.append("g");t.attr("class","architecture-edges");const h=i.append("g");h.attr("class","architecture-services");const l=i.append("g");l.attr("class","architecture-groups"),await Sr(c,h,o),Pr(c,h,s);const g=await ze(o,s,e,r,c,n);await br(t,g),await Gr(l,g),Ue(c,g),Je(void 0,i,St("padding"),St("useMaxWidth"))},"draw")},styles:Rr};export{Fr as diagram};