@wzh-/ai-chat-example 1.0.0 → 1.0.2
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/dist/App.vue.d.ts +2 -0
- package/dist/_basePickBy-CkZky1V-.js +135 -0
- package/dist/_baseUniq-f11MNaXe.js +573 -0
- package/dist/abap--jVlqvLx.js +2 -0
- package/dist/actionscript-3-N1AoJtTA.js +2 -0
- package/dist/ada-CYGINLea.js +2 -0
- package/dist/andromeeda-CvsZnG9k.js +2 -0
- package/dist/angular-html-C5vmpet2.js +14 -0
- package/dist/angular-html-CLTv4jM9.js +5 -0
- package/dist/angular-ts-BKqJWrwt.js +19 -0
- package/dist/apache-D6X-_dyJ.js +2 -0
- package/dist/apex-C7VgAgAE.js +2 -0
- package/dist/apl-BcJs32yU.js +15 -0
- package/dist/applescript-DN64Su6U.js +2 -0
- package/dist/ara-Dm1jHrgg.js +2 -0
- package/dist/arc-Dh_0vvHo.js +78 -0
- package/dist/architecture-U656AL7Q-BqUSHYp0.js +8 -0
- package/dist/architectureDiagram-VXUJARFQ-BQvEdgpc.js +4053 -0
- package/dist/array-CkdOJbdT.js +5 -0
- package/dist/asciidoc-BpqtqRF5.js +2 -0
- package/dist/asm-DUGlKYIq.js +2 -0
- package/dist/astro-q-huTQEP.js +16 -0
- package/dist/aurora-x-DwOih-un.js +2 -0
- package/dist/awk-DcnVbJrN.js +2 -0
- package/dist/ayu-dark-Bd-89MKE.js +2 -0
- package/dist/ballerina-BQVdQd9X.js +2 -0
- package/dist/bash-DI_p7w58.js +2 -0
- package/dist/bat-juB1J52r.js +2 -0
- package/dist/beancount-ThxIlRc3.js +2 -0
- package/dist/berry-qC18BfC_.js +2 -0
- package/dist/bibtex-CahMDY_0.js +2 -0
- package/dist/bicep-CHLBKS47.js +2 -0
- package/dist/blade-Ckff5WJQ.js +19 -0
- package/dist/blockDiagram-VD42YOAC-DKkDshq3.js +3013 -0
- package/dist/bsl-BTNab0FD.js +3 -0
- package/dist/c-BYDGkYzS.js +2 -0
- package/dist/c-CX6yudYR.js +2 -0
- package/dist/c4Diagram-YG6GDRKO-KsGqOrVB.js +2955 -0
- package/dist/cadence-DA5J9-Di.js +2 -0
- package/dist/cairo-DUZgbTPW.js +3 -0
- package/dist/catppuccin-frappe-CE3kxG1f.js +2 -0
- package/dist/catppuccin-latte-DW2FXeIv.js +2 -0
- package/dist/catppuccin-macchiato-CD5qjRSF.js +2 -0
- package/dist/catppuccin-mocha-BYwVJvjI.js +2 -0
- package/dist/channel-BrxVk5HC.js +3 -0
- package/dist/chunk-4BX2VUAB-BGxl5VGr.js +6 -0
- package/dist/chunk-55IACEB6-CDMD5yu1.js +6 -0
- package/dist/chunk-76Q3JFCE-Db4Lkmow.js +19 -0
- package/dist/chunk-ABZYJK2D-BZvlc6Ej.js +2515 -0
- package/dist/chunk-ATLVNIR6-C3g7rsIT.js +65 -0
- package/dist/chunk-B4BG7PRW-Dx-bGI1r.js +3108 -0
- package/dist/chunk-CVBHYZKI-DxEBlSK7.js +10 -0
- package/dist/chunk-DI55MBZ5-CCWuZnfW.js +1994 -0
- package/dist/chunk-DNh5sLlG.js +18 -0
- package/dist/chunk-EXTU4WIE-BjMX7pAs.js +7 -0
- package/dist/chunk-FMBD7UC4-Dj3Ok4Bk.js +3 -0
- package/dist/chunk-FPAJGGOC-nWbO3e1v.js +12252 -0
- package/dist/chunk-FWNWRKHM-CjcwRw2u.js +56 -0
- package/dist/chunk-HN2XXSSU-Lv4Ef0co.js +74 -0
- package/dist/chunk-JA3XYJ7Z-Dhh1_u_p.js +463 -0
- package/dist/chunk-JZLCHNYA-vrb_Ucuc.js +4861 -0
- package/dist/chunk-LBM3YZW2-D8lrIfGo.js +19 -0
- package/dist/chunk-LHMN2FUI-DLQ0i8hl.js +19 -0
- package/dist/chunk-MI3HLSF2-Dy6F9XgR.js +1140 -0
- package/dist/chunk-N4CR4FBY-BdaGxHlZ.js +39 -0
- package/dist/chunk-O7ZBX7Z2-D8Yaukr5.js +26 -0
- package/dist/chunk-QN33PNHL-DnPw7tni.js +23 -0
- package/dist/chunk-QXUST7PY-D9mGQ-UP.js +486 -0
- package/dist/chunk-QZHKN3VN-ClanGuXA.js +11 -0
- package/dist/chunk-S3R3BYOJ-DHTsHczu.js +1074 -0
- package/dist/chunk-S6J4BHB3-8RrHs9bD.js +19 -0
- package/dist/chunk-T53DSG4Q-C2BDA_QX.js +24 -0
- package/dist/chunk-TZMSLE5B-F4nHm7N1.js +55 -0
- package/dist/chunk-XAJISQIX-Bz7ki7DY.js +135 -0
- package/dist/clarity-CsFOkG3c.js +2 -0
- package/dist/classDiagram-2ON5EDUG-C_ZEMlKu.js +33 -0
- package/dist/classDiagram-v2-WZHVMYZB-BHb5nZOM.js +33 -0
- package/dist/clojure-u1TZmmdQ.js +2 -0
- package/dist/clone-BRioDvRr.js +7 -0
- package/dist/cmake-CA3Lfsq7.js +2 -0
- package/dist/cmake-K1k8HMYR.js +2 -0
- package/dist/cobol-DhzLzJib.js +10 -0
- package/dist/codeowners-l4eSxhtA.js +2 -0
- package/dist/codeql-5CeQaktT.js +2 -0
- package/dist/coffee-P21KTKMu.js +3 -0
- package/dist/common-lisp-BVttGbYJ.js +2 -0
- package/dist/components/ChatConversation/ChatConversation.vue.d.ts +7 -0
- package/dist/components/ChatConversation/index.d.ts +1 -0
- package/dist/components/ChatPromptInputProvider/ChatPromptInputProvider.vue.d.ts +17 -0
- package/dist/components/ChatPromptInputProvider/index.d.ts +1 -0
- package/dist/components/ai-elements/artifact/Artifact.vue.d.ts +21 -0
- package/dist/components/ai-elements/artifact/ArtifactAction.vue.d.ts +32 -0
- package/dist/components/ai-elements/artifact/ArtifactActions.vue.d.ts +21 -0
- package/dist/components/ai-elements/artifact/ArtifactClose.vue.d.ts +27 -0
- package/dist/components/ai-elements/artifact/ArtifactContent.vue.d.ts +21 -0
- package/dist/components/ai-elements/artifact/ArtifactDescription.vue.d.ts +21 -0
- package/dist/components/ai-elements/artifact/ArtifactHeader.vue.d.ts +21 -0
- package/dist/components/ai-elements/artifact/ArtifactTitle.vue.d.ts +21 -0
- package/dist/components/ai-elements/artifact/index.d.ts +8 -0
- package/dist/components/ai-elements/canvas/index.d.ts +1 -0
- package/dist/components/ai-elements/chain-of-thought/ChainOfThought.vue.d.ts +30 -0
- package/dist/components/ai-elements/chain-of-thought/ChainOfThoughtContent.vue.d.ts +21 -0
- package/dist/components/ai-elements/chain-of-thought/ChainOfThoughtHeader.vue.d.ts +21 -0
- package/dist/components/ai-elements/chain-of-thought/ChainOfThoughtImage.vue.d.ts +22 -0
- package/dist/components/ai-elements/chain-of-thought/ChainOfThoughtSearchResult.vue.d.ts +21 -0
- package/dist/components/ai-elements/chain-of-thought/ChainOfThoughtSearchResults.vue.d.ts +21 -0
- package/dist/components/ai-elements/chain-of-thought/ChainOfThoughtStep.vue.d.ts +28 -0
- package/dist/components/ai-elements/chain-of-thought/context.d.ts +6 -0
- package/dist/components/ai-elements/chain-of-thought/index.d.ts +7 -0
- package/dist/components/ai-elements/checkpoint/Checkpoint.vue.d.ts +21 -0
- package/dist/components/ai-elements/checkpoint/CheckpointIcon.vue.d.ts +21 -0
- package/dist/components/ai-elements/checkpoint/CheckpointTrigger.vue.d.ts +27 -0
- package/dist/components/ai-elements/checkpoint/index.d.ts +3 -0
- package/dist/components/ai-elements/code-block/CodeBlock.vue.d.ts +27 -0
- package/dist/components/ai-elements/code-block/CodeBlockCopyButton.vue.d.ts +30 -0
- package/dist/components/ai-elements/code-block/context.d.ts +5 -0
- package/dist/components/ai-elements/code-block/index.d.ts +2 -0
- package/dist/components/ai-elements/code-block/utils.d.ts +2 -0
- package/dist/components/ai-elements/confirmation/Confirmation.vue.d.ts +25 -0
- package/dist/components/ai-elements/confirmation/ConfirmationAccepted.vue.d.ts +17 -0
- package/dist/components/ai-elements/confirmation/ConfirmationAction.vue.d.ts +17 -0
- package/dist/components/ai-elements/confirmation/ConfirmationActions.vue.d.ts +21 -0
- package/dist/components/ai-elements/confirmation/ConfirmationRejected.vue.d.ts +17 -0
- package/dist/components/ai-elements/confirmation/ConfirmationRequest.vue.d.ts +17 -0
- package/dist/components/ai-elements/confirmation/ConfirmationTitle.vue.d.ts +21 -0
- package/dist/components/ai-elements/confirmation/context.d.ts +29 -0
- package/dist/components/ai-elements/confirmation/index.d.ts +7 -0
- package/dist/components/ai-elements/connection/Connection.vue.d.ts +3 -0
- package/dist/components/ai-elements/connection/index.d.ts +1 -0
- package/dist/components/ai-elements/context/Context.vue.d.ts +25 -0
- package/dist/components/ai-elements/context/ContextCacheUsage.vue.d.ts +21 -0
- package/dist/components/ai-elements/context/ContextContent.vue.d.ts +21 -0
- package/dist/components/ai-elements/context/ContextContentBody.vue.d.ts +21 -0
- package/dist/components/ai-elements/context/ContextContentFooter.vue.d.ts +21 -0
- package/dist/components/ai-elements/context/ContextContentHeader.vue.d.ts +21 -0
- package/dist/components/ai-elements/context/ContextIcon.vue.d.ts +2 -0
- package/dist/components/ai-elements/context/ContextInputUsage.vue.d.ts +21 -0
- package/dist/components/ai-elements/context/ContextOutputUsage.vue.d.ts +21 -0
- package/dist/components/ai-elements/context/ContextReasoningUsage.vue.d.ts +21 -0
- package/dist/components/ai-elements/context/ContextTrigger.vue.d.ts +17 -0
- package/dist/components/ai-elements/context/TokensWithCost.vue.d.ts +6 -0
- package/dist/components/ai-elements/context/context.d.ts +11 -0
- package/dist/components/ai-elements/context/index.d.ts +12 -0
- package/dist/components/ai-elements/controls/Controls.vue.d.ts +6 -0
- package/dist/components/ai-elements/controls/index.d.ts +1 -0
- package/dist/components/ai-elements/conversation/Conversation.vue.d.ts +47 -0
- package/dist/components/ai-elements/conversation/ConversationContent.vue.d.ts +21 -0
- package/dist/components/ai-elements/conversation/ConversationEmptyState.vue.d.ts +27 -0
- package/dist/components/ai-elements/conversation/ConversationScrollButton.vue.d.ts +6 -0
- package/dist/components/ai-elements/conversation/index.d.ts +4 -0
- package/dist/components/ai-elements/edge/Animated.vue.d.ts +4 -0
- package/dist/components/ai-elements/edge/Temporary.vue.d.ts +4 -0
- package/dist/components/ai-elements/edge/index.d.ts +2 -0
- package/dist/components/ai-elements/image/Image.vue.d.ts +8 -0
- package/dist/components/ai-elements/image/index.d.ts +1 -0
- package/dist/components/ai-elements/inline-citation/InlineCitation.vue.d.ts +21 -0
- package/dist/components/ai-elements/inline-citation/InlineCitationCard.vue.d.ts +24 -0
- package/dist/components/ai-elements/inline-citation/InlineCitationCardBody.vue.d.ts +21 -0
- package/dist/components/ai-elements/inline-citation/InlineCitationCardTrigger.vue.d.ts +7 -0
- package/dist/components/ai-elements/inline-citation/InlineCitationCarousel.vue.d.ts +21 -0
- package/dist/components/ai-elements/inline-citation/InlineCitationCarouselContent.vue.d.ts +17 -0
- package/dist/components/ai-elements/inline-citation/InlineCitationCarouselHeader.vue.d.ts +21 -0
- package/dist/components/ai-elements/inline-citation/InlineCitationCarouselIndex.vue.d.ts +21 -0
- package/dist/components/ai-elements/inline-citation/InlineCitationCarouselItem.vue.d.ts +21 -0
- package/dist/components/ai-elements/inline-citation/InlineCitationCarouselNext.vue.d.ts +6 -0
- package/dist/components/ai-elements/inline-citation/InlineCitationCarouselPrev.vue.d.ts +6 -0
- package/dist/components/ai-elements/inline-citation/InlineCitationQuote.vue.d.ts +21 -0
- package/dist/components/ai-elements/inline-citation/InlineCitationSource.vue.d.ts +24 -0
- package/dist/components/ai-elements/inline-citation/InlineCitationText.vue.d.ts +21 -0
- package/dist/components/ai-elements/inline-citation/index.d.ts +14 -0
- package/dist/components/ai-elements/loader/Loader.vue.d.ts +9 -0
- package/dist/components/ai-elements/loader/LoaderIcon.vue.d.ts +7 -0
- package/dist/components/ai-elements/loader/index.d.ts +2 -0
- package/dist/components/ai-elements/message/Message.vue.d.ts +23 -0
- package/dist/components/ai-elements/message/MessageAction.vue.d.ts +28 -0
- package/dist/components/ai-elements/message/MessageActions.vue.d.ts +21 -0
- package/dist/components/ai-elements/message/MessageAttachment.vue.d.ts +12 -0
- package/dist/components/ai-elements/message/MessageAttachments.vue.d.ts +21 -0
- package/dist/components/ai-elements/message/MessageAvatar.vue.d.ts +8 -0
- package/dist/components/ai-elements/message/MessageBranch.vue.d.ts +28 -0
- package/dist/components/ai-elements/message/MessageBranchContent.vue.d.ts +6 -0
- package/dist/components/ai-elements/message/MessageBranchNext.vue.d.ts +17 -0
- package/dist/components/ai-elements/message/MessageBranchPage.vue.d.ts +6 -0
- package/dist/components/ai-elements/message/MessageBranchPrevious.vue.d.ts +17 -0
- package/dist/components/ai-elements/message/MessageBranchSelector.vue.d.ts +21 -0
- package/dist/components/ai-elements/message/MessageContent.vue.d.ts +21 -0
- package/dist/components/ai-elements/message/MessageResponse.vue.d.ts +7 -0
- package/dist/components/ai-elements/message/MessageToolbar.vue.d.ts +21 -0
- package/dist/components/ai-elements/message/context.d.ts +11 -0
- package/dist/components/ai-elements/message/index.d.ts +15 -0
- package/dist/components/ai-elements/model-selector/ModelSelector.vue.d.ts +17 -0
- package/dist/components/ai-elements/model-selector/ModelSelectorContent.vue.d.ts +24 -0
- package/dist/components/ai-elements/model-selector/ModelSelectorDialog.vue.d.ts +17 -0
- package/dist/components/ai-elements/model-selector/ModelSelectorEmpty.vue.d.ts +17 -0
- package/dist/components/ai-elements/model-selector/ModelSelectorGroup.vue.d.ts +17 -0
- package/dist/components/ai-elements/model-selector/ModelSelectorInput.vue.d.ts +6 -0
- package/dist/components/ai-elements/model-selector/ModelSelectorItem.vue.d.ts +17 -0
- package/dist/components/ai-elements/model-selector/ModelSelectorList.vue.d.ts +17 -0
- package/dist/components/ai-elements/model-selector/ModelSelectorLogo.vue.d.ts +7 -0
- package/dist/components/ai-elements/model-selector/ModelSelectorLogoGroup.vue.d.ts +21 -0
- package/dist/components/ai-elements/model-selector/ModelSelectorName.vue.d.ts +21 -0
- package/dist/components/ai-elements/model-selector/ModelSelectorSeparator.vue.d.ts +2 -0
- package/dist/components/ai-elements/model-selector/ModelSelectorShortcut.vue.d.ts +17 -0
- package/dist/components/ai-elements/model-selector/ModelSelectorTrigger.vue.d.ts +17 -0
- package/dist/components/ai-elements/model-selector/index.d.ts +14 -0
- package/dist/components/ai-elements/node/Node.vue.d.ts +26 -0
- package/dist/components/ai-elements/node/NodeAction.vue.d.ts +17 -0
- package/dist/components/ai-elements/node/NodeContent.vue.d.ts +21 -0
- package/dist/components/ai-elements/node/NodeDescription.vue.d.ts +17 -0
- package/dist/components/ai-elements/node/NodeFooter.vue.d.ts +21 -0
- package/dist/components/ai-elements/node/NodeHeader.vue.d.ts +21 -0
- package/dist/components/ai-elements/node/NodeTitle.vue.d.ts +17 -0
- package/dist/components/ai-elements/node/index.d.ts +7 -0
- package/dist/components/ai-elements/open-in-chat/OpenIn.vue.d.ts +20 -0
- package/dist/components/ai-elements/open-in-chat/OpenInContent.vue.d.ts +21 -0
- package/dist/components/ai-elements/open-in-chat/OpenInItemLink.vue.d.ts +8 -0
- package/dist/components/ai-elements/open-in-chat/OpenInTrigger.vue.d.ts +17 -0
- package/dist/components/ai-elements/open-in-chat/context.d.ts +7 -0
- package/dist/components/ai-elements/open-in-chat/index.d.ts +9 -0
- package/dist/components/ai-elements/open-in-chat/providers/icons/ChatGPT.vue.d.ts +2 -0
- package/dist/components/ai-elements/open-in-chat/providers/icons/Claude.vue.d.ts +2 -0
- package/dist/components/ai-elements/open-in-chat/providers/icons/Cursor.vue.d.ts +2 -0
- package/dist/components/ai-elements/open-in-chat/providers/icons/Github.vue.d.ts +2 -0
- package/dist/components/ai-elements/open-in-chat/providers/icons/Scira.vue.d.ts +2 -0
- package/dist/components/ai-elements/open-in-chat/providers/icons/V0.vue.d.ts +2 -0
- package/dist/components/ai-elements/open-in-chat/providers/icons/index.d.ts +6 -0
- package/dist/components/ai-elements/open-in-chat/providers/index.d.ts +38 -0
- package/dist/components/ai-elements/open-in-chat/providers/items/OpenInChatGPT.vue.d.ts +2 -0
- package/dist/components/ai-elements/open-in-chat/providers/items/OpenInClaude.vue.d.ts +2 -0
- package/dist/components/ai-elements/open-in-chat/providers/items/OpenInCursor.vue.d.ts +2 -0
- package/dist/components/ai-elements/open-in-chat/providers/items/OpenInScira.vue.d.ts +2 -0
- package/dist/components/ai-elements/open-in-chat/providers/items/OpenInT3.vue.d.ts +2 -0
- package/dist/components/ai-elements/open-in-chat/providers/items/OpenInv0.vue.d.ts +2 -0
- package/dist/components/ai-elements/panel/Panel.vue.d.ts +25 -0
- package/dist/components/ai-elements/panel/index.d.ts +1 -0
- package/dist/components/ai-elements/plan/Plan.vue.d.ts +24 -0
- package/dist/components/ai-elements/plan/PlanAction.vue.d.ts +17 -0
- package/dist/components/ai-elements/plan/PlanContent.vue.d.ts +17 -0
- package/dist/components/ai-elements/plan/PlanDescription.vue.d.ts +22 -0
- package/dist/components/ai-elements/plan/PlanFooter.vue.d.ts +17 -0
- package/dist/components/ai-elements/plan/PlanHeader.vue.d.ts +21 -0
- package/dist/components/ai-elements/plan/PlanTitle.vue.d.ts +18 -0
- package/dist/components/ai-elements/plan/PlanTrigger.vue.d.ts +6 -0
- package/dist/components/ai-elements/plan/context.d.ts +7 -0
- package/dist/components/ai-elements/plan/index.d.ts +8 -0
- package/dist/components/ai-elements/prompt-input/PromptInput.vue.d.ts +46 -0
- package/dist/components/ai-elements/prompt-input/PromptInputActionAddAttachments.vue.d.ts +7 -0
- package/dist/components/ai-elements/prompt-input/PromptInputActionMenu.vue.d.ts +21 -0
- package/dist/components/ai-elements/prompt-input/PromptInputActionMenuContent.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputActionMenuItem.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputActionMenuTrigger.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputAttachment.vue.d.ts +8 -0
- package/dist/components/ai-elements/prompt-input/PromptInputAttachments.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputBody.vue.d.ts +21 -0
- package/dist/components/ai-elements/prompt-input/PromptInputButton.vue.d.ts +20 -0
- package/dist/components/ai-elements/prompt-input/PromptInputCommand.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputCommandEmpty.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputCommandGroup.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputCommandInput.vue.d.ts +8 -0
- package/dist/components/ai-elements/prompt-input/PromptInputCommandItem.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputCommandList.vue.d.ts +8 -0
- package/dist/components/ai-elements/prompt-input/PromptInputCommandSeparator.vue.d.ts +8 -0
- package/dist/components/ai-elements/prompt-input/PromptInputFooter.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputHeader.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputHoverCard.vue.d.ts +26 -0
- package/dist/components/ai-elements/prompt-input/PromptInputHoverCardContent.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputHoverCardTrigger.vue.d.ts +21 -0
- package/dist/components/ai-elements/prompt-input/PromptInputProvider.vue.d.ts +43 -0
- package/dist/components/ai-elements/prompt-input/PromptInputSelect.vue.d.ts +21 -0
- package/dist/components/ai-elements/prompt-input/PromptInputSelectContent.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputSelectItem.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputSelectTrigger.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputSelectValue.vue.d.ts +23 -0
- package/dist/components/ai-elements/prompt-input/PromptInputSpeechButton.vue.d.ts +51 -0
- package/dist/components/ai-elements/prompt-input/PromptInputSubmit.vue.d.ts +30 -0
- package/dist/components/ai-elements/prompt-input/PromptInputTab.vue.d.ts +21 -0
- package/dist/components/ai-elements/prompt-input/PromptInputTabBody.vue.d.ts +21 -0
- package/dist/components/ai-elements/prompt-input/PromptInputTabItem.vue.d.ts +21 -0
- package/dist/components/ai-elements/prompt-input/PromptInputTabLabel.vue.d.ts +21 -0
- package/dist/components/ai-elements/prompt-input/PromptInputTabsList.vue.d.ts +21 -0
- package/dist/components/ai-elements/prompt-input/PromptInputTextarea.vue.d.ts +8 -0
- package/dist/components/ai-elements/prompt-input/PromptInputTools.vue.d.ts +21 -0
- package/dist/components/ai-elements/prompt-input/context.d.ts +22 -0
- package/dist/components/ai-elements/prompt-input/index.d.ts +39 -0
- package/dist/components/ai-elements/prompt-input/types.d.ts +24 -0
- package/dist/components/ai-elements/queue/Queue.vue.d.ts +21 -0
- package/dist/components/ai-elements/queue/QueueItem.vue.d.ts +21 -0
- package/dist/components/ai-elements/queue/QueueItemAction.vue.d.ts +21 -0
- package/dist/components/ai-elements/queue/QueueItemActions.vue.d.ts +21 -0
- package/dist/components/ai-elements/queue/QueueItemAttachment.vue.d.ts +21 -0
- package/dist/components/ai-elements/queue/QueueItemContent.vue.d.ts +24 -0
- package/dist/components/ai-elements/queue/QueueItemDescription.vue.d.ts +24 -0
- package/dist/components/ai-elements/queue/QueueItemFile.vue.d.ts +21 -0
- package/dist/components/ai-elements/queue/QueueItemImage.vue.d.ts +6 -0
- package/dist/components/ai-elements/queue/QueueItemIndicator.vue.d.ts +9 -0
- package/dist/components/ai-elements/queue/QueueList.vue.d.ts +21 -0
- package/dist/components/ai-elements/queue/QueueSection.vue.d.ts +24 -0
- package/dist/components/ai-elements/queue/QueueSectionContent.vue.d.ts +21 -0
- package/dist/components/ai-elements/queue/QueueSectionLabel.vue.d.ts +23 -0
- package/dist/components/ai-elements/queue/QueueSectionTrigger.vue.d.ts +21 -0
- package/dist/components/ai-elements/queue/index.d.ts +15 -0
- package/dist/components/ai-elements/reasoning/Reasoning.vue.d.ts +35 -0
- package/dist/components/ai-elements/reasoning/ReasoningContent.vue.d.ts +7 -0
- package/dist/components/ai-elements/reasoning/ReasoningTrigger.vue.d.ts +21 -0
- package/dist/components/ai-elements/reasoning/context.d.ts +9 -0
- package/dist/components/ai-elements/reasoning/index.d.ts +3 -0
- package/dist/components/ai-elements/shimmer/Shimmer.vue.d.ts +28 -0
- package/dist/components/ai-elements/shimmer/index.d.ts +1 -0
- package/dist/components/ai-elements/sources/Source.vue.d.ts +23 -0
- package/dist/components/ai-elements/sources/Sources.vue.d.ts +21 -0
- package/dist/components/ai-elements/sources/SourcesContent.vue.d.ts +21 -0
- package/dist/components/ai-elements/sources/SourcesTrigger.vue.d.ts +22 -0
- package/dist/components/ai-elements/sources/index.d.ts +4 -0
- package/dist/components/ai-elements/suggestion/Suggestion.vue.d.ts +31 -0
- package/dist/components/ai-elements/suggestion/Suggestions.vue.d.ts +21 -0
- package/dist/components/ai-elements/suggestion/index.d.ts +2 -0
- package/dist/components/ai-elements/task/Task.vue.d.ts +28 -0
- package/dist/components/ai-elements/task/TaskContent.vue.d.ts +21 -0
- package/dist/components/ai-elements/task/TaskItem.vue.d.ts +21 -0
- package/dist/components/ai-elements/task/TaskItemFile.vue.d.ts +21 -0
- package/dist/components/ai-elements/task/TaskTrigger.vue.d.ts +22 -0
- package/dist/components/ai-elements/task/index.d.ts +5 -0
- package/dist/components/ai-elements/tool/Tool.vue.d.ts +21 -0
- package/dist/components/ai-elements/tool/ToolContent.vue.d.ts +21 -0
- package/dist/components/ai-elements/tool/ToolHeader.vue.d.ts +10 -0
- package/dist/components/ai-elements/tool/ToolInput.vue.d.ts +8 -0
- package/dist/components/ai-elements/tool/ToolOutput.vue.d.ts +9 -0
- package/dist/components/ai-elements/tool/ToolStatusBadge.vue.d.ts +6 -0
- package/dist/components/ai-elements/tool/index.d.ts +5 -0
- package/dist/components/ai-elements/toolbar/Toolbar.vue.d.ts +25 -0
- package/dist/components/ai-elements/toolbar/index.d.ts +1 -0
- package/dist/components/ai-elements/web-preview/WebPreview.vue.d.ts +34 -0
- package/dist/components/ai-elements/web-preview/WebPreviewBody.vue.d.ts +24 -0
- package/dist/components/ai-elements/web-preview/WebPreviewConsole.vue.d.ts +30 -0
- package/dist/components/ai-elements/web-preview/WebPreviewNavigation.vue.d.ts +21 -0
- package/dist/components/ai-elements/web-preview/WebPreviewNavigationButton.vue.d.ts +30 -0
- package/dist/components/ai-elements/web-preview/WebPreviewUrl.vue.d.ts +9 -0
- package/dist/components/ai-elements/web-preview/context.d.ts +9 -0
- package/dist/components/ai-elements/web-preview/index.d.ts +7 -0
- package/dist/components/ui/alert/Alert.vue.d.ts +23 -0
- package/dist/components/ui/alert/AlertDescription.vue.d.ts +21 -0
- package/dist/components/ui/alert/AlertTitle.vue.d.ts +21 -0
- package/dist/components/ui/alert/index.d.ts +8 -0
- package/dist/components/ui/avatar/Avatar.vue.d.ts +21 -0
- package/dist/components/ui/avatar/AvatarFallback.vue.d.ts +22 -0
- package/dist/components/ui/avatar/AvatarImage.vue.d.ts +18 -0
- package/dist/components/ui/avatar/index.d.ts +3 -0
- package/dist/components/ui/badge/Badge.vue.d.ts +24 -0
- package/dist/components/ui/badge/index.d.ts +6 -0
- package/dist/components/ui/button/Button.vue.d.ts +27 -0
- package/dist/components/ui/button/index.d.ts +7 -0
- package/dist/components/ui/button-group/ButtonGroup.vue.d.ts +23 -0
- package/dist/components/ui/button-group/ButtonGroupSeparator.vue.d.ts +9 -0
- package/dist/components/ui/button-group/ButtonGroupText.vue.d.ts +26 -0
- package/dist/components/ui/button-group/index.d.ts +8 -0
- package/dist/components/ui/card/Card.vue.d.ts +21 -0
- package/dist/components/ui/card/CardAction.vue.d.ts +21 -0
- package/dist/components/ui/card/CardContent.vue.d.ts +21 -0
- package/dist/components/ui/card/CardDescription.vue.d.ts +21 -0
- package/dist/components/ui/card/CardFooter.vue.d.ts +21 -0
- package/dist/components/ui/card/CardHeader.vue.d.ts +21 -0
- package/dist/components/ui/card/CardTitle.vue.d.ts +21 -0
- package/dist/components/ui/card/index.d.ts +7 -0
- package/dist/components/ui/carousel/CarouselContent.vue.d.ts +22 -0
- package/dist/components/ui/carousel/CarouselItem.vue.d.ts +18 -0
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +26 -0
- package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +26 -0
- package/dist/components/ui/carousel/index.d.ts +7 -0
- package/dist/components/ui/carousel/interface.d.ts +19 -0
- package/dist/components/ui/collapsible/Collapsible.vue.d.ts +24 -0
- package/dist/components/ui/collapsible/CollapsibleContent.vue.d.ts +18 -0
- package/dist/components/ui/collapsible/CollapsibleTrigger.vue.d.ts +18 -0
- package/dist/components/ui/collapsible/index.d.ts +3 -0
- package/dist/components/ui/command/Command.vue.d.ts +40 -0
- package/dist/components/ui/command/CommandDialog.vue.d.ts +32 -0
- package/dist/components/ui/command/CommandEmpty.vue.d.ts +22 -0
- package/dist/components/ui/command/CommandGroup.vue.d.ts +23 -0
- package/dist/components/ui/command/CommandInput.vue.d.ts +7 -0
- package/dist/components/ui/command/CommandItem.vue.d.ts +30 -0
- package/dist/components/ui/command/CommandList.vue.d.ts +22 -0
- package/dist/components/ui/command/CommandSeparator.vue.d.ts +22 -0
- package/dist/components/ui/command/CommandShortcut.vue.d.ts +21 -0
- package/dist/components/ui/command/index.d.ts +90 -0
- package/dist/components/ui/dialog/Dialog.vue.d.ts +25 -0
- package/dist/components/ui/dialog/DialogClose.vue.d.ts +18 -0
- package/dist/components/ui/dialog/DialogContent.vue.d.ts +39 -0
- package/dist/components/ui/dialog/DialogDescription.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogFooter.vue.d.ts +21 -0
- package/dist/components/ui/dialog/DialogHeader.vue.d.ts +21 -0
- package/dist/components/ui/dialog/DialogOverlay.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +36 -0
- package/dist/components/ui/dialog/DialogTitle.vue.d.ts +22 -0
- package/dist/components/ui/dialog/DialogTrigger.vue.d.ts +18 -0
- package/dist/components/ui/dialog/index.d.ts +10 -0
- package/dist/components/ui/dropdown-menu/DropdownMenu.vue.d.ts +24 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +29 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +36 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +18 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +26 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +23 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +22 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +27 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +7 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +21 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +22 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +38 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +23 -0
- package/dist/components/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +18 -0
- package/dist/components/ui/dropdown-menu/index.d.ts +15 -0
- package/dist/components/ui/hover-card/HoverCard.vue.d.ts +24 -0
- package/dist/components/ui/hover-card/HoverCardContent.vue.d.ts +24 -0
- package/dist/components/ui/hover-card/HoverCardTrigger.vue.d.ts +18 -0
- package/dist/components/ui/hover-card/index.d.ts +3 -0
- package/dist/components/ui/input/Input.vue.d.ts +12 -0
- package/dist/components/ui/input/index.d.ts +1 -0
- package/dist/components/ui/input-group/InputGroup.vue.d.ts +21 -0
- package/dist/components/ui/input-group/InputGroupAddon.vue.d.ts +25 -0
- package/dist/components/ui/input-group/InputGroupButton.vue.d.ts +21 -0
- package/dist/components/ui/input-group/InputGroupInput.vue.d.ts +6 -0
- package/dist/components/ui/input-group/InputGroupText.vue.d.ts +21 -0
- package/dist/components/ui/input-group/InputGroupTextarea.vue.d.ts +6 -0
- package/dist/components/ui/input-group/index.d.ts +22 -0
- package/dist/components/ui/progress/Progress.vue.d.ts +9 -0
- package/dist/components/ui/progress/index.d.ts +1 -0
- package/dist/components/ui/scroll-area/ScrollArea.vue.d.ts +22 -0
- package/dist/components/ui/scroll-area/ScrollBar.vue.d.ts +9 -0
- package/dist/components/ui/scroll-area/index.d.ts +2 -0
- package/dist/components/ui/select/Select.vue.d.ts +28 -0
- package/dist/components/ui/select/SelectContent.vue.d.ts +32 -0
- package/dist/components/ui/select/SelectGroup.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectItem.vue.d.ts +23 -0
- package/dist/components/ui/select/SelectItemText.vue.d.ts +18 -0
- package/dist/components/ui/select/SelectLabel.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollDownButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectScrollUpButton.vue.d.ts +22 -0
- package/dist/components/ui/select/SelectSeparator.vue.d.ts +7 -0
- package/dist/components/ui/select/SelectTrigger.vue.d.ts +25 -0
- package/dist/components/ui/select/SelectValue.vue.d.ts +18 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/separator/Separator.vue.d.ts +10 -0
- package/dist/components/ui/separator/index.d.ts +1 -0
- package/dist/components/ui/textarea/Textarea.vue.d.ts +12 -0
- package/dist/components/ui/textarea/index.d.ts +1 -0
- package/dist/components/ui/tooltip/Tooltip.vue.d.ts +24 -0
- package/dist/components/ui/tooltip/TooltipContent.vue.d.ts +30 -0
- package/dist/components/ui/tooltip/TooltipProvider.vue.d.ts +20 -0
- package/dist/components/ui/tooltip/TooltipTrigger.vue.d.ts +18 -0
- package/dist/components/ui/tooltip/index.d.ts +4 -0
- package/dist/composables/useChat.d.ts +8 -0
- package/dist/coq-CZjzQDnb.js +2 -0
- package/dist/cose-bilkent-S5V4N54A-Dy-do3hl.js +2250 -0
- package/dist/cpp-C6JyDxZu.js +16 -0
- package/dist/cpp-GAIEvywS.js +6 -0
- package/dist/crystal-BJfcoGS4.js +16 -0
- package/dist/csharp-BbUwciq4.js +2 -0
- package/dist/csharp-JE-9ns6W.js +2 -0
- package/dist/css-Crp0iO_o.js +2 -0
- package/dist/css-Cy-fypCV.js +2 -0
- package/dist/csv-DJ7xG4PY.js +2 -0
- package/dist/csv-DtT8LmMi.js +2 -0
- package/dist/cue-BwjaQTCz.js +2 -0
- package/dist/cypher-B7e06enY.js +2 -0
- package/dist/cytoscape.esm-CWqS6puh.js +18100 -0
- package/dist/d-q60wkid4.js +2 -0
- package/dist/dagre-6UL2VRFP-B38_sZWh.js +298 -0
- package/dist/dagre-DtvXp3zQ.js +1395 -0
- package/dist/dark-plus-D_fA88xf.js +2 -0
- package/dist/dart-DjkWvBgr.js +2 -0
- package/dist/dax-lueLIZQI.js +2 -0
- package/dist/defaultLocale-CoJOMwPq.js +177 -0
- package/dist/desktop-DaphHKD5.js +2 -0
- package/dist/diagram-PSM6KHXK-D6swsG-y.js +497 -0
- package/dist/diagram-QEK2KX5R-B7Hi0LAL.js +226 -0
- package/dist/diagram-S2PKOQOG-DLx7PlpM.js +144 -0
- package/dist/diff-COB48_rb.js +2 -0
- package/dist/diff-DlXnqUMK.js +2 -0
- package/dist/dist-CrnZo_23.js +49 -0
- package/dist/docker-DZKmuwpA.js +2 -0
- package/dist/dotenv-hmNahw-8.js +2 -0
- package/dist/dracula-ddM3a7au.js +2 -0
- package/dist/dracula-soft-vfA-TA_S.js +2 -0
- package/dist/dream-maker-Cxa2a8FY.js +2 -0
- package/dist/edge-Dm7HQa9N.js +12 -0
- package/dist/elixir-BkvHyCNd.js +5 -0
- package/dist/elm-rz9wTSrn.js +4 -0
- package/dist/emacs-lisp-w5URnZPZ.js +2 -0
- package/dist/erDiagram-Q2GNP2WA-B67FD8rh.js +1603 -0
- package/dist/erb-DyrwQYVz.js +25 -0
- package/dist/erlang-DLFKZs5N.js +3 -0
- package/dist/everforest-dark-DAPtv4yI.js +2 -0
- package/dist/everforest-light-nQzYm8GO.js +2 -0
- package/dist/fennel-CJDNJZTU.js +2 -0
- package/dist/fish-BkYaLI4-.js +2 -0
- package/dist/flowDiagram-NV44I4VS-DHXgrdJY.js +4132 -0
- package/dist/fluent-DShra35H.js +2 -0
- package/dist/fortran-fixed-form-SzB0QY3n.js +3 -0
- package/dist/fortran-free-form-CgbOAJnm.js +2 -0
- package/dist/fortran-free-form-Js8JrQQE.js +2 -0
- package/dist/fsharp-CtWO0jvL.js +3 -0
- package/dist/ganttDiagram-JELNMOA3-CGIqBt1P.js +3009 -0
- package/dist/gdresource-CgyXKpe4.js +8 -0
- package/dist/gdscript-DnurdQnh.js +2 -0
- package/dist/gdscript-STdmRKv-.js +2 -0
- package/dist/gdshader-Bs2s6cSB.js +2 -0
- package/dist/gdshader-YiVaPq6D.js +2 -0
- package/dist/genie-BppkvzZC.js +2 -0
- package/dist/gherkin-Bp4zdWMb.js +2 -0
- package/dist/git-commit--0GGwZNa.js +3 -0
- package/dist/git-rebase-orw-bSIZ.js +3 -0
- package/dist/gitGraph-F6HP7TQM-CH5XLm5Z.js +8 -0
- package/dist/gitGraphDiagram-NY62KEGX-Cq8AbOhM.js +634 -0
- package/dist/github-dark-CMN1tZPn.js +2 -0
- package/dist/github-dark-DxCf_Qaz.js +2 -0
- package/dist/github-dark-default-DVCJut02.js +2 -0
- package/dist/github-dark-dimmed-DXu9oDqW.js +2 -0
- package/dist/github-dark-high-contrast-BBZdE-mX.js +2 -0
- package/dist/github-light-CfdX7txK.js +2 -0
- package/dist/github-light-Y8g-VxKq.js +2 -0
- package/dist/github-light-default-BNGkGE--.js +2 -0
- package/dist/github-light-high-contrast-DiSIc-nG.js +2 -0
- package/dist/gleam-Lw0tKp8T.js +2 -0
- package/dist/glimmer-js-C6E6wJv0.js +12 -0
- package/dist/glimmer-ts-C6GgTGNO.js +12 -0
- package/dist/glsl-D8_YBRKT.js +3 -0
- package/dist/glsl-rwn_QCp2.js +3 -0
- package/dist/gnuplot-BeA3etmO.js +2 -0
- package/dist/go-BhDDN9y4.js +2 -0
- package/dist/go-xfE7BrfS.js +2 -0
- package/dist/graphlib-BZdVmxO6.js +223 -0
- package/dist/graphql-DQHhbQm2.js +6 -0
- package/dist/graphql-DoBLseH6.js +12 -0
- package/dist/groovy-C5-mv4io.js +2 -0
- package/dist/gruvbox-dark-hard-CULu6kVy.js +2 -0
- package/dist/gruvbox-dark-medium-BJM4uQXO.js +2 -0
- package/dist/gruvbox-dark-soft-CVaORUwa.js +2 -0
- package/dist/gruvbox-light-hard-B-WJAGLa.js +2 -0
- package/dist/gruvbox-light-medium-jc8FWnuC.js +2 -0
- package/dist/gruvbox-light-soft-CmvYQK92.js +2 -0
- package/dist/hack-DEAxoi73.js +10 -0
- package/dist/haml-BG2d3iX4.js +4 -0
- package/dist/haml-mA656Lm7.js +8 -0
- package/dist/handlebars-CO5xAxJ3.js +12 -0
- package/dist/haskell-Hsexh2aP.js +2 -0
- package/dist/haxe-BJVSeYxy.js +2 -0
- package/dist/haxe-CD_Rs3P5.js +2 -0
- package/dist/hcl-D098sJ_J.js +2 -0
- package/dist/hjson-BwXHX5r6.js +2 -0
- package/dist/hlsl-B0pnUVYG.js +2 -0
- package/dist/hlsl-Dt9-unql.js +2 -0
- package/dist/houston-C7hMWO_I.js +2 -0
- package/dist/html-DFCxtjnd.js +4 -0
- package/dist/html-DKSj3FeM.js +8 -0
- package/dist/html-derivative-BCRkrTcD.js +5 -0
- package/dist/html-derivative-C-vidKoA.js +3 -0
- package/dist/http-CYP1tEDW.js +17 -0
- package/dist/hurl-BJexUSKz.js +15 -0
- package/dist/hxml-XfuSEjM-.js +3 -0
- package/dist/hy-DPQ04rHt.js +2 -0
- package/dist/imba-Bgu2n5Mo.js +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2984 -0
- package/dist/index.mjs +37693 -0
- package/dist/info-NVLQJR56-hEN1y0nS.js +8 -0
- package/dist/infoDiagram-WHAUD3N6-btPwHXxp.js +31 -0
- package/dist/ini-g9mZnyrk.js +2 -0
- package/dist/init-CBay3kgM.js +13 -0
- package/dist/isArrayLikeObject-Dz_TDfw0.js +459 -0
- package/dist/isEmpty-CCym_WUL.js +32 -0
- package/dist/java-CUbPyze1.js +2 -0
- package/dist/java-DIOGgqAD.js +2 -0
- package/dist/javascript-9-JPeKdm.js +2 -0
- package/dist/javascript-De1qhUaI.js +2 -0
- package/dist/jinja-CVFxFRh6.js +5 -0
- package/dist/jison-0X6LppGq.js +3 -0
- package/dist/journeyDiagram-XKPGCS4Q-3OxtBx3I.js +884 -0
- package/dist/json-DJtYdWQK.js +2 -0
- package/dist/json-fcFpRaf3.js +2 -0
- package/dist/json5-CPTZJOmf.js +2 -0
- package/dist/jsonc-CYrayg0k.js +2 -0
- package/dist/jsonl-Bsv7LjJ3.js +2 -0
- package/dist/jsonnet-B7LkHJxg.js +2 -0
- package/dist/jssm-BopKGZKg.js +2 -0
- package/dist/jsx-Bf3Nk9Di.js +2 -0
- package/dist/jsx-qo0JNHpZ.js +2 -0
- package/dist/julia-ChGs-n_c.js +17 -0
- package/dist/kanagawa-dragon-CSqqi78I.js +2 -0
- package/dist/kanagawa-lotus-l2vgoxpH.js +2 -0
- package/dist/kanagawa-wave-BWhFcnLj.js +2 -0
- package/dist/kanban-definition-3W4ZIXB7-zdtnJaXz.js +971 -0
- package/dist/katex-BcWXJDMd.js +22097 -0
- package/dist/katex-K1dsczyg.js +2 -0
- package/dist/kdl-BbokxoZ9.js +2 -0
- package/dist/kotlin-3dXKmwyJ.js +2 -0
- package/dist/kusto-Os6_yHEz.js +2 -0
- package/dist/laserwave-8RcN1zf8.js +2 -0
- package/dist/latex-BnWZlY4q.js +4 -0
- package/dist/lean--0Wr4Cy4.js +2 -0
- package/dist/less-B4ybD-7s.js +2 -0
- package/dist/less-Cb54jO7u.js +2 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/light-plus-CP_iZQDF.js +2 -0
- package/dist/line-EpckC7pZ.js +30 -0
- package/dist/linear-DjVN4o4U.js +250 -0
- package/dist/liquid-pc5Mduds.js +12 -0
- package/dist/llvm-ILH_SX7E.js +2 -0
- package/dist/log-DwO_GzA0.js +2 -0
- package/dist/logo-B4FeRowR.js +2 -0
- package/dist/lua-0TqNbT8C.js +3 -0
- package/dist/lua-6pXga3HV.js +3 -0
- package/dist/luau-DsUEyLJN.js +2 -0
- package/dist/main.d.ts +0 -0
- package/dist/make-p6NYc19I.js +2 -0
- package/dist/markdown-CCRtgC0b.js +2 -0
- package/dist/markdown-LaaQ4Eua.js +2 -0
- package/dist/marked.esm-D9xINNve.js +1384 -0
- package/dist/marko-D8uDUUEs.js +12 -0
- package/dist/material-theme-D__z84-n.js +2 -0
- package/dist/material-theme-darker-CWC5BoMv.js +2 -0
- package/dist/material-theme-lighter-BJrV5b2o.js +2 -0
- package/dist/material-theme-ocean-DYpMfDiX.js +2 -0
- package/dist/material-theme-palenight-3Ix3iI7Q.js +2 -0
- package/dist/math-CJAnbPum.js +8 -0
- package/dist/matlab-CL0oMGfq.js +2 -0
- package/dist/mdc-Ki3KnB5U.js +13 -0
- package/dist/mdx-BTufVkNP.js +2 -0
- package/dist/mermaid-FCjIh1A7.js +2 -0
- package/dist/mermaid-parser.core-DVXSGppp.js +48 -0
- package/dist/mermaid.core-Ra1JFCui.js +895 -0
- package/dist/min-dark-B4KRMcN3.js +2 -0
- package/dist/min-light-BQVJODr0.js +2 -0
- package/dist/mindmap-definition-VGOIOE7T-CRPO52xV.js +960 -0
- package/dist/mipsasm-Cn6AQ4lM.js +2 -0
- package/dist/mojo-C9IiQhp4.js +2 -0
- package/dist/monokai-vDwMMRi4.js +2 -0
- package/dist/move-BdizQ4_I.js +2 -0
- package/dist/narrat-BP2kx-u2.js +2 -0
- package/dist/nextflow-CyRmCGOe.js +2 -0
- package/dist/nginx-B46vdQ9n.js +4 -0
- package/dist/night-owl-DmjkOa5g.js +2 -0
- package/dist/nim-BxQNx10D.js +19 -0
- package/dist/nix-qPhlsqZI.js +2 -0
- package/dist/nord-sjxbvIbg.js +2 -0
- package/dist/nushell-puA-1bCW.js +2 -0
- package/dist/objective-c-D-qDLNy5.js +2 -0
- package/dist/objective-cpp-CFxSAM6p.js +2 -0
- package/dist/ocaml-CsLB7SWJ.js +2 -0
- package/dist/one-dark-pro-BHH-VjFD.js +2 -0
- package/dist/one-light-BqE6erWk.js +2 -0
- package/dist/openscad-DJCIQfnJ.js +2 -0
- package/dist/ordinal-CYQpsShT.js +61 -0
- package/dist/packet-BFZMPI3H-Bnlch4JI.js +8 -0
- package/dist/pascal-CPg9_ZFN.js +2 -0
- package/dist/path-esxOUfAH.js +79 -0
- package/dist/perl-D1bDaADZ.js +15 -0
- package/dist/php-BX51InqL.js +9 -0
- package/dist/php-D5tmU8Cr.js +16 -0
- package/dist/pie-7BOR55EZ-B9egLHl5.js +8 -0
- package/dist/pieDiagram-ADFJNKIX-CKSgB7fx.js +172 -0
- package/dist/pkl-BQQ96hvn.js +2 -0
- package/dist/plastic-BrNUBdSC.js +2 -0
- package/dist/plsql-Co7Bxe7U.js +2 -0
- package/dist/po-BqzJCro7.js +2 -0
- package/dist/poimandres-C_AK8TlO.js +2 -0
- package/dist/polar-CtdYIPEe.js +2 -0
- package/dist/postcss-ChqFKb46.js +2 -0
- package/dist/postcss-ainQkoyY.js +2 -0
- package/dist/powerquery-CDugc1w-.js +2 -0
- package/dist/powershell-j5X-IA59.js +2 -0
- package/dist/prisma-Cyl7YhUw.js +2 -0
- package/dist/prolog-DELKnUYf.js +2 -0
- package/dist/proto-C4A_gDBY.js +2 -0
- package/dist/pug-BcLlS7Yb.js +10 -0
- package/dist/puppet-DFC9LyFj.js +2 -0
- package/dist/purescript-eECq7_n2.js +2 -0
- package/dist/python-BhdCuCld.js +2 -0
- package/dist/python-CuBu5pyY.js +2 -0
- package/dist/qml-MD0NqqIl.js +3 -0
- package/dist/qmldir-BpJII-Ze.js +2 -0
- package/dist/qss-CpMcemMc.js +2 -0
- package/dist/quadrantDiagram-AYHSOK5B-BHzqivzD.js +1970 -0
- package/dist/r-CQeHOO4c.js +2 -0
- package/dist/r-D90zdkbN.js +2 -0
- package/dist/racket-COTs6Zfi.js +2 -0
- package/dist/radar-NHE76QYJ-DdALhlvV.js +8 -0
- package/dist/raku-DfOtwMUC.js +2 -0
- package/dist/razor-eRwFWsjJ.js +10 -0
- package/dist/red-CWGFZsim.js +2 -0
- package/dist/reg-BX5DwoEA.js +2 -0
- package/dist/regexp-Ca0eDBa2.js +2 -0
- package/dist/regexp-Cap8fK_2.js +2 -0
- package/dist/rel-CzXuLSk3.js +2 -0
- package/dist/request/index.d.ts +6 -0
- package/dist/requirementDiagram-UZGBJVZJ-Darhwvir.js +2194 -0
- package/dist/riscv-DnFIiqh3.js +2 -0
- package/dist/rose-pine-C4v2iQVe.js +2 -0
- package/dist/rose-pine-dawn-D5sdDB-J.js +2 -0
- package/dist/rose-pine-moon-2Vb7bLLO.js +2 -0
- package/dist/rosmsg-D02ul3fM.js +2 -0
- package/dist/rst-DFmSdXGd.js +34 -0
- package/dist/ruby-BAEFomR0.js +20 -0
- package/dist/ruby-DDMUvAvC.js +28 -0
- package/dist/rust-s3hBbfQg.js +2 -0
- package/dist/sankeyDiagram-TZEHDZUN-KiSvBN_C.js +884 -0
- package/dist/sas-TjtLSnOp.js +3 -0
- package/dist/sass-v3HeJ9Fl.js +2 -0
- package/dist/scala-BTIBM_Vn.js +2 -0
- package/dist/scheme-C4NQMf7a.js +2 -0
- package/dist/scss-C-bthdG1.js +3 -0
- package/dist/scss-D-6-mg-f.js +3 -0
- package/dist/sdbl-BA3l-JrH.js +2 -0
- package/dist/sdbl-gc7zIVWR.js +2 -0
- package/dist/sequenceDiagram-WL72ISMW-D2Mo7Vtj.js +3560 -0
- package/dist/shaderlab-BRlB5fpk.js +3 -0
- package/dist/shellscript-BQ8mKDAF.js +2 -0
- package/dist/shellscript-DZa_4vvb.js +2 -0
- package/dist/shellsession-CIlmlgbR.js +3 -0
- package/dist/slack-dark-DhXO5DWr.js +2 -0
- package/dist/slack-ochin-aAGl4PPH.js +2 -0
- package/dist/smalltalk-DbwVUw_i.js +2 -0
- package/dist/snazzy-light-B4S5mk83.js +2 -0
- package/dist/solarized-dark-Dexkq3Fm.js +2 -0
- package/dist/solarized-light-I-Bzy8UC.js +2 -0
- package/dist/solidity-SMk0TJDc.js +2 -0
- package/dist/soy-DwSCrzEF.js +5 -0
- package/dist/sparql-D9kVSpEx.js +3 -0
- package/dist/splunk-DXXu2r7r.js +2 -0
- package/dist/sql-Bi3LyNPb.js +2 -0
- package/dist/sql-D0eLHBiZ.js +2 -0
- package/dist/src-B-SBGd0A.js +1975 -0
- package/dist/ssh-config-DyVcFTfI.js +2 -0
- package/dist/stata-DkEObyNb.js +3 -0
- package/dist/stateDiagram-FKZM4ZOC-BRQN2Npg.js +224 -0
- package/dist/stateDiagram-v2-4FDKWEC3-CeeIKiFG.js +32 -0
- package/dist/stylus-BKTuFHcX.js +2 -0
- package/dist/stylus-DEHALDNh.js +2 -0
- package/dist/svelte-KFuclcR6.js +12 -0
- package/dist/swift-Cenptrnf.js +2 -0
- package/dist/synthwave-84-BRkDuVE-.js +2 -0
- package/dist/system-verilog-Cvgukx4v.js +2 -0
- package/dist/systemd-BepdslJQ.js +2 -0
- package/dist/talonscript-Q98m-VXh.js +2 -0
- package/dist/tasl-uebrX98X.js +2 -0
- package/dist/tcl-B1Ny4XFf.js +2 -0
- package/dist/templ-C5mtYbb_.js +10 -0
- package/dist/terraform-0mA5ERTe.js +2 -0
- package/dist/tex-B4uYy1vC.js +3 -0
- package/dist/tex-BoVFa1ir.js +3 -0
- package/dist/timeline-definition-IT6M3QCI-CSwH0Pnx.js +830 -0
- package/dist/tokyo-night-D0mU3-u8.js +2 -0
- package/dist/toml-vMAjra5M.js +2 -0
- package/dist/treemap-KMMF4GRG-COjpj6-C.js +8 -0
- package/dist/ts-tags-DRdTXGhb.js +38 -0
- package/dist/tsv-BnmbkntZ.js +2 -0
- package/dist/tsx-BaaPsUbd.js +2 -0
- package/dist/tsx-C0w0w5St.js +2 -0
- package/dist/turtle-4UWi_qX6.js +2 -0
- package/dist/turtle-BRmolh-6.js +2 -0
- package/dist/twig-cEhAbahS.js +33 -0
- package/dist/typescript-4YtK2JL4.js +2 -0
- package/dist/typescript-CmJ8D0yY.js +2 -0
- package/dist/typespec-CILw3zvZ.js +2 -0
- package/dist/typst-CLajFw6q.js +2 -0
- package/dist/v-MJV2RQvK.js +2 -0
- package/dist/vala-Dc1TiHw1.js +2 -0
- package/dist/vb-CoJdNmGs.js +2 -0
- package/dist/verilog-C7aVmiO0.js +2 -0
- package/dist/vesper-Cvcqyrim.js +2 -0
- package/dist/vhdl-CYQvzAG1.js +2 -0
- package/dist/viml-DOyjiDI8.js +2 -0
- package/dist/vitesse-black-CUYJaB5b.js +2 -0
- package/dist/vitesse-dark-BNlzDJ1Z.js +2 -0
- package/dist/vitesse-light-JU98KqVa.js +2 -0
- package/dist/vue-B3C4YeUK.js +8 -0
- package/dist/vue-DMpjAWNv.js +20 -0
- package/dist/vue-html-BIZN50ug.js +13 -0
- package/dist/vue-vine-DxezWcjL.js +22 -0
- package/dist/vyper-JU_r7Ch6.js +2 -0
- package/dist/wasm-DJ1S--fN.js +2 -0
- package/dist/wasm-eLFiAU8u.js +2 -0
- package/dist/wenyan-CqkzmyWz.js +2 -0
- package/dist/wgsl-gV62iTnF.js +2 -0
- package/dist/wikitext-BfUl8La4.js +2 -0
- package/dist/wit-kp_bCf2U.js +2 -0
- package/dist/wolfram-aPsN9AKt.js +2 -0
- package/dist/xml-BglBgo29.js +3 -0
- package/dist/xml-BxRdgEAX.js +3 -0
- package/dist/xsl-Cni90e0k.js +4 -0
- package/dist/xychartDiagram-PRI3JC2R-CGXFYn39.js +2022 -0
- package/dist/yaml-DQRfaSRo.js +2 -0
- package/dist/yaml-P2kjOPvW.js +2 -0
- package/dist/zenscript-BuY4FX-t.js +2 -0
- package/dist/zig-CGDGjytz.js +2 -0
- package/package.json +66 -60
- package/.vscode/extensions.json +0 -3
- package/.vscode/settings.json +0 -6
- package/auto-imports.d.ts +0 -73
- package/components.d.ts +0 -312
- package/components.json +0 -21
- package/index.html +0 -13
- package/src/App.vue +0 -68
- package/src/components/ChatConversation/ChatConversation.vue +0 -97
- package/src/components/ChatConversation/index.ts +0 -1
- package/src/components/ChatPromptInputProvider/ChatPromptInputProvider.vue +0 -47
- package/src/components/ChatPromptInputProvider/index.ts +0 -1
- package/src/components/ai-elements/artifact/Artifact.vue +0 -23
- package/src/components/ai-elements/artifact/ArtifactAction.vue +0 -72
- package/src/components/ai-elements/artifact/ArtifactActions.vue +0 -19
- package/src/components/ai-elements/artifact/ArtifactClose.vue +0 -39
- package/src/components/ai-elements/artifact/ArtifactContent.vue +0 -20
- package/src/components/ai-elements/artifact/ArtifactDescription.vue +0 -20
- package/src/components/ai-elements/artifact/ArtifactHeader.vue +0 -23
- package/src/components/ai-elements/artifact/ArtifactTitle.vue +0 -20
- package/src/components/ai-elements/artifact/index.ts +0 -8
- package/src/components/ai-elements/canvas/Canvas.vue +0 -37
- package/src/components/ai-elements/canvas/index.ts +0 -1
- package/src/components/ai-elements/chain-of-thought/ChainOfThought.vue +0 -41
- package/src/components/ai-elements/chain-of-thought/ChainOfThoughtContent.vue +0 -32
- package/src/components/ai-elements/chain-of-thought/ChainOfThoughtHeader.vue +0 -43
- package/src/components/ai-elements/chain-of-thought/ChainOfThoughtImage.vue +0 -25
- package/src/components/ai-elements/chain-of-thought/ChainOfThoughtSearchResult.vue +0 -24
- package/src/components/ai-elements/chain-of-thought/ChainOfThoughtSearchResults.vue +0 -17
- package/src/components/ai-elements/chain-of-thought/ChainOfThoughtStep.vue +0 -54
- package/src/components/ai-elements/chain-of-thought/context.ts +0 -22
- package/src/components/ai-elements/chain-of-thought/index.ts +0 -7
- package/src/components/ai-elements/checkpoint/Checkpoint.vue +0 -19
- package/src/components/ai-elements/checkpoint/CheckpointIcon.vue +0 -19
- package/src/components/ai-elements/checkpoint/CheckpointTrigger.vue +0 -46
- package/src/components/ai-elements/checkpoint/index.ts +0 -3
- package/src/components/ai-elements/code-block/CodeBlock.vue +0 -84
- package/src/components/ai-elements/code-block/CodeBlockCopyButton.vue +0 -84
- package/src/components/ai-elements/code-block/context.ts +0 -7
- package/src/components/ai-elements/code-block/index.ts +0 -2
- package/src/components/ai-elements/code-block/utils.ts +0 -46
- package/src/components/ai-elements/confirmation/Confirmation.vue +0 -30
- package/src/components/ai-elements/confirmation/ConfirmationAccepted.vue +0 -18
- package/src/components/ai-elements/confirmation/ConfirmationAction.vue +0 -9
- package/src/components/ai-elements/confirmation/ConfirmationActions.vue +0 -23
- package/src/components/ai-elements/confirmation/ConfirmationRejected.vue +0 -18
- package/src/components/ai-elements/confirmation/ConfirmationRequest.vue +0 -11
- package/src/components/ai-elements/confirmation/ConfirmationTitle.vue +0 -18
- package/src/components/ai-elements/confirmation/context.ts +0 -46
- package/src/components/ai-elements/confirmation/index.ts +0 -7
- package/src/components/ai-elements/connection/Connection.vue +0 -36
- package/src/components/ai-elements/connection/index.ts +0 -1
- package/src/components/ai-elements/context/Context.vue +0 -29
- package/src/components/ai-elements/context/ContextCacheUsage.vue +0 -45
- package/src/components/ai-elements/context/ContextContent.vue +0 -20
- package/src/components/ai-elements/context/ContextContentBody.vue +0 -14
- package/src/components/ai-elements/context/ContextContentFooter.vue +0 -49
- package/src/components/ai-elements/context/ContextContentHeader.vue +0 -49
- package/src/components/ai-elements/context/ContextIcon.vue +0 -62
- package/src/components/ai-elements/context/ContextInputUsage.vue +0 -46
- package/src/components/ai-elements/context/ContextOutputUsage.vue +0 -45
- package/src/components/ai-elements/context/ContextReasoningUsage.vue +0 -48
- package/src/components/ai-elements/context/ContextTrigger.vue +0 -32
- package/src/components/ai-elements/context/TokensWithCost.vue +0 -25
- package/src/components/ai-elements/context/context.ts +0 -23
- package/src/components/ai-elements/context/index.ts +0 -12
- package/src/components/ai-elements/controls/Controls.vue +0 -25
- package/src/components/ai-elements/controls/index.ts +0 -1
- package/src/components/ai-elements/conversation/Conversation.vue +0 -37
- package/src/components/ai-elements/conversation/ConversationContent.vue +0 -21
- package/src/components/ai-elements/conversation/ConversationEmptyState.vue +0 -40
- package/src/components/ai-elements/conversation/ConversationScrollButton.vue +0 -34
- package/src/components/ai-elements/conversation/index.ts +0 -4
- package/src/components/ai-elements/edge/Animated.vue +0 -91
- package/src/components/ai-elements/edge/Temporary.vue +0 -28
- package/src/components/ai-elements/edge/index.ts +0 -2
- package/src/components/ai-elements/image/Image.vue +0 -29
- package/src/components/ai-elements/image/index.ts +0 -1
- package/src/components/ai-elements/inline-citation/InlineCitation.vue +0 -14
- package/src/components/ai-elements/inline-citation/InlineCitationCard.vue +0 -17
- package/src/components/ai-elements/inline-citation/InlineCitationCardBody.vue +0 -15
- package/src/components/ai-elements/inline-citation/InlineCitationCardTrigger.vue +0 -35
- package/src/components/ai-elements/inline-citation/InlineCitationCarousel.vue +0 -15
- package/src/components/ai-elements/inline-citation/InlineCitationCarouselContent.vue +0 -9
- package/src/components/ai-elements/inline-citation/InlineCitationCarouselHeader.vue +0 -16
- package/src/components/ai-elements/inline-citation/InlineCitationCarouselIndex.vue +0 -46
- package/src/components/ai-elements/inline-citation/InlineCitationCarouselItem.vue +0 -15
- package/src/components/ai-elements/inline-citation/InlineCitationCarouselNext.vue +0 -23
- package/src/components/ai-elements/inline-citation/InlineCitationCarouselPrev.vue +0 -23
- package/src/components/ai-elements/inline-citation/InlineCitationQuote.vue +0 -16
- package/src/components/ai-elements/inline-citation/InlineCitationSource.vue +0 -26
- package/src/components/ai-elements/inline-citation/InlineCitationText.vue +0 -14
- package/src/components/ai-elements/inline-citation/index.ts +0 -14
- package/src/components/ai-elements/loader/Loader.vue +0 -23
- package/src/components/ai-elements/loader/LoaderIcon.vue +0 -38
- package/src/components/ai-elements/loader/index.ts +0 -2
- package/src/components/ai-elements/message/Message.vue +0 -27
- package/src/components/ai-elements/message/MessageAction.vue +0 -45
- package/src/components/ai-elements/message/MessageActions.vue +0 -19
- package/src/components/ai-elements/message/MessageAttachment.vue +0 -87
- package/src/components/ai-elements/message/MessageAttachments.vue +0 -25
- package/src/components/ai-elements/message/MessageAvatar.vue +0 -22
- package/src/components/ai-elements/message/MessageBranch.vue +0 -66
- package/src/components/ai-elements/message/MessageBranchContent.vue +0 -51
- package/src/components/ai-elements/message/MessageBranchNext.vue +0 -23
- package/src/components/ai-elements/message/MessageBranchPage.vue +0 -28
- package/src/components/ai-elements/message/MessageBranchPrevious.vue +0 -23
- package/src/components/ai-elements/message/MessageBranchSelector.vue +0 -23
- package/src/components/ai-elements/message/MessageContent.vue +0 -26
- package/src/components/ai-elements/message/MessageResponse.vue +0 -42
- package/src/components/ai-elements/message/MessageToolbar.vue +0 -24
- package/src/components/ai-elements/message/context.ts +0 -22
- package/src/components/ai-elements/message/index.ts +0 -15
- package/src/components/ai-elements/model-selector/ModelSelector.vue +0 -9
- package/src/components/ai-elements/model-selector/ModelSelectorContent.vue +0 -29
- package/src/components/ai-elements/model-selector/ModelSelectorDialog.vue +0 -9
- package/src/components/ai-elements/model-selector/ModelSelectorEmpty.vue +0 -9
- package/src/components/ai-elements/model-selector/ModelSelectorGroup.vue +0 -9
- package/src/components/ai-elements/model-selector/ModelSelectorInput.vue +0 -18
- package/src/components/ai-elements/model-selector/ModelSelectorItem.vue +0 -10
- package/src/components/ai-elements/model-selector/ModelSelectorList.vue +0 -9
- package/src/components/ai-elements/model-selector/ModelSelectorLogo.vue +0 -22
- package/src/components/ai-elements/model-selector/ModelSelectorLogoGroup.vue +0 -24
- package/src/components/ai-elements/model-selector/ModelSelectorName.vue +0 -19
- package/src/components/ai-elements/model-selector/ModelSelectorSeparator.vue +0 -7
- package/src/components/ai-elements/model-selector/ModelSelectorShortcut.vue +0 -9
- package/src/components/ai-elements/model-selector/ModelSelectorTrigger.vue +0 -9
- package/src/components/ai-elements/model-selector/index.ts +0 -14
- package/src/components/ai-elements/node/Node.vue +0 -31
- package/src/components/ai-elements/node/NodeAction.vue +0 -9
- package/src/components/ai-elements/node/NodeContent.vue +0 -15
- package/src/components/ai-elements/node/NodeDescription.vue +0 -9
- package/src/components/ai-elements/node/NodeFooter.vue +0 -15
- package/src/components/ai-elements/node/NodeHeader.vue +0 -15
- package/src/components/ai-elements/node/NodeTitle.vue +0 -9
- package/src/components/ai-elements/node/index.ts +0 -7
- package/src/components/ai-elements/open-in-chat/OpenIn.vue +0 -20
- package/src/components/ai-elements/open-in-chat/OpenInContent.vue +0 -25
- package/src/components/ai-elements/open-in-chat/OpenInItemLink.vue +0 -30
- package/src/components/ai-elements/open-in-chat/OpenInTrigger.vue +0 -16
- package/src/components/ai-elements/open-in-chat/context.ts +0 -20
- package/src/components/ai-elements/open-in-chat/index.ts +0 -9
- package/src/components/ai-elements/open-in-chat/providers/icons/ChatGPT.vue +0 -13
- package/src/components/ai-elements/open-in-chat/providers/icons/Claude.vue +0 -15
- package/src/components/ai-elements/open-in-chat/providers/icons/Cursor.vue +0 -13
- package/src/components/ai-elements/open-in-chat/providers/icons/Github.vue +0 -8
- package/src/components/ai-elements/open-in-chat/providers/icons/Scira.vue +0 -58
- package/src/components/ai-elements/open-in-chat/providers/icons/V0.vue +0 -15
- package/src/components/ai-elements/open-in-chat/providers/icons/index.ts +0 -6
- package/src/components/ai-elements/open-in-chat/providers/index.ts +0 -69
- package/src/components/ai-elements/open-in-chat/providers/items/OpenInChatGPT.vue +0 -18
- package/src/components/ai-elements/open-in-chat/providers/items/OpenInClaude.vue +0 -18
- package/src/components/ai-elements/open-in-chat/providers/items/OpenInCursor.vue +0 -18
- package/src/components/ai-elements/open-in-chat/providers/items/OpenInScira.vue +0 -18
- package/src/components/ai-elements/open-in-chat/providers/items/OpenInT3.vue +0 -18
- package/src/components/ai-elements/open-in-chat/providers/items/OpenInv0.vue +0 -18
- package/src/components/ai-elements/panel/Panel.vue +0 -28
- package/src/components/ai-elements/panel/index.ts +0 -1
- package/src/components/ai-elements/plan/Plan.vue +0 -32
- package/src/components/ai-elements/plan/PlanAction.vue +0 -9
- package/src/components/ai-elements/plan/PlanContent.vue +0 -12
- package/src/components/ai-elements/plan/PlanDescription.vue +0 -25
- package/src/components/ai-elements/plan/PlanFooter.vue +0 -9
- package/src/components/ai-elements/plan/PlanHeader.vue +0 -18
- package/src/components/ai-elements/plan/PlanTitle.vue +0 -16
- package/src/components/ai-elements/plan/PlanTrigger.vue +0 -25
- package/src/components/ai-elements/plan/context.ts +0 -20
- package/src/components/ai-elements/plan/index.ts +0 -8
- package/src/components/ai-elements/prompt-input/PromptInput.vue +0 -116
- package/src/components/ai-elements/prompt-input/PromptInputActionAddAttachments.vue +0 -22
- package/src/components/ai-elements/prompt-input/PromptInputActionMenu.vue +0 -15
- package/src/components/ai-elements/prompt-input/PromptInputActionMenuContent.vue +0 -21
- package/src/components/ai-elements/prompt-input/PromptInputActionMenuItem.vue +0 -19
- package/src/components/ai-elements/prompt-input/PromptInputActionMenuTrigger.vue +0 -22
- package/src/components/ai-elements/prompt-input/PromptInputAttachment.vue +0 -94
- package/src/components/ai-elements/prompt-input/PromptInputAttachments.vue +0 -22
- package/src/components/ai-elements/prompt-input/PromptInputBody.vue +0 -12
- package/src/components/ai-elements/prompt-input/PromptInputButton.vue +0 -56
- package/src/components/ai-elements/prompt-input/PromptInputCommand.vue +0 -19
- package/src/components/ai-elements/prompt-input/PromptInputCommandEmpty.vue +0 -19
- package/src/components/ai-elements/prompt-input/PromptInputCommandGroup.vue +0 -19
- package/src/components/ai-elements/prompt-input/PromptInputCommandInput.vue +0 -17
- package/src/components/ai-elements/prompt-input/PromptInputCommandItem.vue +0 -19
- package/src/components/ai-elements/prompt-input/PromptInputCommandList.vue +0 -17
- package/src/components/ai-elements/prompt-input/PromptInputCommandSeparator.vue +0 -16
- package/src/components/ai-elements/prompt-input/PromptInputFooter.vue +0 -23
- package/src/components/ai-elements/prompt-input/PromptInputHeader.vue +0 -23
- package/src/components/ai-elements/prompt-input/PromptInputHoverCard.vue +0 -23
- package/src/components/ai-elements/prompt-input/PromptInputHoverCardContent.vue +0 -19
- package/src/components/ai-elements/prompt-input/PromptInputHoverCardTrigger.vue +0 -15
- package/src/components/ai-elements/prompt-input/PromptInputProvider.vue +0 -32
- package/src/components/ai-elements/prompt-input/PromptInputSelect.vue +0 -15
- package/src/components/ai-elements/prompt-input/PromptInputSelectContent.vue +0 -19
- package/src/components/ai-elements/prompt-input/PromptInputSelectItem.vue +0 -19
- package/src/components/ai-elements/prompt-input/PromptInputSelectTrigger.vue +0 -26
- package/src/components/ai-elements/prompt-input/PromptInputSelectValue.vue +0 -19
- package/src/components/ai-elements/prompt-input/PromptInputSpeechButton.vue +0 -137
- package/src/components/ai-elements/prompt-input/PromptInputSubmit.vue +0 -60
- package/src/components/ai-elements/prompt-input/PromptInputTab.vue +0 -16
- package/src/components/ai-elements/prompt-input/PromptInputTabBody.vue +0 -16
- package/src/components/ai-elements/prompt-input/PromptInputTabItem.vue +0 -16
- package/src/components/ai-elements/prompt-input/PromptInputTabLabel.vue +0 -16
- package/src/components/ai-elements/prompt-input/PromptInputTabsList.vue +0 -16
- package/src/components/ai-elements/prompt-input/PromptInputTextarea.vue +0 -78
- package/src/components/ai-elements/prompt-input/PromptInputTools.vue +0 -12
- package/src/components/ai-elements/prompt-input/context.ts +0 -223
- package/src/components/ai-elements/prompt-input/index.ts +0 -39
- package/src/components/ai-elements/prompt-input/types.ts +0 -28
- package/src/components/ai-elements/queue/Queue.vue +0 -21
- package/src/components/ai-elements/queue/QueueItem.vue +0 -21
- package/src/components/ai-elements/queue/QueueItemAction.vue +0 -25
- package/src/components/ai-elements/queue/QueueItemActions.vue +0 -14
- package/src/components/ai-elements/queue/QueueItemAttachment.vue +0 -14
- package/src/components/ai-elements/queue/QueueItemContent.vue +0 -32
- package/src/components/ai-elements/queue/QueueItemDescription.vue +0 -32
- package/src/components/ai-elements/queue/QueueItemFile.vue +0 -25
- package/src/components/ai-elements/queue/QueueItemImage.vue +0 -18
- package/src/components/ai-elements/queue/QueueItemIndicator.vue +0 -30
- package/src/components/ai-elements/queue/QueueList.vue +0 -22
- package/src/components/ai-elements/queue/QueueSection.vue +0 -26
- package/src/components/ai-elements/queue/QueueSectionContent.vue +0 -15
- package/src/components/ai-elements/queue/QueueSectionLabel.vue +0 -26
- package/src/components/ai-elements/queue/QueueSectionTrigger.vue +0 -25
- package/src/components/ai-elements/queue/index.ts +0 -15
- package/src/components/ai-elements/reasoning/Reasoning.vue +0 -94
- package/src/components/ai-elements/reasoning/ReasoningContent.vue +0 -41
- package/src/components/ai-elements/reasoning/ReasoningTrigger.vue +0 -61
- package/src/components/ai-elements/reasoning/context.ts +0 -19
- package/src/components/ai-elements/reasoning/index.ts +0 -3
- package/src/components/ai-elements/shimmer/Shimmer.vue +0 -69
- package/src/components/ai-elements/shimmer/index.ts +0 -1
- package/src/components/ai-elements/sources/Source.vue +0 -26
- package/src/components/ai-elements/sources/Sources.vue +0 -17
- package/src/components/ai-elements/sources/SourcesContent.vue +0 -23
- package/src/components/ai-elements/sources/SourcesTrigger.vue +0 -24
- package/src/components/ai-elements/sources/index.ts +0 -4
- package/src/components/ai-elements/suggestion/Suggestion.vue +0 -38
- package/src/components/ai-elements/suggestion/Suggestions.vue +0 -20
- package/src/components/ai-elements/suggestion/index.ts +0 -2
- package/src/components/ai-elements/task/Task.vue +0 -32
- package/src/components/ai-elements/task/TaskContent.vue +0 -27
- package/src/components/ai-elements/task/TaskItem.vue +0 -16
- package/src/components/ai-elements/task/TaskItemFile.vue +0 -18
- package/src/components/ai-elements/task/TaskTrigger.vue +0 -33
- package/src/components/ai-elements/task/index.ts +0 -5
- package/src/components/ai-elements/tool/Tool.vue +0 -18
- package/src/components/ai-elements/tool/ToolContent.vue +0 -23
- package/src/components/ai-elements/tool/ToolHeader.vue +0 -38
- package/src/components/ai-elements/tool/ToolInput.vue +0 -32
- package/src/components/ai-elements/tool/ToolOutput.vue +0 -69
- package/src/components/ai-elements/tool/ToolStatusBadge.vue +0 -63
- package/src/components/ai-elements/tool/index.ts +0 -5
- package/src/components/ai-elements/toolbar/Toolbar.vue +0 -32
- package/src/components/ai-elements/toolbar/index.ts +0 -1
- package/src/components/ai-elements/web-preview/WebPreview.vue +0 -60
- package/src/components/ai-elements/web-preview/WebPreviewBody.vue +0 -34
- package/src/components/ai-elements/web-preview/WebPreviewConsole.vue +0 -92
- package/src/components/ai-elements/web-preview/WebPreviewNavigation.vue +0 -21
- package/src/components/ai-elements/web-preview/WebPreviewNavigationButton.vue +0 -45
- package/src/components/ai-elements/web-preview/WebPreviewUrl.vue +0 -43
- package/src/components/ai-elements/web-preview/context.ts +0 -25
- package/src/components/ai-elements/web-preview/index.ts +0 -7
- package/src/components/ui/alert/Alert.vue +0 -21
- package/src/components/ui/alert/AlertDescription.vue +0 -17
- package/src/components/ui/alert/AlertTitle.vue +0 -17
- package/src/components/ui/alert/index.ts +0 -24
- package/src/components/ui/avatar/Avatar.vue +0 -18
- package/src/components/ui/avatar/AvatarFallback.vue +0 -21
- package/src/components/ui/avatar/AvatarImage.vue +0 -16
- package/src/components/ui/avatar/index.ts +0 -3
- package/src/components/ui/badge/Badge.vue +0 -26
- package/src/components/ui/badge/index.ts +0 -26
- package/src/components/ui/button/Button.vue +0 -29
- package/src/components/ui/button/index.ts +0 -38
- package/src/components/ui/button-group/ButtonGroup.vue +0 -22
- package/src/components/ui/button-group/ButtonGroupSeparator.vue +0 -24
- package/src/components/ui/button-group/ButtonGroupText.vue +0 -29
- package/src/components/ui/button-group/index.ts +0 -25
- package/src/components/ui/card/Card.vue +0 -22
- package/src/components/ui/card/CardAction.vue +0 -17
- package/src/components/ui/card/CardContent.vue +0 -17
- package/src/components/ui/card/CardDescription.vue +0 -17
- package/src/components/ui/card/CardFooter.vue +0 -17
- package/src/components/ui/card/CardHeader.vue +0 -17
- package/src/components/ui/card/CardTitle.vue +0 -17
- package/src/components/ui/card/index.ts +0 -7
- package/src/components/ui/carousel/Carousel.vue +0 -53
- package/src/components/ui/carousel/CarouselContent.vue +0 -33
- package/src/components/ui/carousel/CarouselItem.vue +0 -24
- package/src/components/ui/carousel/CarouselNext.vue +0 -41
- package/src/components/ui/carousel/CarouselPrevious.vue +0 -41
- package/src/components/ui/carousel/index.ts +0 -10
- package/src/components/ui/carousel/interface.ts +0 -26
- package/src/components/ui/carousel/useCarousel.ts +0 -56
- package/src/components/ui/collapsible/Collapsible.vue +0 -19
- package/src/components/ui/collapsible/CollapsibleContent.vue +0 -15
- package/src/components/ui/collapsible/CollapsibleTrigger.vue +0 -15
- package/src/components/ui/collapsible/index.ts +0 -3
- package/src/components/ui/command/Command.vue +0 -87
- package/src/components/ui/command/CommandDialog.vue +0 -31
- package/src/components/ui/command/CommandEmpty.vue +0 -27
- package/src/components/ui/command/CommandGroup.vue +0 -45
- package/src/components/ui/command/CommandInput.vue +0 -39
- package/src/components/ui/command/CommandItem.vue +0 -76
- package/src/components/ui/command/CommandList.vue +0 -25
- package/src/components/ui/command/CommandSeparator.vue +0 -21
- package/src/components/ui/command/CommandShortcut.vue +0 -17
- package/src/components/ui/command/index.ts +0 -25
- package/src/components/ui/dialog/Dialog.vue +0 -19
- package/src/components/ui/dialog/DialogClose.vue +0 -15
- package/src/components/ui/dialog/DialogContent.vue +0 -53
- package/src/components/ui/dialog/DialogDescription.vue +0 -23
- package/src/components/ui/dialog/DialogFooter.vue +0 -15
- package/src/components/ui/dialog/DialogHeader.vue +0 -17
- package/src/components/ui/dialog/DialogOverlay.vue +0 -21
- package/src/components/ui/dialog/DialogScrollContent.vue +0 -59
- package/src/components/ui/dialog/DialogTitle.vue +0 -23
- package/src/components/ui/dialog/DialogTrigger.vue +0 -15
- package/src/components/ui/dialog/index.ts +0 -10
- package/src/components/ui/dropdown-menu/DropdownMenu.vue +0 -19
- package/src/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +0 -39
- package/src/components/ui/dropdown-menu/DropdownMenuContent.vue +0 -39
- package/src/components/ui/dropdown-menu/DropdownMenuGroup.vue +0 -15
- package/src/components/ui/dropdown-menu/DropdownMenuItem.vue +0 -31
- package/src/components/ui/dropdown-menu/DropdownMenuLabel.vue +0 -23
- package/src/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +0 -21
- package/src/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +0 -40
- package/src/components/ui/dropdown-menu/DropdownMenuSeparator.vue +0 -23
- package/src/components/ui/dropdown-menu/DropdownMenuShortcut.vue +0 -17
- package/src/components/ui/dropdown-menu/DropdownMenuSub.vue +0 -18
- package/src/components/ui/dropdown-menu/DropdownMenuSubContent.vue +0 -27
- package/src/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +0 -30
- package/src/components/ui/dropdown-menu/DropdownMenuTrigger.vue +0 -17
- package/src/components/ui/dropdown-menu/index.ts +0 -16
- package/src/components/ui/hover-card/HoverCard.vue +0 -19
- package/src/components/ui/hover-card/HoverCardContent.vue +0 -43
- package/src/components/ui/hover-card/HoverCardTrigger.vue +0 -15
- package/src/components/ui/hover-card/index.ts +0 -3
- package/src/components/ui/input/Input.vue +0 -33
- package/src/components/ui/input/index.ts +0 -1
- package/src/components/ui/input-group/InputGroup.vue +0 -37
- package/src/components/ui/input-group/InputGroupAddon.vue +0 -36
- package/src/components/ui/input-group/InputGroupButton.vue +0 -21
- package/src/components/ui/input-group/InputGroupInput.vue +0 -19
- package/src/components/ui/input-group/InputGroupText.vue +0 -19
- package/src/components/ui/input-group/InputGroupTextarea.vue +0 -19
- package/src/components/ui/input-group/index.ts +0 -59
- package/src/components/ui/progress/Progress.vue +0 -38
- package/src/components/ui/progress/index.ts +0 -1
- package/src/components/ui/scroll-area/ScrollArea.vue +0 -33
- package/src/components/ui/scroll-area/ScrollBar.vue +0 -32
- package/src/components/ui/scroll-area/index.ts +0 -2
- package/src/components/ui/select/Select.vue +0 -19
- package/src/components/ui/select/SelectContent.vue +0 -51
- package/src/components/ui/select/SelectGroup.vue +0 -15
- package/src/components/ui/select/SelectItem.vue +0 -44
- package/src/components/ui/select/SelectItemText.vue +0 -15
- package/src/components/ui/select/SelectLabel.vue +0 -17
- package/src/components/ui/select/SelectScrollDownButton.vue +0 -26
- package/src/components/ui/select/SelectScrollUpButton.vue +0 -26
- package/src/components/ui/select/SelectSeparator.vue +0 -19
- package/src/components/ui/select/SelectTrigger.vue +0 -33
- package/src/components/ui/select/SelectValue.vue +0 -15
- package/src/components/ui/select/index.ts +0 -11
- package/src/components/ui/separator/Separator.vue +0 -29
- package/src/components/ui/separator/index.ts +0 -1
- package/src/components/ui/textarea/Textarea.vue +0 -28
- package/src/components/ui/textarea/index.ts +0 -1
- package/src/components/ui/tooltip/Tooltip.vue +0 -19
- package/src/components/ui/tooltip/TooltipContent.vue +0 -34
- package/src/components/ui/tooltip/TooltipProvider.vue +0 -14
- package/src/components/ui/tooltip/TooltipTrigger.vue +0 -15
- package/src/components/ui/tooltip/index.ts +0 -4
- package/src/composables/useChat.ts +0 -46
- package/src/index.ts +0 -3
- package/src/lib/utils.ts +0 -7
- package/src/main.ts +0 -5
- package/src/request/index.ts +0 -41
- package/src/style.css +0 -120
- package/tsconfig.app.json +0 -25
- package/tsconfig.json +0 -13
- package/tsconfig.node.json +0 -26
- package/vite.config.ts +0 -26
- /package/{public → dist}/vite.svg +0 -0
|
@@ -0,0 +1,2250 @@
|
|
|
1
|
+
import { i as __toESM, t as __commonJSMin } from "./chunk-DNh5sLlG.js";
|
|
2
|
+
import { g as log, h as __name, p as select_default } from "./src-B-SBGd0A.js";
|
|
3
|
+
import { t as cytoscape$1 } from "./cytoscape.esm-CWqS6puh.js";
|
|
4
|
+
var require_layout_base = /* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
5
|
+
(function(n, r) {
|
|
6
|
+
typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.layoutBase = r() : n.layoutBase = r();
|
|
7
|
+
})(e, function() {
|
|
8
|
+
return (function(e) {
|
|
9
|
+
var t = {};
|
|
10
|
+
function n(r) {
|
|
11
|
+
if (t[r]) return t[r].exports;
|
|
12
|
+
var i = t[r] = {
|
|
13
|
+
i: r,
|
|
14
|
+
l: !1,
|
|
15
|
+
exports: {}
|
|
16
|
+
};
|
|
17
|
+
return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports;
|
|
18
|
+
}
|
|
19
|
+
return n.m = e, n.c = t, n.i = function(e) {
|
|
20
|
+
return e;
|
|
21
|
+
}, n.d = function(e, t, r) {
|
|
22
|
+
n.o(e, t) || Object.defineProperty(e, t, {
|
|
23
|
+
configurable: !1,
|
|
24
|
+
enumerable: !0,
|
|
25
|
+
get: r
|
|
26
|
+
});
|
|
27
|
+
}, n.n = function(e) {
|
|
28
|
+
var t = e && e.__esModule ? function() {
|
|
29
|
+
return e.default;
|
|
30
|
+
} : function() {
|
|
31
|
+
return e;
|
|
32
|
+
};
|
|
33
|
+
return n.d(t, "a", t), t;
|
|
34
|
+
}, n.o = function(e, t) {
|
|
35
|
+
return Object.prototype.hasOwnProperty.call(e, t);
|
|
36
|
+
}, n.p = "", n(n.s = 26);
|
|
37
|
+
})([
|
|
38
|
+
(function(e, t, n) {
|
|
39
|
+
function r() {}
|
|
40
|
+
r.QUALITY = 1, r.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, r.DEFAULT_INCREMENTAL = !1, r.DEFAULT_ANIMATION_ON_LAYOUT = !0, r.DEFAULT_ANIMATION_DURING_LAYOUT = !1, r.DEFAULT_ANIMATION_PERIOD = 50, r.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, r.DEFAULT_GRAPH_MARGIN = 15, r.NODE_DIMENSIONS_INCLUDE_LABELS = !1, r.SIMPLE_NODE_SIZE = 40, r.SIMPLE_NODE_HALF_SIZE = r.SIMPLE_NODE_SIZE / 2, r.EMPTY_COMPOUND_NODE_SIZE = 40, r.MIN_EDGE_LENGTH = 1, r.WORLD_BOUNDARY = 1e6, r.INITIAL_WORLD_BOUNDARY = r.WORLD_BOUNDARY / 1e3, r.WORLD_CENTER_X = 1200, r.WORLD_CENTER_Y = 900, e.exports = r;
|
|
41
|
+
}),
|
|
42
|
+
(function(e, t, n) {
|
|
43
|
+
var r = n(2), i = n(8), a = n(9);
|
|
44
|
+
function o(e, t, n) {
|
|
45
|
+
r.call(this, n), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = n, this.bendpoints = [], this.source = e, this.target = t;
|
|
46
|
+
}
|
|
47
|
+
for (var s in o.prototype = Object.create(r.prototype), r) o[s] = r[s];
|
|
48
|
+
o.prototype.getSource = function() {
|
|
49
|
+
return this.source;
|
|
50
|
+
}, o.prototype.getTarget = function() {
|
|
51
|
+
return this.target;
|
|
52
|
+
}, o.prototype.isInterGraph = function() {
|
|
53
|
+
return this.isInterGraph;
|
|
54
|
+
}, o.prototype.getLength = function() {
|
|
55
|
+
return this.length;
|
|
56
|
+
}, o.prototype.isOverlapingSourceAndTarget = function() {
|
|
57
|
+
return this.isOverlapingSourceAndTarget;
|
|
58
|
+
}, o.prototype.getBendpoints = function() {
|
|
59
|
+
return this.bendpoints;
|
|
60
|
+
}, o.prototype.getLca = function() {
|
|
61
|
+
return this.lca;
|
|
62
|
+
}, o.prototype.getSourceInLca = function() {
|
|
63
|
+
return this.sourceInLca;
|
|
64
|
+
}, o.prototype.getTargetInLca = function() {
|
|
65
|
+
return this.targetInLca;
|
|
66
|
+
}, o.prototype.getOtherEnd = function(e) {
|
|
67
|
+
if (this.source === e) return this.target;
|
|
68
|
+
if (this.target === e) return this.source;
|
|
69
|
+
throw "Node is not incident with this edge";
|
|
70
|
+
}, o.prototype.getOtherEndInGraph = function(e, t) {
|
|
71
|
+
for (var n = this.getOtherEnd(e), r = t.getGraphManager().getRoot();;) {
|
|
72
|
+
if (n.getOwner() == t) return n;
|
|
73
|
+
if (n.getOwner() == r) break;
|
|
74
|
+
n = n.getOwner().getParent();
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
}, o.prototype.updateLength = function() {
|
|
78
|
+
var e = [
|
|
79
|
+
,
|
|
80
|
+
,
|
|
81
|
+
,
|
|
82
|
+
,
|
|
83
|
+
];
|
|
84
|
+
this.isOverlapingSourceAndTarget = i.getIntersection(this.target.getRect(), this.source.getRect(), e), this.isOverlapingSourceAndTarget || (this.lengthX = e[0] - e[2], this.lengthY = e[1] - e[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));
|
|
85
|
+
}, o.prototype.updateLengthSimple = function() {
|
|
86
|
+
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);
|
|
87
|
+
}, e.exports = o;
|
|
88
|
+
}),
|
|
89
|
+
(function(e, t, n) {
|
|
90
|
+
function r(e) {
|
|
91
|
+
this.vGraphObject = e;
|
|
92
|
+
}
|
|
93
|
+
e.exports = r;
|
|
94
|
+
}),
|
|
95
|
+
(function(e, t, n) {
|
|
96
|
+
var r = n(2), i = n(10), a = n(13), o = n(0), s = n(16), c = n(4);
|
|
97
|
+
function l(e, t, n, o) {
|
|
98
|
+
n == null && o == null && (o = t), r.call(this, o), e.graphManager != null && (e = e.graphManager), this.estimatedSize = i.MIN_VALUE, this.inclusionTreeDepth = i.MAX_VALUE, this.vGraphObject = o, this.edges = [], this.graphManager = e, n != null && t != null ? this.rect = new a(t.x, t.y, n.width, n.height) : this.rect = new a();
|
|
99
|
+
}
|
|
100
|
+
for (var u in l.prototype = Object.create(r.prototype), r) l[u] = r[u];
|
|
101
|
+
l.prototype.getEdges = function() {
|
|
102
|
+
return this.edges;
|
|
103
|
+
}, l.prototype.getChild = function() {
|
|
104
|
+
return this.child;
|
|
105
|
+
}, l.prototype.getOwner = function() {
|
|
106
|
+
return this.owner;
|
|
107
|
+
}, l.prototype.getWidth = function() {
|
|
108
|
+
return this.rect.width;
|
|
109
|
+
}, l.prototype.setWidth = function(e) {
|
|
110
|
+
this.rect.width = e;
|
|
111
|
+
}, l.prototype.getHeight = function() {
|
|
112
|
+
return this.rect.height;
|
|
113
|
+
}, l.prototype.setHeight = function(e) {
|
|
114
|
+
this.rect.height = e;
|
|
115
|
+
}, l.prototype.getCenterX = function() {
|
|
116
|
+
return this.rect.x + this.rect.width / 2;
|
|
117
|
+
}, l.prototype.getCenterY = function() {
|
|
118
|
+
return this.rect.y + this.rect.height / 2;
|
|
119
|
+
}, l.prototype.getCenter = function() {
|
|
120
|
+
return new c(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
|
|
121
|
+
}, l.prototype.getLocation = function() {
|
|
122
|
+
return new c(this.rect.x, this.rect.y);
|
|
123
|
+
}, l.prototype.getRect = function() {
|
|
124
|
+
return this.rect;
|
|
125
|
+
}, l.prototype.getDiagonal = function() {
|
|
126
|
+
return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
|
|
127
|
+
}, l.prototype.getHalfTheDiagonal = function() {
|
|
128
|
+
return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
|
|
129
|
+
}, l.prototype.setRect = function(e, t) {
|
|
130
|
+
this.rect.x = e.x, this.rect.y = e.y, this.rect.width = t.width, this.rect.height = t.height;
|
|
131
|
+
}, l.prototype.setCenter = function(e, t) {
|
|
132
|
+
this.rect.x = e - this.rect.width / 2, this.rect.y = t - this.rect.height / 2;
|
|
133
|
+
}, l.prototype.setLocation = function(e, t) {
|
|
134
|
+
this.rect.x = e, this.rect.y = t;
|
|
135
|
+
}, l.prototype.moveBy = function(e, t) {
|
|
136
|
+
this.rect.x += e, this.rect.y += t;
|
|
137
|
+
}, l.prototype.getEdgeListToNode = function(e) {
|
|
138
|
+
var t = [], n = this;
|
|
139
|
+
return n.edges.forEach(function(r) {
|
|
140
|
+
if (r.target == e) {
|
|
141
|
+
if (r.source != n) throw "Incorrect edge source!";
|
|
142
|
+
t.push(r);
|
|
143
|
+
}
|
|
144
|
+
}), t;
|
|
145
|
+
}, l.prototype.getEdgesBetween = function(e) {
|
|
146
|
+
var t = [], n = this;
|
|
147
|
+
return n.edges.forEach(function(r) {
|
|
148
|
+
if (!(r.source == n || r.target == n)) throw "Incorrect edge source and/or target";
|
|
149
|
+
(r.target == e || r.source == e) && t.push(r);
|
|
150
|
+
}), t;
|
|
151
|
+
}, l.prototype.getNeighborsList = function() {
|
|
152
|
+
var e = /* @__PURE__ */ new Set(), t = this;
|
|
153
|
+
return t.edges.forEach(function(n) {
|
|
154
|
+
if (n.source == t) e.add(n.target);
|
|
155
|
+
else {
|
|
156
|
+
if (n.target != t) throw "Incorrect incidency!";
|
|
157
|
+
e.add(n.source);
|
|
158
|
+
}
|
|
159
|
+
}), e;
|
|
160
|
+
}, l.prototype.withChildren = function() {
|
|
161
|
+
var e = /* @__PURE__ */ new Set(), t, n;
|
|
162
|
+
if (e.add(this), this.child != null) for (var r = this.child.getNodes(), i = 0; i < r.length; i++) t = r[i], n = t.withChildren(), n.forEach(function(t) {
|
|
163
|
+
e.add(t);
|
|
164
|
+
});
|
|
165
|
+
return e;
|
|
166
|
+
}, l.prototype.getNoOfChildren = function() {
|
|
167
|
+
var e = 0, t;
|
|
168
|
+
if (this.child == null) e = 1;
|
|
169
|
+
else for (var n = this.child.getNodes(), r = 0; r < n.length; r++) t = n[r], e += t.getNoOfChildren();
|
|
170
|
+
return e == 0 && (e = 1), e;
|
|
171
|
+
}, l.prototype.getEstimatedSize = function() {
|
|
172
|
+
if (this.estimatedSize == i.MIN_VALUE) throw "assert failed";
|
|
173
|
+
return this.estimatedSize;
|
|
174
|
+
}, l.prototype.calcEstimatedSize = function() {
|
|
175
|
+
return this.child == null ? this.estimatedSize = (this.rect.width + this.rect.height) / 2 : (this.estimatedSize = this.child.calcEstimatedSize(), this.rect.width = this.estimatedSize, this.rect.height = this.estimatedSize, this.estimatedSize);
|
|
176
|
+
}, l.prototype.scatter = function() {
|
|
177
|
+
var e, t, n = -o.INITIAL_WORLD_BOUNDARY, r = o.INITIAL_WORLD_BOUNDARY;
|
|
178
|
+
e = o.WORLD_CENTER_X + s.nextDouble() * (r - n) + n;
|
|
179
|
+
var i = -o.INITIAL_WORLD_BOUNDARY, a = o.INITIAL_WORLD_BOUNDARY;
|
|
180
|
+
t = o.WORLD_CENTER_Y + s.nextDouble() * (a - i) + i, this.rect.x = e, this.rect.y = t;
|
|
181
|
+
}, l.prototype.updateBounds = function() {
|
|
182
|
+
if (this.getChild() == null) throw "assert failed";
|
|
183
|
+
if (this.getChild().getNodes().length != 0) {
|
|
184
|
+
var e = this.getChild();
|
|
185
|
+
if (e.updateBounds(!0), this.rect.x = e.getLeft(), this.rect.y = e.getTop(), this.setWidth(e.getRight() - e.getLeft()), this.setHeight(e.getBottom() - e.getTop()), o.NODE_DIMENSIONS_INCLUDE_LABELS) {
|
|
186
|
+
var t = e.getRight() - e.getLeft(), n = e.getBottom() - e.getTop();
|
|
187
|
+
this.labelWidth > t && (this.rect.x -= (this.labelWidth - t) / 2, this.setWidth(this.labelWidth)), this.labelHeight > n && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - n) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - n), this.setHeight(this.labelHeight));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}, l.prototype.getInclusionTreeDepth = function() {
|
|
191
|
+
if (this.inclusionTreeDepth == i.MAX_VALUE) throw "assert failed";
|
|
192
|
+
return this.inclusionTreeDepth;
|
|
193
|
+
}, l.prototype.transform = function(e) {
|
|
194
|
+
var t = this.rect.x;
|
|
195
|
+
t > o.WORLD_BOUNDARY ? t = o.WORLD_BOUNDARY : t < -o.WORLD_BOUNDARY && (t = -o.WORLD_BOUNDARY);
|
|
196
|
+
var n = this.rect.y;
|
|
197
|
+
n > o.WORLD_BOUNDARY ? n = o.WORLD_BOUNDARY : n < -o.WORLD_BOUNDARY && (n = -o.WORLD_BOUNDARY);
|
|
198
|
+
var r = new c(t, n), i = e.inverseTransformPoint(r);
|
|
199
|
+
this.setLocation(i.x, i.y);
|
|
200
|
+
}, l.prototype.getLeft = function() {
|
|
201
|
+
return this.rect.x;
|
|
202
|
+
}, l.prototype.getRight = function() {
|
|
203
|
+
return this.rect.x + this.rect.width;
|
|
204
|
+
}, l.prototype.getTop = function() {
|
|
205
|
+
return this.rect.y;
|
|
206
|
+
}, l.prototype.getBottom = function() {
|
|
207
|
+
return this.rect.y + this.rect.height;
|
|
208
|
+
}, l.prototype.getParent = function() {
|
|
209
|
+
return this.owner == null ? null : this.owner.getParent();
|
|
210
|
+
}, e.exports = l;
|
|
211
|
+
}),
|
|
212
|
+
(function(e, t, n) {
|
|
213
|
+
function r(e, t) {
|
|
214
|
+
e == null && t == null ? (this.x = 0, this.y = 0) : (this.x = e, this.y = t);
|
|
215
|
+
}
|
|
216
|
+
r.prototype.getX = function() {
|
|
217
|
+
return this.x;
|
|
218
|
+
}, r.prototype.getY = function() {
|
|
219
|
+
return this.y;
|
|
220
|
+
}, r.prototype.setX = function(e) {
|
|
221
|
+
this.x = e;
|
|
222
|
+
}, r.prototype.setY = function(e) {
|
|
223
|
+
this.y = e;
|
|
224
|
+
}, r.prototype.getDifference = function(e) {
|
|
225
|
+
return new DimensionD(this.x - e.x, this.y - e.y);
|
|
226
|
+
}, r.prototype.getCopy = function() {
|
|
227
|
+
return new r(this.x, this.y);
|
|
228
|
+
}, r.prototype.translate = function(e) {
|
|
229
|
+
return this.x += e.width, this.y += e.height, this;
|
|
230
|
+
}, e.exports = r;
|
|
231
|
+
}),
|
|
232
|
+
(function(e, t, n) {
|
|
233
|
+
var r = n(2), i = n(10), a = n(0), o = n(6), s = n(3), c = n(1), l = n(13), u = n(12), d = n(11);
|
|
234
|
+
function f(e, t, n) {
|
|
235
|
+
r.call(this, n), this.estimatedSize = i.MIN_VALUE, this.margin = a.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = e, t != null && t instanceof o ? this.graphManager = t : t != null && t instanceof Layout && (this.graphManager = t.graphManager);
|
|
236
|
+
}
|
|
237
|
+
for (var p in f.prototype = Object.create(r.prototype), r) f[p] = r[p];
|
|
238
|
+
f.prototype.getNodes = function() {
|
|
239
|
+
return this.nodes;
|
|
240
|
+
}, f.prototype.getEdges = function() {
|
|
241
|
+
return this.edges;
|
|
242
|
+
}, f.prototype.getGraphManager = function() {
|
|
243
|
+
return this.graphManager;
|
|
244
|
+
}, f.prototype.getParent = function() {
|
|
245
|
+
return this.parent;
|
|
246
|
+
}, f.prototype.getLeft = function() {
|
|
247
|
+
return this.left;
|
|
248
|
+
}, f.prototype.getRight = function() {
|
|
249
|
+
return this.right;
|
|
250
|
+
}, f.prototype.getTop = function() {
|
|
251
|
+
return this.top;
|
|
252
|
+
}, f.prototype.getBottom = function() {
|
|
253
|
+
return this.bottom;
|
|
254
|
+
}, f.prototype.isConnected = function() {
|
|
255
|
+
return this.isConnected;
|
|
256
|
+
}, f.prototype.add = function(e, t, n) {
|
|
257
|
+
if (t == null && n == null) {
|
|
258
|
+
var r = e;
|
|
259
|
+
if (this.graphManager == null) throw "Graph has no graph mgr!";
|
|
260
|
+
if (this.getNodes().indexOf(r) > -1) throw "Node already in graph!";
|
|
261
|
+
return r.owner = this, this.getNodes().push(r), r;
|
|
262
|
+
} else {
|
|
263
|
+
var i = e;
|
|
264
|
+
if (!(this.getNodes().indexOf(t) > -1 && this.getNodes().indexOf(n) > -1)) throw "Source or target not in graph!";
|
|
265
|
+
if (!(t.owner == n.owner && t.owner == this)) throw "Both owners must be this graph!";
|
|
266
|
+
return t.owner == n.owner ? (i.source = t, i.target = n, i.isInterGraph = !1, this.getEdges().push(i), t.edges.push(i), n != t && n.edges.push(i), i) : null;
|
|
267
|
+
}
|
|
268
|
+
}, f.prototype.remove = function(e) {
|
|
269
|
+
var t = e;
|
|
270
|
+
if (e instanceof s) {
|
|
271
|
+
if (t == null) throw "Node is null!";
|
|
272
|
+
if (!(t.owner != null && t.owner == this)) throw "Owner graph is invalid!";
|
|
273
|
+
if (this.graphManager == null) throw "Owner graph manager is invalid!";
|
|
274
|
+
for (var n = t.edges.slice(), r, i = n.length, a = 0; a < i; a++) r = n[a], r.isInterGraph ? this.graphManager.remove(r) : r.source.owner.remove(r);
|
|
275
|
+
var o = this.nodes.indexOf(t);
|
|
276
|
+
if (o == -1) throw "Node not in owner node list!";
|
|
277
|
+
this.nodes.splice(o, 1);
|
|
278
|
+
} else if (e instanceof c) {
|
|
279
|
+
var r = e;
|
|
280
|
+
if (r == null) throw "Edge is null!";
|
|
281
|
+
if (!(r.source != null && r.target != null)) throw "Source and/or target is null!";
|
|
282
|
+
if (!(r.source.owner != null && r.target.owner != null && r.source.owner == this && r.target.owner == this)) throw "Source and/or target owner is invalid!";
|
|
283
|
+
var l = r.source.edges.indexOf(r), u = r.target.edges.indexOf(r);
|
|
284
|
+
if (!(l > -1 && u > -1)) throw "Source and/or target doesn't know this edge!";
|
|
285
|
+
r.source.edges.splice(l, 1), r.target != r.source && r.target.edges.splice(u, 1);
|
|
286
|
+
var o = r.source.owner.getEdges().indexOf(r);
|
|
287
|
+
if (o == -1) throw "Not in owner's edge list!";
|
|
288
|
+
r.source.owner.getEdges().splice(o, 1);
|
|
289
|
+
}
|
|
290
|
+
}, f.prototype.updateLeftTop = function() {
|
|
291
|
+
for (var e = i.MAX_VALUE, t = i.MAX_VALUE, n, r, a, o = this.getNodes(), s = o.length, c = 0; c < s; c++) {
|
|
292
|
+
var l = o[c];
|
|
293
|
+
n = l.getTop(), r = l.getLeft(), e > n && (e = n), t > r && (t = r);
|
|
294
|
+
}
|
|
295
|
+
return e == i.MAX_VALUE ? null : (a = o[0].getParent().paddingLeft == null ? this.margin : o[0].getParent().paddingLeft, this.left = t - a, this.top = e - a, new u(this.left, this.top));
|
|
296
|
+
}, f.prototype.updateBounds = function(e) {
|
|
297
|
+
for (var t = i.MAX_VALUE, n = -i.MAX_VALUE, r = i.MAX_VALUE, a = -i.MAX_VALUE, o, s, c, u, d, f = this.nodes, p = f.length, m = 0; m < p; m++) {
|
|
298
|
+
var h = f[m];
|
|
299
|
+
e && h.child != null && h.updateBounds(), o = h.getLeft(), s = h.getRight(), c = h.getTop(), u = h.getBottom(), t > o && (t = o), n < s && (n = s), r > c && (r = c), a < u && (a = u);
|
|
300
|
+
}
|
|
301
|
+
var g = new l(t, r, n - t, a - r);
|
|
302
|
+
t == i.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), d = f[0].getParent().paddingLeft == null ? this.margin : f[0].getParent().paddingLeft, this.left = g.x - d, this.right = g.x + g.width + d, this.top = g.y - d, this.bottom = g.y + g.height + d;
|
|
303
|
+
}, f.calculateBounds = function(e) {
|
|
304
|
+
for (var t = i.MAX_VALUE, n = -i.MAX_VALUE, r = i.MAX_VALUE, a = -i.MAX_VALUE, o, s, c, u, d = e.length, f = 0; f < d; f++) {
|
|
305
|
+
var p = e[f];
|
|
306
|
+
o = p.getLeft(), s = p.getRight(), c = p.getTop(), u = p.getBottom(), t > o && (t = o), n < s && (n = s), r > c && (r = c), a < u && (a = u);
|
|
307
|
+
}
|
|
308
|
+
return new l(t, r, n - t, a - r);
|
|
309
|
+
}, f.prototype.getInclusionTreeDepth = function() {
|
|
310
|
+
return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
|
|
311
|
+
}, f.prototype.getEstimatedSize = function() {
|
|
312
|
+
if (this.estimatedSize == i.MIN_VALUE) throw "assert failed";
|
|
313
|
+
return this.estimatedSize;
|
|
314
|
+
}, f.prototype.calcEstimatedSize = function() {
|
|
315
|
+
for (var e = 0, t = this.nodes, n = t.length, r = 0; r < n; r++) {
|
|
316
|
+
var i = t[r];
|
|
317
|
+
e += i.calcEstimatedSize();
|
|
318
|
+
}
|
|
319
|
+
return e == 0 ? this.estimatedSize = a.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = e / Math.sqrt(this.nodes.length), this.estimatedSize;
|
|
320
|
+
}, f.prototype.updateConnected = function() {
|
|
321
|
+
var e = this;
|
|
322
|
+
if (this.nodes.length == 0) {
|
|
323
|
+
this.isConnected = !0;
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
var t = new d(), n = /* @__PURE__ */ new Set(), r = this.nodes[0], i, a;
|
|
327
|
+
for (r.withChildren().forEach(function(e) {
|
|
328
|
+
t.push(e), n.add(e);
|
|
329
|
+
}); t.length !== 0;) {
|
|
330
|
+
r = t.shift(), i = r.getEdges();
|
|
331
|
+
for (var o = i.length, s = 0; s < o; s++) a = i[s].getOtherEndInGraph(r, this), a != null && !n.has(a) && a.withChildren().forEach(function(e) {
|
|
332
|
+
t.push(e), n.add(e);
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
if (this.isConnected = !1, n.size >= this.nodes.length) {
|
|
336
|
+
var c = 0;
|
|
337
|
+
n.forEach(function(t) {
|
|
338
|
+
t.owner == e && c++;
|
|
339
|
+
}), c == this.nodes.length && (this.isConnected = !0);
|
|
340
|
+
}
|
|
341
|
+
}, e.exports = f;
|
|
342
|
+
}),
|
|
343
|
+
(function(e, t, n) {
|
|
344
|
+
var r, i = n(1);
|
|
345
|
+
function a(e) {
|
|
346
|
+
r = n(5), this.layout = e, this.graphs = [], this.edges = [];
|
|
347
|
+
}
|
|
348
|
+
a.prototype.addRoot = function() {
|
|
349
|
+
var e = this.layout.newGraph(), t = this.layout.newNode(null), n = this.add(e, t);
|
|
350
|
+
return this.setRootGraph(n), this.rootGraph;
|
|
351
|
+
}, a.prototype.add = function(e, t, n, r, i) {
|
|
352
|
+
if (n == null && r == null && i == null) {
|
|
353
|
+
if (e == null) throw "Graph is null!";
|
|
354
|
+
if (t == null) throw "Parent node is null!";
|
|
355
|
+
if (this.graphs.indexOf(e) > -1) throw "Graph already in this graph mgr!";
|
|
356
|
+
if (this.graphs.push(e), e.parent != null) throw "Already has a parent!";
|
|
357
|
+
if (t.child != null) throw "Already has a child!";
|
|
358
|
+
return e.parent = t, t.child = e, e;
|
|
359
|
+
} else {
|
|
360
|
+
i = n, r = t, n = e;
|
|
361
|
+
var a = r.getOwner(), o = i.getOwner();
|
|
362
|
+
if (!(a != null && a.getGraphManager() == this)) throw "Source not in this graph mgr!";
|
|
363
|
+
if (!(o != null && o.getGraphManager() == this)) throw "Target not in this graph mgr!";
|
|
364
|
+
if (a == o) return n.isInterGraph = !1, a.add(n, r, i);
|
|
365
|
+
if (n.isInterGraph = !0, n.source = r, n.target = i, this.edges.indexOf(n) > -1) throw "Edge already in inter-graph edge list!";
|
|
366
|
+
if (this.edges.push(n), !(n.source != null && n.target != null)) throw "Edge source and/or target is null!";
|
|
367
|
+
if (!(n.source.edges.indexOf(n) == -1 && n.target.edges.indexOf(n) == -1)) throw "Edge already in source and/or target incidency list!";
|
|
368
|
+
return n.source.edges.push(n), n.target.edges.push(n), n;
|
|
369
|
+
}
|
|
370
|
+
}, a.prototype.remove = function(e) {
|
|
371
|
+
if (e instanceof r) {
|
|
372
|
+
var t = e;
|
|
373
|
+
if (t.getGraphManager() != this) throw "Graph not in this graph mgr";
|
|
374
|
+
if (!(t == this.rootGraph || t.parent != null && t.parent.graphManager == this)) throw "Invalid parent node!";
|
|
375
|
+
var n = [];
|
|
376
|
+
n = n.concat(t.getEdges());
|
|
377
|
+
for (var a, o = n.length, s = 0; s < o; s++) a = n[s], t.remove(a);
|
|
378
|
+
var c = [];
|
|
379
|
+
c = c.concat(t.getNodes());
|
|
380
|
+
var l;
|
|
381
|
+
o = c.length;
|
|
382
|
+
for (var s = 0; s < o; s++) l = c[s], t.remove(l);
|
|
383
|
+
t == this.rootGraph && this.setRootGraph(null);
|
|
384
|
+
var u = this.graphs.indexOf(t);
|
|
385
|
+
this.graphs.splice(u, 1), t.parent = null;
|
|
386
|
+
} else if (e instanceof i) {
|
|
387
|
+
if (a = e, a == null) throw "Edge is null!";
|
|
388
|
+
if (!a.isInterGraph) throw "Not an inter-graph edge!";
|
|
389
|
+
if (!(a.source != null && a.target != null)) throw "Source and/or target is null!";
|
|
390
|
+
if (!(a.source.edges.indexOf(a) != -1 && a.target.edges.indexOf(a) != -1)) throw "Source and/or target doesn't know this edge!";
|
|
391
|
+
var u = a.source.edges.indexOf(a);
|
|
392
|
+
if (a.source.edges.splice(u, 1), u = a.target.edges.indexOf(a), a.target.edges.splice(u, 1), !(a.source.owner != null && a.source.owner.getGraphManager() != null)) throw "Edge owner graph or owner graph manager is null!";
|
|
393
|
+
if (a.source.owner.getGraphManager().edges.indexOf(a) == -1) throw "Not in owner graph manager's edge list!";
|
|
394
|
+
var u = a.source.owner.getGraphManager().edges.indexOf(a);
|
|
395
|
+
a.source.owner.getGraphManager().edges.splice(u, 1);
|
|
396
|
+
}
|
|
397
|
+
}, a.prototype.updateBounds = function() {
|
|
398
|
+
this.rootGraph.updateBounds(!0);
|
|
399
|
+
}, a.prototype.getGraphs = function() {
|
|
400
|
+
return this.graphs;
|
|
401
|
+
}, a.prototype.getAllNodes = function() {
|
|
402
|
+
if (this.allNodes == null) {
|
|
403
|
+
for (var e = [], t = this.getGraphs(), n = t.length, r = 0; r < n; r++) e = e.concat(t[r].getNodes());
|
|
404
|
+
this.allNodes = e;
|
|
405
|
+
}
|
|
406
|
+
return this.allNodes;
|
|
407
|
+
}, a.prototype.resetAllNodes = function() {
|
|
408
|
+
this.allNodes = null;
|
|
409
|
+
}, a.prototype.resetAllEdges = function() {
|
|
410
|
+
this.allEdges = null;
|
|
411
|
+
}, a.prototype.resetAllNodesToApplyGravitation = function() {
|
|
412
|
+
this.allNodesToApplyGravitation = null;
|
|
413
|
+
}, a.prototype.getAllEdges = function() {
|
|
414
|
+
if (this.allEdges == null) {
|
|
415
|
+
var e = [], t = this.getGraphs();
|
|
416
|
+
t.length;
|
|
417
|
+
for (var n = 0; n < t.length; n++) e = e.concat(t[n].getEdges());
|
|
418
|
+
e = e.concat(this.edges), this.allEdges = e;
|
|
419
|
+
}
|
|
420
|
+
return this.allEdges;
|
|
421
|
+
}, a.prototype.getAllNodesToApplyGravitation = function() {
|
|
422
|
+
return this.allNodesToApplyGravitation;
|
|
423
|
+
}, a.prototype.setAllNodesToApplyGravitation = function(e) {
|
|
424
|
+
if (this.allNodesToApplyGravitation != null) throw "assert failed";
|
|
425
|
+
this.allNodesToApplyGravitation = e;
|
|
426
|
+
}, a.prototype.getRoot = function() {
|
|
427
|
+
return this.rootGraph;
|
|
428
|
+
}, a.prototype.setRootGraph = function(e) {
|
|
429
|
+
if (e.getGraphManager() != this) throw "Root not in this graph mgr!";
|
|
430
|
+
this.rootGraph = e, e.parent ??= this.layout.newNode("Root node");
|
|
431
|
+
}, a.prototype.getLayout = function() {
|
|
432
|
+
return this.layout;
|
|
433
|
+
}, a.prototype.isOneAncestorOfOther = function(e, t) {
|
|
434
|
+
if (!(e != null && t != null)) throw "assert failed";
|
|
435
|
+
if (e == t) return !0;
|
|
436
|
+
var n = e.getOwner(), r;
|
|
437
|
+
do {
|
|
438
|
+
if (r = n.getParent(), r == null) break;
|
|
439
|
+
if (r == t) return !0;
|
|
440
|
+
if (n = r.getOwner(), n == null) break;
|
|
441
|
+
} while (!0);
|
|
442
|
+
n = t.getOwner();
|
|
443
|
+
do {
|
|
444
|
+
if (r = n.getParent(), r == null) break;
|
|
445
|
+
if (r == e) return !0;
|
|
446
|
+
if (n = r.getOwner(), n == null) break;
|
|
447
|
+
} while (!0);
|
|
448
|
+
return !1;
|
|
449
|
+
}, a.prototype.calcLowestCommonAncestors = function() {
|
|
450
|
+
for (var e, t, n, r, i, a = this.getAllEdges(), o = a.length, s = 0; s < o; s++) {
|
|
451
|
+
if (e = a[s], t = e.source, n = e.target, e.lca = null, e.sourceInLca = t, e.targetInLca = n, t == n) {
|
|
452
|
+
e.lca = t.getOwner();
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
for (r = t.getOwner(); e.lca == null;) {
|
|
456
|
+
for (e.targetInLca = n, i = n.getOwner(); e.lca == null;) {
|
|
457
|
+
if (i == r) {
|
|
458
|
+
e.lca = i;
|
|
459
|
+
break;
|
|
460
|
+
}
|
|
461
|
+
if (i == this.rootGraph) break;
|
|
462
|
+
if (e.lca != null) throw "assert failed";
|
|
463
|
+
e.targetInLca = i.getParent(), i = e.targetInLca.getOwner();
|
|
464
|
+
}
|
|
465
|
+
if (r == this.rootGraph) break;
|
|
466
|
+
e.lca ?? (e.sourceInLca = r.getParent(), r = e.sourceInLca.getOwner());
|
|
467
|
+
}
|
|
468
|
+
if (e.lca == null) throw "assert failed";
|
|
469
|
+
}
|
|
470
|
+
}, a.prototype.calcLowestCommonAncestor = function(e, t) {
|
|
471
|
+
if (e == t) return e.getOwner();
|
|
472
|
+
var n = e.getOwner();
|
|
473
|
+
do {
|
|
474
|
+
if (n == null) break;
|
|
475
|
+
var r = t.getOwner();
|
|
476
|
+
do {
|
|
477
|
+
if (r == null) break;
|
|
478
|
+
if (r == n) return r;
|
|
479
|
+
r = r.getParent().getOwner();
|
|
480
|
+
} while (!0);
|
|
481
|
+
n = n.getParent().getOwner();
|
|
482
|
+
} while (!0);
|
|
483
|
+
return n;
|
|
484
|
+
}, a.prototype.calcInclusionTreeDepths = function(e, t) {
|
|
485
|
+
e == null && t == null && (e = this.rootGraph, t = 1);
|
|
486
|
+
for (var n, r = e.getNodes(), i = r.length, a = 0; a < i; a++) n = r[a], n.inclusionTreeDepth = t, n.child != null && this.calcInclusionTreeDepths(n.child, t + 1);
|
|
487
|
+
}, a.prototype.includesInvalidEdge = function() {
|
|
488
|
+
for (var e, t = this.edges.length, n = 0; n < t; n++) if (e = this.edges[n], this.isOneAncestorOfOther(e.source, e.target)) return !0;
|
|
489
|
+
return !1;
|
|
490
|
+
}, e.exports = a;
|
|
491
|
+
}),
|
|
492
|
+
(function(e, t, n) {
|
|
493
|
+
var r = n(0);
|
|
494
|
+
function i() {}
|
|
495
|
+
for (var a in r) i[a] = r[a];
|
|
496
|
+
i.MAX_ITERATIONS = 2500, i.DEFAULT_EDGE_LENGTH = 50, i.DEFAULT_SPRING_STRENGTH = .45, i.DEFAULT_REPULSION_STRENGTH = 4500, i.DEFAULT_GRAVITY_STRENGTH = .4, i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, i.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, i.DEFAULT_COOLING_FACTOR_INCREMENTAL = .3, i.COOLING_ADAPTATION_FACTOR = .33, i.ADAPTATION_LOWER_NODE_LIMIT = 1e3, i.ADAPTATION_UPPER_NODE_LIMIT = 5e3, i.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, i.MAX_NODE_DISPLACEMENT = i.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, i.MIN_REPULSION_DIST = i.DEFAULT_EDGE_LENGTH / 10, i.CONVERGENCE_CHECK_PERIOD = 100, i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = .1, i.MIN_EDGE_LENGTH = 1, i.GRID_CALCULATION_CHECK_PERIOD = 10, e.exports = i;
|
|
497
|
+
}),
|
|
498
|
+
(function(e, t, n) {
|
|
499
|
+
var r = n(12);
|
|
500
|
+
function i() {}
|
|
501
|
+
i.calcSeparationAmount = function(e, t, n, r) {
|
|
502
|
+
if (!e.intersects(t)) throw "assert failed";
|
|
503
|
+
var i = [, ,];
|
|
504
|
+
this.decideDirectionsForOverlappingNodes(e, t, i), n[0] = Math.min(e.getRight(), t.getRight()) - Math.max(e.x, t.x), n[1] = Math.min(e.getBottom(), t.getBottom()) - Math.max(e.y, t.y), e.getX() <= t.getX() && e.getRight() >= t.getRight() ? n[0] += Math.min(t.getX() - e.getX(), e.getRight() - t.getRight()) : t.getX() <= e.getX() && t.getRight() >= e.getRight() && (n[0] += Math.min(e.getX() - t.getX(), t.getRight() - e.getRight())), e.getY() <= t.getY() && e.getBottom() >= t.getBottom() ? n[1] += Math.min(t.getY() - e.getY(), e.getBottom() - t.getBottom()) : t.getY() <= e.getY() && t.getBottom() >= e.getBottom() && (n[1] += Math.min(e.getY() - t.getY(), t.getBottom() - e.getBottom()));
|
|
505
|
+
var a = Math.abs((t.getCenterY() - e.getCenterY()) / (t.getCenterX() - e.getCenterX()));
|
|
506
|
+
t.getCenterY() === e.getCenterY() && t.getCenterX() === e.getCenterX() && (a = 1);
|
|
507
|
+
var o = a * n[0], s = n[1] / a;
|
|
508
|
+
n[0] < s ? s = n[0] : o = n[1], n[0] = -1 * i[0] * (s / 2 + r), n[1] = -1 * i[1] * (o / 2 + r);
|
|
509
|
+
}, i.decideDirectionsForOverlappingNodes = function(e, t, n) {
|
|
510
|
+
e.getCenterX() < t.getCenterX() ? n[0] = -1 : n[0] = 1, e.getCenterY() < t.getCenterY() ? n[1] = -1 : n[1] = 1;
|
|
511
|
+
}, i.getIntersection2 = function(e, t, n) {
|
|
512
|
+
var r = e.getCenterX(), i = e.getCenterY(), a = t.getCenterX(), o = t.getCenterY();
|
|
513
|
+
if (e.intersects(t)) return n[0] = r, n[1] = i, n[2] = a, n[3] = o, !0;
|
|
514
|
+
var s = e.getX(), c = e.getY(), l = e.getRight(), u = e.getX(), d = e.getBottom(), f = e.getRight(), p = e.getWidthHalf(), m = e.getHeightHalf(), h = t.getX(), g = t.getY(), _ = t.getRight(), v = t.getX(), y = t.getBottom(), b = t.getRight(), x = t.getWidthHalf(), S = t.getHeightHalf(), C = !1, w = !1;
|
|
515
|
+
if (r === a) {
|
|
516
|
+
if (i > o) return n[0] = r, n[1] = c, n[2] = a, n[3] = y, !1;
|
|
517
|
+
if (i < o) return n[0] = r, n[1] = d, n[2] = a, n[3] = g, !1;
|
|
518
|
+
} else if (i === o) {
|
|
519
|
+
if (r > a) return n[0] = s, n[1] = i, n[2] = _, n[3] = o, !1;
|
|
520
|
+
if (r < a) return n[0] = l, n[1] = i, n[2] = h, n[3] = o, !1;
|
|
521
|
+
} else {
|
|
522
|
+
var T = e.height / e.width, E = t.height / t.width, D = (o - i) / (a - r), O = void 0, k = void 0, A = void 0, j = void 0, M = void 0, N = void 0;
|
|
523
|
+
if (-T === D ? r > a ? (n[0] = u, n[1] = d, C = !0) : (n[0] = l, n[1] = c, C = !0) : T === D && (r > a ? (n[0] = s, n[1] = c, C = !0) : (n[0] = f, n[1] = d, C = !0)), -E === D ? a > r ? (n[2] = v, n[3] = y, w = !0) : (n[2] = _, n[3] = g, w = !0) : E === D && (a > r ? (n[2] = h, n[3] = g, w = !0) : (n[2] = b, n[3] = y, w = !0)), C && w) return !1;
|
|
524
|
+
if (r > a ? i > o ? (O = this.getCardinalDirection(T, D, 4), k = this.getCardinalDirection(E, D, 2)) : (O = this.getCardinalDirection(-T, D, 3), k = this.getCardinalDirection(-E, D, 1)) : i > o ? (O = this.getCardinalDirection(-T, D, 1), k = this.getCardinalDirection(-E, D, 3)) : (O = this.getCardinalDirection(T, D, 2), k = this.getCardinalDirection(E, D, 4)), !C) switch (O) {
|
|
525
|
+
case 1:
|
|
526
|
+
j = c, A = r + -m / D, n[0] = A, n[1] = j;
|
|
527
|
+
break;
|
|
528
|
+
case 2:
|
|
529
|
+
A = f, j = i + p * D, n[0] = A, n[1] = j;
|
|
530
|
+
break;
|
|
531
|
+
case 3:
|
|
532
|
+
j = d, A = r + m / D, n[0] = A, n[1] = j;
|
|
533
|
+
break;
|
|
534
|
+
case 4:
|
|
535
|
+
A = u, j = i + -p * D, n[0] = A, n[1] = j;
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
if (!w) switch (k) {
|
|
539
|
+
case 1:
|
|
540
|
+
N = g, M = a + -S / D, n[2] = M, n[3] = N;
|
|
541
|
+
break;
|
|
542
|
+
case 2:
|
|
543
|
+
M = b, N = o + x * D, n[2] = M, n[3] = N;
|
|
544
|
+
break;
|
|
545
|
+
case 3:
|
|
546
|
+
N = y, M = a + S / D, n[2] = M, n[3] = N;
|
|
547
|
+
break;
|
|
548
|
+
case 4:
|
|
549
|
+
M = v, N = o + -x * D, n[2] = M, n[3] = N;
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
return !1;
|
|
554
|
+
}, i.getCardinalDirection = function(e, t, n) {
|
|
555
|
+
return e > t ? n : 1 + n % 4;
|
|
556
|
+
}, i.getIntersection = function(e, t, n, i) {
|
|
557
|
+
if (i == null) return this.getIntersection2(e, t, n);
|
|
558
|
+
var a = e.x, o = e.y, s = t.x, c = t.y, l = n.x, u = n.y, d = i.x, f = i.y, p = void 0, m = void 0, h = void 0, g = void 0, _ = void 0, v = void 0, y = void 0, b = void 0, x = void 0;
|
|
559
|
+
return h = c - o, _ = a - s, y = s * o - a * c, g = f - u, v = l - d, b = d * u - l * f, x = h * v - g * _, x === 0 ? null : (p = (_ * b - v * y) / x, m = (g * y - h * b) / x, new r(p, m));
|
|
560
|
+
}, i.angleOfVector = function(e, t, n, r) {
|
|
561
|
+
var i = void 0;
|
|
562
|
+
return e === n ? i = r < t ? this.ONE_AND_HALF_PI : this.HALF_PI : (i = Math.atan((r - t) / (n - e)), n < e ? i += Math.PI : r < t && (i += this.TWO_PI)), i;
|
|
563
|
+
}, i.doIntersect = function(e, t, n, r) {
|
|
564
|
+
var i = e.x, a = e.y, o = t.x, s = t.y, c = n.x, l = n.y, u = r.x, d = r.y, f = (o - i) * (d - l) - (u - c) * (s - a);
|
|
565
|
+
if (f === 0) return !1;
|
|
566
|
+
var p = ((d - l) * (u - i) + (c - u) * (d - a)) / f, m = ((a - s) * (u - i) + (o - i) * (d - a)) / f;
|
|
567
|
+
return 0 < p && p < 1 && 0 < m && m < 1;
|
|
568
|
+
}, i.HALF_PI = .5 * Math.PI, i.ONE_AND_HALF_PI = 1.5 * Math.PI, i.TWO_PI = 2 * Math.PI, i.THREE_PI = 3 * Math.PI, e.exports = i;
|
|
569
|
+
}),
|
|
570
|
+
(function(e, t, n) {
|
|
571
|
+
function r() {}
|
|
572
|
+
r.sign = function(e) {
|
|
573
|
+
return e > 0 ? 1 : e < 0 ? -1 : 0;
|
|
574
|
+
}, r.floor = function(e) {
|
|
575
|
+
return e < 0 ? Math.ceil(e) : Math.floor(e);
|
|
576
|
+
}, r.ceil = function(e) {
|
|
577
|
+
return e < 0 ? Math.floor(e) : Math.ceil(e);
|
|
578
|
+
}, e.exports = r;
|
|
579
|
+
}),
|
|
580
|
+
(function(e, t, n) {
|
|
581
|
+
function r() {}
|
|
582
|
+
r.MAX_VALUE = 2147483647, r.MIN_VALUE = -2147483648, e.exports = r;
|
|
583
|
+
}),
|
|
584
|
+
(function(e, t, n) {
|
|
585
|
+
var r = function() {
|
|
586
|
+
function e(e, t) {
|
|
587
|
+
for (var n = 0; n < t.length; n++) {
|
|
588
|
+
var r = t[n];
|
|
589
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
return function(t, n, r) {
|
|
593
|
+
return n && e(t.prototype, n), r && e(t, r), t;
|
|
594
|
+
};
|
|
595
|
+
}();
|
|
596
|
+
function i(e, t) {
|
|
597
|
+
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
598
|
+
}
|
|
599
|
+
var a = function(e) {
|
|
600
|
+
return {
|
|
601
|
+
value: e,
|
|
602
|
+
next: null,
|
|
603
|
+
prev: null
|
|
604
|
+
};
|
|
605
|
+
}, o = function(e, t, n, r) {
|
|
606
|
+
return e === null ? r.head = t : e.next = t, n === null ? r.tail = t : n.prev = t, t.prev = e, t.next = n, r.length++, t;
|
|
607
|
+
}, s = function(e, t) {
|
|
608
|
+
var n = e.prev, r = e.next;
|
|
609
|
+
return n === null ? t.head = r : n.next = r, r === null ? t.tail = n : r.prev = n, e.prev = e.next = null, t.length--, e;
|
|
610
|
+
};
|
|
611
|
+
e.exports = function() {
|
|
612
|
+
function e(t) {
|
|
613
|
+
var n = this;
|
|
614
|
+
i(this, e), this.length = 0, this.head = null, this.tail = null, t?.forEach(function(e) {
|
|
615
|
+
return n.push(e);
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
return r(e, [
|
|
619
|
+
{
|
|
620
|
+
key: "size",
|
|
621
|
+
value: function() {
|
|
622
|
+
return this.length;
|
|
623
|
+
}
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
key: "insertBefore",
|
|
627
|
+
value: function(e, t) {
|
|
628
|
+
return o(t.prev, a(e), t, this);
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
key: "insertAfter",
|
|
633
|
+
value: function(e, t) {
|
|
634
|
+
return o(t, a(e), t.next, this);
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
key: "insertNodeBefore",
|
|
639
|
+
value: function(e, t) {
|
|
640
|
+
return o(t.prev, e, t, this);
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
key: "insertNodeAfter",
|
|
645
|
+
value: function(e, t) {
|
|
646
|
+
return o(t, e, t.next, this);
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
key: "push",
|
|
651
|
+
value: function(e) {
|
|
652
|
+
return o(this.tail, a(e), null, this);
|
|
653
|
+
}
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
key: "unshift",
|
|
657
|
+
value: function(e) {
|
|
658
|
+
return o(null, a(e), this.head, this);
|
|
659
|
+
}
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
key: "remove",
|
|
663
|
+
value: function(e) {
|
|
664
|
+
return s(e, this);
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
key: "pop",
|
|
669
|
+
value: function() {
|
|
670
|
+
return s(this.tail, this).value;
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
key: "popNode",
|
|
675
|
+
value: function() {
|
|
676
|
+
return s(this.tail, this);
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
key: "shift",
|
|
681
|
+
value: function() {
|
|
682
|
+
return s(this.head, this).value;
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
key: "shiftNode",
|
|
687
|
+
value: function() {
|
|
688
|
+
return s(this.head, this);
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
key: "get_object_at",
|
|
693
|
+
value: function(e) {
|
|
694
|
+
if (e <= this.length()) {
|
|
695
|
+
for (var t = 1, n = this.head; t < e;) n = n.next, t++;
|
|
696
|
+
return n.value;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
key: "set_object_at",
|
|
702
|
+
value: function(e, t) {
|
|
703
|
+
if (e <= this.length()) {
|
|
704
|
+
for (var n = 1, r = this.head; n < e;) r = r.next, n++;
|
|
705
|
+
r.value = t;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
]), e;
|
|
710
|
+
}();
|
|
711
|
+
}),
|
|
712
|
+
(function(e, t, n) {
|
|
713
|
+
function r(e, t, n) {
|
|
714
|
+
this.x = null, this.y = null, e == null && t == null && n == null ? (this.x = 0, this.y = 0) : typeof e == "number" && typeof t == "number" && n == null ? (this.x = e, this.y = t) : e.constructor.name == "Point" && t == null && n == null && (n = e, this.x = n.x, this.y = n.y);
|
|
715
|
+
}
|
|
716
|
+
r.prototype.getX = function() {
|
|
717
|
+
return this.x;
|
|
718
|
+
}, r.prototype.getY = function() {
|
|
719
|
+
return this.y;
|
|
720
|
+
}, r.prototype.getLocation = function() {
|
|
721
|
+
return new r(this.x, this.y);
|
|
722
|
+
}, r.prototype.setLocation = function(e, t, n) {
|
|
723
|
+
e.constructor.name == "Point" && t == null && n == null ? (n = e, this.setLocation(n.x, n.y)) : typeof e == "number" && typeof t == "number" && n == null && (parseInt(e) == e && parseInt(t) == t ? this.move(e, t) : (this.x = Math.floor(e + .5), this.y = Math.floor(t + .5)));
|
|
724
|
+
}, r.prototype.move = function(e, t) {
|
|
725
|
+
this.x = e, this.y = t;
|
|
726
|
+
}, r.prototype.translate = function(e, t) {
|
|
727
|
+
this.x += e, this.y += t;
|
|
728
|
+
}, r.prototype.equals = function(e) {
|
|
729
|
+
if (e.constructor.name == "Point") {
|
|
730
|
+
var t = e;
|
|
731
|
+
return this.x == t.x && this.y == t.y;
|
|
732
|
+
}
|
|
733
|
+
return this == e;
|
|
734
|
+
}, r.prototype.toString = function() {
|
|
735
|
+
return new r().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
|
|
736
|
+
}, e.exports = r;
|
|
737
|
+
}),
|
|
738
|
+
(function(e, t, n) {
|
|
739
|
+
function r(e, t, n, r) {
|
|
740
|
+
this.x = 0, this.y = 0, this.width = 0, this.height = 0, e != null && t != null && n != null && r != null && (this.x = e, this.y = t, this.width = n, this.height = r);
|
|
741
|
+
}
|
|
742
|
+
r.prototype.getX = function() {
|
|
743
|
+
return this.x;
|
|
744
|
+
}, r.prototype.setX = function(e) {
|
|
745
|
+
this.x = e;
|
|
746
|
+
}, r.prototype.getY = function() {
|
|
747
|
+
return this.y;
|
|
748
|
+
}, r.prototype.setY = function(e) {
|
|
749
|
+
this.y = e;
|
|
750
|
+
}, r.prototype.getWidth = function() {
|
|
751
|
+
return this.width;
|
|
752
|
+
}, r.prototype.setWidth = function(e) {
|
|
753
|
+
this.width = e;
|
|
754
|
+
}, r.prototype.getHeight = function() {
|
|
755
|
+
return this.height;
|
|
756
|
+
}, r.prototype.setHeight = function(e) {
|
|
757
|
+
this.height = e;
|
|
758
|
+
}, r.prototype.getRight = function() {
|
|
759
|
+
return this.x + this.width;
|
|
760
|
+
}, r.prototype.getBottom = function() {
|
|
761
|
+
return this.y + this.height;
|
|
762
|
+
}, r.prototype.intersects = function(e) {
|
|
763
|
+
return !(this.getRight() < e.x || this.getBottom() < e.y || e.getRight() < this.x || e.getBottom() < this.y);
|
|
764
|
+
}, r.prototype.getCenterX = function() {
|
|
765
|
+
return this.x + this.width / 2;
|
|
766
|
+
}, r.prototype.getMinX = function() {
|
|
767
|
+
return this.getX();
|
|
768
|
+
}, r.prototype.getMaxX = function() {
|
|
769
|
+
return this.getX() + this.width;
|
|
770
|
+
}, r.prototype.getCenterY = function() {
|
|
771
|
+
return this.y + this.height / 2;
|
|
772
|
+
}, r.prototype.getMinY = function() {
|
|
773
|
+
return this.getY();
|
|
774
|
+
}, r.prototype.getMaxY = function() {
|
|
775
|
+
return this.getY() + this.height;
|
|
776
|
+
}, r.prototype.getWidthHalf = function() {
|
|
777
|
+
return this.width / 2;
|
|
778
|
+
}, r.prototype.getHeightHalf = function() {
|
|
779
|
+
return this.height / 2;
|
|
780
|
+
}, e.exports = r;
|
|
781
|
+
}),
|
|
782
|
+
(function(e, t, n) {
|
|
783
|
+
var r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
784
|
+
return typeof e;
|
|
785
|
+
} : function(e) {
|
|
786
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
787
|
+
};
|
|
788
|
+
function i() {}
|
|
789
|
+
i.lastID = 0, i.createID = function(e) {
|
|
790
|
+
return i.isPrimitive(e) ? e : e.uniqueID == null ? (e.uniqueID = i.getString(), i.lastID++, e.uniqueID) : e.uniqueID;
|
|
791
|
+
}, i.getString = function(e) {
|
|
792
|
+
return e ??= i.lastID, "Object#" + e;
|
|
793
|
+
}, i.isPrimitive = function(e) {
|
|
794
|
+
var t = e === void 0 ? "undefined" : r(e);
|
|
795
|
+
return e == null || t != "object" && t != "function";
|
|
796
|
+
}, e.exports = i;
|
|
797
|
+
}),
|
|
798
|
+
(function(e, t, n) {
|
|
799
|
+
function r(e) {
|
|
800
|
+
if (Array.isArray(e)) {
|
|
801
|
+
for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
|
|
802
|
+
return n;
|
|
803
|
+
} else return Array.from(e);
|
|
804
|
+
}
|
|
805
|
+
var i = n(0), a = n(6), o = n(3), s = n(1), c = n(5), l = n(4), u = n(17), d = n(27);
|
|
806
|
+
function f(e) {
|
|
807
|
+
d.call(this), this.layoutQuality = i.QUALITY, this.createBendsAsNeeded = i.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = i.DEFAULT_INCREMENTAL, this.animationOnLayout = i.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = i.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = i.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = i.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new a(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, e != null && (this.isRemoteUse = e);
|
|
808
|
+
}
|
|
809
|
+
f.RANDOM_SEED = 1, f.prototype = Object.create(d.prototype), f.prototype.getGraphManager = function() {
|
|
810
|
+
return this.graphManager;
|
|
811
|
+
}, f.prototype.getAllNodes = function() {
|
|
812
|
+
return this.graphManager.getAllNodes();
|
|
813
|
+
}, f.prototype.getAllEdges = function() {
|
|
814
|
+
return this.graphManager.getAllEdges();
|
|
815
|
+
}, f.prototype.getAllNodesToApplyGravitation = function() {
|
|
816
|
+
return this.graphManager.getAllNodesToApplyGravitation();
|
|
817
|
+
}, f.prototype.newGraphManager = function() {
|
|
818
|
+
var e = new a(this);
|
|
819
|
+
return this.graphManager = e, e;
|
|
820
|
+
}, f.prototype.newGraph = function(e) {
|
|
821
|
+
return new c(null, this.graphManager, e);
|
|
822
|
+
}, f.prototype.newNode = function(e) {
|
|
823
|
+
return new o(this.graphManager, e);
|
|
824
|
+
}, f.prototype.newEdge = function(e) {
|
|
825
|
+
return new s(null, null, e);
|
|
826
|
+
}, f.prototype.checkLayoutSuccess = function() {
|
|
827
|
+
return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
|
|
828
|
+
}, f.prototype.runLayout = function() {
|
|
829
|
+
this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
|
|
830
|
+
var e = this.checkLayoutSuccess() ? !1 : this.layout();
|
|
831
|
+
return i.ANIMATE === "during" ? !1 : (e && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, e);
|
|
832
|
+
}, f.prototype.doPostLayout = function() {
|
|
833
|
+
this.incremental || this.transform(), this.update();
|
|
834
|
+
}, f.prototype.update2 = function() {
|
|
835
|
+
if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
|
|
836
|
+
for (var e = this.graphManager.getAllEdges(), t = 0; t < e.length; t++) e[t];
|
|
837
|
+
for (var n = this.graphManager.getRoot().getNodes(), t = 0; t < n.length; t++) n[t];
|
|
838
|
+
this.update(this.graphManager.getRoot());
|
|
839
|
+
}
|
|
840
|
+
}, f.prototype.update = function(e) {
|
|
841
|
+
if (e == null) this.update2();
|
|
842
|
+
else if (e instanceof o) {
|
|
843
|
+
var t = e;
|
|
844
|
+
if (t.getChild() != null) for (var n = t.getChild().getNodes(), r = 0; r < n.length; r++) update(n[r]);
|
|
845
|
+
t.vGraphObject != null && t.vGraphObject.update(t);
|
|
846
|
+
} else if (e instanceof s) {
|
|
847
|
+
var i = e;
|
|
848
|
+
i.vGraphObject != null && i.vGraphObject.update(i);
|
|
849
|
+
} else if (e instanceof c) {
|
|
850
|
+
var a = e;
|
|
851
|
+
a.vGraphObject != null && a.vGraphObject.update(a);
|
|
852
|
+
}
|
|
853
|
+
}, f.prototype.initParameters = function() {
|
|
854
|
+
this.isSubLayout || (this.layoutQuality = i.QUALITY, this.animationDuringLayout = i.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = i.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = i.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = i.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = i.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = i.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
|
|
855
|
+
}, f.prototype.transform = function(e) {
|
|
856
|
+
if (e == null) this.transform(new l(0, 0));
|
|
857
|
+
else {
|
|
858
|
+
var t = new u(), n = this.graphManager.getRoot().updateLeftTop();
|
|
859
|
+
if (n != null) {
|
|
860
|
+
t.setWorldOrgX(e.x), t.setWorldOrgY(e.y), t.setDeviceOrgX(n.x), t.setDeviceOrgY(n.y);
|
|
861
|
+
for (var r = this.getAllNodes(), i, a = 0; a < r.length; a++) i = r[a], i.transform(t);
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}, f.prototype.positionNodesRandomly = function(e) {
|
|
865
|
+
if (e == null) this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
|
|
866
|
+
else for (var t, n, r = e.getNodes(), i = 0; i < r.length; i++) t = r[i], n = t.getChild(), n == null || n.getNodes().length == 0 ? t.scatter() : (this.positionNodesRandomly(n), t.updateBounds());
|
|
867
|
+
}, f.prototype.getFlatForest = function() {
|
|
868
|
+
for (var e = [], t = !0, n = this.graphManager.getRoot().getNodes(), i = !0, a = 0; a < n.length; a++) n[a].getChild() != null && (i = !1);
|
|
869
|
+
if (!i) return e;
|
|
870
|
+
var o = /* @__PURE__ */ new Set(), s = [], c = /* @__PURE__ */ new Map(), l = [];
|
|
871
|
+
for (l = l.concat(n); l.length > 0 && t;) {
|
|
872
|
+
for (s.push(l[0]); s.length > 0 && t;) {
|
|
873
|
+
var u = s[0];
|
|
874
|
+
s.splice(0, 1), o.add(u);
|
|
875
|
+
for (var d = u.getEdges(), a = 0; a < d.length; a++) {
|
|
876
|
+
var f = d[a].getOtherEnd(u);
|
|
877
|
+
if (c.get(u) != f) if (!o.has(f)) s.push(f), c.set(f, u);
|
|
878
|
+
else {
|
|
879
|
+
t = !1;
|
|
880
|
+
break;
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
if (!t) e = [];
|
|
885
|
+
else {
|
|
886
|
+
var p = [].concat(r(o));
|
|
887
|
+
e.push(p);
|
|
888
|
+
for (var a = 0; a < p.length; a++) {
|
|
889
|
+
var m = p[a], h = l.indexOf(m);
|
|
890
|
+
h > -1 && l.splice(h, 1);
|
|
891
|
+
}
|
|
892
|
+
o = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
return e;
|
|
896
|
+
}, f.prototype.createDummyNodesForBendpoints = function(e) {
|
|
897
|
+
for (var t = [], n = e.source, r = this.graphManager.calcLowestCommonAncestor(e.source, e.target), i = 0; i < e.bendpoints.length; i++) {
|
|
898
|
+
var a = this.newNode(null);
|
|
899
|
+
a.setRect(new Point(0, 0), new Dimension(1, 1)), r.add(a);
|
|
900
|
+
var o = this.newEdge(null);
|
|
901
|
+
this.graphManager.add(o, n, a), t.add(a), n = a;
|
|
902
|
+
}
|
|
903
|
+
var o = this.newEdge(null);
|
|
904
|
+
return this.graphManager.add(o, n, e.target), this.edgeToDummyNodes.set(e, t), e.isInterGraph() ? this.graphManager.remove(e) : r.remove(e), t;
|
|
905
|
+
}, f.prototype.createBendpointsFromDummyNodes = function() {
|
|
906
|
+
var e = [];
|
|
907
|
+
e = e.concat(this.graphManager.getAllEdges()), e = [].concat(r(this.edgeToDummyNodes.keys()), e);
|
|
908
|
+
for (var t = 0; t < e.length; t++) {
|
|
909
|
+
var n = e[t];
|
|
910
|
+
if (n.bendpoints.length > 0) {
|
|
911
|
+
for (var i = this.edgeToDummyNodes.get(n), a = 0; a < i.length; a++) {
|
|
912
|
+
var o = i[a], s = new l(o.getCenterX(), o.getCenterY()), c = n.bendpoints.get(a);
|
|
913
|
+
c.x = s.x, c.y = s.y, o.getOwner().remove(o);
|
|
914
|
+
}
|
|
915
|
+
this.graphManager.add(n, n.source, n.target);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
}, f.transform = function(e, t, n, r) {
|
|
919
|
+
if (n != null && r != null) {
|
|
920
|
+
var i = t;
|
|
921
|
+
if (e <= 50) {
|
|
922
|
+
var a = t / n;
|
|
923
|
+
i -= (t - a) / 50 * (50 - e);
|
|
924
|
+
} else {
|
|
925
|
+
var o = t * r;
|
|
926
|
+
i += (o - t) / 50 * (e - 50);
|
|
927
|
+
}
|
|
928
|
+
return i;
|
|
929
|
+
} else {
|
|
930
|
+
var s, c;
|
|
931
|
+
return e <= 50 ? (s = 9 * t / 500, c = t / 10) : (s = 9 * t / 50, c = -8 * t), s * e + c;
|
|
932
|
+
}
|
|
933
|
+
}, f.findCenterOfTree = function(e) {
|
|
934
|
+
var t = [];
|
|
935
|
+
t = t.concat(e);
|
|
936
|
+
var n = [], r = /* @__PURE__ */ new Map(), i = !1, a = null;
|
|
937
|
+
(t.length == 1 || t.length == 2) && (i = !0, a = t[0]);
|
|
938
|
+
for (var o = 0; o < t.length; o++) {
|
|
939
|
+
var s = t[o], c = s.getNeighborsList().size;
|
|
940
|
+
r.set(s, s.getNeighborsList().size), c == 1 && n.push(s);
|
|
941
|
+
}
|
|
942
|
+
var l = [];
|
|
943
|
+
for (l = l.concat(n); !i;) {
|
|
944
|
+
var u = [];
|
|
945
|
+
u = u.concat(l), l = [];
|
|
946
|
+
for (var o = 0; o < t.length; o++) {
|
|
947
|
+
var s = t[o], d = t.indexOf(s);
|
|
948
|
+
d >= 0 && t.splice(d, 1), s.getNeighborsList().forEach(function(e) {
|
|
949
|
+
if (n.indexOf(e) < 0) {
|
|
950
|
+
var t = r.get(e) - 1;
|
|
951
|
+
t == 1 && l.push(e), r.set(e, t);
|
|
952
|
+
}
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
n = n.concat(l), (t.length == 1 || t.length == 2) && (i = !0, a = t[0]);
|
|
956
|
+
}
|
|
957
|
+
return a;
|
|
958
|
+
}, f.prototype.setGraphManager = function(e) {
|
|
959
|
+
this.graphManager = e;
|
|
960
|
+
}, e.exports = f;
|
|
961
|
+
}),
|
|
962
|
+
(function(e, t, n) {
|
|
963
|
+
function r() {}
|
|
964
|
+
r.seed = 1, r.x = 0, r.nextDouble = function() {
|
|
965
|
+
return r.x = Math.sin(r.seed++) * 1e4, r.x - Math.floor(r.x);
|
|
966
|
+
}, e.exports = r;
|
|
967
|
+
}),
|
|
968
|
+
(function(e, t, n) {
|
|
969
|
+
var r = n(4);
|
|
970
|
+
function i(e, t) {
|
|
971
|
+
this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
|
|
972
|
+
}
|
|
973
|
+
i.prototype.getWorldOrgX = function() {
|
|
974
|
+
return this.lworldOrgX;
|
|
975
|
+
}, i.prototype.setWorldOrgX = function(e) {
|
|
976
|
+
this.lworldOrgX = e;
|
|
977
|
+
}, i.prototype.getWorldOrgY = function() {
|
|
978
|
+
return this.lworldOrgY;
|
|
979
|
+
}, i.prototype.setWorldOrgY = function(e) {
|
|
980
|
+
this.lworldOrgY = e;
|
|
981
|
+
}, i.prototype.getWorldExtX = function() {
|
|
982
|
+
return this.lworldExtX;
|
|
983
|
+
}, i.prototype.setWorldExtX = function(e) {
|
|
984
|
+
this.lworldExtX = e;
|
|
985
|
+
}, i.prototype.getWorldExtY = function() {
|
|
986
|
+
return this.lworldExtY;
|
|
987
|
+
}, i.prototype.setWorldExtY = function(e) {
|
|
988
|
+
this.lworldExtY = e;
|
|
989
|
+
}, i.prototype.getDeviceOrgX = function() {
|
|
990
|
+
return this.ldeviceOrgX;
|
|
991
|
+
}, i.prototype.setDeviceOrgX = function(e) {
|
|
992
|
+
this.ldeviceOrgX = e;
|
|
993
|
+
}, i.prototype.getDeviceOrgY = function() {
|
|
994
|
+
return this.ldeviceOrgY;
|
|
995
|
+
}, i.prototype.setDeviceOrgY = function(e) {
|
|
996
|
+
this.ldeviceOrgY = e;
|
|
997
|
+
}, i.prototype.getDeviceExtX = function() {
|
|
998
|
+
return this.ldeviceExtX;
|
|
999
|
+
}, i.prototype.setDeviceExtX = function(e) {
|
|
1000
|
+
this.ldeviceExtX = e;
|
|
1001
|
+
}, i.prototype.getDeviceExtY = function() {
|
|
1002
|
+
return this.ldeviceExtY;
|
|
1003
|
+
}, i.prototype.setDeviceExtY = function(e) {
|
|
1004
|
+
this.ldeviceExtY = e;
|
|
1005
|
+
}, i.prototype.transformX = function(e) {
|
|
1006
|
+
var t = 0, n = this.lworldExtX;
|
|
1007
|
+
return n != 0 && (t = this.ldeviceOrgX + (e - this.lworldOrgX) * this.ldeviceExtX / n), t;
|
|
1008
|
+
}, i.prototype.transformY = function(e) {
|
|
1009
|
+
var t = 0, n = this.lworldExtY;
|
|
1010
|
+
return n != 0 && (t = this.ldeviceOrgY + (e - this.lworldOrgY) * this.ldeviceExtY / n), t;
|
|
1011
|
+
}, i.prototype.inverseTransformX = function(e) {
|
|
1012
|
+
var t = 0, n = this.ldeviceExtX;
|
|
1013
|
+
return n != 0 && (t = this.lworldOrgX + (e - this.ldeviceOrgX) * this.lworldExtX / n), t;
|
|
1014
|
+
}, i.prototype.inverseTransformY = function(e) {
|
|
1015
|
+
var t = 0, n = this.ldeviceExtY;
|
|
1016
|
+
return n != 0 && (t = this.lworldOrgY + (e - this.ldeviceOrgY) * this.lworldExtY / n), t;
|
|
1017
|
+
}, i.prototype.inverseTransformPoint = function(e) {
|
|
1018
|
+
return new r(this.inverseTransformX(e.x), this.inverseTransformY(e.y));
|
|
1019
|
+
}, e.exports = i;
|
|
1020
|
+
}),
|
|
1021
|
+
(function(e, t, n) {
|
|
1022
|
+
function r(e) {
|
|
1023
|
+
if (Array.isArray(e)) {
|
|
1024
|
+
for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
|
|
1025
|
+
return n;
|
|
1026
|
+
} else return Array.from(e);
|
|
1027
|
+
}
|
|
1028
|
+
var i = n(15), a = n(7), o = n(0), s = n(8), c = n(9);
|
|
1029
|
+
function l() {
|
|
1030
|
+
i.call(this), this.useSmartIdealEdgeLengthCalculation = a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.idealEdgeLength = a.DEFAULT_EDGE_LENGTH, this.springConstant = a.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = a.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = a.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = a.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = a.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = a.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = a.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = a.MAX_ITERATIONS;
|
|
1031
|
+
}
|
|
1032
|
+
for (var u in l.prototype = Object.create(i.prototype), i) l[u] = i[u];
|
|
1033
|
+
l.prototype.initParameters = function() {
|
|
1034
|
+
i.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
|
|
1035
|
+
}, l.prototype.calcIdealEdgeLengths = function() {
|
|
1036
|
+
for (var e, t, n, r, i, s, c = this.getGraphManager().getAllEdges(), l = 0; l < c.length; l++) e = c[l], e.idealLength = this.idealEdgeLength, e.isInterGraph && (n = e.getSource(), r = e.getTarget(), i = e.getSourceInLca().getEstimatedSize(), s = e.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (e.idealLength += i + s - 2 * o.SIMPLE_NODE_SIZE), t = e.getLca().getInclusionTreeDepth(), e.idealLength += a.DEFAULT_EDGE_LENGTH * a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (n.getInclusionTreeDepth() + r.getInclusionTreeDepth() - 2 * t));
|
|
1037
|
+
}, l.prototype.initSpringEmbedder = function() {
|
|
1038
|
+
var e = this.getAllNodes().length;
|
|
1039
|
+
this.incremental ? (e > a.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * a.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - a.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (e > a.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(a.COOLING_ADAPTATION_FACTOR, 1 - (e - a.ADAPTATION_LOWER_NODE_LIMIT) / (a.ADAPTATION_UPPER_NODE_LIMIT - a.ADAPTATION_LOWER_NODE_LIMIT) * (1 - a.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = a.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
|
|
1040
|
+
}, l.prototype.calcSpringForces = function() {
|
|
1041
|
+
for (var e = this.getAllEdges(), t, n = 0; n < e.length; n++) t = e[n], this.calcSpringForce(t, t.idealLength);
|
|
1042
|
+
}, l.prototype.calcRepulsionForces = function() {
|
|
1043
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, n, r, i, o, s = this.getAllNodes(), c;
|
|
1044
|
+
if (this.useFRGridVariant) for (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && e && this.updateGrid(), c = /* @__PURE__ */ new Set(), n = 0; n < s.length; n++) i = s[n], this.calculateRepulsionForceOfANode(i, c, e, t), c.add(i);
|
|
1045
|
+
else for (n = 0; n < s.length; n++) for (i = s[n], r = n + 1; r < s.length; r++) o = s[r], i.getOwner() == o.getOwner() && this.calcRepulsionForce(i, o);
|
|
1046
|
+
}, l.prototype.calcGravitationalForces = function() {
|
|
1047
|
+
for (var e, t = this.getAllNodesToApplyGravitation(), n = 0; n < t.length; n++) e = t[n], this.calcGravitationalForce(e);
|
|
1048
|
+
}, l.prototype.moveNodes = function() {
|
|
1049
|
+
for (var e = this.getAllNodes(), t, n = 0; n < e.length; n++) t = e[n], t.move();
|
|
1050
|
+
}, l.prototype.calcSpringForce = function(e, t) {
|
|
1051
|
+
var n = e.getSource(), r = e.getTarget(), i, a, o, s;
|
|
1052
|
+
if (this.uniformLeafNodeSizes && n.getChild() == null && r.getChild() == null) e.updateLengthSimple();
|
|
1053
|
+
else if (e.updateLength(), e.isOverlapingSourceAndTarget) return;
|
|
1054
|
+
i = e.getLength(), i != 0 && (a = this.springConstant * (i - t), o = a * (e.lengthX / i), s = a * (e.lengthY / i), n.springForceX += o, n.springForceY += s, r.springForceX -= o, r.springForceY -= s);
|
|
1055
|
+
}, l.prototype.calcRepulsionForce = function(e, t) {
|
|
1056
|
+
var n = e.getRect(), r = t.getRect(), i = [, ,], o = [
|
|
1057
|
+
,
|
|
1058
|
+
,
|
|
1059
|
+
,
|
|
1060
|
+
,
|
|
1061
|
+
], l, u, d, f, p, m, h;
|
|
1062
|
+
if (n.intersects(r)) {
|
|
1063
|
+
s.calcSeparationAmount(n, r, i, a.DEFAULT_EDGE_LENGTH / 2), m = 2 * i[0], h = 2 * i[1];
|
|
1064
|
+
var g = e.noOfChildren * t.noOfChildren / (e.noOfChildren + t.noOfChildren);
|
|
1065
|
+
e.repulsionForceX -= g * m, e.repulsionForceY -= g * h, t.repulsionForceX += g * m, t.repulsionForceY += g * h;
|
|
1066
|
+
} else this.uniformLeafNodeSizes && e.getChild() == null && t.getChild() == null ? (l = r.getCenterX() - n.getCenterX(), u = r.getCenterY() - n.getCenterY()) : (s.getIntersection(n, r, o), l = o[2] - o[0], u = o[3] - o[1]), Math.abs(l) < a.MIN_REPULSION_DIST && (l = c.sign(l) * a.MIN_REPULSION_DIST), Math.abs(u) < a.MIN_REPULSION_DIST && (u = c.sign(u) * a.MIN_REPULSION_DIST), d = l * l + u * u, f = Math.sqrt(d), p = this.repulsionConstant * e.noOfChildren * t.noOfChildren / d, m = p * l / f, h = p * u / f, e.repulsionForceX -= m, e.repulsionForceY -= h, t.repulsionForceX += m, t.repulsionForceY += h;
|
|
1067
|
+
}, l.prototype.calcGravitationalForce = function(e) {
|
|
1068
|
+
var t = e.getOwner(), n = (t.getRight() + t.getLeft()) / 2, r = (t.getTop() + t.getBottom()) / 2, i = e.getCenterX() - n, a = e.getCenterY() - r, o = Math.abs(i) + e.getWidth() / 2, s = Math.abs(a) + e.getHeight() / 2, c;
|
|
1069
|
+
e.getOwner() == this.graphManager.getRoot() ? (c = t.getEstimatedSize() * this.gravityRangeFactor, (o > c || s > c) && (e.gravitationForceX = -this.gravityConstant * i, e.gravitationForceY = -this.gravityConstant * a)) : (c = t.getEstimatedSize() * this.compoundGravityRangeFactor, (o > c || s > c) && (e.gravitationForceX = -this.gravityConstant * i * this.compoundGravityConstant, e.gravitationForceY = -this.gravityConstant * a * this.compoundGravityConstant));
|
|
1070
|
+
}, l.prototype.isConverged = function() {
|
|
1071
|
+
var e, t = !1;
|
|
1072
|
+
return this.totalIterations > this.maxIterations / 3 && (t = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), e = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, e || t;
|
|
1073
|
+
}, l.prototype.animate = function() {
|
|
1074
|
+
this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
|
|
1075
|
+
}, l.prototype.calcNoOfChildrenForAllNodes = function() {
|
|
1076
|
+
for (var e, t = this.graphManager.getAllNodes(), n = 0; n < t.length; n++) e = t[n], e.noOfChildren = e.getNoOfChildren();
|
|
1077
|
+
}, l.prototype.calcGrid = function(e) {
|
|
1078
|
+
var t = 0, n = 0;
|
|
1079
|
+
t = parseInt(Math.ceil((e.getRight() - e.getLeft()) / this.repulsionRange)), n = parseInt(Math.ceil((e.getBottom() - e.getTop()) / this.repulsionRange));
|
|
1080
|
+
for (var r = Array(t), i = 0; i < t; i++) r[i] = Array(n);
|
|
1081
|
+
for (var i = 0; i < t; i++) for (var a = 0; a < n; a++) r[i][a] = [];
|
|
1082
|
+
return r;
|
|
1083
|
+
}, l.prototype.addNodeToGrid = function(e, t, n) {
|
|
1084
|
+
var r = 0, i = 0, a = 0, o = 0;
|
|
1085
|
+
r = parseInt(Math.floor((e.getRect().x - t) / this.repulsionRange)), i = parseInt(Math.floor((e.getRect().width + e.getRect().x - t) / this.repulsionRange)), a = parseInt(Math.floor((e.getRect().y - n) / this.repulsionRange)), o = parseInt(Math.floor((e.getRect().height + e.getRect().y - n) / this.repulsionRange));
|
|
1086
|
+
for (var s = r; s <= i; s++) for (var c = a; c <= o; c++) this.grid[s][c].push(e), e.setGridCoordinates(r, i, a, o);
|
|
1087
|
+
}, l.prototype.updateGrid = function() {
|
|
1088
|
+
var e, t, n = this.getAllNodes();
|
|
1089
|
+
for (this.grid = this.calcGrid(this.graphManager.getRoot()), e = 0; e < n.length; e++) t = n[e], this.addNodeToGrid(t, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
|
|
1090
|
+
}, l.prototype.calculateRepulsionForceOfANode = function(e, t, n, i) {
|
|
1091
|
+
if (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && n || i) {
|
|
1092
|
+
var o = /* @__PURE__ */ new Set();
|
|
1093
|
+
e.surrounding = [];
|
|
1094
|
+
for (var s, c = this.grid, l = e.startX - 1; l < e.finishX + 2; l++) for (var u = e.startY - 1; u < e.finishY + 2; u++) if (!(l < 0 || u < 0 || l >= c.length || u >= c[0].length)) {
|
|
1095
|
+
for (var d = 0; d < c[l][u].length; d++) if (s = c[l][u][d], !(e.getOwner() != s.getOwner() || e == s) && !t.has(s) && !o.has(s)) {
|
|
1096
|
+
var f = Math.abs(e.getCenterX() - s.getCenterX()) - (e.getWidth() / 2 + s.getWidth() / 2), p = Math.abs(e.getCenterY() - s.getCenterY()) - (e.getHeight() / 2 + s.getHeight() / 2);
|
|
1097
|
+
f <= this.repulsionRange && p <= this.repulsionRange && o.add(s);
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
e.surrounding = [].concat(r(o));
|
|
1101
|
+
}
|
|
1102
|
+
for (l = 0; l < e.surrounding.length; l++) this.calcRepulsionForce(e, e.surrounding[l]);
|
|
1103
|
+
}, l.prototype.calcRepulsionRange = function() {
|
|
1104
|
+
return 0;
|
|
1105
|
+
}, e.exports = l;
|
|
1106
|
+
}),
|
|
1107
|
+
(function(e, t, n) {
|
|
1108
|
+
var r = n(1), i = n(7);
|
|
1109
|
+
function a(e, t, n) {
|
|
1110
|
+
r.call(this, e, t, n), this.idealLength = i.DEFAULT_EDGE_LENGTH;
|
|
1111
|
+
}
|
|
1112
|
+
for (var o in a.prototype = Object.create(r.prototype), r) a[o] = r[o];
|
|
1113
|
+
e.exports = a;
|
|
1114
|
+
}),
|
|
1115
|
+
(function(e, t, n) {
|
|
1116
|
+
var r = n(3);
|
|
1117
|
+
function i(e, t, n, i) {
|
|
1118
|
+
r.call(this, e, t, n, i), 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 = [];
|
|
1119
|
+
}
|
|
1120
|
+
for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
|
|
1121
|
+
i.prototype.setGridCoordinates = function(e, t, n, r) {
|
|
1122
|
+
this.startX = e, this.finishX = t, this.startY = n, this.finishY = r;
|
|
1123
|
+
}, e.exports = i;
|
|
1124
|
+
}),
|
|
1125
|
+
(function(e, t, n) {
|
|
1126
|
+
function r(e, t) {
|
|
1127
|
+
this.width = 0, this.height = 0, e !== null && t !== null && (this.height = t, this.width = e);
|
|
1128
|
+
}
|
|
1129
|
+
r.prototype.getWidth = function() {
|
|
1130
|
+
return this.width;
|
|
1131
|
+
}, r.prototype.setWidth = function(e) {
|
|
1132
|
+
this.width = e;
|
|
1133
|
+
}, r.prototype.getHeight = function() {
|
|
1134
|
+
return this.height;
|
|
1135
|
+
}, r.prototype.setHeight = function(e) {
|
|
1136
|
+
this.height = e;
|
|
1137
|
+
}, e.exports = r;
|
|
1138
|
+
}),
|
|
1139
|
+
(function(e, t, n) {
|
|
1140
|
+
var r = n(14);
|
|
1141
|
+
function i() {
|
|
1142
|
+
this.map = {}, this.keys = [];
|
|
1143
|
+
}
|
|
1144
|
+
i.prototype.put = function(e, t) {
|
|
1145
|
+
var n = r.createID(e);
|
|
1146
|
+
this.contains(n) || (this.map[n] = t, this.keys.push(e));
|
|
1147
|
+
}, i.prototype.contains = function(e) {
|
|
1148
|
+
return r.createID(e), this.map[e] != null;
|
|
1149
|
+
}, i.prototype.get = function(e) {
|
|
1150
|
+
var t = r.createID(e);
|
|
1151
|
+
return this.map[t];
|
|
1152
|
+
}, i.prototype.keySet = function() {
|
|
1153
|
+
return this.keys;
|
|
1154
|
+
}, e.exports = i;
|
|
1155
|
+
}),
|
|
1156
|
+
(function(e, t, n) {
|
|
1157
|
+
var r = n(14);
|
|
1158
|
+
function i() {
|
|
1159
|
+
this.set = {};
|
|
1160
|
+
}
|
|
1161
|
+
i.prototype.add = function(e) {
|
|
1162
|
+
var t = r.createID(e);
|
|
1163
|
+
this.contains(t) || (this.set[t] = e);
|
|
1164
|
+
}, i.prototype.remove = function(e) {
|
|
1165
|
+
delete this.set[r.createID(e)];
|
|
1166
|
+
}, i.prototype.clear = function() {
|
|
1167
|
+
this.set = {};
|
|
1168
|
+
}, i.prototype.contains = function(e) {
|
|
1169
|
+
return this.set[r.createID(e)] == e;
|
|
1170
|
+
}, i.prototype.isEmpty = function() {
|
|
1171
|
+
return this.size() === 0;
|
|
1172
|
+
}, i.prototype.size = function() {
|
|
1173
|
+
return Object.keys(this.set).length;
|
|
1174
|
+
}, i.prototype.addAllTo = function(e) {
|
|
1175
|
+
for (var t = Object.keys(this.set), n = t.length, r = 0; r < n; r++) e.push(this.set[t[r]]);
|
|
1176
|
+
}, i.prototype.size = function() {
|
|
1177
|
+
return Object.keys(this.set).length;
|
|
1178
|
+
}, i.prototype.addAll = function(e) {
|
|
1179
|
+
for (var t = e.length, n = 0; n < t; n++) {
|
|
1180
|
+
var r = e[n];
|
|
1181
|
+
this.add(r);
|
|
1182
|
+
}
|
|
1183
|
+
}, e.exports = i;
|
|
1184
|
+
}),
|
|
1185
|
+
(function(e, t, n) {
|
|
1186
|
+
var r = function() {
|
|
1187
|
+
function e(e, t) {
|
|
1188
|
+
for (var n = 0; n < t.length; n++) {
|
|
1189
|
+
var r = t[n];
|
|
1190
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
return function(t, n, r) {
|
|
1194
|
+
return n && e(t.prototype, n), r && e(t, r), t;
|
|
1195
|
+
};
|
|
1196
|
+
}();
|
|
1197
|
+
function i(e, t) {
|
|
1198
|
+
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
1199
|
+
}
|
|
1200
|
+
var a = n(11);
|
|
1201
|
+
e.exports = function() {
|
|
1202
|
+
function e(t, n) {
|
|
1203
|
+
i(this, e), (n !== null || n !== void 0) && (this.compareFunction = this._defaultCompareFunction);
|
|
1204
|
+
var r = void 0;
|
|
1205
|
+
r = t instanceof a ? t.size() : t.length, this._quicksort(t, 0, r - 1);
|
|
1206
|
+
}
|
|
1207
|
+
return r(e, [
|
|
1208
|
+
{
|
|
1209
|
+
key: "_quicksort",
|
|
1210
|
+
value: function(e, t, n) {
|
|
1211
|
+
if (t < n) {
|
|
1212
|
+
var r = this._partition(e, t, n);
|
|
1213
|
+
this._quicksort(e, t, r), this._quicksort(e, r + 1, n);
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
key: "_partition",
|
|
1219
|
+
value: function(e, t, n) {
|
|
1220
|
+
for (var r = this._get(e, t), i = t, a = n;;) {
|
|
1221
|
+
for (; this.compareFunction(r, this._get(e, a));) a--;
|
|
1222
|
+
for (; this.compareFunction(this._get(e, i), r);) i++;
|
|
1223
|
+
if (i < a) this._swap(e, i, a), i++, a--;
|
|
1224
|
+
else return a;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
key: "_get",
|
|
1230
|
+
value: function(e, t) {
|
|
1231
|
+
return e instanceof a ? e.get_object_at(t) : e[t];
|
|
1232
|
+
}
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
key: "_set",
|
|
1236
|
+
value: function(e, t, n) {
|
|
1237
|
+
e instanceof a ? e.set_object_at(t, n) : e[t] = n;
|
|
1238
|
+
}
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
key: "_swap",
|
|
1242
|
+
value: function(e, t, n) {
|
|
1243
|
+
var r = this._get(e, t);
|
|
1244
|
+
this._set(e, t, this._get(e, n)), this._set(e, n, r);
|
|
1245
|
+
}
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
key: "_defaultCompareFunction",
|
|
1249
|
+
value: function(e, t) {
|
|
1250
|
+
return t > e;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
]), e;
|
|
1254
|
+
}();
|
|
1255
|
+
}),
|
|
1256
|
+
(function(e, t, n) {
|
|
1257
|
+
var r = function() {
|
|
1258
|
+
function e(e, t) {
|
|
1259
|
+
for (var n = 0; n < t.length; n++) {
|
|
1260
|
+
var r = t[n];
|
|
1261
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
return function(t, n, r) {
|
|
1265
|
+
return n && e(t.prototype, n), r && e(t, r), t;
|
|
1266
|
+
};
|
|
1267
|
+
}();
|
|
1268
|
+
function i(e, t) {
|
|
1269
|
+
if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
|
|
1270
|
+
}
|
|
1271
|
+
e.exports = function() {
|
|
1272
|
+
function e(t, n) {
|
|
1273
|
+
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
|
|
1274
|
+
i(this, e), this.sequence1 = t, this.sequence2 = n, this.match_score = r, this.mismatch_penalty = a, this.gap_penalty = o, this.iMax = t.length + 1, this.jMax = n.length + 1, this.grid = Array(this.iMax);
|
|
1275
|
+
for (var s = 0; s < this.iMax; s++) {
|
|
1276
|
+
this.grid[s] = Array(this.jMax);
|
|
1277
|
+
for (var c = 0; c < this.jMax; c++) this.grid[s][c] = 0;
|
|
1278
|
+
}
|
|
1279
|
+
this.tracebackGrid = Array(this.iMax);
|
|
1280
|
+
for (var l = 0; l < this.iMax; l++) {
|
|
1281
|
+
this.tracebackGrid[l] = Array(this.jMax);
|
|
1282
|
+
for (var u = 0; u < this.jMax; u++) this.tracebackGrid[l][u] = [
|
|
1283
|
+
null,
|
|
1284
|
+
null,
|
|
1285
|
+
null
|
|
1286
|
+
];
|
|
1287
|
+
}
|
|
1288
|
+
this.alignments = [], this.score = -1, this.computeGrids();
|
|
1289
|
+
}
|
|
1290
|
+
return r(e, [
|
|
1291
|
+
{
|
|
1292
|
+
key: "getScore",
|
|
1293
|
+
value: function() {
|
|
1294
|
+
return this.score;
|
|
1295
|
+
}
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
key: "getAlignments",
|
|
1299
|
+
value: function() {
|
|
1300
|
+
return this.alignments;
|
|
1301
|
+
}
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
key: "computeGrids",
|
|
1305
|
+
value: function() {
|
|
1306
|
+
for (var e = 1; e < this.jMax; e++) this.grid[0][e] = this.grid[0][e - 1] + this.gap_penalty, this.tracebackGrid[0][e] = [
|
|
1307
|
+
!1,
|
|
1308
|
+
!1,
|
|
1309
|
+
!0
|
|
1310
|
+
];
|
|
1311
|
+
for (var t = 1; t < this.iMax; t++) this.grid[t][0] = this.grid[t - 1][0] + this.gap_penalty, this.tracebackGrid[t][0] = [
|
|
1312
|
+
!1,
|
|
1313
|
+
!0,
|
|
1314
|
+
!1
|
|
1315
|
+
];
|
|
1316
|
+
for (var n = 1; n < this.iMax; n++) for (var r = 1; r < this.jMax; r++) {
|
|
1317
|
+
var i = void 0;
|
|
1318
|
+
i = this.sequence1[n - 1] === this.sequence2[r - 1] ? this.grid[n - 1][r - 1] + this.match_score : this.grid[n - 1][r - 1] + this.mismatch_penalty;
|
|
1319
|
+
var a = this.grid[n - 1][r] + this.gap_penalty, o = this.grid[n][r - 1] + this.gap_penalty, s = [
|
|
1320
|
+
i,
|
|
1321
|
+
a,
|
|
1322
|
+
o
|
|
1323
|
+
], c = this.arrayAllMaxIndexes(s);
|
|
1324
|
+
this.grid[n][r] = s[c[0]], this.tracebackGrid[n][r] = [
|
|
1325
|
+
c.includes(0),
|
|
1326
|
+
c.includes(1),
|
|
1327
|
+
c.includes(2)
|
|
1328
|
+
];
|
|
1329
|
+
}
|
|
1330
|
+
this.score = this.grid[this.iMax - 1][this.jMax - 1];
|
|
1331
|
+
}
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
key: "alignmentTraceback",
|
|
1335
|
+
value: function() {
|
|
1336
|
+
var e = [];
|
|
1337
|
+
for (e.push({
|
|
1338
|
+
pos: [this.sequence1.length, this.sequence2.length],
|
|
1339
|
+
seq1: "",
|
|
1340
|
+
seq2: ""
|
|
1341
|
+
}); e[0];) {
|
|
1342
|
+
var t = e[0], n = this.tracebackGrid[t.pos[0]][t.pos[1]];
|
|
1343
|
+
n[0] && e.push({
|
|
1344
|
+
pos: [t.pos[0] - 1, t.pos[1] - 1],
|
|
1345
|
+
seq1: this.sequence1[t.pos[0] - 1] + t.seq1,
|
|
1346
|
+
seq2: this.sequence2[t.pos[1] - 1] + t.seq2
|
|
1347
|
+
}), n[1] && e.push({
|
|
1348
|
+
pos: [t.pos[0] - 1, t.pos[1]],
|
|
1349
|
+
seq1: this.sequence1[t.pos[0] - 1] + t.seq1,
|
|
1350
|
+
seq2: "-" + t.seq2
|
|
1351
|
+
}), n[2] && e.push({
|
|
1352
|
+
pos: [t.pos[0], t.pos[1] - 1],
|
|
1353
|
+
seq1: "-" + t.seq1,
|
|
1354
|
+
seq2: this.sequence2[t.pos[1] - 1] + t.seq2
|
|
1355
|
+
}), t.pos[0] === 0 && t.pos[1] === 0 && this.alignments.push({
|
|
1356
|
+
sequence1: t.seq1,
|
|
1357
|
+
sequence2: t.seq2
|
|
1358
|
+
}), e.shift();
|
|
1359
|
+
}
|
|
1360
|
+
return this.alignments;
|
|
1361
|
+
}
|
|
1362
|
+
},
|
|
1363
|
+
{
|
|
1364
|
+
key: "getAllIndexes",
|
|
1365
|
+
value: function(e, t) {
|
|
1366
|
+
for (var n = [], r = -1; (r = e.indexOf(t, r + 1)) !== -1;) n.push(r);
|
|
1367
|
+
return n;
|
|
1368
|
+
}
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
key: "arrayAllMaxIndexes",
|
|
1372
|
+
value: function(e) {
|
|
1373
|
+
return this.getAllIndexes(e, Math.max.apply(null, e));
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
]), e;
|
|
1377
|
+
}();
|
|
1378
|
+
}),
|
|
1379
|
+
(function(e, t, n) {
|
|
1380
|
+
var r = function() {};
|
|
1381
|
+
r.FDLayout = n(18), r.FDLayoutConstants = n(7), r.FDLayoutEdge = n(19), r.FDLayoutNode = n(20), r.DimensionD = n(21), r.HashMap = n(22), r.HashSet = n(23), r.IGeometry = n(8), r.IMath = n(9), r.Integer = n(10), r.Point = n(12), r.PointD = n(4), r.RandomSeed = n(16), r.RectangleD = n(13), r.Transform = n(17), r.UniqueIDGeneretor = n(14), r.Quicksort = n(24), r.LinkedList = n(11), r.LGraphObject = n(2), r.LGraph = n(5), r.LEdge = n(1), r.LGraphManager = n(6), r.LNode = n(3), r.Layout = n(15), r.LayoutConstants = n(0), r.NeedlemanWunsch = n(25), e.exports = r;
|
|
1382
|
+
}),
|
|
1383
|
+
(function(e, t, n) {
|
|
1384
|
+
function r() {
|
|
1385
|
+
this.listeners = [];
|
|
1386
|
+
}
|
|
1387
|
+
var i = r.prototype;
|
|
1388
|
+
i.addListener = function(e, t) {
|
|
1389
|
+
this.listeners.push({
|
|
1390
|
+
event: e,
|
|
1391
|
+
callback: t
|
|
1392
|
+
});
|
|
1393
|
+
}, i.removeListener = function(e, t) {
|
|
1394
|
+
for (var n = this.listeners.length; n >= 0; n--) {
|
|
1395
|
+
var r = this.listeners[n];
|
|
1396
|
+
r.event === e && r.callback === t && this.listeners.splice(n, 1);
|
|
1397
|
+
}
|
|
1398
|
+
}, i.emit = function(e, t) {
|
|
1399
|
+
for (var n = 0; n < this.listeners.length; n++) {
|
|
1400
|
+
var r = this.listeners[n];
|
|
1401
|
+
e === r.event && r.callback(t);
|
|
1402
|
+
}
|
|
1403
|
+
}, e.exports = r;
|
|
1404
|
+
})
|
|
1405
|
+
]);
|
|
1406
|
+
});
|
|
1407
|
+
})), require_cose_base = /* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
1408
|
+
(function(n, r) {
|
|
1409
|
+
typeof e == "object" && typeof t == "object" ? t.exports = r(require_layout_base()) : typeof define == "function" && define.amd ? define(["layout-base"], r) : typeof e == "object" ? e.coseBase = r(require_layout_base()) : n.coseBase = r(n.layoutBase);
|
|
1410
|
+
})(e, function(e) {
|
|
1411
|
+
return (function(e) {
|
|
1412
|
+
var t = {};
|
|
1413
|
+
function n(r) {
|
|
1414
|
+
if (t[r]) return t[r].exports;
|
|
1415
|
+
var i = t[r] = {
|
|
1416
|
+
i: r,
|
|
1417
|
+
l: !1,
|
|
1418
|
+
exports: {}
|
|
1419
|
+
};
|
|
1420
|
+
return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports;
|
|
1421
|
+
}
|
|
1422
|
+
return n.m = e, n.c = t, n.i = function(e) {
|
|
1423
|
+
return e;
|
|
1424
|
+
}, n.d = function(e, t, r) {
|
|
1425
|
+
n.o(e, t) || Object.defineProperty(e, t, {
|
|
1426
|
+
configurable: !1,
|
|
1427
|
+
enumerable: !0,
|
|
1428
|
+
get: r
|
|
1429
|
+
});
|
|
1430
|
+
}, n.n = function(e) {
|
|
1431
|
+
var t = e && e.__esModule ? function() {
|
|
1432
|
+
return e.default;
|
|
1433
|
+
} : function() {
|
|
1434
|
+
return e;
|
|
1435
|
+
};
|
|
1436
|
+
return n.d(t, "a", t), t;
|
|
1437
|
+
}, n.o = function(e, t) {
|
|
1438
|
+
return Object.prototype.hasOwnProperty.call(e, t);
|
|
1439
|
+
}, n.p = "", n(n.s = 7);
|
|
1440
|
+
})([
|
|
1441
|
+
(function(t, n) {
|
|
1442
|
+
t.exports = e;
|
|
1443
|
+
}),
|
|
1444
|
+
(function(e, t, n) {
|
|
1445
|
+
var r = n(0).FDLayoutConstants;
|
|
1446
|
+
function i() {}
|
|
1447
|
+
for (var a in r) i[a] = r[a];
|
|
1448
|
+
i.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, i.DEFAULT_RADIAL_SEPARATION = r.DEFAULT_EDGE_LENGTH, i.DEFAULT_COMPONENT_SEPERATION = 60, i.TILE = !0, i.TILING_PADDING_VERTICAL = 10, i.TILING_PADDING_HORIZONTAL = 10, i.TREE_REDUCTION_ON_INCREMENTAL = !1, e.exports = i;
|
|
1449
|
+
}),
|
|
1450
|
+
(function(e, t, n) {
|
|
1451
|
+
var r = n(0).FDLayoutEdge;
|
|
1452
|
+
function i(e, t, n) {
|
|
1453
|
+
r.call(this, e, t, n);
|
|
1454
|
+
}
|
|
1455
|
+
for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
|
|
1456
|
+
e.exports = i;
|
|
1457
|
+
}),
|
|
1458
|
+
(function(e, t, n) {
|
|
1459
|
+
var r = n(0).LGraph;
|
|
1460
|
+
function i(e, t, n) {
|
|
1461
|
+
r.call(this, e, t, n);
|
|
1462
|
+
}
|
|
1463
|
+
for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
|
|
1464
|
+
e.exports = i;
|
|
1465
|
+
}),
|
|
1466
|
+
(function(e, t, n) {
|
|
1467
|
+
var r = n(0).LGraphManager;
|
|
1468
|
+
function i(e) {
|
|
1469
|
+
r.call(this, e);
|
|
1470
|
+
}
|
|
1471
|
+
for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
|
|
1472
|
+
e.exports = i;
|
|
1473
|
+
}),
|
|
1474
|
+
(function(e, t, n) {
|
|
1475
|
+
var r = n(0).FDLayoutNode, i = n(0).IMath;
|
|
1476
|
+
function a(e, t, n, i) {
|
|
1477
|
+
r.call(this, e, t, n, i);
|
|
1478
|
+
}
|
|
1479
|
+
for (var o in a.prototype = Object.create(r.prototype), r) a[o] = r[o];
|
|
1480
|
+
a.prototype.move = function() {
|
|
1481
|
+
var e = this.graphManager.getLayout();
|
|
1482
|
+
this.displacementX = e.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = e.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > e.coolingFactor * e.maxNodeDisplacement && (this.displacementX = e.coolingFactor * e.maxNodeDisplacement * i.sign(this.displacementX)), Math.abs(this.displacementY) > e.coolingFactor * e.maxNodeDisplacement && (this.displacementY = e.coolingFactor * e.maxNodeDisplacement * i.sign(this.displacementY)), this.child == null || this.child.getNodes().length == 0 ? this.moveBy(this.displacementX, this.displacementY) : this.propogateDisplacementToChildren(this.displacementX, this.displacementY), e.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;
|
|
1483
|
+
}, a.prototype.propogateDisplacementToChildren = function(e, t) {
|
|
1484
|
+
for (var n = this.getChild().getNodes(), r, i = 0; i < n.length; i++) r = n[i], r.getChild() == null ? (r.moveBy(e, t), r.displacementX += e, r.displacementY += t) : r.propogateDisplacementToChildren(e, t);
|
|
1485
|
+
}, a.prototype.setPred1 = function(e) {
|
|
1486
|
+
this.pred1 = e;
|
|
1487
|
+
}, a.prototype.getPred1 = function() {
|
|
1488
|
+
return pred1;
|
|
1489
|
+
}, a.prototype.getPred2 = function() {
|
|
1490
|
+
return pred2;
|
|
1491
|
+
}, a.prototype.setNext = function(e) {
|
|
1492
|
+
this.next = e;
|
|
1493
|
+
}, a.prototype.getNext = function() {
|
|
1494
|
+
return next;
|
|
1495
|
+
}, a.prototype.setProcessed = function(e) {
|
|
1496
|
+
this.processed = e;
|
|
1497
|
+
}, a.prototype.isProcessed = function() {
|
|
1498
|
+
return processed;
|
|
1499
|
+
}, e.exports = a;
|
|
1500
|
+
}),
|
|
1501
|
+
(function(e, t, n) {
|
|
1502
|
+
var r = n(0).FDLayout, i = n(4), a = n(3), o = n(5), s = n(2), c = n(1), l = n(0).FDLayoutConstants, u = n(0).LayoutConstants, d = n(0).Point, f = n(0).PointD, p = n(0).Layout, m = n(0).Integer, h = n(0).IGeometry, g = n(0).LGraph, _ = n(0).Transform;
|
|
1503
|
+
function v() {
|
|
1504
|
+
r.call(this), this.toBeTiled = {};
|
|
1505
|
+
}
|
|
1506
|
+
for (var y in v.prototype = Object.create(r.prototype), r) v[y] = r[y];
|
|
1507
|
+
v.prototype.newGraphManager = function() {
|
|
1508
|
+
var e = new i(this);
|
|
1509
|
+
return this.graphManager = e, e;
|
|
1510
|
+
}, v.prototype.newGraph = function(e) {
|
|
1511
|
+
return new a(null, this.graphManager, e);
|
|
1512
|
+
}, v.prototype.newNode = function(e) {
|
|
1513
|
+
return new o(this.graphManager, e);
|
|
1514
|
+
}, v.prototype.newEdge = function(e) {
|
|
1515
|
+
return new s(null, null, e);
|
|
1516
|
+
}, v.prototype.initParameters = function() {
|
|
1517
|
+
r.prototype.initParameters.call(this, arguments), this.isSubLayout || (c.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = c.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.springConstant = l.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = l.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = l.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = l.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = l.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1, this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / l.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = l.CONVERGENCE_CHECK_PERIOD / this.maxIterations, this.coolingAdjuster = 1);
|
|
1518
|
+
}, v.prototype.layout = function() {
|
|
1519
|
+
return u.DEFAULT_CREATE_BENDS_AS_NEEDED && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
|
|
1520
|
+
}, v.prototype.classicLayout = function() {
|
|
1521
|
+
if (this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(), this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity), this.calcNoOfChildrenForAllNodes(), this.graphManager.calcLowestCommonAncestors(), this.graphManager.calcInclusionTreeDepths(), this.graphManager.getRoot().calcEstimatedSize(), this.calcIdealEdgeLengths(), this.incremental) {
|
|
1522
|
+
if (c.TREE_REDUCTION_ON_INCREMENTAL) {
|
|
1523
|
+
this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
|
|
1524
|
+
var e = new Set(this.getAllNodes()), t = this.nodesWithGravity.filter(function(t) {
|
|
1525
|
+
return e.has(t);
|
|
1526
|
+
});
|
|
1527
|
+
this.graphManager.setAllNodesToApplyGravitation(t);
|
|
1528
|
+
}
|
|
1529
|
+
} else {
|
|
1530
|
+
var n = this.getFlatForest();
|
|
1531
|
+
if (n.length > 0) this.positionNodesRadially(n);
|
|
1532
|
+
else {
|
|
1533
|
+
this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
|
|
1534
|
+
var e = new Set(this.getAllNodes()), t = this.nodesWithGravity.filter(function(t) {
|
|
1535
|
+
return e.has(t);
|
|
1536
|
+
});
|
|
1537
|
+
this.graphManager.setAllNodesToApplyGravitation(t), this.positionNodesRandomly();
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
return this.initSpringEmbedder(), this.runSpringEmbedder(), !0;
|
|
1541
|
+
}, v.prototype.tick = function() {
|
|
1542
|
+
if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
|
|
1543
|
+
else return !0;
|
|
1544
|
+
if (this.totalIterations % l.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
|
|
1545
|
+
if (this.isConverged()) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
|
|
1546
|
+
else return !0;
|
|
1547
|
+
this.coolingCycle++, this.layoutQuality == 0 ? this.coolingAdjuster = this.coolingCycle : this.layoutQuality == 1 && (this.coolingAdjuster = this.coolingCycle / 3), this.coolingFactor = Math.max(this.initialCoolingFactor - 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));
|
|
1548
|
+
}
|
|
1549
|
+
if (this.isTreeGrowing) {
|
|
1550
|
+
if (this.growTreeIterations % 10 == 0) if (this.prunedNodesAll.length > 0) {
|
|
1551
|
+
this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
|
|
1552
|
+
var e = new Set(this.getAllNodes()), t = this.nodesWithGravity.filter(function(t) {
|
|
1553
|
+
return e.has(t);
|
|
1554
|
+
});
|
|
1555
|
+
this.graphManager.setAllNodesToApplyGravitation(t), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = l.DEFAULT_COOLING_FACTOR_INCREMENTAL;
|
|
1556
|
+
} else this.isTreeGrowing = !1, this.isGrowthFinished = !0;
|
|
1557
|
+
this.growTreeIterations++;
|
|
1558
|
+
}
|
|
1559
|
+
if (this.isGrowthFinished) {
|
|
1560
|
+
if (this.isConverged()) return !0;
|
|
1561
|
+
this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = l.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
|
|
1562
|
+
}
|
|
1563
|
+
var n = !this.isTreeGrowing && !this.isGrowthFinished, r = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
|
|
1564
|
+
return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(n, r), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
|
|
1565
|
+
}, v.prototype.getPositionsData = function() {
|
|
1566
|
+
for (var e = this.graphManager.getAllNodes(), t = {}, n = 0; n < e.length; n++) {
|
|
1567
|
+
var r = e[n].rect, i = e[n].id;
|
|
1568
|
+
t[i] = {
|
|
1569
|
+
id: i,
|
|
1570
|
+
x: r.getCenterX(),
|
|
1571
|
+
y: r.getCenterY(),
|
|
1572
|
+
w: r.width,
|
|
1573
|
+
h: r.height
|
|
1574
|
+
};
|
|
1575
|
+
}
|
|
1576
|
+
return t;
|
|
1577
|
+
}, v.prototype.runSpringEmbedder = function() {
|
|
1578
|
+
this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
|
|
1579
|
+
var e = !1;
|
|
1580
|
+
if (l.ANIMATE === "during") this.emit("layoutstarted");
|
|
1581
|
+
else {
|
|
1582
|
+
for (; !e;) e = this.tick();
|
|
1583
|
+
this.graphManager.updateBounds();
|
|
1584
|
+
}
|
|
1585
|
+
}, v.prototype.calculateNodesToApplyGravitationTo = function() {
|
|
1586
|
+
var e = [], t, n = this.graphManager.getGraphs(), r = n.length, i;
|
|
1587
|
+
for (i = 0; i < r; i++) t = n[i], t.updateConnected(), t.isConnected || (e = e.concat(t.getNodes()));
|
|
1588
|
+
return e;
|
|
1589
|
+
}, v.prototype.createBendpoints = function() {
|
|
1590
|
+
var e = [];
|
|
1591
|
+
e = e.concat(this.graphManager.getAllEdges());
|
|
1592
|
+
var t = /* @__PURE__ */ new Set(), n;
|
|
1593
|
+
for (n = 0; n < e.length; n++) {
|
|
1594
|
+
var r = e[n];
|
|
1595
|
+
if (!t.has(r)) {
|
|
1596
|
+
var i = r.getSource(), a = r.getTarget();
|
|
1597
|
+
if (i == a) r.getBendpoints().push(new f()), r.getBendpoints().push(new f()), this.createDummyNodesForBendpoints(r), t.add(r);
|
|
1598
|
+
else {
|
|
1599
|
+
var o = [];
|
|
1600
|
+
if (o = o.concat(i.getEdgeListToNode(a)), o = o.concat(a.getEdgeListToNode(i)), !t.has(o[0])) {
|
|
1601
|
+
if (o.length > 1) {
|
|
1602
|
+
var s;
|
|
1603
|
+
for (s = 0; s < o.length; s++) {
|
|
1604
|
+
var c = o[s];
|
|
1605
|
+
c.getBendpoints().push(new f()), this.createDummyNodesForBendpoints(c);
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
o.forEach(function(e) {
|
|
1609
|
+
t.add(e);
|
|
1610
|
+
});
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
if (t.size == e.length) break;
|
|
1615
|
+
}
|
|
1616
|
+
}, v.prototype.positionNodesRadially = function(e) {
|
|
1617
|
+
for (var t = new d(0, 0), n = Math.ceil(Math.sqrt(e.length)), r = 0, i = 0, a = 0, o = new f(0, 0), s = 0; s < e.length; s++) {
|
|
1618
|
+
s % n == 0 && (a = 0, i = r, s != 0 && (i += c.DEFAULT_COMPONENT_SEPERATION), r = 0);
|
|
1619
|
+
var l = e[s], m = p.findCenterOfTree(l);
|
|
1620
|
+
t.x = a, t.y = i, o = v.radialLayout(l, m, t), o.y > r && (r = Math.floor(o.y)), a = Math.floor(o.x + c.DEFAULT_COMPONENT_SEPERATION);
|
|
1621
|
+
}
|
|
1622
|
+
this.transform(new f(u.WORLD_CENTER_X - o.x / 2, u.WORLD_CENTER_Y - o.y / 2));
|
|
1623
|
+
}, v.radialLayout = function(e, t, n) {
|
|
1624
|
+
var r = Math.max(this.maxDiagonalInTree(e), c.DEFAULT_RADIAL_SEPARATION);
|
|
1625
|
+
v.branchRadialLayout(t, null, 0, 359, 0, r);
|
|
1626
|
+
var i = g.calculateBounds(e), a = new _();
|
|
1627
|
+
a.setDeviceOrgX(i.getMinX()), a.setDeviceOrgY(i.getMinY()), a.setWorldOrgX(n.x), a.setWorldOrgY(n.y);
|
|
1628
|
+
for (var o = 0; o < e.length; o++) e[o].transform(a);
|
|
1629
|
+
var s = new f(i.getMaxX(), i.getMaxY());
|
|
1630
|
+
return a.inverseTransformPoint(s);
|
|
1631
|
+
}, v.branchRadialLayout = function(e, t, n, r, i, a) {
|
|
1632
|
+
var o = (r - n + 1) / 2;
|
|
1633
|
+
o < 0 && (o += 180);
|
|
1634
|
+
var s = (o + n) % 360 * h.TWO_PI / 360, c = i * Math.cos(s), l = i * Math.sin(s);
|
|
1635
|
+
e.setCenter(c, l);
|
|
1636
|
+
var u = [];
|
|
1637
|
+
u = u.concat(e.getEdges());
|
|
1638
|
+
var d = u.length;
|
|
1639
|
+
t != null && d--;
|
|
1640
|
+
for (var f = 0, p = u.length, m, g = e.getEdgesBetween(t); g.length > 1;) {
|
|
1641
|
+
var _ = g[0];
|
|
1642
|
+
g.splice(0, 1);
|
|
1643
|
+
var y = u.indexOf(_);
|
|
1644
|
+
y >= 0 && u.splice(y, 1), p--, d--;
|
|
1645
|
+
}
|
|
1646
|
+
m = t == null ? 0 : (u.indexOf(g[0]) + 1) % p;
|
|
1647
|
+
for (var b = Math.abs(r - n) / d, x = m; f != d; x = ++x % p) {
|
|
1648
|
+
var S = u[x].getOtherEnd(e);
|
|
1649
|
+
if (S != t) {
|
|
1650
|
+
var C = (n + f * b) % 360, w = (C + b) % 360;
|
|
1651
|
+
v.branchRadialLayout(S, e, C, w, i + a, a), f++;
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
}, v.maxDiagonalInTree = function(e) {
|
|
1655
|
+
for (var t = m.MIN_VALUE, n = 0; n < e.length; n++) {
|
|
1656
|
+
var r = e[n].getDiagonal();
|
|
1657
|
+
r > t && (t = r);
|
|
1658
|
+
}
|
|
1659
|
+
return t;
|
|
1660
|
+
}, v.prototype.calcRepulsionRange = function() {
|
|
1661
|
+
return 2 * (this.level + 1) * this.idealEdgeLength;
|
|
1662
|
+
}, v.prototype.groupZeroDegreeMembers = function() {
|
|
1663
|
+
var e = this, t = {};
|
|
1664
|
+
this.memberGroups = {}, this.idToDummyNode = {};
|
|
1665
|
+
for (var n = [], r = this.graphManager.getAllNodes(), i = 0; i < r.length; i++) {
|
|
1666
|
+
var a = r[i], s = a.getParent();
|
|
1667
|
+
this.getNodeDegreeWithChildren(a) === 0 && (s.id == null || !this.getToBeTiled(s)) && n.push(a);
|
|
1668
|
+
}
|
|
1669
|
+
for (var i = 0; i < n.length; i++) {
|
|
1670
|
+
var a = n[i], c = a.getParent().id;
|
|
1671
|
+
t[c] === void 0 && (t[c] = []), t[c] = t[c].concat(a);
|
|
1672
|
+
}
|
|
1673
|
+
Object.keys(t).forEach(function(n) {
|
|
1674
|
+
if (t[n].length > 1) {
|
|
1675
|
+
var r = "DummyCompound_" + n;
|
|
1676
|
+
e.memberGroups[r] = t[n];
|
|
1677
|
+
var i = t[n][0].getParent(), a = new o(e.graphManager);
|
|
1678
|
+
a.id = r, a.paddingLeft = i.paddingLeft || 0, a.paddingRight = i.paddingRight || 0, a.paddingBottom = i.paddingBottom || 0, a.paddingTop = i.paddingTop || 0, e.idToDummyNode[r] = a;
|
|
1679
|
+
var s = e.getGraphManager().add(e.newGraph(), a), c = i.getChild();
|
|
1680
|
+
c.add(a);
|
|
1681
|
+
for (var l = 0; l < t[n].length; l++) {
|
|
1682
|
+
var u = t[n][l];
|
|
1683
|
+
c.remove(u), s.add(u);
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
});
|
|
1687
|
+
}, v.prototype.clearCompounds = function() {
|
|
1688
|
+
var e = {}, t = {};
|
|
1689
|
+
this.performDFSOnCompounds();
|
|
1690
|
+
for (var n = 0; n < this.compoundOrder.length; n++) t[this.compoundOrder[n].id] = this.compoundOrder[n], e[this.compoundOrder[n].id] = [].concat(this.compoundOrder[n].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[n].getChild()), this.compoundOrder[n].child = null;
|
|
1691
|
+
this.graphManager.resetAllNodes(), this.tileCompoundMembers(e, t);
|
|
1692
|
+
}, v.prototype.clearZeroDegreeMembers = function() {
|
|
1693
|
+
var e = this, t = this.tiledZeroDegreePack = [];
|
|
1694
|
+
Object.keys(this.memberGroups).forEach(function(n) {
|
|
1695
|
+
var r = e.idToDummyNode[n];
|
|
1696
|
+
t[n] = e.tileNodes(e.memberGroups[n], r.paddingLeft + r.paddingRight), r.rect.width = t[n].width, r.rect.height = t[n].height;
|
|
1697
|
+
});
|
|
1698
|
+
}, v.prototype.repopulateCompounds = function() {
|
|
1699
|
+
for (var e = this.compoundOrder.length - 1; e >= 0; e--) {
|
|
1700
|
+
var t = this.compoundOrder[e], n = t.id, r = t.paddingLeft, i = t.paddingTop;
|
|
1701
|
+
this.adjustLocations(this.tiledMemberPack[n], t.rect.x, t.rect.y, r, i);
|
|
1702
|
+
}
|
|
1703
|
+
}, v.prototype.repopulateZeroDegreeMembers = function() {
|
|
1704
|
+
var e = this, t = this.tiledZeroDegreePack;
|
|
1705
|
+
Object.keys(t).forEach(function(n) {
|
|
1706
|
+
var r = e.idToDummyNode[n], i = r.paddingLeft, a = r.paddingTop;
|
|
1707
|
+
e.adjustLocations(t[n], r.rect.x, r.rect.y, i, a);
|
|
1708
|
+
});
|
|
1709
|
+
}, v.prototype.getToBeTiled = function(e) {
|
|
1710
|
+
var t = e.id;
|
|
1711
|
+
if (this.toBeTiled[t] != null) return this.toBeTiled[t];
|
|
1712
|
+
var n = e.getChild();
|
|
1713
|
+
if (n == null) return this.toBeTiled[t] = !1, !1;
|
|
1714
|
+
for (var r = n.getNodes(), i = 0; i < r.length; i++) {
|
|
1715
|
+
var a = r[i];
|
|
1716
|
+
if (this.getNodeDegree(a) > 0) return this.toBeTiled[t] = !1, !1;
|
|
1717
|
+
if (a.getChild() == null) {
|
|
1718
|
+
this.toBeTiled[a.id] = !1;
|
|
1719
|
+
continue;
|
|
1720
|
+
}
|
|
1721
|
+
if (!this.getToBeTiled(a)) return this.toBeTiled[t] = !1, !1;
|
|
1722
|
+
}
|
|
1723
|
+
return this.toBeTiled[t] = !0, !0;
|
|
1724
|
+
}, v.prototype.getNodeDegree = function(e) {
|
|
1725
|
+
e.id;
|
|
1726
|
+
for (var t = e.getEdges(), n = 0, r = 0; r < t.length; r++) {
|
|
1727
|
+
var i = t[r];
|
|
1728
|
+
i.getSource().id !== i.getTarget().id && (n += 1);
|
|
1729
|
+
}
|
|
1730
|
+
return n;
|
|
1731
|
+
}, v.prototype.getNodeDegreeWithChildren = function(e) {
|
|
1732
|
+
var t = this.getNodeDegree(e);
|
|
1733
|
+
if (e.getChild() == null) return t;
|
|
1734
|
+
for (var n = e.getChild().getNodes(), r = 0; r < n.length; r++) {
|
|
1735
|
+
var i = n[r];
|
|
1736
|
+
t += this.getNodeDegreeWithChildren(i);
|
|
1737
|
+
}
|
|
1738
|
+
return t;
|
|
1739
|
+
}, v.prototype.performDFSOnCompounds = function() {
|
|
1740
|
+
this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
|
|
1741
|
+
}, v.prototype.fillCompexOrderByDFS = function(e) {
|
|
1742
|
+
for (var t = 0; t < e.length; t++) {
|
|
1743
|
+
var n = e[t];
|
|
1744
|
+
n.getChild() != null && this.fillCompexOrderByDFS(n.getChild().getNodes()), this.getToBeTiled(n) && this.compoundOrder.push(n);
|
|
1745
|
+
}
|
|
1746
|
+
}, v.prototype.adjustLocations = function(e, t, n, r, i) {
|
|
1747
|
+
t += r, n += i;
|
|
1748
|
+
for (var a = t, o = 0; o < e.rows.length; o++) {
|
|
1749
|
+
var s = e.rows[o];
|
|
1750
|
+
t = a;
|
|
1751
|
+
for (var c = 0, l = 0; l < s.length; l++) {
|
|
1752
|
+
var u = s[l];
|
|
1753
|
+
u.rect.x = t, u.rect.y = n, t += u.rect.width + e.horizontalPadding, u.rect.height > c && (c = u.rect.height);
|
|
1754
|
+
}
|
|
1755
|
+
n += c + e.verticalPadding;
|
|
1756
|
+
}
|
|
1757
|
+
}, v.prototype.tileCompoundMembers = function(e, t) {
|
|
1758
|
+
var n = this;
|
|
1759
|
+
this.tiledMemberPack = [], Object.keys(e).forEach(function(r) {
|
|
1760
|
+
var i = t[r];
|
|
1761
|
+
n.tiledMemberPack[r] = n.tileNodes(e[r], i.paddingLeft + i.paddingRight), i.rect.width = n.tiledMemberPack[r].width, i.rect.height = n.tiledMemberPack[r].height;
|
|
1762
|
+
});
|
|
1763
|
+
}, v.prototype.tileNodes = function(e, t) {
|
|
1764
|
+
var n = {
|
|
1765
|
+
rows: [],
|
|
1766
|
+
rowWidth: [],
|
|
1767
|
+
rowHeight: [],
|
|
1768
|
+
width: 0,
|
|
1769
|
+
height: t,
|
|
1770
|
+
verticalPadding: c.TILING_PADDING_VERTICAL,
|
|
1771
|
+
horizontalPadding: c.TILING_PADDING_HORIZONTAL
|
|
1772
|
+
};
|
|
1773
|
+
e.sort(function(e, t) {
|
|
1774
|
+
return e.rect.width * e.rect.height > t.rect.width * t.rect.height ? -1 : e.rect.width * e.rect.height < t.rect.width * t.rect.height ? 1 : 0;
|
|
1775
|
+
});
|
|
1776
|
+
for (var r = 0; r < e.length; r++) {
|
|
1777
|
+
var i = e[r];
|
|
1778
|
+
n.rows.length == 0 ? this.insertNodeToRow(n, i, 0, t) : this.canAddHorizontal(n, i.rect.width, i.rect.height) ? this.insertNodeToRow(n, i, this.getShortestRowIndex(n), t) : this.insertNodeToRow(n, i, n.rows.length, t), this.shiftToLastRow(n);
|
|
1779
|
+
}
|
|
1780
|
+
return n;
|
|
1781
|
+
}, v.prototype.insertNodeToRow = function(e, t, n, r) {
|
|
1782
|
+
var i = r;
|
|
1783
|
+
n == e.rows.length && (e.rows.push([]), e.rowWidth.push(i), e.rowHeight.push(0));
|
|
1784
|
+
var a = e.rowWidth[n] + t.rect.width;
|
|
1785
|
+
e.rows[n].length > 0 && (a += e.horizontalPadding), e.rowWidth[n] = a, e.width < a && (e.width = a);
|
|
1786
|
+
var o = t.rect.height;
|
|
1787
|
+
n > 0 && (o += e.verticalPadding);
|
|
1788
|
+
var s = 0;
|
|
1789
|
+
o > e.rowHeight[n] && (s = e.rowHeight[n], e.rowHeight[n] = o, s = e.rowHeight[n] - s), e.height += s, e.rows[n].push(t);
|
|
1790
|
+
}, v.prototype.getShortestRowIndex = function(e) {
|
|
1791
|
+
for (var t = -1, n = Number.MAX_VALUE, r = 0; r < e.rows.length; r++) e.rowWidth[r] < n && (t = r, n = e.rowWidth[r]);
|
|
1792
|
+
return t;
|
|
1793
|
+
}, v.prototype.getLongestRowIndex = function(e) {
|
|
1794
|
+
for (var t = -1, n = Number.MIN_VALUE, r = 0; r < e.rows.length; r++) e.rowWidth[r] > n && (t = r, n = e.rowWidth[r]);
|
|
1795
|
+
return t;
|
|
1796
|
+
}, v.prototype.canAddHorizontal = function(e, t, n) {
|
|
1797
|
+
var r = this.getShortestRowIndex(e);
|
|
1798
|
+
if (r < 0) return !0;
|
|
1799
|
+
var i = e.rowWidth[r];
|
|
1800
|
+
if (i + e.horizontalPadding + t <= e.width) return !0;
|
|
1801
|
+
var a = 0;
|
|
1802
|
+
e.rowHeight[r] < n && r > 0 && (a = n + e.verticalPadding - e.rowHeight[r]);
|
|
1803
|
+
var o = e.width - i >= t + e.horizontalPadding ? (e.height + a) / (i + t + e.horizontalPadding) : (e.height + a) / e.width;
|
|
1804
|
+
a = n + e.verticalPadding;
|
|
1805
|
+
var s = e.width < t ? (e.height + a) / t : (e.height + a) / e.width;
|
|
1806
|
+
return s < 1 && (s = 1 / s), o < 1 && (o = 1 / o), o < s;
|
|
1807
|
+
}, v.prototype.shiftToLastRow = function(e) {
|
|
1808
|
+
var t = this.getLongestRowIndex(e), n = e.rowWidth.length - 1, r = e.rows[t], i = r[r.length - 1], a = i.width + e.horizontalPadding;
|
|
1809
|
+
if (e.width - e.rowWidth[n] > a && t != n) {
|
|
1810
|
+
r.splice(-1, 1), e.rows[n].push(i), e.rowWidth[t] = e.rowWidth[t] - a, e.rowWidth[n] = e.rowWidth[n] + a, e.width = e.rowWidth[instance.getLongestRowIndex(e)];
|
|
1811
|
+
for (var o = Number.MIN_VALUE, s = 0; s < r.length; s++) r[s].height > o && (o = r[s].height);
|
|
1812
|
+
t > 0 && (o += e.verticalPadding);
|
|
1813
|
+
var c = e.rowHeight[t] + e.rowHeight[n];
|
|
1814
|
+
e.rowHeight[t] = o, e.rowHeight[n] < i.height + e.verticalPadding && (e.rowHeight[n] = i.height + e.verticalPadding);
|
|
1815
|
+
var l = e.rowHeight[t] + e.rowHeight[n];
|
|
1816
|
+
e.height += l - c, this.shiftToLastRow(e);
|
|
1817
|
+
}
|
|
1818
|
+
}, v.prototype.tilingPreLayout = function() {
|
|
1819
|
+
c.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
|
|
1820
|
+
}, v.prototype.tilingPostLayout = function() {
|
|
1821
|
+
c.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
|
|
1822
|
+
}, v.prototype.reduceTrees = function() {
|
|
1823
|
+
for (var e = [], t = !0, n; t;) {
|
|
1824
|
+
var r = this.graphManager.getAllNodes(), i = [];
|
|
1825
|
+
t = !1;
|
|
1826
|
+
for (var a = 0; a < r.length; a++) n = r[a], n.getEdges().length == 1 && !n.getEdges()[0].isInterGraph && n.getChild() == null && (i.push([
|
|
1827
|
+
n,
|
|
1828
|
+
n.getEdges()[0],
|
|
1829
|
+
n.getOwner()
|
|
1830
|
+
]), t = !0);
|
|
1831
|
+
if (t == 1) {
|
|
1832
|
+
for (var o = [], s = 0; s < i.length; s++) i[s][0].getEdges().length == 1 && (o.push(i[s]), i[s][0].getOwner().remove(i[s][0]));
|
|
1833
|
+
e.push(o), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
this.prunedNodesAll = e;
|
|
1837
|
+
}, v.prototype.growTree = function(e) {
|
|
1838
|
+
for (var t = e[e.length - 1], n, r = 0; r < t.length; r++) n = t[r], this.findPlaceforPrunedNode(n), n[2].add(n[0]), n[2].add(n[1], n[1].source, n[1].target);
|
|
1839
|
+
e.splice(e.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
|
|
1840
|
+
}, v.prototype.findPlaceforPrunedNode = function(e) {
|
|
1841
|
+
var t, n, r = e[0];
|
|
1842
|
+
n = r == e[1].source ? e[1].target : e[1].source;
|
|
1843
|
+
var i = n.startX, a = n.finishX, o = n.startY, s = n.finishY, c = [
|
|
1844
|
+
0,
|
|
1845
|
+
0,
|
|
1846
|
+
0,
|
|
1847
|
+
0
|
|
1848
|
+
];
|
|
1849
|
+
if (o > 0) for (var u = i; u <= a; u++) c[0] += this.grid[u][o - 1].length + this.grid[u][o].length - 1;
|
|
1850
|
+
if (a < this.grid.length - 1) for (var u = o; u <= s; u++) c[1] += this.grid[a + 1][u].length + this.grid[a][u].length - 1;
|
|
1851
|
+
if (s < this.grid[0].length - 1) for (var u = i; u <= a; u++) c[2] += this.grid[u][s + 1].length + this.grid[u][s].length - 1;
|
|
1852
|
+
if (i > 0) for (var u = o; u <= s; u++) c[3] += this.grid[i - 1][u].length + this.grid[i][u].length - 1;
|
|
1853
|
+
for (var d = m.MAX_VALUE, f, p, h = 0; h < c.length; h++) c[h] < d ? (d = c[h], f = 1, p = h) : c[h] == d && f++;
|
|
1854
|
+
if (f == 3 && d == 0) c[0] == 0 && c[1] == 0 && c[2] == 0 ? t = 1 : c[0] == 0 && c[1] == 0 && c[3] == 0 ? t = 0 : c[0] == 0 && c[2] == 0 && c[3] == 0 ? t = 3 : c[1] == 0 && c[2] == 0 && c[3] == 0 && (t = 2);
|
|
1855
|
+
else if (f == 2 && d == 0) {
|
|
1856
|
+
var g = Math.floor(Math.random() * 2);
|
|
1857
|
+
t = c[0] == 0 && c[1] == 0 ? g == 0 ? 0 : 1 : c[0] == 0 && c[2] == 0 ? g == 0 ? 0 : 2 : c[0] == 0 && c[3] == 0 ? g == 0 ? 0 : 3 : c[1] == 0 && c[2] == 0 ? g == 0 ? 1 : 2 : c[1] == 0 && c[3] == 0 ? g == 0 ? 1 : 3 : g == 0 ? 2 : 3;
|
|
1858
|
+
} else if (f == 4 && d == 0) {
|
|
1859
|
+
var g = Math.floor(Math.random() * 4);
|
|
1860
|
+
t = g;
|
|
1861
|
+
} else t = p;
|
|
1862
|
+
t == 0 ? r.setCenter(n.getCenterX(), n.getCenterY() - n.getHeight() / 2 - l.DEFAULT_EDGE_LENGTH - r.getHeight() / 2) : t == 1 ? r.setCenter(n.getCenterX() + n.getWidth() / 2 + l.DEFAULT_EDGE_LENGTH + r.getWidth() / 2, n.getCenterY()) : t == 2 ? r.setCenter(n.getCenterX(), n.getCenterY() + n.getHeight() / 2 + l.DEFAULT_EDGE_LENGTH + r.getHeight() / 2) : r.setCenter(n.getCenterX() - n.getWidth() / 2 - l.DEFAULT_EDGE_LENGTH - r.getWidth() / 2, n.getCenterY());
|
|
1863
|
+
}, e.exports = v;
|
|
1864
|
+
}),
|
|
1865
|
+
(function(e, t, n) {
|
|
1866
|
+
var r = {};
|
|
1867
|
+
r.layoutBase = n(0), r.CoSEConstants = n(1), r.CoSEEdge = n(2), r.CoSEGraph = n(3), r.CoSEGraphManager = n(4), r.CoSELayout = n(6), r.CoSENode = n(5), e.exports = r;
|
|
1868
|
+
})
|
|
1869
|
+
]);
|
|
1870
|
+
});
|
|
1871
|
+
})), import_cytoscape_cose_bilkent = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
1872
|
+
(function(n, r) {
|
|
1873
|
+
typeof e == "object" && typeof t == "object" ? t.exports = r(require_cose_base()) : typeof define == "function" && define.amd ? define(["cose-base"], r) : typeof e == "object" ? e.cytoscapeCoseBilkent = r(require_cose_base()) : n.cytoscapeCoseBilkent = r(n.coseBase);
|
|
1874
|
+
})(e, function(e) {
|
|
1875
|
+
return (function(e) {
|
|
1876
|
+
var t = {};
|
|
1877
|
+
function n(r) {
|
|
1878
|
+
if (t[r]) return t[r].exports;
|
|
1879
|
+
var i = t[r] = {
|
|
1880
|
+
i: r,
|
|
1881
|
+
l: !1,
|
|
1882
|
+
exports: {}
|
|
1883
|
+
};
|
|
1884
|
+
return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports;
|
|
1885
|
+
}
|
|
1886
|
+
return n.m = e, n.c = t, n.i = function(e) {
|
|
1887
|
+
return e;
|
|
1888
|
+
}, n.d = function(e, t, r) {
|
|
1889
|
+
n.o(e, t) || Object.defineProperty(e, t, {
|
|
1890
|
+
configurable: !1,
|
|
1891
|
+
enumerable: !0,
|
|
1892
|
+
get: r
|
|
1893
|
+
});
|
|
1894
|
+
}, n.n = function(e) {
|
|
1895
|
+
var t = e && e.__esModule ? function() {
|
|
1896
|
+
return e.default;
|
|
1897
|
+
} : function() {
|
|
1898
|
+
return e;
|
|
1899
|
+
};
|
|
1900
|
+
return n.d(t, "a", t), t;
|
|
1901
|
+
}, n.o = function(e, t) {
|
|
1902
|
+
return Object.prototype.hasOwnProperty.call(e, t);
|
|
1903
|
+
}, n.p = "", n(n.s = 1);
|
|
1904
|
+
})([(function(t, n) {
|
|
1905
|
+
t.exports = e;
|
|
1906
|
+
}), (function(e, t, n) {
|
|
1907
|
+
var r = n(0).layoutBase.LayoutConstants, i = n(0).layoutBase.FDLayoutConstants, a = n(0).CoSEConstants, o = n(0).CoSELayout, s = n(0).CoSENode, c = n(0).layoutBase.PointD, l = n(0).layoutBase.DimensionD, u = {
|
|
1908
|
+
ready: function() {},
|
|
1909
|
+
stop: function() {},
|
|
1910
|
+
quality: "default",
|
|
1911
|
+
nodeDimensionsIncludeLabels: !1,
|
|
1912
|
+
refresh: 30,
|
|
1913
|
+
fit: !0,
|
|
1914
|
+
padding: 10,
|
|
1915
|
+
randomize: !0,
|
|
1916
|
+
nodeRepulsion: 4500,
|
|
1917
|
+
idealEdgeLength: 50,
|
|
1918
|
+
edgeElasticity: .45,
|
|
1919
|
+
nestingFactor: .1,
|
|
1920
|
+
gravity: .25,
|
|
1921
|
+
numIter: 2500,
|
|
1922
|
+
tile: !0,
|
|
1923
|
+
animate: "end",
|
|
1924
|
+
animationDuration: 500,
|
|
1925
|
+
tilingPaddingVertical: 10,
|
|
1926
|
+
tilingPaddingHorizontal: 10,
|
|
1927
|
+
gravityRangeCompound: 1.5,
|
|
1928
|
+
gravityCompound: 1,
|
|
1929
|
+
gravityRange: 3.8,
|
|
1930
|
+
initialEnergyOnIncremental: .5
|
|
1931
|
+
};
|
|
1932
|
+
function d(e, t) {
|
|
1933
|
+
var n = {};
|
|
1934
|
+
for (var r in e) n[r] = e[r];
|
|
1935
|
+
for (var r in t) n[r] = t[r];
|
|
1936
|
+
return n;
|
|
1937
|
+
}
|
|
1938
|
+
function f(e) {
|
|
1939
|
+
this.options = d(u, e), p(this.options);
|
|
1940
|
+
}
|
|
1941
|
+
var p = function(e) {
|
|
1942
|
+
e.nodeRepulsion != null && (a.DEFAULT_REPULSION_STRENGTH = i.DEFAULT_REPULSION_STRENGTH = e.nodeRepulsion), e.idealEdgeLength != null && (a.DEFAULT_EDGE_LENGTH = i.DEFAULT_EDGE_LENGTH = e.idealEdgeLength), e.edgeElasticity != null && (a.DEFAULT_SPRING_STRENGTH = i.DEFAULT_SPRING_STRENGTH = e.edgeElasticity), e.nestingFactor != null && (a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.nestingFactor), e.gravity != null && (a.DEFAULT_GRAVITY_STRENGTH = i.DEFAULT_GRAVITY_STRENGTH = e.gravity), e.numIter != null && (a.MAX_ITERATIONS = i.MAX_ITERATIONS = e.numIter), e.gravityRange != null && (a.DEFAULT_GRAVITY_RANGE_FACTOR = i.DEFAULT_GRAVITY_RANGE_FACTOR = e.gravityRange), e.gravityCompound != null && (a.DEFAULT_COMPOUND_GRAVITY_STRENGTH = i.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.gravityCompound), e.gravityRangeCompound != null && (a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.gravityRangeCompound), e.initialEnergyOnIncremental != null && (a.DEFAULT_COOLING_FACTOR_INCREMENTAL = i.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.initialEnergyOnIncremental), e.quality == "draft" ? r.QUALITY = 0 : e.quality == "proof" ? r.QUALITY = 2 : r.QUALITY = 1, a.NODE_DIMENSIONS_INCLUDE_LABELS = i.NODE_DIMENSIONS_INCLUDE_LABELS = r.NODE_DIMENSIONS_INCLUDE_LABELS = e.nodeDimensionsIncludeLabels, a.DEFAULT_INCREMENTAL = i.DEFAULT_INCREMENTAL = r.DEFAULT_INCREMENTAL = !e.randomize, a.ANIMATE = i.ANIMATE = r.ANIMATE = e.animate, a.TILE = e.tile, a.TILING_PADDING_VERTICAL = typeof e.tilingPaddingVertical == "function" ? e.tilingPaddingVertical.call() : e.tilingPaddingVertical, a.TILING_PADDING_HORIZONTAL = typeof e.tilingPaddingHorizontal == "function" ? e.tilingPaddingHorizontal.call() : e.tilingPaddingHorizontal;
|
|
1943
|
+
};
|
|
1944
|
+
f.prototype.run = function() {
|
|
1945
|
+
var e, t, n = this.options;
|
|
1946
|
+
this.idToLNode = {};
|
|
1947
|
+
var r = this.layout = new o(), i = this;
|
|
1948
|
+
i.stopped = !1, this.cy = this.options.cy, this.cy.trigger({
|
|
1949
|
+
type: "layoutstart",
|
|
1950
|
+
layout: this
|
|
1951
|
+
});
|
|
1952
|
+
var a = r.newGraphManager();
|
|
1953
|
+
this.gm = a;
|
|
1954
|
+
var s = this.options.eles.nodes(), c = this.options.eles.edges();
|
|
1955
|
+
this.root = a.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes(s), r);
|
|
1956
|
+
for (var l = 0; l < c.length; l++) {
|
|
1957
|
+
var u = c[l], d = this.idToLNode[u.data("source")], f = this.idToLNode[u.data("target")];
|
|
1958
|
+
if (d !== f && d.getEdgesBetween(f).length == 0) {
|
|
1959
|
+
var p = a.add(r.newEdge(), d, f);
|
|
1960
|
+
p.id = u.id();
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
var m = function(e, t) {
|
|
1964
|
+
typeof e == "number" && (e = t);
|
|
1965
|
+
var n = e.data("id"), r = i.idToLNode[n];
|
|
1966
|
+
return {
|
|
1967
|
+
x: r.getRect().getCenterX(),
|
|
1968
|
+
y: r.getRect().getCenterY()
|
|
1969
|
+
};
|
|
1970
|
+
}, h = function a() {
|
|
1971
|
+
for (var o = function() {
|
|
1972
|
+
n.fit && n.cy.fit(n.eles, n.padding), e || (e = !0, i.cy.one("layoutready", n.ready), i.cy.trigger({
|
|
1973
|
+
type: "layoutready",
|
|
1974
|
+
layout: i
|
|
1975
|
+
}));
|
|
1976
|
+
}, s = i.options.refresh, c, l = 0; l < s && !c; l++) c = i.stopped || i.layout.tick();
|
|
1977
|
+
if (c) {
|
|
1978
|
+
r.checkLayoutSuccess() && !r.isSubLayout && r.doPostLayout(), r.tilingPostLayout && r.tilingPostLayout(), r.isLayoutFinished = !0, i.options.eles.nodes().positions(m), o(), i.cy.one("layoutstop", i.options.stop), i.cy.trigger({
|
|
1979
|
+
type: "layoutstop",
|
|
1980
|
+
layout: i
|
|
1981
|
+
}), t && cancelAnimationFrame(t), e = !1;
|
|
1982
|
+
return;
|
|
1983
|
+
}
|
|
1984
|
+
var u = i.layout.getPositionsData();
|
|
1985
|
+
n.eles.nodes().positions(function(e, t) {
|
|
1986
|
+
if (typeof e == "number" && (e = t), !e.isParent()) {
|
|
1987
|
+
for (var n = e.id(), r = u[n], i = e; r == null && (r = u[i.data("parent")] || u["DummyCompound_" + i.data("parent")], u[n] = r, i = i.parent()[0], i != null););
|
|
1988
|
+
return r == null ? {
|
|
1989
|
+
x: e.position("x"),
|
|
1990
|
+
y: e.position("y")
|
|
1991
|
+
} : {
|
|
1992
|
+
x: r.x,
|
|
1993
|
+
y: r.y
|
|
1994
|
+
};
|
|
1995
|
+
}
|
|
1996
|
+
}), o(), t = requestAnimationFrame(a);
|
|
1997
|
+
};
|
|
1998
|
+
return r.addListener("layoutstarted", function() {
|
|
1999
|
+
i.options.animate === "during" && (t = requestAnimationFrame(h));
|
|
2000
|
+
}), r.runLayout(), this.options.animate !== "during" && (i.options.eles.nodes().not(":parent").layoutPositions(i, i.options, m), e = !1), this;
|
|
2001
|
+
}, f.prototype.getTopMostNodes = function(e) {
|
|
2002
|
+
for (var t = {}, n = 0; n < e.length; n++) t[e[n].id()] = !0;
|
|
2003
|
+
return e.filter(function(e, n) {
|
|
2004
|
+
typeof e == "number" && (e = n);
|
|
2005
|
+
for (var r = e.parent()[0]; r != null;) {
|
|
2006
|
+
if (t[r.id()]) return !1;
|
|
2007
|
+
r = r.parent()[0];
|
|
2008
|
+
}
|
|
2009
|
+
return !0;
|
|
2010
|
+
});
|
|
2011
|
+
}, f.prototype.processChildrenList = function(e, t, n) {
|
|
2012
|
+
for (var r = t.length, i = 0; i < r; i++) {
|
|
2013
|
+
var a = t[i], o = a.children(), u, d = a.layoutDimensions({ nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels });
|
|
2014
|
+
if (u = a.outerWidth() != null && a.outerHeight() != null ? e.add(new s(n.graphManager, new c(a.position("x") - d.w / 2, a.position("y") - d.h / 2), new l(parseFloat(d.w), parseFloat(d.h)))) : e.add(new s(this.graphManager)), u.id = a.data("id"), u.paddingLeft = parseInt(a.css("padding")), u.paddingTop = parseInt(a.css("padding")), u.paddingRight = parseInt(a.css("padding")), u.paddingBottom = parseInt(a.css("padding")), this.options.nodeDimensionsIncludeLabels && a.isParent()) {
|
|
2015
|
+
var f = a.boundingBox({
|
|
2016
|
+
includeLabels: !0,
|
|
2017
|
+
includeNodes: !1
|
|
2018
|
+
}).w, p = a.boundingBox({
|
|
2019
|
+
includeLabels: !0,
|
|
2020
|
+
includeNodes: !1
|
|
2021
|
+
}).h, m = a.css("text-halign");
|
|
2022
|
+
u.labelWidth = f, u.labelHeight = p, u.labelPos = m;
|
|
2023
|
+
}
|
|
2024
|
+
if (this.idToLNode[a.data("id")] = u, isNaN(u.rect.x) && (u.rect.x = 0), isNaN(u.rect.y) && (u.rect.y = 0), o != null && o.length > 0) {
|
|
2025
|
+
var h = n.getGraphManager().add(n.newGraph(), u);
|
|
2026
|
+
this.processChildrenList(h, o, n);
|
|
2027
|
+
}
|
|
2028
|
+
}
|
|
2029
|
+
}, f.prototype.stop = function() {
|
|
2030
|
+
return this.stopped = !0, this;
|
|
2031
|
+
};
|
|
2032
|
+
var m = function(e) {
|
|
2033
|
+
e("layout", "cose-bilkent", f);
|
|
2034
|
+
};
|
|
2035
|
+
typeof cytoscape < "u" && m(cytoscape), e.exports = m;
|
|
2036
|
+
})]);
|
|
2037
|
+
});
|
|
2038
|
+
})))(), 1);
|
|
2039
|
+
cytoscape$1.use(import_cytoscape_cose_bilkent.default);
|
|
2040
|
+
function addNodes(e, t) {
|
|
2041
|
+
e.forEach((e) => {
|
|
2042
|
+
let n = {
|
|
2043
|
+
id: e.id,
|
|
2044
|
+
labelText: e.label,
|
|
2045
|
+
height: e.height,
|
|
2046
|
+
width: e.width,
|
|
2047
|
+
padding: e.padding ?? 0
|
|
2048
|
+
};
|
|
2049
|
+
Object.keys(e).forEach((t) => {
|
|
2050
|
+
[
|
|
2051
|
+
"id",
|
|
2052
|
+
"label",
|
|
2053
|
+
"height",
|
|
2054
|
+
"width",
|
|
2055
|
+
"padding",
|
|
2056
|
+
"x",
|
|
2057
|
+
"y"
|
|
2058
|
+
].includes(t) || (n[t] = e[t]);
|
|
2059
|
+
}), t.add({
|
|
2060
|
+
group: "nodes",
|
|
2061
|
+
data: n,
|
|
2062
|
+
position: {
|
|
2063
|
+
x: e.x ?? 0,
|
|
2064
|
+
y: e.y ?? 0
|
|
2065
|
+
}
|
|
2066
|
+
});
|
|
2067
|
+
});
|
|
2068
|
+
}
|
|
2069
|
+
__name(addNodes, "addNodes");
|
|
2070
|
+
function addEdges(e, t) {
|
|
2071
|
+
e.forEach((e) => {
|
|
2072
|
+
let n = {
|
|
2073
|
+
id: e.id,
|
|
2074
|
+
source: e.start,
|
|
2075
|
+
target: e.end
|
|
2076
|
+
};
|
|
2077
|
+
Object.keys(e).forEach((t) => {
|
|
2078
|
+
[
|
|
2079
|
+
"id",
|
|
2080
|
+
"start",
|
|
2081
|
+
"end"
|
|
2082
|
+
].includes(t) || (n[t] = e[t]);
|
|
2083
|
+
}), t.add({
|
|
2084
|
+
group: "edges",
|
|
2085
|
+
data: n
|
|
2086
|
+
});
|
|
2087
|
+
});
|
|
2088
|
+
}
|
|
2089
|
+
__name(addEdges, "addEdges");
|
|
2090
|
+
function createCytoscapeInstance(e) {
|
|
2091
|
+
return new Promise((t) => {
|
|
2092
|
+
let r = select_default("body").append("div").attr("id", "cy").attr("style", "display:none"), o = cytoscape$1({
|
|
2093
|
+
container: document.getElementById("cy"),
|
|
2094
|
+
style: [{
|
|
2095
|
+
selector: "edge",
|
|
2096
|
+
style: { "curve-style": "bezier" }
|
|
2097
|
+
}]
|
|
2098
|
+
});
|
|
2099
|
+
r.remove(), addNodes(e.nodes, o), addEdges(e.edges, o), o.nodes().forEach(function(e) {
|
|
2100
|
+
e.layoutDimensions = () => {
|
|
2101
|
+
let t = e.data();
|
|
2102
|
+
return {
|
|
2103
|
+
w: t.width,
|
|
2104
|
+
h: t.height
|
|
2105
|
+
};
|
|
2106
|
+
};
|
|
2107
|
+
}), o.layout({
|
|
2108
|
+
name: "cose-bilkent",
|
|
2109
|
+
quality: "proof",
|
|
2110
|
+
styleEnabled: !1,
|
|
2111
|
+
animate: !1
|
|
2112
|
+
}).run(), o.ready((e) => {
|
|
2113
|
+
log.info("Cytoscape ready", e), t(o);
|
|
2114
|
+
});
|
|
2115
|
+
});
|
|
2116
|
+
}
|
|
2117
|
+
__name(createCytoscapeInstance, "createCytoscapeInstance");
|
|
2118
|
+
function extractPositionedNodes(e) {
|
|
2119
|
+
return e.nodes().map((e) => {
|
|
2120
|
+
let t = e.data(), n = e.position(), r = {
|
|
2121
|
+
id: t.id,
|
|
2122
|
+
x: n.x,
|
|
2123
|
+
y: n.y
|
|
2124
|
+
};
|
|
2125
|
+
return Object.keys(t).forEach((e) => {
|
|
2126
|
+
e !== "id" && (r[e] = t[e]);
|
|
2127
|
+
}), r;
|
|
2128
|
+
});
|
|
2129
|
+
}
|
|
2130
|
+
__name(extractPositionedNodes, "extractPositionedNodes");
|
|
2131
|
+
function extractPositionedEdges(e) {
|
|
2132
|
+
return e.edges().map((e) => {
|
|
2133
|
+
let t = e.data(), n = e._private.rscratch, r = {
|
|
2134
|
+
id: t.id,
|
|
2135
|
+
source: t.source,
|
|
2136
|
+
target: t.target,
|
|
2137
|
+
startX: n.startX,
|
|
2138
|
+
startY: n.startY,
|
|
2139
|
+
midX: n.midX,
|
|
2140
|
+
midY: n.midY,
|
|
2141
|
+
endX: n.endX,
|
|
2142
|
+
endY: n.endY
|
|
2143
|
+
};
|
|
2144
|
+
return Object.keys(t).forEach((e) => {
|
|
2145
|
+
[
|
|
2146
|
+
"id",
|
|
2147
|
+
"source",
|
|
2148
|
+
"target"
|
|
2149
|
+
].includes(e) || (r[e] = t[e]);
|
|
2150
|
+
}), r;
|
|
2151
|
+
});
|
|
2152
|
+
}
|
|
2153
|
+
__name(extractPositionedEdges, "extractPositionedEdges");
|
|
2154
|
+
async function executeCoseBilkentLayout(e, t) {
|
|
2155
|
+
log.debug("Starting cose-bilkent layout algorithm");
|
|
2156
|
+
try {
|
|
2157
|
+
validateLayoutData(e);
|
|
2158
|
+
let t = await createCytoscapeInstance(e), r = extractPositionedNodes(t), i = extractPositionedEdges(t);
|
|
2159
|
+
return log.debug(`Layout completed: ${r.length} nodes, ${i.length} edges`), {
|
|
2160
|
+
nodes: r,
|
|
2161
|
+
edges: i
|
|
2162
|
+
};
|
|
2163
|
+
} catch (e) {
|
|
2164
|
+
throw log.error("Error in cose-bilkent layout algorithm:", e), e;
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
__name(executeCoseBilkentLayout, "executeCoseBilkentLayout");
|
|
2168
|
+
function validateLayoutData(e) {
|
|
2169
|
+
if (!e) throw Error("Layout data is required");
|
|
2170
|
+
if (!e.config) throw Error("Configuration is required in layout data");
|
|
2171
|
+
if (!e.rootNode) throw Error("Root node is required");
|
|
2172
|
+
if (!e.nodes || !Array.isArray(e.nodes)) throw Error("No nodes found in layout data");
|
|
2173
|
+
if (!Array.isArray(e.edges)) throw Error("Edges array is required in layout data");
|
|
2174
|
+
return !0;
|
|
2175
|
+
}
|
|
2176
|
+
__name(validateLayoutData, "validateLayoutData");
|
|
2177
|
+
var render2 = /* @__PURE__ */ __name(async (e, t, { insertCluster: n, insertEdge: r, insertEdgeLabel: i, insertMarkers: a, insertNode: o, log: s, positionEdgeLabel: c }, { algorithm: l }) => {
|
|
2178
|
+
let u = {}, d = {}, f = t.select("g");
|
|
2179
|
+
a(f, e.markers, e.type, e.diagramId);
|
|
2180
|
+
let p = f.insert("g").attr("class", "subgraphs"), h = f.insert("g").attr("class", "edgePaths"), g = f.insert("g").attr("class", "edgeLabels"), _ = f.insert("g").attr("class", "nodes");
|
|
2181
|
+
s.debug("Inserting nodes into DOM for dimension calculation"), await Promise.all(e.nodes.map(async (t) => {
|
|
2182
|
+
if (t.isGroup) {
|
|
2183
|
+
let e = { ...t };
|
|
2184
|
+
d[t.id] = e, u[t.id] = e, await n(p, t);
|
|
2185
|
+
} else {
|
|
2186
|
+
let n = { ...t };
|
|
2187
|
+
u[t.id] = n;
|
|
2188
|
+
let r = await o(_, t, {
|
|
2189
|
+
config: e.config,
|
|
2190
|
+
dir: e.direction || "TB"
|
|
2191
|
+
}), i = r.node().getBBox();
|
|
2192
|
+
n.width = i.width, n.height = i.height, n.domId = r, s.debug(`Node ${t.id} dimensions: ${i.width}x${i.height}`);
|
|
2193
|
+
}
|
|
2194
|
+
})), s.debug("Running cose-bilkent layout algorithm");
|
|
2195
|
+
let v = await executeCoseBilkentLayout({
|
|
2196
|
+
...e,
|
|
2197
|
+
nodes: e.nodes.map((e) => {
|
|
2198
|
+
let t = u[e.id];
|
|
2199
|
+
return {
|
|
2200
|
+
...e,
|
|
2201
|
+
width: t.width,
|
|
2202
|
+
height: t.height
|
|
2203
|
+
};
|
|
2204
|
+
})
|
|
2205
|
+
}, e.config);
|
|
2206
|
+
s.debug("Positioning nodes based on layout results"), v.nodes.forEach((e) => {
|
|
2207
|
+
let t = u[e.id];
|
|
2208
|
+
t?.domId && (t.domId.attr("transform", `translate(${e.x}, ${e.y})`), t.x = e.x, t.y = e.y, s.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`));
|
|
2209
|
+
}), v.edges.forEach((t) => {
|
|
2210
|
+
let n = e.edges.find((e) => e.id === t.id);
|
|
2211
|
+
n && (n.points = [
|
|
2212
|
+
{
|
|
2213
|
+
x: t.startX,
|
|
2214
|
+
y: t.startY
|
|
2215
|
+
},
|
|
2216
|
+
{
|
|
2217
|
+
x: t.midX,
|
|
2218
|
+
y: t.midY
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
x: t.endX,
|
|
2222
|
+
y: t.endY
|
|
2223
|
+
}
|
|
2224
|
+
]);
|
|
2225
|
+
}), s.debug("Inserting and positioning edges"), await Promise.all(e.edges.map(async (t) => {
|
|
2226
|
+
await i(g, t);
|
|
2227
|
+
let n = u[t.start ?? ""], a = u[t.end ?? ""];
|
|
2228
|
+
if (n && a) {
|
|
2229
|
+
let i = v.edges.find((e) => e.id === t.id);
|
|
2230
|
+
if (i) {
|
|
2231
|
+
s.debug("APA01 positionedEdge", i);
|
|
2232
|
+
let o = { ...t };
|
|
2233
|
+
c(o, r(h, o, d, e.type, n, a, e.diagramId));
|
|
2234
|
+
} else {
|
|
2235
|
+
let i = {
|
|
2236
|
+
...t,
|
|
2237
|
+
points: [{
|
|
2238
|
+
x: n.x || 0,
|
|
2239
|
+
y: n.y || 0
|
|
2240
|
+
}, {
|
|
2241
|
+
x: a.x || 0,
|
|
2242
|
+
y: a.y || 0
|
|
2243
|
+
}]
|
|
2244
|
+
};
|
|
2245
|
+
c(i, r(h, i, d, e.type, n, a, e.diagramId));
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
})), s.debug("Cose-bilkent rendering completed");
|
|
2249
|
+
}, "render");
|
|
2250
|
+
export { render2 as render };
|