kennel 0.2.20 → 0.2.21
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/cli/usage.js +1 -1
- package/dist/core/command.js +10 -5
- package/dist/plugins/external.js +5 -2
- package/package.json +2 -2
- package/web/assets/abnfDiagram-VRR7QNED-D8JkjVKl.js +1 -0
- package/web/assets/arc-BU-iDKmm.js +1 -0
- package/web/assets/architectureDiagram-ZJ3FMSHR-CqrAC8xg.js +36 -0
- package/web/assets/ask-tray-PMT6VVXN-wk47U8hG.js +23 -0
- package/web/assets/{blockDiagram-677ZJIJ3-B404lYhT.js → blockDiagram-677ZJIJ3-CwKkdWVm.js} +2 -2
- package/web/assets/{c4Diagram-LMCZKHZV-m6CP9WKP.js → c4Diagram-LMCZKHZV-C0j-XG7a.js} +2 -2
- package/web/assets/channel-DPvp96Av.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-lofRULSz.js → chunk-2Q5K7J3B-D91WnA8d.js} +1 -1
- package/web/assets/{chunk-32BRIVSS-BtdUGMBQ.js → chunk-32BRIVSS-CMUWV3Yb.js} +1 -1
- package/web/assets/{chunk-5VM5RSS4-BBjGl_Dr.js → chunk-5VM5RSS4-CBonp6Qu.js} +1 -1
- package/web/assets/{chunk-EX3LRPZG-DM3Qu278.js → chunk-EX3LRPZG-B5p4u10U.js} +3 -3
- package/web/assets/{chunk-JWPE2WC7-Bp1ws-G7.js → chunk-JWPE2WC7-BvcBor40.js} +1 -1
- package/web/assets/{chunk-MOJQB5TN-C7smXTrN.js → chunk-MOJQB5TN-eoj4Adi1.js} +1 -1
- package/web/assets/{chunk-RYQCIY6F-DODJCmXB.js → chunk-RYQCIY6F-DlFyEcEU.js} +1 -1
- package/web/assets/{chunk-V7JOEXUC-C7fI1RPs.js → chunk-V7JOEXUC-Drt-X5bO.js} +1 -1
- package/web/assets/{chunk-VR4S4FIN-BkMRGbPv.js → chunk-VR4S4FIN-BHmZP44S.js} +1 -1
- package/web/assets/{chunk-XXDRQBXY-DGKhiMOo.js → chunk-XXDRQBXY-BpRFqfxG.js} +1 -1
- package/web/assets/classDiagram-OUVF2IWQ-UEDL7zk8.js +1 -0
- package/web/assets/classDiagram-v2-EOCWNBFH-UEDL7zk8.js +1 -0
- package/web/assets/cose-bilkent-JH36ORCC-BWofo0Io.js +1 -0
- package/web/assets/{cynefin-VYW2F7L2-Co86WDlY.js → cynefin-VYW2F7L2-vZngODMB.js} +1 -1
- package/web/assets/cynefinDiagram-TSTJHNR4-Cexlv1-W.js +62 -0
- package/web/assets/{dagre-VKFMJZFB-2FzdH1tO.js → dagre-VKFMJZFB-Z9zxnPrH.js} +2 -2
- package/web/assets/{diagram-FQU43EPY-D8oGdGs0.js → diagram-FQU43EPY-DePIt5Jb.js} +2 -2
- package/web/assets/diagram-G47NLZAW-BhO62yXV.js +24 -0
- package/web/assets/diagram-NH7WQ7WH-BPB7x0TD.js +24 -0
- package/web/assets/{diagram-OA4YK3LP-Dapxn_y5.js → diagram-OA4YK3LP-BTu87fOH.js} +5 -5
- package/web/assets/diagram-WEI45ONY-NbsxbHXS.js +41 -0
- package/web/assets/ebnfDiagram-CCIWWBDH-DcabTYw5.js +1 -0
- package/web/assets/{entities-Ba9UFGWQ.js → entity-search-page-G6QEQNXT-_igDx9q_.js} +10 -10
- package/web/assets/{erDiagram-Q63AITRT-BeWglGbe.js → erDiagram-Q63AITRT-qZDSW4hk.js} +2 -2
- package/web/assets/{flowDiagram-23GEKE2U-DQSrCvnP.js → flowDiagram-23GEKE2U-BKWFG8oh.js} +1 -1
- package/web/assets/ganttDiagram-NO4QXBWP-RVyAZqbP.js +292 -0
- package/web/assets/gitGraphDiagram-IHSO6WYX-DyJiGxOQ.js +106 -0
- package/web/assets/index-BGwTWQMJ.css +1 -0
- package/web/assets/index-DDNcaGdr.js +451 -0
- package/web/assets/infoDiagram-FWYZ7A6U-11u7EDGL.js +2 -0
- package/web/assets/{ishikawaDiagram-FXEZZL3T-zdZcsCSy.js → ishikawaDiagram-FXEZZL3T-BExEsB80.js} +6 -6
- package/web/assets/{journeyDiagram-5HDEW3XC-Cyviy-mf.js → journeyDiagram-5HDEW3XC-CBxrerT9.js} +2 -2
- package/web/assets/{kanban-definition-HUTT4EX6-BEOdHBFJ.js → kanban-definition-HUTT4EX6-zA-xYwTx.js} +6 -6
- package/web/assets/{linear-B0Elyctv.js → linear-DfGuGay4.js} +1 -1
- package/web/assets/linked-session-header-M7WY6IGF-BZNiFQoC.js +3 -0
- package/web/assets/{markdown-BvBsne3X.js → markdown-D8rwfvNM.js} +2 -2
- package/web/assets/{mermaid.core-BEwF5fZo.js → mermaid.core-B11SxqQq.js} +6 -6
- package/web/assets/{mindmap-definition-LN4V7U3C-DW5Nc3Z2.js → mindmap-definition-LN4V7U3C-Cxv0my2M.js} +2 -2
- package/web/assets/pegDiagram-2B236MQR-BneyaGqf.js +1 -0
- package/web/assets/{pieDiagram-ENE6RG2P-DxF16ujD.js → pieDiagram-ENE6RG2P-CBUh5NNN.js} +2 -2
- package/web/assets/plugin-host-modules-_3hYj4i2.js +74 -0
- package/web/assets/{project-search-dialog-Bm4cKotY.js → project-search-dialog-HJFGW4DG-t9HH44Ls.js} +5 -5
- package/web/assets/project-search-page-NKQEBGPF-C-SLaeRU.js +2 -0
- package/web/assets/{quadrantDiagram-ABIIQ3AL-D6lKmduJ.js → quadrantDiagram-ABIIQ3AL-_70f5MLq.js} +2 -2
- package/web/assets/railroadDiagram-RFXS5EU6-BjRVGtzp.js +1 -0
- package/web/assets/react-Df0zP-bB.js +9 -0
- package/web/assets/{requirementDiagram-TGXJPOKE-DCWUvc_i.js → requirementDiagram-TGXJPOKE-b4jG1W5K.js} +2 -2
- package/web/assets/{sankeyDiagram-HTMAVEWB-CQ4kDW3E.js → sankeyDiagram-HTMAVEWB-Cid_FHOs.js} +2 -2
- package/web/assets/selection-popup-532EHNCZ-Czn9J64H.js +7 -0
- package/web/assets/{sequenceDiagram-DBY2YBRQ-C-ygrC5m.js → sequenceDiagram-DBY2YBRQ-XmWVFjsx.js} +2 -2
- package/web/assets/sizeCapture-X5ZJPWSS-DcCu2WOn.js +1 -0
- package/web/assets/stateDiagram-2N3HPSRC-DJJtthm-.js +1 -0
- package/web/assets/stateDiagram-v2-6OUMAXLB-N45X3hYp.js +1 -0
- package/web/assets/swimlanes-5IMT3BWC-DafiRSZ_.js +2 -0
- package/web/assets/swimlanesDiagram-G3AALYLV-CAU4pVsD.js +8 -0
- package/web/assets/tanstack-DzYfxaKh.js +1 -0
- package/web/assets/{timeline-definition-FHXFAJF6-D3kXwv5v.js → timeline-definition-FHXFAJF6-BSuB4MkD.js} +2 -2
- package/web/assets/{vennDiagram-L72KCM5P-DZhfR6LC.js → vennDiagram-L72KCM5P-DzQg-Ww0.js} +4 -4
- package/web/assets/{wardleyDiagram-EHGQE667-CzwAW4nO.js → wardleyDiagram-EHGQE667-DQuK20Nj.js} +2 -2
- package/web/assets/{xychartDiagram-FW5EYKEG-CebaePFD.js → xychartDiagram-FW5EYKEG-DVpYoZuG.js} +2 -2
- package/web/index.html +5 -4
- package/web/kennel-theme.css +4 -2
- package/web/assets/abnfDiagram-VRR7QNED-1RdiIYIR.js +0 -1
- package/web/assets/app-CEQAoxzL.js +0 -2
- package/web/assets/app-options-CIiczgaQ.js +0 -25
- package/web/assets/app-view-header-CNImosi9.js +0 -1
- package/web/assets/arc-DCuRiob1.js +0 -1
- package/web/assets/architectureDiagram-ZJ3FMSHR-CAcGR7BC.js +0 -36
- package/web/assets/ask-tray-DpWLca3e.js +0 -14
- package/web/assets/channel-CGNx58wi.js +0 -1
- package/web/assets/check-DjJ4znpk.js +0 -1
- package/web/assets/chevron-down-CiyxliRS.js +0 -1
- package/web/assets/chevron-right-BaJja2sG.js +0 -1
- package/web/assets/chevron-up-Xv7ii00h.js +0 -1
- package/web/assets/classDiagram-OUVF2IWQ-CepcbkQI.js +0 -1
- package/web/assets/classDiagram-v2-EOCWNBFH-CepcbkQI.js +0 -1
- package/web/assets/client-Bs3Sdel1.js +0 -6
- package/web/assets/client-Bz9gxOoP.js +0 -43
- package/web/assets/command-B-4JoDzT.js +0 -38
- package/web/assets/copy-DKl_cZLH.js +0 -1
- package/web/assets/copy-context-Bj8Sfpo7.js +0 -1
- package/web/assets/cose-bilkent-JH36ORCC-rQPbqPgO.js +0 -1
- package/web/assets/cynefinDiagram-TSTJHNR4-C9V3Tu3i.js +0 -62
- package/web/assets/diagram-G47NLZAW-Bav2L_9E.js +0 -24
- package/web/assets/diagram-NH7WQ7WH-CxOSrenv.js +0 -24
- package/web/assets/diagram-WEI45ONY-CGAvJVWu.js +0 -41
- package/web/assets/document-C4ERzZZ-.js +0 -23
- package/web/assets/ebnfDiagram-CCIWWBDH-CmJpnBTF.js +0 -1
- package/web/assets/ellipsis-DIDqkP8k.js +0 -1
- package/web/assets/file-text-C3hyr-Ql.js +0 -1
- package/web/assets/file-viewer-CYCdL53W.js +0 -1
- package/web/assets/folder-activity-Cv1X2ezj.js +0 -1
- package/web/assets/folder-filter-bar-Bl30Jv6B.js +0 -4
- package/web/assets/folder-image-Cy-8Vgmd.js +0 -1
- package/web/assets/folder-landing-BiswmWY0.js +0 -55
- package/web/assets/folder-list-BPufqaem.js +0 -1
- package/web/assets/folder-mobile-bar-Dxsu-jUM.js +0 -1
- package/web/assets/folder-open-CqSoJtKT.js +0 -1
- package/web/assets/folder-plugin-view-DiZbM5qv.js +0 -2
- package/web/assets/ganttDiagram-NO4QXBWP-BHGXM83R.js +0 -292
- package/web/assets/gitGraphDiagram-IHSO6WYX-DHoetr2P.js +0 -106
- package/web/assets/hooks-wZOJYSkv.js +0 -1
- package/web/assets/index-4-yQR2Lz.js +0 -41
- package/web/assets/index-4JQ747xt.js +0 -1
- package/web/assets/index-B6ap1Jz7.js +0 -1
- package/web/assets/index-BSHr1oc9.js +0 -1
- package/web/assets/index-CHgBEfsO.js +0 -1
- package/web/assets/index-CKJsEQtp.js +0 -64
- package/web/assets/index-DbD-bwdm.js +0 -2
- package/web/assets/index-uo3lipQl.js +0 -1
- package/web/assets/index-wmrfz8OS.css +0 -1
- package/web/assets/infoDiagram-FWYZ7A6U-09XQL5OF.js +0 -2
- package/web/assets/input-fNFbKa15.js +0 -9
- package/web/assets/linked-session-header-D4SUBW0L.js +0 -3
- package/web/assets/metadata-Dy1R-He2.js +0 -58
- package/web/assets/pegDiagram-2B236MQR-Cj3gTzwg.js +0 -1
- package/web/assets/plugin-host-modules-C_FG5LYc.js +0 -10
- package/web/assets/plus-TM7voyHO.js +0 -1
- package/web/assets/popover-DvKy7gF6.js +0 -9
- package/web/assets/railroadDiagram-RFXS5EU6-CNMzdL0J.js +0 -1
- package/web/assets/react-Dh7j6h1K.js +0 -9
- package/web/assets/search-Cv1HqxUc.js +0 -2
- package/web/assets/search-Cx23EFPc.js +0 -1
- package/web/assets/search-DG1auulp.css +0 -1
- package/web/assets/selection-popup-DPC2dc_s.js +0 -7
- package/web/assets/sizeCapture-X5ZJPWSS-CWCSfdrg.js +0 -1
- package/web/assets/stateDiagram-2N3HPSRC-BUJ8nxcE.js +0 -1
- package/web/assets/stateDiagram-v2-6OUMAXLB-DgubHPLq.js +0 -1
- package/web/assets/swimlanes-5IMT3BWC-rw0Loza_.js +0 -2
- package/web/assets/swimlanesDiagram-G3AALYLV-CxNu_14L.js +0 -8
- package/web/assets/tanstack-CirxkzEx.js +0 -1
- package/web/assets/utils-CvINCDjn.js +0 -1
- package/web/assets/view-context-DyuiMZAo.js +0 -101
- package/web/assets/viewer-capabilities-BkBR084B.js +0 -1
- package/web/assets/x-GGS-h4Nm.js +0 -1
- /package/web/assets/{KaTeX_AMS-Regular-DMm9YOAa.woff → KaTeX_AMS-Regular-CYEKBG2K-DMm9YOAa.woff} +0 -0
- /package/web/assets/{KaTeX_AMS-Regular-DRggAlZN.ttf → KaTeX_AMS-Regular-JKX5W2C4-DRggAlZN.ttf} +0 -0
- /package/web/assets/{KaTeX_AMS-Regular-BQhdFMY1.woff2 → KaTeX_AMS-Regular-U6PRYMIZ-BQhdFMY1.woff2} +0 -0
- /package/web/assets/{KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 → KaTeX_Caligraphic-Bold-5QL5CMTE-Dq_IR9rO.woff2} +0 -0
- /package/web/assets/{KaTeX_Caligraphic-Bold-BEiXGLvX.woff → KaTeX_Caligraphic-Bold-WZ3QSGD3-BEiXGLvX.woff} +0 -0
- /package/web/assets/{KaTeX_Caligraphic-Bold-ATXxdsX0.ttf → KaTeX_Caligraphic-Bold-ZTS3R3HK-ATXxdsX0.ttf} +0 -0
- /package/web/assets/{KaTeX_Caligraphic-Regular-CTRA-rTL.woff → KaTeX_Caligraphic-Regular-3LKEU76G-CTRA-rTL.woff} +0 -0
- /package/web/assets/{KaTeX_Caligraphic-Regular-wX97UBjC.ttf → KaTeX_Caligraphic-Regular-A7XRTZ5Q-wX97UBjC.ttf} +0 -0
- /package/web/assets/{KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 → KaTeX_Caligraphic-Regular-KX5MEWCF-Di6jR-x-.woff2} +0 -0
- /package/web/assets/{KaTeX_Fraktur-Bold-CL6g_b3V.woff2 → KaTeX_Fraktur-Bold-2QVFK6NQ-CL6g_b3V.woff2} +0 -0
- /package/web/assets/{KaTeX_Fraktur-Bold-BsDP51OF.woff → KaTeX_Fraktur-Bold-T4SWXBMT-BsDP51OF.woff} +0 -0
- /package/web/assets/{KaTeX_Fraktur-Bold-BdnERNNW.ttf → KaTeX_Fraktur-Bold-WGHVTYOR-BdnERNNW.ttf} +0 -0
- /package/web/assets/{KaTeX_Fraktur-Regular-CTYiF6lA.woff2 → KaTeX_Fraktur-Regular-2PEIFJSJ-CTYiF6lA.woff2} +0 -0
- /package/web/assets/{KaTeX_Fraktur-Regular-CB_wures.ttf → KaTeX_Fraktur-Regular-5U4OPH2X-CB_wures.ttf} +0 -0
- /package/web/assets/{KaTeX_Fraktur-Regular-Dxdc4cR9.woff → KaTeX_Fraktur-Regular-PQMHCIK6-Dxdc4cR9.woff} +0 -0
- /package/web/assets/{KaTeX_Main-Bold-Jm3AIy58.woff → KaTeX_Main-Bold-2GA4IZIN-Jm3AIy58.woff} +0 -0
- /package/web/assets/{KaTeX_Main-Bold-waoOVXN0.ttf → KaTeX_Main-Bold-W5FBVCZM-waoOVXN0.ttf} +0 -0
- /package/web/assets/{KaTeX_Main-Bold-Cx986IdX.woff2 → KaTeX_Main-Bold-YP5VVQRP-Cx986IdX.woff2} +0 -0
- /package/web/assets/{KaTeX_Main-BoldItalic-SpSLRI95.woff → KaTeX_Main-BoldItalic-4P4C7HJH-SpSLRI95.woff} +0 -0
- /package/web/assets/{KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 → KaTeX_Main-BoldItalic-N4V3DX7S-DxDJ3AOS.woff2} +0 -0
- /package/web/assets/{KaTeX_Main-BoldItalic-DzxPMmG6.ttf → KaTeX_Main-BoldItalic-ODMLBJJQ-DzxPMmG6.ttf} +0 -0
- /package/web/assets/{KaTeX_Main-Italic-3WenGoN9.ttf → KaTeX_Main-Italic-I43T2HSR-3WenGoN9.ttf} +0 -0
- /package/web/assets/{KaTeX_Main-Italic-NWA7e6Wa.woff2 → KaTeX_Main-Italic-RELBIK7M-NWA7e6Wa.woff2} +0 -0
- /package/web/assets/{KaTeX_Main-Italic-BMLOBm91.woff → KaTeX_Main-Italic-SASNQFN2-BMLOBm91.woff} +0 -0
- /package/web/assets/{KaTeX_Main-Regular-B22Nviop.woff2 → KaTeX_Main-Regular-ARRPAO67-B22Nviop.woff2} +0 -0
- /package/web/assets/{KaTeX_Main-Regular-Dr94JaBh.woff → KaTeX_Main-Regular-P5I74A2A-Dr94JaBh.woff} +0 -0
- /package/web/assets/{KaTeX_Main-Regular-ypZvNtVU.ttf → KaTeX_Main-Regular-W74P5G27-ypZvNtVU.ttf} +0 -0
- /package/web/assets/{KaTeX_Math-BoldItalic-iY-2wyZ7.woff → KaTeX_Math-BoldItalic-6EBV3DK5-iY-2wyZ7.woff} +0 -0
- /package/web/assets/{KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 → KaTeX_Math-BoldItalic-K4WTGH3J-CZnvNsCZ.woff2} +0 -0
- /package/web/assets/{KaTeX_Math-BoldItalic-B3XSjfu4.ttf → KaTeX_Math-BoldItalic-VB447A4D-B3XSjfu4.ttf} +0 -0
- /package/web/assets/{KaTeX_Math-Italic-t53AETM-.woff2 → KaTeX_Math-Italic-6KGCHLFN-t53AETM-.woff2} +0 -0
- /package/web/assets/{KaTeX_Math-Italic-DA0__PXp.woff → KaTeX_Math-Italic-KKK3USB2-DA0__PXp.woff} +0 -0
- /package/web/assets/{KaTeX_Math-Italic-flOr_0UB.ttf → KaTeX_Math-Italic-SON4MRCA-flOr_0UB.ttf} +0 -0
- /package/web/assets/{KaTeX_SansSerif-Bold-D1sUS0GD.woff2 → KaTeX_SansSerif-Bold-RRNVJFFW-D1sUS0GD.woff2} +0 -0
- /package/web/assets/{KaTeX_SansSerif-Bold-CFMepnvq.ttf → KaTeX_SansSerif-Bold-STQ6RXC7-CFMepnvq.ttf} +0 -0
- /package/web/assets/{KaTeX_SansSerif-Bold-DbIhKOiC.woff → KaTeX_SansSerif-Bold-X5M5EMOD-DbIhKOiC.woff} +0 -0
- /package/web/assets/{KaTeX_SansSerif-Italic-C3H0VqGB.woff2 → KaTeX_SansSerif-Italic-HMPFTM52-C3H0VqGB.woff2} +0 -0
- /package/web/assets/{KaTeX_SansSerif-Italic-DN2j7dab.woff → KaTeX_SansSerif-Italic-PSN4QKYX-DN2j7dab.woff} +0 -0
- /package/web/assets/{KaTeX_SansSerif-Italic-YYjJ1zSn.ttf → KaTeX_SansSerif-Italic-WTBAZBGY-YYjJ1zSn.ttf} +0 -0
- /package/web/assets/{KaTeX_SansSerif-Regular-BNo7hRIc.ttf → KaTeX_SansSerif-Regular-2TL3USAE-BNo7hRIc.ttf} +0 -0
- /package/web/assets/{KaTeX_SansSerif-Regular-CS6fqUqJ.woff → KaTeX_SansSerif-Regular-OQCII6EP-CS6fqUqJ.woff} +0 -0
- /package/web/assets/{KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 → KaTeX_SansSerif-Regular-XIQ62X4E-DDBCnlJ7.woff2} +0 -0
- /package/web/assets/{KaTeX_Script-Regular-C5JkGWo-.ttf → KaTeX_Script-Regular-72OLXYNA-C5JkGWo-.ttf} +0 -0
- /package/web/assets/{KaTeX_Script-Regular-D5yQViql.woff → KaTeX_Script-Regular-A5IFOEBS-D5yQViql.woff} +0 -0
- /package/web/assets/{KaTeX_Script-Regular-D3wIWfF6.woff2 → KaTeX_Script-Regular-APUWIHLP-D3wIWfF6.woff2} +0 -0
- /package/web/assets/{KaTeX_Size1-Regular-C195tn64.woff → KaTeX_Size1-Regular-4HRHTS65-C195tn64.woff} +0 -0
- /package/web/assets/{KaTeX_Size1-Regular-mCD8mA8B.woff2 → KaTeX_Size1-Regular-5LRUTBFT-mCD8mA8B.woff2} +0 -0
- /package/web/assets/{KaTeX_Size1-Regular-Dbsnue_I.ttf → KaTeX_Size1-Regular-7K6AASVL-Dbsnue_I.ttf} +0 -0
- /package/web/assets/{KaTeX_Size2-Regular-B7gKUWhC.ttf → KaTeX_Size2-Regular-222HN3GT-B7gKUWhC.ttf} +0 -0
- /package/web/assets/{KaTeX_Size2-Regular-oD1tc_U0.woff → KaTeX_Size2-Regular-K5ZHAIS6-oD1tc_U0.woff} +0 -0
- /package/web/assets/{KaTeX_Size2-Regular-Dy4dx90m.woff2 → KaTeX_Size2-Regular-LELKET5D-Dy4dx90m.woff2} +0 -0
- /package/web/assets/{KaTeX_Size3-Regular-CTq5MqoE.woff → KaTeX_Size3-Regular-TLFPAHDE-CTq5MqoE.woff} +0 -0
- /package/web/assets/{KaTeX_Size3-Regular-DgpXs0kz.ttf → KaTeX_Size3-Regular-UFCO6WCA-DgpXs0kz.ttf} +0 -0
- /package/web/assets/{KaTeX_Size4-Regular-DWFBv043.ttf → KaTeX_Size4-Regular-7PGNVPQK-DWFBv043.ttf} +0 -0
- /package/web/assets/{KaTeX_Size4-Regular-Dl5lxZxV.woff2 → KaTeX_Size4-Regular-CDMV7U5C-Dl5lxZxV.woff2} +0 -0
- /package/web/assets/{KaTeX_Size4-Regular-BF-4gkZK.woff → KaTeX_Size4-Regular-PKMWZHNC-BF-4gkZK.woff} +0 -0
- /package/web/assets/{KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf → KaTeX_Typewriter-Regular-3F5K6SQ6-D3Ib7_Hf.ttf} +0 -0
- /package/web/assets/{KaTeX_Typewriter-Regular-C0xS9mPB.woff → KaTeX_Typewriter-Regular-MJMFSK64-C0xS9mPB.woff} +0 -0
- /package/web/assets/{KaTeX_Typewriter-Regular-CO6r4hn1.woff2 → KaTeX_Typewriter-Regular-VBYJ4NRC-CO6r4hn1.woff2} +0 -0
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import{j as e,r as C}from"./react-Dh7j6h1K.js";import{g as Y,u as Z}from"./tanstack-CirxkzEx.js";import{C as Q,f as ee}from"./app-options-CIiczgaQ.js";import{A as te}from"./app-view-header-CNImosi9.js";import{C as ae,B as z}from"./check-DjJ4znpk.js";import{R as se,C as re,S as ne,a as ie,b as oe,c as le,d as ce,e as de,f as me,g as ue,h as he,i as fe,j as xe,k as pe,l as ge,m as je,n as ve,o as be}from"./index-CHgBEfsO.js";import{C as ye}from"./copy-context-Bj8Sfpo7.js";import{F as Se}from"./folder-list-BPufqaem.js";import{a as N}from"./utils-CvINCDjn.js";import{C as G}from"./chevron-down-CiyxliRS.js";import{C as we}from"./chevron-up-Xv7ii00h.js";import{I as Ne}from"./input-fNFbKa15.js";import{X as _}from"./x-GGS-h4Nm.js";import{S as Ce}from"./search-Cx23EFPc.js";import{c as $e}from"./index-CKJsEQtp.js";import"./markdown-BvBsne3X.js";import"./file-text-C3hyr-Ql.js";import"./index-4-yQR2Lz.js";import"./index-B6ap1Jz7.js";import"./popover-DvKy7gF6.js";import"./ellipsis-DIDqkP8k.js";import"./folder-image-Cy-8Vgmd.js";import"./index-uo3lipQl.js";import"./copy-DKl_cZLH.js";import"./view-context-DyuiMZAo.js";import"./index-DbD-bwdm.js";const Fe=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],ke=$e("funnel",Fe),O="f_",L="max_",P="min_",M="q",B="sort";function ze(t,s,a){const o=new URL(t),n=new Set(s),r=new Set(a),h={},p={};for(const[m,j]of o.searchParams){if(m.startsWith(O)&&j){const f=m.slice(O.length);n.has(f)&&(h[f]=j);continue}const v=m.startsWith(P)?P:m.startsWith(L)?L:void 0;if(!v||!j)continue;const c=m.slice(v.length),l=Number(j);!r.has(c)||!Number.isFinite(l)||(p[c]={...p[c],[v===P?"min":"max"]:l})}return{filters:h,query:o.searchParams.get(M)??"",ranges:p,sort:J(t)}}function J(t){return new URL(t).searchParams.get(B)==="alpha"?"alpha":"recent"}function Pe(t,s){const a=new URL(t);a.searchParams.delete(M);for(const n of[...a.searchParams.keys()])(n.startsWith(O)||n.startsWith(P)||n.startsWith(L))&&a.searchParams.delete(n);const o=s.query.trim();o&&a.searchParams.set(M,o),s.sort==="alpha"?a.searchParams.set(B,s.sort):a.searchParams.delete(B);for(const[n,r]of Object.entries(s.filters))r&&a.searchParams.set(`${O}${n}`,r);for(const[n,r]of Object.entries(s.ranges))Number.isFinite(r.min)&&a.searchParams.set(`${P}${n}`,String(r.min)),Number.isFinite(r.max)&&a.searchParams.set(`${L}${n}`,String(r.max));return a.toString()}function H({...t}){return e.jsx(se,{"data-slot":"collapsible",...t})}function X({...t}){return e.jsx(re,{"data-slot":"collapsible-content",...t})}function R(t,s){let a=t;for(const o of s.split(".")){if(!a||typeof a!="object"||Array.isArray(a))return;a=a[o]}return a}function A(t){return t==null?"":Array.isArray(t)?t.map(A).join(", "):typeof t=="object"?JSON.stringify(t):String(t)}function Re(t,s){return[...new Set(t.records.map(a=>A(R(a.fields,s))).filter(Boolean))].sort()}function Ae(t,s,a="",o={}){const n=a.trim().toLocaleLowerCase();return t.records.filter(r=>(!n||`${r.title} ${Object.values(r.fields).map(A).join(" ")}`.toLocaleLowerCase().includes(n))&&t.ui.filters.every(h=>!s[h]||A(R(r.fields,h))===s[h])&&Object.entries(o).every(([h,p])=>{const m=R(r.fields,h);return typeof m=="number"&&(p.min===void 0||m>=p.min)&&(p.max===void 0||m<=p.max)}))}function Ie({collection:t,record:s}){const[a,o]=C.useState(),n=s.iconAssetKey?t.assets?.[s.iconAssetKey]:void 0,r=n?n.url??(n.data?`data:${n.mediaType};base64,${n.data}`:void 0):void 0;return!r||a===r?e.jsx(Q,{name:t.icon}):e.jsx("img",{alt:"","aria-hidden":"true",onError:()=>o(r),src:r,style:{width:18,height:18,borderRadius:4,objectFit:"contain",flexShrink:0}})}const K=t=>t.replace(/[\\/][^\\/]+$/,""),qe=t=>/(?:^|[\\/])(?:AGENTS|README|SKILL)\.md$/i.test(t);function Oe({collection:t,documentHref:s,folderHref:a,folder:o,records:n}){return e.jsx(Se,{className:"landing-collection-records",items:n,renderActions:r=>e.jsx(ye,{className:"landing-list-copy-context",context:()=>K(r.path),label:`Copy folder path for ${r.title}`}),empty:e.jsx("p",{className:"landing-empty",children:t.count?"No matching records.":"No records match this collection’s document patterns."}),getClassName:()=>"has-copy-context",getKey:r=>r.id,getHref:r=>qe(r.path)?a(K(r.path)):`${s(r.path.slice(o.length+1))}?collection=${encodeURIComponent(t.id)}`,renderItem:r=>e.jsxs(e.Fragment,{children:[e.jsx(Ie,{collection:t,record:r}),e.jsxs("span",{children:[e.jsx("strong",{children:r.title}),e.jsx("small",{children:t.ui.secondaryField?A(R(r.fields,t.ui.secondaryField)):r.relativePath}),r.validationErrors.length?e.jsxs("small",{className:"text-destructive",title:r.validationErrors.map(h=>`${h.path}: ${h.message}`).join(`
|
|
2
|
-
`),children:[r.validationErrors.length," metadata issues"]}):null]})]})})}function T({...t}){return e.jsx(ne,{"data-slot":"select",...t})}function U({...t}){return e.jsx(le,{"data-slot":"select-value",...t})}function V({className:t,size:s="default",children:a,...o}){return e.jsxs(ie,{"data-slot":"select-trigger","data-size":s,className:N(`border-input data-[placeholder]:text-muted-foreground
|
|
3
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
4
|
-
focus-visible:border-ring focus-visible:ring-ring/50
|
|
5
|
-
aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40
|
|
6
|
-
aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50
|
|
7
|
-
flex w-fit items-center justify-between gap-2 rounded-md border
|
|
8
|
-
bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs
|
|
9
|
-
transition-[color,box-shadow] outline-none focus-visible:ring-[3px]
|
|
10
|
-
disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9
|
|
11
|
-
data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1
|
|
12
|
-
*:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center
|
|
13
|
-
*:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none
|
|
14
|
-
[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,t),...o,children:[a,e.jsx(oe,{asChild:!0,children:e.jsx(G,{className:"size-4 opacity-50"})})]})}function W({className:t,children:s,position:a="item-aligned",align:o="center",...n}){return e.jsx(ce,{children:e.jsxs(de,{"data-slot":"select-content",className:N(`bg-popover text-popover-foreground data-[state=open]:animate-in
|
|
15
|
-
data-[state=closed]:animate-out data-[state=closed]:fade-out-0
|
|
16
|
-
data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
|
|
17
|
-
data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2
|
|
18
|
-
data-[side=left]:slide-in-from-right-2
|
|
19
|
-
data-[side=right]:slide-in-from-left-2
|
|
20
|
-
data-[side=top]:slide-in-from-bottom-2 relative z-50
|
|
21
|
-
max-h-(--radix-select-content-available-height) min-w-[8rem]
|
|
22
|
-
origin-(--radix-select-content-transform-origin) overflow-x-hidden
|
|
23
|
-
overflow-y-auto rounded-md border shadow-md`,a==="popper"&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1
|
|
24
|
-
data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,t),position:a,align:o,...n,children:[e.jsx(Le,{}),e.jsx(me,{className:N("p-1",a==="popper"&&`h-[var(--radix-select-trigger-height)] w-full
|
|
25
|
-
min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:s}),e.jsx(_e,{})]})})}function q({className:t,children:s,...a}){return e.jsxs(ue,{"data-slot":"select-item",className:N(`focus:bg-accent focus:text-accent-foreground
|
|
26
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full
|
|
27
|
-
cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm
|
|
28
|
-
outline-hidden select-none data-[disabled]:pointer-events-none
|
|
29
|
-
data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
30
|
-
[&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex
|
|
31
|
-
*:[span]:last:items-center *:[span]:last:gap-2`,t),...a,children:[e.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:e.jsx(he,{children:e.jsx(ae,{className:"size-4"})})}),e.jsx(fe,{children:s})]})}function Le({className:t,...s}){return e.jsx(xe,{"data-slot":"select-scroll-up-button",className:N("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(we,{className:"size-4"})})}function _e({className:t,...s}){return e.jsx(pe,{"data-slot":"select-scroll-down-button",className:N("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(G,{className:"size-4"})})}function Me({className:t,defaultValue:s,value:a,min:o=0,max:n=100,...r}){const h=C.useMemo(()=>Array.isArray(a)?a:Array.isArray(s)?s:[o,n],[a,s,o,n]);return e.jsxs(ge,{"data-slot":"slider",defaultValue:s,value:a,min:o,max:n,className:N(`relative flex w-full touch-none items-center select-none
|
|
32
|
-
data-[disabled]:opacity-50 data-[orientation=vertical]:h-full
|
|
33
|
-
data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto
|
|
34
|
-
data-[orientation=vertical]:flex-col`,t),...r,children:[e.jsx(je,{"data-slot":"slider-track",className:N(`bg-muted relative grow overflow-hidden rounded-full
|
|
35
|
-
data-[orientation=horizontal]:h-1.5
|
|
36
|
-
data-[orientation=horizontal]:w-full
|
|
37
|
-
data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5`),children:e.jsx(ve,{"data-slot":"slider-range",className:N(`bg-primary absolute data-[orientation=horizontal]:h-full
|
|
38
|
-
data-[orientation=vertical]:w-full`)})}),Array.from({length:h.length},(p,m)=>e.jsx(be,{"data-slot":"slider-thumb",className:`border-primary ring-ring/50 block size-4 shrink-0
|
|
39
|
-
rounded-full border bg-white shadow-sm transition-[color,box-shadow]
|
|
40
|
-
hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden
|
|
41
|
-
disabled:pointer-events-none disabled:opacity-50`},m))]})}function Be(t,s){const a=t.records.map(o=>R(o.fields,s)).filter(o=>typeof o=="number");return{max:Math.max(...a),min:Math.min(...a)}}const D=new Intl.NumberFormat;function Ee({collection:t,filters:s,onClear:a,onFilters:o,onRanges:n,onRangesCommit:r,onSort:h,ranges:p,refreshing:m=!1,sort:j}){const v=Object.values(s).some(Boolean)||Object.values(p).some(c=>c.min!==void 0||c.max!==void 0);return e.jsxs(X,{id:"collection-filters",className:"rounded-xl bg-white px-4 shadow-sm","aria-label":"Collection filters",role:"region",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("p",{className:"text-muted-foreground text-xs",role:"status",children:[m?"Refreshing metadata…":`Indexed ${new Date(t.indexedAt).toLocaleString()}`,t.state==="error"?" · Index has errors":""]}),v?e.jsx(z,{variant:"ghost",size:"sm",onClick:a,children:"Clear"}):null]}),e.jsxs("div",{className:"flex flex-wrap items-end gap-3 py-3",children:[t.ui.sort?null:e.jsxs("label",{className:"grid gap-1 text-sm",children:["Order",e.jsxs(T,{value:j,onValueChange:c=>h(c),children:[e.jsx(V,{"aria-label":"Order records",children:e.jsx(U,{})}),e.jsxs(W,{children:[e.jsx(q,{value:"recent",children:"Recently updated"}),e.jsx(q,{value:"alpha",children:"Alphabetical"})]})]})]}),t.ui.filters.map(c=>{const l=Re(t,c);return e.jsxs("label",{className:"grid gap-1 text-sm",children:[c,e.jsxs(T,{value:s[c]?`value:${s[c]}`:"all",onValueChange:f=>o(y=>({...y,[c]:f==="all"?"":f.slice(6)})),children:[e.jsx(V,{"aria-label":`Filter ${c}`,children:e.jsx(U,{})}),e.jsxs(W,{children:[e.jsx(q,{value:"all",children:"All"}),l.map(f=>e.jsx(q,{value:`value:${f}`,children:f},f))]})]})]},c)}),t.ui.numericFilters.map(c=>{const l=Be(t,c),f=p[c]??{},y=Math.max(l.min,f.min??l.min),S=Math.min(l.max,f.max??l.max),x=(u,g)=>b=>{const F={max:g===l.max?void 0:g,min:u===l.min?void 0:u},$={...b,[c]:F};return F.min===void 0&&F.max===void 0&&delete $[c],$};return e.jsxs("fieldset",{className:"grid min-w-56 gap-1 text-sm",children:[e.jsx("legend",{children:c}),e.jsx(Me,{"aria-label":`Filter ${c}`,max:l.max,min:l.min,step:Number.isInteger(l.min)&&Number.isInteger(l.max)?1:void 0,value:[Math.min(y,S),Math.max(y,S)],onValueChange:u=>{const[g,b]=u;g!==void 0&&b!==void 0&&n(x(g,b))},onValueCommit:u=>{const[g,b]=u;g!==void 0&&b!==void 0&&r(x(g,b))}}),e.jsxs("span",{className:"text-muted-foreground flex justify-between text-xs",children:[e.jsx("span",{children:D.format(Math.min(y,S))}),e.jsx("span",{children:D.format(Math.max(y,S))})]})]},c)})]})]})}function He({onQuery:t,query:s}){return e.jsx(X,{id:"collection-search",className:"rounded-xl border bg-white px-4 py-3 shadow-sm","aria-label":"Search collection",role:"region",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ne,{className:"max-w-sm","aria-label":"Search collection",placeholder:"Search records…",value:s,onChange:a=>t(a.target.value)}),s.trim()?e.jsx(z,{variant:"ghost",size:"sm",onClick:()=>t(""),children:"Clear"}):null]})})}function Ke(t){return s=>{typeof window>"u"||window.history.replaceState(null,"",Pe(window.location.href,{...s,sort:t}))}}function Te({collection:t,documentHref:s,folderHref:a,folder:o,href:n,onSort:r,refreshing:h=!1,sort:p}){const[m,j]=C.useState(!1),[v,c]=C.useState(!1),[l,f]=C.useState(()=>ze(n,t.ui.filters,t.ui.numericFilters)),y=Ke(p),S=(i,d=!0)=>{f(w=>{const I=i(w);return d&&y(I),I})},x=i=>S(d=>({...d,query:i})),u=i=>S(d=>({...d,filters:i(d.filters)})),g=(i,d=!0)=>S(w=>({...w,ranges:i(w.ranges)}),d),b=i=>g(i),F=i=>g(i,!1),$=Ae(t,l.filters,l.query,l.ranges),k=t.ui.filters.filter(i=>l.filters[i]).map(i=>({key:`filter:${i}`,label:`${i}: ${l.filters[i]}`,remove:()=>u(d=>{const w={...d};return delete w[i],w})}));for(const i of t.ui.numericFilters){const d=l.ranges[i];if(!d||d.min===void 0&&d.max===void 0)continue;const w=[d.min===void 0?"":`≥ ${d.min}`,d.max===void 0?"":`≤ ${d.max}`].filter(Boolean).join(" · ");k.push({key:`range:${i}`,label:`${i}: ${w}`,remove:()=>b(I=>{const E={...I};return delete E[i],E})})}return l.query.trim()&&k.push({key:"query",label:`Search: “${l.query.trim()}”`,remove:()=>x("")}),e.jsxs("main",{className:"mx-auto grid w-full max-w-3xl gap-4 px-4 py-5","aria-label":t.title,children:[e.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("h1",{className:`m-0 flex items-center gap-2 text-2xl font-semibold
|
|
42
|
-
text-[#233025]`,children:[e.jsx(Q,{name:t.icon}),t.title]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-muted-foreground text-sm",role:"status",children:k.length?`${$.length} ${$.length===1?"result":"results"}`:t.count}),e.jsx(z,{variant:"ghost",size:"icon","aria-controls":"collection-search","aria-expanded":v,"aria-label":v?"Hide search":"Show search",onClick:()=>c(i=>!i),children:v?e.jsx(_,{"aria-hidden":"true"}):e.jsx(Ce,{"aria-hidden":"true"})}),e.jsx(z,{variant:"ghost",size:"icon","aria-controls":"collection-filters","aria-expanded":m,"aria-label":m?"Hide filters":"Show filters",onClick:()=>j(i=>!i),children:m?e.jsx(_,{"aria-hidden":"true"}):e.jsx(ke,{"aria-hidden":"true"})})]})]}),k.length?e.jsx("div",{className:"flex flex-wrap gap-2",role:"group","aria-label":"Active filters",children:k.map(({key:i,label:d,remove:w})=>e.jsxs(z,{type:"button",variant:"secondary",size:"sm",className:`border-border h-auto max-w-full rounded-full border
|
|
43
|
-
py-1 text-xs`,"aria-label":`Remove ${d}`,title:d,onClick:w,children:[e.jsx("span",{className:"min-w-0 truncate",children:d}),e.jsx(_,{"aria-hidden":"true",className:"size-3"})]},i))}):null,e.jsx(H,{open:v,onOpenChange:c,children:e.jsx(He,{onQuery:x,query:l.query})}),e.jsx(H,{open:m,onOpenChange:j,children:e.jsx(Ee,{collection:t,filters:l.filters,onFilters:u,onRanges:F,onRangesCommit:b,onClear:()=>S(i=>({...i,filters:{},ranges:{}})),ranges:l.ranges,onSort:r,refreshing:h,sort:p})}),t.diagnostics.length?e.jsx("ul",{role:"alert",className:"text-destructive m-0 text-sm",children:t.diagnostics.map((i,d)=>e.jsx("li",{children:i.message},d))}):null,e.jsx(Oe,{collection:t,documentHref:s,folderHref:a,folder:o,records:$})]})}function pt({collectionHref:t,documentHref:s,folderHref:a,homeHref:o,href:n,openFolder:r,parseRoute:h,request:p,subscribeApiEvent:m}){const{folder:j,collectionId:v}=h(n),c=Y(),l=J(n),[f,y]=C.useState(l);C.useEffect(()=>{y(l)},[l]);const S=u=>{y(u)};C.useEffect(()=>{const u=()=>{c.invalidateQueries({queryKey:["collection",j]})},g=m("kennel:metadata-changed",u),b=m("kennel:workspace-changed",u);return()=>{g(),b()}},[c,j,m]);const x=Z({queryKey:["collection",j,v,f],enabled:!!(j&&v),placeholderData:(u,g)=>g&&g.queryKey[1]===j&&g.queryKey[2]===v?u:void 0,queryFn:({signal:u})=>p(n,"collections",{id:v,signal:u,sort:f})});return x.error?e.jsxs("p",{role:"alert",children:["Could not load collection: ",x.error.message]}):x.data?e.jsxs(e.Fragment,{children:[e.jsx(te,{actions:ee({folderPath:x.data.folder,onOpenFolder:r?()=>r(x.data.folder):void 0}),className:"collection-page-header",collectionHref:u=>t(x.data.folder,u),folder:x.data.folder,folderHref:a,homeHref:o(x.data.folder)}),e.jsx(Te,{href:n,folder:x.data.folder,collection:x.data.collection,documentHref:u=>s(x.data.folder,u),folderHref:a,onSort:S,refreshing:x.isFetching,sort:f},`${j}:${v}`)]}):e.jsx("p",{role:"status",children:"Loading collection…"})}export{pt as CollectionPage};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import{r as s,j as m,i as Be,c as gt,B as ht}from"./react-Dh7j6h1K.js";import{R as Et,h as yt}from"./index-4-yQR2Lz.js";import{a as M}from"./utils-CvINCDjn.js";import{X as bt}from"./x-GGS-h4Nm.js";import{D as xt,c as Ct,d as wt,a as Dt,b as Rt,e as St,f as Nt}from"./index-4JQ747xt.js";import{S as Pt}from"./search-Cx23EFPc.js";var Ae=1,It=.9,Ot=.8,At=.17,me=.1,pe=.999,_t=.9999,kt=.99,Tt=/[\\\/_+.#"@\[\(\{&]/,Mt=/[\\\/_+.#"@\[\(\{&]/g,Ft=/[\s-]/,Ke=/[\s-]/g;function ye(e,t,n,o,r,a,c){if(a===t.length)return r===e.length?Ae:kt;var i=`${r},${a}`;if(c[i]!==void 0)return c[i];for(var f=o.charAt(a),l=n.indexOf(f,r),d=0,p,y,h,R;l>=0;)p=ye(e,t,n,o,l+1,a+1,c),p>d&&(l===r?p*=Ae:Tt.test(e.charAt(l-1))?(p*=Ot,h=e.slice(r,l-1).match(Mt),h&&r>0&&(p*=Math.pow(pe,h.length))):Ft.test(e.charAt(l-1))?(p*=It,R=e.slice(r,l-1).match(Ke),R&&r>0&&(p*=Math.pow(pe,R.length))):(p*=At,r>0&&(p*=Math.pow(pe,l-r))),e.charAt(l)!==t.charAt(a)&&(p*=_t)),(p<me&&n.charAt(l-1)===o.charAt(a+1)||o.charAt(a+1)===o.charAt(a)&&n.charAt(l-1)!==o.charAt(a))&&(y=ye(e,t,n,o,l+1,a+2,c),y*me>p&&(p=y*me)),p>d&&(d=p),l=n.indexOf(f,l+1);return c[i]=d,d}function _e(e){return e.toLowerCase().replace(Ke," ")}function jt(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,ye(e,t,_e(e),_e(t),0,0,{})}function W(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function ke(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function K(...e){return t=>{let n=!1;const o=e.map(r=>{const a=ke(r,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let r=0;r<o.length;r++){const a=o[r];typeof a=="function"?a():ke(e[r],null)}}}}function H(...e){return s.useCallback(K(...e),e)}function Lt(e,t){const n=s.createContext(t),o=a=>{const{children:c,...i}=a,f=s.useMemo(()=>i,Object.values(i));return m.jsx(n.Provider,{value:f,children:c})};o.displayName=e+"Provider";function r(a){const c=s.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,r]}function $t(e,t=[]){let n=[];function o(a,c){const i=s.createContext(c),f=n.length;n=[...n,c];const l=p=>{const{scope:y,children:h,...R}=p,x=y?.[e]?.[f]||i,S=s.useMemo(()=>R,Object.values(R));return m.jsx(x.Provider,{value:S,children:h})};l.displayName=a+"Provider";function d(p,y){const h=y?.[e]?.[f]||i,R=s.useContext(h);if(R)return R;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[l,d]}const r=()=>{const a=n.map(c=>s.createContext(c));return function(i){const f=i?.[e]||a;return s.useMemo(()=>({[`__scope${e}`]:{...i,[e]:f}}),[i,f])}};return r.scopeName=e,[o,Wt(r,...t)]}function Wt(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const c=o.reduce((i,{useScope:f,scopeName:l})=>{const p=f(a)[`__scope${l}`];return{...i,...p}},{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var ee=globalThis?.document?s.useLayoutEffect:()=>{},Ut=Be[" useId ".trim().toString()]||(()=>{}),Bt=0;function j(e){const[t,n]=s.useState(Ut());return ee(()=>{n(o=>o??String(Bt++))},[e]),t?`radix-${t}`:""}var Kt=Be[" useInsertionEffect ".trim().toString()]||ee;function Vt({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,a,c]=zt({defaultProp:t,onChange:n}),i=e!==void 0,f=i?e:r;{const d=s.useRef(e!==void 0);s.useEffect(()=>{const p=d.current;p!==i&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=i},[i,o])}const l=s.useCallback(d=>{if(i){const p=Ht(d)?d(e):d;p!==e&&c.current?.(p)}else a(d)},[i,e,a,c]);return[f,l]}function zt({defaultProp:e,onChange:t}){const[n,o]=s.useState(e),r=s.useRef(n),a=s.useRef(t);return Kt(()=>{a.current=t},[t]),s.useEffect(()=>{r.current!==n&&(a.current?.(n),r.current=n)},[n,r]),[n,o,a]}function Ht(e){return typeof e=="function"}function Ve(e){const t=Gt(e),n=s.forwardRef((o,r)=>{const{children:a,...c}=o,i=s.Children.toArray(a),f=i.find(Xt);if(f){const l=f.props.children,d=i.map(p=>p===f?s.Children.count(l)>1?s.Children.only(null):s.isValidElement(l)?l.props.children:null:p);return m.jsx(t,{...c,ref:r,children:s.isValidElement(l)?s.cloneElement(l,void 0,d):null})}return m.jsx(t,{...c,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}function Gt(e){const t=s.forwardRef((n,o)=>{const{children:r,...a}=n;if(s.isValidElement(r)){const c=Zt(r),i=Yt(a,r.props);return r.type!==s.Fragment&&(i.ref=o?K(o,c):c),s.cloneElement(r,i)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qt=Symbol("radix.slottable");function Xt(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qt}function Yt(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...i)=>{const f=a(...i);return r(...i),f}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function Zt(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Jt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],I=Jt.reduce((e,t)=>{const n=Ve(`Primitive.${t}`),o=s.forwardRef((r,a)=>{const{asChild:c,...i}=r,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(f,{...i,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Qt(e,t){e&>.flushSync(()=>e.dispatchEvent(t))}function te(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...n)=>t.current?.(...n),[])}function en(e,t=globalThis?.document){const n=te(e);s.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var tn="DismissableLayer",be="dismissableLayer.update",nn="dismissableLayer.pointerDownOutside",rn="dismissableLayer.focusOutside",Te,ze=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),He=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:c,onDismiss:i,...f}=e,l=s.useContext(ze),[d,p]=s.useState(null),y=d?.ownerDocument??globalThis?.document,[,h]=s.useState({}),R=H(t,E=>p(E)),x=Array.from(l.layers),[S]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),N=x.indexOf(S),k=d?x.indexOf(d):-1,A=l.layersWithOutsidePointerEventsDisabled.size>0,P=k>=N,T=an(E=>{const L=E.target,Z=[...l.branches].some(B=>B.contains(L));!P||Z||(r?.(E),c?.(E),E.defaultPrevented||i?.())},y),w=ln(E=>{const L=E.target;[...l.branches].some(B=>B.contains(L))||(a?.(E),c?.(E),E.defaultPrevented||i?.())},y);return en(E=>{k===l.layers.size-1&&(o?.(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},y),s.useEffect(()=>{if(d)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Te=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(d)),l.layers.add(d),Me(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=Te)}},[d,y,n,l]),s.useEffect(()=>()=>{d&&(l.layers.delete(d),l.layersWithOutsidePointerEventsDisabled.delete(d),Me())},[d,l]),s.useEffect(()=>{const E=()=>h({});return document.addEventListener(be,E),()=>document.removeEventListener(be,E)},[]),m.jsx(I.div,{...f,ref:R,style:{pointerEvents:A?P?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,w.onFocusCapture),onBlurCapture:W(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,T.onPointerDownCapture)})});He.displayName=tn;var on="DismissableLayerBranch",sn=s.forwardRef((e,t)=>{const n=s.useContext(ze),o=s.useRef(null),r=H(t,o);return s.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(I.div,{...e,ref:r})});sn.displayName=on;function an(e,t=globalThis?.document){const n=te(e),o=s.useRef(!1),r=s.useRef(()=>{});return s.useEffect(()=>{const a=i=>{if(i.target&&!o.current){let f=function(){Ge(nn,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=f,t.addEventListener("click",r.current,{once:!0})):f()}else t.removeEventListener("click",r.current);o.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function ln(e,t=globalThis?.document){const n=te(e),o=s.useRef(!1);return s.useEffect(()=>{const r=a=>{a.target&&!o.current&&Ge(rn,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Me(){const e=new CustomEvent(be);document.dispatchEvent(e)}function Ge(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?Qt(r,a):r.dispatchEvent(a)}var ve="focusScope.autoFocusOnMount",ge="focusScope.autoFocusOnUnmount",Fe={bubbles:!1,cancelable:!0},cn="FocusScope",qe=s.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...c}=e,[i,f]=s.useState(null),l=te(r),d=te(a),p=s.useRef(null),y=H(t,x=>f(x)),h=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(o){let x=function(A){if(h.paused||!i)return;const P=A.target;i.contains(P)?p.current=P:$(p.current,{select:!0})},S=function(A){if(h.paused||!i)return;const P=A.relatedTarget;P!==null&&(i.contains(P)||$(p.current,{select:!0}))},N=function(A){if(document.activeElement===document.body)for(const T of A)T.removedNodes.length>0&&$(i)};document.addEventListener("focusin",x),document.addEventListener("focusout",S);const k=new MutationObserver(N);return i&&k.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",S),k.disconnect()}}},[o,i,h.paused]),s.useEffect(()=>{if(i){Le.add(h);const x=document.activeElement;if(!i.contains(x)){const N=new CustomEvent(ve,Fe);i.addEventListener(ve,l),i.dispatchEvent(N),N.defaultPrevented||(un(vn(Xe(i)),{select:!0}),document.activeElement===x&&$(i))}return()=>{i.removeEventListener(ve,l),setTimeout(()=>{const N=new CustomEvent(ge,Fe);i.addEventListener(ge,d),i.dispatchEvent(N),N.defaultPrevented||$(x??document.body,{select:!0}),i.removeEventListener(ge,d),Le.remove(h)},0)}}},[i,l,d,h]);const R=s.useCallback(x=>{if(!n&&!o||h.paused)return;const S=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,N=document.activeElement;if(S&&N){const k=x.currentTarget,[A,P]=dn(k);A&&P?!x.shiftKey&&N===P?(x.preventDefault(),n&&$(A,{select:!0})):x.shiftKey&&N===A&&(x.preventDefault(),n&&$(P,{select:!0})):N===k&&x.preventDefault()}},[n,o,h.paused]);return m.jsx(I.div,{tabIndex:-1,...c,ref:y,onKeyDown:R})});qe.displayName=cn;function un(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if($(o,{select:t}),document.activeElement!==n)return}function dn(e){const t=Xe(e),n=je(t,e),o=je(t.reverse(),e);return[n,o]}function Xe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function je(e,t){for(const n of e)if(!fn(n,{upTo:t}))return n}function fn(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function mn(e){return e instanceof HTMLInputElement&&"select"in e}function $(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mn(e)&&t&&e.select()}}var Le=pn();function pn(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=$e(e,t),e.unshift(t)},remove(t){e=$e(e,t),e[0]?.resume()}}}function $e(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function vn(e){return e.filter(t=>t.tagName!=="A")}var gn="Portal",Ye=s.forwardRef((e,t)=>{const{container:n,...o}=e,[r,a]=s.useState(!1);ee(()=>a(!0),[]);const c=n||r&&globalThis?.document?.body;return c?ht.createPortal(m.jsx(I.div,{...o,ref:t}),c):null});Ye.displayName=gn;function hn(e,t){return s.useReducer((n,o)=>t[n][o]??n,e)}var ae=e=>{const{present:t,children:n}=e,o=En(t),r=typeof n=="function"?n({present:o.isPresent}):s.Children.only(n),a=H(o.ref,yn(r));return typeof n=="function"||o.isPresent?s.cloneElement(r,{ref:a}):null};ae.displayName="Presence";function En(e){const[t,n]=s.useState(),o=s.useRef(null),r=s.useRef(e),a=s.useRef("none"),c=e?"mounted":"unmounted",[i,f]=hn(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const l=oe(o.current);a.current=i==="mounted"?l:"none"},[i]),ee(()=>{const l=o.current,d=r.current;if(d!==e){const y=a.current,h=oe(l);e?f("MOUNT"):h==="none"||l?.display==="none"?f("UNMOUNT"):f(d&&y!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,f]),ee(()=>{if(t){let l;const d=t.ownerDocument.defaultView??window,p=h=>{const x=oe(o.current).includes(CSS.escape(h.animationName));if(h.target===t&&x&&(f("ANIMATION_END"),!r.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",l=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},y=h=>{h.target===t&&(a.current=oe(o.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(l),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:s.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function oe(e){return e?.animationName||"none"}function yn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var he=0;function bn(){s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??We()),document.body.insertAdjacentElement("beforeend",e[1]??We()),he++,()=>{he===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),he--}},[])}function We(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ie="Dialog",[Ze]=$t(ie),[xn,F]=Ze(ie),Je=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:a,modal:c=!0}=e,i=s.useRef(null),f=s.useRef(null),[l,d]=Vt({prop:o,defaultProp:r??!1,onChange:a,caller:ie});return m.jsx(xn,{scope:t,triggerRef:i,contentRef:f,contentId:j(),titleId:j(),descriptionId:j(),open:l,onOpenChange:d,onOpenToggle:s.useCallback(()=>d(p=>!p),[d]),modal:c,children:n})};Je.displayName=ie;var Qe="DialogTrigger",Cn=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=F(Qe,n),a=H(t,r.triggerRef);return m.jsx(I.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":De(r.open),...o,ref:a,onClick:W(e.onClick,r.onOpenToggle)})});Cn.displayName=Qe;var Ce="DialogPortal",[wn,et]=Ze(Ce,{forceMount:void 0}),tt=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,a=F(Ce,t);return m.jsx(wn,{scope:t,forceMount:n,children:s.Children.map(o,c=>m.jsx(ae,{present:n||a.open,children:m.jsx(Ye,{asChild:!0,container:r,children:c})}))})};tt.displayName=Ce;var se="DialogOverlay",nt=s.forwardRef((e,t)=>{const n=et(se,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=F(se,e.__scopeDialog);return a.modal?m.jsx(ae,{present:o||a.open,children:m.jsx(Rn,{...r,ref:t})}):null});nt.displayName=se;var Dn=Ve("DialogOverlay.RemoveScroll"),Rn=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=F(se,n);return m.jsx(Et,{as:Dn,allowPinchZoom:!0,shards:[r.contentRef],children:m.jsx(I.div,{"data-state":De(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),V="DialogContent",rt=s.forwardRef((e,t)=>{const n=et(V,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,a=F(V,e.__scopeDialog);return m.jsx(ae,{present:o||a.open,children:a.modal?m.jsx(Sn,{...r,ref:t}):m.jsx(Nn,{...r,ref:t})})});rt.displayName=V;var Sn=s.forwardRef((e,t)=>{const n=F(V,e.__scopeDialog),o=s.useRef(null),r=H(t,n.contentRef,o);return s.useEffect(()=>{const a=o.current;if(a)return yt(a)},[]),m.jsx(ot,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,i=c.button===0&&c.ctrlKey===!0;(c.button===2||i)&&a.preventDefault()}),onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault())})}),Nn=s.forwardRef((e,t)=>{const n=F(V,e.__scopeDialog),o=s.useRef(!1),r=s.useRef(!1);return m.jsx(ot,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||n.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const c=a.target;n.triggerRef.current?.contains(c)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&r.current&&a.preventDefault()}})}),ot=s.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:a,...c}=e,i=F(V,n),f=s.useRef(null),l=H(t,f);return bn(),m.jsxs(m.Fragment,{children:[m.jsx(qe,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:a,children:m.jsx(He,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":De(i.open),...c,ref:l,onDismiss:()=>i.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(An,{titleId:i.titleId}),m.jsx(kn,{contentRef:f,descriptionId:i.descriptionId})]})]})}),we="DialogTitle",Pn=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=F(we,n);return m.jsx(I.h2,{id:r.titleId,...o,ref:t})});Pn.displayName=we;var st="DialogDescription",In=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=F(st,n);return m.jsx(I.p,{id:r.descriptionId,...o,ref:t})});In.displayName=st;var at="DialogClose",On=s.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=F(at,n);return m.jsx(I.button,{type:"button",...o,ref:t,onClick:W(e.onClick,()=>r.onOpenChange(!1))})});On.displayName=at;function De(e){return e?"open":"closed"}var it="DialogTitleWarning",[mr,lt]=Lt(it,{contentName:V,titleName:we,docsSlug:"dialog"}),An=({titleId:e})=>{const t=lt(it),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
|
-
|
|
3
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
|
-
|
|
5
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},_n="DialogDescriptionWarning",kn=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lt(_n).contentName}}.`;return s.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},Tn=Je,Mn=tt,Fn=nt,jn=rt,Q='[cmdk-group=""]',Ee='[cmdk-group-items=""]',Ln='[cmdk-group-heading=""]',ct='[cmdk-item=""]',Ue=`${ct}:not([aria-disabled="true"])`,xe="cmdk-item-select",q="data-value",$n=(e,t,n)=>jt(e,t,n),ut=s.createContext(void 0),ne=()=>s.useContext(ut),dt=s.createContext(void 0),Re=()=>s.useContext(dt),ft=s.createContext(void 0),mt=s.forwardRef((e,t)=>{let n=X(()=>{var u,g;return{search:"",value:(g=(u=e.value)!=null?u:e.defaultValue)!=null?g:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=X(()=>new Set),r=X(()=>new Map),a=X(()=>new Map),c=X(()=>new Set),i=pt(e),{label:f,children:l,value:d,onValueChange:p,filter:y,shouldFilter:h,loop:R,disablePointerSelection:x=!1,vimBindings:S=!0,...N}=e,k=j(),A=j(),P=j(),T=s.useRef(null),w=Yn();z(()=>{if(d!==void 0){let u=d.trim();n.current.value=u,E.emit()}},[d]),z(()=>{w(6,Se)},[]);let E=s.useMemo(()=>({subscribe:u=>(c.current.add(u),()=>c.current.delete(u)),snapshot:()=>n.current,setState:(u,g,b)=>{var v,C,D,_;if(!Object.is(n.current[u],g)){if(n.current[u]=g,u==="search")ue(),B(),w(1,ce);else if(u==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let O=document.getElementById(P);O?O.focus():(v=document.getElementById(k))==null||v.focus()}if(w(7,()=>{var O;n.current.selectedItemId=(O=G())==null?void 0:O.id,E.emit()}),b||w(5,Se),((C=i.current)==null?void 0:C.value)!==void 0){let O=g??"";(_=(D=i.current).onValueChange)==null||_.call(D,O);return}}E.emit()}},emit:()=>{c.current.forEach(u=>u())}}),[]),L=s.useMemo(()=>({value:(u,g,b)=>{var v;g!==((v=a.current.get(u))==null?void 0:v.value)&&(a.current.set(u,{value:g,keywords:b}),n.current.filtered.items.set(u,Z(g,b)),w(2,()=>{B(),E.emit()}))},item:(u,g)=>(o.current.add(u),g&&(r.current.has(g)?r.current.get(g).add(u):r.current.set(g,new Set([u]))),w(3,()=>{ue(),B(),n.current.value||ce(),E.emit()}),()=>{a.current.delete(u),o.current.delete(u),n.current.filtered.items.delete(u);let b=G();w(4,()=>{ue(),b?.getAttribute("id")===u&&ce(),E.emit()})}),group:u=>(r.current.has(u)||r.current.set(u,new Set),()=>{a.current.delete(u),r.current.delete(u)}),filter:()=>i.current.shouldFilter,label:f||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:k,inputId:P,labelId:A,listInnerRef:T}),[]);function Z(u,g){var b,v;let C=(v=(b=i.current)==null?void 0:b.filter)!=null?v:$n;return u?C(u,n.current.search,g):0}function B(){if(!n.current.search||i.current.shouldFilter===!1)return;let u=n.current.filtered.items,g=[];n.current.filtered.groups.forEach(v=>{let C=r.current.get(v),D=0;C.forEach(_=>{let O=u.get(_);D=Math.max(O,D)}),g.push([v,D])});let b=T.current;J().sort((v,C)=>{var D,_;let O=v.getAttribute("id"),re=C.getAttribute("id");return((D=u.get(re))!=null?D:0)-((_=u.get(O))!=null?_:0)}).forEach(v=>{let C=v.closest(Ee);C?C.appendChild(v.parentElement===C?v:v.closest(`${Ee} > *`)):b.appendChild(v.parentElement===b?v:v.closest(`${Ee} > *`))}),g.sort((v,C)=>C[1]-v[1]).forEach(v=>{var C;let D=(C=T.current)==null?void 0:C.querySelector(`${Q}[${q}="${encodeURIComponent(v[0])}"]`);D?.parentElement.appendChild(D)})}function ce(){let u=J().find(b=>b.getAttribute("aria-disabled")!=="true"),g=u?.getAttribute(q);E.setState("value",g||void 0)}function ue(){var u,g,b,v;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=o.current.size;return}n.current.filtered.groups=new Set;let C=0;for(let D of o.current){let _=(g=(u=a.current.get(D))==null?void 0:u.value)!=null?g:"",O=(v=(b=a.current.get(D))==null?void 0:b.keywords)!=null?v:[],re=Z(_,O);n.current.filtered.items.set(D,re),re>0&&C++}for(let[D,_]of r.current)for(let O of _)if(n.current.filtered.items.get(O)>0){n.current.filtered.groups.add(D);break}n.current.filtered.count=C}function Se(){var u,g,b;let v=G();v&&(((u=v.parentElement)==null?void 0:u.firstChild)===v&&((b=(g=v.closest(Q))==null?void 0:g.querySelector(Ln))==null||b.scrollIntoView({block:"nearest"})),v.scrollIntoView({block:"nearest"}))}function G(){var u;return(u=T.current)==null?void 0:u.querySelector(`${ct}[aria-selected="true"]`)}function J(){var u;return Array.from(((u=T.current)==null?void 0:u.querySelectorAll(Ue))||[])}function de(u){let g=J()[u];g&&E.setState("value",g.getAttribute(q))}function fe(u){var g;let b=G(),v=J(),C=v.findIndex(_=>_===b),D=v[C+u];(g=i.current)!=null&&g.loop&&(D=C+u<0?v[v.length-1]:C+u===v.length?v[0]:v[C+u]),D&&E.setState("value",D.getAttribute(q))}function Ne(u){let g=G(),b=g?.closest(Q),v;for(;b&&!v;)b=u>0?qn(b,Q):Xn(b,Q),v=b?.querySelector(Ue);v?E.setState("value",v.getAttribute(q)):fe(u)}let Pe=()=>de(J().length-1),Ie=u=>{u.preventDefault(),u.metaKey?Pe():u.altKey?Ne(1):fe(1)},Oe=u=>{u.preventDefault(),u.metaKey?de(0):u.altKey?Ne(-1):fe(-1)};return s.createElement(I.div,{ref:t,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:u=>{var g;(g=N.onKeyDown)==null||g.call(N,u);let b=u.nativeEvent.isComposing||u.keyCode===229;if(!(u.defaultPrevented||b))switch(u.key){case"n":case"j":{S&&u.ctrlKey&&Ie(u);break}case"ArrowDown":{Ie(u);break}case"p":case"k":{S&&u.ctrlKey&&Oe(u);break}case"ArrowUp":{Oe(u);break}case"Home":{u.preventDefault(),de(0);break}case"End":{u.preventDefault(),Pe();break}case"Enter":{u.preventDefault();let v=G();if(v){let C=new Event(xe);v.dispatchEvent(C)}}}}},s.createElement("label",{"cmdk-label":"",htmlFor:L.inputId,id:L.labelId,style:Jn},f),le(e,u=>s.createElement(dt.Provider,{value:E},s.createElement(ut.Provider,{value:L},u))))}),Wn=s.forwardRef((e,t)=>{var n,o;let r=j(),a=s.useRef(null),c=s.useContext(ft),i=ne(),f=pt(e),l=(o=(n=f.current)==null?void 0:n.forceMount)!=null?o:c?.forceMount;z(()=>{if(!l)return i.item(r,c?.id)},[l]);let d=vt(r,a,[e.value,e.children,a],e.keywords),p=Re(),y=U(w=>w.value&&w.value===d.current),h=U(w=>l||i.filter()===!1?!0:w.search?w.filtered.items.get(r)>0:!0);s.useEffect(()=>{let w=a.current;if(!(!w||e.disabled))return w.addEventListener(xe,R),()=>w.removeEventListener(xe,R)},[h,e.onSelect,e.disabled]);function R(){var w,E;x(),(E=(w=f.current).onSelect)==null||E.call(w,d.current)}function x(){p.setState("value",d.current,!0)}if(!h)return null;let{disabled:S,value:N,onSelect:k,forceMount:A,keywords:P,...T}=e;return s.createElement(I.div,{ref:K(a,t),...T,id:r,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!y,"data-disabled":!!S,"data-selected":!!y,onPointerMove:S||i.getDisablePointerSelection()?void 0:x,onClick:S?void 0:R},e.children)}),Un=s.forwardRef((e,t)=>{let{heading:n,children:o,forceMount:r,...a}=e,c=j(),i=s.useRef(null),f=s.useRef(null),l=j(),d=ne(),p=U(h=>r||d.filter()===!1?!0:h.search?h.filtered.groups.has(c):!0);z(()=>d.group(c),[]),vt(c,i,[e.value,e.heading,f]);let y=s.useMemo(()=>({id:c,forceMount:r}),[r]);return s.createElement(I.div,{ref:K(i,t),...a,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},n&&s.createElement("div",{ref:f,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),le(e,h=>s.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},s.createElement(ft.Provider,{value:y},h))))}),Bn=s.forwardRef((e,t)=>{let{alwaysRender:n,...o}=e,r=s.useRef(null),a=U(c=>!c.search);return!n&&!a?null:s.createElement(I.div,{ref:K(r,t),...o,"cmdk-separator":"",role:"separator"})}),Kn=s.forwardRef((e,t)=>{let{onValueChange:n,...o}=e,r=e.value!=null,a=Re(),c=U(l=>l.search),i=U(l=>l.selectedItemId),f=ne();return s.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),s.createElement(I.input,{ref:t,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":f.listId,"aria-labelledby":f.labelId,"aria-activedescendant":i,id:f.inputId,type:"text",value:r?e.value:c,onChange:l=>{r||a.setState("search",l.target.value),n?.(l.target.value)}})}),Vn=s.forwardRef((e,t)=>{let{children:n,label:o="Suggestions",...r}=e,a=s.useRef(null),c=s.useRef(null),i=U(l=>l.selectedItemId),f=ne();return s.useEffect(()=>{if(c.current&&a.current){let l=c.current,d=a.current,p,y=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let h=l.offsetHeight;d.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return y.observe(l),()=>{cancelAnimationFrame(p),y.unobserve(l)}}},[]),s.createElement(I.div,{ref:K(a,t),...r,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":o,id:f.listId},le(e,l=>s.createElement("div",{ref:K(c,f.listInnerRef),"cmdk-list-sizer":""},l)))}),zn=s.forwardRef((e,t)=>{let{open:n,onOpenChange:o,overlayClassName:r,contentClassName:a,container:c,...i}=e;return s.createElement(Tn,{open:n,onOpenChange:o},s.createElement(Mn,{container:c},s.createElement(Fn,{"cmdk-overlay":"",className:r}),s.createElement(jn,{"aria-label":e.label,"cmdk-dialog":"",className:a},s.createElement(mt,{ref:t,...i}))))}),Hn=s.forwardRef((e,t)=>U(n=>n.filtered.count===0)?s.createElement(I.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Gn=s.forwardRef((e,t)=>{let{progress:n,children:o,label:r="Loading...",...a}=e;return s.createElement(I.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r},le(e,c=>s.createElement("div",{"aria-hidden":!0},c)))}),Y=Object.assign(mt,{List:Vn,Item:Wn,Input:Kn,Group:Un,Separator:Bn,Dialog:zn,Empty:Hn,Loading:Gn});function qn(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Xn(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function pt(e){let t=s.useRef(e);return z(()=>{t.current=e}),t}var z=typeof window>"u"?s.useEffect:s.useLayoutEffect;function X(e){let t=s.useRef();return t.current===void 0&&(t.current=e()),t}function U(e){let t=Re(),n=()=>e(t.snapshot());return s.useSyncExternalStore(t.subscribe,n,n)}function vt(e,t,n,o=[]){let r=s.useRef(),a=ne();return z(()=>{var c;let i=(()=>{var l;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(l=d.current.textContent)==null?void 0:l.trim():r.current}})(),f=o.map(l=>l.trim());a.value(e,i,f),(c=t.current)==null||c.setAttribute(q,i),r.current=i}),r}var Yn=()=>{let[e,t]=s.useState(),n=X(()=>new Map);return z(()=>{n.current.forEach(o=>o()),n.current=new Map},[e]),(o,r)=>{n.current.set(o,r),t({})}};function Zn(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function le({asChild:e,children:t},n){return e&&s.isValidElement(t)?s.cloneElement(Zn(t),{ref:t.ref},n(t.props.children)):n(t)}var Jn={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Qn({...e}){return m.jsx(xt,{"data-slot":"dialog",...e})}function er({...e}){return m.jsx(St,{"data-slot":"dialog-portal",...e})}function tr({className:e,...t}){return m.jsx(Nt,{"data-slot":"dialog-overlay",className:M(`data-[state=open]:animate-in data-[state=closed]:animate-out
|
|
6
|
-
data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0
|
|
7
|
-
z-50 bg-black/50`,e),...t})}function nr({className:e,children:t,showCloseButton:n=!0,...o}){return m.jsxs(er,{"data-slot":"dialog-portal",children:[m.jsx(tr,{}),m.jsxs(Dt,{"data-slot":"dialog-content",className:M(`bg-background data-[state=open]:animate-in
|
|
8
|
-
data-[state=closed]:animate-out data-[state=closed]:fade-out-0
|
|
9
|
-
data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
|
|
10
|
-
data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid
|
|
11
|
-
w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%]
|
|
12
|
-
gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none
|
|
13
|
-
sm:max-w-lg`,e),...o,children:[t,n&&m.jsxs(Rt,{"data-slot":"dialog-close",className:`ring-offset-background focus:ring-ring
|
|
14
|
-
data-[state=open]:bg-accent
|
|
15
|
-
data-[state=open]:text-muted-foreground absolute top-4 right-4
|
|
16
|
-
rounded-xs opacity-70 transition-opacity hover:opacity-100
|
|
17
|
-
focus:ring-2 focus:ring-offset-2 focus:outline-hidden
|
|
18
|
-
disabled:pointer-events-none [&_svg]:pointer-events-none
|
|
19
|
-
[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[m.jsx(bt,{}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function rr({className:e,...t}){return m.jsx("div",{"data-slot":"dialog-header",className:M("flex flex-col gap-2 text-center sm:text-left",e),...t})}function or({className:e,...t}){return m.jsx(Ct,{"data-slot":"dialog-title",className:M("text-lg leading-none font-semibold",e),...t})}function sr({className:e,...t}){return m.jsx(wt,{"data-slot":"dialog-description",className:M("text-muted-foreground text-sm",e),...t})}function ar({className:e,...t}){return m.jsx(Y,{"data-slot":"command",className:M(`bg-popover text-popover-foreground flex h-full w-full flex-col
|
|
20
|
-
overflow-hidden rounded-md`,e),...t})}function pr({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:o,showCloseButton:r=!0,...a}){return m.jsxs(Qn,{...a,children:[m.jsxs(rr,{className:"sr-only",children:[m.jsx(or,{children:e}),m.jsx(sr,{children:t})]}),m.jsx(nr,{className:M("overflow-hidden p-0",o),showCloseButton:r,children:m.jsx(ar,{className:`[&_[cmdk-group-heading]]:text-muted-foreground
|
|
21
|
-
**:data-[slot=command-input-wrapper]:h-12
|
|
22
|
-
[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium
|
|
23
|
-
[&_[cmdk-group]]:px-2
|
|
24
|
-
[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0
|
|
25
|
-
[&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5
|
|
26
|
-
[&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3
|
|
27
|
-
[&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5`,children:n})})]})}function vr({className:e,...t}){return m.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[m.jsx(Pt,{className:"size-4 shrink-0 opacity-50"}),m.jsx(Y.Input,{"data-slot":"command-input",className:M(`placeholder:text-muted-foreground flex h-10 w-full rounded-md
|
|
28
|
-
bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed
|
|
29
|
-
disabled:opacity-50`,e),...t})]})}function gr({className:e,...t}){return m.jsx(Y.List,{"data-slot":"command-list",className:M("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function hr({...e}){return m.jsx(Y.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function Er({className:e,...t}){return m.jsx(Y.Group,{"data-slot":"command-group",className:M(`text-foreground [&_[cmdk-group-heading]]:text-muted-foreground
|
|
30
|
-
overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2
|
|
31
|
-
[&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs
|
|
32
|
-
[&_[cmdk-group-heading]]:font-medium`,e),...t})}function yr({className:e,...t}){return m.jsx(Y.Item,{"data-slot":"command-item",className:M(`data-[selected=true]:bg-accent
|
|
33
|
-
data-[selected=true]:text-accent-foreground
|
|
34
|
-
[&_svg:not([class*='text-'])]:text-muted-foreground relative flex
|
|
35
|
-
cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm
|
|
36
|
-
outline-hidden select-none data-[disabled=true]:pointer-events-none
|
|
37
|
-
data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none
|
|
38
|
-
[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...t})}export{ar as C,vr as a,gr as b,hr as c,Er as d,yr as e,pr as f};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c}from"./index-CKJsEQtp.js";const e=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],t=c("copy",e);export{t as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as u,r as c}from"./react-Dh7j6h1K.js";import{B as y,C as f}from"./check-DjJ4znpk.js";import{t as d}from"./index-CKJsEQtp.js";import{C}from"./copy-DKl_cZLH.js";const x=async e=>{if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.left="-9999px",t.style.top="0",document.body.appendChild(t),t.select();try{return document.execCommand("copy")}finally{document.body.removeChild(t)}},w=(e,t={})=>{const{copiedMs:o=1400}=t,[i,a]=c.useState(!1),s=c.useRef(void 0);c.useEffect(()=>()=>window.clearTimeout(s.current),[]);const n=c.useCallback(async()=>{const p=typeof e=="function"?await e():e,r=await x(p);return window.clearTimeout(s.current),a(r),r&&(s.current=window.setTimeout(()=>a(!1),o)),r},[e,o]);return{copied:i,copy:n}};function v({className:e,context:t,label:o="Copy context",notify:i=!0,onCopied:a,onFailed:s,size:n="icon-xs",variant:p="ghost"}){const{copied:r,copy:l}=w(t);return u.jsx(y,{type:"button",variant:p,size:n,className:e,"aria-label":o,title:o,onClick:()=>{l().then(m=>{m?(i&&d.success("Copied"),a?.()):(i&&d.error("Could not copy"),s?.())})},children:r?u.jsx(f,{className:"size-3.5 text-emerald-600"}):u.jsx(C,{className:"size-3.5"})})}export{v as C,x as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as V,l as $,d as lt}from"./mermaid.core-BEwF5fZo.js";import{c as tt}from"./cytoscape.esm-D3_iZ_3b.js";import{g as gt}from"./markdown-BvBsne3X.js";import"./index-DbD-bwdm.js";import"./react-Dh7j6h1K.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;v<p.length;v++)h=p[v],a=h.withChildren(),a.forEach(function(D){r.add(D)});return r},n.prototype.getNoOfChildren=function(){var r=0,h;if(this.child==null)r=1;else for(var a=this.child.getNodes(),p=0;p<a.length;p++)h=a[p],r+=h.getNoOfChildren();return r==0&&(r=1),r},n.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},n.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},n.prototype.scatter=function(){var r,h,a=-i.INITIAL_WORLD_BOUNDARY,p=i.INITIAL_WORLD_BOUNDARY;r=i.WORLD_CENTER_X+l.nextDouble()*(p-a)+a;var v=-i.INITIAL_WORLD_BOUNDARY,D=i.INITIAL_WORLD_BOUNDARY;h=i.WORLD_CENTER_Y+l.nextDouble()*(D-v)+v,this.rect.x=r,this.rect.y=h},n.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var r=this.getChild();if(r.updateBounds(!0),this.rect.x=r.getLeft(),this.rect.y=r.getTop(),this.setWidth(r.getRight()-r.getLeft()),this.setHeight(r.getBottom()-r.getTop()),i.NODE_DIMENSIONS_INCLUDE_LABELS){var h=r.getRight()-r.getLeft(),a=r.getBottom()-r.getTop();this.labelWidth>h&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y<T;y++)u=D[y],u.isInterGraph?this.graphManager.remove(u):u.source.owner.remove(u);var O=this.nodes.indexOf(v);if(O==-1)throw"Node not in owner node list!";this.nodes.splice(O,1)}else if(p instanceof g){var u=p;if(u==null)throw"Edge is null!";if(!(u.source!=null&&u.target!=null))throw"Source and/or target is null!";if(!(u.source.owner!=null&&u.target.owner!=null&&u.source.owner==this&&u.target.owner==this))throw"Source and/or target owner is invalid!";var s=u.source.edges.indexOf(u),f=u.target.edges.indexOf(u);if(!(s>-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;s<O;s++){var f=y[s];D=f.getTop(),u=f.getLeft(),p>D&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;m<A;m++){var C=E[m];p&&C.child!=null&&C.updateBounds(),y=C.getLeft(),O=C.getRight(),s=C.getTop(),f=C.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var R=new n(v,u,D-v,T-u);v==e.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),E[0].getParent().paddingLeft!=null?c=E[0].getParent().paddingLeft:c=this.margin,this.left=R.x-c,this.right=R.x+R.width+c,this.top=R.y-c,this.bottom=R.y+R.height+c},h.calculateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c=p.length,E=0;E<c;E++){var A=p[E];y=A.getLeft(),O=A.getRight(),s=A.getTop(),f=A.getBottom(),v>y&&(v=y),D<O&&(D=O),u>s&&(u=s),T<f&&(T=f)}var m=new n(v,u,D-v,T-u);return m},h.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},h.prototype.getEstimatedSize=function(){if(this.estimatedSize==e.MIN_VALUE)throw"assert failed";return this.estimatedSize},h.prototype.calcEstimatedSize=function(){for(var p=0,v=this.nodes,D=v.length,u=0;u<D;u++){var T=v[u];p+=T.calcEstimatedSize()}return p==0?this.estimatedSize=t.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=p/Math.sqrt(this.nodes.length),this.estimatedSize},h.prototype.updateConnected=function(){var p=this;if(this.nodes.length==0){this.isConnected=!0;return}var v=new r,D=new Set,u=this.nodes[0],T,y,O=u.withChildren();for(O.forEach(function(m){v.push(m),D.add(m)});v.length!==0;){u=v.shift(),T=u.getEdges();for(var s=T.length,f=0;f<s;f++){var c=T[f];if(y=c.getOtherEndInGraph(u,this),y!=null&&!D.has(y)){var E=y.withChildren();E.forEach(function(m){v.push(m),D.add(m)})}}}if(this.isConnected=!1,D.size>=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r<d;r++)n=g[r],l.remove(n);var h=[];h=h.concat(l.getNodes());var a;d=h.length;for(var r=0;r<d;r++)a=h[r],l.remove(a);l==this.rootGraph&&this.setRootGraph(null);var p=this.graphs.indexOf(l);this.graphs.splice(p,1),l.parent=null}else if(i instanceof e){if(n=i,n==null)throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(!(n.source!=null&&n.target!=null))throw"Source and/or target is null!";if(!(n.source.edges.indexOf(n)!=-1&&n.target.edges.indexOf(n)!=-1))throw"Source and/or target doesn't know this edge!";var p=n.source.edges.indexOf(n);if(n.source.edges.splice(p,1),p=n.target.edges.indexOf(n),n.target.edges.splice(p,1),!(n.source.owner!=null&&n.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(n.source.owner.getGraphManager().edges.indexOf(n)==-1)throw"Not in owner graph manager's edge list!";var p=n.source.owner.getGraphManager().edges.indexOf(n);n.source.owner.getGraphManager().edges.splice(p,1)}},t.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},t.prototype.getGraphs=function(){return this.graphs},t.prototype.getAllNodes=function(){if(this.allNodes==null){for(var i=[],l=this.getGraphs(),g=l.length,n=0;n<g;n++)i=i.concat(l[n].getNodes());this.allNodes=i}return this.allNodes},t.prototype.resetAllNodes=function(){this.allNodes=null},t.prototype.resetAllEdges=function(){this.allEdges=null},t.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},t.prototype.getAllEdges=function(){if(this.allEdges==null){var i=[],l=this.getGraphs();l.length;for(var g=0;g<l.length;g++)i=i.concat(l[g].getEdges());i=i.concat(this.edges),this.allEdges=i}return this.allEdges},t.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},t.prototype.setAllNodesToApplyGravitation=function(i){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=i},t.prototype.getRoot=function(){return this.rootGraph},t.prototype.setRootGraph=function(i){if(i.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=i,i.parent==null&&(i.parent=this.layout.newNode("Root node"))},t.prototype.getLayout=function(){return this.layout},t.prototype.isOneAncestorOfOther=function(i,l){if(!(i!=null&&l!=null))throw"assert failed";if(i==l)return!0;var g=i.getOwner(),n;do{if(n=g.getParent(),n==null)break;if(n==l)return!0;if(g=n.getOwner(),g==null)break}while(!0);g=l.getOwner();do{if(n=g.getParent(),n==null)break;if(n==i)return!0;if(g=n.getOwner(),g==null)break}while(!0);return!1},t.prototype.calcLowestCommonAncestors=function(){for(var i,l,g,n,d,r=this.getAllEdges(),h=r.length,a=0;a<h;a++){if(i=r[a],l=i.source,g=i.target,i.lca=null,i.sourceInLca=l,i.targetInLca=g,l==g){i.lca=l.getOwner();continue}for(n=l.getOwner();i.lca==null;){for(i.targetInLca=g,d=g.getOwner();i.lca==null;){if(d==n){i.lca=d;break}if(d==this.rootGraph)break;if(i.lca!=null)throw"assert failed";i.targetInLca=d.getParent(),d=i.targetInLca.getOwner()}if(n==this.rootGraph)break;i.lca==null&&(i.sourceInLca=n.getParent(),n=i.sourceInLca.getOwner())}if(i.lca==null)throw"assert failed"}},t.prototype.calcLowestCommonAncestor=function(i,l){if(i==l)return i.getOwner();var g=i.getOwner();do{if(g==null)break;var n=l.getOwner();do{if(n==null)break;if(n==g)return n;n=n.getParent().getOwner()}while(!0);g=g.getParent().getOwner()}while(!0);return g},t.prototype.calcInclusionTreeDepths=function(i,l){i==null&&l==null&&(i=this.rootGraph,l=1);for(var g,n=i.getNodes(),d=n.length,r=0;r<d;r++)g=n[r],g.inclusionTreeDepth=l,g.child!=null&&this.calcInclusionTreeDepths(g.child,l+1)},t.prototype.includesInvalidEdge=function(){for(var i,l=this.edges.length,g=0;g<l;g++)if(i=this.edges[g],this.isOneAncestorOfOther(i.source,i.target))return!0;return!1},N.exports=t}),(function(N,I,L){var o=L(0);function e(){}for(var t in o)e[t]=o[t];e.MAX_ITERATIONS=2500,e.DEFAULT_EDGE_LENGTH=50,e.DEFAULT_SPRING_STRENGTH=.45,e.DEFAULT_REPULSION_STRENGTH=4500,e.DEFAULT_GRAVITY_STRENGTH=.4,e.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,e.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,e.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,e.COOLING_ADAPTATION_FACTOR=.33,e.ADAPTATION_LOWER_NODE_LIMIT=1e3,e.ADAPTATION_UPPER_NODE_LIMIT=5e3,e.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,e.MAX_NODE_DISPLACEMENT=e.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,e.MIN_REPULSION_DIST=e.DEFAULT_EDGE_LENGTH/10,e.CONVERGENCE_CHECK_PERIOD=100,e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,e.MIN_EDGE_LENGTH=1,e.GRID_CALCULATION_CHECK_PERIOD=10,N.exports=e}),(function(N,I,L){var o=L(12);function e(){}e.calcSeparationAmount=function(t,i,l,g){if(!t.intersects(i))throw"assert failed";var n=new Array(2);this.decideDirectionsForOverlappingNodes(t,i,n),l[0]=Math.min(t.getRight(),i.getRight())-Math.max(t.x,i.x),l[1]=Math.min(t.getBottom(),i.getBottom())-Math.max(t.y,i.y),t.getX()<=i.getX()&&t.getRight()>=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]<h?h=l[0]:r=l[1],l[0]=-1*n[0]*(h/2+g),l[1]=-1*n[1]*(r/2+g)},e.decideDirectionsForOverlappingNodes=function(t,i,l){t.getCenterX()<i.getCenterX()?l[0]=-1:l[0]=1,t.getCenterY()<i.getCenterY()?l[1]=-1:l[1]=1},e.getIntersection2=function(t,i,l){var g=t.getCenterX(),n=t.getCenterY(),d=i.getCenterX(),r=i.getCenterY();if(t.intersects(i))return l[0]=g,l[1]=n,l[2]=d,l[3]=r,!0;var h=t.getX(),a=t.getY(),p=t.getRight(),v=t.getX(),D=t.getBottom(),u=t.getRight(),T=t.getWidthHalf(),y=t.getHeightHalf(),O=i.getX(),s=i.getY(),f=i.getRight(),c=i.getX(),E=i.getBottom(),A=i.getRight(),m=i.getWidthHalf(),C=i.getHeightHalf(),R=!1,M=!1;if(g===d){if(n>r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(n<r)return l[0]=g,l[1]=D,l[2]=d,l[3]=s,!1}else if(n===r){if(g>d)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(g<d)return l[0]=p,l[1]=n,l[2]=O,l[3]=r,!1}else{var S=t.height/t.width,Y=i.height/i.width,w=(r-n)/(d-g),x=void 0,F=void 0,U=void 0,P=void 0,_=void 0,X=void 0;if(-S===w?g>d?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l<t?n+=Math.PI:g<i&&(n+=this.TWO_PI)):g<i?n=this.ONE_AND_HALF_PI:n=this.HALF_PI,n},e.doIntersect=function(t,i,l,g){var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=(r-n)*(D-p)-(v-a)*(h-d);if(u===0)return!1;var T=((D-p)*(v-n)+(a-v)*(D-d))/u,y=((d-h)*(v-n)+(r-n)*(D-d))/u;return 0<T&&T<1&&0<y&&y<1},e.HALF_PI=.5*Math.PI,e.ONE_AND_HALF_PI=1.5*Math.PI,e.TWO_PI=2*Math.PI,e.THREE_PI=3*Math.PI,N.exports=e}),(function(N,I,L){function o(){}o.sign=function(e){return e>0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h<r.length;h++){var a=r[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(d,a.key,a)}}return function(d,r,h){return r&&n(d.prototype,r),h&&n(d,h),d}})();function e(n,d){if(!(n instanceof d))throw new TypeError("Cannot call a class as a function")}var t=function(d){return{value:d,next:null,prev:null}},i=function(d,r,h,a){return d!==null?d.next=r:a.head=r,h!==null?h.prev=r:a.tail=r,r.prev=d,r.next=h,a.length++,r},l=function(d,r){var h=d.prev,a=d.next;return h!==null?h.next=a:r.head=a,a!==null?a.prev=h:r.tail=h,d.prev=d.next=null,r.length--,d},g=(function(){function n(d){var r=this;e(this,n),this.length=0,this.head=null,this.tail=null,d?.forEach(function(h){return r.push(h)})}return o(n,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(r,h){return i(h.prev,t(r),h,this)}},{key:"insertAfter",value:function(r,h){return i(h,t(r),h.next,this)}},{key:"insertNodeBefore",value:function(r,h){return i(h.prev,r,h,this)}},{key:"insertNodeAfter",value:function(r,h){return i(h,r,h.next,this)}},{key:"push",value:function(r){return i(this.tail,t(r),null,this)}},{key:"unshift",value:function(r){return i(null,t(r),this.head,this)}},{key:"remove",value:function(r){return l(r,this)}},{key:"pop",value:function(){return l(this.tail,this).value}},{key:"popNode",value:function(){return l(this.tail,this)}},{key:"shift",value:function(){return l(this.head,this).value}},{key:"shiftNode",value:function(){return l(this.head,this)}},{key:"get_object_at",value:function(r){if(r<=this.length()){for(var h=1,a=this.head;h<r;)a=a.next,h++;return a.value}}},{key:"set_object_at",value:function(r,h){if(r<=this.length()){for(var a=1,p=this.head;a<r;)p=p.next,a++;p.value=h}}}]),n})();N.exports=g}),(function(N,I,L){function o(e,t,i){this.x=null,this.y=null,e==null&&t==null&&i==null?(this.x=0,this.y=0):typeof e=="number"&&typeof t=="number"&&i==null?(this.x=e,this.y=t):e.constructor.name=="Point"&&t==null&&i==null&&(i=e,this.x=i.x,this.y=i.y)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.getLocation=function(){return new o(this.x,this.y)},o.prototype.setLocation=function(e,t,i){e.constructor.name=="Point"&&t==null&&i==null?(i=e,this.setLocation(i.x,i.y)):typeof e=="number"&&typeof t=="number"&&i==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},o.prototype.move=function(e,t){this.x=e,this.y=t},o.prototype.translate=function(e,t){this.x+=e,this.y+=t},o.prototype.equals=function(e){if(e.constructor.name=="Point"){var t=e;return this.x==t.x&&this.y==t.y}return this==e},o.prototype.toString=function(){return new o().constructor.name+"[x="+this.x+",y="+this.y+"]"},N.exports=o}),(function(N,I,L){function o(e,t,i,l){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&i!=null&&l!=null&&(this.x=e,this.y=t,this.width=i,this.height=l)}o.prototype.getX=function(){return this.x},o.prototype.setX=function(e){this.x=e},o.prototype.getY=function(){return this.y},o.prototype.setY=function(e){this.y=e},o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},o.prototype.getRight=function(){return this.x+this.width},o.prototype.getBottom=function(){return this.y+this.height},o.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},o.prototype.getCenterX=function(){return this.x+this.width/2},o.prototype.getMinX=function(){return this.getX()},o.prototype.getMaxX=function(){return this.getX()+this.width},o.prototype.getCenterY=function(){return this.y+this.height/2},o.prototype.getMinY=function(){return this.getY()},o.prototype.getMaxY=function(){return this.getY()+this.height},o.prototype.getWidthHalf=function(){return this.width/2},o.prototype.getHeightHalf=function(){return this.height/2},N.exports=o}),(function(N,I,L){var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function e(){}e.lastID=0,e.createID=function(t){return e.isPrimitive(t)?t:(t.uniqueID!=null||(t.uniqueID=e.getString(),e.lastID++),t.uniqueID)},e.getString=function(t){return t==null&&(t=e.lastID),"Object#"+t},e.isPrimitive=function(t){var i=typeof t>"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p<a.length;p++)v[p]=a[p];return v}else return Array.from(a)}var e=L(0),t=L(6),i=L(3),l=L(1),g=L(5),n=L(4),d=L(17),r=L(27);function h(a){r.call(this),this.layoutQuality=e.QUALITY,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=e.DEFAULT_INCREMENTAL,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new t(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,a!=null&&(this.isRemoteUse=a)}h.RANDOM_SEED=1,h.prototype=Object.create(r.prototype),h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},h.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},h.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},h.prototype.newGraphManager=function(){var a=new t(this);return this.graphManager=a,a},h.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},h.prototype.newNode=function(a){return new i(this.graphManager,a)},h.prototype.newEdge=function(a){return new l(null,null,a)},h.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},h.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var a;return this.checkLayoutSuccess()?a=!1:a=this.layout(),e.ANIMATE==="during"?!1:(a&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,a)},h.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},h.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var a=this.graphManager.getAllEdges(),p=0;p<a.length;p++)a[p];for(var v=this.graphManager.getRoot().getNodes(),p=0;p<v.length;p++)v[p];this.update(this.graphManager.getRoot())}},h.prototype.update=function(a){if(a==null)this.update2();else if(a instanceof i){var p=a;if(p.getChild()!=null)for(var v=p.getChild().getNodes(),D=0;D<v.length;D++)update(v[D]);if(p.vGraphObject!=null){var u=p.vGraphObject;u.update(p)}}else if(a instanceof l){var T=a;if(T.vGraphObject!=null){var y=T.vGraphObject;y.update(T)}}else if(a instanceof g){var O=a;if(O.vGraphObject!=null){var s=O.vGraphObject;s.update(O)}}},h.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=e.QUALITY,this.animationDuringLayout=e.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=e.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=e.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=e.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=e.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=e.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},h.prototype.transform=function(a){if(a==null)this.transform(new n(0,0));else{var p=new d,v=this.graphManager.getRoot().updateLeftTop();if(v!=null){p.setWorldOrgX(a.x),p.setWorldOrgY(a.y),p.setDeviceOrgX(v.x),p.setDeviceOrgY(v.y);for(var D=this.getAllNodes(),u,T=0;T<D.length;T++)u=D[T],u.transform(p)}}},h.prototype.positionNodesRandomly=function(a){if(a==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var p,v,D=a.getNodes(),u=0;u<D.length;u++)p=D[u],v=p.getChild(),v==null||v.getNodes().length==0?p.scatter():(this.positionNodesRandomly(v),p.updateBounds())},h.prototype.getFlatForest=function(){for(var a=[],p=!0,v=this.graphManager.getRoot().getNodes(),D=!0,u=0;u<v.length;u++)v[u].getChild()!=null&&(D=!1);if(!D)return a;var T=new Set,y=[],O=new Map,s=[];for(s=s.concat(v);s.length>0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u<c.length;u++){var E=c[u].getOtherEnd(f);if(O.get(f)!=E)if(!T.has(E))y.push(E),O.set(E,f);else{p=!1;break}}}if(!p)a=[];else{var A=[].concat(o(T));a.push(A);for(var u=0;u<A.length;u++){var m=A[u],C=s.indexOf(m);C>-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u<a.bendpoints.length;u++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),D.add(T);var y=this.newEdge(null);this.graphManager.add(y,v,T),p.add(T),v=T}var y=this.newEdge(null);return this.graphManager.add(y,v,a.target),this.edgeToDummyNodes.set(a,p),a.isInterGraph()?this.graphManager.remove(a):D.remove(a),p},h.prototype.createBendpointsFromDummyNodes=function(){var a=[];a=a.concat(this.graphManager.getAllEdges()),a=[].concat(o(this.edgeToDummyNodes.keys())).concat(a);for(var p=0;p<a.length;p++){var v=a[p];if(v.bendpoints.length>0){for(var D=this.edgeToDummyNodes.get(v),u=0;u<D.length;u++){var T=D[u],y=new n(T.getCenterX(),T.getCenterY()),O=v.bendpoints.get(u);O.x=y.x,O.y=y.y,T.getOwner().remove(T)}this.graphManager.add(v,v.source,v.target)}}},h.transform=function(a,p,v,D){if(v!=null&&D!=null){var u=p;if(a<=50){var T=p/v;u-=(p-T)/50*(50-a)}else{var y=p*D;u+=(y-p)/50*(a-50)}return u}else{var O,s;return a<=50?(O=9*p/500,s=p/10):(O=9*p/50,s=-8*p),O*a+s}},h.findCenterOfTree=function(a){var p=[];p=p.concat(a);var v=[],D=new Map,u=!1,T=null;(p.length==1||p.length==2)&&(u=!0,T=p[0]);for(var y=0;y<p.length;y++){var O=p[y],s=O.getNeighborsList().size;D.set(O,O.getNeighborsList().size),s==1&&v.push(O)}var f=[];for(f=f.concat(v);!u;){var c=[];c=c.concat(f),f=[];for(var y=0;y<p.length;y++){var O=p[y],E=p.indexOf(O);E>=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);h<r.length;h++)a[h]=r[h];return a}else return Array.from(r)}var e=L(15),t=L(7),i=L(0),l=L(8),g=L(9);function n(){e.call(this),this.useSmartIdealEdgeLengthCalculation=t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=t.DEFAULT_EDGE_LENGTH,this.springConstant=t.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=t.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=t.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=t.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*t.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=t.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=t.MAX_ITERATIONS}n.prototype=Object.create(e.prototype);for(var d in e)n[d]=e[d];n.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},n.prototype.calcIdealEdgeLengths=function(){for(var r,h,a,p,v,D,u=this.getGraphManager().getAllEdges(),T=0;T<u.length;T++)r=u[T],r.idealLength=this.idealEdgeLength,r.isInterGraph&&(a=r.getSource(),p=r.getTarget(),v=r.getSourceInLca().getEstimatedSize(),D=r.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(r.idealLength+=v+D-2*i.SIMPLE_NODE_SIZE),h=r.getLca().getInclusionTreeDepth(),r.idealLength+=t.DEFAULT_EDGE_LENGTH*t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(a.getInclusionTreeDepth()+p.getInclusionTreeDepth()-2*h))},n.prototype.initSpringEmbedder=function(){var r=this.getAllNodes().length;this.incremental?(r>t.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a<r.length;a++)h=r[a],this.calcSpringForce(h,h.idealLength)},n.prototype.calcRepulsionForces=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;a<u.length;a++)v=u[a],this.calculateRepulsionForceOfANode(v,T,r,h),T.add(v);else for(a=0;a<u.length;a++)for(v=u[a],p=a+1;p<u.length;p++)D=u[p],v.getOwner()==D.getOwner()&&this.calcRepulsionForce(v,D)},n.prototype.calcGravitationalForces=function(){for(var r,h=this.getAllNodesToApplyGravitation(),a=0;a<h.length;a++)r=h[a],this.calcGravitationalForce(r)},n.prototype.moveNodes=function(){for(var r=this.getAllNodes(),h,a=0;a<r.length;a++)h=r[a],h.move()},n.prototype.calcSpringForce=function(r,h){var a=r.getSource(),p=r.getTarget(),v,D,u,T;if(this.uniformLeafNodeSizes&&a.getChild()==null&&p.getChild()==null)r.updateLengthSimple();else if(r.updateLength(),r.isOverlapingSourceAndTarget)return;v=r.getLength(),v!=0&&(D=this.springConstant*(v-h),u=D*(r.lengthX/v),T=D*(r.lengthY/v),a.springForceX+=u,a.springForceY+=T,p.springForceX-=u,p.springForceY-=T)},n.prototype.calcRepulsionForce=function(r,h){var a=r.getRect(),p=h.getRect(),v=new Array(2),D=new Array(4),u,T,y,O,s,f,c;if(a.intersects(p)){l.calcSeparationAmount(a,p,v,t.DEFAULT_EDGE_LENGTH/2),f=2*v[0],c=2*v[1];var E=r.noOfChildren*h.noOfChildren/(r.noOfChildren+h.noOfChildren);r.repulsionForceX-=E*f,r.repulsionForceY-=E*c,h.repulsionForceX+=E*f,h.repulsionForceY+=E*c}else this.uniformLeafNodeSizes&&r.getChild()==null&&h.getChild()==null?(u=p.getCenterX()-a.getCenterX(),T=p.getCenterY()-a.getCenterY()):(l.getIntersection(a,p,D),u=D[2]-D[0],T=D[3]-D[1]),Math.abs(u)<t.MIN_REPULSION_DIST&&(u=g.sign(u)*t.MIN_REPULSION_DIST),Math.abs(T)<t.MIN_REPULSION_DIST&&(T=g.sign(T)*t.MIN_REPULSION_DIST),y=u*u+T*T,O=Math.sqrt(y),s=this.repulsionConstant*r.noOfChildren*h.noOfChildren/y,f=s*u/O,c=s*T/O,r.repulsionForceX-=f,r.repulsionForceY-=c,h.repulsionForceX+=f,h.repulsionForceY+=c},n.prototype.calcGravitationalForce=function(r){var h,a,p,v,D,u,T,y;h=r.getOwner(),a=(h.getRight()+h.getLeft())/2,p=(h.getTop()+h.getBottom())/2,v=r.getCenterX()-a,D=r.getCenterY()-p,u=Math.abs(v)+r.getWidth()/2,T=Math.abs(D)+r.getHeight()/2,r.getOwner()==this.graphManager.getRoot()?(y=h.getEstimatedSize()*this.gravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,r||h},n.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},n.prototype.calcNoOfChildrenForAllNodes=function(){for(var r,h=this.graphManager.getAllNodes(),a=0;a<h.length;a++)r=h[a],r.noOfChildren=r.getNoOfChildren()},n.prototype.calcGrid=function(r){var h=0,a=0;h=parseInt(Math.ceil((r.getRight()-r.getLeft())/this.repulsionRange)),a=parseInt(Math.ceil((r.getBottom()-r.getTop())/this.repulsionRange));for(var p=new Array(h),v=0;v<h;v++)p[v]=new Array(a);for(var v=0;v<h;v++)for(var D=0;D<a;D++)p[v][D]=new Array;return p},n.prototype.addNodeToGrid=function(r,h,a){var p=0,v=0,D=0,u=0;p=parseInt(Math.floor((r.getRect().x-h)/this.repulsionRange)),v=parseInt(Math.floor((r.getRect().width+r.getRect().x-h)/this.repulsionRange)),D=parseInt(Math.floor((r.getRect().y-a)/this.repulsionRange)),u=parseInt(Math.floor((r.getRect().height+r.getRect().y-a)/this.repulsionRange));for(var T=p;T<=v;T++)for(var y=D;y<=u;y++)this.grid[T][y].push(r),r.setGridCoordinates(p,v,D,u)},n.prototype.updateGrid=function(){var r,h,a=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),r=0;r<a.length;r++)h=a[r],this.addNodeToGrid(h,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},n.prototype.calculateRepulsionForceOfANode=function(r,h,a,p){if(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&a||p){var v=new Set;r.surrounding=new Array;for(var D,u=this.grid,T=r.startX-1;T<r.finishX+2;T++)for(var y=r.startY-1;y<r.finishY+2;y++)if(!(T<0||y<0||T>=u.length||y>=u[0].length)){for(var O=0;O<u[T][y].length;O++)if(D=u[T][y][O],!(r.getOwner()!=D.getOwner()||r==D)&&!h.has(D)&&!v.has(D)){var s=Math.abs(r.getCenterX()-D.getCenterX())-(r.getWidth()/2+D.getWidth()/2),f=Math.abs(r.getCenterY()-D.getCenterY())-(r.getHeight()/2+D.getHeight()/2);s<=this.repulsionRange&&f<=this.repulsionRange&&v.add(D)}}r.surrounding=[].concat(o(v))}for(T=0;T<r.surrounding.length;T++)this.calcRepulsionForce(r,r.surrounding[T])},n.prototype.calcRepulsionRange=function(){return 0},N.exports=n}),(function(N,I,L){var o=L(1),e=L(7);function t(l,g,n){o.call(this,l,g,n),this.idealLength=e.DEFAULT_EDGE_LENGTH}t.prototype=Object.create(o.prototype);for(var i in o)t[i]=o[i];N.exports=t}),(function(N,I,L){var o=L(3);function e(i,l,g,n){o.call(this,i,l,g,n),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=[]}e.prototype=Object.create(o.prototype);for(var t in o)e[t]=o[t];e.prototype.setGridCoordinates=function(i,l,g,n){this.startX=i,this.finishX=l,this.startY=g,this.finishY=n},N.exports=e}),(function(N,I,L){function o(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}o.prototype.getWidth=function(){return this.width},o.prototype.setWidth=function(e){this.width=e},o.prototype.getHeight=function(){return this.height},o.prototype.setHeight=function(e){this.height=e},N.exports=o}),(function(N,I,L){var o=L(14);function e(){this.map={},this.keys=[]}e.prototype.put=function(t,i){var l=o.createID(t);this.contains(l)||(this.map[l]=i,this.keys.push(t))},e.prototype.contains=function(t){return o.createID(t),this.map[t]!=null},e.prototype.get=function(t){var i=o.createID(t);return this.map[i]},e.prototype.keySet=function(){return this.keys},N.exports=e}),(function(N,I,L){var o=L(14);function e(){this.set={}}e.prototype.add=function(t){var i=o.createID(t);this.contains(i)||(this.set[i]=t)},e.prototype.remove=function(t){delete this.set[o.createID(t)]},e.prototype.clear=function(){this.set={}},e.prototype.contains=function(t){return this.set[o.createID(t)]==t},e.prototype.isEmpty=function(){return this.size()===0},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAllTo=function(t){for(var i=Object.keys(this.set),l=i.length,g=0;g<l;g++)t.push(this.set[i[g]])},e.prototype.size=function(){return Object.keys(this.set).length},e.prototype.addAll=function(t){for(var i=t.length,l=0;l<i;l++){var g=t[l];this.add(g)}},N.exports=e}),(function(N,I,L){var o=(function(){function l(g,n){for(var d=0;d<n.length;d++){var r=n[d];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(g,r.key,r)}}return function(g,n,d){return n&&l(g.prototype,n),d&&l(g,d),g}})();function e(l,g){if(!(l instanceof g))throw new TypeError("Cannot call a class as a function")}var t=L(11),i=(function(){function l(g,n){e(this,l),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var d=void 0;g instanceof t?d=g.size():d=g.length,this._quicksort(g,0,d-1)}return o(l,[{key:"_quicksort",value:function(n,d,r){if(d<r){var h=this._partition(n,d,r);this._quicksort(n,d,h),this._quicksort(n,h+1,r)}}},{key:"_partition",value:function(n,d,r){for(var h=this._get(n,d),a=d,p=r;;){for(;this.compareFunction(h,this._get(n,p));)p--;for(;this.compareFunction(this._get(n,a),h);)a++;if(a<p)this._swap(n,a,p),a++,p--;else return p}}},{key:"_get",value:function(n,d){return n instanceof t?n.get_object_at(d):n[d]}},{key:"_set",value:function(n,d,r){n instanceof t?n.set_object_at(d,r):n[d]=r}},{key:"_swap",value:function(n,d,r){var h=this._get(n,d);this._set(n,d,this._get(n,r)),this._set(n,r,h)}},{key:"_defaultCompareFunction",value:function(n,d){return d>n}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n<g.length;n++){var d=g[n];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(l,d.key,d)}}return function(l,g,n){return g&&i(l.prototype,g),n&&i(l,n),l}})();function e(i,l){if(!(i instanceof l))throw new TypeError("Cannot call a class as a function")}var t=(function(){function i(l,g){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.grid[h]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[h][a]=0}this.tracebackGrid=new Array(this.iMax);for(var p=0;p<this.iMax;p++){this.tracebackGrid[p]=new Array(this.jMax);for(var v=0;v<this.jMax;v++)this.tracebackGrid[p][v]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return o(i,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var g=1;g<this.jMax;g++)this.grid[0][g]=this.grid[0][g-1]+this.gap_penalty,this.tracebackGrid[0][g]=[!1,!1,!0];for(var n=1;n<this.iMax;n++)this.grid[n][0]=this.grid[n-1][0]+this.gap_penalty,this.tracebackGrid[n][0]=[!1,!0,!1];for(var d=1;d<this.iMax;d++)for(var r=1;r<this.jMax;r++){var h=void 0;this.sequence1[d-1]===this.sequence2[r-1]?h=this.grid[d-1][r-1]+this.match_score:h=this.grid[d-1][r-1]+this.mismatch_penalty;var a=this.grid[d-1][r]+this.gap_penalty,p=this.grid[d][r-1]+this.gap_penalty,v=[h,a,p],D=this.arrayAllMaxIndexes(v);this.grid[d][r]=v[D[0]],this.tracebackGrid[d][r]=[D.includes(0),D.includes(1),D.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var g=[];for(g.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});g[0];){var n=g[0],d=this.tracebackGrid[n.pos[0]][n.pos[1]];d[0]&&g.push({pos:[n.pos[0]-1,n.pos[1]-1],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),d[1]&&g.push({pos:[n.pos[0]-1,n.pos[1]],seq1:this.sequence1[n.pos[0]-1]+n.seq1,seq2:"-"+n.seq2}),d[2]&&g.push({pos:[n.pos[0],n.pos[1]-1],seq1:"-"+n.seq1,seq2:this.sequence2[n.pos[1]-1]+n.seq2}),n.pos[0]===0&&n.pos[1]===0&&this.alignments.push({sequence1:n.seq1,sequence2:n.seq2}),g.shift()}return this.alignments}},{key:"getAllIndexes",value:function(g,n){for(var d=[],r=-1;(r=g.indexOf(n,r+1))!==-1;)d.push(r);return d}},{key:"arrayAllMaxIndexes",value:function(g){return this.getAllIndexes(g,Math.max.apply(null,g))}}]),i})();N.exports=t}),(function(N,I,L){var o=function(){};o.FDLayout=L(18),o.FDLayoutConstants=L(7),o.FDLayoutEdge=L(19),o.FDLayoutNode=L(20),o.DimensionD=L(21),o.HashMap=L(22),o.HashSet=L(23),o.IGeometry=L(8),o.IMath=L(9),o.Integer=L(10),o.Point=L(12),o.PointD=L(4),o.RandomSeed=L(16),o.RectangleD=L(13),o.Transform=L(17),o.UniqueIDGeneretor=L(14),o.Quicksort=L(24),o.LinkedList=L(11),o.LGraphObject=L(2),o.LGraph=L(5),o.LEdge=L(1),o.LGraphManager=L(6),o.LNode=L(3),o.Layout=L(15),o.LayoutConstants=L(0),o.NeedlemanWunsch=L(25),N.exports=o}),(function(N,I,L){function o(){this.listeners=[]}var e=o.prototype;e.addListener=function(t,i){this.listeners.push({event:t,callback:i})},e.removeListener=function(t,i){for(var l=this.listeners.length;l>=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;l<this.listeners.length;l++){var g=this.listeners[l];t===g.event&&g.callback(i)}},N.exports=o})])})})(Q)),Q.exports}var ct=Z.exports,z;function pt(){return z||(z=1,(function(G,b){(function(I,L){G.exports=L(ft())})(ct,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=7)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).FDLayoutConstants;function t(){}for(var i in e)t[i]=e[i];t.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,t.DEFAULT_RADIAL_SEPARATION=e.DEFAULT_EDGE_LENGTH,t.DEFAULT_COMPONENT_SEPERATION=60,t.TILE=!0,t.TILING_PADDING_VERTICAL=10,t.TILING_PADDING_HORIZONTAL=10,t.TREE_REDUCTION_ON_INCREMENTAL=!1,I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutEdge;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraph;function t(l,g,n){e.call(this,l,g,n)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).LGraphManager;function t(l){e.call(this,l)}t.prototype=Object.create(e.prototype);for(var i in e)t[i]=e[i];I.exports=t}),(function(I,L,o){var e=o(0).FDLayoutNode,t=o(0).IMath;function i(g,n,d,r){e.call(this,g,n,d,r)}i.prototype=Object.create(e.prototype);for(var l in e)i[l]=e[l];i.prototype.move=function(){var g=this.graphManager.getLayout();this.displacementX=g.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=g.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h<d.length;h++)r=d[h],r.getChild()==null?(r.moveBy(g,n),r.displacementX+=g,r.displacementY+=n):r.propogateDisplacementToChildren(g,n)},i.prototype.setPred1=function(g){this.pred1=g},i.prototype.getPred1=function(){return pred1},i.prototype.getPred2=function(){return pred2},i.prototype.setNext=function(g){this.next=g},i.prototype.getNext=function(){return next},i.prototype.setProcessed=function(g){this.processed=g},i.prototype.isProcessed=function(){return processed},I.exports=i}),(function(I,L,o){var e=o(0).FDLayout,t=o(4),i=o(3),l=o(5),g=o(2),n=o(1),d=o(0).FDLayoutConstants,r=o(0).LayoutConstants,h=o(0).Point,a=o(0).PointD,p=o(0).Layout,v=o(0).Integer,D=o(0).IGeometry,u=o(0).LGraph,T=o(0).Transform;function y(){e.call(this),this.toBeTiled={}}y.prototype=Object.create(e.prototype);for(var O in e)y[O]=e[O];y.prototype.newGraphManager=function(){var s=new t(this);return this.graphManager=s,s},y.prototype.newGraph=function(s){return new i(null,this.graphManager,s)},y.prototype.newNode=function(s){return new l(this.graphManager,s)},y.prototype.newEdge=function(s){return new g(null,null,s)},y.prototype.initParameters=function(){e.prototype.initParameters.call(this,arguments),this.isSubLayout||(n.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){var s=r.DEFAULT_CREATE_BENDS_AS_NEEDED;return s&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(n.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(m){return f.has(m)});this.graphManager.setAllNodesToApplyGravitation(c)}}else{var s=this.getFlatForest();if(s.length>0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c<s.length;c++){var E=s[c].rect,A=s[c].id;f[A]={id:A,x:E.getCenterX(),y:E.getCenterY(),w:E.width,h:E.height}}return f},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var s=!1;if(d.ANIMATE==="during")this.emit("layoutstarted");else{for(;!s;)s=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var s=[],f,c=this.graphManager.getGraphs(),E=c.length,A;for(A=0;A<E;A++)f=c[A],f.updateConnected(),f.isConnected||(s=s.concat(f.getNodes()));return s},y.prototype.createBendpoints=function(){var s=[];s=s.concat(this.graphManager.getAllEdges());var f=new Set,c;for(c=0;c<s.length;c++){var E=s[c];if(!f.has(E)){var A=E.getSource(),m=E.getTarget();if(A==m)E.getBendpoints().push(new a),E.getBendpoints().push(new a),this.createDummyNodesForBendpoints(E),f.add(E);else{var C=[];if(C=C.concat(A.getEdgeListToNode(m)),C=C.concat(m.getEdgeListToNode(A)),!f.has(C[0])){if(C.length>1){var R;for(R=0;R<C.length;R++){var M=C[R];M.getBendpoints().push(new a),this.createDummyNodesForBendpoints(M)}}C.forEach(function(S){f.add(S)})}}}if(f.size==s.length)break}},y.prototype.positionNodesRadially=function(s){for(var f=new h(0,0),c=Math.ceil(Math.sqrt(s.length)),E=0,A=0,m=0,C=new a(0,0),R=0;R<s.length;R++){R%c==0&&(m=0,A=E,R!=0&&(A+=n.DEFAULT_COMPONENT_SEPERATION),E=0);var M=s[R],S=p.findCenterOfTree(M);f.x=m,f.y=A,C=y.radialLayout(M,S,f),C.y>E&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C<s.length;C++){var R=s[C];R.transform(m)}var M=new a(A.getMaxX(),A.getMaxY());return m.inverseTransformPoint(M)},y.branchRadialLayout=function(s,f,c,E,A,m){var C=(E-c+1)/2;C<0&&(C+=180);var R=(C+c)%360,M=R*D.TWO_PI/360,S=A*Math.cos(M),Y=A*Math.sin(M);s.setCenter(S,Y);var w=[];w=w.concat(s.getEdges());var x=w.length;f!=null&&x--;for(var F=0,U=w.length,P,_=s.getEdgesBetween(f);_.length>1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;c<s.length;c++){var E=s[c],A=E.getDiagonal();A>f&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A<E.length;A++){var m=E[A],C=m.getParent();this.getNodeDegreeWithChildren(m)===0&&(C.id==null||!this.getToBeTiled(C))&&c.push(m)}for(var A=0;A<c.length;A++){var m=c[A],R=m.getParent().id;typeof f[R]>"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U<f[M].length;U++){var P=f[M][U];F.remove(P),x.add(P)}}})},y.prototype.clearCompounds=function(){var s={},f={};this.performDFSOnCompounds();for(var c=0;c<this.compoundOrder.length;c++)f[this.compoundOrder[c].id]=this.compoundOrder[c],s[this.compoundOrder[c].id]=[].concat(this.compoundOrder[c].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[c].getChild()),this.compoundOrder[c].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(s,f)},y.prototype.clearZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(c){var E=s.idToDummyNode[c];f[c]=s.tileNodes(s.memberGroups[c],E.paddingLeft+E.paddingRight),E.rect.width=f[c].width,E.rect.height=f[c].height})},y.prototype.repopulateCompounds=function(){for(var s=this.compoundOrder.length-1;s>=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A<E.length;A++){var m=E[A];if(this.getNodeDegree(m)>0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;E<f.length;E++){var A=f[E];A.getSource().id!==A.getTarget().id&&(c=c+1)}return c},y.prototype.getNodeDegreeWithChildren=function(s){var f=this.getNodeDegree(s);if(s.getChild()==null)return f;for(var c=s.getChild().getNodes(),E=0;E<c.length;E++){var A=c[E];f+=this.getNodeDegreeWithChildren(A)}return f},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(s){for(var f=0;f<s.length;f++){var c=s[f];c.getChild()!=null&&this.fillCompexOrderByDFS(c.getChild().getNodes()),this.getToBeTiled(c)&&this.compoundOrder.push(c)}},y.prototype.adjustLocations=function(s,f,c,E,A){f+=E,c+=A;for(var m=f,C=0;C<s.rows.length;C++){var R=s.rows[C];f=m;for(var M=0,S=0;S<R.length;S++){var Y=R[S];Y.rect.x=f,Y.rect.y=c,f+=Y.rect.width+s.horizontalPadding,Y.rect.height>M&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height<M.rect.width*M.rect.height?1:0});for(var m=0;m<s.length;m++){var C=s[m];A.rows.length==0?this.insertNodeToRow(A,C,0,f):this.canAddHorizontal(A,C.rect.width,C.rect.height)?this.insertNodeToRow(A,C,this.getShortestRowIndex(A),f):this.insertNodeToRow(A,C,A.rows.length,f),this.shiftToLastRow(A)}return A},y.prototype.insertNodeToRow=function(s,f,c,E){var A=E;if(c==s.rows.length){var m=[];s.rows.push(m),s.rowWidth.push(A),s.rowHeight.push(0)}var C=s.rowWidth[c]+f.rect.width;s.rows[c].length>0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width<C&&(s.width=C);var R=f.rect.height;c>0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]<c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.getLongestRowIndex=function(s){for(var f=-1,c=Number.MIN_VALUE,E=0;E<s.rows.length;E++)s.rowWidth[E]>c&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]<c&&E>0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.width<f?R=(s.height+m)/f:R=(s.height+m)/s.width,R<1&&(R=1/R),C<1&&(C=1/C),C<R},y.prototype.shiftToLastRow=function(s){var f=this.getLongestRowIndex(s),c=s.rowWidth.length-1,E=s.rows[f],A=E[E.length-1],m=A.width+s.horizontalPadding;if(s.width-s.rowWidth[c]>m&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;R<E.length;R++)E[R].height>C&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]<A.height+s.verticalPadding&&(s.rowHeight[c]=A.height+s.verticalPadding);var S=s.rowHeight[f]+s.rowHeight[c];s.height+=S-M,this.shiftToLastRow(s)}},y.prototype.tilingPreLayout=function(){n.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){n.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var s=[],f=!0,c;f;){var E=this.graphManager.getAllNodes(),A=[];f=!1;for(var m=0;m<E.length;m++)c=E[m],c.getEdges().length==1&&!c.getEdges()[0].isInterGraph&&c.getChild()==null&&(A.push([c,c.getEdges()[0],c.getOwner()]),f=!0);if(f==!0){for(var C=[],R=0;R<A.length;R++)A[R][0].getEdges().length==1&&(C.push(A[R]),A[R][0].getOwner().remove(A[R][0]));s.push(C),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=s},y.prototype.growTree=function(s){for(var f=s.length,c=s[f-1],E,A=0;A<c.length;A++)E=c[A],this.findPlaceforPrunedNode(E),E[2].add(E[0]),E[2].add(E[1],E[1].source,E[1].target);s.splice(s.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(s){var f,c,E=s[0];E==s[1].source?c=s[1].target:c=s[1].source;var A=c.startX,m=c.finishX,C=c.startY,R=c.finishY,M=0,S=0,Y=0,w=0,x=[M,Y,S,w];if(C>0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m<this.grid.length-1)for(var F=C;F<=R;F++)x[1]+=this.grid[m+1][F].length+this.grid[m][F].length-1;if(R<this.grid[0].length-1)for(var F=A;F<=m;F++)x[2]+=this.grid[F][R+1].length+this.grid[F][R].length-1;if(A>0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X<x.length;X++)x[X]<U?(U=x[X],P=1,_=X):x[X]==U&&P++;if(P==3&&U==0)x[0]==0&&x[1]==0&&x[2]==0?f=1:x[0]==0&&x[1]==0&&x[3]==0?f=0:x[0]==0&&x[2]==0&&x[3]==0?f=3:x[1]==0&&x[2]==0&&x[3]==0&&(f=2);else if(P==2&&U==0){var H=Math.floor(Math.random()*2);x[0]==0&&x[1]==0?H==0?f=0:f=1:x[0]==0&&x[2]==0?H==0?f=0:f=2:x[0]==0&&x[3]==0?H==0?f=0:f=3:x[1]==0&&x[2]==0?H==0?f=1:f=2:x[1]==0&&x[3]==0?H==0?f=1:f=3:H==0?f=2:f=3}else if(P==4&&U==0){var H=Math.floor(Math.random()*4);f=H}else f=_;f==0?E.setCenter(c.getCenterX(),c.getCenterY()-c.getHeight()/2-d.DEFAULT_EDGE_LENGTH-E.getHeight()/2):f==1?E.setCenter(c.getCenterX()+c.getWidth()/2+d.DEFAULT_EDGE_LENGTH+E.getWidth()/2,c.getCenterY()):f==2?E.setCenter(c.getCenterX(),c.getCenterY()+c.getHeight()/2+d.DEFAULT_EDGE_LENGTH+E.getHeight()/2):E.setCenter(c.getCenterX()-c.getWidth()/2-d.DEFAULT_EDGE_LENGTH-E.getWidth()/2,c.getCenterY())},I.exports=y}),(function(I,L,o){var e={};e.layoutBase=o(0),e.CoSEConstants=o(1),e.CoSEEdge=o(2),e.CoSEGraph=o(3),e.CoSEGraphManager=o(4),e.CoSELayout=o(6),e.CoSENode=o(5),I.exports=e})])})})(Z)),Z.exports}var dt=k.exports,J;function vt(){return J||(J=1,(function(G,b){(function(I,L){G.exports=L(pt())})(dt,function(N){return(function(I){var L={};function o(e){if(L[e])return L[e].exports;var t=L[e]={i:e,l:!1,exports:{}};return I[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}return o.m=I,o.c=L,o.i=function(e){return e},o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=1)})([(function(I,L){I.exports=N}),(function(I,L,o){var e=o(0).layoutBase.LayoutConstants,t=o(0).layoutBase.FDLayoutConstants,i=o(0).CoSEConstants,l=o(0).CoSELayout,g=o(0).CoSENode,n=o(0).layoutBase.PointD,d=o(0).layoutBase.DimensionD,r={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function h(D,u){var T={};for(var y in D)T[y]=D[y];for(var y in u)T[y]=u[y];return T}function a(D){this.options=h(r,D),p(this.options)}var p=function(u){u.nodeRepulsion!=null&&(i.DEFAULT_REPULSION_STRENGTH=t.DEFAULT_REPULSION_STRENGTH=u.nodeRepulsion),u.idealEdgeLength!=null&&(i.DEFAULT_EDGE_LENGTH=t.DEFAULT_EDGE_LENGTH=u.idealEdgeLength),u.edgeElasticity!=null&&(i.DEFAULT_SPRING_STRENGTH=t.DEFAULT_SPRING_STRENGTH=u.edgeElasticity),u.nestingFactor!=null&&(i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=u.nestingFactor),u.gravity!=null&&(i.DEFAULT_GRAVITY_STRENGTH=t.DEFAULT_GRAVITY_STRENGTH=u.gravity),u.numIter!=null&&(i.MAX_ITERATIONS=t.MAX_ITERATIONS=u.numIter),u.gravityRange!=null&&(i.DEFAULT_GRAVITY_RANGE_FACTOR=t.DEFAULT_GRAVITY_RANGE_FACTOR=u.gravityRange),u.gravityCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.DEFAULT_COMPOUND_GRAVITY_STRENGTH=u.gravityCompound),u.gravityRangeCompound!=null&&(i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=u.gravityRangeCompound),u.initialEnergyOnIncremental!=null&&(i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.DEFAULT_COOLING_FACTOR_INCREMENTAL=u.initialEnergyOnIncremental),u.quality=="draft"?e.QUALITY=0:u.quality=="proof"?e.QUALITY=2:e.QUALITY=1,i.NODE_DIMENSIONS_INCLUDE_LABELS=t.NODE_DIMENSIONS_INCLUDE_LABELS=e.NODE_DIMENSIONS_INCLUDE_LABELS=u.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=t.DEFAULT_INCREMENTAL=e.DEFAULT_INCREMENTAL=!u.randomize,i.ANIMATE=t.ANIMATE=e.ANIMATE=u.animate,i.TILE=u.tile,i.TILING_PADDING_VERTICAL=typeof u.tilingPaddingVertical=="function"?u.tilingPaddingVertical.call():u.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof u.tilingPaddingHorizontal=="function"?u.tilingPaddingHorizontal.call():u.tilingPaddingHorizontal};a.prototype.run=function(){var D,u,T=this.options;this.idToLNode={};var y=this.layout=new l,O=this;O.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var s=y.newGraphManager();this.gm=s;var f=this.options.eles.nodes(),c=this.options.eles.edges();this.root=s.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(f),y);for(var E=0;E<c.length;E++){var A=c[E],m=this.idToLNode[A.data("source")],C=this.idToLNode[A.data("target")];if(m!==C&&m.getEdgesBetween(C).length==0){var R=s.add(y.newEdge(),m,C);R.id=A.id()}}var M=function(w,x){typeof w=="number"&&(w=x);var F=w.data("id"),U=O.idToLNode[F];return{x:U.getRect().getCenterX(),y:U.getRect().getCenterY()}},S=function Y(){for(var w=function(){T.fit&&T.cy.fit(T.eles,T.padding),D||(D=!0,O.cy.one("layoutready",T.ready),O.cy.trigger({type:"layoutready",layout:O}))},x=O.options.refresh,F,U=0;U<x&&!F;U++)F=O.stopped||O.layout.tick();if(F){y.checkLayoutSuccess()&&!y.isSubLayout&&y.doPostLayout(),y.tilingPostLayout&&y.tilingPostLayout(),y.isLayoutFinished=!0,O.options.eles.nodes().positions(M),w(),O.cy.one("layoutstop",O.options.stop),O.cy.trigger({type:"layoutstop",layout:O}),u&&cancelAnimationFrame(u),D=!1;return}var P=O.layout.getPositionsData();T.eles.nodes().positions(function(_,X){if(typeof _=="number"&&(_=X),!_.isParent()){for(var H=_.id(),W=P[H],B=_;W==null&&(W=P[B.data("parent")]||P["DummyCompound_"+B.data("parent")],P[H]=W,B=B.parent()[0],B!=null););return W!=null?{x:W.x,y:W.y}:{x:_.position("x"),y:_.position("y")}}}),w(),u=requestAnimationFrame(Y)};return y.addListener("layoutstarted",function(){O.options.animate==="during"&&(u=requestAnimationFrame(S))}),y.runLayout(),this.options.animate!=="during"&&(O.options.eles.nodes().not(":parent").layoutPositions(O,O.options,M),D=!1),this},a.prototype.getTopMostNodes=function(D){for(var u={},T=0;T<D.length;T++)u[D[T].id()]=!0;var y=D.filter(function(O,s){typeof O=="number"&&(O=s);for(var f=O.parent()[0];f!=null;){if(u[f.id()])return!1;f=f.parent()[0]}return!0});return y},a.prototype.processChildrenList=function(D,u,T){for(var y=u.length,O=0;O<y;O++){var s=u[O],f=s.children(),c,E=s.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(s.outerWidth()!=null&&s.outerHeight()!=null?c=D.add(new g(T.graphManager,new n(s.position("x")-E.w/2,s.position("y")-E.h/2),new d(parseFloat(E.w),parseFloat(E.h)))):c=D.add(new g(this.graphManager)),c.id=s.data("id"),c.paddingLeft=parseInt(s.css("padding")),c.paddingTop=parseInt(s.css("padding")),c.paddingRight=parseInt(s.css("padding")),c.paddingBottom=parseInt(s.css("padding")),this.options.nodeDimensionsIncludeLabels&&s.isParent()){var A=s.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=s.boundingBox({includeLabels:!0,includeNodes:!1}).h,C=s.css("text-halign");c.labelWidth=A,c.labelHeight=m,c.labelPos=C}if(this.idToLNode[s.data("id")]=c,isNaN(c.rect.x)&&(c.rect.x=0),isNaN(c.rect.y)&&(c.rect.y=0),f!=null&&f.length>0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(k)),k.exports}var yt=vt();const Et=gt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=lt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),It=Lt;export{It as render};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import{p as xt}from"./chunk-JWPE2WC7-Bp1ws-G7.js";import{_ as i,s as gt,g as $t,o as bt,n as wt,a as Ct,b as vt,l as O,D as Dt,e as kt,p as At,A as U,y as Q,B as Tt,E as ot}from"./mermaid.core-BEwF5fZo.js";import{p as Bt}from"./cynefin-VYW2F7L2-Co86WDlY.js";import"./index-DbD-bwdm.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";var rt=i(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=i(()=>H.domains,"getDomains"),Mt=i(()=>H.transitions,"getTransitions"),zt=i(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=i(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(O.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Nt=i(()=>U({...Tt.cynefin,...Q().cynefin}),"getConfig"),Pt=i(()=>{At(),H=rt()},"clear"),Y={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Nt,clear:Pt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},It=i(t=>{xt(t,Y),Y.setDomains(t.domains),Y.setTransitions(t.transitions)},"populate"),Wt={parse:i(async t=>{const e=await Bt("cynefin",t);O.debug(e),It(e)},"parse")};function V(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}i(V,"seededRandom");function it(t){let e=0;for(let n=0;n<t.length;n++){const a=t.charCodeAt(n);e=(e<<5)-e+a,e|=0}return e}i(it,"hashString");function st(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:it(e)}i(st,"resolveSeed");function ct(t,e,n,a){const c=t/2,m=a??t*.015,v=7,W=e/v,d=[];for(let o=0;o<=v;o++){const p=V(n+o*17)*m*2-m;d.push({x:c+p,y:o*W})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],s=d[o+1],f=(p.y+s.y)/2,b=o%2===0?1:-1,h=m*1.5*b*V(n+o*31+7),R=p.x+h,_=f,E=s.x-h;D+=` C${R},${_} ${E},${f} ${s.x},${s.y}`}return D}i(ct,"generateFoldPath");function lt(t,e,n,a){const c=e/2,m=a??e*.015,v=7,W=t/v,d=[];for(let o=0;o<=v;o++){const p=V(n+o*23)*m*2-m;d.push({x:o*W,y:c+p})}let D=`M${d[0].x},${d[0].y}`;for(let o=0;o<d.length-1;o++){const p=d[o],s=d[o+1],f=(p.x+s.x)/2,b=o%2===0?1:-1,h=m*1.5*b*V(n+o*37+11),R=f,_=p.y+h,E=f,z=s.y-h;D+=` C${R},${_} ${E},${z} ${s.x},${s.y}`}return D}i(lt,"generateHorizontalBoundary");function dt(t,e){const n=t/2,a=e*.5,c=e,m=t*.03;return[`M${n},${a}`,`C${n+m},${a+(c-a)*.2}`,`${n-m*1.5},${a+(c-a)*.55}`,`${n+m*.5},${a+(c-a)*.75}`,`C${n-m},${a+(c-a)*.85}`,`${n+m*.3},${a+(c-a)*.95}`,`${n},${c}`].join(" ")}i(dt,"generateCliffPath");function ft(t,e,n,a){return[`M${t-n},${e}`,`A${n},${a} 0 1,1 ${t+n},${e}`,`A${n},${a} 0 1,1 ${t-n},${e}`,"Z"].join(" ")}i(ft,"generateConfusionPath");var at={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},Rt=i((t,e)=>{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),_t=i(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Et=i((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),W=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=_t();O.debug("Rendering Cynefin diagram");const s=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,_=s+b*2,E=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=Dt(e);kt(k,E,_,o.useMaxWidth??!0),k.attr("viewBox",`0 0 ${_} ${E}`),d&&k.append("title").text(d),D&&k.append("desc").text(D);const A=k.append("g").attr("transform",`translate(${b}, ${b})`),F=Rt(s,f),Z=st(o.seed,e),mt=A.append("g").attr("class","cynefin-backgrounds"),X=["complex","complicated","chaotic","clear"];for(const l of X){const r=F[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=A.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(s,f,Z,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(s,f,Z+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(s,f)).attr("fill","none");const pt=s*.15,yt=f*.15;A.append("path").attr("class","cynefinConfusion").attr("d",ft(s/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=A.append("g").attr("class","cynefin-labels");for(const l of X){const r=F[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",s/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=A.append("g").attr("class","cynefin-subtitles");for(const r of X){const u=F[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",s/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=A.append("g").attr("class","cynefin-items"),T=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=F[l],y=l==="confusion";let L=r.items,N=0;y&&r.items.length>q&&(N=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(T+4),M=K.append("g"),P=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=P.node();if(x&&typeof x.getBBox=="function"){const G=x.getBBox();G.width>0&&($=G.width)}const C=$+tt*2,I=u.cx-C/2;M.attr("transform",`translate(${I}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),P.attr("x",C/2).attr("y",T/2)}),N>0){const g=B+L.length*(T+4),S=`+${N} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",T/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let P=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const I=$.getBBox();I.width>0&&(P=I.width)}const x=P+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",T).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",T/2)}}if(v.length>0){const l=k.select("defs").empty()?k.append("defs"):k.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const u=A.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=F[y.from],N=F[y.to];if(!L||!N)return;if(y.from===y.to){O.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=N.cx,w=N.cy,M=(B+S)/2,P=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),I=C*.15,G=-x/C,ht=$/C,et=M+G*I,nt=P+ht*I;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}W&&A.append("text").attr("class","cynefinTitle").attr("x",s/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W)},"draw"),Ft={draw:Et},Vt=i(()=>{const t=ot(),e=Q();return U(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=i(()=>{const t=Vt();return`
|
|
2
|
-
.cynefinDomain {
|
|
3
|
-
stroke: none;
|
|
4
|
-
}
|
|
5
|
-
.cynefinDomainLabel {
|
|
6
|
-
font-size: ${t.domainFontSize}px;
|
|
7
|
-
font-weight: bold;
|
|
8
|
-
fill: ${t.labelColor};
|
|
9
|
-
}
|
|
10
|
-
.cynefinSubtitle {
|
|
11
|
-
font-size: ${t.itemFontSize-1}px;
|
|
12
|
-
fill: ${t.textColor};
|
|
13
|
-
font-style: italic;
|
|
14
|
-
}
|
|
15
|
-
.cynefinItem {
|
|
16
|
-
fill-opacity: 0.95;
|
|
17
|
-
stroke: ${t.boundaryColor};
|
|
18
|
-
stroke-width: 1;
|
|
19
|
-
}
|
|
20
|
-
.cynefinItemText {
|
|
21
|
-
font-size: ${t.itemFontSize}px;
|
|
22
|
-
fill: ${t.textColor};
|
|
23
|
-
}
|
|
24
|
-
.cynefinItemOverflow {
|
|
25
|
-
fill-opacity: 0.6;
|
|
26
|
-
stroke: ${t.boundaryColor};
|
|
27
|
-
stroke-width: 1;
|
|
28
|
-
stroke-dasharray: 3 2;
|
|
29
|
-
}
|
|
30
|
-
.cynefinBoundary {
|
|
31
|
-
stroke: ${t.boundaryColor};
|
|
32
|
-
stroke-width: ${t.boundaryWidth};
|
|
33
|
-
stroke-dasharray: 6 3;
|
|
34
|
-
}
|
|
35
|
-
.cynefinCliff {
|
|
36
|
-
stroke: ${t.cliffColor};
|
|
37
|
-
stroke-width: ${t.cliffWidth};
|
|
38
|
-
}
|
|
39
|
-
.cynefinConfusion {
|
|
40
|
-
stroke: ${t.boundaryColor};
|
|
41
|
-
stroke-width: 1.5;
|
|
42
|
-
stroke-dasharray: 4 2;
|
|
43
|
-
}
|
|
44
|
-
.cynefinArrowLine {
|
|
45
|
-
stroke: ${t.arrowColor};
|
|
46
|
-
stroke-width: ${t.arrowWidth};
|
|
47
|
-
fill: none;
|
|
48
|
-
}
|
|
49
|
-
.cynefinArrowHead {
|
|
50
|
-
fill: ${t.arrowColor};
|
|
51
|
-
stroke: none;
|
|
52
|
-
}
|
|
53
|
-
.cynefinArrowLabel {
|
|
54
|
-
font-size: ${t.itemFontSize-1}px;
|
|
55
|
-
fill: ${t.textColor};
|
|
56
|
-
}
|
|
57
|
-
.cynefinTitle {
|
|
58
|
-
font-size: ${t.domainFontSize+2}px;
|
|
59
|
-
font-weight: bold;
|
|
60
|
-
fill: ${t.labelColor};
|
|
61
|
-
}
|
|
62
|
-
`},"styles"),Gt=Ht,Qt={parser:Wt,db:Y,renderer:Ft,styles:Gt};export{Qt as diagram};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import{p as ge}from"./chunk-JWPE2WC7-Bp1ws-G7.js";import{_ as w,E as ye,y as ae,A as ee,D as Se,e as ve,l as te,be as B,d as U,b as xe,a as be,n as we,o as Ce,g as Te,s as Le,B as $e,bf as Ae,p as Fe}from"./mermaid.core-BEwF5fZo.js";import{s as Ne}from"./chunk-VR4S4FIN-BkMRGbPv.js";import{p as Me}from"./cynefin-VYW2F7L2-Co86WDlY.js";import{b as O}from"./defaultLocale-C4B-KCzX.js";import{o as Q}from"./ordinal-Cboi1Yqb.js";import"./index-DbD-bwdm.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";import"./init-Gi6I4Gst.js";function _e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function ke(){return this.eachAfter(_e)}function ze(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Ve(t,a){for(var l=this,n=[l],r,i,h=-1;l=n.pop();)if(t.call(a,l,++h,this),r=l.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function De(t,a){for(var l=this,n=[l],r=[],i,h,d,g=-1;l=n.pop();)if(r.push(l),i=l.children)for(h=0,d=i.length;h<d;++h)n.push(i[h]);for(;l=r.pop();)t.call(a,l,++g,this);return this}function Pe(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function Be(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function Ee(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function Re(t){for(var a=this,l=We(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function We(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function He(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Ie(){return Array.from(this)}function Oe(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ge(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*qe(){var t=this,a,l=[t],n,r,i;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)l.push(n[r]);while(l.length)}function ne(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=je)):a===void 0&&(a=Ye);for(var l=new Z(t),n,r=[l],i,h,d,g;n=r.pop();)if((h=a(n.data))&&(g=(h=Array.from(h)).length))for(n.children=h,d=g-1;d>=0;--d)r.push(i=h[d]=new Z(h[d])),i.parent=n,i.depth=n.depth+1;return l.eachBefore(Ze)}function Xe(){return ne(this).eachBefore(Ue)}function Ye(t){return t.children}function je(t){return Array.isArray(t)?t[1]:null}function Ue(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ze(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Z(t){this.data=t,this.depth=this.height=0,this.parent=null}Z.prototype=ne.prototype={constructor:Z,count:ke,each:ze,eachAfter:De,eachBefore:Ve,find:Pe,sum:Be,sort:Ee,path:Re,ancestors:He,descendants:Ie,leaves:Oe,links:Ge,copy:Xe,[Symbol.iterator]:qe};function Je(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function q(t){return function(){return t}}function Ke(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Qe(t,a,l,n,r){for(var i=t.children,h,d=-1,g=i.length,c=t.value&&(n-a)/t.value;++d<g;)h=i[d],h.y0=l,h.y1=r,h.x0=a,h.x1=a+=h.value*c}function et(t,a,l,n,r){for(var i=t.children,h,d=-1,g=i.length,c=t.value&&(r-l)/t.value;++d<g;)h=i[d],h.x0=a,h.x1=n,h.y0=l,h.y1=l+=h.value*c}var tt=(1+Math.sqrt(5))/2;function at(t,a,l,n,r,i){for(var h=[],d=a.children,g,c,p=0,b=0,s=d.length,x,S,v=a.value,u,y,N,$,V,W,M;p<s;){x=r-l,S=i-n;do u=d[b++].value;while(!u&&b<s);for(y=N=u,W=Math.max(S/x,x/S)/(v*t),M=u*u*W,V=Math.max(N/M,M/y);b<s;++b){if(u+=c=d[b].value,c<y&&(y=c),c>N&&(N=c),M=u*u*W,$=Math.max(N/M,M/y),$>V){u-=c;break}V=$}h.push(g={value:u,dice:x<S,children:d.slice(p,b)}),g.dice?Qe(g,l,n,r,v?n+=S*u/v:i):et(g,l,n,v?l+=x*u/v:r,i),v-=u,p=b}return h}const nt=(function t(a){function l(n,r,i,h,d){at(a,n,r,i,h,d)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(tt);function lt(){var t=nt,a=!1,l=1,n=1,r=[0],i=G,h=G,d=G,g=G,c=G;function p(s){return s.x0=s.y0=0,s.x1=l,s.y1=n,s.eachBefore(b),r=[0],a&&s.eachBefore(Ke),s}function b(s){var x=r[s.depth],S=s.x0+x,v=s.y0+x,u=s.x1-x,y=s.y1-x;u<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),s.x0=S,s.y0=v,s.x1=u,s.y1=y,s.children&&(x=r[s.depth+1]=i(s)/2,S+=c(s)-x,v+=h(s)-x,u-=d(s)-x,y-=g(s)-x,u<S&&(S=u=(S+u)/2),y<v&&(v=y=(v+y)/2),t(s,S,v,u,y))}return p.round=function(s){return arguments.length?(a=!!s,p):a},p.size=function(s){return arguments.length?(l=+s[0],n=+s[1],p):[l,n]},p.tile=function(s){return arguments.length?(t=Je(s),p):t},p.padding=function(s){return arguments.length?p.paddingInner(s).paddingOuter(s):p.paddingInner()},p.paddingInner=function(s){return arguments.length?(i=typeof s=="function"?s:q(+s),p):i},p.paddingOuter=function(s){return arguments.length?p.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):p.paddingTop()},p.paddingTop=function(s){return arguments.length?(h=typeof s=="function"?s:q(+s),p):h},p.paddingRight=function(s){return arguments.length?(d=typeof s=="function"?s:q(+s),p):d},p.paddingBottom=function(s){return arguments.length?(g=typeof s=="function"?s:q(+s),p):g},p.paddingLeft=function(s){return arguments.length?(c=typeof s=="function"?s:q(+s),p):c},p}var R,oe=(R=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=xe,this.getAccTitle=be,this.setDiagramTitle=we,this.getDiagramTitle=Ce,this.getAccDescription=Te,this.setAccDescription=Le}getNodes(){return this.nodes}getConfig(){const a=$e,l=ae();return ee({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(i=>{Ae(i)&&(n?.textStyles?n.textStyles.push(i):n.textStyles=[i]),n?.styles?n.styles.push(i):n.styles=[i]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){Fe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(R,"TreeMapDB"),R);function ce(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n?.classSelector,n?.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const i=l[l.length-1].node;i.children?i.children.push(r):i.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}w(ce,"buildHierarchy");var rt=w((t,a)=>{ge(t,a);const l=[];for(const i of t.TreemapRows??[])i.$type==="ClassDefStatement"&&a.addClass(i.className??"",i.styleText??"");for(const i of t.TreemapRows??[]){const h=i.item;if(!h)continue;const d=i.indent?parseInt(i.indent):0,g=st(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],p=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:p};l.push(b)}const n=ce(l),r=w((i,h)=>{for(const d of i)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(n,0)},"populate"),st=w(t=>t.name?String(t.name):"","getItemName"),he={parser:{yy:void 0},parse:w(async t=>{try{const l=await Me("treemap",t);te.debug("Treemap AST:",l);const n=he.parser?.yy;if(!(n instanceof oe))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");rt(l,n)}catch(a){throw te.error("Error parsing treemap:",a),a}},"parse")},it=10,E=10,X=25,ot=w((t,a,l,n)=>{const r=n.db,i=r.getConfig(),h=i.padding??it,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=ae();if(!g)return;const p=d?30:0,b=Se(a),s=i.nodeWidth?i.nodeWidth*E:960,x=i.nodeHeight?i.nodeHeight*E:500,S=s,v=x+p;b.attr("viewBox",`0 0 ${S} ${v}`),ve(b,v,S,i.useMaxWidth);let u;try{const e=i.valueFormat||",";if(e==="$0,0")u=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";u=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);u=w(f=>"$"+O(o||"")(f),"valueFormat")}else u=O(e)}catch(e){te.error("Error creating format function:",e),u=O(",")}const y=Q().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=Q().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),$=Q().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const V=b.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),W=ne(g).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),le=lt().size([s,x]).paddingTop(e=>e.children&&e.children.length>0?X+E:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?E:0).paddingRight(e=>e.children&&e.children.length>0?E:0).paddingBottom(e=>e.children&&e.children.length>0?E:0).round(!0)(W),de=le.descendants().filter(e=>e.children&&e.children.length>0),H=V.selectAll(".treemapSection").data(de).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),H.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>y(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>N(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=B({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),H.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,o)=>`url(#clip-section-${a}-${o})`).attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=U(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,L=6;let T;i.showValues!==!1&&e.value?T=C-10-30-10-L:T=C-L-6;const m=Math.max(15,T),_=o.node();if(_.getComputedTextLength()>m){let z=f;for(;z.length>0;){if(z=f.substring(0,z.length-1),z.length===0){o.text("..."),_.getComputedTextLength()>m&&o.text("");break}if(o.text(z+"..."),_.getComputedTextLength()<=m)break}}}),i.showValues!==!1&&H.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?u(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+$(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const re=le.leaves(),A=re.length>20,pe=A?16:38,Y=A?14:28,D=A?4:8,I=A?4:6,J=A?2:4,se=A?8:10,K=A?1:2,j=V.selectAll(".treemapLeafGroup").data(re).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);j.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("style",e=>B({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o=`text-anchor: middle; dominant-baseline: middle; font-size: ${pe}px;fill:`+$(e.data.name)+";",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=U(this),f=e.x1-e.x0,C=e.y1-e.y0,L=o.node(),T=f-2*J,P=C-2*J;if(T<se||P<se){o.style("display","none");return}let m=parseInt(o.style("font-size"),10);const _=.6;for(;L.getComputedTextLength()>T&&m>D;)m--,o.style("font-size",`${m}px`);let F=Math.max(I,Math.min(Y,Math.round(m*_))),k=m+K+F;for(;k>P&&m>D&&(m--,F=Math.max(I,Math.min(Y,Math.round(m*_))),!(F<I&&m===D));)o.style("font-size",`${m}px`),k=m+K+F;o.style("font-size",`${m}px`),A?(m<D||P<D)&&o.style("display","none"):(L.getComputedTextLength()>T||m<D||P<m)&&o.style("display","none")}),i.showValues!==!1&&j.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${Y}px;fill:`+$(o.data.name)+";",C=B({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?u(o.value):"").each(function(o){const f=U(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=U(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const T=parseFloat(L.style("font-size")),m=Math.max(I,Math.min(Y,Math.round(T*.6)));f.style("font-size",`${m}px`);const F=(o.y1-o.y0)/2+T/2+K;f.attr("y",F);const k=o.x1-o.x0,ie=o.y1-o.y0-4,me=k-2*J;f.node().getComputedTextLength()>me||F+m>ie||m<I?f.style("display","none"):f.style("display",null)});const ue=i.diagramPadding??8;Ne(b,ue,"flowchart",i?.useMaxWidth||!1)},"draw"),ct=w(function(t,a){return a.db.getClasses()},"getClasses"),ht={draw:ot,getClasses:ct},dt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},pt=w(({treemap:t}={})=>{const a=ye(),l=ae(),n=ee(a,l.themeVariables),r=ee(dt,t),i=r.titleColor??n.titleColor,h=r.labelColor??n.textColor,d=r.valueColor??n.textColor;return`
|
|
2
|
-
.treemapNode.section {
|
|
3
|
-
stroke: ${r.sectionStrokeColor};
|
|
4
|
-
stroke-width: ${r.sectionStrokeWidth};
|
|
5
|
-
fill: ${r.sectionFillColor};
|
|
6
|
-
}
|
|
7
|
-
.treemapNode.leaf {
|
|
8
|
-
stroke: ${r.leafStrokeColor};
|
|
9
|
-
stroke-width: ${r.leafStrokeWidth};
|
|
10
|
-
fill: ${r.leafFillColor};
|
|
11
|
-
}
|
|
12
|
-
.treemapLabel {
|
|
13
|
-
fill: ${h};
|
|
14
|
-
font-size: ${r.labelFontSize};
|
|
15
|
-
}
|
|
16
|
-
.treemapValue {
|
|
17
|
-
fill: ${d};
|
|
18
|
-
font-size: ${r.valueFontSize};
|
|
19
|
-
}
|
|
20
|
-
.treemapTitle {
|
|
21
|
-
fill: ${i};
|
|
22
|
-
font-size: ${r.titleFontSize};
|
|
23
|
-
}
|
|
24
|
-
`},"getStyles"),ut=pt,Lt={parser:he,get db(){return new oe},renderer:ht,styles:ut};export{Lt as diagram};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import{p as $}from"./chunk-JWPE2WC7-Bp1ws-G7.js";import{_ as b,A as m,D as C,e as S,l as w,b as D,a as T,n as P,o as z,g as A,s as E,y as F,B as W,p as _}from"./mermaid.core-BEwF5fZo.js";import{p as N}from"./cynefin-VYW2F7L2-Co86WDlY.js";import"./index-DbD-bwdm.js";import"./react-Dh7j6h1K.js";import"./markdown-BvBsne3X.js";var L=W.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=D,this.getAccTitle=T,this.setDiagramTitle=P,this.getDiagramTitle=z,this.getAccDescription=A,this.setAccDescription=E}getConfig(){const t=m({...L,...F().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){_(),this.packet=[]}},b(u,"PacketDB"),u),M=1e4,Y=b((e,t)=>{$(e,t);let r=-1,o=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??=a+(d??1)-1,d??=i-a+1,r=i,w.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&t.getPacket().length<M;){const[p,s]=I({start:a,end:i,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(t.pushWord(o),o=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}t.pushWord(o)},"populate"),I=b((e,t,r)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];const o=t*r-1,n=t*r;return[{start:e.start,end:o,label:e.label,bits:o-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{const t=await N("packet",e),r=x.parser?.yy;if(!(r instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,r)},"parse")},O=b((e,t,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=C(t);f.attr("viewBox",`0 0 ${k} ${g}`),S(f,g,k,l.useMaxWidth);for(const[y,B]of p.entries())j(f,B,y,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),j=b((e,t,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=r*(o+l)+l;for(const s of t){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),G={draw:O},H={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},K=b(({packet:e}={})=>{const t=m(H,e);return`
|
|
2
|
-
.packetByte {
|
|
3
|
-
font-size: ${t.byteFontSize};
|
|
4
|
-
}
|
|
5
|
-
.packetByte.start {
|
|
6
|
-
fill: ${t.startByteColor};
|
|
7
|
-
}
|
|
8
|
-
.packetByte.end {
|
|
9
|
-
fill: ${t.endByteColor};
|
|
10
|
-
}
|
|
11
|
-
.packetLabel {
|
|
12
|
-
fill: ${t.labelColor};
|
|
13
|
-
font-size: ${t.labelFontSize};
|
|
14
|
-
}
|
|
15
|
-
.packetTitle {
|
|
16
|
-
fill: ${t.titleColor};
|
|
17
|
-
font-size: ${t.titleFontSize};
|
|
18
|
-
}
|
|
19
|
-
.packetBlock {
|
|
20
|
-
stroke: ${t.blockStrokeColor};
|
|
21
|
-
stroke-width: ${t.blockStrokeWidth};
|
|
22
|
-
fill: ${t.blockFillColor};
|
|
23
|
-
}
|
|
24
|
-
`},"styles"),V={parser:x,get db(){return new v},renderer:G,styles:K};export{V as diagram};
|