@cagent/chat-embedding-core 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +6 -0
- package/README.md +213 -213
- package/bun.lock +1548 -1548
- package/dist/abnfDiagram-VRR7QNED-3cfb3856.js +1 -0
- package/dist/abnfDiagram-VRR7QNED-686410b0.js +1 -0
- package/dist/abnfDiagram-VRR7QNED-fb22812d.js +1 -0
- package/dist/api/chatRoom.d.ts.map +1 -0
- package/dist/arc-24dd4755.js +1 -0
- package/dist/arc-5d6257cf.js +1 -0
- package/dist/arc-90e71e7e.js +1 -0
- package/dist/architecture-TIHT7OUA-a997f441.js +1 -0
- package/dist/architecture-TIHT7OUA-faa1f9b3.js +1 -0
- package/dist/architectureDiagram-ZJ3FMSHR-87443299.js +1 -0
- package/dist/architectureDiagram-ZJ3FMSHR-93988e41.js +1 -0
- package/dist/architectureDiagram-ZJ3FMSHR-bde2dd21.js +1 -0
- package/dist/blockDiagram-677ZJIJ3-25a94a47.js +1 -0
- package/dist/blockDiagram-677ZJIJ3-88bd543c.js +1 -0
- package/dist/blockDiagram-677ZJIJ3-c769a3c8.js +1 -0
- package/dist/c4Diagram-LMCZKHZV-763880d7.js +1 -0
- package/dist/c4Diagram-LMCZKHZV-d7fc839e.js +1 -0
- package/dist/c4Diagram-LMCZKHZV-da04a76e.js +1 -0
- package/dist/channel-11d3f4bc.js +1 -0
- package/dist/channel-534c2e17.js +1 -0
- package/dist/channel-c3cf6060.js +1 -0
- package/dist/chunk-2Q5K7J3B-2892df89.js +1 -0
- package/dist/chunk-2Q5K7J3B-7960ff8e.js +1 -0
- package/dist/chunk-2Q5K7J3B-9497bf31.js +1 -0
- package/dist/chunk-32BRIVSS-10123eba.js +1 -0
- package/dist/chunk-32BRIVSS-10ac68f7.js +1 -0
- package/dist/chunk-32BRIVSS-8a8507a2.js +1 -0
- package/dist/chunk-5VM5RSS4-36b32f6e.js +1 -0
- package/dist/chunk-5VM5RSS4-4b2efd20.js +1 -0
- package/dist/chunk-5VM5RSS4-5fc85a49.js +1 -0
- package/dist/chunk-EX3LRPZG-36494b87.js +1 -0
- package/dist/chunk-EX3LRPZG-6cd1f2fa.js +1 -0
- package/dist/chunk-EX3LRPZG-7ac6d0d7.js +1 -0
- package/dist/chunk-JWPE2WC7-15a55950.js +1 -0
- package/dist/chunk-JWPE2WC7-84faee3d.js +1 -0
- package/dist/chunk-JWPE2WC7-e2521b1e.js +1 -0
- package/dist/chunk-MOJQB5TN-47f0392f.js +1 -0
- package/dist/chunk-MOJQB5TN-5cc2e61b.js +1 -0
- package/dist/chunk-MOJQB5TN-ea88675c.js +1 -0
- package/dist/chunk-PUDLZKDR-057ec46a.js +1 -0
- package/dist/chunk-PUDLZKDR-53309be9.js +1 -0
- package/dist/chunk-PUDLZKDR-6de50ada.js +1 -0
- package/dist/chunk-RYQCIY6F-06b096c5.js +1 -0
- package/dist/chunk-RYQCIY6F-453400cd.js +1 -0
- package/dist/chunk-RYQCIY6F-8de649c8.js +1 -0
- package/dist/chunk-V7JOEXUC-4083766f.js +1 -0
- package/dist/chunk-V7JOEXUC-4e8d7729.js +1 -0
- package/dist/chunk-V7JOEXUC-bb2df9b0.js +1 -0
- package/dist/chunk-VR4S4FIN-5feb7571.js +1 -0
- package/dist/chunk-VR4S4FIN-9df47127.js +1 -0
- package/dist/chunk-VR4S4FIN-c4f2681d.js +1 -0
- package/dist/chunk-XXDRQBXY-3c9d8bf9.js +1 -0
- package/dist/chunk-XXDRQBXY-de00e988.js +1 -0
- package/dist/chunk-XXDRQBXY-f923ffed.js +1 -0
- package/dist/classDiagram-OUVF2IWQ-5cdf5fe6.js +1 -0
- package/dist/classDiagram-OUVF2IWQ-d51bd736.js +1 -0
- package/dist/classDiagram-OUVF2IWQ-fc2b54d6.js +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-5cdf5fe6.js +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-d51bd736.js +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-fc2b54d6.js +1 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/Bot.d.ts.map +1 -0
- package/dist/components/FeedbackContentDialog.d.ts.map +1 -0
- package/dist/components/RoomReconnectAlert.d.ts.map +1 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/TypingBubble.d.ts.map +1 -0
- package/dist/components/avatars/Avatar.d.ts.map +1 -0
- package/dist/components/avatars/DefaultAvatar.d.ts.map +1 -0
- package/dist/components/bubbles/AgentReasoningBubble.d.ts.map +1 -0
- package/dist/components/bubbles/BotBubble.d.ts.map +1 -0
- package/dist/components/bubbles/ChartBubble.d.ts.map +1 -0
- package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/ChartPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/ChartPopupModal.d.ts.map +1 -0
- package/dist/components/bubbles/FollowUpPromptBubble.d.ts.map +1 -0
- package/dist/components/bubbles/GuestBubble.d.ts.map +1 -0
- package/dist/components/bubbles/LeadCaptureBubble.d.ts.map +1 -0
- package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -0
- package/dist/components/bubbles/SourceBubble.d.ts.map +1 -0
- package/dist/components/bubbles/StableChartWrapper.d.ts.map +1 -0
- package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -0
- package/dist/components/buttons/AttachmentUploadButton.d.ts.map +1 -0
- package/dist/components/buttons/CancelButton.d.ts.map +1 -0
- package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/FeedbackButtons.d.ts.map +1 -0
- package/dist/components/buttons/ImageUploadButton.d.ts.map +1 -0
- package/dist/components/buttons/LeadCaptureButtons.d.ts.map +1 -0
- package/dist/components/buttons/PopupToast.d.ts.map +1 -0
- package/dist/components/buttons/RecordAudioButton.d.ts.map +1 -0
- package/dist/components/buttons/SendButton.d.ts.map +1 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
- package/dist/components/icons/AddImageIcon.d.ts.map +1 -0
- package/dist/components/icons/AttachmentIcon.d.ts.map +1 -0
- package/dist/components/icons/CheckIcon.d.ts.map +1 -0
- package/dist/components/icons/CircleDotIcon.d.ts.map +1 -0
- package/dist/components/icons/ClipboardIcon.d.ts.map +1 -0
- package/dist/components/icons/CopyIcon.d.ts.map +1 -0
- package/dist/components/icons/DeleteIcon.d.ts.map +1 -0
- package/dist/components/icons/EditIcon.d.ts.map +1 -0
- package/dist/components/icons/FullScreenIcon.d.ts.map +1 -0
- package/dist/components/icons/RecordIcon.d.ts.map +1 -0
- package/dist/components/icons/ResetZoomIcon.d.ts.map +1 -0
- package/dist/components/icons/SendIcon.d.ts.map +1 -0
- package/dist/components/icons/SparklesIcon.d.ts.map +1 -0
- package/dist/components/icons/StopIcon.d.ts.map +1 -0
- package/dist/components/icons/ThumbsDownIcon.d.ts.map +1 -0
- package/dist/components/icons/ThumbsUpIcon.d.ts.map +1 -0
- package/dist/components/icons/TickIcon.d.ts.map +1 -0
- package/dist/components/icons/TrashIcon.d.ts.map +1 -0
- package/dist/components/icons/XIcon.d.ts.map +1 -0
- package/dist/components/icons/ZoomInIcon.d.ts.map +1 -0
- package/dist/components/icons/ZoomOutIcon.d.ts.map +1 -0
- package/dist/components/icons/index.d.ts.map +1 -0
- package/dist/components/image/PreviewImage.d.ts.map +1 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/FilePreview.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -0
- package/dist/components/inputs/textInput/index.d.ts.map +1 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/cose-bilkent-JH36ORCC-ac4d2e28.js +1 -0
- package/dist/cose-bilkent-JH36ORCC-c3560feb.js +1 -0
- package/dist/cose-bilkent-JH36ORCC-f0ddc3e7.js +1 -0
- package/dist/cynefin-VYW2F7L2-2458ad91.js +1 -0
- package/dist/cynefin-VYW2F7L2-a8648cf6.js +1 -0
- package/dist/cynefinDiagram-TSTJHNR4-62a29383.js +1 -0
- package/dist/cynefinDiagram-TSTJHNR4-910b3dfd.js +1 -0
- package/dist/cynefinDiagram-TSTJHNR4-deb0bb2c.js +1 -0
- package/dist/cytoscape.esm-56d2239f.js +1 -0
- package/dist/cytoscape.esm-c9352dc8.js +1 -0
- package/dist/dagre-VKFMJZFB-1467d0af.js +1 -0
- package/dist/dagre-VKFMJZFB-35daad97.js +1 -0
- package/dist/dagre-VKFMJZFB-c5b9a4a0.js +1 -0
- package/dist/defaultLocale-b4977250.js +1 -0
- package/dist/defaultLocale-e35a4def.js +1 -0
- package/dist/diagram-FQU43EPY-41eed431.js +1 -0
- package/dist/diagram-FQU43EPY-613e9e4e.js +1 -0
- package/dist/diagram-FQU43EPY-d256050e.js +1 -0
- package/dist/diagram-G47NLZAW-813bbb70.js +1 -0
- package/dist/diagram-G47NLZAW-8ef917d1.js +1 -0
- package/dist/diagram-G47NLZAW-aa02607c.js +1 -0
- package/dist/diagram-NH7WQ7WH-0af7a921.js +1 -0
- package/dist/diagram-NH7WQ7WH-0e4f7f17.js +1 -0
- package/dist/diagram-NH7WQ7WH-6f91f6aa.js +1 -0
- package/dist/diagram-OA4YK3LP-0fba2475.js +1 -0
- package/dist/diagram-OA4YK3LP-587273f4.js +1 -0
- package/dist/diagram-OA4YK3LP-6cbfc7a5.js +1 -0
- package/dist/diagram-WEI45ONY-0241463f.js +1 -0
- package/dist/diagram-WEI45ONY-dd634033.js +1 -0
- package/dist/diagram-WEI45ONY-e002e844.js +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-20ac4ba3.js +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-e9974165.js +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-ead44055.js +1 -0
- package/dist/erDiagram-Q63AITRT-1febb8fc.js +1 -0
- package/dist/erDiagram-Q63AITRT-4ea4b93d.js +1 -0
- package/dist/erDiagram-Q63AITRT-bcb00855.js +1 -0
- package/dist/eventmodeling-45OFAUF4-a82f1f18.js +1 -0
- package/dist/eventmodeling-45OFAUF4-dcf667fc.js +1 -0
- package/dist/features/bubble/components/Bubble.d.ts.map +1 -0
- package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -0
- package/dist/features/bubble/components/Tooltip.d.ts.map +1 -0
- package/dist/features/bubble/components/index.d.ts.map +1 -0
- package/dist/features/bubble/index.d.ts.map +1 -0
- package/dist/features/bubble/types.d.ts.map +1 -0
- package/dist/features/full/components/Full.d.ts.map +1 -0
- package/dist/features/full/components/index.d.ts.map +1 -0
- package/dist/features/full/index.d.ts.map +1 -0
- package/dist/features/popup/components/DisclaimerPopup.d.ts.map +1 -0
- package/dist/features/popup/components/Popup.d.ts.map +1 -0
- package/dist/features/popup/components/index.d.ts.map +1 -0
- package/dist/features/popup/index.d.ts.map +1 -0
- package/dist/features/popup/types.d.ts.map +1 -0
- package/dist/flowDiagram-23GEKE2U-14ee2b3c.js +1 -0
- package/dist/flowDiagram-23GEKE2U-7ab9c2e4.js +1 -0
- package/dist/flowDiagram-23GEKE2U-f7309569.js +1 -0
- package/dist/ganttDiagram-NO4QXBWP-249a167d.js +1 -0
- package/dist/ganttDiagram-NO4QXBWP-bd530d12.js +1 -0
- package/dist/ganttDiagram-NO4QXBWP-e5e495d6.js +1 -0
- package/dist/gitGraph-TEB2WS4Q-72ba3362.js +1 -0
- package/dist/gitGraph-TEB2WS4Q-d07b15b3.js +1 -0
- package/dist/gitGraphDiagram-IHSO6WYX-2964ff91.js +1 -0
- package/dist/gitGraphDiagram-IHSO6WYX-4d9324ad.js +1 -0
- package/dist/gitGraphDiagram-IHSO6WYX-97bf868b.js +1 -0
- package/dist/graph-0df36b9d.js +1 -0
- package/dist/graph-c6801890.js +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/info-DKCQHKI2-d8e8a901.js +1 -0
- package/dist/info-DKCQHKI2-dd69502c.js +1 -0
- package/dist/infoDiagram-FWYZ7A6U-1267309e.js +1 -0
- package/dist/infoDiagram-FWYZ7A6U-5b9d28af.js +1 -0
- package/dist/infoDiagram-FWYZ7A6U-cc33afe4.js +1 -0
- package/dist/init-b029a625.js +1 -0
- package/dist/init-cf76ae07.js +1 -0
- package/dist/ishikawaDiagram-FXEZZL3T-3f0977e8.js +1 -0
- package/dist/ishikawaDiagram-FXEZZL3T-89c1b2f4.js +1 -0
- package/dist/ishikawaDiagram-FXEZZL3T-9fef4653.js +1 -0
- package/dist/journeyDiagram-5HDEW3XC-563a68ff.js +1 -0
- package/dist/journeyDiagram-5HDEW3XC-c8c8d701.js +1 -0
- package/dist/journeyDiagram-5HDEW3XC-e6c5e84b.js +1 -0
- package/dist/kanban-definition-HUTT4EX6-3719e367.js +1 -0
- package/dist/kanban-definition-HUTT4EX6-7bc0cd1e.js +1 -0
- package/dist/kanban-definition-HUTT4EX6-d8b002e3.js +1 -0
- package/dist/katex-67456a45.js +1 -0
- package/dist/katex-b134d23c.js +1 -0
- package/dist/layout-e44354bf.js +1 -0
- package/dist/layout-ff5d33a1.js +1 -0
- package/dist/linear-7b1a23f3.js +1 -0
- package/dist/linear-d7ad6d25.js +1 -0
- package/dist/linear-e5c99c88.js +1 -0
- package/dist/map-05f0ff95.js +1 -0
- package/dist/map-d3292a5b.js +1 -0
- package/dist/mermaid-parser.core-6df0beec.js +1 -0
- package/dist/mermaid-parser.core-d8d1c2b9.js +1 -0
- package/dist/mermaid.core-2d237a1e.js +1 -0
- package/dist/mermaid.core-70d5aead.js +1 -0
- package/dist/mermaid.core-8797d6a9.js +1 -0
- package/dist/mindmap-definition-LN4V7U3C-04a12a88.js +1 -0
- package/dist/mindmap-definition-LN4V7U3C-86a890ce.js +1 -0
- package/dist/mindmap-definition-LN4V7U3C-f495948c.js +1 -0
- package/dist/ordinal-221e41d7.js +1 -0
- package/dist/ordinal-4a51e46c.js +1 -0
- package/dist/packet-7NZHBO7P-b4586e10.js +1 -0
- package/dist/packet-7NZHBO7P-f62750ff.js +1 -0
- package/dist/pegDiagram-2B236MQR-234fe6d1.js +1 -0
- package/dist/pegDiagram-2B236MQR-2826e278.js +1 -0
- package/dist/pegDiagram-2B236MQR-64eeb662.js +1 -0
- package/dist/pie-RZYD4A2V-106ba3d7.js +1 -0
- package/dist/pie-RZYD4A2V-752eda00.js +1 -0
- package/dist/pieDiagram-ENE6RG2P-0c3b09b8.js +1 -0
- package/dist/pieDiagram-ENE6RG2P-3fb5f734.js +1 -0
- package/dist/pieDiagram-ENE6RG2P-af928526.js +1 -0
- package/dist/quadrantDiagram-ABIIQ3AL-1a55c0f5.js +1 -0
- package/dist/quadrantDiagram-ABIIQ3AL-3d15c26d.js +1 -0
- package/dist/quadrantDiagram-ABIIQ3AL-9110fa9c.js +1 -0
- package/dist/queries/sendMessageQuery.d.ts.map +1 -0
- package/dist/radar-I7S5WNFK-53bde9ff.js +1 -0
- package/dist/radar-I7S5WNFK-87e8c5ba.js +1 -0
- package/dist/railroad-3IZDKUUU-99427b9f.js +1 -0
- package/dist/railroad-3IZDKUUU-9e29587d.js +1 -0
- package/dist/railroad-abnf-AHOZXSZD-1d11cb5b.js +1 -0
- package/dist/railroad-abnf-AHOZXSZD-c27db0bc.js +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-38dff87c.js +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-6bb5de0c.js +1 -0
- package/dist/railroad-peg-LSFZ7HO6-c9f0aa71.js +1 -0
- package/dist/railroad-peg-LSFZ7HO6-efcb0a43.js +1 -0
- package/dist/railroadDiagram-RFXS5EU6-14373a87.js +1 -0
- package/dist/railroadDiagram-RFXS5EU6-ec9e696e.js +1 -0
- package/dist/railroadDiagram-RFXS5EU6-effa5611.js +1 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/requirementDiagram-TGXJPOKE-3d199581.js +1 -0
- package/dist/requirementDiagram-TGXJPOKE-5a337f1a.js +1 -0
- package/dist/requirementDiagram-TGXJPOKE-a7960859.js +1 -0
- package/dist/sankeyDiagram-HTMAVEWB-209eac30.js +1 -0
- package/dist/sankeyDiagram-HTMAVEWB-3c852fda.js +1 -0
- package/dist/sankeyDiagram-HTMAVEWB-46aa1eb1.js +1 -0
- package/dist/sequenceDiagram-DBY2YBRQ-4121f7c2.js +1 -0
- package/dist/sequenceDiagram-DBY2YBRQ-7bad18e4.js +1 -0
- package/dist/sequenceDiagram-DBY2YBRQ-af96f48e.js +1 -0
- package/dist/sizeCapture-X5ZJPWSS-13826306.js +1 -0
- package/dist/sizeCapture-X5ZJPWSS-32e2eec7.js +1 -0
- package/dist/sizeCapture-X5ZJPWSS-a078176f.js +1 -0
- package/dist/stateDiagram-2N3HPSRC-527374a2.js +1 -0
- package/dist/stateDiagram-2N3HPSRC-8047e124.js +1 -0
- package/dist/stateDiagram-2N3HPSRC-ba344b5d.js +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-7580bf69.js +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-d4c58fd3.js +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-e5921044.js +1 -0
- package/dist/store/constant.d.ts.map +1 -0
- package/dist/swimlanes-5IMT3BWC-5834b232.js +1 -0
- package/dist/swimlanes-5IMT3BWC-791a3547.js +1 -0
- package/dist/swimlanes-5IMT3BWC-db2c593a.js +1 -0
- package/dist/swimlanesDiagram-G3AALYLV-36c30eec.js +1 -0
- package/dist/swimlanesDiagram-G3AALYLV-89220ddd.js +1 -0
- package/dist/swimlanesDiagram-G3AALYLV-b621330d.js +1 -0
- package/dist/timeline-definition-FHXFAJF6-0482a67a.js +1 -0
- package/dist/timeline-definition-FHXFAJF6-1d165a67.js +1 -0
- package/dist/timeline-definition-FHXFAJF6-f9600b97.js +1 -0
- package/dist/treeView-QDETBFTQ-0ecf20cd.js +1 -0
- package/dist/treeView-QDETBFTQ-96ed8e2f.js +1 -0
- package/dist/treemap-6X3UGDF4-0a7f19ca.js +1 -0
- package/dist/treemap-6X3UGDF4-9f498e0c.js +1 -0
- package/dist/types/chart.d.ts.map +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/audioRecording.d.ts.map +1 -0
- package/dist/utils/chartInstanceManager.d.ts.map +1 -0
- package/dist/utils/chartTagParser.d.ts.map +1 -0
- package/dist/utils/chatInputHistory.d.ts.map +1 -0
- package/dist/utils/chatStreamHelper.d.ts.map +1 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/isMobileSignal.d.ts.map +1 -0
- package/dist/utils/transcriptApi.d.ts.map +1 -0
- package/dist/utils/ultimateJsonParser.d.ts.map +1 -0
- package/dist/vennDiagram-L72KCM5P-05176193.js +1 -0
- package/dist/vennDiagram-L72KCM5P-25a48393.js +1 -0
- package/dist/vennDiagram-L72KCM5P-28cffef7.js +1 -0
- package/dist/wardley-OPB4EBWU-08c5f013.js +1 -0
- package/dist/wardley-OPB4EBWU-9803a1d9.js +1 -0
- package/dist/wardleyDiagram-EHGQE667-052e6de9.js +1 -0
- package/dist/wardleyDiagram-EHGQE667-6a614fd9.js +1 -0
- package/dist/wardleyDiagram-EHGQE667-d11fe904.js +1 -0
- package/dist/web-25bb78b9.js +1 -0
- package/dist/web-753300e1.js +1 -0
- package/dist/web-c3ed22c4.js +1 -0
- package/dist/web.d.ts.map +1 -0
- package/dist/web.js +1 -1
- package/dist/window.d.ts.map +1 -0
- package/dist/xychartDiagram-FW5EYKEG-43118b83.js +1 -0
- package/dist/xychartDiagram-FW5EYKEG-d77187fe.js +1 -0
- package/dist/xychartDiagram-FW5EYKEG-f2fac492.js +1 -0
- package/package.json +86 -86
- package/server.js +477 -477
- package/.idea/flowise-chatbox.iml +0 -10
- package/.idea/modules.xml +0 -8
- package/.idea/workspace.xml +0 -4
- package/docs/embedding-style-guide.md +0 -417
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as e,r,g as a}from"./chunk-MOJQB5TN-ea88675c.js";import{p as t}from"./chunk-JWPE2WC7-e2521b1e.js";import{_ as n,l as s}from"./mermaid.core-8797d6a9.js";import{o as m,M as p}from"./mermaid-parser.core-d8d1c2b9.js";import"./web-c3ed22c4.js";var i=m().RailroadAbnf.parser.LangiumParser,l=n((e=>1===(e=e.alternatives.map(o)).length?e[0]:{type:"choice",alternatives:e}),"transformAlternation"),o=n((e=>1===(e=e.elements.map(f)).length?e[0]:{type:"sequence",elements:e}),"transformConcatenation"),u=n((e=>{var r,a;return e.includes("*")?([a,r]=e.split("*"),{min:a?parseInt(a,10):0,max:r?parseInt(r,10):1/0}):{min:a=parseInt(e,10),max:a}}),"parseRepeat"),f=n((e=>{var r,a=d(e.primary);return e.repeat?(({min:e,max:r}=u(e.repeat)),0===e&&1===r?{type:"optional",element:a}:{type:"repetition",element:a,min:e,max:r}):a}),"transformElement"),d=n((e=>{switch(e.$type){case"AbnfStringLiteral":case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return l(e.element);case"AbnfOptionalGroup":return{type:"optional",element:l(e.element)};default:throw new Error("Unsupported ABNF primary node: "+e.$type)}}),"transformPrimary"),c=n((e=>({name:e.name,definition:l(e.definition)})),"transformRule"),y=n((r=>{t(r,e),r.title&&e.setTitle(r.title),r.rules.map((r=>e.addRule(c(r))))}),"populateDb"),b={parser:{parse:n((r=>{if(e.clear(),s.debug("[ABNF Parser] Starting Langium parse"),0<(r=i.parse(r)).lexerErrors.length||0<r.parserErrors.length)throw new p(r);r=r.value,s.debug("[ABNF Parser] Parsed rules:",r.rules.length),y(r),s.debug("[ABNF Parser] Parse complete")}),"parse"),parser:{yy:e}},db:e,renderer:r,styles:a};export{b as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e,r;(e=self.document)&&!e.getElementById("livereloadscript")&&((r=e.createElement("script")).async=1,r.src="//"+(self.location.host||"localhost").split(":")[0]+":35729/livereload.js?snipver=1",r.id="livereloadscript",e.getElementsByTagName("head")[0].appendChild(r));import{d as a,r as t,g as n}from"./chunk-MOJQB5TN-5cc2e61b.js";import{p as s}from"./chunk-JWPE2WC7-84faee3d.js";import{_ as l,l as i}from"./mermaid.core-2d237a1e.js";import{o as m,M as p}from"./mermaid-parser.core-6df0beec.js";import"./web-753300e1.js";var o=m().RailroadAbnf.parser.LangiumParser,u=l(e=>1===(e=e.alternatives.map(d)).length?e[0]:{type:"choice",alternatives:e},"transformAlternation"),d=l(e=>1===(e=e.elements.map(f)).length?e[0]:{type:"sequence",elements:e},"transformConcatenation"),c=l(e=>{var r,a;return e.includes("*")?([a,r]=e.split("*"),{min:a?parseInt(a,10):0,max:r?parseInt(r,10):1/0}):{min:a=parseInt(e,10),max:a}},"parseRepeat"),f=l(e=>{var r,a=y(e.primary);return e.repeat?(({min:e,max:r}=c(e.repeat)),0===e&&1===r?{type:"optional",element:a}:{type:"repetition",element:a,min:e,max:r}):a},"transformElement"),y=l(e=>{switch(e.$type){case"AbnfStringLiteral":case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return u(e.element);case"AbnfOptionalGroup":return{type:"optional",element:u(e.element)};default:throw new Error("Unsupported ABNF primary node: "+e.$type)}},"transformPrimary"),g=l(e=>({name:e.name,definition:u(e.definition)}),"transformRule"),h=l(e=>{s(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(g(e)))},"populateDb"),v={parse:l(e=>{if(a.clear(),i.debug("[ABNF Parser] Starting Langium parse"),0<(e=o.parse(e)).lexerErrors.length||0<e.parserErrors.length)throw new p(e);e=e.value,i.debug("[ABNF Parser] Parsed rules:",e.rules.length),h(e),i.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},b={parser:v,db:a,renderer:t,styles:n};export{b as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e,r;(e=self.document)&&!e.getElementById("livereloadscript")&&((r=e.createElement("script")).async=1,r.src="//"+(self.location.host||"localhost").split(":")[0]+":35729/livereload.js?snipver=1",r.id="livereloadscript",e.getElementsByTagName("head")[0].appendChild(r));import{d as a,r as t,g as n}from"./chunk-MOJQB5TN-47f0392f.js";import{p as s}from"./chunk-JWPE2WC7-15a55950.js";import{_ as l,l as i}from"./mermaid.core-70d5aead.js";import{o as m,M as p}from"./mermaid-parser.core-6df0beec.js";import"./web-25bb78b9.js";var o=m().RailroadAbnf.parser.LangiumParser,u=l(e=>1===(e=e.alternatives.map(d)).length?e[0]:{type:"choice",alternatives:e},"transformAlternation"),d=l(e=>1===(e=e.elements.map(f)).length?e[0]:{type:"sequence",elements:e},"transformConcatenation"),c=l(e=>{var r,a;return e.includes("*")?([a,r]=e.split("*"),{min:a?parseInt(a,10):0,max:r?parseInt(r,10):1/0}):{min:a=parseInt(e,10),max:a}},"parseRepeat"),f=l(e=>{var r,a=y(e.primary);return e.repeat?(({min:e,max:r}=c(e.repeat)),0===e&&1===r?{type:"optional",element:a}:{type:"repetition",element:a,min:e,max:r}):a},"transformElement"),y=l(e=>{switch(e.$type){case"AbnfStringLiteral":case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return u(e.element);case"AbnfOptionalGroup":return{type:"optional",element:u(e.element)};default:throw new Error("Unsupported ABNF primary node: "+e.$type)}},"transformPrimary"),g=l(e=>({name:e.name,definition:u(e.definition)}),"transformRule"),h=l(e=>{s(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(g(e)))},"populateDb"),v={parse:l(e=>{if(a.clear(),i.debug("[ABNF Parser] Starting Langium parse"),0<(e=o.parse(e)).lexerErrors.length||0<e.parserErrors.length)throw new p(e);e=e.value,i.debug("[ABNF Parser] Parsed rules:",e.rules.length),h(e),i.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},b={parser:v,db:a,renderer:t,styles:n};export{b as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatRoom.d.ts","sourceRoot":"","sources":["../../src/api/chatRoom.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAiB,UAAU,EAAe,MAAM,kBAAkB,CAAC;AAG1E,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAoCD;;GAEG;AACH,eAAO,MAAM,UAAU,eAAsB,MAAM,UAAU,MAAM,YAAY,MAAM,KAAG,QAAQ,YAAY,QAAQ,CAAC,CASpH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,WAAkB,MAAM,WAAW,MAAM,YAAY,MAAM,KAAG,QAAQ,YAAY,QAAQ,CAAC,CAS/G,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,WAAkB,MAAM,WAAW,MAAM,YAAY,MAAM,KAAG,QAAQ,YAAY;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAS5H,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,WAAkB,MAAM,YAAY,MAAM,KAAG,QAAQ,YAAY;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC,CAS3G,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,WAAkB,MAAM,YAAY,MAAM,KAAG,QAAQ,YAAY,QAAQ,CAAC,CAEnG,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,WAAkB,MAAM,2BAAuB,MAAM,YAAY,MAAM,KAAG,QAAQ,YAAY,WAAW,EAAE,CAAC,CAKvI,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,WACtB,MAAM,cACF,MAAM,aACP;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,YAClD,MAAM,KACf,QAAQ,YAAY;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,MAAM,CAAA;CAAE,CAAC,CAS5D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,aAAc,QAAQ,GAAG,IAAI,KAAG,OAGjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,aAAc,QAAQ,GAAG,IAAI,KAAG,OAG7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,eAAgB,MAAM,KAAG,MAAM,GAAG,IAM7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,eAAgB,MAAM,UAAU,MAAM,KAAG,IAMhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,eAAgB,MAAM,KAAG,IAMtD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n,t;(n=self.document)&&!n.getElementById("livereloadscript")&&((t=n.createElement("script")).async=1,t.src="//"+(self.location.host||"localhost").split(":")[0]+":35729/livereload.js?snipver=1",t.id="livereloadscript",n.getElementsByTagName("head")[0].appendChild(t));import{a1 as a,a2 as e,a3 as c,a4 as r,a5 as o,a6 as i,a7 as l,a8 as u,a9 as y,aa as s,ab as p,ac as f,ad as x,ae as d,af as h}from"./mermaid.core-70d5aead.js";function g(n){return n.innerRadius}function v(n){return n.outerRadius}function m(n){return n.startAngle}function T(n){return n.endAngle}function A(n){return n&&n.padAngle}function R(n,t,a,e,c,r,o){var i,l,u=(o=(o?r:-r)/s((y=n-a)*y+(u=t-e)*u))*u,y=(o=-o*y,n+u),p=(n=t+o,t=a+u,a=e+o,e=(y+t)/2,(n+a)/2),f=t-y,x=(t=((y=y*a-t*n)*(i=a-n)-f*(a=(i<0?-1:1)*s(h(0,(r=c-r)*r*(l=f*f+i*i)-y*y))))/l,n=(-y*f-i*a)/l,(y*i+f*a)/l);y=(-y*f+i*a)/l;return(a=x-e)*a+(l=y-p)*l<(f=t-e)*f+(i=n-p)*i&&(t=x,n=y),{cx:t,cy:n,x01:-u,y01:-o,x11:t*(c/r-1),y11:n*(c/r-1)}}function E(){var n=g,t=v,h=f(0),E=null,j=m,B=T,b=A,C=null,I=a(N);function N(){var a,f,g,v,m,T,A,N,P,k,q,w,z,D,F,G,H,J,K,L,M,O,Q=+n.apply(this,arguments),S=+t.apply(this,arguments),U=j.apply(this,arguments)-e,V=B.apply(this,arguments)-e,W=u(V-U),X=U<V;if(C=C||(a=I()),S<Q&&(f=S,S=Q,Q=f),c<S?r-c<W?(C.moveTo(S*o(U),S*i(U)),C.arc(0,0,S,U,V,!X),c<Q&&(C.moveTo(Q*o(V),Q*i(V)),C.arc(0,0,Q,V,U,X))):(v=f=U,m=g=V,A=T=W,q=b.apply(this,arguments)/2,z=c<q&&(E?+E.apply(this,arguments):s(Q*Q+S*S)),O=M=N=l(u(S-Q)/2,+h.apply(this,arguments)),c<z&&(w=x(z/Q*i(q)),z=x(z/S*i(q)),(T-=2*w)>c?(v+=w*=X?1:-1,m-=w):(T=0,v=m=(U+V)/2),(A-=2*z)>c?(f+=z*=X?1:-1,g-=z):(A=0,f=g=(U+V)/2)),q=S*o(f),w=S*i(f),z=Q*o(m),U=Q*i(m),c<N&&(D=S*o(g),F=S*i(g),G=Q*o(v),H=Q*i(v),W<y)&&((V=function(n,t,a,e,r,o,i,l){var u=(l-=o)*(a-=n)-(i-=r)*(e-=t);if(!(u*u<c))return[n+(u=(i*(t-o)-l*(n-r))/u)*a,t+u*e]}(q,w,G,H,D,F,z,U))?(W=q-V[0],L=w-V[1],J=D-V[0],K=F-V[1],W=1/i(d((W*J+L*K)/(s(W*W+L*L)*s(J*J+K*K)))/2),L=s(V[0]*V[0]+V[1]*V[1]),M=l(N,(Q-L)/(W-1)),O=l(N,(S-L)/(1+W))):M=O=0),c<A?c<O?(P=R(G,H,q,w,S,O,X),k=R(D,F,z,U,S,O,X),C.moveTo(P.cx+P.x01,P.cy+P.y01),O<N?C.arc(P.cx,P.cy,O,p(P.y01,P.x01),p(k.y01,k.x01),!X):(C.arc(P.cx,P.cy,O,p(P.y01,P.x01),p(P.y11,P.x11),!X),C.arc(0,0,S,p(P.cy+P.y11,P.cx+P.x11),p(k.cy+k.y11,k.cx+k.x11),!X),C.arc(k.cx,k.cy,O,p(k.y11,k.x11),p(k.y01,k.x01),!X))):(C.moveTo(q,w),C.arc(0,0,S,f,g,!X)):C.moveTo(q,w),c<Q&&c<T?c<M?(P=R(z,U,D,F,Q,-M,X),k=R(q,w,G,H,Q,-M,X),C.lineTo(P.cx+P.x01,P.cy+P.y01),M<N?C.arc(P.cx,P.cy,M,p(P.y01,P.x01),p(k.y01,k.x01),!X):(C.arc(P.cx,P.cy,M,p(P.y01,P.x01),p(P.y11,P.x11),!X),C.arc(0,0,Q,p(P.cy+P.y11,P.cx+P.x11),p(k.cy+k.y11,k.cx+k.x11),X),C.arc(k.cx,k.cy,M,p(k.y11,k.x11),p(k.y01,k.x01),!X))):C.arc(0,0,Q,m,v,X):C.lineTo(z,U)):C.moveTo(0,0),C.closePath(),a)return C=null,a+""||null}return N.centroid=function(){var a=(+n.apply(this,arguments)+ +t.apply(this,arguments))/2,e=(+j.apply(this,arguments)+ +B.apply(this,arguments))/2-y/2;return[o(e)*a,i(e)*a]},N.innerRadius=function(t){return arguments.length?(n="function"==typeof t?t:f(+t),N):n},N.outerRadius=function(n){return arguments.length?(t="function"==typeof n?n:f(+n),N):t},N.cornerRadius=function(n){return arguments.length?(h="function"==typeof n?n:f(+n),N):h},N.padRadius=function(n){return arguments.length?(E=null==n?null:"function"==typeof n?n:f(+n),N):E},N.startAngle=function(n){return arguments.length?(j="function"==typeof n?n:f(+n),N):j},N.endAngle=function(n){return arguments.length?(B="function"==typeof n?n:f(+n),N):B},N.padAngle=function(n){return arguments.length?(b="function"==typeof n?n:f(+n),N):b},N.context=function(n){return arguments.length?(C=null==n?null:n,N):C},N}export{E as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a1 as n,a2 as t,a3 as a,a4 as c,a5 as r,a6 as e,a7 as u,a8 as o,a9 as i,aa as y,ab as l,ac as s,ad as f,ae as x,af as p}from"./mermaid.core-8797d6a9.js";function h(n){return n.innerRadius}function d(n){return n.outerRadius}function g(n){return n.startAngle}function v(n){return n.endAngle}function m(n){return n&&n.padAngle}function T(n,t,a,c,r,e,u){var o,i,l=(u=(u?e:-e)/y((s=n-a)*s+(l=t-c)*l))*l,s=(u=-u*s,n+l),f=(n=t+u,t=a+l,a=c+u,c=(s+t)/2,(n+a)/2),x=t-s,h=(t=((s=s*a-t*n)*(o=a-n)-x*(a=(o<0?-1:1)*y(p(0,(e=r-e)*e*(i=x*x+o*o)-s*s))))/i,n=(-s*x-o*a)/i,(s*o+x*a)/i);s=(-s*x+o*a)/i;return(a=h-c)*a+(i=s-f)*i<(x=t-c)*x+(o=n-f)*o&&(t=h,n=s),{cx:t,cy:n,x01:-l,y01:-u,x11:t*(r/e-1),y11:n*(r/e-1)}}function A(){var p=h,A=d,R=s(0),b=null,j=g,P=v,k=m,q=null,w=n(z);function z(){var n,s,h,d,g,v,m,z,B,C,D,E,F,G,H,I,J,K,L,M,N,O,Q=+p.apply(this,arguments),S=+A.apply(this,arguments),U=j.apply(this,arguments)-t,V=P.apply(this,arguments)-t,W=o(V-U),X=U<V;if(q=q||(n=w()),S<Q&&(s=S,S=Q,Q=s),a<S?c-a<W?(q.moveTo(S*r(U),S*e(U)),q.arc(0,0,S,U,V,!X),a<Q&&(q.moveTo(Q*r(V),Q*e(V)),q.arc(0,0,Q,V,U,X))):(d=s=U,g=h=V,m=v=W,D=k.apply(this,arguments)/2,F=a<D&&(b?+b.apply(this,arguments):y(Q*Q+S*S)),O=N=z=u(o(S-Q)/2,+R.apply(this,arguments)),a<F&&(E=f(F/Q*e(D)),F=f(F/S*e(D)),(v-=2*E)>a?(d+=E*=X?1:-1,g-=E):(v=0,d=g=(U+V)/2),(m-=2*F)>a?(s+=F*=X?1:-1,h-=F):(m=0,s=h=(U+V)/2)),D=S*r(s),E=S*e(s),F=Q*r(g),U=Q*e(g),a<z&&(G=S*r(h),H=S*e(h),I=Q*r(d),J=Q*e(d),W<i)&&((V=function(n,t,c,r,e,u,o,i){var y=(i-=u)*(c-=n)-(o-=e)*(r-=t);if(!(y*y<a))return[n+(y=(o*(t-u)-i*(n-e))/y)*c,t+y*r]}(D,E,I,J,G,H,F,U))?(W=D-V[0],M=E-V[1],K=G-V[0],L=H-V[1],W=1/e(x((W*K+M*L)/(y(W*W+M*M)*y(K*K+L*L)))/2),M=y(V[0]*V[0]+V[1]*V[1]),N=u(z,(Q-M)/(W-1)),O=u(z,(S-M)/(1+W))):N=O=0),a<m?a<O?(B=T(I,J,D,E,S,O,X),C=T(G,H,F,U,S,O,X),q.moveTo(B.cx+B.x01,B.cy+B.y01),O<z?q.arc(B.cx,B.cy,O,l(B.y01,B.x01),l(C.y01,C.x01),!X):(q.arc(B.cx,B.cy,O,l(B.y01,B.x01),l(B.y11,B.x11),!X),q.arc(0,0,S,l(B.cy+B.y11,B.cx+B.x11),l(C.cy+C.y11,C.cx+C.x11),!X),q.arc(C.cx,C.cy,O,l(C.y11,C.x11),l(C.y01,C.x01),!X))):(q.moveTo(D,E),q.arc(0,0,S,s,h,!X)):q.moveTo(D,E),a<Q&&a<v?a<N?(B=T(F,U,G,H,Q,-N,X),C=T(D,E,I,J,Q,-N,X),q.lineTo(B.cx+B.x01,B.cy+B.y01),N<z?q.arc(B.cx,B.cy,N,l(B.y01,B.x01),l(C.y01,C.x01),!X):(q.arc(B.cx,B.cy,N,l(B.y01,B.x01),l(B.y11,B.x11),!X),q.arc(0,0,Q,l(B.cy+B.y11,B.cx+B.x11),l(C.cy+C.y11,C.cx+C.x11),X),q.arc(C.cx,C.cy,N,l(C.y11,C.x11),l(C.y01,C.x01),!X))):q.arc(0,0,Q,g,d,X):q.lineTo(F,U)):q.moveTo(0,0),q.closePath(),n)return q=null,n+""||null}return z.centroid=function(){var n=(+p.apply(this,arguments)+ +A.apply(this,arguments))/2,t=(+j.apply(this,arguments)+ +P.apply(this,arguments))/2-i/2;return[r(t)*n,e(t)*n]},z.innerRadius=function(n){return arguments.length?(p="function"==typeof n?n:s(+n),z):p},z.outerRadius=function(n){return arguments.length?(A="function"==typeof n?n:s(+n),z):A},z.cornerRadius=function(n){return arguments.length?(R="function"==typeof n?n:s(+n),z):R},z.padRadius=function(n){return arguments.length?(b=null==n?null:"function"==typeof n?n:s(+n),z):b},z.startAngle=function(n){return arguments.length?(j="function"==typeof n?n:s(+n),z):j},z.endAngle=function(n){return arguments.length?(P="function"==typeof n?n:s(+n),z):P},z.padAngle=function(n){return arguments.length?(k="function"==typeof n?n:s(+n),z):k},z.context=function(n){return arguments.length?(q=null==n?null:n,z):q},z}export{A as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n,t;(n=self.document)&&!n.getElementById("livereloadscript")&&((t=n.createElement("script")).async=1,t.src="//"+(self.location.host||"localhost").split(":")[0]+":35729/livereload.js?snipver=1",t.id="livereloadscript",n.getElementsByTagName("head")[0].appendChild(t));import{a1 as a,a2 as e,a3 as c,a4 as r,a5 as o,a6 as i,a7 as l,a8 as u,a9 as y,aa as s,ab as p,ac as f,ad as x,ae as d,af as h}from"./mermaid.core-2d237a1e.js";function g(n){return n.innerRadius}function v(n){return n.outerRadius}function m(n){return n.startAngle}function T(n){return n.endAngle}function A(n){return n&&n.padAngle}function R(n,t,a,e,c,r,o){var i,l,u=(o=(o?r:-r)/s((y=n-a)*y+(u=t-e)*u))*u,y=(o=-o*y,n+u),p=(n=t+o,t=a+u,a=e+o,e=(y+t)/2,(n+a)/2),f=t-y,x=(t=((y=y*a-t*n)*(i=a-n)-f*(a=(i<0?-1:1)*s(h(0,(r=c-r)*r*(l=f*f+i*i)-y*y))))/l,n=(-y*f-i*a)/l,(y*i+f*a)/l);y=(-y*f+i*a)/l;return(a=x-e)*a+(l=y-p)*l<(f=t-e)*f+(i=n-p)*i&&(t=x,n=y),{cx:t,cy:n,x01:-u,y01:-o,x11:t*(c/r-1),y11:n*(c/r-1)}}function E(){var n=g,t=v,h=f(0),E=null,j=m,B=T,b=A,C=null,I=a(N);function N(){var a,f,g,v,m,T,A,N,P,k,q,w,z,D,F,G,H,J,K,L,M,O,Q=+n.apply(this,arguments),S=+t.apply(this,arguments),U=j.apply(this,arguments)-e,V=B.apply(this,arguments)-e,W=u(V-U),X=U<V;if(C=C||(a=I()),S<Q&&(f=S,S=Q,Q=f),c<S?r-c<W?(C.moveTo(S*o(U),S*i(U)),C.arc(0,0,S,U,V,!X),c<Q&&(C.moveTo(Q*o(V),Q*i(V)),C.arc(0,0,Q,V,U,X))):(v=f=U,m=g=V,A=T=W,q=b.apply(this,arguments)/2,z=c<q&&(E?+E.apply(this,arguments):s(Q*Q+S*S)),O=M=N=l(u(S-Q)/2,+h.apply(this,arguments)),c<z&&(w=x(z/Q*i(q)),z=x(z/S*i(q)),(T-=2*w)>c?(v+=w*=X?1:-1,m-=w):(T=0,v=m=(U+V)/2),(A-=2*z)>c?(f+=z*=X?1:-1,g-=z):(A=0,f=g=(U+V)/2)),q=S*o(f),w=S*i(f),z=Q*o(m),U=Q*i(m),c<N&&(D=S*o(g),F=S*i(g),G=Q*o(v),H=Q*i(v),W<y)&&((V=function(n,t,a,e,r,o,i,l){var u=(l-=o)*(a-=n)-(i-=r)*(e-=t);if(!(u*u<c))return[n+(u=(i*(t-o)-l*(n-r))/u)*a,t+u*e]}(q,w,G,H,D,F,z,U))?(W=q-V[0],L=w-V[1],J=D-V[0],K=F-V[1],W=1/i(d((W*J+L*K)/(s(W*W+L*L)*s(J*J+K*K)))/2),L=s(V[0]*V[0]+V[1]*V[1]),M=l(N,(Q-L)/(W-1)),O=l(N,(S-L)/(1+W))):M=O=0),c<A?c<O?(P=R(G,H,q,w,S,O,X),k=R(D,F,z,U,S,O,X),C.moveTo(P.cx+P.x01,P.cy+P.y01),O<N?C.arc(P.cx,P.cy,O,p(P.y01,P.x01),p(k.y01,k.x01),!X):(C.arc(P.cx,P.cy,O,p(P.y01,P.x01),p(P.y11,P.x11),!X),C.arc(0,0,S,p(P.cy+P.y11,P.cx+P.x11),p(k.cy+k.y11,k.cx+k.x11),!X),C.arc(k.cx,k.cy,O,p(k.y11,k.x11),p(k.y01,k.x01),!X))):(C.moveTo(q,w),C.arc(0,0,S,f,g,!X)):C.moveTo(q,w),c<Q&&c<T?c<M?(P=R(z,U,D,F,Q,-M,X),k=R(q,w,G,H,Q,-M,X),C.lineTo(P.cx+P.x01,P.cy+P.y01),M<N?C.arc(P.cx,P.cy,M,p(P.y01,P.x01),p(k.y01,k.x01),!X):(C.arc(P.cx,P.cy,M,p(P.y01,P.x01),p(P.y11,P.x11),!X),C.arc(0,0,Q,p(P.cy+P.y11,P.cx+P.x11),p(k.cy+k.y11,k.cx+k.x11),X),C.arc(k.cx,k.cy,M,p(k.y11,k.x11),p(k.y01,k.x01),!X))):C.arc(0,0,Q,m,v,X):C.lineTo(z,U)):C.moveTo(0,0),C.closePath(),a)return C=null,a+""||null}return N.centroid=function(){var a=(+n.apply(this,arguments)+ +t.apply(this,arguments))/2,e=(+j.apply(this,arguments)+ +B.apply(this,arguments))/2-y/2;return[o(e)*a,i(e)*a]},N.innerRadius=function(t){return arguments.length?(n="function"==typeof t?t:f(+t),N):n},N.outerRadius=function(n){return arguments.length?(t="function"==typeof n?n:f(+n),N):t},N.cornerRadius=function(n){return arguments.length?(h="function"==typeof n?n:f(+n),N):h},N.padRadius=function(n){return arguments.length?(E=null==n?null:"function"==typeof n?n:f(+n),N):E},N.startAngle=function(n){return arguments.length?(j="function"==typeof n?n:f(+n),N):j},N.endAngle=function(n){return arguments.length?(B="function"==typeof n?n:f(+n),N):B},N.padAngle=function(n){return arguments.length?(b="function"==typeof n?n:f(+n),N):b},N.context=function(n){return arguments.length?(C=null==n?null:n,N):C},N}export{E as d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e,r;(e=self.document)&&!e.getElementById("livereloadscript")&&((r=e.createElement("script")).async=1,r.src="//"+(self.location.host||"localhost").split(":")[0]+":35729/livereload.js?snipver=1",r.id="livereloadscript",e.getElementsByTagName("head")[0].appendChild(r));export{A as ArchitectureModule,f as createArchitectureServices}from"./mermaid-parser.core-6df0beec.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{A as ArchitectureModule,f as createArchitectureServices}from"./mermaid-parser.core-d8d1c2b9.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t,e;(t=self.document)&&!t.getElementById("livereloadscript")&&((e=t.createElement("script")).async=1,e.src="//"+(self.location.host||"localhost").split(":")[0]+":35729/livereload.js?snipver=1",e.id="livereloadscript",t.getElementsByTagName("head")[0].appendChild(e));import{p as i}from"./chunk-JWPE2WC7-15a55950.js";import{E as n,s as r,g as o,n as a,o as s,b as h,c as l,_ as d,v as g,F as c,G as u,b9 as p,al as f,l as m,j as y,K as v,X as E,r as N,b2 as T,d as A,am as w,i as I}from"./mermaid.core-70d5aead.js";import{v as C}from"./mermaid-parser.core-6df0beec.js";import{c as L}from"./cytoscape.esm-56d2239f.js";import{c as _,g as M}from"./web-25bb78b9.js";var x,O,D={exports:{}},b={exports:{}},R={exports:{}};function F(){var t;return O||(O=1,t=function(t){return e={45:(t,e,i)=>{var n={};n.layoutBase=i(551),n.CoSEConstants=i(806),n.CoSEEdge=i(767),n.CoSEGraph=i(880),n.CoSEGraphManager=i(578),n.CoSELayout=i(765),n.CoSENode=i(991),n.ConstraintHandler=i(902),t.exports=n},806:(t,e,i)=>{var n,r=i(551).FDLayoutConstants;function o(){}for(n in r)o[n]=r[n];o.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,o.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,o.DEFAULT_COMPONENT_SEPERATION=60,o.TILE=!0,o.TILING_PADDING_VERTICAL=10,o.TILING_PADDING_HORIZONTAL=10,o.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,o.ENFORCE_CONSTRAINTS=!0,o.APPLY_LAYOUT=!0,o.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,o.TREE_REDUCTION_ON_INCREMENTAL=!0,o.PURE_INCREMENTAL=o.DEFAULT_INCREMENTAL,t.exports=o},767:(t,e,i)=>{var n,r=i(551).FDLayoutEdge;function o(t,e,i){r.call(this,t,e,i)}for(n in o.prototype=Object.create(r.prototype),r)o[n]=r[n];t.exports=o},880:(t,e,i)=>{var n,r=i(551).LGraph;function o(t,e,i){r.call(this,t,e,i)}for(n in o.prototype=Object.create(r.prototype),r)o[n]=r[n];t.exports=o},578:(t,e,i)=>{var n,r=i(551).LGraphManager;function o(t){r.call(this,t)}for(n in o.prototype=Object.create(r.prototype),r)o[n]=r[n];t.exports=o},765:(t,e,i)=>{var n,r=i(551).FDLayout,o=i(578),a=i(880),s=i(991),h=i(767),l=i(806),d=i(902),g=i(551).FDLayoutConstants,c=i(551).LayoutConstants,u=i(551).Point,p=i(551).PointD,f=i(551).DimensionD,m=i(551).Layout,y=i(551).Integer,v=i(551).IGeometry,E=i(551).LGraph,N=i(551).Transform,T=i(551).LinkedList;function A(){r.call(this),this.toBeTiled={},this.constraints={}}for(n in A.prototype=Object.create(r.prototype),r)A[n]=r[n];A.prototype.newGraphManager=function(){var t=new o(this);return this.graphManager=t},A.prototype.newGraph=function(t){return new a(null,this.graphManager,t)},A.prototype.newNode=function(t){return new s(this.graphManager,t)},A.prototype.newEdge=function(t){return new h(null,null,t)},A.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=g.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=g.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},A.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/g.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},A.prototype.layout=function(){return c.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.prototype.classicLayout=function(){var t,e,i;return 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(),e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(i)):0<(t=this.getFlatForest()).length?this.positionNodesRadially(t):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()),0<Object.keys(this.constraints).length&&(d.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),l.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},A.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}if(this.totalIterations%g.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(0<this.prunedNodesAll.length))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(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))}var t;if(this.isTreeGrowing&&(this.growTreeIterations%10==0&&(0<this.prunedNodesAll.length?(this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),l.PURE_INCREMENTAL?this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL):(this.isTreeGrowing=!1,this.isGrowthFinished=!0)),this.growTreeIterations++),this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),l.PURE_INCREMENTAL?this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=g.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var e=!this.isTreeGrowing&&!this.isGrowthFinished,i=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(e,i),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i<t.length;i++){var n=t[i].rect,r=t[i].id;e[r]={id:r,x:n.getCenterX(),y:n.getCenterY(),w:n.width,h:n.height}}return e},A.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===g.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},A.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].calculateDisplacement();for(0<Object.keys(this.constraints).length&&this.updateDisplacements(),e=0;e<t.length;e++)t[e].move()},A.prototype.initConstraintVariables=function(){for(var t=this,e=(this.idToNodeMap=new Map,this.fixedNodeSet=new Set,this.graphManager.getAllNodes()),i=0;i<e.length;i++){var n=e[i];this.idToNodeMap.set(n.id,n)}function r(e){for(var i,n=e.getChild().getNodes(),o=0,a=0;a<n.length;a++)null==(i=n[a]).getChild()?t.fixedNodeSet.has(i.id)&&(o+=100):o+=r(i);return o}if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(e){t.fixedNodeSet.add(e.nodeId)});var o;for(e=this.graphManager.getAllNodes(),i=0;i<e.length;i++)null!=(n=e[i]).getChild()&&0<(o=r(n))&&(n.fixedNodeWeight=o)}if(this.constraints.relativePlacementConstraint){var a,s,h,d,g=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(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var u=this.constraints.alignmentConstraint.vertical;for(i=0;i<u.length;i++)this.dummyToNodeForVerticalAlignment.set("dummy"+i,[]),u[i].forEach(function(e){g.set(e,"dummy"+i),t.dummyToNodeForVerticalAlignment.get("dummy"+i).push(e),t.fixedNodeSet.has(e)&&t.fixedNodesOnHorizontal.add("dummy"+i)})}if(this.constraints.alignmentConstraint.horizontal){var p=this.constraints.alignmentConstraint.horizontal;for(i=0;i<p.length;i++)this.dummyToNodeForHorizontalAlignment.set("dummy"+i,[]),p[i].forEach(function(e){c.set(e,"dummy"+i),t.dummyToNodeForHorizontalAlignment.get("dummy"+i).push(e),t.fixedNodeSet.has(e)&&t.fixedNodesOnVertical.add("dummy"+i)})}}l.RELAX_MOVEMENT_ON_CONSTRAINTS?(this.shuffle=function(t){for(var e,i,n=t.length-1;n>=2*t.length/3;n--)e=Math.floor(Math.random()*(n+1)),i=t[n],t[n]=t[e],t[e]=i;return t},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(e){var i,n;e.left?(n=g.has(e.left)?g.get(e.left):e.left,i=g.has(e.right)?g.get(e.right):e.right,t.nodesInRelativeHorizontal.includes(n)||(t.nodesInRelativeHorizontal.push(n),t.nodeToRelativeConstraintMapHorizontal.set(n,[]),t.dummyToNodeForVerticalAlignment.has(n)?t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(n).getCenterX())),t.nodesInRelativeHorizontal.includes(i)||(t.nodesInRelativeHorizontal.push(i),t.nodeToRelativeConstraintMapHorizontal.set(i,[]),t.dummyToNodeForVerticalAlignment.has(i)?t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(i)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(i).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(n).push({right:i,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(i).push({left:n,gap:e.gap})):(i=c.has(e.top)?c.get(e.top):e.top,n=c.has(e.bottom)?c.get(e.bottom):e.bottom,t.nodesInRelativeVertical.includes(i)||(t.nodesInRelativeVertical.push(i),t.nodeToRelativeConstraintMapVertical.set(i,[]),t.dummyToNodeForHorizontalAlignment.has(i)?t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(i,t.idToNodeMap.get(i).getCenterY())),t.nodesInRelativeVertical.includes(n)||(t.nodesInRelativeVertical.push(n),t.nodeToRelativeConstraintMapVertical.set(n,[]),t.dummyToNodeForHorizontalAlignment.has(n)?t.nodeToTempPositionMapVertical.set(n,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(n)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(n,t.idToNodeMap.get(n).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(i).push({bottom:n,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(n).push({top:i,gap:e.gap}))})):(a=new Map,s=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){var e,i;t.left?(i=g.has(t.left)?g.get(t.left):t.left,e=g.has(t.right)?g.get(t.right):t.right,a.has(i)?a.get(i).push(e):a.set(i,[e]),a.has(e)?a.get(e).push(i):a.set(e,[i])):(e=c.has(t.top)?c.get(t.top):t.top,i=c.has(t.bottom)?c.get(t.bottom):t.bottom,s.has(e)?s.get(e).push(i):s.set(e,[i]),s.has(i)?s.get(i).push(e):s.set(i,[e]))}),d=(h=function(t,e){var i=[],n=[],r=new T,o=new Set,a=0;return t.forEach(function(s,h){if(!o.has(h)){for(i[a]=[],n[a]=!1,r.push(l=h),o.add(l),i[a].push(l);0!=r.length;){var l=r.shift();e.has(l)&&(n[a]=!0),t.get(l).forEach(function(t){o.has(t)||(r.push(t),o.add(t),i[a].push(t))})}a++}}),{components:i,isFixed:n}})(a,t.fixedNodesOnHorizontal),this.componentsOnHorizontal=d.components,this.fixedComponentsOnHorizontal=d.isFixed,d=h(s,t.fixedNodesOnVertical),this.componentsOnVertical=d.components,this.fixedComponentsOnVertical=d.isFixed)}},A.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){(e=t.idToNodeMap.get(e.nodeId)).displacementX=0,e.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,i=0;i<e.length;i++){for(var n=0,r=0;r<e[i].length;r++){if(this.fixedNodeSet.has(e[i][r])){n=0;break}n+=this.idToNodeMap.get(e[i][r]).displacementX}var o=n/e[i].length;for(r=0;r<e[i].length;r++)this.idToNodeMap.get(e[i][r]).displacementX=o}if(this.constraints.alignmentConstraint.horizontal){var a=this.constraints.alignmentConstraint.horizontal;for(i=0;i<a.length;i++){var s=0;for(r=0;r<a[i].length;r++){if(this.fixedNodeSet.has(a[i][r])){s=0;break}s+=this.idToNodeMap.get(a[i][r]).displacementY}var h=s/a[i].length;for(r=0;r<a[i].length;r++)this.idToNodeMap.get(a[i][r]).displacementY=h}}}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(e){var i;t.fixedNodesOnHorizontal.has(e)||(i=0,i=(t.dummyToNodeForVerticalAlignment.has(e)?t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(e)[0]):t.idToNodeMap.get(e)).displacementX,t.nodeToRelativeConstraintMapHorizontal.get(e).forEach(function(n){var r;n.right?(r=t.nodeToTempPositionMapHorizontal.get(n.right)-t.nodeToTempPositionMapHorizontal.get(e)-i)<n.gap&&(i-=n.gap-r):(r=t.nodeToTempPositionMapHorizontal.get(e)-t.nodeToTempPositionMapHorizontal.get(n.left)+i)<n.gap&&(i+=n.gap-r)}),t.nodeToTempPositionMapHorizontal.set(e,t.nodeToTempPositionMapHorizontal.get(e)+i),t.dummyToNodeForVerticalAlignment.has(e)?t.dummyToNodeForVerticalAlignment.get(e).forEach(function(e){t.idToNodeMap.get(e).displacementX=i}):t.idToNodeMap.get(e).displacementX=i)}),this.nodesInRelativeVertical.forEach(function(e){var i;t.fixedNodesOnHorizontal.has(e)||(i=0,i=(t.dummyToNodeForHorizontalAlignment.has(e)?t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(e)[0]):t.idToNodeMap.get(e)).displacementY,t.nodeToRelativeConstraintMapVertical.get(e).forEach(function(n){var r;n.bottom?(r=t.nodeToTempPositionMapVertical.get(n.bottom)-t.nodeToTempPositionMapVertical.get(e)-i)<n.gap&&(i-=n.gap-r):(r=t.nodeToTempPositionMapVertical.get(e)-t.nodeToTempPositionMapVertical.get(n.top)+i)<n.gap&&(i+=n.gap-r)}),t.nodeToTempPositionMapVertical.set(e,t.nodeToTempPositionMapVertical.get(e)+i),t.dummyToNodeForHorizontalAlignment.has(e)?t.dummyToNodeForHorizontalAlignment.get(e).forEach(function(e){t.idToNodeMap.get(e).displacementY=i}):t.idToNodeMap.get(e).displacementY=i)});else{for(i=0;i<this.componentsOnHorizontal.length;i++){var d=this.componentsOnHorizontal[i];if(this.fixedComponentsOnHorizontal[i])for(r=0;r<d.length;r++)this.dummyToNodeForVerticalAlignment.has(d[r])?this.dummyToNodeForVerticalAlignment.get(d[r]).forEach(function(e){t.idToNodeMap.get(e).displacementX=0}):this.idToNodeMap.get(d[r]).displacementX=0;else{var g=0,c=0;for(r=0;r<d.length;r++)this.dummyToNodeForVerticalAlignment.has(d[r])?(g+=(p=this.dummyToNodeForVerticalAlignment.get(d[r])).length*this.idToNodeMap.get(p[0]).displacementX,c+=p.length):(g+=this.idToNodeMap.get(d[r]).displacementX,c++);var u=g/c;for(r=0;r<d.length;r++)this.dummyToNodeForVerticalAlignment.has(d[r])?this.dummyToNodeForVerticalAlignment.get(d[r]).forEach(function(e){t.idToNodeMap.get(e).displacementX=u}):this.idToNodeMap.get(d[r]).displacementX=u}}for(i=0;i<this.componentsOnVertical.length;i++)if(d=this.componentsOnVertical[i],this.fixedComponentsOnVertical[i])for(r=0;r<d.length;r++)this.dummyToNodeForHorizontalAlignment.has(d[r])?this.dummyToNodeForHorizontalAlignment.get(d[r]).forEach(function(e){t.idToNodeMap.get(e).displacementY=0}):this.idToNodeMap.get(d[r]).displacementY=0;else{var p;for(g=0,c=0,r=0;r<d.length;r++)this.dummyToNodeForHorizontalAlignment.has(d[r])?(g+=(p=this.dummyToNodeForHorizontalAlignment.get(d[r])).length*this.idToNodeMap.get(p[0]).displacementY,c+=p.length):(g+=this.idToNodeMap.get(d[r]).displacementY,c++);for(u=g/c,r=0;r<d.length;r++)this.dummyToNodeForHorizontalAlignment.has(d[r])?this.dummyToNodeForHorizontalAlignment.get(d[r]).forEach(function(e){t.idToNodeMap.get(e).displacementY=u}):this.idToNodeMap.get(d[r]).displacementY=u}}},A.prototype.calculateNodesToApplyGravitationTo=function(){for(var t,e=[],i=this.graphManager.getGraphs(),n=i.length,r=0;r<n;r++)(t=i[r]).updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},A.prototype.createBendpoints=function(){for(var t=(t=[]).concat(this.graphManager.getAllEdges()),e=new Set,i=0;i<t.length;i++){var n=t[i];if(!e.has(n)){var r=n.getSource(),o=n.getTarget();if(r==o)n.getBendpoints().push(new p),n.getBendpoints().push(new p),this.createDummyNodesForBendpoints(n),e.add(n);else{var a=[];if(a=(a=a.concat(r.getEdgeListToNode(o))).concat(o.getEdgeListToNode(r)),!e.has(a[0])){if(1<a.length)for(var s=0;s<a.length;s++){var h=a[s];h.getBendpoints().push(new p),this.createDummyNodesForBendpoints(h)}a.forEach(function(t){e.add(t)})}}}if(e.size==t.length)break}},A.prototype.positionNodesRadially=function(t){for(var e=new u(0,0),i=Math.ceil(Math.sqrt(t.length)),n=0,r=0,o=0,a=new p(0,0),s=0;s<t.length;s++){s%i==0&&(r=n,(o=0)!=s&&(r+=l.DEFAULT_COMPONENT_SEPERATION),n=0);var h=t[s],d=m.findCenterOfTree(h);e.x=o,e.y=r,(a=A.radialLayout(h,d,e)).y>n&&(n=Math.floor(a.y)),o=Math.floor(a.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(c.WORLD_CENTER_X-a.x/2,c.WORLD_CENTER_Y-a.y/2))},A.radialLayout=function(t,e,i){var n=Math.max(this.maxDiagonalInTree(t),l.DEFAULT_RADIAL_SEPARATION),r=(e=(A.branchRadialLayout(e,null,0,359,0,n),E.calculateBounds(t)),new N);r.setDeviceOrgX(e.getMinX()),r.setDeviceOrgY(e.getMinY()),r.setWorldOrgX(i.x),r.setWorldOrgY(i.y);for(var o=0;o<t.length;o++)t[o].transform(r);return n=new p(e.getMaxX(),e.getMaxY()),r.inverseTransformPoint(n)},A.branchRadialLayout=function(t,e,i,n,r,o){(a=(n-i+1)/2)<0&&(a+=180);for(var a=(a+i)%360*v.TWO_PI/360,s=r*Math.cos(a),h=(a=r*Math.sin(a),t.setCenter(s,a),[]),l=(h=h.concat(t.getEdges())).length,d=(null!=e&&l--,0),g=h.length,c=t.getEdgesBetween(e);1<c.length;){var u=c[0];0<=(u=(c.splice(0,1),h.indexOf(u)))&&h.splice(u,1),g--,l--}s=null!=e?(h.indexOf(c[0])+1)%g:0;for(var p=Math.abs(n-i)/l,f=s;d!=l;f=++f%g){var m=h[f].getOtherEnd(t);m!=e&&(A.branchRadialLayout(m,t,m=(i+d*p)%360,(m+p)%360,r+o,o),d++)}},A.maxDiagonalInTree=function(t){for(var e=y.MIN_VALUE,i=0;i<t.length;i++){var n=t[i].getDiagonal();e<n&&(e=n)}return e},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){for(var t=this,e={},i=(this.memberGroups={},this.idToDummyNode={},[]),n=this.graphManager.getAllNodes(),r=0;r<n.length;r++){var o=(a=n[r]).getParent();0!==this.getNodeDegreeWithChildren(a)||null!=o.id&&this.getToBeTiled(o)||i.push(a)}for(r=0;r<i.length;r++){var a,h=(a=i[r]).getParent().id;void 0===e[h]&&(e[h]=[]),e[h]=e[h].concat(a)}Object.keys(e).forEach(function(i){if(1<e[i].length){var n="DummyCompound_"+i,r=(t.memberGroups[n]=e[i],e[i][0].getParent()),o=new s(t.graphManager),a=(o.id=n,o.paddingLeft=r.paddingLeft||0,o.paddingRight=r.paddingRight||0,o.paddingBottom=r.paddingBottom||0,o.paddingTop=r.paddingTop||0,t.idToDummyNode[n]=o,t.getGraphManager().add(t.newGraph(),o)),h=r.getChild();h.add(o);for(var l=0;l<e[i].length;l++){var d=e[i][l];h.remove(d),a.add(d)}}})},A.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var i=0;i<this.compoundOrder.length;i++)e[this.compoundOrder[i].id]=this.compoundOrder[i],t[this.compoundOrder[i].id]=[].concat(this.compoundOrder[i].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[i].getChild()),this.compoundOrder[i].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},A.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(i){var n,r=t.idToDummyNode[i];e[i]=t.tileNodes(t.memberGroups[i],r.paddingLeft+r.paddingRight),r.rect.width=e[i].width,r.rect.height=e[i].height,r.setCenter(e[i].centerX,e[i].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS&&(i=r.rect.width,n=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(i+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>i?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):"right"==r.labelPosHorizontal&&r.setWidth(i+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(n+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>n?(r.rect.y-=(r.labelHeight-n)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-n)/2):"bottom"==r.labelPosVertical&&r.setHeight(n+r.labelHeight))})},A.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;0<=t;t--){var e=this.compoundOrder[t],i=e.id;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,e.paddingLeft,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)}},A.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(i){var n=t.idToDummyNode[i],r=n.paddingLeft;t.adjustLocations(e[i],n.rect.x,n.rect.y,r,n.paddingTop,n.labelMarginLeft,n.labelMarginTop)})},A.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];if(null==(t=t.getChild()))return this.toBeTiled[e]=!1;for(var i=t.getNodes(),n=0;n<i.length;n++){var r=i[n];if(0<this.getNodeDegree(r))return this.toBeTiled[e]=!1;if(null==r.getChild())this.toBeTiled[r.id]=!1;else if(!this.getToBeTiled(r))return this.toBeTiled[e]=!1}return this.toBeTiled[e]=!0},A.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,n=0;n<e.length;n++){var r=e[n];r.getSource().id!==r.getTarget().id&&(i+=1)}return i},A.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null!=t.getChild())for(var i=t.getChild().getNodes(),n=0;n<i.length;n++){var r=i[n];e+=this.getNodeDegreeWithChildren(r)}return e},A.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},A.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var i=t[e];null!=i.getChild()&&this.fillCompexOrderByDFS(i.getChild().getNodes()),this.getToBeTiled(i)&&this.compoundOrder.push(i)}},A.prototype.adjustLocations=function(t,e,i,n,r,o,a){i+=r+a;for(var s=e+=n+o,h=0;h<t.rows.length;h++){for(var l=t.rows[h],d=(e=s,0),g=0;g<l.length;g++){var c=l[g];c.rect.x=e,c.rect.y=i,e+=c.rect.width+t.horizontalPadding,c.rect.height>d&&(d=c.rect.height)}i+=d+t.verticalPadding}},A.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(n){var r,o=e[n];i.tiledMemberPack[n]=i.tileNodes(t[n],o.paddingLeft+o.paddingRight),o.rect.width=i.tiledMemberPack[n].width,o.rect.height=i.tiledMemberPack[n].height,o.setCenter(i.tiledMemberPack[n].centerX,i.tiledMemberPack[n].centerY),o.labelMarginLeft=0,o.labelMarginTop=0,l.NODE_DIMENSIONS_INCLUDE_LABELS&&(n=o.rect.width,r=o.rect.height,o.labelWidth&&("left"==o.labelPosHorizontal?(o.rect.x-=o.labelWidth,o.setWidth(n+o.labelWidth),o.labelMarginLeft=o.labelWidth):"center"==o.labelPosHorizontal&&o.labelWidth>n?(o.rect.x-=(o.labelWidth-n)/2,o.setWidth(o.labelWidth),o.labelMarginLeft=(o.labelWidth-n)/2):"right"==o.labelPosHorizontal&&o.setWidth(n+o.labelWidth)),o.labelHeight)&&("top"==o.labelPosVertical?(o.rect.y-=o.labelHeight,o.setHeight(r+o.labelHeight),o.labelMarginTop=o.labelHeight):"center"==o.labelPosVertical&&o.labelHeight>r?(o.rect.y-=(o.labelHeight-r)/2,o.setHeight(o.labelHeight),o.labelMarginTop=(o.labelHeight-r)/2):"bottom"==o.labelPosVertical&&o.setHeight(r+o.labelHeight))})},A.prototype.tileNodes=function(t,e){var i=this.tileNodesByFavoringDim(t,e,!0);t=this.tileNodesByFavoringDim(t,e,!1),e=this.getOrgRatio(i);return e=this.getOrgRatio(t)<e?t:i},A.prototype.getOrgRatio=function(t){return(t=t.width/t.height)<1?1/t:t},A.prototype.calcIdealRowWidth=function(t,e){var i,n=l.TILING_PADDING_VERTICAL,r=l.TILING_PADDING_HORIZONTAL,o=t.length,a=0,s=0,h=0,d=(t=(t.forEach(function(t){a+=t.getWidth(),s+=t.getHeight(),t.getWidth()>h&&(h=t.getWidth())}),a/o),s/o);d=Math.pow(n-r,2)+4*(t+r)*(d+n)*o,o=(r-n+Math.sqrt(d))/(2*(t+r));return(n=(e?(i=Math.ceil(o))==o&&i++:i=Math.floor(o),i*(t+r)-r))<h&&(n=h),n+2*r},A.prototype.tileNodesByFavoringDim=function(t,e,i){for(var n=l.TILING_PADDING_VERTICAL,r=l.TILING_PADDING_HORIZONTAL,o=l.TILING_COMPARE_BY,a={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:n,horizontalPadding:r,centerX:0,centerY:0},s=(o&&(a.idealRowWidth=this.calcIdealRowWidth(t,i)),function(t){return t.rect.width*t.rect.height}),h=function(t,e){return s(e)-s(t)},d=(t.sort(function(t,e){var i=h;return a.idealRowWidth?(i=o)(t.id,e.id):i(t,e)}),0),g=0,c=0;c<t.length;c++)d+=(p=t[c]).getCenterX(),g+=p.getCenterY();for(a.centerX=d/t.length,a.centerY=g/t.length,c=0;c<t.length;c++){var u,p=t[c];0==a.rows.length?this.insertNodeToRow(a,p,0,e):this.canAddHorizontal(a,p.rect.width,p.rect.height)?(u=a.rows.length-1,a.idealRowWidth||(u=this.getShortestRowIndex(a)),this.insertNodeToRow(a,p,u,e)):this.insertNodeToRow(a,p,a.rows.length,e),this.shiftToLastRow(a)}return a},A.prototype.insertNodeToRow=function(t,e,i,n){i==t.rows.length&&(t.rows.push([]),t.rowWidth.push(n),t.rowHeight.push(0));n=t.rowWidth[i]+e.rect.width,0<t.rows[i].length&&(n+=t.horizontalPadding),t.rowWidth[i]=n,t.width<n&&(t.width=n),n=e.rect.height;var r=(0<i&&(n+=t.verticalPadding),0);n>t.rowHeight[i]&&(r=t.rowHeight[i],t.rowHeight[i]=n,r=t.rowHeight[i]-r),t.height+=r,t.rows[i].push(e)},A.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]<i&&(e=n,i=t.rowWidth[n]);return e},A.prototype.getLongestRowIndex=function(t){for(var e=-1,i=Number.MIN_VALUE,n=0;n<t.rows.length;n++)t.rowWidth[n]>i&&(e=n,i=t.rowWidth[n]);return e},A.prototype.canAddHorizontal=function(t,e,i){var n,r,o;return t.idealRowWidth?(r=t.rows.length-1,t.rowWidth[r]+e+t.horizontalPadding<=t.idealRowWidth):(r=this.getShortestRowIndex(t))<0||(o=t.rowWidth[r])+t.horizontalPadding+e<=t.width||(n=0,t.rowHeight[r]<i&&0<r&&(n=i+t.verticalPadding-t.rowHeight[r]),r=e+t.horizontalPadding<=t.width-o?(t.height+n)/(o+e+t.horizontalPadding):(t.height+n)/t.width,n=i+t.verticalPadding,(r=r<1?1/r:r)<(o=(o=t.width<e?(t.height+n)/e:(t.height+n)/t.width)<1?1/o:o))},A.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),i=t.rowWidth.length-1,n=t.rows[e],r=n[n.length-1],o=r.width+t.horizontalPadding;if(t.width-t.rowWidth[i]>o&&e!=i){n.splice(-1,1),t.rows[i].push(r),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var a=Number.MIN_VALUE,s=0;s<n.length;s++)n[s].height>a&&(a=n[s].height);0<e&&(a+=t.verticalPadding),o=t.rowHeight[e]+t.rowHeight[i],t.rowHeight[e]=a,t.rowHeight[i]<r.height+t.verticalPadding&&(t.rowHeight[i]=r.height+t.verticalPadding),r=t.rowHeight[e]+t.rowHeight[i],t.height+=r-o,this.shiftToLastRow(t)}},A.prototype.tilingPreLayout=function(){l.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},A.prototype.tilingPostLayout=function(){l.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},A.prototype.reduceTrees=function(){for(var t=[],e=!0;e;){for(var i,n,r=this.graphManager.getAllNodes(),o=[],a=(e=!1,0);a<r.length;a++)1!=(n=r[a]).getEdges().length||n.getEdges()[0].isInterGraph||null!=n.getChild()||(l.PURE_INCREMENTAL?(i=n.getEdges()[0].getOtherEnd(n),i=new f(n.getCenterX()-i.getCenterX(),n.getCenterY()-i.getCenterY()),o.push([n,n.getEdges()[0],n.getOwner(),i])):o.push([n,n.getEdges()[0],n.getOwner()]),e=!0);if(1==e){for(var s=[],h=0;h<o.length;h++)1==o[h][0].getEdges().length&&(s.push(o[h]),o[h][0].getOwner().remove(o[h][0]));t.push(s),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=t},A.prototype.growTree=function(t){for(var e,i=t[t.length-1],n=0;n<i.length;n++)e=i[n],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},A.prototype.findPlaceforPrunedNode=function(t){var e=t[0],i=e==t[1].source?t[1].target:t[1].source;if(l.PURE_INCREMENTAL)e.setCenter(i.getCenterX()+t[3].getWidth(),i.getCenterY()+t[3].getHeight());else{var n=i.startX,r=i.finishX,o=i.startY,a=i.finishY,s=[0,0,0,0];if(0<o)for(var h=n;h<=r;h++)s[0]+=this.grid[h][o-1].length+this.grid[h][o].length-1;if(r<this.grid.length-1)for(h=o;h<=a;h++)s[1]+=this.grid[r+1][h].length+this.grid[r][h].length-1;if(a<this.grid[0].length-1)for(h=n;h<=r;h++)s[2]+=this.grid[h][a+1].length+this.grid[h][a].length-1;if(0<n)for(h=o;h<=a;h++)s[3]+=this.grid[n-1][h].length+this.grid[n][h].length-1;for(var d,c,u,p,f=y.MAX_VALUE,m=0;m<s.length;m++)s[m]<f?(f=s[m],d=1,c=m):s[m]==f&&d++;3==d&&0==f?0==s[0]&&0==s[1]&&0==s[2]?u=1:0==s[0]&&0==s[1]&&0==s[3]?u=0:0==s[0]&&0==s[2]&&0==s[3]?u=3:0==s[1]&&0==s[2]&&0==s[3]&&(u=2):u=2==d&&0==f?(p=Math.floor(2*Math.random()),0==s[0]&&0==s[1]?0==p?0:1:0==s[0]&&0==s[2]?0==p?0:2:0==s[0]&&0==s[3]?0==p?0:3:0==s[1]&&0==s[2]?0==p?1:2:0==s[1]&&0==s[3]?0==p?1:3:0==p?2:3):4==d&&0==f?p=Math.floor(4*Math.random()):c,0==u?e.setCenter(i.getCenterX(),i.getCenterY()-i.getHeight()/2-g.DEFAULT_EDGE_LENGTH-e.getHeight()/2):1==u?e.setCenter(i.getCenterX()+i.getWidth()/2+g.DEFAULT_EDGE_LENGTH+e.getWidth()/2,i.getCenterY()):2==u?e.setCenter(i.getCenterX(),i.getCenterY()+i.getHeight()/2+g.DEFAULT_EDGE_LENGTH+e.getHeight()/2):e.setCenter(i.getCenterX()-i.getWidth()/2-g.DEFAULT_EDGE_LENGTH-e.getWidth()/2,i.getCenterY())}},t.exports=A},991:(t,e,i)=>{var n,r=i(551).FDLayoutNode,o=i(551).IMath;function a(t,e,i,n){r.call(this,t,e,i,n)}for(n in a.prototype=Object.create(r.prototype),r)a[n]=r[n];a.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*o.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*o.sign(this.displacementY)),this.child&&0<this.child.getNodes().length&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(t,e){for(var i,n=this.getChild().getNodes(),r=0;r<n.length;r++)null==(i=n[r]).getChild()?(i.displacementX+=t,i.displacementY+=e):i.propogateDisplacementToChildren(t,e)},a.prototype.move=function(){var t=this.graphManager.getLayout();null!=this.child&&0!=this.child.getNodes().length||(this.moveBy(this.displacementX,this.displacementY),t.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},a.prototype.setPred1=function(t){this.pred1=t},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(t){this.next=t},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(t){this.processed=t},a.prototype.isProcessed=function(){return processed},t.exports=a},902:(t,e,i)=>{function n(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}var r=i(806),o=i(551).LinkedList,a=i(551).Matrix,s=i(551).SVD;function h(){}h.handleConstraints=function(t){for(var e={},i=(e.fixedNodeConstraint=t.constraints.fixedNodeConstraint,e.alignmentConstraint=t.constraints.alignmentConstraint,e.relativePlacementConstraint=t.constraints.relativePlacementConstraint,new Map),h=new Map,l=[],d=[],g=t.getAllNodes(),c=0,u=0;u<g.length;u++){var p=g[u];null==p.getChild()&&(h.set(p.id,c++),l.push(p.getCenterX()),d.push(p.getCenterY()),i.set(p.id,p))}function f(t,e,i,r,a){for(var s,g,c=new Map,u=(t.forEach(function(t,e){c.set(e,0)}),t.forEach(function(t,e){t.forEach(function(t){c.set(t.id,c.get(t.id)+1)})}),new Map),p=new Map,f=new o,m=(c.forEach(function(t,n){0==t?(f.push(n),i||("horizontal"==e?u.set(n,h.has(n)?l[h.get(n)]:r.get(n)):u.set(n,h.has(n)?d[h.get(n)]:r.get(n)))):u.set(n,Number.NEGATIVE_INFINITY),i&&p.set(n,new Set([n]))}),i&&a.forEach(function(t){var n,o,a=[];t.forEach(function(t){i.has(t)&&a.push(t)}),0<a.length?(n=0,a.forEach(function(t){"horizontal"==e?u.set(t,h.has(t)?l[h.get(t)]:r.get(t)):u.set(t,h.has(t)?d[h.get(t)]:r.get(t)),n+=u.get(t)}),n/=a.length,t.forEach(function(t){i.has(t)||u.set(t,n)})):(o=0,t.forEach(function(t){o+="horizontal"==e?h.has(t)?l[h.get(t)]:r.get(t):h.has(t)?d[h.get(t)]:r.get(t)}),o/=t.length,t.forEach(function(t){u.set(t,o)}))}),function(){var n=f.shift();t.get(n).forEach(function(t){var o,a;u.get(t.id)<u.get(n)+t.gap&&(i&&i.has(t.id)?(void 0,a="horizontal"==e?h.has(t.id)?l[h.get(t.id)]:r.get(t.id):h.has(t.id)?d[h.get(t.id)]:r.get(t.id),u.set(t.id,a),a<u.get(n)+t.gap&&(o=u.get(n)+t.gap-a,p.get(n).forEach(function(t){u.set(t,u.get(t)-o)}))):u.set(t.id,u.get(n)+t.gap)),c.set(t.id,c.get(t.id)-1),0==c.get(t.id)&&f.push(t.id),i&&p.set(t.id,((t,e)=>{var i=new Set(t),n=!0,r=(t=!1,void 0);try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;i.add(s)}}catch(e){t=!0,r=e}finally{try{!n&&a.return&&a.return()}finally{if(t)throw r}}return i})(p.get(n),p.get(t.id)))})});0!=f.length;)m();return i&&(s=new Set,t.forEach(function(t,e){0==t.length&&s.add(e)}),g=[],p.forEach(function(t,e){if(s.has(e)){var r,o,a=!1,h=!0,l=(e=!1,void 0);try{for(var d,c=t[Symbol.iterator]();!(h=(d=c.next()).done);h=!0){var u=d.value;i.has(u)&&(a=!0)}}catch(a){e=!0,l=a}finally{try{!h&&c.return&&c.return()}finally{if(e)throw l}}a||(r=!1,o=void 0,g.forEach(function(e,i){e.has([].concat(n(t))[0])&&(r=!0,o=i)}),r?t.forEach(function(t){g[o].add(t)}):g.push(new Set(t)))}}),g.forEach(function(t,i){var n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,s=Number.NEGATIVE_INFINITY,g=!0,c=!1,p=void 0;try{for(var f,m=t[Symbol.iterator]();!(g=(f=m.next()).done);g=!0){var y=f.value,v="horizontal"==e?h.has(y)?l[h.get(y)]:r.get(y):h.has(y)?d[h.get(y)]:r.get(y),E=u.get(y);v<n&&(n=v),a<v&&(a=v),E<o&&(o=E),s<E&&(s=E)}}catch(t){c=!0,p=t}finally{try{!g&&m.return&&m.return()}finally{if(c)throw p}}var N=(n+a)/2-(o+s)/2,T=!0;c=!1,p=void 0;try{for(var A,w=t[Symbol.iterator]();!(T=(A=w.next()).done);T=!0){var I=A.value;u.set(I,u.get(I)+N)}}catch(t){c=!0,p=t}finally{try{!T&&w.return&&w.return()}finally{if(c)throw p}}})),u}function m(t){var e=0,i=0,n=0,r=0;if(t.forEach(function(t){t.left?0<=l[h.get(t.left)]-l[h.get(t.right)]?e++:i++:0<=d[h.get(t.top)]-d[h.get(t.bottom)]?n++:r++}),i<e&&r<n)for(var o=0;o<h.size;o++)l[o]=-1*l[o],d[o]=-1*d[o];else if(i<e)for(var a=0;a<h.size;a++)l[a]=-1*l[a];else if(r<n)for(var s=0;s<h.size;s++)d[s]=-1*d[s]}function y(t){var e=[],i=new o,n=new Set,r=0;return t.forEach(function(o,a){if(!n.has(a)){for(e[r]=[],i.push(s=a),n.add(s),e[r].push(s);0!=i.length;){var s=i.shift();t.get(s).forEach(function(t){n.has(t.id)||(i.push(t.id),n.add(t.id),e[r].push(t.id))})}r++}}),e}function v(t){var e=new Map;return t.forEach(function(t,i){e.set(i,[])}),t.forEach(function(t,i){t.forEach(function(t){e.get(i).push(t),e.get(t.id).push({id:i,gap:t.gap,direction:t.direction})})}),e}function E(t){var e=new Map;return t.forEach(function(t,i){e.set(i,[])}),t.forEach(function(t,i){t.forEach(function(t){e.get(t.id).push({id:i,gap:t.gap,direction:t.direction})})}),e}e.relativePlacementConstraint&&e.relativePlacementConstraint.forEach(function(t){t.gap||0==t.gap||(t.left?t.gap=r.DEFAULT_EDGE_LENGTH+i.get(t.left).getWidth()/2+i.get(t.right).getWidth()/2:t.gap=r.DEFAULT_EDGE_LENGTH+i.get(t.top).getHeight()/2+i.get(t.bottom).getHeight()/2)});var N,T=function(t){var e=0,i=0;return t.forEach(function(t){e+=l[h.get(t)],i+=d[h.get(t)]}),{x:e/t.size,y:i/t.size}},A=[],w=[],I=(t=!1,!1),C=new Set,L=new Map,_=new Map,M=[];if(e.fixedNodeConstraint&&e.fixedNodeConstraint.forEach(function(t){C.add(t.nodeId)}),e.relativePlacementConstraint&&(e.relativePlacementConstraint.forEach(function(t){t.left?(L.has(t.left)?L.get(t.left).push({id:t.right,gap:t.gap,direction:"horizontal"}):L.set(t.left,[{id:t.right,gap:t.gap,direction:"horizontal"}]),L.has(t.right)||L.set(t.right,[])):(L.has(t.top)?L.get(t.top).push({id:t.bottom,gap:t.gap,direction:"vertical"}):L.set(t.top,[{id:t.bottom,gap:t.gap,direction:"vertical"}]),L.has(t.bottom)||L.set(t.bottom,[]))}),M=y(_=v(L))),r.TRANSFORM_ON_CONSTRAINT_HANDLING){if(e.fixedNodeConstraint&&1<e.fixedNodeConstraint.length)e.fixedNodeConstraint.forEach(function(t,e){A[e]=[t.position.x,t.position.y],w[e]=[l[h.get(t.nodeId)],d[h.get(t.nodeId)]]}),t=!0;else if(e.alignmentConstraint){var x=0;if(e.alignmentConstraint.vertical){for(var O=e.alignmentConstraint.vertical,D=0;D<O.length;D++)(t=>{var e=new Set,i=(O[t].forEach(function(t){e.add(t)}),new Set([].concat(n(e)).filter(function(t){return C.has(t)}))),r=0<i.size?l[h.get(i.values().next().value)]:T(e).x;O[t].forEach(function(t){A[x]=[r,d[h.get(t)]],w[x]=[l[h.get(t)],d[h.get(t)]],x++})})(D);t=!0}if(e.alignmentConstraint.horizontal){for(var b=e.alignmentConstraint.horizontal,R=0;R<b.length;R++)(t=>{var e=new Set,i=(b[t].forEach(function(t){e.add(t)}),new Set([].concat(n(e)).filter(function(t){return C.has(t)}))),r=0<i.size?l[h.get(i.values().next().value)]:T(e).y;b[t].forEach(function(t){A[x]=[l[h.get(t)],r],w[x]=[l[h.get(t)],d[h.get(t)]],x++})})(R);t=!0}e.relativePlacementConstraint&&(I=!0)}else if(e.relativePlacementConstraint){for(var F,G,S,P,U,Y=0,k=0,H=0;H<M.length;H++)M[H].length>Y&&(Y=M[H].length,k=H);Y<_.size/2?(m(e.relativePlacementConstraint),I=t=!1):(F=new Map,G=new Map,S=[],M[k].forEach(function(t){L.get(t).forEach(function(e){"horizontal"==e.direction?(F.has(t)?F.get(t).push(e):F.set(t,[e]),F.has(e.id)||F.set(e.id,[]),S.push({left:t,right:e.id})):(G.has(t)?G.get(t).push(e):G.set(t,[e]),G.has(e.id)||G.set(e.id,[]),S.push({top:t,bottom:e.id}))})}),m(S),I=!1,P=f(F,"horizontal"),U=f(G,"vertical"),M[k].forEach(function(t,e){w[e]=[l[h.get(t)],d[h.get(t)]],A[e]=[],P.has(t)?A[e][0]=P.get(t):A[e][0]=l[h.get(t)],U.has(t)?A[e][1]=U.get(t):A[e][1]=d[h.get(t)]}),t=!0)}if(t){for(var X=a.transpose(A),z=a.transpose(w),B=0;B<X.length;B++)X[B]=a.multGamma(X[B]),z[B]=a.multGamma(z[B]);_=a.multMat(X,a.transpose(z)),t=s.svd(_);for(var V=a.multMat(t.V,a.transpose(t.U)),W=0;W<h.size;W++){var j=[l[W],d[W]],q=[V[0][0],V[1][0]],$=[V[0][1],V[1][1]];l[W]=a.dotProduct(j,q),d[W]=a.dotProduct(j,$)}I&&m(e.relativePlacementConstraint)}}if(r.ENFORCE_CONSTRAINTS){if(e.fixedNodeConstraint&&0<e.fixedNodeConstraint.length&&(N={x:0,y:0},e.fixedNodeConstraint.forEach(function(t,e){var i=l[h.get(t.nodeId)],n=d[h.get(t.nodeId)];t={x:(t=t.position).x-i,y:t.y-n};N.x+=t.x,N.y+=t.y}),N.x/=e.fixedNodeConstraint.length,N.y/=e.fixedNodeConstraint.length,l.forEach(function(t,e){l[e]+=N.x}),d.forEach(function(t,e){d[e]+=N.y}),e.fixedNodeConstraint.forEach(function(t){l[h.get(t.nodeId)]=t.position.x,d[h.get(t.nodeId)]=t.position.y})),e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var Z=e.alignmentConstraint.vertical,Q=0;Q<Z.length;Q++)(t=>{var e=new Set,i=(t=(Z[t].forEach(function(t){e.add(t)}),new Set([].concat(n(e)).filter(function(t){return C.has(t)}))),0<t.size?l[h.get(t.values().next().value)]:T(e).x);e.forEach(function(t){C.has(t)||(l[h.get(t)]=i)})})(Q);if(e.alignmentConstraint.horizontal)for(var J=e.alignmentConstraint.horizontal,K=0;K<J.length;K++)(t=>{var e=new Set,i=(t=(J[t].forEach(function(t){e.add(t)}),new Set([].concat(n(e)).filter(function(t){return C.has(t)}))),0<t.size?d[h.get(t.values().next().value)]:T(e).y);e.forEach(function(t){C.has(t)||(d[h.get(t)]=i)})})(K)}if(e.relativePlacementConstraint){var tt=new Map,et=new Map,it=new Map,nt=new Map,rt=new Map,ot=new Map,at=new Set,st=new Set;if(C.forEach(function(t){at.add(t),st.add(t)}),e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var ht=e.alignmentConstraint.vertical,lt=0;lt<ht.length;lt++)(t=>{it.set("dummy"+t,[]),ht[t].forEach(function(e){tt.set(e,"dummy"+t),it.get("dummy"+t).push(e),C.has(e)&&at.add("dummy"+t)}),rt.set("dummy"+t,l[h.get(ht[t][0])])})(lt);if(e.alignmentConstraint.horizontal)for(var dt=e.alignmentConstraint.horizontal,gt=0;gt<dt.length;gt++)(t=>{nt.set("dummy"+t,[]),dt[t].forEach(function(e){et.set(e,"dummy"+t),nt.get("dummy"+t).push(e),C.has(e)&&st.add("dummy"+t)}),ot.set("dummy"+t,d[h.get(dt[t][0])])})(gt)}var ct=new Map,ut=new Map,pt=!0;_=!1,t=void 0;try{for(var ft,mt=L.keys()[Symbol.iterator]();!(pt=(ft=mt.next()).done);pt=!0)(t=>{L.get(t).forEach(function(e){var i=void 0,n=void 0;"horizontal"==e.direction?(i=tt.get(t)?tt.get(t):t,n=tt.get(e.id)?{id:tt.get(e.id),gap:e.gap,direction:e.direction}:e,ct.has(i)?ct.get(i).push(n):ct.set(i,[n]),ct.has(n.id)||ct.set(n.id,[])):(i=et.get(t)?et.get(t):t,n=et.get(e.id)?{id:et.get(e.id),gap:e.gap,direction:e.direction}:e,ut.has(i)?ut.get(i).push(n):ut.set(i,[n]),ut.has(n.id)||ut.set(n.id,[]))})})(ft.value)}catch(e){_=!0,t=e}finally{try{!pt&&mt.return&&mt.return()}finally{if(_)throw t}}_=v(ct),t=v(ut),_=y(_),t=y(t);var yt=E(ct),vt=E(ut),Et=[],Nt=[],Tt=(_.forEach(function(t,e){Et[e]=[],t.forEach(function(t){0==yt.get(t).length&&Et[e].push(t)})}),t.forEach(function(t,e){Nt[e]=[],t.forEach(function(t){0==vt.get(t).length&&Nt[e].push(t)})}),f(ct,"horizontal",at,rt,Et)),At=f(ut,"vertical",st,ot,Nt),wt=!0;_=!1,t=void 0;try{for(var It,Ct=Tt.keys()[Symbol.iterator]();!(wt=(It=Ct.next()).done);wt=!0)(t=>{it.get(t)?it.get(t).forEach(function(e){l[h.get(e)]=Tt.get(t)}):l[h.get(t)]=Tt.get(t)})(It.value)}catch(e){_=!0,t=e}finally{try{!wt&&Ct.return&&Ct.return()}finally{if(_)throw t}}var Lt=!0;_=!1,t=void 0;try{for(var _t,Mt=At.keys()[Symbol.iterator]();!(Lt=(_t=Mt.next()).done);Lt=!0)(t=>{nt.get(t)?nt.get(t).forEach(function(e){d[h.get(e)]=At.get(t)}):d[h.get(t)]=At.get(t)})(_t.value)}catch(e){_=!0,t=e}finally{try{!Lt&&Mt.return&&Mt.return()}finally{if(_)throw t}}}}for(var xt=0;xt<g.length;xt++){var Ot=g[xt];null==Ot.getChild()&&Ot.setCenter(l[h.get(Ot.id)],d[h.get(Ot.id)])}},t.exports=h},551:e=>{e.exports=t}},i={},function t(n){var r=i[n];return void 0===r&&(r=i[n]={exports:{}},e[n](r,r.exports,t)),r.exports}(45);var e,i},b.exports=t(function(){var t;return x||(x=1,t=function(){return e=[function(t,e,i){function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,i){var n,r=i(2),o=i(8),a=i(9);function s(t,e,i){r.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(n in s.prototype=Object.create(r.prototype),r)s[n]=r[n];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==n)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=o.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){t.exports=function(t){this.vGraphObject=t}},function(t,e,i){var n,r=i(2),o=i(10),a=i(13),s=i(0),h=i(16),l=i(5);function d(t,e,i,n){r.call(this,n=null==i&&null==n?e:n),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=o.MIN_VALUE,this.inclusionTreeDepth=o.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new a(e.x,e.y,i.width,i.height):new a}for(n in d.prototype=Object.create(r.prototype),r)d[n]=r[n];d.prototype.getEdges=function(){return this.edges},d.prototype.getChild=function(){return this.child},d.prototype.getOwner=function(){return this.owner},d.prototype.getWidth=function(){return this.rect.width},d.prototype.setWidth=function(t){this.rect.width=t},d.prototype.getHeight=function(){return this.rect.height},d.prototype.setHeight=function(t){this.rect.height=t},d.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},d.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},d.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},d.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},d.prototype.getRect=function(){return this.rect},d.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},d.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},d.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},d.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},d.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},d.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},d.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach(function(n){if(n.target==t){if(n.source!=i)throw"Incorrect edge source!";e.push(n)}}),e},d.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach(function(n){if(n.source!=i&&n.target!=i)throw"Incorrect edge source and/or target";n.target!=t&&n.source!=t||e.push(n)}),e},d.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}}),t},d.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;i<e.length;i++)e[i].withChildren().forEach(function(e){t.add(e)});return t},d.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),i=0;i<e.length;i++)t+=e[i].getNoOfChildren();return 0==t?1:t},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){return null==this.child?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)},d.prototype.scatter=function(){var t=-s.INITIAL_WORLD_BOUNDARY,e=s.INITIAL_WORLD_BOUNDARY,i=(e=s.WORLD_CENTER_X+h.nextDouble()*(e-t)+t,t=-s.INITIAL_WORLD_BOUNDARY,s.INITIAL_WORLD_BOUNDARY);i=s.WORLD_CENTER_Y+h.nextDouble()*(i-t)+t,this.rect.x=e,this.rect.y=i},d.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";var t,e;0!=this.getChild().getNodes().length&&((e=this.getChild()).updateBounds(!0),this.rect.x=e.getLeft(),this.rect.y=e.getTop(),this.setWidth(e.getRight()-e.getLeft()),this.setHeight(e.getBottom()-e.getTop()),s.NODE_DIMENSIONS_INCLUDE_LABELS)&&(t=e.getRight()-e.getLeft(),e=e.getBottom()-e.getTop(),this.labelWidth&&("left"==this.labelPosHorizontal?(this.rect.x-=this.labelWidth,this.setWidth(t+this.labelWidth)):"center"==this.labelPosHorizontal&&this.labelWidth>t?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(t+this.labelWidth)),this.labelHeight)&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(e+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>e?(this.rect.y-=(this.labelHeight-e)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(e+this.labelHeight))},d.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==o.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},d.prototype.transform=function(t){var e=((e=this.rect.x)>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY),(i=this.rect.y)>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY),new l(e,i)),i=t.inverseTransformPoint(e);this.setLocation(i.x,i.y)},d.prototype.getLeft=function(){return this.rect.x},d.prototype.getRight=function(){return this.rect.x+this.rect.width},d.prototype.getTop=function(){return this.rect.y},d.prototype.getBottom=function(){return this.rect.y+this.rect.height},d.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=d},function(t,e,i){var n,r=i(0);function o(){}for(n in r)o[n]=r[n];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=3*(o.MAX_NODE_DISPLACEMENT_INCREMENTAL=100),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,t.exports=o},function(t,e,i){function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,i){var n,r=i(2),o=i(10),a=i(0),s=i(7),h=i(3),l=i(1),d=i(13),g=i(12),c=i(11);function u(t,e,i){r.call(this,i),this.estimatedSize=o.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(n in u.prototype=Object.create(r.prototype),r)u[n]=r[n];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(t,e,i){if(null==e&&null==i){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1<this.getNodes().indexOf(n))throw"Node already in graph!";return(n.owner=this).getNodes().push(n),n}if(n=t,!(-1<this.getNodes().indexOf(e)&&-1<this.getNodes().indexOf(i)))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(n.source=e,n.target=i,n.isInterGraph=!1,this.getEdges().push(n),e.edges.push(n),i!=e&&i.edges.push(n),n)},u.prototype.remove=function(t){var e=t;if(t instanceof h){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var i,n=e.edges.slice(),r=n.length,o=0;o<r;o++)((i=n[o]).isInterGraph?this.graphManager:i.source.owner).remove(i);if(-1==(a=this.nodes.indexOf(e)))throw"Node not in owner node list!";this.nodes.splice(a,1)}else if(t instanceof l){if(null==(i=t))throw"Edge is null!";if(null==i.source||null==i.target)throw"Source and/or target is null!";if(null==i.source.owner||null==i.target.owner||i.source.owner!=this||i.target.owner!=this)throw"Source and/or target owner is invalid!";var a;if(e=i.source.edges.indexOf(i),t=i.target.edges.indexOf(i),!(-1<e&&-1<t))throw"Source and/or target doesn't know this edge!";if(i.source.edges.splice(e,1),i.target!=i.source&&i.target.edges.splice(t,1),-1==(a=i.source.owner.getEdges().indexOf(i)))throw"Not in owner's edge list!";i.source.owner.getEdges().splice(a,1)}},u.prototype.updateLeftTop=function(){for(var t,e=o.MAX_VALUE,i=o.MAX_VALUE,n=this.getNodes(),r=n.length,a=0;a<r;a++){var s,h=n[a];(s=h.getTop())<e&&(e=s),(s=h.getLeft())<i&&(i=s)}return e==o.MAX_VALUE?null:(t=null!=n[0].getParent().paddingLeft?n[0].getParent().paddingLeft:this.margin,this.left=i-t,this.top=e-t,new g(this.left,this.top))},u.prototype.updateBounds=function(t){for(var e,i,n=o.MAX_VALUE,r=-o.MAX_VALUE,a=o.MAX_VALUE,s=-o.MAX_VALUE,h=this.nodes,l=h.length,g=0;g<l;g++){var c=h[g];t&&null!=c.child&&c.updateBounds(),(e=c.getLeft())<n&&(n=e),r<(e=c.getRight())&&(r=e),(e=c.getTop())<a&&(a=e),s<(e=c.getBottom())&&(s=e)}var u=new d(n,a,r-n,s-a);n==o.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),i=null!=h[0].getParent().paddingLeft?h[0].getParent().paddingLeft:this.margin,this.left=u.x-i,this.right=u.x+u.width+i,this.top=u.y-i,this.bottom=u.y+u.height+i},u.calculateBounds=function(t){for(var e=o.MAX_VALUE,i=-o.MAX_VALUE,n=o.MAX_VALUE,r=-o.MAX_VALUE,a=t.length,s=0;s<a;s++){var h,l=t[s];(h=l.getLeft())<e&&(e=h),i<(h=l.getRight())&&(i=h),(h=l.getTop())<n&&(n=h),r<(h=l.getBottom())&&(r=h)}return new d(e,n,i-e,r-n)},u.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==o.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,n=0;n<i;n++)t+=e[n].calcEstimatedSize();return this.estimatedSize=0==t?a.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},u.prototype.updateConnected=function(){var t=this;if(0==this.nodes.length)this.isConnected=!0;else{var e,i=new c,n=new Set,r=this.nodes[0];for(r.withChildren().forEach(function(t){i.push(t),n.add(t)});0!==i.length;)for(var o,a,s=(o=(r=i.shift()).getEdges()).length,h=0;h<s;h++)null==(a=o[h].getOtherEndInGraph(r,this))||n.has(a)||a.withChildren().forEach(function(t){i.push(t),n.add(t)});this.isConnected=!1,n.size>=this.nodes.length&&(e=0,n.forEach(function(i){i.owner==t&&e++}),e==this.nodes.length)&&(this.isConnected=!0)}},t.exports=u},function(t,e,i){var n,r=i(1);function o(t){n=i(6),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null);return t=this.add(t,e),this.setRootGraph(t),this.rootGraph},o.prototype.add=function(t,e,i,n,r){if(null==i&&null==n&&null==r){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(-1<this.graphs.indexOf(t))throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return(t.parent=e).child=t}if(r=i,i=t,t=(n=e).getOwner(),e=r.getOwner(),null==t||t.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==e||e.getGraphManager()!=this)throw"Target not in this graph mgr!";if(t==e)return i.isInterGraph=!1,t.add(i,n,r);if(i.isInterGraph=!0,i.source=n,i.target=r,-1<this.edges.indexOf(i))throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof n){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],a=(o=o.concat(e.getEdges())).length,s=0;s<a;s++)i=o[s],e.remove(i);var h,l=[];for(a=(l=l.concat(e.getNodes())).length,s=0;s<a;s++)h=l[s],e.remove(h);e==this.rootGraph&&this.setRootGraph(null);var d=this.graphs.indexOf(e);this.graphs.splice(d,1),e.parent=null}else if(t instanceof r){if(null==(i=t))throw"Edge is null!";if(!i.isInterGraph)throw"Not an inter-graph edge!";if(null==i.source||null==i.target)throw"Source and/or target is null!";if(-1==i.source.edges.indexOf(i)||-1==i.target.edges.indexOf(i))throw"Source and/or target doesn't know this edge!";if(d=i.source.edges.indexOf(i),i.source.edges.splice(d,1),d=i.target.edges.indexOf(i),i.target.edges.splice(d,1),null==i.source.owner||null==i.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==i.source.owner.getGraphManager().edges.indexOf(i))throw"Not in owner graph manager's edge list!";d=i.source.owner.getGraphManager().edges.indexOf(i),i.source.owner.getGraphManager().edges.splice(d,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),i=e.length,n=0;n<i;n++)t=t.concat(e[n].getNodes());this.allNodes=t}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(null==this.allEdges){var t=[],e=this.getGraphs();e.length;for(var i=0;i<e.length;i++)t=t.concat(e[i].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";null==(this.rootGraph=t).parent&&(t.parent=this.layout.newNode("Root node"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var i,n=t.getOwner();null!=(i=n.getParent());){if(i==e)return!0;if(null==(n=i.getOwner()))break}for(n=e.getOwner();null!=(i=n.getParent());){if(i==t)return!0;if(null==(n=i.getOwner()))break}return!1},o.prototype.calcLowestCommonAncestors=function(){for(var t,e,i,n,r,o=this.getAllEdges(),a=o.length,s=0;s<a;s++)if(e=(t=o[s]).source,i=t.target,t.lca=null,(t.sourceInLca=e)==(t.targetInLca=i))t.lca=e.getOwner();else{for(n=e.getOwner();null==t.lca;){for(r=(t.targetInLca=i).getOwner();null==t.lca;){if(r==n){t.lca=r;break}if(r==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=r.getParent(),r=t.targetInLca.getOwner()}if(n==this.rootGraph)break;null==t.lca&&(t.sourceInLca=n.getParent(),n=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var i=t.getOwner();null!=i;){for(var n=e.getOwner();null!=n;){if(n==i)return n;n=n.getParent().getOwner()}i=i.getParent().getOwner()}return i},o.prototype.calcInclusionTreeDepths=function(t,e){null==t&&null==e&&(t=this.rootGraph,e=1);for(var i,n=t.getNodes(),r=n.length,o=0;o<r;o++)(i=n[o]).inclusionTreeDepth=e,null!=i.child&&this.calcInclusionTreeDepths(i.child,e+1)},o.prototype.includesInvalidEdge=function(){for(var t,e=[],i=this.edges.length,n=0;n<i;n++)t=this.edges[n],this.isOneAncestorOfOther(t.source,t.target)&&e.push(t);for(n=0;n<e.length;n++)this.remove(e[n]);return!1},t.exports=o},function(t,e,i){var n=i(12);function r(){}r.calcSeparationAmount=function(t,e,i,n){if(!t.intersects(e))throw"assert failed";var r=new Array(2),o=(this.decideDirectionsForOverlappingNodes(t,e,r),i[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),i[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())),Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX())));e=(o=e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()?1:o)*i[0],t=i[1]/o,i[0]<t?t=i[0]:e=i[1],i[0]=-1*r[0]*(t/2+n),i[1]=-1*r[1]*(e/2+n)},r.decideDirectionsForOverlappingNodes=function(t,e,i){t.getCenterX()<e.getCenterX()?i[0]=-1:i[0]=1,t.getCenterY()<e.getCenterY()?i[1]=-1:i[1]=1},r.getIntersection2=function(t,e,i){var n=t.getCenterX(),r=t.getCenterY(),o=e.getCenterX(),a=e.getCenterY();if(t.intersects(e))return i[0]=n,i[1]=r,i[2]=o,i[3]=a,!0;var s=t.getX(),h=t.getY(),l=t.getRight(),d=t.getX(),g=t.getBottom(),c=t.getRight(),u=t.getWidthHalf(),p=t.getHeightHalf(),f=e.getX(),m=e.getY(),y=e.getRight(),v=e.getX(),E=e.getBottom(),N=e.getRight(),T=e.getWidthHalf(),A=e.getHeightHalf(),w=!1,I=!1;if(n===o){if(a<r)return i[0]=n,i[1]=h,i[2]=o,i[3]=E,!1;r<a&&(i[0]=n,i[1]=g,i[2]=o,i[3]=m)}else if(r===a){if(o<n)return i[0]=s,i[1]=r,i[2]=y,i[3]=a,!1;n<o&&(i[0]=l,i[1]=r,i[2]=f,i[3]=a)}else{t=t.height/t.width,e=e.height/e.width;var C,L=(a-r)/(o-n),_=void 0,M=void 0,x=void 0;if(-t==L?(o<n?(i[0]=d,i[1]=g):(i[0]=l,i[1]=h),w=!0):t==L&&(o<n?(i[0]=s,i[1]=h):(i[0]=c,i[1]=g),w=!0),-e==L?(n<o?(i[2]=v,i[3]=E):(i[2]=y,i[3]=m),I=!0):e==L&&(n<o?(i[2]=f,i[3]=m):(i[2]=N,i[3]=E),I=!0),w&&I)return!1;if(C=o<n?a<r?(_=this.getCardinalDirection(t,L,4),this.getCardinalDirection(e,L,2)):(_=this.getCardinalDirection(-t,L,3),this.getCardinalDirection(-e,L,1)):a<r?(_=this.getCardinalDirection(-t,L,1),this.getCardinalDirection(-e,L,3)):(_=this.getCardinalDirection(t,L,2),this.getCardinalDirection(e,L,4)),!w)switch(_){case 1:M=h,i[0]=n+-p/L,i[1]=M;break;case 2:M=r+u*L,i[0]=c,i[1]=M;break;case 3:M=g,i[0]=n+p/L,i[1]=M;break;case 4:M=r+-u*L,i[0]=d,i[1]=M}if(!I)switch(C){case 1:x=m,i[2]=o+-A/L,i[3]=x;break;case 2:x=a+T*L,i[2]=N,i[3]=x;break;case 3:x=E,i[2]=o+A/L,i[3]=x;break;case 4:x=a+-T*L,i[2]=v,i[3]=x}}return!1},r.getCardinalDirection=function(t,e,i){return e<t?i:1+i%4},r.getIntersection=function(t,e,i,r){var o,a,s,h,l,d,g,c,u,p,f;return null==r?this.getIntersection2(t,e,i):(o=t.x,a=e.x,p=g=void 0,0==(f=(l=(e=e.y)-(t=t.y))*(u=(s=i.x)-(h=r.x))-(c=(r=r.y)-(i=i.y))*(d=o-a))?null:new n((d*(p=h*i-s*r)-u*(g=a*t-o*e))/f,(c*g-l*p)/f))},r.angleOfVector=function(t,e,i,n){var r=void 0;return t!==i?(r=Math.atan((n-e)/(i-t)),i<t?r+=Math.PI:n<e&&(r+=this.TWO_PI)):r=n<e?this.ONE_AND_HALF_PI:this.HALF_PI,r},r.doIntersect=function(t,e,i,n){var r=t.x,o=(t=t.y,e.x),a=(e=e.y,i.x),s=(i=i.y,n.x),h=(o-r)*((n=n.y)-i)-(s-a)*(e-t);return 0!=h&&(e=((t-e)*(s-r)+(o-r)*(n-t))/h,0<(o=((n-i)*(s-r)+(a-s)*(n-t))/h))&&o<1&&0<e&&e<1},r.findCircleLineIntersections=function(t,e,i,n,r,o,a){var s=(i-t)*(i-t)+(n-e)*(n-e);return 0<=(i=2*((t-r)*(i-t)+(e-o)*(n-e)))*i-4*s*(n=(t-r)*(t-r)+(e-o)*(e-o)-a*a)?(t=(-i+Math.sqrt(i*i-4*s*n))/(2*s),r=(-i-Math.sqrt(i*i-4*s*n))/(2*s),0<=t&&t<=1?[t]:0<=r&&r<=1?[r]:null):null},r.HALF_PI=.5*Math.PI,r.ONE_AND_HALF_PI=1.5*Math.PI,r.TWO_PI=2*Math.PI,r.THREE_PI=3*Math.PI,t.exports=r},function(t,e,i){function n(){}n.sign=function(t){return 0<t?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,i){function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,i){function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t){return{value:t,next:null,prev:null}}function o(t,e,i,n){return null!==t?t.next=e:n.head=e,null!==i?i.prev=e:n.tail=e,e.prev=t,e.next=i,n.length++,e}function a(t,e){var i=t.prev,n=t.next;return null!==i?i.next=n:e.head=n,null!==n?n.prev=i:e.tail=i,t.prev=t.next=null,e.length--,t}function s(t){var e=this;if(!(this instanceof s))throw new TypeError("Cannot call a class as a function");this.length=0,this.head=null,(this.tail=null)!=t&&t.forEach(function(t){return e.push(t)})}(function(t,e){e&&n(t.prototype,e)})(s,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,e){return o(e.prev,r(t),e,this)}},{key:"insertAfter",value:function(t,e){return o(e,r(t),e.next,this)}},{key:"insertNodeBefore",value:function(t,e){return o(e.prev,t,e,this)}},{key:"insertNodeAfter",value:function(t,e){return o(e,t,e.next,this)}},{key:"push",value:function(t){return o(this.tail,r(t),null,this)}},{key:"unshift",value:function(t){return o(null,r(t),this.head,this)}},{key:"remove",value:function(t){return a(t,this)}},{key:"pop",value:function(){return a(this.tail,this).value}},{key:"popNode",value:function(){return a(this.tail,this)}},{key:"shift",value:function(){return a(this.head,this).value}},{key:"shiftNode",value:function(){return a(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var e=1,i=this.head;e<t;)i=i.next,e++;return i.value}}},{key:"set_object_at",value:function(t,e){if(t<=this.length()){for(var i=1,n=this.head;i<t;)n=n.next,i++;n.value=e}}}]),t.exports=s},function(t,e,i){function n(t,e,i){this.x=null,(this.y=null)==t&&null==e&&null==i?(this.x=0,this.y=0):"number"==typeof t&&"number"==typeof e&&null==i?(this.x=t,this.y=e):"Point"==t.constructor.name&&null==e&&null==i&&(this.x=(i=t).x,this.y=i.y)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.getLocation=function(){return new n(this.x,this.y)},n.prototype.setLocation=function(t,e,i){"Point"==t.constructor.name&&null==e&&null==i?this.setLocation((i=t).x,i.y):"number"==typeof t&&"number"==typeof e&&null==i&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},n.prototype.move=function(t,e){this.x=t,this.y=e},n.prototype.translate=function(t,e){this.x+=t,this.y+=e},n.prototype.equals=function(t){return"Point"==t.constructor.name?this.x==t.x&&this.y==t.y:this==t},n.prototype.toString=function(){return(new n).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=n},function(t,e,i){function n(t,e,i,n){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=i&&null!=n&&(this.x=t,this.y=e,this.width=i,this.height=n)}n.prototype.getX=function(){return this.x},n.prototype.setX=function(t){this.x=t},n.prototype.getY=function(){return this.y},n.prototype.setY=function(t){this.y=t},n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},n.prototype.getRight=function(){return this.x+this.width},n.prototype.getBottom=function(){return this.y+this.height},n.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},n.prototype.getCenterX=function(){return this.x+this.width/2},n.prototype.getMinX=function(){return this.getX()},n.prototype.getMaxX=function(){return this.getX()+this.width},n.prototype.getCenterY=function(){return this.y+this.height/2},n.prototype.getMinY=function(){return this.getY()},n.prototype.getMaxY=function(){return this.getY()+this.height},n.prototype.getWidthHalf=function(){return this.width/2},n.prototype.getHeightHalf=function(){return this.height/2},t.exports=n},function(t,e,i){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function r(){}r.lastID=0,r.createID=function(t){return r.isPrimitive(t)?t:(null==t.uniqueID&&(t.uniqueID=r.getString(),r.lastID++),t.uniqueID)},r.getString=function(t){return"Object#"+(null==t?r.lastID:t)},r.isPrimitive=function(t){var e=void 0===t?"undefined":n(t);return null==t||"object"!=e&&"function"!=e},t.exports=r},function(t,e,i){function n(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}var r=i(0),o=i(7),a=i(3),s=i(1),h=i(6),l=i(5),d=i(17),g=i(29);function c(t){g.call(this),this.layoutQuality=r.QUALITY,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=r.DEFAULT_INCREMENTAL,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}c.RANDOM_SEED=1,(c.prototype=Object.create(g.prototype)).getGraphManager=function(){return this.graphManager},c.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},c.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},c.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},c.prototype.newGraphManager=function(){var t=new o(this);return this.graphManager=t},c.prototype.newGraph=function(t){return new h(null,this.graphManager,t)},c.prototype.newNode=function(t){return new a(this.graphManager,t)},c.prototype.newEdge=function(t){return new s(null,null,t)},c.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},c.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),"during"!==r.ANIMATE&&(t&&!this.isSubLayout&&this.doPostLayout(),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},c.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},c.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];var i=this.graphManager.getRoot().getNodes();for(e=0;e<i.length;e++)i[e];this.update(this.graphManager.getRoot())}},c.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof a){var e=t;if(null!=e.getChild())for(var i=e.getChild().getNodes(),n=0;n<i.length;n++)update(i[n]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else t instanceof s?null!=t.vGraphObject&&t.vGraphObject.update(t):t instanceof h&&null!=t.vGraphObject&&t.vGraphObject.update(t)},c.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=r.QUALITY,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=r.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},c.prototype.transform=function(t){if(null==t)this.transform(new l(0,0));else{var e=new d,i=this.graphManager.getRoot().updateLeftTop();if(null!=i){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(i.x),e.setDeviceOrgY(i.y);for(var n=this.getAllNodes(),r=0;r<n.length;r++)n[r].transform(e)}}},c.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,i,n=t.getNodes(),r=0;r<n.length;r++)null==(i=(e=n[r]).getChild())||0==i.getNodes().length?e.scatter():(this.positionNodesRandomly(i),e.updateBounds())},c.prototype.getFlatForest=function(){for(var t=[],e=!0,i=this.graphManager.getRoot().getNodes(),r=!0,o=0;o<i.length;o++)null!=i[o].getChild()&&(r=!1);if(r)for(var a=new Set,s=[],h=new Map,l=(l=[]).concat(i);0<l.length&&e;){for(s.push(l[0]);0<s.length&&e;){var d=s[0],g=(s.splice(0,1),a.add(d),d.getEdges());for(o=0;o<g.length;o++){var c=g[o].getOtherEnd(d);if(h.get(d)!=c){if(a.has(c)){e=!1;break}s.push(c),h.set(c,d)}}}if(e){var u=[].concat(n(a));for(t.push(u),o=0;o<u.length;o++){var p=u[o];-1<(p=l.indexOf(p))&&l.splice(p,1)}a=new Set,h=new Map}else t=[]}return t},c.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),r=0;r<t.bendpoints.length;r++){var o=this.newNode(null),a=(o.setRect(new Point(0,0),new Dimension(1,1)),n.add(o),this.newEdge(null));this.graphManager.add(a,i,o),e.add(o),i=o}return a=this.newEdge(null),this.graphManager.add(a,i,t.target),this.edgeToDummyNodes.set(t,e),(t.isInterGraph()?this.graphManager:n).remove(t),e},c.prototype.createBendpointsFromDummyNodes=function(){var t=(t=[]).concat(this.graphManager.getAllEdges());t=[].concat(n(this.edgeToDummyNodes.keys())).concat(t);for(var e=0;e<t.length;e++){var i=t[e];if(0<i.bendpoints.length){for(var r=this.edgeToDummyNodes.get(i),o=0;o<r.length;o++){var a=r[o],s=new l(a.getCenterX(),a.getCenterY()),h=i.bendpoints.get(o);h.x=s.x,h.y=s.y,a.getOwner().remove(a)}this.graphManager.add(i,i.source,i.target)}}},c.transform=function(t,e,i,n){var r,o;return null!=i&&null!=n?(r=e,t<=50?r-=(e-e/i)/50*(50-t):r+=(e*n-e)/50*(t-50),r):(i=t<=50?(o=9*e/500,e/10):(o=9*e/50,-8*e),o*t+i)},c.findCenterOfTree=function(t){var e=(e=[]).concat(t),i=[],n=new Map,r=!1,o=null;1!=e.length&&2!=e.length||(r=!0,o=e[0]);for(var a=0;a<e.length;a++){var s=(l=e[a]).getNeighborsList().size;n.set(l,l.getNeighborsList().size),1==s&&i.push(l)}for(h=(h=[]).concat(i);!r;){[].concat(h);var h=[];for(a=0;a<e.length;a++){var l=e[a],d=e.indexOf(l);0<=d&&e.splice(d,1),l.getNeighborsList().forEach(function(t){var e;i.indexOf(t)<0&&(1==(e=n.get(t)-1)&&h.push(t),n.set(t,e))})}i=i.concat(h),1!=e.length&&2!=e.length||(r=!0,o=e[0])}return o},c.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=c},function(t,e,i){function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return(n.x=1e4*Math.sin(n.seed++))-Math.floor(n.x)},t.exports=n},function(t,e,i){var n=i(5);function r(t,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}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(t){this.lworldExtX=t},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(t){this.lworldExtY=t},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},r.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i?this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i:e},r.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i?this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i:e},r.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i?this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i:e},r.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i?this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i:e},r.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=r},function(t,e,i){var n,r=i(15),o=i(4),a=i(0),s=i(8),h=i(9);function l(){r.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(n in l.prototype=Object.create(r.prototype),r)l[n]=r[n];l.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,n,r,s,h=this.getGraphManager().getAllEdges(),l=0;l<h.length;l++)e=(t=h[l]).idealLength,t.isInterGraph&&(i=t.getSource(),n=t.getTarget(),r=t.getSourceInLca().getEstimatedSize(),s=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=r+s-2*a.SIMPLE_NODE_SIZE),r=t.getLca().getInclusionTreeDepth(),t.idealLength+=e*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(i.getInclusionTreeDepth()+n.getInclusionTreeDepth()-2*r))},l.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()},l.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i<e.length;i++)t=e[i],this.calcSpringForce(t,t.idealLength)},l.prototype.calcRepulsionForces=function(){var t,e,i,n,r,a=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],s=1<arguments.length&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&a&&this.updateGrid(),r=new Set,t=0;t<h.length;t++)i=h[t],this.calculateRepulsionForceOfANode(i,r,a,s),r.add(i);else for(t=0;t<h.length;t++)for(i=h[t],e=t+1;e<h.length;e++)n=h[e],i.getOwner()==n.getOwner()&&this.calcRepulsionForce(i,n)},l.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),i=0;i<e.length;i++)t=e[i],this.calcGravitationalForce(t)},l.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},l.prototype.calcSpringForce=function(t,e){var i,n,r=t.getSource(),o=t.getTarget();if(this.uniformLeafNodeSizes&&null==r.getChild()&&null==o.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(i=t.getLength())&&(e=t.edgeElasticity*(i-e),n=t.lengthY/i*e,r.springForceX+=t=t.lengthX/i*e,r.springForceY+=n,o.springForceX-=t,o.springForceY-=n)},l.prototype.calcRepulsionForce=function(t,e){var i,n,r,a=t.getRect(),l=e.getRect(),d=new Array(2),g=new Array(4);a.intersects(l)?(s.calcSeparationAmount(a,l,d,o.DEFAULT_EDGE_LENGTH/2),n=2*d[0],r=2*d[1],d=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren),t.repulsionForceX-=d*n,t.repulsionForceY-=d*r,e.repulsionForceX+=d*n,e.repulsionForceY+=d*r):(d=this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(i=l.getCenterX()-a.getCenterX(),l.getCenterY()-a.getCenterY()):(s.getIntersection(a,l,g),i=g[2]-g[0],g[3]-g[1]),a=(i=Math.abs(i)<o.MIN_REPULSION_DIST?h.sign(i)*o.MIN_REPULSION_DIST:i)*i+(d=Math.abs(d)<o.MIN_REPULSION_DIST?h.sign(d)*o.MIN_REPULSION_DIST:d)*d,l=Math.sqrt(a),r=(g=(t.nodeRepulsion/2+e.nodeRepulsion/2)*t.noOfChildren*e.noOfChildren/a)*d/l,t.repulsionForceX-=n=g*i/l,t.repulsionForceY-=r,e.repulsionForceX+=n,e.repulsionForceY+=r)},l.prototype.calcGravitationalForce=function(t){var e,i=t.getOwner(),n=(i.getRight()+i.getLeft())/2,r=(i.getTop()+i.getBottom())/2,o=(n=t.getCenterX()-n,r=t.getCenterY()-r,Math.abs(n)+t.getWidth()/2),a=Math.abs(r)+t.getHeight()/2;t.getOwner()==this.graphManager.getRoot()?((e=i.getEstimatedSize()*this.gravityRangeFactor)<o||e<a)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*r):((e=i.getEstimatedSize()*this.compoundGravityRangeFactor)<o||e<a)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*r*this.compoundGravityConstant)},l.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},l.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},l.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,e=this.graphManager.getAllNodes(),i=0;i<e.length;i++)(t=e[i]).noOfChildren=t.getNoOfChildren()},l.prototype.calcGrid=function(t){for(var e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),i=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange)),n=new Array(e),r=0;r<e;r++)n[r]=new Array(i);for(r=0;r<e;r++)for(var o=0;o<i;o++)n[r][o]=new Array;return n},l.prototype.addNodeToGrid=function(t,e,i){for(var n=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),r=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),o=parseInt(Math.floor((t.getRect().y-i)/this.repulsionRange)),a=parseInt(Math.floor((t.getRect().height+t.getRect().y-i)/this.repulsionRange)),s=n;s<=r;s++)for(var h=o;h<=a;h++)this.grid[s][h].push(t),t.setGridCoordinates(n,r,o,a)},l.prototype.updateGrid=function(){var t,e,i=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<i.length;t++)e=i[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},l.prototype.calculateRepulsionForceOfANode=function(t,e,i,n){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&i||n){for(var r=new Set,a=(t.surrounding=new Array,this.grid),s=t.startX-1;s<t.finishX+2;s++)for(var h=t.startY-1;h<t.finishY+2;h++)if(!(s<0||h<0||s>=a.length||h>=a[0].length))for(var l=0;l<a[s][h].length;l++){var d,g,c=a[s][h][l];t.getOwner()!=c.getOwner()||t==c||e.has(c)||r.has(c)||(d=Math.abs(t.getCenterX()-c.getCenterX())-(t.getWidth()/2+c.getWidth()/2),g=Math.abs(t.getCenterY()-c.getCenterY())-(t.getHeight()/2+c.getHeight()/2),d<=this.repulsionRange&&g<=this.repulsionRange&&r.add(c))}t.surrounding=[].concat((t=>{if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)})(r))}for(s=0;s<t.surrounding.length;s++)this.calcRepulsionForce(t,t.surrounding[s])},l.prototype.calcRepulsionRange=function(){return 0},t.exports=l},function(t,e,i){var n,r=i(1),o=i(4);function a(t,e,i){r.call(this,t,e,i),this.idealLength=o.DEFAULT_EDGE_LENGTH,this.edgeElasticity=o.DEFAULT_SPRING_STRENGTH}for(n in a.prototype=Object.create(r.prototype),r)a[n]=r[n];t.exports=a},function(t,e,i){var n,r=i(3),o=i(4);function a(t,e,i,n){r.call(this,t,e,i,n),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(n in a.prototype=Object.create(r.prototype),r)a[n]=r[n];a.prototype.setGridCoordinates=function(t,e,i,n){this.startX=t,this.finishX=e,this.startY=i,this.finishY=n},t.exports=a},function(t,e,i){function n(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}n.prototype.getWidth=function(){return this.width},n.prototype.setWidth=function(t){this.width=t},n.prototype.getHeight=function(){return this.height},n.prototype.setHeight=function(t){this.height=t},t.exports=n},function(t,e,i){var n=i(14);function r(){this.map={},this.keys=[]}r.prototype.put=function(t,e){var i=n.createID(t);this.contains(i)||(this.map[i]=e,this.keys.push(t))},r.prototype.contains=function(t){return n.createID(t),null!=this.map[t]},r.prototype.get=function(t){return t=n.createID(t),this.map[t]},r.prototype.keySet=function(){return this.keys},t.exports=r},function(t,e,i){var n=i(14);function r(){this.set={}}r.prototype.add=function(t){var e=n.createID(t);this.contains(e)||(this.set[e]=t)},r.prototype.remove=function(t){delete this.set[n.createID(t)]},r.prototype.clear=function(){this.set={}},r.prototype.contains=function(t){return this.set[n.createID(t)]==t},r.prototype.isEmpty=function(){return 0===this.size()},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),i=e.length,n=0;n<i;n++)t.push(this.set[e[n]])},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAll=function(t){for(var e=t.length,i=0;i<e;i++){var n=t[i];this.add(n)}},t.exports=r},function(t,e,i){function n(){}n.multMat=function(t,e){for(var i=[],n=0;n<t.length;n++){i[n]=[];for(var r=0;r<e[0].length;r++)for(var o=i[n][r]=0;o<t[0].length;o++)i[n][r]+=t[n][o]*e[o][r]}return i},n.transpose=function(t){for(var e=[],i=0;i<t[0].length;i++){e[i]=[];for(var n=0;n<t.length;n++)e[i][n]=t[n][i]}return e},n.multCons=function(t,e){for(var i=[],n=0;n<t.length;n++)i[n]=t[n]*e;return i},n.minusOp=function(t,e){for(var i=[],n=0;n<t.length;n++)i[n]=t[n]-e[n];return i},n.dotProduct=function(t,e){for(var i=0,n=0;n<t.length;n++)i+=t[n]*e[n];return i},n.mag=function(t){return Math.sqrt(this.dotProduct(t,t))},n.normalize=function(t){for(var e=[],i=this.mag(t),n=0;n<t.length;n++)e[n]=t[n]/i;return e},n.multGamma=function(t){for(var e=[],i=0,n=0;n<t.length;n++)i+=t[n];i*=-1/t.length;for(var r=0;r<t.length;r++)e[r]=i+t[r];return e},n.multL=function(t,e,i){for(var n=[],r=[],o=[],a=0;a<e[0].length;a++){for(var s=0,h=0;h<e.length;h++)s+=-.5*e[h][a]*t[h];r[a]=s}for(var l=0;l<i.length;l++){for(var d=0,g=0;g<i.length;g++)d+=i[l][g]*r[g];o[l]=d}for(var c=0;c<e.length;c++){for(var u=0,p=0;p<e[0].length;p++)u+=e[c][p]*o[p];n[c]=u}return n},t.exports=n},function(t,e,i){function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var r=i(11);function o(t,e){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");null===e&&void 0===e||(this.compareFunction=this._defaultCompareFunction),e=void 0,e=t instanceof r?t.size():t.length,this._quicksort(t,0,e-1)}(function(t,e,i){e&&n(t.prototype,e),i&&n(t,i)})(o,[{key:"_quicksort",value:function(t,e,i){var n;e<i&&(n=this._partition(t,e,i),this._quicksort(t,e,n),this._quicksort(t,n+1,i))}},{key:"_partition",value:function(t,e,i){for(var n=this._get(t,e),r=e,o=i;;){for(;this.compareFunction(n,this._get(t,o));)o--;for(;this.compareFunction(this._get(t,r),n);)r++;if(!(r<o))return o;this._swap(t,r,o),r++,o--}}},{key:"_get",value:function(t,e){return t instanceof r?t.get_object_at(e):t[e]}},{key:"_set",value:function(t,e,i){t instanceof r?t.set_object_at(e,i):t[e]=i}},{key:"_swap",value:function(t,e,i){var n=this._get(t,e);this._set(t,e,this._get(t,i)),this._set(t,i,n)}},{key:"_defaultCompareFunction",value:function(t,e){return t<e}}]),i=o,t.exports=i},function(t,e,i){function n(){}n.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;for(var e,i,r,o=Math.min(this.m,this.n),a=(this.s=(t=>{for(var e=[];0<t--;)e.push(0);return e})(Math.min(this.m+1,this.n)),this.U=function t(e){if(0==e.length)return 0;for(var i=[],n=0;n<e[0];n++)i.push(t(e.slice(1)));return i}([this.m,o]),this.V=function t(e){if(0==e.length)return 0;for(var i=[],n=0;n<e[0];n++)i.push(t(e.slice(1)));return i}([this.n,this.n]),(t=>{for(var e=[];0<t--;)e.push(0);return e})(this.n)),s=(t=>{for(var e=[];0<t--;)e.push(0);return e})(this.m),h=Math.min(this.m-1,this.n),l=Math.max(0,Math.min(this.n-2,this.m)),d=0;d<Math.max(h,l);d++){if(d<h){this.s[d]=0;for(var g=d;g<this.m;g++)this.s[d]=n.hypot(this.s[d],t[g][d]);if(0!==this.s[d]){t[d][d]<0&&(this.s[d]=-this.s[d]);for(var c=d;c<this.m;c++)t[c][d]/=this.s[d];t[d][d]+=1}this.s[d]=-this.s[d]}for(var u=d+1;u<this.n;u++){if(r=0!==this.s[d],d<h&&r){for(var p=0,f=d;f<this.m;f++)p+=t[f][d]*t[f][u];p=-p/t[d][d];for(var m=d;m<this.m;m++)t[m][u]+=p*t[m][d]}a[u]=t[d][u]}if(d<h)for(var y=d;y<this.m;y++)this.U[y][d]=t[y][d];if(d<l){a[d]=0;for(var v=d+1;v<this.n;v++)a[d]=n.hypot(a[d],a[v]);if(0!==a[d]){a[d+1]<0&&(a[d]=-a[d]);for(var E=d+1;E<this.n;E++)a[E]/=a[d];a[d+1]+=1}if(a[d]=-a[d],e=d+1<this.m,i=0!==a[d],e&&i){for(var N=d+1;N<this.m;N++)s[N]=0;for(var T=d+1;T<this.n;T++)for(var A=d+1;A<this.m;A++)s[A]+=a[T]*t[A][T];for(var w=d+1;w<this.n;w++)for(var I=-a[w]/a[d+1],C=d+1;C<this.m;C++)t[C][w]+=I*s[C]}for(var L=d+1;L<this.n;L++)this.V[L][d]=a[L]}}var _=Math.min(this.n,this.m+1);h<this.n&&(this.s[h]=t[h][h]),this.m<_&&(this.s[_-1]=0),l+1<_&&(a[l]=t[l][_-1]),a[_-1]=0;for(var M=h;M<o;M++){for(var x=0;x<this.m;x++)this.U[x][M]=0;this.U[M][M]=1}for(var O=h-1;0<=O;O--)if(0!==this.s[O]){for(var D=O+1;D<o;D++){for(var b=0,R=O;R<this.m;R++)b+=this.U[R][O]*this.U[R][D];b=-b/this.U[O][O];for(var F=O;F<this.m;F++)this.U[F][D]+=b*this.U[F][O]}for(var G=O;G<this.m;G++)this.U[G][O]=-this.U[G][O];this.U[O][O]=1+this.U[O][O];for(var S=0;S<O-1;S++)this.U[S][O]=0}else{for(var P=0;P<this.m;P++)this.U[P][O]=0;this.U[O][O]=1}for(var U,Y=this.n-1;0<=Y;Y--){if(U=0!==a[Y],Y<l&&U)for(var k=Y+1;k<o;k++){for(var H=0,X=Y+1;X<this.n;X++)H+=this.V[X][Y]*this.V[X][k];H=-H/this.V[Y+1][Y];for(var z=Y+1;z<this.n;z++)this.V[z][k]+=H*this.V[z][Y]}for(var B=0;B<this.n;B++)this.V[B][Y]=0;this.V[Y][Y]=1}for(var V=_-1,W=Math.pow(2,-52),j=Math.pow(2,-966);0<_;){var q=void 0,$=void 0;for(q=_-2;-1<=q&&-1!==q;q--)if(Math.abs(a[q])<=j+W*(Math.abs(this.s[q])+Math.abs(this.s[q+1]))){a[q]=0;break}if(q===_-2)$=4;else{var Z=void 0;for(Z=_-1;q<=Z&&Z!==q;Z--){var Q=(Z!==_?Math.abs(a[Z]):0)+(Z!==q+1?Math.abs(a[Z-1]):0);if(Math.abs(this.s[Z])<=j+W*Q){this.s[Z]=0;break}}Z===q?$=3:Z===_-1?$=1:($=2,q=Z)}switch(q++,$){case 1:var J=a[_-2];a[_-2]=0;for(var K=_-2;q<=K;K--){var tt=n.hypot(this.s[K],J),et=this.s[K]/tt,it=J/tt;this.s[K]=tt,K!==q&&(J=-it*a[K-1],a[K-1]=et*a[K-1]);for(var nt=0;nt<this.n;nt++)tt=et*this.V[nt][K]+it*this.V[nt][_-1],this.V[nt][_-1]=-it*this.V[nt][K]+et*this.V[nt][_-1],this.V[nt][K]=tt}break;case 2:var rt=a[q-1];a[q-1]=0;for(var ot=q;ot<_;ot++){var at=n.hypot(this.s[ot],rt),st=this.s[ot]/at,ht=rt/at;this.s[ot]=at,rt=-ht*a[ot],a[ot]=st*a[ot];for(var lt=0;lt<this.m;lt++)at=st*this.U[lt][ot]+ht*this.U[lt][q-1],this.U[lt][q-1]=-ht*this.U[lt][ot]+st*this.U[lt][q-1],this.U[lt][ot]=at}break;case 3:for(var dt=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[_-1]),Math.abs(this.s[_-2])),Math.abs(a[_-2])),Math.abs(this.s[q])),Math.abs(a[q])),gt=this.s[_-1]/dt,ct=this.s[_-2]/dt,ut=a[_-2]/dt,pt=this.s[q]/dt,ft=(dt=a[q]/dt,ct=((ct+gt)*(ct-gt)+ut*ut)/2,ut=gt*ut*(gt*ut),0),mt=(0==ct&&0==ut||(ft=Math.sqrt(ct*ct+ut),ft=ut/(ct+(ft=ct<0?-ft:ft))),(pt+gt)*(pt-gt)+ft),yt=pt*dt,vt=q;vt<_-1;vt++){var Et=n.hypot(mt,yt),Nt=mt/Et,Tt=yt/Et;vt!==q&&(a[vt-1]=Et),mt=Nt*this.s[vt]+Tt*a[vt],a[vt]=Nt*a[vt]-Tt*this.s[vt],yt=Tt*this.s[vt+1],this.s[vt+1]=Nt*this.s[vt+1];for(var At=0;At<this.n;At++)Et=Nt*this.V[At][vt]+Tt*this.V[At][vt+1],this.V[At][vt+1]=-Tt*this.V[At][vt]+Nt*this.V[At][vt+1],this.V[At][vt]=Et;if(Nt=mt/(Et=n.hypot(mt,yt)),Tt=yt/Et,this.s[vt]=Et,mt=Nt*a[vt]+Tt*this.s[vt+1],this.s[vt+1]=-Tt*a[vt]+Nt*this.s[vt+1],yt=Tt*a[vt+1],a[vt+1]=Nt*a[vt+1],vt<this.m-1)for(var wt=0;wt<this.m;wt++)Et=Nt*this.U[wt][vt]+Tt*this.U[wt][vt+1],this.U[wt][vt+1]=-Tt*this.U[wt][vt]+Nt*this.U[wt][vt+1],this.U[wt][vt]=Et}a[_-2]=mt;break;case 4:if(this.s[q]<=0){this.s[q]=this.s[q]<0?-this.s[q]:0;for(var It=0;It<=V;It++)this.V[It][q]=-this.V[It][q]}for(;q<V&&!(this.s[q]>=this.s[q+1]);){var Ct=this.s[q];if(this.s[q]=this.s[q+1],this.s[q+1]=Ct,q<this.n-1)for(var Lt=0;Lt<this.n;Lt++)Ct=this.V[Lt][q+1],this.V[Lt][q+1]=this.V[Lt][q],this.V[Lt][q]=Ct;if(q<this.m-1)for(var _t=0;_t<this.m;_t++)Ct=this.U[_t][q+1],this.U[_t][q+1]=this.U[_t][q],this.U[_t][q]=Ct;q++}_--}}return{U:this.U,V:this.V,S:this.s}},n.hypot=function(t,e){var i=void 0;return Math.abs(t)>Math.abs(e)?(i=e/t,Math.abs(t)*Math.sqrt(1+i*i)):0!=e?(i=t/e,Math.abs(e)*Math.sqrt(1+i*i)):0},t.exports=n},function(t,e,i){function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}!function(t,e){e&&n(t.prototype,e)}(o,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var i=1;i<this.iMax;i++)for(var n=1;n<this.jMax;n++){var r=[this.sequence1[i-1]===this.sequence2[n-1]?this.grid[i-1][n-1]+this.match_score:this.grid[i-1][n-1]+this.mismatch_penalty,this.grid[i-1][n]+this.gap_penalty,this.grid[i][n-1]+this.gap_penalty],o=this.arrayAllMaxIndexes(r);this.grid[i][n]=r[o[0]],this.tracebackGrid[i][n]=[o.includes(0),o.includes(1),o.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],i=this.tracebackGrid[e.pos[0]][e.pos[1]];i[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),i[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),i[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var i=[],n=-1;-1!==(n=t.indexOf(e,n+1));)i.push(n);return i}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]);var r=o;function o(t,e){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1,n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:-1,r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:-1;if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this.sequence1=t,this.sequence2=e,this.match_score=i,this.mismatch_penalty=n,this.gap_penalty=r,this.iMax=t.length+1,this.jMax=e.length+1,this.grid=new Array(this.iMax);for(var a=0;a<this.iMax;a++){this.grid[a]=new Array(this.jMax);for(var s=0;s<this.jMax;s++)this.grid[a][s]=0}this.tracebackGrid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.tracebackGrid[h]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[h][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}t.exports=r},function(t,e,i){function n(){}n.FDLayout=i(18),n.FDLayoutConstants=i(4),n.FDLayoutEdge=i(19),n.FDLayoutNode=i(20),n.DimensionD=i(21),n.HashMap=i(22),n.HashSet=i(23),n.IGeometry=i(8),n.IMath=i(9),n.Integer=i(10),n.Point=i(12),n.PointD=i(5),n.RandomSeed=i(16),n.RectangleD=i(13),n.Transform=i(17),n.UniqueIDGeneretor=i(14),n.Quicksort=i(25),n.LinkedList=i(11),n.LGraphObject=i(2),n.LGraph=i(6),n.LEdge=i(1),n.LGraphManager=i(7),n.LNode=i(3),n.Layout=i(15),n.LayoutConstants=i(0),n.NeedlemanWunsch=i(27),n.Matrix=i(24),n.SVD=i(26),t.exports=n},function(t,e,i){function n(){this.listeners=[]}var r=n.prototype;r.addListener=function(t,e){this.listeners.push({event:t,callback:e})},r.removeListener=function(t,e){for(var i=this.listeners.length;0<=i;i--){var n=this.listeners[i];n.event===t&&n.callback===e&&this.listeners.splice(i,1)}},r.emit=function(t,e){for(var i=0;i<this.listeners.length;i++){var n=this.listeners[i];t===n.event&&n.callback(e)}},t.exports=n}],i={},t.m=e,t.c=i,t.i=function(t){return t},t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=28);function t(n){var r;return(i[n]||(r=i[n]={i:n,l:!1,exports:{}},e[n].call(r.exports,r,r.exports,t),r.l=!0,r)).exports}var e,i},R.exports=t()),R.exports}())),b.exports}(()=>{var t;t=function(t){return e={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,i=Array(1<e?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return i.forEach(function(e){Object.keys(e).forEach(function(i){return t[i]=e[i]})}),t}},548:(t,e,i)=>{var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t)){var i=e,n=[],r=!0,o=(e=!1,void 0);try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!i||n.length!==i);r=!0);}catch(t){e=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(e)throw o}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=i(140).layoutBase.LinkedList;i={getTopMostNodes:function(t){for(var e={},i=0;i<t.length;i++)e[t[i].id()]=!0;return t.filter(function(t,i){for(var n=(t="number"==typeof t?i:t).parent()[0];null!=n;){if(e[n.id()])return!1;n=n.parent()[0]}return!0})},connectComponents:function(t,e,i,n){for(var o=new r,a=new Set,s=[],h=void 0,l=void 0,d=void 0,g=!1,c=1,u=[],p=[],f=function(){var n,r=t.collection(),f=(p.push(r),i[0]),m=t.collection();for(m.merge(f).merge(f.descendants().intersection(e)),s.push(f),m.forEach(function(t){o.push(t),a.add(t),r.merge(t)});0!=o.length;)(()=>{f=o.shift();var n=t.collection();f.neighborhood().nodes().forEach(function(t){0<e.intersection(f.edgesWith(t)).length&&n.merge(t)});for(var l=0;l<n.length;l++){var d=n[l];null==(h=i.intersection(d.union(d.ancestors())))||a.has(h[0])||h.union(h.descendants()).forEach(function(t){o.push(t),a.add(t),r.merge(t),i.has(t)&&s.push(t)})}})();r.forEach(function(t){e.intersection(t.connectedEdges()).forEach(function(t){r.has(t.source())&&r.has(t.target())&&r.merge(t)})}),(!(g=s.length==i.length||g)||1<c)&&(l=s[0],d=l.connectedEdges().length,s.forEach(function(t){t.connectedEdges().length<d&&(d=t.connectedEdges().length,l=t)}),u.push(l.id()),(n=t.collection()).merge(s[0]),s.forEach(function(t){n.merge(t)}),s=[],i=i.difference(n),c++)};f(),!g;);return n&&0<u.length&&n.set("dummy"+(n.size+1),u),p},relocateComponent:function(t,e,i){if(!i.fixedNodeConstraint){var r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;if("draft"==i.quality){var h=!0,l=!1,d=void 0;try{for(var g,c=e.nodeIndexes[Symbol.iterator]();!(h=(g=c.next()).done);h=!0){var u,p,f,m,y,v=n(g.value,2),E=v[0],N=v[1],T=i.cy.getElementById(E);T&&(u=T.boundingBox(),p=e.xCoords[N]-u.w/2,f=e.xCoords[N]+u.w/2,m=e.yCoords[N]-u.h/2,y=e.yCoords[N]+u.h/2,p<r&&(r=p),o<f&&(o=f),m<a&&(a=m),s<y)&&(s=y)}}catch(t){l=!0,d=t}finally{try{!h&&c.return&&c.return()}finally{if(l)throw d}}var A=t.x-(o+r)/2,w=t.y-(s+a)/2;e.xCoords=e.xCoords.map(function(t){return t+A}),e.yCoords=e.yCoords.map(function(t){return t+w})}else{Object.keys(e).forEach(function(t){var i=(t=e[t]).getRect().x,n=t.getRect().x+t.getRect().width,h=t.getRect().y;t=t.getRect().y+t.getRect().height;i<r&&(r=i),o<n&&(o=n),h<a&&(a=h),s<t&&(s=t)});var I=t.x-(o+r)/2,C=t.y-(s+a)/2;Object.keys(e).forEach(function(t){(t=e[t]).setCenter(t.getCenterX()+I,t.getCenterY()+C)})}}},calcBoundingBox:function(t,e,i,n){for(var r=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,a=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,h=t.descendants().not(":parent"),l=h.length,d=0;d<l;d++){var g,c=h[d];(g=e[n.get(c.id())]-c.width()/2)<r&&(r=g),o<(g=e[n.get(c.id())]+c.width()/2)&&(o=g),(g=i[n.get(c.id())]-c.height()/2)<a&&(a=g),s<(g=i[n.get(c.id())]+c.height()/2)&&(s=g)}return(t={}).topLeftX=r,t.topLeftY=a,t.width=o-r,t.height=s-a,t},calcParentsWithoutChildren:function(t,e){var i=t.collection();return e.nodes(":parent").forEach(function(t){var e=!1;t.children().forEach(function(t){"none"!=t.css("display")&&(e=!0)}),e||i.merge(t)}),i}};t.exports=i},816:(t,e,i)=>{var n=i(548),r=i(140).CoSELayout,o=i(140).CoSENode,a=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,h=i(140).layoutBase.LayoutConstants,l=i(140).layoutBase.FDLayoutConstants,d=i(140).CoSEConstants;t.exports={coseLayout:function(t,e){function i(t,e){return E(t)?t(e):t}var g=t.cy,c=t.eles,u=c.nodes(),p=c.edges(),f=void 0,m=void 0,y=void 0,v={},E=(t.randomize&&(f=e.nodeIndexes,m=e.xCoords,y=e.yCoords),function(t){return"function"==typeof t}),N=n.calcParentsWithoutChildren(g,c);null!=t.nestingFactor&&(d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(d.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(d.MAX_ITERATIONS=l.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(d.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(d.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),null!=t.tilingCompareBy&&(d.TILING_COMPARE_BY=t.tilingCompareBy),h.QUALITY="proof"==t.quality?2:0,d.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,d.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!t.randomize,d.ANIMATE=l.ANIMATE=h.ANIMATE=t.animate,d.TILE=t.tile,d.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,d.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,d.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!0,d.PURE_INCREMENTAL=!t.randomize,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,"transformed"==t.step&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!1),"enforced"==t.step&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!1),"cose"==t.step&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!0),"all"==t.step&&(t.randomize?d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?d.TREE_REDUCTION_ON_INCREMENTAL=!1:d.TREE_REDUCTION_ON_INCREMENTAL=!0;for(var T=(function t(e,r,h,l){for(var d=r.length,g=0;g<d;g++){var c,u=r[g],p=null,E=void(0==u.intersection(N).length&&(p=u.children())),T=u.layoutDimensions({nodeDimensionsIncludeLabels:l.nodeDimensionsIncludeLabels});(E=null!=u.outerWidth()&&null!=u.outerHeight()?l.randomize?u.isParent()?(c=n.calcBoundingBox(u,m,y,f),0==u.intersection(N).length?e.add(new o(h.graphManager,new a(c.topLeftX,c.topLeftY),new s(c.width,c.height))):e.add(new o(h.graphManager,new a(c.topLeftX,c.topLeftY),new s(parseFloat(T.w),parseFloat(T.h))))):e.add(new o(h.graphManager,new a(m[f.get(u.id())]-T.w/2,y[f.get(u.id())]-T.h/2),new s(parseFloat(T.w),parseFloat(T.h)))):e.add(new o(h.graphManager,new a(u.position("x")-T.w/2,u.position("y")-T.h/2),new s(parseFloat(T.w),parseFloat(T.h)))):e.add(new o(this.graphManager))).id=u.data("id"),E.nodeRepulsion=i(l.nodeRepulsion,u),E.paddingLeft=parseInt(u.css("padding")),E.paddingTop=parseInt(u.css("padding")),E.paddingRight=parseInt(u.css("padding")),E.paddingBottom=parseInt(u.css("padding")),l.nodeDimensionsIncludeLabels&&(E.labelWidth=u.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,E.labelHeight=u.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,E.labelPosVertical=u.css("text-valign"),E.labelPosHorizontal=u.css("text-halign")),v[u.data("id")]=E,isNaN(E.rect.x)&&(E.rect.x=0),isNaN(E.rect.y)&&(E.rect.y=0),null!=p&&0<p.length&&t(h.getGraphManager().add(h.newGraph(),E),p,h,l)}}((g=(e=new r).newGraphManager()).addRoot(),n.getTopMostNodes(u),e,t),e),A=g,w=p,I=0,C=0,L=0;L<w.length;L++){var _=w[L],M=v[_.data("source")],x=v[_.data("target")];M&&x&&M!==x&&0==M.getEdgesBetween(x).length&&((M=A.add(T.newEdge(),M,x)).id=_.id(),M.idealLength=i(t.idealEdgeLength,_),M.edgeElasticity=i(t.edgeElasticity,_),I+=M.idealLength,C++)}return null!=t.idealEdgeLength&&(0<C?d.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=I/C:E(t.idealEdgeLength)?d.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=50:d.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,d.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,d.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH),c=e,(u=t).fixedNodeConstraint&&(c.constraints.fixedNodeConstraint=u.fixedNodeConstraint),u.alignmentConstraint&&(c.constraints.alignmentConstraint=u.alignmentConstraint),u.relativePlacementConstraint&&(c.constraints.relativePlacementConstraint=u.relativePlacementConstraint),e.runLayout(),v}}},212:(t,e,i)=>{function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var r=i(658),o=i(548),a=i(657).spectralLayout,s=i(816).coseLayout,h=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(t){return 4500},idealEdgeLength:function(t){return 50},edgeElasticity:function(t){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(){}});(function(t,e,i){e&&n(t.prototype,e),i&&n(t,i)})(l,[{key:"run",value:function(){var t=this.options,e=t.cy,i=t.eles,n=[],r=[],h=void 0,l=[];!t.fixedNodeConstraint||Array.isArray(t.fixedNodeConstraint)&&0!=t.fixedNodeConstraint.length||(t.fixedNodeConstraint=void 0),t.alignmentConstraint&&(!t.alignmentConstraint.vertical||Array.isArray(t.alignmentConstraint.vertical)&&0!=t.alignmentConstraint.vertical.length||(t.alignmentConstraint.vertical=void 0),!t.alignmentConstraint.horizontal||Array.isArray(t.alignmentConstraint.horizontal)&&0!=t.alignmentConstraint.horizontal.length||(t.alignmentConstraint.horizontal=void 0)),!t.relativePlacementConstraint||Array.isArray(t.relativePlacementConstraint)&&0!=t.relativePlacementConstraint.length||(t.relativePlacementConstraint=void 0),(t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint)&&(t.tile=!1,t.packComponents=!1);var d=void 0,g=!1;if(e.layoutUtilities&&t.packComponents&&(d=(d=e.layoutUtilities("get"))||e.layoutUtilities(),g=!0),0<i.nodes().length)if(g){if(g=o.getTopMostNodes(t.eles.nodes()),(h=o.connectComponents(e,t.eles,g)).forEach(function(t){t=t.boundingBox(),l.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),t.randomize&&h.forEach(function(e){t.eles=e,n.push(a(t))}),"default"==t.quality||"proof"==t.quality){var c=e.collection();if(t.tile){g=new Map;var u=0,p={nodeIndexes:g,xCoords:[],yCoords:[]},f=[];if(h.forEach(function(t,e){0==t.edges().length&&(t.nodes().forEach(function(e,i){c.merge(t.nodes()[i]),e.isParent()||(p.nodeIndexes.set(t.nodes()[i].id(),u++),p.xCoords.push(t.nodes()[0].position().x),p.yCoords.push(t.nodes()[0].position().y))}),f.push(e))}),1<c.length){g=c.boundingBox(),l.push({x:g.x1+g.w/2,y:g.y1+g.h/2}),h.push(c),n.push(p);for(var m=f.length-1;0<=m;m--)h.splice(f[m],1),n.splice(f[m],1),l.splice(f[m],1)}}h.forEach(function(e,i){t.eles=e,r.push(s(t,n[i])),o.relocateComponent(l[i],r[i],t)})}else h.forEach(function(e,i){o.relocateComponent(l[i],n[i],t)});var y,v,E,N,T=new Set;1<h.length&&(y=[],v=i.filter(function(t){return"none"==t.css("display")}),h.forEach(function(e,i){var a,s,h=void 0;"draft"==t.quality&&(h=n[i].nodeIndexes),0<e.nodes().not(v).length&&(a={edges:[],nodes:[]},s=void 0,e.nodes().not(v).forEach(function(e){var l;"draft"==t.quality?e.isParent()?(l=o.calcBoundingBox(e,n[i].xCoords,n[i].yCoords,h),a.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})):(s=h.get(e.id()),a.nodes.push({x:n[i].xCoords[s]-e.boundingbox().w/2,y:n[i].yCoords[s]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h})):r[i][e.id()]&&a.nodes.push({x:r[i][e.id()].getLeft(),y:r[i][e.id()].getTop(),width:r[i][e.id()].getWidth(),height:r[i][e.id()].getHeight()})}),e.edges().forEach(function(e){var s,l,d,g,c,u=e.source();e=e.target();"none"!=u.css("display")&&"none"!=e.css("display")&&("draft"==t.quality?(s=h.get(u.id()),l=h.get(e.id()),d=[],g=[],u.isParent()?(c=o.calcBoundingBox(u,n[i].xCoords,n[i].yCoords,h),d.push(c.topLeftX+c.width/2),d.push(c.topLeftY+c.height/2)):(d.push(n[i].xCoords[s]),d.push(n[i].yCoords[s])),e.isParent()?(c=o.calcBoundingBox(e,n[i].xCoords,n[i].yCoords,h),g.push(c.topLeftX+c.width/2),g.push(c.topLeftY+c.height/2)):(g.push(n[i].xCoords[l]),g.push(n[i].yCoords[l])),a.edges.push({startX:d[0],startY:d[1],endX:g[0],endY:g[1]})):r[i][u.id()]&&r[i][e.id()]&&a.edges.push({startX:r[i][u.id()].getCenterX(),startY:r[i][u.id()].getCenterY(),endX:r[i][e.id()].getCenterX(),endY:r[i][e.id()].getCenterY()}))}),0<a.nodes.length)&&(y.push(a),T.add(i))}),E=d.packComponents(y,t.randomize).shifts,"draft"==t.quality?n.forEach(function(t,e){var i=t.xCoords.map(function(t){return t+E[e].dx}),n=t.yCoords.map(function(t){return t+E[e].dy});t.xCoords=i,t.yCoords=n}):(N=0,T.forEach(function(t){Object.keys(r[t]).forEach(function(e){(e=r[t][e]).setCenter(e.getCenterX()+E[N].dx,e.getCenterY()+E[N].dy)}),N++})))}else g=t.eles.boundingBox(),l.push({x:g.x1+g.w/2,y:g.y1+g.h/2}),t.randomize&&(d=a(t),n.push(d)),"default"==t.quality||"proof"==t.quality?(r.push(s(t,n[0])),o.relocateComponent(l[0],r[0],t)):o.relocateComponent(l[0],n[0],t);function A(e,i){var o,a,s,h;return"default"==t.quality||"proof"==t.quality?(a=o=void 0,s=(e="number"==typeof e?i:e).data("id"),r.forEach(function(t){s in t&&(o={x:t[s].getRect().getCenterX(),y:t[s].getRect().getCenterY()},a=t[s])}),t.nodeDimensionsIncludeLabels&&(a.labelWidth&&("left"==a.labelPosHorizontal?o.x+=a.labelWidth/2:"right"==a.labelPosHorizontal&&(o.x-=a.labelWidth/2)),a.labelHeight)&&("top"==a.labelPosVertical?o.y+=a.labelHeight/2:"bottom"==a.labelPosVertical&&(o.y-=a.labelHeight/2)),{x:(o=null==o?{x:e.position("x"),y:e.position("y")}:o).x,y:o.y}):(h=void 0,n.forEach(function(t){var i=t.nodeIndexes.get(e.id());null!=i&&(h={x:t.xCoords[i],y:t.yCoords[i]})}),{x:(h=null==h?{x:e.position("x"),y:e.position("y")}:h).x,y:h.y})}"default"==t.quality||"proof"==t.quality||t.randomize?(g=o.calcParentsWithoutChildren(e,i),d=i.filter(function(t){return"none"==t.css("display")}),t.eles=i.not(d),i.nodes().not(":parent").not(d).layoutPositions(this,t,A),0<g.length&&g.forEach(function(t){t.position(A(t))})):console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),i=l;function l(t){if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");this.options=r({},h,t)}t.exports=i},657:(t,e,i)=>{var n=i(548),r=i(140).layoutBase.Matrix,o=i(140).layoutBase.SVD;t.exports={spectralLayout:function(t){for(var e=t.cy,i=t.eles,a=i.nodes(),s=i.nodes(":parent"),h=new Map,l=new Map,d=new Map,g=[],c=[],u=[],p=[],f=[],m=[],y=[],v=[],E=void 0,N=1e8,T=t.piTol,A=t.samplingType,w=t.nodeSeparation,I=void 0,C=function(t,e,i){for(var n,r=[],o=0,a=0,s=[],h=0,d=1,c=0;c<E;c++)s[c]=N;for(s[r[a]=t]=0;o<=a;){for(var u=r[o++],p=g[u],y=0;y<p.length;y++)s[n=l.get(p[y])]==N&&(s[n]=s[u]+1,r[++a]=n);m[u][e]=s[u]*w}if(i){for(var v=0;v<E;v++)m[v][e]<f[v]&&(f[v]=m[v][e]);for(var T=0;T<E;T++)f[T]>h&&(h=f[T],d=T)}return d},L=function(t){var e=void 0;if(t){e=Math.floor(Math.random()*E);for(var i=0;i<E;i++)f[i]=N;for(var n=0;n<I;n++)p[n]=e,e=C(e,n,t)}else{for(var r=0,o=!1;r<I;){for(var a=Math.floor(Math.random()*E),s=(o=!1,0);s<r;s++)if(p[s]==a){o=!0;break}o||(p[r]=a,r++)}for(var h=0;h<I;h++)C(p[h],h,t)}for(var l=0;l<E;l++)for(var d=0;d<I;d++)m[l][d]*=m[l][d];for(var g=0;g<I;g++)y[g]=[];for(var c=0;c<I;c++)for(var u=0;u<I;u++)y[c][u]=m[p[u]][c]},_=(n.connectComponents(e,i,n.getTopMostNodes(a),h),s.forEach(function(t){n.connectComponents(e,i,n.getTopMostNodes(t.descendants().intersection(i)),h)}),0),M=0;M<a.length;M++)a[M].isParent()||l.set(a[M].id(),_++);var x=!0,O=!1,D=void 0;try{for(var b,R=h.keys()[Symbol.iterator]();!(x=(b=R.next()).done);x=!0){var F=b.value;l.set(F,_++)}}catch(t){O=!0,D=t}finally{try{!x&&R.return&&R.return()}finally{if(O)throw D}}for(var G=0;G<l.size;G++)g[G]=[];s.forEach(function(t){for(var e=t.children().intersection(i);0==e.nodes(":childless").length;)e=e.nodes()[0].children().intersection(i);var n=0,r=e.nodes(":childless")[0].connectedEdges().length;e.nodes(":childless").forEach(function(t,e){t.connectedEdges().length<r&&(r=t.connectedEdges().length,n=e)}),d.set(t.id(),e.nodes(":childless")[n].id())}),a.forEach(function(t){var e=t.isParent()?l.get(d.get(t.id())):l.get(t.id());t.neighborhood().nodes().forEach(function(n){0<i.intersection(t.edgesWith(n)).length&&(n.isParent()?g[e].push(d.get(n.id())):g[e].push(n.id()))})});var S=!0;O=!1,D=void 0;try{for(var P,U=h.keys()[Symbol.iterator]();!(S=(P=U.next()).done);S=!0)(t=>{var i=l.get(t),n=void 0;h.get(t).forEach(function(r){n=e.getElementById(r).isParent()?d.get(r):r,g[i].push(n),g[l.get(n)].push(t)})})(P.value)}catch(t){O=!0,D=t}finally{try{!S&&U.return&&U.return()}finally{if(O)throw D}}if(2<(E=l.size)){I=E<t.sampleSize?E:t.sampleSize;for(var Y=0;Y<E;Y++)m[Y]=[];for(var k=0;k<I;k++)v[k]=[];if("draft"==t.quality||"all"==t.step){L(A);for(var H=(s=o.svd(y)).S,X=(O=s.U,s=s.V,H[0]*H[0]*H[0]),z=[],B=0;B<I;B++){z[B]=[];for(var V=0;V<I;V++)z[B][V]=0,B==V&&(z[B][V]=H[B]/(H[B]*H[B]+X/(H[B]*H[B])))}v=r.multMat(r.multMat(s,z),r.transpose(O));for(var W=void 0,j=void 0,q=[],$=[],Z=[],Q=[],J=0;J<E;J++)q[J]=Math.random(),$[J]=Math.random();q=r.normalize(q),$=r.normalize($);for(var K=1e-9,tt=1e-9,et=void 0;;){for(var it=0;it<E;it++)Z[it]=q[it];if(q=r.multGamma(r.multL(r.multGamma(Z),m,v)),W=r.dotProduct(Z,q),q=r.normalize(q),K=r.dotProduct(Z,q),(et=Math.abs(K/tt))<=1+T&&1<=et)break;tt=K}for(var nt=0;nt<E;nt++)Z[nt]=q[nt];for(tt=1e-9;;){for(var rt=0;rt<E;rt++)Q[rt]=$[rt];if(Q=r.minusOp(Q,r.multCons(Z,r.dotProduct(Z,Q))),$=r.multGamma(r.multL(r.multGamma(Q),m,v)),j=r.dotProduct(Q,$),$=r.normalize($),K=r.dotProduct(Q,$),(et=Math.abs(K/tt))<=1+T&&1<=et)break;tt=K}for(var ot=0;ot<E;ot++)Q[ot]=$[ot];c=r.multCons(Z,Math.sqrt(Math.abs(W))),u=r.multCons(Q,Math.sqrt(Math.abs(j)))}else l.forEach(function(t,i){c.push(e.getElementById(i).position("x")),u.push(e.getElementById(i).position("y"))});return{nodeIndexes:l,xCoords:c,yCoords:u}}return D=l.keys(),A=(L=e.getElementById(D.next().value)).position(),s=L.outerWidth(),c.push(A.x),u.push(A.y),2==E&&(O=e.getElementById(D.next().value).outerWidth(),c.push(A.x+s/2+O/2+t.idealEdgeLength),u.push(A.y)),{nodeIndexes:l,xCoords:c,yCoords:u}}}},579:(t,e,i)=>{function n(t){t&&t("layout","fcose",r)}var r=i(212);"undefined"!=typeof cytoscape&&n(cytoscape),t.exports=n},140:e=>{e.exports=t}},i={},function t(n){var r=i[n];return void 0===r&&(r=i[n]={exports:{}},e[n](r,r.exports,t)),r.exports}(579);var e,i},D.exports=t(F())})();var G=M(D.exports),S={L:"left",R:"right",T:"top",B:"bottom"},P={L:d(t=>t+`,${t/2} 0,${t} 0,0`,"L"),R:d(t=>`0,${t/2} ${t},0 ${t},`+t,"R"),T:d(t=>`0,0 ${t},0 ${t/2},`+t,"T"),B:d(t=>t/2+`,0 ${t},${t} 0,`+t,"B")},U={L:d((t,e)=>t-e+2,"L"),R:d((t,e)=>t-2,"R"),T:d((t,e)=>t-e+2,"T"),B:d((t,e)=>t-2,"B")},Y=d(function(t){return H(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),k=d(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),H=d(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),X=d(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),z=d(function(t,e){var i=H(t)&&X(e);t=X(t)&&H(e);return i||t},"isArchitectureDirectionXY"),B=d(function(t){var e=t[0],i=(t=t[1],H(e)&&X(t));e=X(e)&&H(t);return i||e},"isArchitecturePairXY"),V=d(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),W=d(function(t,e){return V(t=""+t+e)?t:void 0},"getArchitectureDirectionPair"),j=d(function([t,e],i){var n=i[0];i=i[1];return H(n)?X(i)?[t+("L"===n?-1:1),e+("T"===i?1:-1)]:[t+("L"===n?-1:1),e]:H(i)?[t+("L"===i?1:-1),e+("T"===n?1:-1)]:[t,e+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),q=d(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),$=d(function(t,e){return z(t,e)?"bend":H(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Z=d(function(t){return"service"===t.type},"isArchitectureService"),Q=d(function(t){return"junction"===t.type},"isArchitectureJunction"),J=d(t=>t.data(),"edgeData"),K=d(t=>t.data(),"nodeData"),tt=n.architecture,et=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=r,this.getAccTitle=o,this.setDiagramTitle=a,this.getDiagramTitle=s,this.getAccDescription=h,this.setAccDescription=l,this.clear()}static{d(this,"ArchitectureDB")}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",g()}addService({id:t,icon:e,in:i,title:n,iconText:r}){if(void 0!==this.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another `+this.registeredIds[t]);if(void 0!==i){if(t===i)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[i])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[i])throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:e,iconText:r,title:n,edges:[],in:i}}getServices(){return Object.values(this.nodes).filter(Z)}addJunction({id:t,in:e}){if(void 0!==this.registeredIds[t])throw new Error(`The junction id [${t}] is already in use by another `+this.registeredIds[t]);if(void 0!==e){if(t===e)throw new Error(`The junction [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[e])throw new Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[e])throw new Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:e}}getJunctions(){return Object.values(this.nodes).filter(Q)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:e,in:i,title:n}){if(void 0!==this.registeredIds?.[t])throw new Error(`The group id [${t}] is already in use by another `+this.registeredIds[t]);if(void 0!==i){if(t===i)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===this.registeredIds?.[i])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[i])throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:e,title:n,in:i}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:e,lhsDir:i,rhsDir:n,lhsInto:r,rhsInto:o,lhsGroup:a,rhsGroup:s,title:h}){if(!k(i))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+String(i));if(!k(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+String(n));if(void 0===this.nodes[t]&&void 0===this.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[e]&&void 0===this.groups[e])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);var l=this.nodes[t].in,d=this.nodes[e].in;if(a&&l&&d&&l==d)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&d&&l==d)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:t,lhsDir:i,lhsInto:r,lhsGroup:a,rhsId:e,rhsDir:n,rhsInto:o,rhsGroup:s,title:h}),this.nodes[t]&&this.nodes[e]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[e].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(t){if(t.members.length<2)throw new Error("An align directive requires at least two members; got "+t.members.length);let e=new Set;t.members.forEach(i=>{if("node"!==this.registeredIds[i])throw new Error(`align ${t.direction} references [${i}], which is not a service or junction`);if(e.has(i))throw new Error(`align ${t.direction} lists [${i}] more than once`);e.add(i)}),this.layoutHints.push(t)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(void 0===this.dataStructures){let i={},n=Object.entries(this.nodes).reduce((t,[e,n])=>(t[e]=n.edges.reduce((t,n)=>{var r,o=this.getNode(n.lhsId)?.in,a=this.getNode(n.rhsId)?.in;return o&&a&&o!==a&&"bend"!==(r=$(n.lhsDir,n.rhsDir))&&(i[o]??={},i[o][a]=r,i[a]??={},i[a][o]=r),n.lhsId===e?(a=W(n.lhsDir,n.rhsDir))&&(t[a]=n.rhsId):(o=W(n.rhsDir,n.lhsDir))&&(t[o]=n.lhsId),t},{}),t),{}),r=Object.keys(n)[0],o={[r]:1},a=Object.keys(n).reduce((t,e)=>e===r?t:{...t,[e]:1},{});for(var t=d(t=>{let e={[t]:[0,0]},i=[t];for(;0<i.length;){var r=i.shift();if(r){o[r]=1,delete a[r];var s=n[r];let[t,h]=e[r];Object.entries(s).forEach(([n,r])=>{o[r]||(e[r]=j([t,h],n),i.push(r))})}}return e},"BFS"),e=[t(r)];0<Object.keys(a).length;)e.push(t(Object.keys(a)[0]));this.dataStructures={adjList:n,spatialMaps:e,groupAlignments:i}}return this.dataStructures}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}getConfig(){return c({...tt,...u().architecture})}getConfigField(t){return this.getConfig()[t]}},it=d((t,e)=>{i(t,e),t.groups.map(t=>e.addGroup(t)),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(t=>e.addEdge(t)),t.alignments?.map(t=>e.addLayoutHint({direction:t.direction,members:[...t.members]}))},"populateDb"),nt={parser:{yy:void 0},parse:d(async t=>{t=await C("architecture",t);var e=(m.debug(t),nt.parser?.yy);if(!(e instanceof et))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");it(t,e)},"parse")},rt=d(t=>`\n .edge {\n stroke-width: ${t.archEdgeWidth};\n stroke: ${t.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${t.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${t.archGroupBorderColor};\n stroke-width: ${t.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`,"getStyles"),ot=rt;function at(t,e){if(0===t)return e();var i=Math.random;let n=t>>>0;Math.random=function(){var t=n=n+1831565813>>>0;t=Math.imul(t^t>>>15,1|t);return(((t^=t+Math.imul(t^t>>>7,61|t))^t>>>14)>>>0)/4294967296};try{return e()}finally{Math.random=i}}d(at,"withSeededRandom");var st=d(t=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${t}</g>`,"wrapIcon"),ht={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:st('<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:st('<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:st('<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:st('<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:st('<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:p,blank:{body:st("")}}},lt=d(async function(t,e,i,n){let r=i.getConfigField("padding");var o=i.getConfigField("iconSize");let a=o/2,s=o/6,h=s/2;await Promise.all(e.edges().map(async e=>{var{source:o,sourceDir:l,sourceArrow:d,sourceGroup:g,target:c,targetDir:u,targetArrow:p,targetGroup:f,label:m}=J(e);let{x:y,y:v}=e[0].sourceEndpoint();var{x:E,y:w}=e[0].midpoint();let{x:I,y:C}=e[0].targetEndpoint();var L=r+4;if(g&&(H(l)?y+="L"===l?-L:L:v+="T"===l?-L:L+18),f&&(H(u)?I+="L"===u?-L:L:C+="T"===u?-L:L+18),g||"junction"!==i.getNode(o)?.type||(H(l)?y+="L"===l?a:-a:v+="T"===l?a:-a),f||"junction"!==i.getNode(c)?.type||(H(u)?I+="L"===u?a:-a:C+="T"===u?a:-a),e[0]._private.rscratch&&((L=t.insert("g")).insert("path").attr("d",`M ${y},${v} L ${E},${w} L${I},${C} `).attr("class","edge").attr("id",n+"-"+N(o,c,{prefix:"L"})),d&&(g=H(l)?U[l](y,s):y-h,f=X(l)?U[l](v,s):v-h,L.insert("polygon").attr("points",P[l](s)).attr("transform",`translate(${g},${f})`).attr("class","arrow")),p&&(e=H(u)?U[u](I,s):I-h,o=X(u)?U[u](C,s):C-h,L.insert("polygon").attr("points",P[u](s)).attr("transform",`translate(${e},${o})`).attr("class","arrow")),m)){let t=0;t="X"==(c=z(l,u)?"XY":H(l)?"X":"Y")?Math.abs(y-I):"Y"==c?Math.abs(v-C)/1.5:Math.abs(y-I)/2,d=L.append("g"),await T(d,m,{useHtmlLabels:!1,width:t,classes:"architecture-service-label"},A()),d.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"==c?d.attr("transform","translate("+E+", "+w+")"):"Y"==c?d.attr("transform","translate("+E+", "+w+") rotate(-90)"):"XY"==c&&(g=W(l,u))&&B(g)&&(f=d.node().getBoundingClientRect(),[p,e]=q(g),d.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*p*e*45})`),o=d.node().getBoundingClientRect(),d.attr("transform",`\n translate(${E}, ${w-f.height/2})\n translate(${p*o.width/2}, ${e*o.height/2})\n rotate(${-1*p*e*45}, 0, ${f.height/2})\n `))}}))},"drawEdges"),dt=d(async function(t,e,i,n){let r=.75*i.getConfigField("padding"),o=i.getConfigField("fontSize"),a=i.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async e=>{var s=K(e);if("group"===s.type){var{h:e,w:h,x1:l,y1:d}=e.boundingBox(),g=t.append("rect");e=(g.attr("id",n+"-group-"+s.id).attr("x",l+a).attr("y",d+a).attr("width",h).attr("height",e).attr("class","node-bkg"),t.append("g"));let c=l,u=d;s.icon&&((l=e.append("g")).html(`<g>${await w(s.icon,{height:r,width:r,fallbackPrefix:ht.prefix})}</g>`),l.attr("transform","translate("+(c+a+1)+", "+(u+a+1)+")"),c+=r,u+=o/2-1-2),s.label&&(d=e.append("g"),await T(d,s.label,{useHtmlLabels:!1,width:h,classes:"architecture-service-label"},A()),d.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),d.attr("transform","translate("+(c+a+4)+", "+(u+a+2)+")")),i.setElementForId(s.id,g)}}))},"drawGroups"),gt=d(async function(t,e,i,n){var r,o=A();for(r of i){var a=e.append("g"),s=t.getConfigField("iconSize"),h=(r.title&&(h=a.append("g"),await T(h,r.title,{useHtmlLabels:!1,width:1.5*s,classes:"architecture-service-label"},o),h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),h.attr("transform","translate("+s/2+", "+s+")")),a.append("g")),{width:l,height:d}=(r.icon?h.html(`<g>${await w(r.icon,{height:s,width:s,fallbackPrefix:ht.prefix})}</g>`):r.iconText?(h.html(`<g>${await w("blank",{height:s,width:s,fallbackPrefix:ht.prefix})}</g>`),l=h.append("g").append("foreignObject").attr("width",s).attr("height",s).append("div").attr("class","node-icon-text").attr("style",`height: ${s}px;`).append("div").html(I(r.iconText,o)),d=parseInt(window.getComputedStyle(l.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,l.attr("style",`-webkit-line-clamp: ${Math.floor((s-2)/d)};`)):h.append("path").attr("class","node-bkg").attr("id",n+"-node-"+r.id).attr("d",`M0,${s} V5 Q0,0 5,0 H${s-5} Q${s},0 ${s},5 V${s} Z`),a.attr("id",n+"-service-"+r.id).attr("class","architecture-service"),a.node().getBBox());r.width=l,r.height=d,t.setElementForId(r.id,a)}return 0},"drawServices"),ct=d(function(t,e,i,n){i.forEach(i=>{var r=e.append("g"),o=t.getConfigField("iconSize"),{width:o,height:a}=(r.append("g").append("rect").attr("id",n+"-node-"+i.id).attr("fill-opacity","0").attr("width",o).attr("height",o),r.attr("class","architecture-junction"),r._groups[0][0].getBBox());r.width=o,r.height=a,t.setElementForId(i.id,r)})},"drawJunctions");function ut(t,e,i){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:i.getConfigField("iconSize"),height:i.getConfigField("iconSize")},classes:"node-service"})})}function pt(t,e,i){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:i.getConfigField("iconSize"),height:i.getConfigField("iconSize")},classes:"node-junction"})})}function ft(t,e){e.nodes().map(e=>{var i=K(e);"group"!==i.type&&(i.x=e.position().x,i.y=e.position().y,t.getElementById(i.id).attr("transform","translate("+(i.x||0)+","+(i.y||0)+")"))})}function mt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function yt(t,e){t.forEach(t=>{var{lhsId:i,rhsId:n,lhsInto:r,lhsGroup:o,rhsInto:a,lhsDir:s,rhsDir:h,rhsGroup:l,title:d}=t;t=z(t.lhsDir,t.rhsDir)?"segments":"straight";e.add({group:"edges",data:{id:i+"-"+n,label:d,source:i,sourceDir:s,sourceArrow:r,sourceGroup:o,sourceEndpoint:"L"===s?"0 50%":"R"===s?"100% 50%":"T"===s?"50% 0":"50% 100%",target:n,targetDir:h,targetArrow:a,targetGroup:l,targetEndpoint:"L"===h?"0 50%":"R"===h?"100% 50%":"T"===h?"50% 0":"50% 100%"},classes:t})})}function vt(t,e,i,n=[]){let r=d((t,e)=>Object.entries(t).reduce((t,[n,r])=>{let o=0;var a=Object.entries(r);if(1===a.length)t[n]=a[0][1];else for(let r=0;r<a.length-1;r++)for(let g=r+1;g<a.length;g++){var[s,h]=a[r],[l,d]=a[g];i[s]?.[l]===e||"default"===s||"default"===l?(t[n]??=[],t[n]=[...t[n],...h,...d]):(t[n+"-"+o++]=h,t[n+"-"+o++]=d)}return t},{}),"flattenAlignments");var[e,o]=e.map(e=>{let i={},n={};return Object.entries(e).forEach(([e,[r,o]])=>{var a=t.getNode(e)?.in??"default";i[o]??={},i[o][a]??=[],i[o][a].push(e),n[r]??={},n[r][a]??=[],n[r][a].push(e)}),{horiz:Object.values(r(i,"horizontal")).filter(t=>1<t.length),vert:Object.values(r(n,"vertical")).filter(t=>1<t.length)}}).reduce(([t,e],{horiz:i,vert:n})=>[[...t,...i],[...e,...n]],[[],[]]);let a=new Set;n.forEach(t=>t.members.forEach(t=>a.add(t)));var s=d(t=>t.filter(t=>!t.some(t=>a.has(t))),"dropOverlapping");let h=s(e),l=s(o);return n.forEach(t=>{t.members.length<2||("row"===t.direction?h:l).push([...t.members])}),{horizontal:h,vertical:l}}function Et(t,e,i=[]){let n=[],r=e.getConfigField("iconSize"),o=e.getConfigField("idealEdgeLengthMultiplier"),a=o*r,s=new Set,h=(i.forEach(t=>{for(let r=0;r<t.members.length-1;r++){var e=t.members[r],i=t.members[r+1];s.add(e+"|"+i),s.add(i+"|"+e),"row"===t.direction?n.push({left:e,right:i,gap:a}):n.push({top:e,bottom:i,gap:a})}}),d(t=>t[0]+","+t[1],"posToStr")),l=d(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{let e=Object.fromEntries(Object.entries(t).map(([t,e])=>[h(e),t])),i=[h([0,0])],a={};for(var d={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};0<i.length;){var g=i.shift();if(g){a[g]=1;let t=e[g];if(t){let c=l(g);Object.entries(d).forEach(([l,d])=>{d=h([c[0]+d[0],c[1]+d[1]]);var g=e[d];g&&!a[d]&&(i.push(d),s.has(t+"|"+g)||n.push({[S[l]]:g,[S[Y(l)]]:t,gap:o*r}))})}}}}),n}function Nt(t,e,i,n,r,{spatialMaps:o,groupAlignments:a}){return new Promise(s=>{var h=y("body").append("div").attr("id","cy").attr("style","display:none");let l=L({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":r.getConfigField("fontSize")+"px"}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:r.getConfigField("padding")+"px"}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});h.remove(),mt(i,l),ut(t,l,r),pt(e,l,r),yt(n,l);h=r.getLayoutHints();var g=vt(r,o,a,h),c=(h=Et(o,r,h),r.getConfigField("iconSize"));let u=r.getConfigField("idealEdgeLengthMultiplier")*c,p=.5*c,f=r.getConfigField("edgeElasticity"),v=r.getConfigField("seed"),E=l.layout({name:"fcose",quality:"proof",randomize:r.getConfigField("randomize"),nodeSeparation:r.getConfigField("nodeSeparation"),numIter:r.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){var e,[t,e]=t.connectedNodes();return(t=K(t).parent)===(e=K(e).parent)?u:p},edgeElasticity(t){var e,[t,e]=t.connectedNodes();return(t=K(t).parent)===(e=K(e).parent)?f:.001},alignmentConstraint:g,relativePlacementConstraint:h});E.one("layoutstop",()=>{function t(t,e,i,n){var{x:t,y:r}=t,{x:e,y:o}=e,a=(n-r+(t-i)*(r-o)/(t-e))/Math.sqrt(1+Math.pow((r-o)/(t-e),2)),s=Math.sqrt(Math.pow(n-r,2)+Math.pow(i-t,2)-Math.pow(a,2));s/=Math.sqrt(Math.pow(e-t,2)+Math.pow(o-r,2));let h=(e-t)*(n-r)-(o-r)*(i-t);switch(!0){case 0<=h:h=1;break;case h<0:h=-1}let l=(e-t)*(i-t)+(o-r)*(n-r);switch(!0){case 0<=l:l=1;break;case l<0:l=-1}return{distances:Math.abs(a)*h,weights:s*=l}}for(var e of(d(t,"getSegmentWeights"),l.startBatch(),Object.values(l.edges()))){var i,n,r,o;e.data?.()&&(({x:r,y:n}=e.source().position()),({x:o,y:i}=e.target().position()),r!==o)&&n!==i&&(r=e.sourceEndpoint(),o=e.targetEndpoint(),n=J(e).sourceDir,[i,n]=X(n)?[r.x,o.y]:[o.x,r.y],({weights:r,distances:o}=t(r,o,i,n)),e.style("segment-distances",o),e.style("segment-weights",r))}l.endBatch(),at(v,()=>E.run())});try{at(v,()=>E.run())}catch(h){if(h instanceof RangeError&&h.message.includes("Invalid array length"))throw new Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis.");throw h}l.ready(t=>{m.info("Ready",t),s(l)})})}f([{name:ht.prefix,icons:ht}]),L.use(G),d(ut,"addServices"),d(pt,"addJunctions"),d(ft,"positionNodes"),d(mt,"addGroups"),d(yt,"addEdges"),d(vt,"getAlignments"),d(Et,"getRelativeConstraints"),d(Nt,"layoutArchitecture");var Tt=d(async(t,e,i,n)=>{var r=((n=n.db).setDiagramId(e),n.getServices()),o=n.getJunctions(),a=n.getGroups(),s=n.getEdges(),h=n.getDataStructures(),l=v(e),d=l.append("g"),g=((c=(d.attr("class","architecture-edges"),l.append("g"))).attr("class","architecture-services"),l.append("g")),c=(g.attr("class","architecture-groups"),await gt(n,c,r,e),ct(n,c,o,e),await Nt(r,o,a,s,n,h));await lt(d,c,n,e),await dt(g,c,n,e),ft(n,c),E(void 0,l,n.getConfigField("padding"),n.getConfigField("useMaxWidth"))},"draw"),At={draw:Tt},wt={parser:nt,get db(){return new et},renderer:At,styles:ot};export{wt as diagram};
|