@inkeep/open-knowledge 0.59.0-beta.20 → 0.59.0-beta.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/THIRD_PARTY_NOTICES.md +18 -33
- package/dist/{abnfDiagram-VRR7QNED-DWDzSKGM.mjs → abnfDiagram-N423BO3Z-rpBLTRy7.mjs} +2 -2
- package/dist/{acp-harness-probe-D3XBCJlW.mjs → acp-harness-probe-Bgso7Pvd.mjs} +2 -2
- package/dist/architectureDiagram-T3A2C74G-CobZ7Nas.mjs +37 -0
- package/dist/{blockDiagram-677ZJIJ3-yJugV29e.mjs → blockDiagram-VBNYF7ZC-B2b-9Uy4.mjs} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-BFQQLctA.mjs → c4Diagram-5PPSVZJV-oGAjge-G.mjs} +2 -2
- package/dist/channel-D8IoLbTI.mjs +2 -0
- package/dist/{chunk-32BRIVSS-Dwq69mnI.mjs → chunk-2GRJ4B5K-DEpij-4x.mjs} +2 -2
- package/dist/{chunk-2Q5K7J3B-Ck8oGqYt.mjs → chunk-2Q5K7J3B-K16ZnEab.mjs} +1 -1
- package/dist/{chunk-VAUOI2AC-BdotBBDE.mjs → chunk-3NCLNEKW-dcnuWY86.mjs} +2 -2
- package/dist/{chunk-HOUHSVGY-C3h3PdhC.mjs → chunk-4I5QYGJK-CSy7A-Z6.mjs} +2 -2
- package/dist/{chunk-EX3LRPZG-Chp9b-Lc.mjs → chunk-5RXB4S5H-G5uRZgMC.mjs} +2 -2
- package/dist/{chunk-MOJQB5TN-CUt4IiNv.mjs → chunk-6Q2QTUOP-B1_rYnQp.mjs} +2 -2
- package/dist/{chunk-52WLFC77-Cn-qt8h-.mjs → chunk-7Z6QIM7H-Suxz0C8L.mjs} +2 -2
- package/dist/{chunk-V7JOEXUC-DNM56rwe.mjs → chunk-GF5L2VYU-yTg0tkqH.mjs} +2 -2
- package/dist/chunk-I66GZJ75-BV5ia-Eb.mjs +130 -0
- package/dist/{chunk-FWX5IMBZ-Cn1xNcn5.mjs → chunk-J7OUQ5F2-Cfi6O8HG.mjs} +2 -2
- package/dist/{chunk-PUDLZKDR-CIWYIjrF.mjs → chunk-JQJVKLGR-CNWh3cm8.mjs} +2 -2
- package/dist/{chunk-VR4S4FIN-RUJ5PgRH.mjs → chunk-KBJHAD2P-5ksfSW4Q.mjs} +2 -2
- package/dist/{chunk-ICXQ74PX-DbJy3VdO.mjs → chunk-NSK5VX7P-qnGKQj-e.mjs} +2 -2
- package/dist/{chunk-ZGVPDNZ5-CyyHBEs2.mjs → chunk-QR6OTTB3-SN1XbgjU.mjs} +2 -2
- package/dist/{chunk-OGEWGWER-DgPAesMA.mjs → chunk-UBXNYLIW-hzDuXXAx.mjs} +2 -2
- package/dist/{chunk-C7G6YPKG-BAX_SClW.mjs → chunk-W5SLKNZC-0jhR-Emb.mjs} +2 -2
- package/dist/{chunk-Q4XR5HBZ-jWirJQsj.mjs → chunk-WRU74C26-Bfn8sWKa.mjs} +2 -2
- package/dist/classDiagram-JCYQIIEL-CJoHgiPx.mjs +2 -0
- package/dist/classDiagram-v2-OCEON4UE-C7HeNbE4.mjs +2 -0
- package/dist/cli.mjs +6 -6
- package/dist/constants-s6Yz_7lg.mjs +2 -0
- package/dist/{cynefinDiagram-TSTJHNR4-CoESbhp4.mjs → cynefinDiagram-MW4NZA55-CorswfNK.mjs} +2 -2
- package/dist/{dagre-VKFMJZFB-BhCtWAkc.mjs → dagre-VZM6K2ZE-BsBwX_Jg.mjs} +2 -2
- package/dist/{diagram-OA4YK3LP-BXU-URV1.mjs → diagram-7IWD3JNH-B3X27Exz.mjs} +2 -2
- package/dist/{diagram-FQU43EPY-BdshpOzp.mjs → diagram-B4RE2ZJO-B6VZTSR6.mjs} +2 -2
- package/dist/{diagram-NH7WQ7WH-DnzwFaQq.mjs → diagram-LBJQPF4R-Cv5aMJ5M.mjs} +2 -2
- package/dist/{diagram-G47NLZAW-Lw1fB9_w.mjs → diagram-Q27KOJAE-D5dKzTjh.mjs} +2 -2
- package/dist/diagram-UB23O5K3-C671C2FF.mjs +42 -0
- package/dist/{ebnfDiagram-CCIWWBDH-D-647A1u.mjs → ebnfDiagram-BXEA7PRR-CE_UghJr.mjs} +2 -2
- package/dist/{erDiagram-Q63AITRT-DviwoNdm.mjs → erDiagram-JOGREHBK-C6HxEEwb.mjs} +2 -2
- package/dist/flowDiagram-UKHOOZJN-DxdkbTeJ.mjs +1 -0
- package/dist/{fs-traced-Dy67FR5_.mjs → fs-traced-DSlN63Do.mjs} +6 -6
- package/dist/fs-traced-saP6jRI7.mjs +1 -0
- package/dist/{ganttDiagram-NO4QXBWP-DnN5cTGV.mjs → ganttDiagram-PKOTCBZU-etwWau35.mjs} +2 -2
- package/dist/{git-handle-CNwCRo87.mjs → git-handle-C3YVH8wf.mjs} +2 -2
- package/dist/git-handle-OL1c3Yx1.mjs +1 -0
- package/dist/{gitGraphDiagram-IHSO6WYX-Bs2N855t.mjs → gitGraphDiagram-DS77QQ5N-BqTXri7q.mjs} +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{infoDiagram-FWYZ7A6U-CD5T72Pd.mjs → infoDiagram-6WML65LV-BHgpwoUI.mjs} +2 -2
- package/dist/init-Bjg5ECtp.mjs +1 -0
- package/dist/{init-7CTnd_9x.mjs → init-Lpsf1oe9.mjs} +3 -3
- package/dist/{ishikawaDiagram-FXEZZL3T-CzHEtbdq.mjs → ishikawaDiagram-WSZJBQD7-Cs4x-D4y.mjs} +2 -2
- package/dist/{journeyDiagram-5HDEW3XC-BywkQV2b.mjs → journeyDiagram-NVQOT4AX-CE-UAY5w.mjs} +2 -2
- package/dist/{kanban-definition-HUTT4EX6-DIgH0tMg.mjs → kanban-definition-27J2QSJJ-BC66R6NI.mjs} +2 -2
- package/dist/{launch-json-removal-Csrv47E2.mjs → launch-json-removal-CBJ4gPyr.mjs} +2 -2
- package/dist/{line-eTDW_zUy.mjs → line-qj20QtEb.mjs} +2 -2
- package/dist/loader-D8cCsGJK.mjs +1 -0
- package/dist/{loader-DWgAKgRN.mjs → loader-QzOT86WA.mjs} +2 -2
- package/dist/{logger-DFxEUjvj.mjs → logger-DN7vnxKW.mjs} +11 -11
- package/dist/md-manager-BQDUfoJR.mjs +2 -0
- package/dist/{mermaid.core-BgpKViY0.mjs → mermaid.core-Csr-0p0z.mjs} +5 -5
- package/dist/{mindmap-definition-LN4V7U3C-H3p7uT-G.mjs → mindmap-definition-FAOFIHXS-D2qXFYVZ.mjs} +2 -2
- package/dist/native/native-config.win32-arm64-msvc.node +0 -0
- package/dist/native/native-config.win32-x64-msvc.node +0 -0
- package/dist/{open-browser-NqfFJFxa.mjs → open-browser-tKHegdcu.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{pegDiagram-2B236MQR-PBU61CXk.mjs → pegDiagram-VL7TDLO6-CmI3EJFd.mjs} +2 -2
- package/dist/{pieDiagram-ENE6RG2P-ClZWrO6e.mjs → pieDiagram-7S7Q4E2Y-Bz899UGw.mjs} +2 -2
- package/dist/preview-BKt1tWBO.mjs +1 -0
- package/dist/{preview-Byh_oZ6p.mjs → preview-y3I5-ebf.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-B1pQ8Fr1.js → ActivityModeContent-R_dmIigR.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-DcYw43Zi.js → AgentDiffPane-CKrn8BVy.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-B84l9uZw.js → AgentThreadClientBinder-OHyIQFAh.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-Cw-cqnG9.js → CodeMirrorPropInput-D1r3QM0G.js} +1 -1
- package/dist/public/assets/{DocumentContext-DuId1ipA.js → DocumentContext-C5MsfaP5.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-d6K3kH0G.js → EditorModeToggle-Ddy-IvrL.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-_BecfoEt.js → EnableSyncConfirmDialog-IylT5Chq.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-C_J7SZoj.js → ExcalidrawDocEditor-jKmW6ZpC.js} +4 -4
- package/dist/public/assets/FeedbackForm-IbvFVm41.js +1 -0
- package/dist/public/assets/{GraphPanel-Dw4fPl4b.js → GraphPanel-KbHSOrUO.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-CTy28SPr.js → ImportSkillDialog-D5o-y_4o.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-De4dE4SA.js → LintConfigEditor-B9ZjSAvs.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-BwKiutDp.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-Cjn8Ah2m.js → ManagedArtifactProperties-DCJD5dTU.js} +1 -1
- package/dist/public/assets/{Mermaid-CHnWO5AG.js → Mermaid-CdO1UccA.js} +2 -2
- package/dist/public/assets/{MermaidDocEditor-D9FyG6Kw.js → MermaidDocEditor-5rQ6OSt_.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-B9AaOerd.js → PropertyDisplayRow-CweI9pEt.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-DW4o2BT_.js → ReportBugDialogBody-DigGiWz5.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-Cd1K2DoP.js → SchemaConfigEditor-hDG4uRnA.js} +1 -1
- package/dist/public/assets/{SessionsHost-CJWBpA8P.js → SessionsHost-32-a7YcQ.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-DpIUx5V_.js → SettingsDialogBody-DERO_t6B.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-D1AH4Y6y.js → ShareBranchSwitchDialog-DUrqRuql.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-CbKDTc_q.js → ShareReceiveDialog-lX22w_QI.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-D1E5sCM9.js → ShareReceiveMissDialog-Bz512M_x.js} +1 -1
- package/dist/public/assets/{SkillCostValue-CNgPJgJP.js → SkillCostValue-k7wEtjay.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-DlmybH22.js → SkillEditBanner-o5725NzG.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-2eNo1Z7l.js → SkillInstallMenu-BlJ3yvrO.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-C7edbNlp.js → SkillOriginInline-JljLGeIa.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-C3JaFbGd.js → SkillToolbarControls-DYN8E0kP.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-BjCNikZH.js → SlidesToolbarControls-BK-dnRBl.js} +1 -1
- package/dist/public/assets/{SourceEditor-ok4GSPD_.js → SourceEditor-s-NNzmGg.js} +1 -1
- package/dist/public/assets/{TerminalPanel-11TArWI4.js → TerminalPanel-DrouQ5dE.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-xZbxnWtH.js → TerminalWindowApp-BbegoebH.js} +1 -1
- package/dist/public/assets/{TextDocEditor-CIIcTz5P.js → TextDocEditor-Dhh_sT7w.js} +1 -1
- package/dist/public/assets/{ThreadView-COqnnOm_.js → ThreadView-86daAyd0.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-B8aGyddp.js → TimelineDiffPane-CyCayRTE.js} +1 -1
- package/dist/public/assets/{abnfDiagram-VRR7QNED-CC-3oNGg.js → abnfDiagram-N423BO3Z-BVBLC1gQ.js} +1 -1
- package/dist/public/assets/{agent-diff-store-BLYDBu2n.js → agent-diff-store-CDbH2OKK.js} +1 -1
- package/dist/public/assets/architectureDiagram-T3A2C74G-61vRYNAe.js +36 -0
- package/dist/public/assets/{auth-state-cache-CrXUa3P0.js → auth-state-cache-C9Xsquif.js} +1 -1
- package/dist/public/assets/{blockDiagram-677ZJIJ3-DDmTWkY7.js → blockDiagram-VBNYF7ZC-CixK5rlm.js} +1 -1
- package/dist/public/assets/{c4Diagram-LMCZKHZV-CipXxfyN.js → c4Diagram-5PPSVZJV-DILzjHho.js} +1 -1
- package/dist/public/assets/channel-DqjYjtB_.js +1 -0
- package/dist/public/assets/{chunk-32BRIVSS-BGfEotqY.js → chunk-2GRJ4B5K-DkEfrxNK.js} +1 -1
- package/dist/public/assets/{chunk-VAUOI2AC-BYt4ybRk.js → chunk-3NCLNEKW-qKNiopZI.js} +1 -1
- package/dist/public/assets/{chunk-HOUHSVGY-fSFxsWEA.js → chunk-4I5QYGJK-D2VHB4_5.js} +1 -1
- package/dist/public/assets/{chunk-EX3LRPZG-mAAgmbjm.js → chunk-5RXB4S5H-B7YwCkBe.js} +1 -1
- package/dist/public/assets/{chunk-MOJQB5TN-BKB_eH6x.js → chunk-6Q2QTUOP-BP72LGnY.js} +1 -1
- package/dist/public/assets/{chunk-52WLFC77-BxWUWkZN.js → chunk-7Z6QIM7H-B56l8F1n.js} +1 -1
- package/dist/public/assets/{chunk-V7JOEXUC-Bbc5z4-F.js → chunk-GF5L2VYU-BFfyidBh.js} +1 -1
- package/dist/public/assets/chunk-I66GZJ75-BQ6MN9Gs.js +127 -0
- package/dist/public/assets/{chunk-FWX5IMBZ-B2SauNuc.js → chunk-J7OUQ5F2--OLmbKyE.js} +2 -2
- package/dist/public/assets/{chunk-PUDLZKDR-Cjq7brjA.js → chunk-JQJVKLGR-B3k5EI6Z.js} +1 -1
- package/dist/public/assets/{chunk-VR4S4FIN-V7_7sr9q.js → chunk-KBJHAD2P-DNPUMRvG.js} +1 -1
- package/dist/public/assets/{chunk-ICXQ74PX-BQe1Tadw.js → chunk-NSK5VX7P-0SuNTpf5.js} +1 -1
- package/dist/public/assets/{chunk-ZGVPDNZ5-CQ5EdC_w.js → chunk-QR6OTTB3-BKyQaVhZ.js} +1 -1
- package/dist/public/assets/{chunk-OGEWGWER-CazgdTF7.js → chunk-UBXNYLIW-DI7nR2x5.js} +1 -1
- package/dist/public/assets/{chunk-C7G6YPKG-DNj4qHp9.js → chunk-W5SLKNZC-BTOja7zZ.js} +1 -1
- package/dist/public/assets/{chunk-Q4XR5HBZ-CUaphLMo.js → chunk-WRU74C26-LsM5495h.js} +1 -1
- package/dist/public/assets/classDiagram-JCYQIIEL-Y-tspIZ_.js +1 -0
- package/dist/public/assets/classDiagram-v2-OCEON4UE-tWCOwZzL.js +1 -0
- package/dist/public/assets/{client-version-K_S_dR_T.js → client-version-cIVip4QF.js} +1 -1
- package/dist/public/assets/{comment-chips-B_3iO5uw.js → comment-chips-B1zrbqkM.js} +1 -1
- package/dist/public/assets/{config-provider-CTLH1QmT.js → config-provider-BdkFDSOU.js} +1 -1
- package/dist/public/assets/{cynefinDiagram-TSTJHNR4-Ce8QtGQX.js → cynefinDiagram-MW4NZA55-Dk8kgusm.js} +1 -1
- package/dist/public/assets/{dagre-VKFMJZFB-DIK6Rj3Y.js → dagre-VZM6K2ZE-mJYw-Dhq.js} +1 -1
- package/dist/public/assets/{diagram-OA4YK3LP-C4IrjAmJ.js → diagram-7IWD3JNH-Dhx36rE5.js} +1 -1
- package/dist/public/assets/{diagram-FQU43EPY-CwHYBYXs.js → diagram-B4RE2ZJO-uXKjNejx.js} +1 -1
- package/dist/public/assets/{diagram-NH7WQ7WH-LYbIJVga.js → diagram-LBJQPF4R-DQtMWoaJ.js} +1 -1
- package/dist/public/assets/{diagram-G47NLZAW-DdyCu452.js → diagram-Q27KOJAE-DrZQ7D0U.js} +1 -1
- package/dist/public/assets/diagram-UB23O5K3-BaWAfdn0.js +41 -0
- package/dist/public/assets/dist-BTADLBDJ.js +19 -0
- package/dist/public/assets/{dist-Dkm48MhE.js → dist-trrvycoA.js} +1 -1
- package/dist/public/assets/{doc-paths-BmaDk64-.js → doc-paths-DFa3HIzr.js} +1 -1
- package/dist/public/assets/{documents-events-uT6X4Tcz.js → documents-events-DqgIF3r-.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-CCIWWBDH-C-5RtUWh.js → ebnfDiagram-BXEA7PRR-DVxX6S5-.js} +1 -1
- package/dist/public/assets/{erDiagram-Q63AITRT-DIzO4SJX.js → erDiagram-JOGREHBK-CIyAdgD3.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-CM4Ag7kS.js → file-tree-adapter-BmAvLYVz.js} +1 -1
- package/dist/public/assets/{file-tree-utils-DBwwlF-O.js → file-tree-utils-DY87bjO4.js} +1 -1
- package/dist/public/assets/flowDiagram-UKHOOZJN-DxEqvm_c.js +1 -0
- package/dist/public/assets/{folder-config-api-CAW_y1hA.js → folder-config-api-C28YJVrp.js} +1 -1
- package/dist/public/assets/{follow-file-DXA3BOUt.js → follow-file-Cvpr7EuG.js} +1 -1
- package/dist/public/assets/{ganttDiagram-NO4QXBWP-8PSkZEAT.js → ganttDiagram-PKOTCBZU-Ar2CyZzJ.js} +1 -1
- package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-B-JOxyLz.js → gitGraphDiagram-DS77QQ5N-DeU1zoR6.js} +1 -1
- package/dist/public/assets/i18n-DGgrY2K0.js +1 -0
- package/dist/public/assets/{index-7NZkEURt.js → index-CujqmY9b.js} +7 -7
- package/dist/public/assets/{infoDiagram-FWYZ7A6U-mx8f7iPh.js → infoDiagram-6WML65LV-Bt4eZa9_.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-BuAgYXdN.js → ishikawaDiagram-WSZJBQD7-DeI0HD90.js} +1 -1
- package/dist/public/assets/{journeyDiagram-5HDEW3XC-MNcBq7uJ.js → journeyDiagram-NVQOT4AX-X3jjfz4m.js} +1 -1
- package/dist/public/assets/{kanban-definition-HUTT4EX6-COinwujW.js → kanban-definition-27J2QSJJ-DR_e32jq.js} +1 -1
- package/dist/public/assets/{line-DNiGqPCO.js → line-BNOcriXN.js} +1 -1
- package/dist/public/assets/{lint-config-client-425xrzvc.js → lint-config-client-wS6aC63Y.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-De3mHZNd.js → markdownlint-rule-browser-CxRBwdXM.js} +1 -1
- package/dist/public/assets/mermaid.core-Czw5aDLx.js +1 -0
- package/dist/public/assets/{mermaid.core-DOV4ohAA.js → mermaid.core-zZlXpH0Y.js} +5 -5
- package/dist/public/assets/{mindmap-definition-LN4V7U3C-39XsdHH5.js → mindmap-definition-FAOFIHXS-DqXummNF.js} +1 -1
- package/dist/public/assets/{navigation-targets-PGhaiird.js → navigation-targets-CN8Zdcbd.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-CBK4CpP2.js → open-managed-artifact-tab-AY2YJsyB.js} +1 -1
- package/dist/public/assets/{pegDiagram-2B236MQR-BUxDD3GL.js → pegDiagram-VL7TDLO6-ale9bN-M.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-C_qwLsM1.js → pending-receive-nav-store-CzROz9D7.js} +1 -1
- package/dist/public/assets/{pieDiagram-ENE6RG2P-1sOBJQHQ.js → pieDiagram-7S7Q4E2Y-CTI9imOs.js} +1 -1
- package/dist/public/assets/{prop-types-5CGkfdug.js → prop-types-D5_p8QLF.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-tPv8zdVV.js → quadrantDiagram-CIZ2JOQS-Cx_28pIm.js} +1 -1
- package/dist/public/assets/{railroadDiagram-RFXS5EU6-B3tLL240.js → railroadDiagram-AXF67PYL-Aej1uWAC.js} +1 -1
- package/dist/public/assets/{receive-store-DI90Nns7.js → receive-store-Bl8MkIGq.js} +1 -1
- package/dist/public/assets/{requirementDiagram-TGXJPOKE-DhHXNMVT.js → requirementDiagram-LRYGKXZP-BoxyPiBX.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-HTMAVEWB-1ilqTXwC.js → sankeyDiagram-W5VNT64P-DEsmXkXB.js} +1 -1
- package/dist/public/assets/{selection-context-DDCkoK9e.js → selection-context-Dt2TVY0O.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-BAMyeFAB.js → sequenceDiagram-SI44F4Z6-DL8B7rYg.js} +1 -1
- package/dist/public/assets/{skill-actions-47p0S1kO.js → skill-actions-D9rdvY-c.js} +1 -1
- package/dist/public/assets/{skill-scope-BaySijKB.js → skill-scope-CdhbojXK.js} +1 -1
- package/dist/public/assets/{skills-api-B5a5iAvc.js → skills-api-n0_XwDZz.js} +1 -1
- package/dist/public/assets/{src-DZ2XSskm.js → src-d-yOQJ3h.js} +1 -1
- package/dist/public/assets/{stateDiagram-2N3HPSRC-DUg1gyYz.js → stateDiagram-OKZ733FA-Ddk5map8.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-UEYNNEHI-DNsHjv8y.js +1 -0
- package/dist/public/assets/{swimlanes-5IMT3BWC-DDwZeFLm.js → swimlanes-SLNWSIFB-DGbYRUZy.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-ULZ7WXOC-DSfxb2kq.js +8 -0
- package/dist/public/assets/{tag-pill-input-B8HUD_bs.js → tag-pill-input-L8W9wKrN.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BwI3e-KO.js → target-navigation-intent-D2HenHiR.js} +1 -1
- package/dist/public/assets/telemetry-impl-BFiE8Z2z.js +2 -0
- package/dist/public/assets/{telemetry-startup-3EwtyoWe.js → telemetry-startup-CTkH30bV.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-Bv_z6XXt.js → terminal-cli-display-DgjEIipF.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-BUPvrCyE.js → terminal-launch-events-Bf_Q-CNU.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-BcVdzV_Q.js → terminal-telemetry-xmslQInT.js} +1 -1
- package/dist/public/assets/{timeline-definition-FHXFAJF6-1ZfgYI4B.js → timeline-definition-Z64GVDOM-BYcoKuOX.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-DSClMHUi.js → typing-burst-detector-D_pGbyOS.js} +1 -1
- package/dist/public/assets/{uninstall-Awe1WTmu.js → uninstall-CeoSxUOp.js} +1 -1
- package/dist/public/assets/{use-activity-panel-qWkBLHpg.js → use-activity-panel-BiDYllAC.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-BkWKpx5Z.js → use-apply-config-color-theme-IkrRwps0.js} +1 -1
- package/dist/public/assets/{use-collab-url-Bw2JQFx-.js → use-collab-url-Bk9RkcrZ.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-8zXEZ6xs.js → use-live-xterm-theme-6J-r8c8K.js} +1 -1
- package/dist/public/assets/{use-open-skill-D90cfK4C.js → use-open-skill-Dg7SiZGY.js} +1 -1
- package/dist/public/assets/{use-popular-skills-K09T0BP-.js → use-popular-skills-CTgSlKck.js} +1 -1
- package/dist/public/assets/{use-settings-route-D53s2DY3.js → use-settings-route-BD8IIMFP.js} +1 -1
- package/dist/public/assets/{use-skill-origin-BNGiYHuK.js → use-skill-origin-Djw0A91Z.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-CZvqovly.js → use-terminal-enabled-D3vMDlYh.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-6flbTc6U.js → use-timeline-entry-diff-SuVqba-Y.js} +1 -1
- package/dist/public/assets/{use-workspace-CLXmIc7v.js → use-workspace-BFQB2TMt.js} +1 -1
- package/dist/public/assets/{vennDiagram-L72KCM5P-DRxF9Ym_.js → vennDiagram-T6HMQDX7-CogXtPiJ.js} +1 -1
- package/dist/public/assets/{wardleyDiagram-EHGQE667-khYyBrTg.js → wardleyDiagram-T6FBY63Y-CEQAHhI-.js} +1 -1
- package/dist/public/assets/{xychartDiagram-FW5EYKEG-BdB2A2wD.js → xychartDiagram-ELKLHX3M-DnYxQMGB.js} +2 -2
- package/dist/public/index.html +46 -46
- package/dist/public/uninstall.html +3 -3
- package/dist/{quadrantDiagram-ABIIQ3AL-Z4PbVL1N.mjs → quadrantDiagram-CIZ2JOQS-B5piuUpN.mjs} +2 -2
- package/dist/{railroadDiagram-RFXS5EU6-ZSRYpY_p.mjs → railroadDiagram-AXF67PYL-D7e-PWav.mjs} +2 -2
- package/dist/{repair-launch-json-DRPudcLH.mjs → repair-launch-json-BuMSVWLk.mjs} +2 -2
- package/dist/{repair-mcp-configs-wNRE9zuI.mjs → repair-mcp-configs-CH9YSEnk.mjs} +2 -2
- package/dist/{repair-skills-EH0Ffdw4.mjs → repair-skills-BWwoaS7o.mjs} +2 -2
- package/dist/repair-skills-ItKhdLA6.mjs +1 -0
- package/dist/{requirementDiagram-TGXJPOKE-H6OWjjJE.mjs → requirementDiagram-LRYGKXZP-DmOm4x5H.mjs} +2 -2
- package/dist/{resolve-project-root-Nwm2qORT.mjs → resolve-project-root-q1DrRnlU.mjs} +2 -2
- package/dist/{sankeyDiagram-HTMAVEWB-CtBVJJox.mjs → sankeyDiagram-W5VNT64P-DFCTz0R-.mjs} +2 -2
- package/dist/{sequenceDiagram-DBY2YBRQ-DDLm4Ak_.mjs → sequenceDiagram-SI44F4Z6-BypLr3W1.mjs} +2 -2
- package/dist/server-lock-CtHrC9TQ.mjs +1 -0
- package/dist/{server-lock-rUhECxao.mjs → server-lock-fvVuZ7Zp.mjs} +2 -2
- package/dist/{skill-teardown-C6p-GLNj.mjs → skill-teardown-Bl5wGhV-.mjs} +2 -2
- package/dist/{src-DNXRgLIt.mjs → src-BhnYJwpL.mjs} +2 -2
- package/dist/{src-CgJnLUby.mjs → src-BwEuZl-u.mjs} +114 -114
- package/dist/{src-DganMrgf.mjs → src-DclHF3Ze.mjs} +2 -2
- package/dist/src-DhGfmghJ.mjs +1 -0
- package/dist/{src-BMU93Lqr.mjs → src-UBcR-kQc.mjs} +1 -1
- package/dist/start-BpPetP-R.mjs +1 -0
- package/dist/{start-xVODdbR6.mjs → start-DPmzV2RS.mjs} +4 -4
- package/dist/{stateDiagram-2N3HPSRC-pAn2bDnn.mjs → stateDiagram-OKZ733FA-tCaYOOd-.mjs} +2 -2
- package/dist/stateDiagram-v2-UEYNNEHI-dtHPCRFB.mjs +2 -0
- package/dist/{swimlanes-5IMT3BWC-nSsjdSnj.mjs → swimlanes-SLNWSIFB-t_RkzW-0.mjs} +2 -2
- package/dist/swimlanesDiagram-ULZ7WXOC-dsWYdLIA.mjs +9 -0
- package/dist/{timeline-definition-FHXFAJF6-CnTXJoEq.mjs → timeline-definition-Z64GVDOM-ZRdFj9YX.mjs} +2 -2
- package/dist/{ui-sG72X5aW.mjs → ui-oodvlZsr.mjs} +3 -3
- package/dist/{vennDiagram-L72KCM5P-CqTzYRfa.mjs → vennDiagram-T6HMQDX7-C2UbMrlp.mjs} +2 -2
- package/dist/{wardleyDiagram-EHGQE667-WhxG-nRT.mjs → wardleyDiagram-T6FBY63Y-DELth6cD.mjs} +2 -2
- package/dist/{xychartDiagram-FW5EYKEG-DDE7TRrw.mjs → xychartDiagram-ELKLHX3M-DD7Cqq5J.mjs} +3 -3
- package/package.json +4 -4
- package/dist/architectureDiagram-ZJ3FMSHR-HYEpY7T3.mjs +0 -37
- package/dist/channel-Cjp51EO_.mjs +0 -2
- package/dist/chunk-WYO6CB5R-DN1R0VLx.mjs +0 -130
- package/dist/classDiagram-OUVF2IWQ-0ApI9cDS.mjs +0 -2
- package/dist/classDiagram-v2-EOCWNBFH-DfQYJWNe.mjs +0 -2
- package/dist/constants-CZbUCfs2.mjs +0 -2
- package/dist/diagram-WEI45ONY-CD_Zpcvk.mjs +0 -42
- package/dist/flowDiagram-23GEKE2U-Dhi3SNHm.mjs +0 -1
- package/dist/fs-traced-C1nHpvFb.mjs +0 -1
- package/dist/git-handle-NFQsjK7c.mjs +0 -1
- package/dist/init-BJbL7X0r.mjs +0 -1
- package/dist/loader-DQH64t89.mjs +0 -1
- package/dist/md-manager-Bp8E9rKB.mjs +0 -2
- package/dist/preview-wAZxumMb.mjs +0 -1
- package/dist/public/assets/FeedbackForm-D8N9fulH.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-CKnZN6FQ.js +0 -1
- package/dist/public/assets/architectureDiagram-ZJ3FMSHR-4_dHD-uY.js +0 -36
- package/dist/public/assets/channel-SZoC-PVl.js +0 -1
- package/dist/public/assets/chunk-WYO6CB5R-DpZX-_mW.js +0 -127
- package/dist/public/assets/classDiagram-OUVF2IWQ-BDRzp3gY.js +0 -1
- package/dist/public/assets/classDiagram-v2-EOCWNBFH-rM9c2SNh.js +0 -1
- package/dist/public/assets/diagram-WEI45ONY-CxDGGrsH.js +0 -41
- package/dist/public/assets/dist-D7CYCFMw.js +0 -19
- package/dist/public/assets/flowDiagram-23GEKE2U-D2Rbs6gz.js +0 -1
- package/dist/public/assets/i18n-BR0Ehm4U.js +0 -1
- package/dist/public/assets/mermaid.core-IC601_VA.js +0 -1
- package/dist/public/assets/stateDiagram-v2-6OUMAXLB-C8Q0uhsP.js +0 -1
- package/dist/public/assets/swimlanesDiagram-G3AALYLV-6ZWNCIe_.js +0 -8
- package/dist/public/assets/telemetry-impl-BYZItTXA.js +0 -2
- package/dist/repair-skills-g6r7LRh4.mjs +0 -1
- package/dist/server-lock-D5VOrm_3.mjs +0 -1
- package/dist/src-FRwwqmkJ.mjs +0 -1
- package/dist/start-Co2WNLNX.mjs +0 -1
- package/dist/stateDiagram-v2-6OUMAXLB-DCmVVpGm.mjs +0 -2
- package/dist/swimlanesDiagram-G3AALYLV-CdQlHesp.mjs +0 -9
- /package/dist/public/assets/{chunk-2Q5K7J3B-C2ffvMR3.js → chunk-2Q5K7J3B-BSbSUjMe.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-6OZAfZOy.js";import"./src-Cdq2Q5Qg.js";import"./chunk-WYO6CB5R-DpZX-_mW.js";import"./chunk-ICXQ74PX-BQe1Tadw.js";import"./chunk-C7G6YPKG-DNj4qHp9.js";import"./chunk-OGEWGWER-CazgdTF7.js";import"./chunk-HOUHSVGY-fSFxsWEA.js";import"./chunk-Q4XR5HBZ-CUaphLMo.js";import"./chunk-ZGVPDNZ5-CQ5EdC_w.js";import"./chunk-7BUUIJ7U-C4LcvRKI.js";import"./chunk-52WLFC77-BxWUWkZN.js";import"./chunk-FWX5IMBZ-B2SauNuc.js";import"./chunk-32BRIVSS-BGfEotqY.js";import"./chunk-XXDRQBXY-HZnulEE8.js";import"./chunk-VR4S4FIN-V7_7sr9q.js";import{i as t,n,r,t as i}from"./chunk-V7JOEXUC-Bbc5z4-F.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-6OZAfZOy.js";import"./src-Cdq2Q5Qg.js";import"./chunk-WYO6CB5R-DpZX-_mW.js";import"./chunk-ICXQ74PX-BQe1Tadw.js";import"./chunk-C7G6YPKG-DNj4qHp9.js";import"./chunk-OGEWGWER-CazgdTF7.js";import"./chunk-HOUHSVGY-fSFxsWEA.js";import"./chunk-Q4XR5HBZ-CUaphLMo.js";import"./chunk-ZGVPDNZ5-CQ5EdC_w.js";import"./chunk-7BUUIJ7U-C4LcvRKI.js";import"./chunk-52WLFC77-BxWUWkZN.js";import"./chunk-FWX5IMBZ-B2SauNuc.js";import"./chunk-32BRIVSS-BGfEotqY.js";import"./chunk-XXDRQBXY-HZnulEE8.js";import"./chunk-VR4S4FIN-V7_7sr9q.js";import{i as t,n,r,t as i}from"./chunk-V7JOEXUC-Bbc5z4-F.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-6OZAfZOy.js";import{t}from"./src-Cdq2Q5Qg.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-WYO6CB5R-DpZX-_mW.js";import{i as p}from"./chunk-ICXQ74PX-BQe1Tadw.js";import{t as m}from"./chunk-VAUOI2AC-BYt4ybRk.js";import{t as h}from"./chunk-JWPE2WC7-Dn44e_g7.js";import{n as g}from"./mermaid-parser.core-BBPl0FMj.js";var _={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},v={axes:[],curves:[],options:_},y=structuredClone(v),b=l.radar,x=e(()=>p({...b,...s().radar}),`getConfig`),S=e(()=>y.axes,`getAxes`),C=e(()=>y.curves,`getCurves`),w=e(()=>y.options,`getOptions`),T=e(e=>{y.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),E=e(e=>{y.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:D(e.entries)}))},`setCurves`),D=e(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=S();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),O={getAxes:S,getCurves:C,getOptions:w,setAxes:T,setCurves:E,setOptions:e(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});y.options={showLegend:t.showLegend?.value??_.showLegend,ticks:t.ticks?.value??_.ticks,max:t.max?.value??_.max,min:t.min?.value??_.min,graticule:t.graticule?.value??_.graticule}},`setOptions`),getConfig:x,clear:e(()=>{o(),y=structuredClone(v)},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r},k=e(e=>{h(e,O);let{axes:t,curves:n,options:r}=e;O.setAxes(t),O.setCurves(n),O.setOptions(r)},`populate`),A={parse:e(async e=>{let n=await g(`radar`,e);t.debug(n),k(n)},`parse`)},j=e((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=M(m(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;N(u,a,p,s.ticks,s.graticule),P(u,a,p,c),F(u,a,o,f,d,s.graticule,c),R(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),M=e((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return c(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),N=e((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t<r;t++){let i=n*(t+1)/r;e.append(`circle`).attr(`r`,i).attr(`class`,`radarGraticule`)}else if(i===`polygon`){let i=t.length;for(let a=0;a<r;a++){let o=n*(a+1)/r,s=t.map((e,t)=>{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),P=e((e,t,n,r)=>{let i=t.length;for(let a=0;a<i;a++){let o=t[a].label,s=2*a*Math.PI/i-Math.PI/2,c=Math.cos(s),l=Math.sin(s);e.append(`line`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,n*r.axisScaleFactor*c).attr(`y2`,n*r.axisScaleFactor*l).attr(`class`,`radarAxisLine`);let u=c>.01?`start`:c<-.01?`end`:`middle`,d=l>.01?`hanging`:l<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*c+4*c).attr(`y`,n*r.axisLabelFactor*l+4*l).attr(`text-anchor`,u).attr(`dominant-baseline`,d).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function F(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=I(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,L(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}e(F,`drawCurves`);function I(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}e(I,`relativeRadius`);function L(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],c=e[(i+2)%n],l={x:o.x+(s.x-a.x)*t,y:o.y+(s.y-a.y)*t},u={x:s.x-(c.x-o.x)*t,y:s.y-(c.y-o.y)*t};r+=` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`}return`${r} Z`}e(L,`closedRoundCurve`);function R(e,t,n,r){if(!n)return;let i=(r.width/2+r.marginRight)*3/4,a=-(r.height/2+r.marginTop)*3/4;t.forEach((t,n)=>{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}e(R,`drawLegend`);var z={draw:j},B=e((e,t)=>{let n=``;for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=e[`cScale${r}`];n+=`
|
|
2
|
-
.radarCurve-${r} {
|
|
3
|
-
color: ${i};
|
|
4
|
-
fill: ${i};
|
|
5
|
-
fill-opacity: ${t.curveOpacity};
|
|
6
|
-
stroke: ${i};
|
|
7
|
-
stroke-width: ${t.curveStrokeWidth};
|
|
8
|
-
}
|
|
9
|
-
.radarLegendBox-${r} {
|
|
10
|
-
fill: ${i};
|
|
11
|
-
fill-opacity: ${t.curveOpacity};
|
|
12
|
-
stroke: ${i};
|
|
13
|
-
}
|
|
14
|
-
`}return n},`genIndexStyles`),V=e(e=>{let t=p(n(),s().themeVariables);return{themeVariables:t,radarOptions:p(t.radar,e)}},`buildRadarStyleOptions`),H={parser:A,db:O,renderer:z,styles:e(({radar:e}={})=>{let{themeVariables:t,radarOptions:n}=V(e);return`
|
|
15
|
-
.radarTitle {
|
|
16
|
-
font-size: ${t.fontSize};
|
|
17
|
-
color: ${t.titleColor};
|
|
18
|
-
dominant-baseline: hanging;
|
|
19
|
-
text-anchor: middle;
|
|
20
|
-
}
|
|
21
|
-
.radarAxisLine {
|
|
22
|
-
stroke: ${n.axisColor};
|
|
23
|
-
stroke-width: ${n.axisStrokeWidth};
|
|
24
|
-
}
|
|
25
|
-
.radarAxisLabel {
|
|
26
|
-
font-size: ${n.axisLabelFontSize}px;
|
|
27
|
-
color: ${n.axisColor};
|
|
28
|
-
}
|
|
29
|
-
.radarGraticule {
|
|
30
|
-
fill: ${n.graticuleColor};
|
|
31
|
-
fill-opacity: ${n.graticuleOpacity};
|
|
32
|
-
stroke: ${n.graticuleColor};
|
|
33
|
-
stroke-width: ${n.graticuleStrokeWidth};
|
|
34
|
-
}
|
|
35
|
-
.radarLegendText {
|
|
36
|
-
text-anchor: start;
|
|
37
|
-
font-size: ${n.legendFontSize}px;
|
|
38
|
-
dominant-baseline: hanging;
|
|
39
|
-
}
|
|
40
|
-
${B(t,n)}
|
|
41
|
-
`},`styles`)};export{H as diagram};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./chunk-CYidjpOJ.js";import{t}from"./mermaid.core-DOV4ohAA.js";var n={rect:`rectangle`,circle:`ellipse`},r={startOnLoad:!1,flowchart:{curve:`linear`},themeVariables:{fontSize:`20px`},maxEdges:500,maxTextSize:5e4},i=class{constructor({converter:e}){this.convert=(e,t)=>this.converter(e,{...t,fontSize:t.fontSize||20}),this.converter=e}},a;(function(e){e.ROUND=`round`,e.STADIUM=`stadium`,e.DOUBLECIRCLE=`doublecircle`,e.CIRCLE=`circle`,e.DIAMOND=`diamond`,e.CYLINDER=`cylinder`})(a||={});var o;(function(e){e.COLOR=`color`})(o||={});var s;(function(e){e.FILL=`fill`,e.STROKE=`stroke`,e.STROKE_WIDTH=`stroke-width`,e.STROKE_DASHARRAY=`stroke-dasharray`})(s||={});var c=e((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.removeMarkdown=void 0,e.removeMarkdown=function(e,t){t===void 0&&(t={listUnicodeChar:``}),t||={},t.listUnicodeChar=t.hasOwnProperty(`listUnicodeChar`)?t.listUnicodeChar:!1,t.stripListLeaders=t.hasOwnProperty(`stripListLeaders`)?t.stripListLeaders:!0,t.gfm=t.hasOwnProperty(`gfm`)?t.gfm:!0,t.useImgAltText=t.hasOwnProperty(`useImgAltText`)?t.useImgAltText:!0,t.preserveLinks=t.hasOwnProperty(`preserveLinks`)?t.preserveLinks:!1;var n=e||``;n=n.replace(/^(-\s*?|\*\s*?|_\s*?){3,}\s*$/gm,``);try{t.stripListLeaders&&(n=t.listUnicodeChar?n.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,t.listUnicodeChar+` $1`):n.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,`$1`)),t.gfm&&(n=n.replace(/\n={2,}/g,`
|
|
2
|
-
`).replace(/~{3}.*\n/g,``).replace(/~~/g,``).replace(/`{3}.*\n/g,``)),t.preserveLinks&&(n=n.replace(/\[(.*?)\][\[\(](.*?)[\]\)]/g,`$1 ($2)`)),n=n.replace(/<[^>]*>/g,``).replace(/^[=\-]{2,}\s*$/g,``).replace(/\[\^.+?\](\: .*?$)?/g,``).replace(/\s{0,2}\[.*?\]: .*?$/g,``).replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g,t.useImgAltText?`$1`:``).replace(/\[(.*?)\][\[\(].*?[\]\)]/g,`$1`).replace(/^\s{0,3}>\s?/g,``).replace(/(^|\n)\s{0,3}>\s?/g,`
|
|
3
|
-
|
|
4
|
-
`).replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g,``).replace(/^(\n)?\s{0,}#{1,6}\s+| {0,}(\n)?\s{0,}#{0,} {0,}(\n)?\s{0,}$/gm,`$1$2$3`).replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g,`$2`).replace(/([\*_]{1,3})(\S.*?\S{0,1})\1/g,`$2`).replace(/(`{3,})(.*?)\1/gm,`$2`).replace(/`(.+?)`/g,`$1`).replace(/\n{2,}/g,`
|
|
5
|
-
|
|
6
|
-
`)}catch(t){return console.error(t),e}return n}}))(),l={arrow_circle:{endArrowhead:`circle`},arrow_cross:{endArrowhead:`bar`},arrow_open:{endArrowhead:null,startArrowhead:null},double_arrow_circle:{endArrowhead:`circle`,startArrowhead:`circle`},double_arrow_cross:{endArrowhead:`bar`,startArrowhead:`bar`},double_arrow_point:{endArrowhead:`arrow`,startArrowhead:`arrow`}},u=e=>l[e],d=e=>{let t=e.text;return e.labelType===`markdown`&&(t=(0,c.removeMarkdown)(e.text)),f(t)},f=e=>e.replace(/\s?(fa|fab):[a-zA-Z0-9-]+/g,``),p=e=>{let t={};return Object.keys(e).forEach(n=>{switch(n){case s.FILL:t.backgroundColor=e[n],t.fillStyle=`solid`;break;case s.STROKE:t.strokeColor=e[n];break;case s.STROKE_WIDTH:t.strokeWidth=Number(e[n]?.split(`px`)[0]);break;case s.STROKE_DASHARRAY:t.strokeStyle=`dashed`;break}}),t},m=e=>{let t={};return Object.keys(e).forEach(n=>{switch(n){case o.COLOR:t.strokeColor=e[n];break}}),t},h=(e,t)=>[e,t],g=32,_=.62,v=12,y=12,b=(e,t)=>Math.max(20,Math.ceil(e.length*t*_)),x=(e,t,n,r)=>{let i=r||20;if(e!==a.CYLINDER||!t||t.includes(`
|
|
7
|
-
`))return i;let o=Math.max(20,n-v);return b(t,i)<=o?i:Math.max(y,Math.floor(o/(t.length*_)))},ee=e=>{let t={};e.subGraphs.map(n=>{n.nodeIds.forEach(r=>{t[n.id]={id:n.id,parent:null,isLeaf:!1},t[r]={id:r,parent:n.id,isLeaf:e.vertices[r]!==void 0}})});let n={};return[...Object.keys(e.vertices),...e.subGraphs.map(e=>e.id)].forEach(e=>{if(!t[e])return;let r=t[e],i=[];for(r.isLeaf||i.push(`subgraph_group_${r.id}`);r.parent;)i.push(`subgraph_group_${r.parent}`),r=t[r.parent];n[e]=i}),{getGroupIds:e=>n[e]||[],getParentId:e=>t[e]?t[e].parent:null}},te=new i({converter:(e,t)=>{let n=[],r=t.fontSize,{getGroupIds:i,getParentId:o}=ee(e);return e.subGraphs.reverse().forEach(e=>{let t=i(e.id),a=d(e),o=b(a,r||16)+g*2,s=Math.max(e.width,o),c=e.x-(s-e.width)/2,l=p(e.containerStyle),u=m(e.labelStyle),f={id:e.id,type:`rectangle`,groupIds:t,x:c,y:e.y,width:s,height:e.height,label:{groupIds:t,text:a,fontSize:r,verticalAlign:`top`,...u},...l};n.push(f)}),Object.values(e.vertices).forEach(e=>{if(!e)return;let t=i(e.id),o=d(e),s=x(e.type,o,e.width,r),c=p(e.containerStyle),l=m(e.labelStyle),u={id:e.id,type:`rectangle`,groupIds:t,x:e.x,y:e.y,width:e.width,height:e.height,strokeWidth:2,label:{groupIds:t,text:o,fontSize:s,...l},link:e.link||null,...c};switch(e.type){case a.STADIUM:u={...u,roundness:{type:3}};break;case a.ROUND:u={...u,roundness:{type:3}};break;case a.DOUBLECIRCLE:{t.push(`doublecircle_${e.id}}`);let r={type:`ellipse`,groupIds:t,x:e.x+5,y:e.y+5,width:e.width-10,height:e.height-10,strokeWidth:2,roundness:{type:3},label:{groupIds:t,text:o,fontSize:s,...l}};u={...u,groupIds:t,type:`ellipse`},n.push(r);break}case a.CIRCLE:u.type=`ellipse`;break;case a.DIAMOND:u.type=`diamond`;break}n.push(u)}),e.edges.forEach(e=>{let t=[],a=o(e.start),s=o(e.end);a&&a===s&&(t=i(a));let{startX:c,startY:l,reflectionPoints:f}=e,p=f.map(e=>h(e.x-f[0].x,e.y-f[0].y)),m=u(e.type||`arrow_point`),g=n.find(t=>t.id===e.start),_=n.find(t=>t.id===e.end);if(!g||!_)return;let v={id:`${e.start}_${e.end}`,type:`arrow`,groupIds:t,x:c,y:l,strokeWidth:e.stroke===`thick`?4:2,strokeStyle:e.stroke===`dotted`?`dashed`:void 0,points:p,...e.text?{label:{text:d(e),fontSize:r,groupIds:t}}:{},roundness:{type:2},...m,start:{id:g.id||``},end:{id:_.id||``}};n.push(v)}),{elements:n}}}),S=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((e,t)=>(t&=63,t<36?e+=t.toString(36):t<62?e+=(t-26).toString(36).toUpperCase():t>62?e+=`-`:e+=`_`,e),``),C=new i({converter:e=>{let t=S(),{width:n,height:r}=e,i={type:`image`,x:0,y:0,width:n,height:r,status:`saved`,fileId:t};return{files:{[t]:{id:t,mimeType:e.mimeType,dataURL:e.dataURL}},elements:[i]}}}),w=(e,t)=>[e,t],T=e=>e.replace(/\\n/g,`
|
|
8
|
-
`),E=e=>{let t={type:`line`,x:e.startX,y:e.startY,points:[w(0,0),w(e.endX-e.startX,e.endY-e.startY)],width:e.endX-e.startX,height:e.endY-e.startY,strokeStyle:e.strokeStyle||`solid`,strokeColor:e.strokeColor||`#000`,strokeWidth:e.strokeWidth||1};return e.groupId&&Object.assign(t,{groupIds:[e.groupId]}),e.id&&Object.assign(t,{id:e.id}),t},D=e=>{let t={type:`text`,x:e.x,y:e.y,width:e.width,height:e.height,text:T(e.text)||``,fontSize:e.fontSize,verticalAlign:`top`,strokeColor:e.color};return e.groupId&&Object.assign(t,{groupIds:[e.groupId]}),e.id&&Object.assign(t,{id:e.id}),t},O=e=>{let t={text:T(e?.label?.text||``),fontSize:e?.label?.fontSize,textAlign:e.label?.textAlign,verticalAlign:e.label?.verticalAlign||`middle`,strokeColor:e.label?.color||`#000`,...e.groupId?{groupIds:[e.groupId]}:{}},n={};e.type===`rectangle`&&e.subtype===`activation`&&(n={backgroundColor:`#e9ecef`,fillStyle:`solid`});let r={id:e.id,type:e.type,x:e.x,y:e.y,width:e.width,height:e.height,label:t,strokeStyle:e?.strokeStyle,strokeWidth:e?.strokeWidth,strokeColor:e?.strokeColor,backgroundColor:e?.bgColor,fillStyle:`solid`,...n};return e.groupId&&Object.assign(r,{groupIds:[e.groupId]}),r},k=e=>{let t={type:`arrow`,x:e.startX,y:e.startY,points:e.points?.map(([e,t])=>w(e,t))||[w(0,0),w(e.endX-e.startX,e.endY-e.startY)],width:e.endX-e.startX,height:e.endY-e.startY,strokeStyle:e?.strokeStyle||`solid`,endArrowhead:e?.endArrowhead||null,startArrowhead:e?.startArrowhead||null,label:{text:T(e?.label?.text||``),fontSize:16,textAlign:e?.label?.textAlign,verticalAlign:e?.label?.verticalAlign},roundness:{type:2},start:e.start,end:e.end};return e.groupId&&Object.assign(t,{groupIds:[e.groupId]}),t},A=10,j=16,ne=24,re=4,ie=e=>{if(!e)return!0;let t=e.trim().toLowerCase();return t===`transparent`||t===`none`||t===`rgba(0,0,0,0)`||t===`rgba(0, 0, 0, 0)`},ae=(e,t)=>Math.max(20,Math.round(e.length*t*.6)),oe=(e,t,n=!0)=>{let r=e,i=r.groupIds??[];if(i.includes(t)||(r.groupIds=[...i,t]),!n||!r.label)return;let a=r.label.groupIds??[];a.includes(t)||(r.label.groupIds=[...a,t])},se=new i({converter:e=>{let t=[],n=[];if(Object.values(e.nodes).forEach(e=>{!e||!e.length||e.forEach(e=>{let r;switch(e.type){case`line`:r=E(e);break;case`rectangle`:case`ellipse`:r=O(e);break;case`text`:r=D(e);break;default:throw`unknown type ${e.type}`}e.type===`rectangle`&&e?.subtype===`activation`?n.push(r):t.push(r)})}),Object.values(e.lines).forEach(e=>{e&&t.push(E(e))}),Object.values(e.arrows).forEach(e=>{e&&(t.push(k(e)),e.sequenceNumber&&t.push(O(e.sequenceNumber)))}),t.push(...n),e.loops){let{lines:n,texts:r,nodes:i}=e.loops;n.forEach(e=>{t.push(E(e))}),r.forEach(e=>{t.push(D(e))}),i.forEach(e=>{t.push(O(e))})}return e.groups&&e.groups.forEach(e=>{let{actorKeys:n,name:r}=e,i=1/0,a=1/0,o=0,s=0;if(!n.length)return;let c=t.filter(e=>{if(e.id){let t=e.id.indexOf(`-`),r=e.id.substring(0,t);return n.includes(r)}return!1});if(!c.length||(c.forEach(e=>{e.x===void 0||e.y===void 0||e.width===void 0||e.height===void 0||(i=Math.min(i,e.x),a=Math.min(a,e.y),o=Math.max(o,e.x+e.width),s=Math.max(s,e.y+e.height))}),!Number.isFinite(i)||!Number.isFinite(a)||!Number.isFinite(o)||!Number.isFinite(s)))return;let l=i-A,u=a-A,d=o-i+A*2,f=s-a+A*2,p=S(),m=S(),h=O({type:`rectangle`,x:l,y:u,width:d,height:f,bgColor:ie(e.fill)?void 0:e.fill,strokeColor:`#1f1f1f`,strokeWidth:1,id:p,groupId:m});if(t.unshift(h),t.forEach(e=>{e.id!==p&&(e.x===void 0||e.y===void 0||e.width===void 0||e.height===void 0||e.x>=i&&e.x+e.width<=o&&e.y>=a&&e.y+e.height<=s&&oe(e,m))}),r){let e=D({type:`text`,id:S(),text:r,x:l+re,y:u-ne,width:ae(r,j),height:j+8,fontSize:j,color:`#1f1f1f`,groupId:m});oe(e,m,!1),t.push(e)}}),{elements:t}}}),ce=new i({converter:e=>{let t=[];return e.nodes.forEach(e=>{!e||!e.length||e.forEach(e=>{let n;switch(e.type){case`line`:n=E(e);break;case`rectangle`:case`ellipse`:n=O(e);break;case`text`:n=D(e);break;default:throw`unknown type ${e.type}`}t.push(n)})}),Object.values(e.lines).forEach(e=>{e&&t.push(E(e))}),Object.values(e.arrows).forEach(e=>{if(!e)return;let n=k(e);t.push(n)}),Object.values(e.text).forEach(e=>{let n=D(e);t.push(n)}),Object.values(e.namespaces).forEach(n=>{let r=Object.keys(n.classes),i=[...r],a=[...e.lines,...e.arrows,...e.text];r.forEach(e=>{let t=a.filter(t=>t.metadata&&t.metadata.classId===e).map(e=>e.id);t.length&&i.push(...t)});let o={type:`frame`,id:S(),name:n.id,children:i};t.push(o)}),{elements:t}}}),le=new i({converter:e=>{let t=[];return e.nodes.forEach(e=>{!e||!e.length||e.forEach(e=>{let n;switch(e.type){case`line`:n=E(e);break;case`rectangle`:case`ellipse`:n=O(e);break;case`text`:n=D(e);break;default:throw`unknown type ${e.type}`}t.push(n)})}),e.lines.forEach(e=>{t.push(E(e))}),e.arrows.forEach(e=>{t.push(k(e))}),e.text.forEach(e=>{t.push(D(e))}),{elements:t}}}),M=(e,t)=>[e,t],N=16,ue=14,de=1,fe=`#000000`,pe=5,me=pe*2,he=pe*2,ge=1.25,_e=new Set([`choice`,`fork`,`join`,`stateStart`,`stateEnd`,`divider`]),P=e=>e.shape===`stateEnd`?[`state_end_group_${e.id}`]:void 0,ve=e=>e.shape===`rectWithTitle`&&e.description.length?[e.text,...e.description].join(`
|
|
9
|
-
`):e.text,F,ye=()=>{if(F!==void 0)return F;if(typeof document>`u`)return F=null,F;try{F=document.createElement(`canvas`).getContext(`2d`)}catch{F=null}return F},I=(e,t)=>{let n=ye();return n?(n.font=`${t}px Excalifont, sans-serif`,n.measureText(e).width):e.length*t*.6},be=(e,t,n)=>{if(I(e,t)<=n)return[e];let r=[],i=``;for(let a of e){let e=`${i}${a}`;if(i&&I(e,t)>n){r.push(i),i=a;continue}i=e}return i&&r.push(i),r},xe=(e,t,n)=>{if(!e.trim()||I(e,t)<=n)return e;let r=e.split(/\s+/).filter(Boolean),i=[],a=``;for(let e of r){let r=be(e,t,n);for(let[e,o]of r.entries()){let r=a?`${a}${a&&e===0?` `:``}${o}`:o;if(I(r,t)<=n){a=r;continue}a&&i.push(a),a=o}r.length}return i.push(a),i.join(`
|
|
10
|
-
`)},Se=(e,t,n)=>{let r=e.map(e=>xe(e,t,n)).join(`
|
|
11
|
-
`).split(`
|
|
12
|
-
`);return{width:Math.max(...r.map(e=>I(e,t))),height:r.length*t*ge}},Ce=(e,t,n,r)=>{let i=e.split(`
|
|
13
|
-
`);for(let e=N;e>=ue;e-=de){let{height:r}=Se(i,e,t);if(r<=n)return e}return r},we=e=>{let t=ve(e);if(!t||_e.has(e.shape))return N;let n=Math.max(1,e.width-me),r=Math.max(1,e.height-he),i=t.split(`
|
|
14
|
-
`);return i.length>1&&Math.max(...i.map(e=>I(e,N)))<=n?N:Ce(t,n,r,i.length===1?N:ue)},Te=e=>{if(_e.has(e.shape))return;let t=ve(e);if(t)return{text:t,fontSize:we(e),verticalAlign:e.shape===`rectWithTitle`||e.shape===`roundedWithTitle`?`top`:`middle`,...m(e.labelStyle)}},Ee=e=>{let t=p(e.containerStyle),n=Te(e),r=e.shape===`choice`?`diamond`:e.shape===`stateStart`||e.shape===`stateEnd`?`ellipse`:`rectangle`,i=e.shape===`rect`||e.shape===`rectWithTitle`||e.shape===`roundedWithTitle`,a=e.shape===`stateStart`||e.shape===`fork`||e.shape===`join`,o=t.backgroundColor||t.strokeColor||fe,s=t.strokeColor||t.backgroundColor||fe;return{id:e.id,type:r,...P(e)?{groupIds:P(e)}:{},x:e.x,y:e.y,width:e.width,height:e.height,...n?{label:n}:{},...t,...i?{roundness:{type:3}}:{},...a?{backgroundColor:o,strokeColor:s,fillStyle:`solid`}:{}}},De=e=>{if(!e.dividerLine)return null;let t=p(e.containerStyle);return{id:`${e.id}__divider`,type:`line`,x:e.dividerLine.startX,y:e.dividerLine.startY,width:e.dividerLine.endX-e.dividerLine.startX,height:e.dividerLine.endY-e.dividerLine.startY,points:[M(0,0),M(e.dividerLine.endX-e.dividerLine.startX,e.dividerLine.endY-e.dividerLine.startY)],strokeColor:t.strokeColor||`#000`,strokeWidth:t.strokeWidth||1}},Oe=e=>{let t=p(e.containerStyle),n=Math.max(2,Math.min(e.width,e.height)*.32),r=e.endInnerColor||t.strokeColor||t.backgroundColor||fe;return{id:`${e.id}__inner`,type:`ellipse`,groupIds:P(e),x:e.x+n,y:e.y+n,width:Math.max(1,e.width-n*2),height:Math.max(1,e.height-n*2),backgroundColor:r,strokeColor:r,fillStyle:`solid`,strokeWidth:1}},ke=e=>{let t=e.reflectionPoints.map((e,t,n)=>{let r=n[0];return t===0?M(0,0):M(e.x-r.x,e.y-r.y)});return{id:e.id,type:`arrow`,x:e.startX,y:e.startY,width:e.endX-e.startX,height:e.endY-e.startY,points:t,strokeColor:e.strokeColor||`#000`,strokeWidth:e.strokeWidth||2,strokeStyle:e.strokeStyle||`solid`,endArrowhead:e.isNoteEdge?null:`triangle`,roundness:{type:2},start:{id:e.start},end:{id:e.end},...e.text?{label:{text:e.text,fontSize:16}}:{}}},Ae=new i({converter:e=>{let t=[];return e.nodes.forEach(e=>{if(!e.isRenderable)return;let n=Ee(e);t.push(n);let r=De(e);r&&t.push(r),e.shape===`stateEnd`&&t.push(Oe(e))}),e.edges.forEach(e=>{t.push(ke(e))}),{elements:t}}}),L=e=>{e=Me(e);let t=e.replace(/#(\d+);/g,`&#$1;`).replace(/#([a-z]+);/g,`&$1;`),n=document.createElement(`textarea`);return n.innerHTML=t,n.value},R=e=>{let t=e.getAttribute(`transform`)?.match(/translate\(([ \d.-]+),\s*([\d.-]+)\)/),n=0,r=0;return t&&(n=Number(t[1]),r=Number(t[2])),{transformX:n,transformY:r}},je=e=>{let t=e;return t=t.replace(/style.*:\S*#.*;/g,e=>e.substring(0,e.length-1)),t=t.replace(/classDef.*:\S*#.*;/g,e=>e.substring(0,e.length-1)),t=t.replace(/#\w+;/g,e=>{let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°${t}¶ß`:`fl°${t}¶ß`}),t},Me=function(e){return e.replace(/fl°°/g,`#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},Ne=.5,z=(e,t=Ne)=>{let n=[];return e.forEach(e=>{let r=n[n.length-1];if(!r){n.push(e);return}Math.hypot(e[0]-r[0],e[1]-r[1])<=t||n.push(e)}),n},B=e=>{let t=e.getAttribute(`d`);if(!t)return null;let n=Array.from(t.matchAll(/-?\d*\.?\d+(?:e[-+]?\d+)?/gi),e=>Number(e[0]));return n.length<4?null:{startX:n[0],startY:n[1],endX:n[n.length-2],endY:n[n.length-1]}},Pe=e=>{let t=e.getAttribute(`data-points`);if(!t){let t=B(e);return t?[{x:t.startX,y:t.startY},{x:t.endX,y:t.endY}]:[]}try{let e=atob(t),n=JSON.parse(e);return Array.isArray(n)?n.filter(e=>e&&typeof e.x==`number`&&typeof e.y==`number`&&Number.isFinite(e.x)&&Number.isFinite(e.y)):[]}catch{return[]}},Fe=(e,t={x:0,y:0},n=`LM`)=>{if(e.tagName.toLowerCase()!==`path`)throw Error(`Invalid input: Expected an HTMLElement of tag "path", got ${e.tagName}`);let r=e.getAttribute(`d`);if(!r)throw Error(`Path element does not contain a "d" attribute`);let i=r.split(RegExp(`(?=[${n}])`)),a=i[0].substring(1).split(`,`).map(e=>parseFloat(e)),o=i[i.length-1].substring(1).split(`,`).map(e=>parseFloat(e)),s=i.map(e=>{let t=e[0],n=e.substring(1).split(`,`).map(e=>parseFloat(e));return t===`C`?{x:n[4],y:n[5],command:t}:{x:n[0],y:n[1],command:t}}).filter((e,t,n)=>{if(t===0||t===n.length-1)return!0;if(e.x===n[t-1].x&&e.y===n[t-1].y||t===n.length-2&&e.command===`C`)return!1;if(t===n.length-2&&(n[t-1].x===e.x||n[t-1].y===e.y)){let t=n[n.length-1];return Math.hypot(t.x-e.x,t.y-e.y)>20}return e.x!==n[t-1].x||e.y!==n[t-1].y}).map(e=>({x:e.x+t.x,y:e.y+t.y}));return{startX:a[0]+t.x,startY:a[1]+t.y,endX:o[0]+t.x,endY:o[1]+t.y,reflectionPoints:s}},Ie=e=>({...e,elements:e.elements.map(e=>{if(!(`points`in e)||!Array.isArray(e.points))return e;let t=e.points;if(t.length<2)return e;let n=z(t);return n.length===t.length?e:{...e,points:n}})}),Le=(e,t={})=>Ie((()=>{switch(e.type){case`graphImage`:return C.convert(e,t);case`flowchart`:return te.convert(e,t);case`sequence`:return se.convert(e,t);case`class`:return ce.convert(e,t);case`erd`:return le.convert(e,t);case`state`:return Ae.convert(e,t);default:throw Error(`graphToExcalidraw: unknown graph type "${e.type}, only flowcharts are supported!"`)}})()),V=e=>e.replace(/\s*!important\s*$/i,``).trim(),Re=(e,t)=>{let n=t;for(;n<e.length&&/\s/.test(e[n]);)n+=1;let r=n;for(;n<e.length&&/[a-z-]/i.test(e[n]);)n+=1;if(n===r)return!1;for(;n<e.length&&/\s/.test(e[n]);)n+=1;return e[n]===`:`},H=e=>{let t=[],n=0;for(;n<e.length;){for(;n<e.length&&/[\s;,]/.test(e[n]);)n+=1;if(n>=e.length)break;let r=n;for(;n<e.length&&e[n]!==`:`&&!(e[n]===`;`||e[n]===`,`);)n+=1;if(n>=e.length||e[n]!==`:`)break;let i=e.substring(r,n).trim().toLowerCase();n+=1;let a=n,o=0,s=null;for(;n<e.length;){let t=e[n];if(s){t===s&&e[n-1]!==`\\`&&(s=null),n+=1;continue}if(t===`"`||t===`'`){s=t,n+=1;continue}if(t===`(`){o+=1,n+=1;continue}if(t===`)`){o=Math.max(0,o-1),n+=1;continue}if(o===0&&(t===`;`||t===`,`||/\s/.test(t)&&Re(e,n)))break;n+=1}let c=V(e.substring(a,n));i&&c&&t.push({property:i,value:c}),n<e.length&&(e[n]===`;`||e[n]===`,`)&&(n+=1)}return t},U=e=>{let t=V(e);if(!t)return!1;if(typeof CSS<`u`&&typeof CSS.supports==`function`)return CSS.supports(`color`,t);if(typeof document<`u`){let e=document.createElement(`div`);return e.style.color=``,e.style.color=t,e.style.color!==``}return!1},ze=(e,t)=>{let n=e.getAttribute(`style`);return n&&H(n).find(e=>e.property===t)?.value||``},Be=(...e)=>{for(let t of e){let e=V(t||``);if(U(e))return e}},Ve=(e,t)=>{let n=e.querySelector(`text, foreignObject, div, span, p`)||e,r=Be(n.getAttribute?.(`fill`),ze(n,`fill`),n.style?.fill);if(r)return r;let i=Be(n.getAttribute?.(`color`),ze(n,`color`),n.style?.color);if(i)return i;let a=Be(t);if(a)return a},He=(e,t,n)=>{switch(t){case s.FILL:case s.STROKE:U(n)&&(e[t]=n);break;case s.STROKE_WIDTH:case s.STROKE_DASHARRAY:e[t]=n;break}},W=(e,t,n)=>{t===o.COLOR&&U(n)&&(e[o.COLOR]=n)},G=(e,t,n)=>{e&&H(e).forEach(({property:e,value:r})=>{He(t,e,r),W(n,e,r)})},Ue=(e,t)=>{e&&H(e).forEach(({property:e,value:n})=>{if(e===`fill`&&U(n)){t[o.COLOR]=n;return}W(t,e,n)})},We=(e,t)=>{e&&[[s.FILL,e.getAttribute(`fill`)],[s.STROKE,e.getAttribute(`stroke`)],[s.STROKE_WIDTH,e.getAttribute(`stroke-width`)],[s.STROKE_DASHARRAY,e.getAttribute(`stroke-dasharray`)]].forEach(([e,n])=>{let r=V(n||``);r&&He(t,e,r)})},Ge=(e,t)=>{if(!e)return;let n=V(e.getAttribute(`fill`)||e.getAttribute(`color`)||``);U(n)&&(t[o.COLOR]=n)},K=(e,t,n,r)=>{if(!(t instanceof Map))return;let i=t.get(e);i&&(i.styles?.forEach(e=>{H(e).forEach(({property:e,value:t})=>{He(n,e,t),W(r,e,t)})}),i.textStyles?.forEach(e=>{H(e).forEach(({property:e,value:t})=>{W(r,e,t)})}))},Ke=(e,t,n)=>{let r=e.nodes.map(e=>e.startsWith(`flowchart-`)?e.split(`-`)[1]:e),i=t.querySelector(`[id='${e.id}']`);if(!i)throw Error(`SubGraph element not found`);let a=Ye(i,t),o=i.getBBox(),s={width:o.width,height:o.height},c={},l={},u=i.querySelector(`:scope > rect, :scope > path, :scope > polygon, :scope > ellipse`)||i.querySelector(`.cluster > rect, .cluster > path, .cluster > polygon, .cluster > ellipse`)||i.querySelector(`rect, path, polygon, ellipse`);G(i.getAttribute(`style`),c,l),G(u?.getAttribute(`style`),c,l),We(u,c);let d=i.querySelector(`.cluster-label text, .cluster-label tspan`)||i.querySelector(`text`);return Ue(d?.getAttribute(`style`),l),Ge(d,l),K(e.id,n,c,l),e.classes?.forEach(e=>{K(e,n,c,l)}),{id:e.id,nodeIds:r,text:L(e.title),labelType:`text`,...a,...s,containerStyle:c,labelStyle:l}},qe=(e,t,n)=>{let r=t.querySelector(`[id*="${e.domId}"]`);if(!r)return;let i;r.parentElement?.tagName.toLowerCase()===`a`&&(i=r.parentElement.getAttribute(`xlink:href`));let a=Ye(i?r.parentElement:r,t),o=r.getBBox(),s={width:o.width,height:o.height},c={},l={};e.classes&&n instanceof Map&&(Array.isArray(e.classes)?e.classes:[e.classes]).forEach(e=>{K(e,n,c,l)}),e.styles?.forEach(e=>{G(e,c,l)});let u=r.querySelector(`.label-container`);return G(u?.getAttribute(`style`),c,l),We(u,c),Array.from(r.querySelectorAll(`.label, .nodeLabel, .label text, .label tspan, .label span, .label div`)).forEach(e=>{Ue(e.getAttribute(`style`),l),Ge(e,l)}),{id:e.id,labelType:e.labelType,text:L(e.text||``),type:e.type,link:i||void 0,...a,...s,containerStyle:c,labelStyle:l}},Je=(e,t,n)=>{let r=n.querySelector(`[id*="${e.id}"]`);if(!r)throw Error(`Edge element not found`);let i=Fe(r,Ye(r,n));return e.length=void 0,{...e,...i,text:L(e.text)}},Ye=(e,t)=>{if(!e)throw Error(`Element not found`);let n=e.parentElement?.parentElement,r=e.childNodes[0],i={x:0,y:0};if(r){let{transformX:e,transformY:t}=R(r),n=r.getBBox();i={x:Number(r.getAttribute(`x`))||e+n.x||0,y:Number(r.getAttribute(`y`))||t+n.y||0}}let{transformX:a,transformY:o}=R(e),s={x:a+i.x,y:o+i.y};for(;n&&n.id!==t.id;){if(n.classList.value===`root`&&n.hasAttribute(`transform`)){let{transformX:e,transformY:t}=R(n);s.x+=e,s.y+=t}n=n.parentElement}return s},Xe=(e,t)=>{let n=e.getVertices(),r=e.getEdges(),i=e.getSubGraphs(),a=e.getClasses(),o={},s=a instanceof Map?a:{};n instanceof Map?n.forEach((e,n)=>{o[n]=qe(e,t,s)}):typeof n==`object`&&n&&Object.entries(n).forEach(([e,n])=>{o[e]=qe(n,t,s)});let c=new Map,l=(Array.isArray(r)?r:[]).map(e=>{if(!t.querySelector(`[id*="${e.id}"]`))return null;let n=`${e.start}-${e.end}`,r=c.get(n)||0;return c.set(n,r+1),Je(e,r,t)}).filter(e=>e!==null&&e.reflectionPoints.length>1);return{type:`flowchart`,subGraphs:(Array.isArray(i)?i:[]).map(e=>Ke(e,t,s)),vertices:o,edges:l}},Ze=(e,t)=>{let n={};t?.label&&(n.label={text:L(t.label),fontSize:16});let r=e.tagName;if(r===`line`)n.startX=Number(e.getAttribute(`x1`)),n.startY=Number(e.getAttribute(`y1`)),n.endX=Number(e.getAttribute(`x2`)),n.endY=Number(e.getAttribute(`y2`));else if(r===`path`){let t=e.getAttribute(`d`);if(!t)throw Error(`Path element does not contain a "d" attribute`);let r=t.split(/(?=[LC])/),i=r[0].substring(1).split(`,`).map(e=>parseFloat(e)),a=[];r.forEach(e=>{let t=e.substring(1).trim().split(` `).map(e=>{let[t,n]=e.split(`,`);return[parseFloat(t)-i[0],parseFloat(n)-i[1]]});a.push(...t)});let o=a[a.length-1];n.startX=i[0],n.startY=i[1],n.endX=o[0],n.endY=o[1],n.points=a}t?.label&&(n.startY-=10,n.endY-=10);let i=e.getAttribute(`stroke`),a=(i&&i!==`none`?i:``)||getComputedStyle(e).stroke||``;return n.strokeColor=a?V(a):null,n.strokeWidth=Number(e.getAttribute(`stroke-width`)),n.type=`arrow`,n.strokeStyle=t?.strokeStyle||`solid`,n.startArrowhead=t?.startArrowhead||null,n.endArrowhead=t?.endArrowhead||null,n},Qe=(e,t,n,r,i)=>{let a={};return a.type=`arrow`,a.startX=e,a.startY=t,a.endX=n,a.endY=r,Object.assign(a,{...i}),a},q=(e,t,n,r)=>({type:`text`,x:e,y:t,text:n,width:r?.width||20,height:r?.height||20,fontSize:r?.fontSize||20,id:r?.id,color:r?.color,groupId:r?.groupId,metadata:r?.metadata}),$e=(e,t,n)=>{let r={},i=Number(e.getAttribute(`x`)),a=Number(e.getAttribute(`y`));r.type=`text`,r.text=L(t),n?.id&&(r.id=n.id),n?.groupId&&(r.groupId=n.groupId);let o=e.getBBox();return r.width=o.width,r.height=o.height,r.x=i-o.width/2,r.y=a,r.fontSize=parseInt(getComputedStyle(e).fontSize),r.color=Ve(e),r},J=(e,t,n={})=>{let r={};r.type=t;let{label:i,subtype:a,id:o,groupId:s}=n;r.id=o,s&&(r.groupId=s),i&&(r.label={text:L(i.text),fontSize:16,textAlign:i?.textAlign,verticalAlign:i?.verticalAlign});let c=e.getBBox();switch(r.x=c.x,r.y=c.y,r.width=c.width,r.height=c.height,r.subtype=a,a){case`highlight`:let t=e.getAttribute(`fill`);t&&(r.bgColor=V(t));break;case`note`:r.strokeStyle=`dashed`;break}return r},Y=(e,t,n,r,i,a)=>{let o={};o.startX=t,o.startY=n,o.endX=r,a?.groupId&&(o.groupId=a.groupId),a?.id&&(o.id=a.id),o.endY=i;let s=e.getAttribute(`stroke`);return o.strokeColor=s?V(s):null,o.strokeWidth=Number(e.getAttribute(`stroke-width`)),o.type=`line`,o},et={0:`SOLID`,1:`DOTTED`,3:`SOLID_CROSS`,4:`DOTTED_CROSS`,5:`SOLID_OPEN`,6:`DOTTED_OPEN`,24:`SOLID_POINT`,25:`DOTTED_POINT`},X={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32},tt=e=>{let t;switch(e){case X.SOLID:case X.SOLID_CROSS:case X.SOLID_OPEN:case X.SOLID_POINT:t=`solid`;break;case X.DOTTED:case X.DOTTED_CROSS:case X.DOTTED_OPEN:case X.DOTTED_POINT:t=`dotted`;break;default:t=`solid`;break}return t},nt=(e,t)=>{if(e.nextElementSibling?.classList.contains(`sequenceNumber`)){let n=e.nextElementSibling?.textContent;if(!n)throw Error(`sequence number not present`);let r={type:`rectangle`,x:t.startX-10,y:t.startY-15,label:{text:n,fontSize:14},bgColor:`#e9ecef`,height:30,subtype:`sequence`};Object.assign(t,{sequenceNumber:r})}},rt=(e,t,r)=>{if(!e)throw`root node not found`;let i=S(),a=Array.from(e.children),o=[];return a.forEach((e,a)=>{let s=`${r?.id}-${a}`,c;switch(e.tagName){case`line`:c=Y(e,Number(e.getAttribute(`x1`)),Number(e.getAttribute(`y1`)),Number(e.getAttribute(`x2`)),Number(e.getAttribute(`y2`)),{groupId:i,id:s});break;case`text`:c=$e(e,t,{groupId:i,id:s});break;case`circle`:c=J(e,`ellipse`,{label:e.textContent?{text:e.textContent}:void 0,groupId:i,id:s});default:c=J(e,n[e.tagName],{label:e.textContent?{text:e.textContent}:void 0,groupId:i,id:s})}o.push(c)}),o},it=(e,t)=>{let n=t.getAttribute(`fill`),r=t.getAttribute(`stroke`),i=t.getAttribute(`stroke-width`),a=t.getAttribute(`stroke-dasharray`);n&&n!==`none`&&(e.bgColor=V(n)),r&&r!==`none`&&(e.strokeColor=V(r)),i&&(e.strokeWidth=Number(i)),a&&a.trim()&&(e.strokeStyle=`dashed`)},at=(e,t)=>{let n=Array.from(t.querySelectorAll(`.actor-top`)),r=Array.from(t.querySelectorAll(`.actor-bottom`)),i=[],a=[],o={},s=e instanceof Map?Array.from(e.values()):Object.values(e),c=Array.from(t.querySelectorAll(`.actor-line`)),l=(e,t)=>{let n=e.name,r=c.find(e=>e.getAttribute(`name`)===n);if(r)return r;let i=e.type===`participant`?t.parentElement?.previousElementSibling:t.previousElementSibling;return i?i.tagName===`line`?i:i.querySelector(`line`):null};return s.forEach(e=>{let t=n.find(t=>t.getAttribute(`name`)===e.name),s=r.find(t=>t.getAttribute(`name`)===e.name);if(!t||!s)throw`root not found`;let c=e.description;if(e.type===`participant`){let n=J(t,`rectangle`,{id:`${e.name}-top`,label:{text:c},subtype:`actor`});if(it(n,t),!n)throw`Top Node element not found!`;i.push([n]);let r=J(s,`rectangle`,{id:`${e.name}-bottom`,label:{text:c},subtype:`actor`});o[e.name]={topId:`${e.name}-top`,bottomId:`${e.name}-bottom`,bindType:`rectangle`},it(r,s),i.push([r]);let u=l(e,t);if(u?.tagName!==`line`)throw`Line not found`;let d=Number(u.getAttribute(`x1`));if(!n.height)throw`Top node element height is null`;let f=n.y+n.height,p=r.y,m=Y(u,d,f,Number(u.getAttribute(`x2`)),p);a.push(m)}else if(e.type===`actor`){let n=rt(t,c,{id:`${e.name}-top`});i.push(n);let r=rt(s,c,{id:`${e.name}-bottom`});i.push(r);let u=l(e,t);if(u?.tagName!==`line`)throw`Line not found`;let d=Number(u.getAttribute(`x1`)),f=Number(u.getAttribute(`y1`)),p=Number(u.getAttribute(`x2`)),m=r.find(e=>e.type===`ellipse`);if(m){let e=m.y,t=Y(u,d,f,p,e);a.push(t)}let h=n.find(e=>e.type===`ellipse`),g=r.find(e=>e.type===`ellipse`);h?.id&&g?.id&&(o[e.name]={topId:h.id,bottomId:g.id,bindType:`ellipse`})}}),{nodes:i,lines:a,actorMap:o}},ot=(e,t,n)=>{let r=[],i=Array.from(t.querySelectorAll(`[class*="messageLine"]`)),a=Object.keys(et),o=e.filter(e=>a.includes(e.type.toString()));return i.forEach((e,t)=>{let i=o[t],a=et[i.type],s=Ze(e,{label:i?.message,strokeStyle:tt(i.type),endArrowhead:a===`SOLID_OPEN`||a===`DOTTED_OPEN`?null:`arrow`}),c=n[i.from],l=n[i.to];c?.topId&&l?.topId&&(s.start={type:c.bindType||`rectangle`,id:c.topId},s.end={type:l.bindType||`rectangle`,id:l.topId}),nt(e,s),r.push(s)}),r},st=(e,t)=>{let n=Array.from(t.querySelectorAll(`.note`)).map(e=>e.parentElement),r=e.filter(e=>e.type===X.NOTE),i=[];return n.forEach((e,t)=>{if(!e)return;let n=e.firstChild,a=r[t].message,o=J(n,`rectangle`,{label:{text:a},subtype:`note`}),s=n.getAttribute(`fill`),c=n.getAttribute(`stroke`),l=n.getAttribute(`stroke-width`),u=n.getAttribute(`stroke-dasharray`);s&&s!==`none`&&(o.bgColor=V(s)),c&&c!==`none`&&(o.strokeColor=V(c)),l&&(o.strokeWidth=Number(l)),u&&u.trim()&&(o.strokeStyle=`dashed`),i.push(o)}),i},ct=e=>{let t=Array.from(e.querySelectorAll(`[class*=activation]`)),n=[];return t.forEach(e=>{let t=J(e,`rectangle`,{label:{text:``},subtype:`activation`});(()=>{let n=e.getAttribute(`fill`),r=e.getAttribute(`stroke`),i=e.getAttribute(`stroke-width`),a=e.getAttribute(`stroke-dasharray`);n&&n!==`none`&&(t.bgColor=V(n)),r&&r!==`none`&&(t.strokeColor=V(r)),i&&(t.strokeWidth=Number(i)),a&&a.trim()&&(t.strokeStyle=`dashed`)})(),n.push(t)}),n},lt=(e,t)=>{let n=Array.from(t.querySelectorAll(`.loopLine`)),r=[],i=[],a=[];n.forEach(e=>{let t=Y(e,Number(e.getAttribute(`x1`)),Number(e.getAttribute(`y1`)),Number(e.getAttribute(`x2`)),Number(e.getAttribute(`y2`)));t.strokeStyle=`dotted`,t.strokeColor=`#adb5bd`,t.strokeWidth=2,r.push(t)});let o=Array.from(t.querySelectorAll(`.loopText`)),s=e.filter(e=>e.type===X.CRITICAL_START).map(e=>e.message);o.forEach(e=>{let t=e.textContent||``,n=$e(e,t),r=t.match(/\[(.*?)\]/)?.[1]||``;s.includes(r)&&(n.x+=16),i.push(n)});let c=Array.from(t?.querySelectorAll(`.labelBox`)),l=Array.from(t?.querySelectorAll(`.labelText`));return c.forEach((e,t)=>{let n=J(e,`rectangle`,{label:{text:l[t]?.textContent||``}});n.strokeColor=`#adb5bd`,n.bgColor=`#e9ecef`,n.width=void 0,a.push(n)}),{lines:r,texts:i,nodes:a}},ut=e=>{let t=Array.from(e.querySelectorAll(`.rect`)).filter(e=>e.parentElement?.tagName!==`g`),n=[];return t.forEach(e=>{let t=J(e,`rectangle`,{label:{text:``},subtype:`highlight`});n.push(t)}),n},dt=(e,t)=>{let n=e.db,r=[],i=n.getBoxes().map(e=>({...e,fill:V(e.fill||``)})),a=ut(t),{nodes:o,lines:s,actorMap:c}=at(n.getActors(),t),l=n.getMessages(),u=ot(l,t,c),d=st(l,t),f=ct(t),p=lt(l,t);return r.push(a),r.push(...o),r.push(d),r.push(f),{type:`sequence`,lines:s,arrows:u,nodes:r,loops:p,groups:i}},ft=e=>{let t={};return e&&e.forEach(e=>{H(e).forEach(({property:e,value:n})=>{e&&n&&(t[e]=V(n))})}),t},Z={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},pt={LINE:0,DOTTED_LINE:1},mt=16,ht=e=>{let t;switch(e){case pt.LINE:t=`solid`;break;case pt.DOTTED_LINE:t=`dotted`;break;default:t=`solid`}return t},gt=e=>{let t;switch(e){case Z.AGGREGATION:t=`diamond_outline`;break;case Z.COMPOSITION:t=`diamond`;break;case Z.EXTENSION:t=`triangle_outline`;break;case`none`:t=null;break;case Z.DEPENDENCY:default:t=`arrow`;break}return t},_t=(e,t)=>{let n=0,r=0,i=e;for(;i&&i!==t;){let{transformX:e,transformY:t}=R(i);n+=e,r+=t,i=i.parentElement}return{tx:n,ty:r}},vt=new Set([`triangle_outline`,`diamond`,`diamond_outline`]),yt=(e,t=.5)=>{if(e.length<=2)return[...e];let n=[e[0]];for(let r=1;r<e.length-1;r++){let i=n[n.length-1],a=e[r],o=e[r+1],s=o.x-i.x,c=o.y-i.y,l=Math.hypot(s,c);if(!l)continue;let u=Math.abs(s*(a.y-i.y)-c*(a.x-i.x))/l,d=((a.x-i.x)*s+(a.y-i.y)*c)/(l*l);u<=t&&d>=-t&&d<=1+t||n.push(a)}return n.push(e[e.length-1]),n},bt=e=>{let t=z(Pe(e).map(e=>[e.x,e.y])).map(([e,t])=>({x:e,y:t})),n=B(e);return n&&t.length>=2&&(t[0]={x:n.startX,y:n.startY},t[t.length-1]={x:n.endX,y:n.endY}),yt(t)},xt=(e,t,n)=>{let r=e.x-t.x,i=e.y-t.y,a=Math.hypot(r,i);return a?{x:e.x+r/a*n,y:e.y+i/a*n}:e},St=(e,t)=>{let n=z(t.map(e=>[e.x,e.y])).map(([e,t])=>({x:e,y:t}));if(n.length<2)throw Error(`Arrow route must contain at least two points`);let r=n[0],i=n[n.length-1];e.startX=r.x,e.startY=r.y,e.endX=i.x,e.endY=i.y,e.points=n.map(e=>[e.x-r.x,e.y-r.y])},Ct=e=>{let t=e.points?.map(([t,n])=>({x:e.startX+t,y:e.startY+n})).filter(e=>Number.isFinite(e.x)&&Number.isFinite(e.y));if(!t||t.length<2)return e;let n=[...t],r=!!e.startArrowhead&&vt.has(e.startArrowhead),i=!!e.endArrowhead&&vt.has(e.endArrowhead);if(!r&&!i)return e;if(r&&(n[0]=xt(n[0],n[1],mt)),i){let e=n.length-1;n[e]=xt(n[e],n[e-1],mt)}return St(e,n),e},wt=(e,t)=>{let n=V(e.getAttribute(`stroke`)||getComputedStyle(e).stroke||``),r=parseFloat(e.getAttribute(`stroke-width`)||getComputedStyle(e).strokeWidth||`1`);U(n)&&n!==`none`&&(t.strokeColor=n),Number.isFinite(r)&&r>0&&(t.strokeWidth=r)},Tt=e=>{let t=[];return e.forEach(e=>{bt(e).forEach(e=>{let n=t[t.length-1];n&&n.x===e.x&&n.y===e.y||t.push(e)})}),yt(t)},Et=(e,t,n)=>{if(e.length<2)throw Error(`Class diagram edge ${t?.id||`<unknown>`} is missing usable path points`);let r=e[0],i=e[e.length-1],a=Qe(r.x,r.y,i.x,i.y,{id:t?.getAttribute(`data-id`)||t?.id||void 0,...n,points:e.map(e=>[e.x-r.x,e.y-r.y])});return t&&wt(t,a),Ct(a)},Dt=(e,t)=>Et(Tt(e),e[0],t),Ot=(e,t)=>{let n=bt(e);return Et([n[0],n[n.length-1]],e,t)},kt=(e,t)=>Dt([e],t),At=(e,t)=>[`${e}-cyclic-special-1`,`${e}-cyclic-special-mid`,`${e}-cyclic-special-2`].map(e=>t.querySelector(`path[id="${e}"][data-edge="true"]`)).filter(e=>e!==null),jt=e=>e.points?.map(([t,n])=>({x:e.startX+t,y:e.startY+n})).filter(e=>Number.isFinite(e.x)&&Number.isFinite(e.y))||[],Mt=(e,t)=>{let n=jt(e);if(n.length<2)return null;let r=t===`start`,i=r?n[0]:n[n.length-1],a=r?n[1]:n[n.length-2],o=a.x===i.x?r?-1:1:Math.sign(a.x-i.x),s=a.y===i.y?1:Math.sign(a.y-i.y);return{x:i.x+o*20,y:i.y+(s>=0?12:-28)}},Nt=(e,t)=>{let n=e;for(;n&&n!==t;){if(n.classList.contains(`annotation-group`)||n.classList.contains(`label-group`))return`header`;if(n.classList.contains(`members-group`))return`members`;if(n.classList.contains(`methods-group`))return`methods`;n=n.parentElement}return`other`},Pt=(e,t,n)=>{let r=[],i=[],a=[];return Object.values(e).forEach(e=>{let{domId:o,id:s}=e,c=S(),l=ft(e.styles||e.cssStyles),u;try{u=n?n(s):void 0}catch{u=void 0}let d=u&&t.querySelector(`#${u}`)||t.querySelector(`#${o}`)||t.querySelector(`[data-id='${s}']`)||(e=>{let n=RegExp(`^classId-${e}(?:-|$)`);return Array.from(t.querySelectorAll(`[id]`)).filter(e=>n.test(e.id))[0]})(s);if(!d)throw Error(`DOM Node with id ${o} not found`);let f=d.querySelector(`rect`)||d,p=f.getBBox(),{tx:m,ty:h}=_t(f,t),g={type:`rectangle`,id:s,groupId:c,x:p.x+m,y:p.y+h,width:p.width,height:p.height,metadata:{classId:s}},_=f.getAttribute(`fill`),v=f.getAttribute(`stroke`),y=f.getAttribute(`stroke-width`),b=f.getAttribute(`stroke-dasharray`),x=getComputedStyle(f),ee=V(_||l.fill||(_?x.fill:``)),te=V(v||l.stroke||(v?x.stroke:``)),C=y||l[`stroke-width`]||(y?x.strokeWidth:``),w=b||l[`stroke-dasharray`]||(b?x.strokeDasharray===`none`?``:x.strokeDasharray:``),T=e=>{if(!e||!U(e))return!1;let t=e.toLowerCase();return!(t===`none`||t===`transparent`||t===`rgba(0, 0, 0, 0)`||t===`black`||t===`#000`||t===`#000000`||t===`rgb(0, 0, 0)`||t===`rgba(0, 0, 0, 1)`)};T(ee)?g.bgColor=ee:g.bgColor=void 0,T(te)?g.strokeColor=te:g.strokeColor=void 0,C?g.strokeWidth=Number(C):g.strokeWidth=void 0,w&&w.trim().length>0?g.strokeStyle=`dashed`:g.strokeStyle=void 0,r.push(g),[...Array.from(d.querySelectorAll(`line`)),...Array.from(d.querySelectorAll(`g.divider path`))].forEach(e=>{let{tx:n,ty:r}=_t(e,t),a,o,l,u;if(e.tagName.toLowerCase()===`line`)a=Number(e.getAttribute(`x1`))+n,o=Number(e.getAttribute(`y1`))+r,l=Number(e.getAttribute(`x2`))+n,u=Number(e.getAttribute(`y2`))+r;else{let t=e.getBBox();a=t.x+n,l=t.x+t.width+n;let i=t.y+t.height/2+r;o=i,u=i}if(a===l&&o===u)return;let d=Y(e,a,o,l,u,{groupId:c,id:S()});g.strokeColor?d.strokeColor=g.strokeColor:d.strokeColor=void 0,g.strokeWidth===void 0?d.strokeWidth=void 0:d.strokeWidth=g.strokeWidth,g.strokeStyle?d.strokeStyle=g.strokeStyle:d.strokeStyle=void 0,d.metadata={classId:s},i.push(d)});let E=Array.from(d.querySelectorAll(`text, foreignObject`)),D=[];E.forEach(e=>{let n=e.tagName.toLowerCase()===`foreignobject`,r=n?[]:Array.from(e.querySelectorAll(`tspan`)),i=r.length?r.map(e=>e.textContent?.trim()).filter(Boolean).join(`
|
|
15
|
-
`):e.textContent?.trim()||``;if(!i)return;let a=e.getBBox(),{ty:o}=_t(e,t),s=parseFloat(getComputedStyle(e).fontSize||``);if(n&&(!Number.isFinite(s)||!s)){let t=e.querySelector(`div, span, p`);t&&(s=parseFloat(getComputedStyle(t).fontSize||``))}(!Number.isFinite(s)||s<=0)&&(s=Math.max(12,a.height*.6)),s*=.9;let c=Ve(e,l.color);D.push({section:Nt(e,d),text:L(i),x:a.x,y:a.y+o,width:g&&g.width?Math.max(g.width-8,a.width):a.width,height:a.height,fontSize:s,color:c})});let O=D.filter(e=>e.section===`header`).sort((e,t)=>e.y-t.y||e.x-t.x);if(!g.label){let e=O.length===0&&D.length===1?D:O;e.length>0&&(g.label={text:e.map(e=>e.text).join(`
|
|
16
|
-
`),fontSize:Math.max(...e.map(e=>e.fontSize)),color:e.find(e=>e.color)?.color,verticalAlign:`top`})}D.filter(e=>O.length>0?e.section!==`header`:!(g.label&&D.length===1)).forEach(e=>{let t=q((g?.x||0)+4,e.y,e.text,{width:e.width,height:e.height,fontSize:e.fontSize,color:e.color,id:S(),groupId:c,metadata:{classId:s}});a.push(t)})}),{nodes:r,lines:i,text:a}},Ft=(e,t,n,r)=>{let i=Array.from(n.querySelectorAll(`.edgePaths path[data-edge="true"]:not([id^="edgeNote"]):not([id*="-cyclic-special-"])`));if(e.length===0)return{arrows:[],text:[]};let a=[],o=[],s=0;return e.forEach(e=>{let{id1:c,id2:l,relation:u}=e,d=t.find(e=>e.id===c),f=t.find(e=>e.id===l);if(!d)throw Error(`parseRelations: Cannot find node with id ${c}`);if(!f)throw Error(`parseRelations: Cannot find node with id ${l}`);let p=ht(u.lineType),m=gt(u.type1),h=gt(u.type2),g;if(c===l){let t=At(c,n);if(!t.length)throw Error(`parseRelations: Cannot find rendered SVG edge for relation ${c} -> ${l}`);g=Dt(t,{strokeStyle:p,startArrowhead:m,endArrowhead:h,label:e.title?{text:e.title}:void 0,start:{type:`rectangle`,id:d.id},end:{type:`rectangle`,id:f.id}})}else{let t=i[s];if(!t)throw Error(`parseRelations: Cannot find rendered SVG edge for relation ${c} -> ${l}`);s+=1,g=Ot(t,{strokeStyle:p,startArrowhead:m,endArrowhead:h,label:e.title?{text:e.title}:void 0,start:{type:`rectangle`,id:d.id},end:{type:`rectangle`,id:f.id}})}a.push(g);let{relationTitle1:_,relationTitle2:v}=e,y=c===l,b,x;if(_&&_!==`none`){if(y){let e=Mt(g,`start`);e&&(b=e.x,x=e.y)}else switch(r){case`TB`:b=g.startX-20,g.endX<g.startX&&(b-=15),x=g.startY+15;break;case`BT`:b=g.startX+20,g.endX>g.startX&&(b+=15),x=g.startY-15;break;case`LR`:b=g.startX+20,x=g.startY+15,g.endY>g.startY&&(x+=15);break;case`RL`:b=g.startX-20,x=g.startY-15,g.startY>g.endY&&(x-=15);break;default:b=g.startX-20,x=g.startY+15}b??=g.startX-20,x??=g.startY+15;let e=q(b,x,_,{fontSize:16});o.push(e)}if(v&&v!==`none`){if(y){let e=Mt(g,`end`);e&&(b=e.x,x=e.y)}else switch(r){case`TB`:b=g.endX+20,g.endX<g.startX&&(b+=15),x=g.endY-15;break;case`BT`:b=g.endX-20,g.endX>g.startX&&(b-=15),x=g.endY+15;break;case`LR`:b=g.endX-20,x=g.endY-15,g.endY>g.startY&&(x-=15);break;case`RL`:b=g.endX+20,x=g.endY+15,g.startY>g.endY&&(x+=15);break;default:b=g.endX+20,x=g.endY-15}b??=g.endX+20,x??=g.endY+15;let e=q(b,x,v,{fontSize:16});o.push(e)}}),{arrows:a,text:o}},It=(e,t,n)=>{let r=[],i=[];return e.forEach((e,a)=>{let{id:o,text:s,class:c}=e,l=t.querySelector(`#${o}`);if(!l)throw Error(`Node with id ${o} not found!`);let{transformX:u,transformY:d}=R(l),f=l.firstChild,p=J(f,`rectangle`,{id:o,subtype:`note`,label:{text:s}});if(Object.assign(p,{x:p.x+u,y:p.y+d}),r.push(p),c){let e=n.find(e=>e.id===c);if(!e)throw Error(`class node with id ${c} not found!`);let r=t.querySelector(`path[id="edgeNote${a+1}"][data-edge="true"]`);if(r){i.push(kt(r,{strokeStyle:`dotted`,startArrowhead:null,endArrowhead:null,start:{id:p.id,type:`rectangle`},end:{id:e.id,type:`rectangle`}}));return}let o=p.x+(p.width||0)/2,s=p.y+(p.height||0),l=o,u=e.y,d=Qe(o,s,l,u,{strokeStyle:`dotted`,startArrowhead:null,endArrowhead:null,start:{id:p.id,type:`rectangle`},end:{id:e.id,type:`rectangle`}});i.push(d)}}),{notes:r,connectors:i}},Lt=(e,t)=>{let n=e.db,r=n.getDirection?.()||`TB`,i=[],a=[],o=[],s=[],c=n.getNamespaces?.()||[],l=n.getClasses?.()||{},u=l instanceof Map?Object.fromEntries(l):l;if(u&&Object.keys(u).length){let e=Pt(u,t,typeof n.lookUpDomId==`function`?n.lookUpDomId.bind(n):void 0);i.push(e.nodes),a.push(...e.lines),o.push(...e.text),s.push(...e.nodes)}let{arrows:d,text:f}=Ft(n.getRelations?.()||[],s,t,r),{notes:p,connectors:m}=It(n.getNotes?.()||[],t,s);return i.push(p),d.push(...m),o.push(...f),{type:`class`,nodes:i,lines:a,arrows:d,text:o,namespaces:c}},Rt=18,zt=e=>{let t={};return e&&e.forEach(e=>{H(e).forEach(({property:e,value:n})=>{e&&n&&(t[e]=V(n))})}),t},Bt=e=>{if(e==null||e===``)return;let t=typeof e==`number`?e:parseFloat(V(e));if(!(!Number.isFinite(t)||t<=0))return t},Vt=(e,t)=>{let n=0,r=0,i=e;for(;i&&i!==t;){let{transformX:e,transformY:t}=R(i);n+=e,r+=t,i=i.parentElement}return{tx:n,ty:r}},Ht=e=>{let t=Array.from(e.querySelectorAll(`tspan`));return L(t.length?t.map(e=>e.textContent?.trim()).filter(Boolean).join(`
|
|
17
|
-
`):e.textContent?.trim()||``)},Ut=e=>{let t=e.querySelector(`text, foreignObject, div, span, p`)||e,n=parseFloat(getComputedStyle(t).fontSize||``);return(!Number.isFinite(n)||n<=0)&&(n=Math.max(12,e.getBBox().height*.75)),n},Wt=(e,t,n)=>{let r=Ht(e);if(!r)return null;let i=e.getBBox(),{tx:a,ty:o}=Vt(e,t);return{className:e.getAttribute(`class`)||``,text:r,x:i.x+a,y:i.y+o,width:i.width,height:i.height,fontSize:Ut(e),color:Ve(e,n)}},Gt=(e,t,n,r,i,a,o)=>{let{tx:s,ty:c}=Vt(e,t),l=0,u=0,d=0,f=0;if(e.tagName.toLowerCase()===`line`)l=Number(e.getAttribute(`x1`))+s,u=Number(e.getAttribute(`y1`))+c,d=Number(e.getAttribute(`x2`))+s,f=Number(e.getAttribute(`y2`))+c;else{let t=B(e);if(!t)return null;l=t.startX+s,u=t.startY+c,d=t.endX+s,f=t.endY+c}let p={type:`line`,id:S(),groupId:n,startX:l,startY:u,endX:d,endY:f,metadata:{entityId:r}};return i&&U(i)&&i!==`none`&&(p.strokeColor=i),a!==void 0&&(p.strokeWidth=a),o&&(p.strokeStyle=o),p},Kt=e=>{switch(e?.toLowerCase()){case`one`:return`cardinality_one`;case`many`:return`cardinality_many`;case`only_one`:return`cardinality_exactly_one`;case`one_or_more`:return`cardinality_one_or_many`;case`zero_or_one`:return`cardinality_zero_or_one`;case`zero_or_more`:return`cardinality_zero_or_many`;default:return null}},qt=e=>{switch(e){case`dotted`:return`dotted`;case`dashed`:return`dashed`;default:return`solid`}},Jt=(e,t)=>{let n=t.querySelector(`path[id="${e.id}"][data-edge="true"]`);return n?[n]:e.start===e.end?[`${e.start}-cyclic-special-1`,`${e.start}-cyclic-special-mid`,`${e.start}-cyclic-special-2`].map(e=>t.querySelector(`path[id="${e}"][data-edge="true"]`)).filter(e=>e!==null):[]},Yt=e=>{let t=[];return e.forEach(e=>{Pe(e).forEach(e=>{let n=t[t.length-1];n&&n.x===e.x&&n.y===e.y||t.push(e)})}),t},Xt=(e,t)=>{let n=t.querySelector(`[id="${e.id}"]`);if(!n)throw Error(`ER entity ${e.id} not found in rendered SVG`);let r=e.attributes.length?S():void 0,i=n.getBBox(),{tx:a,ty:o}=Vt(n,t),s=zt([...e.cssStyles||[],...e.cssCompiledStyles||[]]),c=V(s.fill||``),l=V(s.stroke||``),u=Bt(s[`stroke-width`]),d=V(s[`stroke-dasharray`]||``),f=Array.from(n.querySelectorAll(`g.label`)).map(e=>Wt(e,t,s.color)).filter(e=>e!==null),p=f.find(e=>e.className.includes(`name`))||f[0],m=f.filter(e=>e!==p),h=p?.text||L(e.alias||e.label||``),g={type:`rectangle`,id:e.id,groupId:r,x:i.x+a,y:i.y+o,width:i.width,height:i.height,label:{text:h,fontSize:e.attributes.length?Rt:p?.fontSize||16,color:p?.color,textAlign:`center`,verticalAlign:e.attributes.length?`top`:`middle`},metadata:{entityId:e.id,entityLabel:e.label,entityAlias:e.alias}};return U(c)&&c!==`none`&&(g.bgColor=c),U(l)&&l!==`none`&&(g.strokeColor=l),u&&Number.isFinite(u)&&u>0&&(g.strokeWidth=u),d&&d!==`none`&&(g.strokeStyle=`dashed`),{container:g,lines:Array.from(n.querySelectorAll(`.divider path, path.divider, line.divider`)).map(n=>Gt(n,t,r,e.id,g.strokeColor,g.strokeWidth,g.strokeStyle)).filter(e=>e!==null),text:m.map(t=>q(t.x,t.y,t.text,{id:S(),groupId:r,width:t.width,height:t.height,fontSize:Rt,color:t.color,metadata:{entityId:e.id}}))}},Zt=(e,t)=>{let n=Jt(e,t);if(!n.length)throw Error(`ER relationship ${e.id} not found in rendered SVG`);let r=Yt(n);if(r.length<2)throw Error(`ER relationship ${e.id} is missing usable path points`);let i=r[0],a=r[r.length-1],o=n[0],s=V(o.getAttribute(`stroke`)||getComputedStyle(o).stroke||``),c=Number(o.getAttribute(`stroke-width`)||getComputedStyle(o).strokeWidth||1),l=Qe(i.x,i.y,a.x,a.y,{id:e.id,label:e.label?{text:L(e.label),fontSize:16,textAlign:`center`}:void 0,strokeStyle:qt(e.pattern),startArrowhead:Kt(e.arrowTypeStart),endArrowhead:Kt(e.arrowTypeEnd),start:{type:`rectangle`,id:e.start},end:{type:`rectangle`,id:e.end},points:r.map(e=>[e.x-i.x,e.y-i.y])});return U(s)&&s!==`none`&&(l.strokeColor=s),Number.isFinite(c)&&c>0&&(l.strokeWidth=c),l},Qt=(e,t)=>{let n=e.getData(),r=n.nodes,i=n.edges,a=[],o=[],s=[];r.forEach(e=>{let n=Xt(e,t);a.push(n.container),o.push(...n.lines),s.push(...n.text)});let c=i.map(e=>Zt(e,t));return{type:`erd`,nodes:[a],lines:o,arrows:c,text:s}},Q=e=>{let t=V(e||``);return!t||t===`none`||t===`transparent`||t===`rgba(0, 0, 0, 0)`||t===`rgba(0,0,0,0)`?!1:U(t)},$t=(e,t,n)=>{switch(t){case s.FILL:case s.STROKE:Q(n)&&(e[t]=V(n));break;case s.STROKE_WIDTH:case s.STROKE_DASHARRAY:V(n)&&(e[t]=V(n));break}},en=(e,t,n)=>{t===o.COLOR&&Q(n)&&(e[o.COLOR]=V(n))},tn=(e,t,n)=>{e&&H(e).forEach(({property:e,value:r})=>{$t(t,e,r),en(n,e,r)})},nn=(e,t)=>{e&&H(e).forEach(({property:e,value:n})=>{if(e===s.FILL&&Q(n)){t[o.COLOR]=V(n);return}en(t,e,n)})},rn=e=>{let t=new Set;return e.filter(Boolean).forEach(e=>{H(e||``).forEach(({property:e})=>{t.add(e)})}),t},an=(e,t,n)=>{e&&[[s.FILL,e.getAttribute(`fill`)],[s.STROKE,e.getAttribute(`stroke`)],[s.STROKE_WIDTH,e.getAttribute(`stroke-width`)],[s.STROKE_DASHARRAY,e.getAttribute(`stroke-dasharray`)]].forEach(([e,r])=>{if(!n.has(e)||t[e])return;let i=V(r||``);i&&$t(t,e,i)})},on=(e,t,n)=>{if(!e)return;let r=[e,...Array.from(e.querySelectorAll(`text, foreignObject, div, span, p`))];for(let e of r){if(t[o.COLOR]||(n.has(o.COLOR)||n.has(s.FILL))&&(nn(e.getAttribute(`style`),t),t[o.COLOR]))break;let r=V(e.getAttribute(`fill`)||e.getAttribute(`color`)||``);(n.has(o.COLOR)||n.has(s.FILL))&&Q(r)&&(t[o.COLOR]=r)}},sn=(e,t)=>{let n=0,r=0,i=e;for(;i&&i!==t;){let{transformX:e,transformY:t}=R(i);n+=e,r+=t,i=i.parentElement}return{tx:n,ty:r}},cn=(e,t)=>{let n=e.getBBox(),{tx:r,ty:i}=sn(e,t);return{x:n.x+r,y:n.y+i,width:n.width,height:n.height}},ln=(e,t)=>{let n=e.querySelector(`line.divider`);if(!n)return;let{tx:r,ty:i}=sn(n,t);return{startX:Number(n.getAttribute(`x1`))+r,startY:Number(n.getAttribute(`y1`))+i,endX:Number(n.getAttribute(`x2`))+r,endY:Number(n.getAttribute(`y2`))+i}},un=e=>{let t=e.getBBox();return Math.abs(t.width*t.height)},dn=(e,t)=>{let n=e.getAttribute(`style`);if(!n)return;let r=H(n).find(e=>e.property===t);if(r)return V(r.value)},$=(e,t)=>{let n=e.map(e=>({element:e,area:un(e)})).filter(({area:e})=>Number.isFinite(e)&&e>0);return n.length===0?null:n.sort((e,n)=>t===`largest`?n.area-e.area:e.area-n.area)[0].element},fn=(e,t)=>{if(!e||!t.has(s.FILL)&&!t.has(s.STROKE))return;let n=V(e.getAttribute(`fill`)||dn(e,s.FILL)||``),r=V(e.getAttribute(`stroke`)||dn(e,s.STROKE)||``);if(Q(n))return n;if(Q(r))return r},pn=(e,t)=>fn($(Array.from(e.querySelectorAll(`circle, ellipse, path`)),`smallest`),t),mn=e=>{if(e.length<2)return e;let t=e.slice(1),n=t.filter(e=>e.trim().length>0).reduce((e,t)=>{let n=t.match(/^\s*/)?.[0].length??0;return Math.min(e,n)},1/0);return!Number.isFinite(n)||n<=0?e.map(e=>e.trimEnd()):[e[0].trimEnd(),...t.map(e=>e.replace(RegExp(`^\\s{0,${n}}`),``).trimEnd())]},hn=e=>mn(Array.isArray(e.label)?e.label.map(e=>L(e)):L(e.label||``).split(`
|
|
18
|
-
`)).join(`
|
|
19
|
-
`),gn=e=>e.description?(Array.isArray(e.description)?e.description:[e.description]).map(e=>L(e)).filter(e=>e.length>0):[],_n=e=>{let t=new Set,n=e=>(e&&t.add(e),e),r=e=>n(e.find(e=>!t.has(e))||null);return t=>{let i=[`[id='${t.domId}']`,`[id='${t.id}']`,`[data-id='${t.id}']`];for(let t of i){let r=e.querySelector(t);if(r)return n(r)}switch(t.shape){case`divider`:return r(Array.from(e.querySelectorAll(`g.statediagram-cluster-alt`)));case`stateStart`:return r(Array.from(e.querySelectorAll(`g.node.default`)).filter(e=>e.querySelector(`circle.state-start`)));case`stateEnd`:return r(Array.from(e.querySelectorAll(`g.node.default`)).filter(e=>!e.querySelector(`circle.state-start`)));default:return null}}},vn=(e,t)=>{switch(t){case`roundedWithTitle`:return e.querySelector(`rect.outer`)||e.querySelector(`rect`)||e;case`divider`:return e.querySelector(`rect.divider`)||e.querySelector(`rect`)||e;case`rectWithTitle`:return e.querySelector(`rect.outer`)||e.querySelector(`rect`)||e;case`stateStart`:return $(Array.from(e.querySelectorAll(`circle, ellipse, path`)),`largest`)||e;case`stateEnd`:return $(Array.from(e.querySelectorAll(`circle, ellipse, path`)),`largest`)||e;default:return e.querySelector(`rect, path, circle, ellipse, polygon`)||e}},yn=(e,t,n)=>{let r=n(e);if(!r)throw Error(`State node element not found for "${e.id}"`);let i=vn(r,e.shape),a={},o={},s=[e.labelStyle,...e.cssCompiledStyles||[],...e.cssStyles||[]],c=rn(s);s.filter(Boolean).forEach(e=>{tn(e,a,o)}),an(i,a,c),on(r,o,c);let l=cn(i,t);return{id:e.id,shape:e.shape,text:hn(e),description:gn(e),x:l.x,y:l.y,width:l.width,height:l.height,parentId:e.parentId,position:e.position,containerStyle:a,labelStyle:o,dividerLine:e.shape===`rectWithTitle`?ln(r,t):void 0,endInnerColor:e.shape===`stateEnd`?pn(r,c):void 0,isRenderable:e.shape!==`noteGroup`}},bn=(e,t)=>{let n=t.querySelector(`[id='${e.id}']`);if(!n)return null;let{tx:r,ty:i}=sn(n,t),a=Fe(n,{x:r,y:i},`MCL`);if(a.reflectionPoints.length<2)return null;let o={},c=(e,t)=>{switch(e){case s.STROKE:Q(t)&&(o.strokeColor=V(t));break;case s.STROKE_WIDTH:{let e=parseFloat(V(t));Number.isFinite(e)&&e>0&&(o.strokeWidth=e);break}case s.STROKE_DASHARRAY:V(t)&&(o.strokeStyle=`dashed`);break}};[e.style].filter(Boolean).forEach(e=>{H(e||``).forEach(({property:e,value:t})=>{c(e,t)})});let l=e.arrowhead===`none`||e.classes?.includes(`note-edge`);return{id:e.id,start:e.start,end:e.end,text:L(e.label||``),...a,strokeColor:o.strokeColor,strokeWidth:o.strokeWidth,strokeStyle:l?`dashed`:o.strokeStyle,isNoteEdge:l}},xn=(e,t)=>{let{nodes:n,edges:r}=e.getData(),i=_n(t);return{type:`state`,nodes:n.map(e=>yn(e,t,i)),edges:r.map(e=>bn(e,t)).filter(e=>e!==null)}},Sn=Promise.resolve(),Cn=e=>{let t=Sn.then(e,e);return Sn=t.then(()=>void 0,()=>void 0),t},wn=null,Tn=0,En=e=>JSON.stringify(e),Dn=e=>{let t=e.querySelector(`svg`);if(!t)throw Error(`SVG element not found`);let n=t.getBoundingClientRect(),r=n.width,i=n.height;t.setAttribute(`width`,`${r}`),t.setAttribute(`height`,`${i}`);let a=unescape(encodeURIComponent(t.outerHTML));return{type:`graphImage`,mimeType:`image/svg+xml`,dataURL:`data:image/svg+xml;base64,${btoa(a)}`,width:r,height:i}},On=async(e,n=r)=>Cn(async()=>{let i=n.themeVariables?.fontSize??r.themeVariables.fontSize,a={...r,...n,fontSize:i,themeVariables:{...r.themeVariables,...n.themeVariables,fontSize:i}},o=En(a);o!==wn&&(t.initialize(a),wn=o);let s=await t.mermaidAPI.getDiagramFromText(je(e)),c=`mermaid-to-excalidraw-${Tn++}`,l=document.createElement(`div`);l.setAttribute(`style`,`opacity: 0; position: fixed; z-index: -1; left: -99999px; top: -99999px;`);let u=`${c}-container`;l.id=u,document.getElementById(u)?.remove(),document.body.appendChild(l);try{let{svg:n}=await t.render(c,e,l);l.innerHTML=n;let r;try{switch(s.type){case`flowchart-v2`:case`graph`:r=Xe(s.db,l);break;case`sequence`:r=dt(s,l);break;case`class`:case`classDiagram`:r=Lt(s,l);break;case`er`:r=Qt(s.db,l);break;case`state`:case`stateDiagram`:r=xn(s.db,l);break;default:r=Dn(l)}}catch(e){console.error(`Error processing Mermaid diagram:`,e),r=Dn(l)}return r}finally{l.remove()}}),kn=async(e,t)=>{let n=t||{},r=parseInt(n.themeVariables?.fontSize??``)||20;return Le(await On(e,{...n,themeVariables:{...n.themeVariables}}),{fontSize:r})};export{kn as parseMermaidToExcalidraw};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./src-Cdq2Q5Qg.js";import"./chunk-WYO6CB5R-DpZX-_mW.js";import"./chunk-ICXQ74PX-BQe1Tadw.js";import"./chunk-ZIRB5QZD-MDehklKw.js";import"./chunk-C7G6YPKG-DNj4qHp9.js";import"./chunk-OGEWGWER-CazgdTF7.js";import"./chunk-HOUHSVGY-fSFxsWEA.js";import"./chunk-Q4XR5HBZ-CUaphLMo.js";import"./chunk-ZGVPDNZ5-CQ5EdC_w.js";import"./chunk-7BUUIJ7U-C4LcvRKI.js";import"./chunk-52WLFC77-BxWUWkZN.js";import"./chunk-FWX5IMBZ-B2SauNuc.js";import"./chunk-32BRIVSS-BGfEotqY.js";import"./chunk-XXDRQBXY-HZnulEE8.js";import"./chunk-VR4S4FIN-V7_7sr9q.js";import{n as e}from"./chunk-PUDLZKDR-Cjq7brjA.js";export{e as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./dist-Dkm48MhE.js";import{t as e}from"./dist-XgwTV-oh2.js";import{t}from"./messages-CS_N86Ei.js";e.load(`en`,t.messages),e.activate(`en`);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./mermaid.core-DOV4ohAA.js";export{e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-6OZAfZOy.js";import"./src-Cdq2Q5Qg.js";import"./chunk-WYO6CB5R-DpZX-_mW.js";import"./chunk-ICXQ74PX-BQe1Tadw.js";import"./chunk-C7G6YPKG-DNj4qHp9.js";import"./chunk-OGEWGWER-CazgdTF7.js";import"./chunk-HOUHSVGY-fSFxsWEA.js";import"./chunk-Q4XR5HBZ-CUaphLMo.js";import"./chunk-ZGVPDNZ5-CQ5EdC_w.js";import"./chunk-7BUUIJ7U-C4LcvRKI.js";import"./chunk-52WLFC77-BxWUWkZN.js";import"./chunk-FWX5IMBZ-B2SauNuc.js";import"./chunk-32BRIVSS-BGfEotqY.js";import"./chunk-XXDRQBXY-HZnulEE8.js";import"./chunk-VR4S4FIN-V7_7sr9q.js";import{i as t,n,r,t as i}from"./chunk-EX3LRPZG-mAAgmbjm.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-6OZAfZOy.js";import"./src-Cdq2Q5Qg.js";import"./chunk-WYO6CB5R-DpZX-_mW.js";import"./chunk-ICXQ74PX-BQe1Tadw.js";import"./chunk-ZIRB5QZD-MDehklKw.js";import"./chunk-C7G6YPKG-DNj4qHp9.js";import"./chunk-OGEWGWER-CazgdTF7.js";import"./chunk-HOUHSVGY-fSFxsWEA.js";import"./chunk-Q4XR5HBZ-CUaphLMo.js";import"./chunk-ZGVPDNZ5-CQ5EdC_w.js";import"./chunk-7BUUIJ7U-C4LcvRKI.js";import"./chunk-52WLFC77-BxWUWkZN.js";import"./chunk-FWX5IMBZ-B2SauNuc.js";import"./chunk-32BRIVSS-BGfEotqY.js";import"./chunk-XXDRQBXY-HZnulEE8.js";import"./chunk-VR4S4FIN-V7_7sr9q.js";import{r as t,t as n}from"./chunk-PUDLZKDR-Cjq7brjA.js";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)}
|
|
2
|
-
.swimlane.cluster rect {
|
|
3
|
-
stroke: ${e.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,`getStyles`)});export{r as diagram};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./__vite-browser-external-BobEXftM.js","./chunk-CYidjpOJ.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{a as n,c as r,d as i,f as a,i as o,l as s,n as c,o as l,p as u,r as d,t as f,u as p}from"./trace-api-18gcBe0u.js";import{n as m,r as ee,t as h}from"./propagation-api-PBYTadVM.js";var te=class{constructor(){}createGauge(e,t){return fe}createHistogram(e,t){return pe}createCounter(e,t){return de}createUpDownCounter(e,t){return me}createObservableGauge(e,t){return ge}createObservableCounter(e,t){return he}createObservableUpDownCounter(e,t){return _e}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}},g=class{},ne=class extends g{add(e,t){}},re=class extends g{add(e,t){}},ie=class extends g{record(e,t){}},ae=class extends g{record(e,t){}},oe=class{addCallback(e){}removeCallback(e){}},se=class extends oe{},ce=class extends oe{},le=class extends oe{},ue=new te,de=new ne,fe=new ie,pe=new ae,me=new re,he=new se,ge=new ce,_e=new le;function ve(){return ue}var ye;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(ye||={});var be;(function(e){e[e.INTERNAL=0]=`INTERNAL`,e[e.SERVER=1]=`SERVER`,e[e.CLIENT=2]=`CLIENT`,e[e.PRODUCER=3]=`PRODUCER`,e[e.CONSUMER=4]=`CONSUMER`})(be||={});var _=p.instance(),xe=new class{getMeter(e,t,n){return ue}},Se=`metrics`,Ce=class e{constructor(){}static getInstance(){return this._instance||=new e,this._instance}setGlobalMeterProvider(e){return a(Se,e,p.instance())}getMeterProvider(){return i(Se)||xe}getMeter(e,t,n){return this.getMeterProvider().getMeter(e,t,n)}disable(){u(Se,p.instance())}}.getInstance(),we=class{_delegate;constructor(e){this._delegate=e}export(e,t){this._delegate.export(e,t)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}},Te=class extends Error{code;name=`OTLPExporterError`;data;constructor(e,t,n){super(e),this.data=n,this.code=t}};function Ee(e){if(Number.isFinite(e)&&e>0)return e;throw Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${e}')`)}function De(e){if(e!=null)return()=>e}function Oe(e,t,n){return{timeoutMillis:Ee(e.timeoutMillis??t.timeoutMillis??n.timeoutMillis),concurrencyLimit:e.concurrencyLimit??t.concurrencyLimit??n.concurrencyLimit,compression:e.compression??t.compression??n.compression}}function ke(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:`none`}}var Ae=class{_concurrencyLimit;_sendingPromises=[];constructor(e){this._concurrencyLimit=e}pushPromise(e){if(this.hasReachedLimit())throw Error(`Concurrency Limit reached`);this._sendingPromises.push(e);let t=()=>{let t=this._sendingPromises.indexOf(e);this._sendingPromises.splice(t,1)};e.then(t,t)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}};function je(e){return new Ae(e.concurrencyLimit)}var Me=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{},Ne=performance,Pe=`http.url`,Fe=`http.user_agent`,Ie=Pe,Le=Fe,Re=`deployment.environment.name`,ze=`error.type`,Be=`exception.message`,Ve=`exception.stacktrace`,He=`exception.type`,Ue=`http.request.method`,We=`http.request.method_original`,Ge=`http.response.status_code`,Ke=`server.address`,qe=`server.port`,Je=`service.name`,Ye=`service.version`,Xe=`telemetry.sdk.language`,Ze=`webjs`,Qe=`telemetry.sdk.name`,$e=`telemetry.sdk.version`,et=`url.full`,tt=9,nt=10**6,rt=10**tt;function v(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*nt)]}function it(){let e=Ne.timeOrigin;if(typeof e!=`number`){let t=Ne;e=t.timing&&t.timing.fetchStart}return e}function at(e){return st(v(it()),v(typeof e==`number`?e:Ne.now()))}function y(e){if(ot(e))return e;if(typeof e==`number`)return e<it()?at(e):v(e);if(e instanceof Date)return v(e.getTime());throw TypeError(`Invalid input type`)}function b(e){return e[0]*rt+e[1]}function ot(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function st(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=rt&&(n[1]-=rt,n[0]+=1),n}var x;(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.FAILED=1]=`FAILED`})(x||={});function ct(e,t){return typeof t==`string`?e===t:!!e.match(t)}function lt(e,t){if(!t)return!1;for(let n of t)if(ct(e,n))return!0;return!1}function ut(e){return Object.prototype.hasOwnProperty.call(e,`partialSuccess`)}function dt(){return{handleResponse(e){e==null||!ut(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||_.warn(`Received Partial Success response:`,JSON.stringify(e.partialSuccess))}}}var ft=class{_transport;_serializer;_responseHandler;_promiseQueue;_timeout;_diagLogger;constructor(e,t,n,r,i){this._transport=e,this._serializer=t,this._responseHandler=n,this._promiseQueue=r,this._timeout=i,this._diagLogger=_.createComponentLogger({namespace:`OTLPExportDelegate`})}export(e,t){if(this._diagLogger.debug(`items to be sent`,e),this._promiseQueue.hasReachedLimit()){t({code:x.FAILED,error:Error(`Concurrent export limit reached`)});return}let n=this._serializer.serializeRequest(e);if(n==null){t({code:x.FAILED,error:Error(`Nothing to send`)});return}this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(e=>{if(e.status===`success`){if(e.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(e.data))}catch(t){this._diagLogger.warn(`Export succeeded but could not deserialize response - is the response specification compliant?`,t,e.data)}t({code:x.SUCCESS});return}else if(e.status===`failure`&&e.error){t({code:x.FAILED,error:e.error});return}else e.status===`retryable`?t({code:x.FAILED,error:new Te(`Export failed with retryable status`)}):t({code:x.FAILED,error:new Te(`Export failed with unknown error`)})},e=>t({code:x.FAILED,error:e})))}forceFlush(){return this._promiseQueue.awaitAll()}async shutdown(){this._diagLogger.debug(`shutdown started`),await this.forceFlush(),this._transport.shutdown()}};function pt(e,t){return new ft(e.transport,e.serializer,dt(),e.promiseHandler,t.timeout)}function mt(e,t,n){return pt({transport:n,serializer:t,promiseHandler:je(e)},{timeout:e.timeoutMillis})}function ht(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function gt(e){let t=new Uint8Array(e.length/2),n=0;for(let r=0;r<e.length;r+=2){let i=ht(e.charCodeAt(r)),a=ht(e.charCodeAt(r+1));t[n++]=i<<4|a}return t}function _t(e){let t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function vt(e){return{low:Number(BigInt.asUintN(32,e)),high:Number(BigInt.asUintN(32,e>>BigInt(32)))}}function yt(e){return vt(_t(e))}function bt(e){return _t(e).toString()}var xt=typeof BigInt<`u`?bt:b;function St(e){return e}function Ct(e){if(e!==void 0)return gt(e)}var wt={encodeHrTime:yt,encodeSpanContext:gt,encodeOptionalSpanContext:Ct};function Tt(e){if(e===void 0)return wt;let t=e.useLongBits??!0,n=e.useHex??!1;return{encodeHrTime:t?yt:xt,encodeSpanContext:n?St:gt,encodeOptionalSpanContext:n?St:Ct}}function Et(e){let t={attributes:S(e.attributes),droppedAttributesCount:0},n=e.schemaUrl;return n&&n!==``&&(t.schemaUrl=n),t}function Dt(e){return{name:e.name,version:e.version}}function S(e){return Object.keys(e).map(t=>Ot(t,e[t]))}function Ot(e,t){return{key:e,value:kt(t)}}function kt(e){let t=typeof e;return t===`string`?{stringValue:e}:t===`number`?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t===`boolean`?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(kt)}}:t===`object`&&e!=null?{kvlistValue:{values:Object.entries(e).map(([e,t])=>Ot(e,t))}}:{}}function At(e,t){let n=e.spanContext(),r=e.status,i=e.parentSpanContext?.spanId?t.encodeSpanContext(e.parentSpanContext?.spanId):void 0;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:i,traceState:n.traceState?.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:S(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(e=>Mt(e,t)),droppedEventsCount:e.droppedEventsCount,status:{code:r.code,message:r.message},links:e.links.map(e=>jt(e,t)),droppedLinksCount:e.droppedLinksCount}}function jt(e,t){return{attributes:e.attributes?S(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:e.context.traceState?.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function Mt(e,t){return{attributes:e.attributes?S(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function Nt(e,t){return{resourceSpans:Ft(e,Tt(t))}}function Pt(e){let t=new Map;for(let n of e){let e=t.get(n.resource);e||(e=new Map,t.set(n.resource,e));let r=`${n.instrumentationScope.name}@${n.instrumentationScope.version||``}:${n.instrumentationScope.schemaUrl||``}`,i=e.get(r);i||(i=[],e.set(r,i)),i.push(n)}return t}function Ft(e,t){let n=Pt(e),r=[],i=n.entries(),a=i.next();for(;!a.done;){let[e,n]=a.value,o=[],s=n.values(),c=s.next();for(;!c.done;){let e=c.value;if(e.length>0){let n=e.map(e=>At(e,t));o.push({scope:Dt(e[0].instrumentationScope),spans:n,schemaUrl:e[0].instrumentationScope.schemaUrl})}c=s.next()}let l=Et(e),u={resource:l,scopeSpans:o,schemaUrl:l.schemaUrl};r.push(u),a=i.next()}return r}var It={serializeRequest:e=>{let t=Nt(e,{useHex:!0,useLongBits:!1});return new TextEncoder().encode(JSON.stringify(t))},deserializeResponse:e=>{if(e.length===0)return{};let t=new TextDecoder;return JSON.parse(t.decode(e))}},Lt=5,Rt=1e3,zt=5e3,Bt=1.5,Vt=.2;function Ht(){return 2*Vt*Math.random()-Vt}var Ut=class{_transport;constructor(e){this._transport=e}retry(e,t,n){return new Promise((r,i)=>{setTimeout(()=>{this._transport.send(e,t).then(r,i)},n)})}async send(e,t){let n=Date.now()+t,r=await this._transport.send(e,t),i=Lt,a=Rt;for(;r.status===`retryable`&&i>0;){i--;let t=Math.max(Math.min(a,zt)+Ht(),0);a*=Bt;let o=r.retryInMillis??t,s=n-Date.now();if(o>s)return r;r=await this.retry(e,s,o)}return r}shutdown(){return this._transport.shutdown()}};function Wt(e){return new Ut(e.transport)}function Gt(e){return[429,502,503,504].includes(e)}function Kt(e){if(e==null)return;let t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;let n=new Date(e).getTime()-Date.now();return n>=0?n:0}var qt=class{_parameters;constructor(e){this._parameters=e}send(e,t){return new Promise(n=>{let r=new XMLHttpRequest;r.timeout=t,r.open(`POST`,this._parameters.url);let i=this._parameters.headers();Object.entries(i).forEach(([e,t])=>{r.setRequestHeader(e,t)}),r.ontimeout=e=>{n({status:`failure`,error:Error(`XHR request timed out`)})},r.onreadystatechange=()=>{r.status>=200&&r.status<=299?(_.debug(`XHR success`),n({status:`success`})):r.status&&Gt(r.status)?n({status:`retryable`,retryInMillis:Kt(r.getResponseHeader(`Retry-After`))}):r.status!==0&&n({status:`failure`,error:Error(`XHR request failed with non-retryable status`)})},r.onabort=()=>{n({status:`failure`,error:Error(`XHR request aborted`)})},r.onerror=()=>{n({status:`failure`,error:Error(`XHR request errored`)})},r.send(e)})}shutdown(){}};function Jt(e){return new qt(e)}var Yt=class{_params;constructor(e){this._params=e}send(e){return new Promise(t=>{navigator.sendBeacon(this._params.url,new Blob([e],{type:this._params.blobType}))?(_.debug(`SendBeacon success`),t({status:`success`})):t({status:`failure`,error:Error(`SendBeacon failed`)})})}shutdown(){}};function Xt(e){return new Yt(e)}var Zt=class{_parameters;constructor(e){this._parameters=e}async send(e,t){let n=new AbortController,r=setTimeout(()=>n.abort(),t);try{let t=!!globalThis.location,r=new URL(this._parameters.url),i=await fetch(r.href,{method:`POST`,headers:this._parameters.headers(),body:e,signal:n.signal,keepalive:t,mode:t?globalThis.location?.origin===r.origin?`same-origin`:`cors`:`no-cors`});return i.status>=200&&i.status<=299?(_.debug(`response success`),{status:`success`}):Gt(i.status)?{status:`retryable`,retryInMillis:Kt(i.headers.get(`Retry-After`))}:{status:`failure`,error:Error(`Fetch request failed with non-retryable status`)}}catch(e){return e?.name===`AbortError`?{status:`failure`,error:Error(`Fetch request timed out`,{cause:e})}:{status:`failure`,error:Error(`Fetch request errored`,{cause:e})}}finally{clearTimeout(r)}}shutdown(){}};function Qt(e){return new Zt(e)}function $t(e,t){return mt(e,t,Wt({transport:Jt(e)}))}function en(e,t){return mt(e,t,Wt({transport:Qt(e)}))}function tn(e,t){return mt(e,t,Wt({transport:Xt({url:e.url,blobType:e.headers()[`Content-Type`]})}))}function nn(e){return()=>{let t={};return Object.entries(e?.()??{}).forEach(([e,n])=>{n===void 0?_.warn(`Header "${e}" has invalid value (${n}) and will be ignored`):t[e]=String(n)}),t}}function rn(e,t,n){let r={...n()},i={};return()=>(t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,r))}function an(e){if(e!=null)try{let t=globalThis.location?.href;return new URL(e,t).href}catch{throw Error(`Configuration: Could not parse user-provided export URL: '${e}'`)}}function on(n){return async r=>{let{Agent:i}=await t(()=>import(`./__vite-browser-external-BobEXftM.js`).then(t=>e(t.default)),__vite__mapDeps([0,1]),import.meta.url);return new i(n)}}function sn(e,t,n){return{...Oe(e,t,n),headers:rn(nn(e.headers),t.headers,n.headers),url:an(e.url)??t.url??n.url,agentFactory:e.agentFactory??t.agentFactory??n.agentFactory}}function cn(e,t){return{...ke(),headers:()=>e,url:`http://localhost:4318/`+t,agentFactory:on({keepAlive:!0})}}function ln(e,t,n){return sn({url:e.url,timeoutMillis:e.timeoutMillis,headers:De(e.headers),concurrencyLimit:e.concurrencyLimit},{},cn(n,t))}function un(e,t,n,r){return dn(e.headers)(ln(e,n,r),t)}function dn(e){return!e&&typeof navigator.sendBeacon==`function`?tn:globalThis.fetch===void 0?$t:en}var fn=class extends we{constructor(e={}){super(un(e,It,`v1/traces`,{"Content-Type":`application/json`}))}},pn=class{emit(e){}},mn=new pn,hn=new class{getLogger(e,t,n){return new pn}},gn=class{constructor(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider._getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):mn}},_n=class{getLogger(e,t,n){return this._getDelegateLogger(e,t,n)??new gn(this,e,t,n)}_getDelegate(){return this._delegate??hn}_setDelegate(e){this._delegate=e}_getDelegateLogger(e,t,n){return this._delegate?.getLogger(e,t,n)}},vn=typeof globalThis==`object`?globalThis:typeof self==`object`?self:typeof window==`object`?window:typeof global==`object`?global:{},C=Symbol.for(`io.opentelemetry.js.api.logs`),w=vn;function yn(e,t,n){return r=>r===e?t:n}var bn=class e{constructor(){this._proxyLoggerProvider=new _n}static getInstance(){return this._instance||=new e,this._instance}setGlobalLoggerProvider(e){return w[C]?this.getLoggerProvider():(w[C]=yn(1,e,hn),this._proxyLoggerProvider._setDelegate(e),e)}getLoggerProvider(){return w[C]?.call(w,1)??this._proxyLoggerProvider}getLogger(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)}disable(){delete w[C],this._proxyLoggerProvider=new _n}}.getInstance();function xn(e,t,n,r){for(let i=0,a=e.length;i<a;i++){let a=e[i];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}function Sn(e){e.forEach(e=>e.disable())}function Cn(e){let t=e.tracerProvider||f.getTracerProvider(),n=e.meterProvider||Ce.getMeterProvider(),r=e.loggerProvider||bn.getLoggerProvider(),i=e.instrumentations?.flat()??[];return xn(i,t,n,r),()=>{Sn(i)}}var T=console.error.bind(console);function E(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var wn=(e,t,n)=>{if(!e||!e[t]){T(`no original function `+String(t)+` to wrap`);return}if(!n){T(`no wrapper function`),T(Error().stack);return}let r=e[t];if(typeof r!=`function`||typeof n!=`function`){T(`original object and wrapper must be functions`);return}let i=n(r,t);return E(i,`__original`,r),E(i,`__unwrap`,()=>{e[t]===i&&E(e,t,r)}),E(i,`__wrapped`,!0),E(e,t,i),i},Tn=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{T(`must provide one or more modules to patch`),T(Error().stack);return}if(!(t&&Array.isArray(t))){T(`must provide one or more functions to wrap on modules`);return}e.forEach(e=>{t.forEach(t=>{wn(e,t,n)})})},En=(e,t)=>{if(!e||!e[t]){T(`no function to unwrap.`),T(Error().stack);return}let n=e[t];if(!n.__unwrap)T(`no original to unwrap to -- has `+String(t)+` already been unwrapped?`);else{n.__unwrap();return}},Dn=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{T(`must provide one or more modules to patch`),T(Error().stack);return}if(!(t&&Array.isArray(t))){T(`must provide one or more functions to unwrap on modules`);return}e.forEach(e=>{t.forEach(t=>{En(e,t)})})};function D(e){e&&e.logger&&(typeof e.logger==`function`?T=e.logger:T(`new logger isn't a function, not replacing`))}D.wrap=wn,D.massWrap=Tn,D.unwrap=En,D.massUnwrap=Dn;var On=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(e,t,n){this.instrumentationName=e,this.instrumentationVersion=t,this.setConfig(n),this._diag=_.createComponentLogger({namespace:e}),this._tracer=f.getTracer(e,t),this._meter=Ce.getMeter(e,t),this._logger=bn.getLogger(e,t),this._updateMetricInstruments()}_wrap=wn;_unwrap=En;_massWrap=Tn;_massUnwrap=Dn;get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let e=this.init()??[];return Array.isArray(e)?e:[e]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config={enabled:!0,...e}}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,t,n,r){if(e)try{e(n,r)}catch(e){this._diag.error(`Error running span customization hook due to exception in handler`,{triggerName:t},e)}}},kn=class extends On{constructor(e,t,n){super(e,t,n),this._config.enabled&&this.enable()}};function O(e,t,n){let r,i;try{i=e()}catch(e){r=e}finally{if(t(r,i),r&&!n)throw r;return i}}function k(e){return typeof e==`function`&&typeof e.__original==`function`&&typeof e.__unwrap==`function`&&e.__wrapped===!0}var A;(function(e){e[e.STABLE=1]=`STABLE`,e[e.OLD=2]=`OLD`,e[e.DUPLICATE=3]=`DUPLICATE`})(A||={});function An(e,t){let n=A.OLD,r=t?.split(`,`).map(e=>e.trim()).filter(e=>e!==``);for(let t of r??[])if(t.toLowerCase()===e+`/dup`){n=A.DUPLICATE;break}else t.toLowerCase()===e&&(n=A.STABLE);return n}var jn=s(`OpenTelemetry SDK Context Key SUPPRESS_TRACING`);function Mn(e){return e.setValue(jn,!0)}function Nn(e){return e.getValue(jn)===!0}var Pn=`baggage`,Fn=4096;function In(e){return e.reduce((e,t)=>{let n=`${e}${e===``?``:`,`}${t}`;return n.length>8192?e:n},``)}function Ln(e){return e.getAllEntries().map(([e,t])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`;return t.metadata!==void 0&&(n+=`;`+t.metadata.toString()),n})}function Rn(e){if(!e)return;let t=e.indexOf(`;`),n=t===-1?e:e.substring(0,t),r=n.indexOf(`=`);if(r<=0)return;let i=n.substring(0,r).trim(),a=n.substring(r+1).trim();if(!i||!a)return;let o,s;try{o=decodeURIComponent(i),s=decodeURIComponent(a)}catch{return}let c;return t!==-1&&t<e.length-1&&(c=ee(e.substring(t+1))),{key:o,value:s,metadata:c}}function zn(e,t,n,r){let i=0;for(;i<e.length&&n<180;){let a=e.indexOf(`,`,i),o=a===-1?e.length:a,s=o-i;if(s<=4096){let a=Rn(e.substring(i,o));if(a){let e=(n===0?0:1)+s;if(r+e>8192)break;t[a.key]=a.metadata?{value:a.value,metadata:a.metadata}:{value:a.value},n++,r+=e}}if(a===-1)break;i=a+1}return[n,r]}var Bn=class{inject(e,t,n){let r=h.getBaggage(e);if(!r||Nn(e))return;let i=In(Ln(r).filter(e=>e.length<=Fn).slice(0,180));i.length>0&&n.set(t,Pn,i)}extract(e,t,n){let r=n.get(t,Pn);if(!r)return e;let i={},a=0,o=0;if(Array.isArray(r))for(let e=0;e<r.length;e++)[a,o]=zn(r[e],i,a,o);else [a]=zn(r,i,a,o);return a===0?e:h.setBaggage(e,h.createBaggage(i))}fields(){return[Pn]}};function j(e){let t={};if(typeof e!=`object`||!e)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!Vn(n)){_.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Hn(r)){_.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}function Vn(e){return typeof e==`string`&&e!==``}function Hn(e){return e==null?!0:Array.isArray(e)?Un(e):Wn(typeof e)}function Un(e){let t;for(let n of e){if(n==null)continue;let e=typeof n;if(e!==t){if(!t){if(Wn(e)){t=e;continue}return!1}return!1}}return!0}function Wn(e){switch(e){case`number`:case`boolean`:case`string`:return!0}return!1}function Gn(){return e=>{_.error(Kn(e))}}function Kn(e){return typeof e==`string`?e:JSON.stringify(qn(e))}function qn(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))}),n=Object.getPrototypeOf(n);return t}var Jn=Gn();function M(e){try{Jn(e)}catch{}}var Yn=`2.9.0`,Xn=`process.runtime.name`,Zn={[Qe]:`opentelemetry`,[Xn]:`browser`,[Xe]:Ze,[$e]:Yn},N=performance,Qn=9,$n=10**6,er=10**Qn;function P(e){let t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*$n)]}function tr(e){return ar(P(N.timeOrigin),P(typeof e==`number`?e:N.now()))}function nr(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(--n,r+=er),[n,r]}function rr(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}function ir(e){return rr(e)||typeof e==`number`||e instanceof Date}function ar(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=er&&(n[1]-=er,n[0]+=1),n}var or;(function(e){e[e.SUCCESS=0]=`SUCCESS`,e[e.FAILED=1]=`FAILED`})(or||={});var sr=class{_propagators;_fields;constructor(e={}){this._propagators=e.propagators??[];let t=new Set;for(let e of this._propagators){let n=typeof e.fields==`function`?e.fields():[];for(let e of n)t.add(e)}this._fields=Array.from(t)}inject(e,t,n){for(let r of this._propagators)try{r.inject(e,t,n)}catch(e){_.warn(`Failed to inject with ${r.constructor.name}. Err: ${e.message}`)}}extract(e,t,n){return this._propagators.reduce((e,r)=>{try{return r.extract(e,t,n)}catch(e){_.warn(`Failed to extract with ${r.constructor.name}. Err: ${e.message}`)}return e},e)}fields(){return this._fields.slice()}},cr=`[_0-9a-z-*/]`,lr=`[a-z]${cr}{0,255}`,ur=`[a-z0-9]${cr}{0,240}@[a-z]${cr}{0,13}`,dr=RegExp(`^(?:${lr}|${ur})$`),fr=/^[ -~]{0,255}[!-~]$/,pr=/,|=/;function mr(e){return dr.test(e)}function hr(e){return fr.test(e)&&!pr.test(e)}var gr=32,_r=512,vr=`,`,yr=`=`,br=class e{_length;_rawTraceState;_internalState;constructor(e){this._rawTraceState=typeof e==`string`?e:``,this._length=this._rawTraceState.length}set(e,t){if(!mr(e)||!hr(t))return this;let n=this._getState(),r=n.get(e),i=this._length;if(typeof r==`string`?i+=t.length-r.length:i+=e.length+t.length+(n.size>0?2:1),i>_r)return this;let a=new Map(n);return a.delete(e),a.set(e,t),this._fromState(a,i)}unset(e){let t=this._getState(),n=t.get(e);if(typeof n!=`string`)return this;let r=this._length-(e.length+n.length+1);t.size>1&&--r;let i=new Map(t);return i.delete(e),this._fromState(i,r)}get(e){return this._getState().get(e)}serialize(){let e=``,t=0;for(let n of this._getState())t>0&&(e=vr+e),e=`${n[0]}${yr}${n[1]}`+e,t++;return e}_getState(){if(this._internalState)return this._internalState;let e=this._rawTraceState.split(vr),t=new Map,n=0;for(let r of e){let e=r.trim(),i=e.indexOf(yr);if(i===-1)continue;let a=e.slice(0,i),o=e.slice(i+1);if(!mr(a)||!hr(o))continue;let s=n+e.length+ +(t.size>0);if(!(s>_r)&&(t.set(a,o),n=s,t.size>=gr))break}return this._length=n,this._internalState=new Map(Array.from(t.entries()).reverse()),this._internalState}_fromState(t,n){let r=Object.create(e.prototype);return r._internalState=t,r._length=n,r}},F=`traceparent`,xr=`tracestate`,Sr=`00`,Cr=RegExp(`^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$`);function wr(e){let t=Cr.exec(e);return!t||t[1]===`00`&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var Tr=class{inject(e,t,n){let r=f.getSpanContext(e);if(!r||Nn(e)||!d(r))return;let i=`${Sr}-${r.traceId}-${r.spanId}-0${Number(r.traceFlags||l.NONE).toString(16)}`;n.set(t,F,i),r.traceState&&n.set(t,xr,r.traceState.serialize())}extract(e,t,n){let r=n.get(t,F);if(!r)return e;let i=Array.isArray(r)?r[0]:r;if(typeof i!=`string`)return e;let a=wr(i);if(!a)return e;a.isRemote=!0;let o=n.get(t,xr);if(o){let e=Array.isArray(o)?o.join(`,`):o;a.traceState=new br(typeof e==`string`?e:void 0)}return f.setSpanContext(e,a)}fields(){return[F,xr]}},Er=`[object Object]`,Dr=`[object Null]`,Or=`[object Undefined]`,kr=Function.prototype.toString,Ar=kr.call(Object),jr=Object.getPrototypeOf,Mr=Object.prototype,Nr=Mr.hasOwnProperty,I=Symbol?Symbol.toStringTag:void 0,Pr=Mr.toString;function Fr(e){if(!Ir(e)||Lr(e)!==Er)return!1;let t=jr(e);if(t===null)return!0;let n=Nr.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&kr.call(n)===Ar}function Ir(e){return typeof e==`object`&&!!e}function Lr(e){return e==null?e===void 0?Or:Dr:I&&I in Object(e)?Rr(e):zr(e)}function Rr(e){let t=Nr.call(e,I),n=e[I],r=!1;try{e[I]=void 0,r=!0}catch{}let i=Pr.call(e);return r&&(t?e[I]=n:delete e[I]),i}function zr(e){return Pr.call(e)}var Br=20;function Vr(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=Ur(t,e.shift(),0,n);return t}function Hr(e){return L(e)?e.slice():e}function Ur(e,t,n=0,r){let i;if(!(n>Br)){if(n++,z(e)||z(t)||Gr(t))i=Hr(t);else if(L(e)){if(i=e.slice(),L(t))for(let e=0,n=t.length;e<n;e++)i.push(Hr(t[e]));else if(R(t)){let e=Object.keys(t);for(let n=0,r=e.length;n<r;n++){let r=e[n];r===`__proto__`||r===`constructor`||r===`prototype`||(i[r]=Hr(t[r]))}}}else if(R(e))if(R(t)){if(!Kr(e,t))return t;i=Object.assign({},e);let a=Object.keys(t);for(let o=0,s=a.length;o<s;o++){let s=a[o];if(s===`__proto__`||s===`constructor`||s===`prototype`)continue;let c=t[s];if(z(c))c===void 0?delete i[s]:i[s]=c;else{let a=i[s],o=c;if(Wr(e,s,r)||Wr(t,s,r))delete i[s];else{if(R(a)&&R(o)){let n=r.get(a)||[],i=r.get(o)||[];n.push({obj:e,key:s}),i.push({obj:t,key:s}),r.set(a,n),r.set(o,i)}i[s]=Ur(i[s],c,n,r)}}}}else i=t;return i}}function Wr(e,t,n){let r=n.get(e[t])||[];for(let n=0,i=r.length;n<i;n++){let i=r[n];if(i.key===t&&i.obj===e)return!0}return!1}function L(e){return Array.isArray(e)}function Gr(e){return typeof e==`function`}function R(e){return!z(e)&&!L(e)&&!Gr(e)&&typeof e==`object`}function z(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||e===void 0||e instanceof Date||e instanceof RegExp||e===null}function Kr(e,t){return!(!Fr(e)||!Fr(t))}var qr=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}},Jr=class{_isCalled=!1;_deferred=new qr;_callback;_that;constructor(e,t){this._callback=e,this._that=t}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(e=>this._deferred.resolve(e),e=>this._deferred.reject(e))}catch(e){this._deferred.reject(e)}}return this._deferred.promise}},B;function Yr(){if(B===void 0)try{let e=globalThis.process.argv0;B=e?`unknown_service:${e}`:`unknown_service`}catch{B=`unknown_service`}return B}var V=e=>typeof e==`object`&&!!e&&typeof e.then==`function`,Xr=class e{_rawAttributes;_asyncAttributesPending=!1;_schemaUrl;_memoizedAttributes;static FromAttributeList(t,n){let r=new e({},n);return r._rawAttributes=$r(t),r._asyncAttributesPending=t.filter(([e,t])=>V(t)).length>0,r}constructor(e,t){let n=e.attributes??{};this._rawAttributes=Object.entries(n).map(([e,t])=>(V(t)&&(this._asyncAttributesPending=!0),[e,t])),this._rawAttributes=$r(this._rawAttributes),this._schemaUrl=ei(t?.schemaUrl)}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let e=0;e<this._rawAttributes.length;e++){let[t,n]=this._rawAttributes[e];this._rawAttributes[e]=[t,V(n)?await n:n]}this._asyncAttributesPending=!1}}get attributes(){if(this.asyncAttributesPending&&_.error(`Accessing resource attributes before async attributes settled`),this._memoizedAttributes)return this._memoizedAttributes;let e={};for(let[t,n]of this._rawAttributes){if(V(n)){_.debug(`Unsettled resource attribute ${t} skipped`);continue}n!=null&&(e[t]??=n)}return this._asyncAttributesPending||(this._memoizedAttributes=e),e}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(t){if(t==null)return this;let n=ti(this,t),r=n?{schemaUrl:n}:void 0;return e.FromAttributeList([...t.getRawAttributes(),...this.getRawAttributes()],r)}};function Zr(e,t){return Xr.FromAttributeList(Object.entries(e),t)}function Qr(){return Zr({[Je]:Yr(),[Xe]:Zn[Xe],[Qe]:Zn[Qe],[$e]:Zn[$e]})}function $r(e){return e.map(([e,t])=>V(t)?[e,t.catch(t=>{_.debug(`promise rejection for resource attribute: %s - %s`,e,t)})]:[e,t])}function ei(e){if(typeof e==`string`||e===void 0)return e;_.warn(`Schema URL must be string or undefined, got %s. Schema URL will be ignored.`,e)}function ti(e,t){let n=e?.schemaUrl,r=t?.schemaUrl,i=n===void 0||n===``,a=r===void 0||r===``;if(i)return r;if(a||n===r)return n;_.warn(`Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.`,n,r)}var ni=`exception`,ri=Symbol.for(`nodejs.util.inspect.custom`);function ii(e){let t={};for(let[n,r]of e.getRawAttributes())typeof r?.then!=`function`&&r!=null&&(t[n]??=r);return t}function ai(e,t,n,r,i){if(typeof n==`number`&&n<0){let t=`[${e}]`;return r?.stylize?r.stylize(t,`special`):t}return typeof i!=`function`||!r?t:`${e} ${i(t,{...r,depth:r.depth==null?r.depth:r.depth-1})}`}var oi=class{_spanContext;kind;parentSpanContext;attributes={};links=[];events=[];startTime;resource;instrumentationScope;_droppedAttributesCount=0;_droppedEventsCount=0;_droppedLinksCount=0;_attributesCount=0;name;status={code:c.UNSET};endTime=[0,0];_ended=!1;_duration=[-1,-1];_spanProcessor;_spanLimits;_attributeValueLengthLimit;_recordEndMetrics;_performanceStartTime;_performanceOffset;_startTimeProvided;constructor(e){let t=Date.now();if(this._spanContext=e.spanContext,this._performanceStartTime=N.now(),this._performanceOffset=t-(this._performanceStartTime+N.timeOrigin),this._startTimeProvided=e.startTime!=null,this._spanLimits=e.spanLimits,this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit??0,this._spanProcessor=e.spanProcessor,this.name=e.name,this.parentSpanContext=e.parentSpanContext,this.kind=e.kind,e.links)for(let t of e.links)this.addLink(t);this.startTime=this._getTime(e.startTime??t),this.resource=e.resource,this.instrumentationScope=e.scope,this._recordEndMetrics=e.recordEndMetrics,e.attributes!=null&&this.setAttributes(e.attributes),this._spanProcessor.onStart(this,e.context)}spanContext(){return this._spanContext}setAttribute(e,t){if(t==null||this._isSpanEnded())return this;if(e.length===0)return _.warn(`Invalid attribute key: ${e}`),this;if(!Hn(t))return _.warn(`Invalid attribute value set for key: ${e}`),this;let{attributeCountLimit:n}=this._spanLimits,r=!Object.prototype.hasOwnProperty.call(this.attributes,e);return n!==void 0&&this._attributesCount>=n&&r?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),r&&this._attributesCount++,this)}setAttributes(e){for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.setAttribute(t,e[t]);return this}addEvent(e,t,n){if(this._isSpanEnded())return this;let{eventCountLimit:r}=this._spanLimits;if(r===0)return _.warn(`No events allowed.`),this._droppedEventsCount++,this;r!==void 0&&this.events.length>=r&&(this._droppedEventsCount===0&&_.debug(`Dropping extra events.`),this.events.shift(),this._droppedEventsCount++),ir(t)&&(ir(n)||(n=t),t=void 0);let i=j(t),{attributePerEventCountLimit:a}=this._spanLimits,o={},s=0,c=0;for(let e in i){if(!Object.prototype.hasOwnProperty.call(i,e))continue;let t=i[e];if(a!==void 0&&c>=a){s++;continue}o[e]=this._truncateToSize(t),c++}return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:s}),this}addLink(e){if(this._isSpanEnded())return this;let{linkCountLimit:t}=this._spanLimits;if(t===0)return this._droppedLinksCount++,this;t!==void 0&&this.links.length>=t&&(this._droppedLinksCount===0&&_.debug(`Dropping extra links.`),this.links.shift(),this._droppedLinksCount++);let{attributePerLinkCountLimit:n}=this._spanLimits,r=j(e.attributes),i={},a=0,o=0;for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let t=r[e];if(n!==void 0&&o>=n){a++;continue}i[e]=this._truncateToSize(t),o++}let s={context:e.context};return o>0&&(s.attributes=i),a>0&&(s.droppedAttributesCount=a),this.links.push(s),this}addLinks(e){for(let t of e)this.addLink(t);return this}setStatus(e){if(this._isSpanEnded()||e.code===c.UNSET||this.status.code===c.OK)return this;let t={code:e.code};return e.code===c.ERROR&&(typeof e.message==`string`?t.message=e.message:e.message!=null&&_.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`)),this.status=t,this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e){if(this._isSpanEnded()){_.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this.endTime=this._getTime(e),this._duration=nr(this.startTime,this.endTime),this._duration[0]<0&&(_.warn(`Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.`,this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&_.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._droppedLinksCount>0&&_.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`),this._spanProcessor.onEnding&&this._spanProcessor.onEnding(this),this._recordEndMetrics?.(),this._ended=!0,this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e==`number`&&e<=N.now())return tr(e+this._performanceOffset);if(typeof e==`number`)return P(e);if(e instanceof Date)return P(e.getTime());if(rr(e))return e;if(this._startTimeProvided)return P(Date.now());let t=N.now()-this._performanceStartTime;return ar(this.startTime,P(t))}isRecording(){return this._ended===!1}recordException(e,t){let n={};typeof e==`string`?n[Be]=e:e&&(e.code?n[He]=e.code.toString():e.name&&(n[He]=e.name),e.message&&(n[Be]=e.message),e.stack&&(n[Ve]=e.stack)),n[`exception.type`]||n[`exception.message`]?this.addEvent(ni,n,t):_.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let e=Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);_.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,e)}return this._ended}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_truncateToSize(e){let t=this._attributeValueLengthLimit;return t<=0?(_.warn(`Attribute value limit must be positive, got ${t}`),e):typeof e==`string`?this._truncateToLimitUtil(e,t):Array.isArray(e)?e.map(e=>typeof e==`string`?this._truncateToLimitUtil(e,t):e):e}[ri](e,t,n){return ai(`SpanImpl`,{name:this.name,kind:this.kind,spanContext:this._spanContext,parentSpanContext:this.parentSpanContext,status:this.status,startTime:this.startTime,endTime:this.endTime,duration:this._duration,ended:this._ended,attributes:this.attributes,events:this.events,links:this.links,droppedAttributesCount:this._droppedAttributesCount,droppedEventsCount:this._droppedEventsCount,droppedLinksCount:this._droppedLinksCount,instrumentationScope:this.instrumentationScope,resource:{attributes:ii(this.resource)}},e,t,n)}},H;(function(e){e[e.NOT_RECORD=0]=`NOT_RECORD`,e[e.RECORD=1]=`RECORD`,e[e.RECORD_AND_SAMPLED=2]=`RECORD_AND_SAMPLED`})(H||={});var si=`otel.component.name`,ci=`otel.component.type`,li=`otel.span.parent.origin`,ui=`otel.span.sampling_result`,di=`otel.sdk.processor.span.processed`,fi=`otel.sdk.processor.span.queue.capacity`,pi=`otel.sdk.processor.span.queue.size`,mi=`otel.sdk.span.live`,hi=`otel.sdk.span.started`,gi=`batching_span_processor`,_i=class{startedSpans;liveSpans;constructor(e){this.startedSpans=e.createCounter(hi,{unit:`{span}`,description:`The number of created spans.`}),this.liveSpans=e.createUpDownCounter(mi,{unit:`{span}`,description:`The number of currently live spans.`})}startSpan(e,t){let n=yi(t);if(this.startedSpans.add(1,{[li]:vi(e),[ui]:n}),t===H.NOT_RECORD)return()=>{};let r={[ui]:n};return this.liveSpans.add(1,r),()=>{this.liveSpans.add(-1,r)}}};function vi(e){return e?e.isRemote?`remote`:`local`:`none`}function yi(e){switch(e){case H.RECORD_AND_SAMPLED:return`RECORD_AND_SAMPLE`;case H.RECORD:return`RECORD_ONLY`;case H.NOT_RECORD:return`DROP`}}var bi=`2.9.0`,xi=class{_sampler;_spanLimits;_idGenerator;instrumentationScope;_resource;_spanProcessor;_tracerMetrics;constructor(e,t){this.instrumentationScope=e,this._sampler=t.sampler,this._spanLimits=t.spanLimits,this._resource=t.resource,this._idGenerator=t.idGenerator,this._spanProcessor=t.spanProcessor,this._tracerMetrics=new _i(t.meterProvider.getMeter(`@opentelemetry/sdk-trace`,bi))}startSpan(e,t={},r=m.active()){t.root&&(r=f.deleteSpan(r));let i=f.getSpan(r);if(Nn(r))return _.debug(`Instrumentation suppressed, returning Noop Span`),f.wrapSpanContext(n);let a=i?.spanContext(),o=this._idGenerator.generateSpanId(),s,c,u;!a||!f.isSpanContextValid(a)?c=this._idGenerator.generateTraceId():(c=a.traceId,u=a.traceState,s=a);let d=t.kind??be.INTERNAL,p=(t.links??[]).map(e=>({context:e.context,attributes:j(e.attributes)})),ee=j(t.attributes),h=this._sampler.shouldSample(r,c,e,d,ee,p),te=this._tracerMetrics.startSpan(a,h.decision);u=h.traceState??u;let g=h.decision===ye.RECORD_AND_SAMPLED?l.SAMPLED:l.NONE,ne={traceId:c,spanId:o,traceFlags:g,traceState:u};if(h.decision===ye.NOT_RECORD)return _.debug(`Recording is off, propagating context in a non-recording span`),f.wrapSpanContext(ne);let re=j(Object.assign(ee,h.attributes));return new oi({resource:this._resource,scope:this.instrumentationScope,context:r,spanContext:ne,name:e,kind:d,links:p,parentSpanContext:s,attributes:re,startTime:t.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits,recordEndMetrics:te})}startActiveSpan(e,t,n,r){let i,a,o;if(arguments.length<2)return;arguments.length===2?o=t:arguments.length===3?(i=t,o=n):(i=t,a=n,o=r);let s=a??m.active(),c=this.startSpan(e,i,s),l=f.setSpan(s,c);return m.with(l,o,void 0,c)}[ri](e,t,n){return ai(`Tracer`,{instrumentationScope:this.instrumentationScope,resource:{attributes:ii(this._resource)},spanLimits:this._spanLimits},e,t,n)}},Si=class{_spanProcessors;constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(t=>{Promise.all(e).then(()=>{t()}).catch(e=>{M(e||Error(`MultiSpanProcessor: forceFlush failed`)),t()})})}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnding(e){for(let t of this._spanProcessors)t.onEnding&&t.onEnding(e)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,n)=>{Promise.all(e).then(()=>{t()},n)})}},U=class{shouldSample(){return{decision:H.NOT_RECORD}}toString(){return`AlwaysOffSampler`}},W=class{shouldSample(){return{decision:H.RECORD_AND_SAMPLED}}toString(){return`AlwaysOnSampler`}},G=class{_root;_remoteParentSampled;_remoteParentNotSampled;_localParentSampled;_localParentNotSampled;constructor(e){this._root=e.root,this._root||=(M(Error(`ParentBasedSampler must have a root sampler configured`)),new W),this._remoteParentSampled=e.remoteParentSampled??new W,this._remoteParentNotSampled=e.remoteParentNotSampled??new U,this._localParentSampled=e.localParentSampled??new W,this._localParentNotSampled=e.localParentNotSampled??new U}shouldSample(e,t,n,r,i,a){let o=f.getSpanContext(e);return!o||!d(o)?this._root.shouldSample(e,t,n,r,i,a):o.isRemote?o.traceFlags&l.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,i,a):this._remoteParentNotSampled.shouldSample(e,t,n,r,i,a):o.traceFlags&l.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,i,a):this._localParentNotSampled.shouldSample(e,t,n,r,i,a)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}},Ci=new Map,wi=class{processedSpans;queueSize;queueSizeCallback;standardAttrs;droppedAttrs;constructor(e,t,n){let r=Ci.get(e)??0;if(Ci.set(e,r+1),this.standardAttrs={[ci]:e,[si]:`${e}/${r}`},this.droppedAttrs={...this.standardAttrs,[ze]:`queue_full`},this.processedSpans=t.createCounter(di,{unit:`{span}`,description:`The number of spans for which the processing has finished, either successful or failed.`}),n){let{capacity:e,getQueueSize:r}=n;t.createUpDownCounter(fi,{unit:`{span}`,description:`The maximum number of spans the queue of a given instance of an SDK span processor can hold.`}).add(e,this.standardAttrs),this.queueSize=t.createObservableUpDownCounter(pi,{unit:`{span}`,description:`The number of spans in the queue of a given instance of an SDK span processor.`}),this.queueSizeCallback=e=>e.observe(r(),this.standardAttrs),this.queueSize.addCallback(this.queueSizeCallback)}}dropSpans(e){this.processedSpans.add(e,this.droppedAttrs)}finishSpans(e,t){if(!t){this.processedSpans.add(e,this.standardAttrs);return}let n={...this.standardAttrs,[ze]:t.name};this.processedSpans.add(e,n)}shutdown(){this.queueSize&&this.queueSizeCallback&&this.queueSize.removeCallback(this.queueSizeCallback)}},Ti=class{_maxExportBatchSize;_maxQueueSize;_scheduledDelayMillis;_exportTimeoutMillis;_exporter;_metrics;_isExporting=!1;_finishedSpans=[];_timer;_shutdownOnce;_droppedSpansCount=0;constructor(e){this._exporter=e.exporter,this._maxExportBatchSize=e.maxExportBatchSize??512,this._maxQueueSize=e.maxQueueSize??2048,this._scheduledDelayMillis=e.scheduledDelayMillis??5e3,this._exportTimeoutMillis=e.exportTimeoutMillis??3e4,this._shutdownOnce=new Jr(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(_.warn(`BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize`),this._maxExportBatchSize=this._maxQueueSize),this._metrics=new wi(gi,e.selfObsMeterProvider?e.selfObsMeterProvider.getMeter(`@opentelemetry/sdk-trace`):ve(),{capacity:this._maxQueueSize,getQueueSize:()=>this._finishedSpans.length})}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,t){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&l.SAMPLED)!==0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>(this._metrics.shutdown(),this._exporter.shutdown()))}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&_.debug(`maxQueueSize reached, dropping spans`),this._droppedSpansCount++,this._metrics.dropSpans(1);return}this._droppedSpansCount>0&&(_.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,t)=>{let n=[],r=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let e=0,t=r;e<t;e++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,t)=>{let n=setTimeout(()=>{t(Error(`Timeout`))},this._exportTimeoutMillis);m.with(Mn(m.active()),()=>{let r;this._finishedSpans.length<=this._maxExportBatchSize?(r=this._finishedSpans,this._finishedSpans=[]):r=this._finishedSpans.splice(0,this._maxExportBatchSize);let i=()=>this._exporter.export(r,i=>{clearTimeout(n),this._metrics.finishSpans(r.length,i.error),i.code===or.SUCCESS?e():t(i.error??Error(`BatchSpanProcessor: span export failed`))}),a=null;for(let e=0,t=r.length;e<t;e++){let t=r[e];t.resource.asyncAttributesPending&&t.resource.waitForAsyncAttributes&&(a??=[],a.push(t.resource.waitForAsyncAttributes()))}a===null?i():Promise.all(a).then(i,e=>{M(e),t(e)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{this._isExporting=!1,M(e)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),typeof this._timer!=`number`&&this._timer.unref())}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}},Ei=class extends Ti{_visibilityChangeListener;_pageHideListener;constructor(e){super(e),this.onInit(e)}onInit(e){e.disableAutoFlushOnDocumentHide!==!0&&typeof document<`u`&&(this._visibilityChangeListener=()=>{document.visibilityState===`hidden`&&this.forceFlush().catch(e=>{M(e)})},this._pageHideListener=()=>{this.forceFlush().catch(e=>{M(e)})},document.addEventListener(`visibilitychange`,this._visibilityChangeListener),document.addEventListener(`pagehide`,this._pageHideListener))}onShutdown(){typeof document<`u`&&(this._visibilityChangeListener&&document.removeEventListener(`visibilitychange`,this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener(`pagehide`,this._pageHideListener))}},Di=16,Oi=8,ki=new Uint8Array(Di),Ai=new Uint8Array(Oi),ji=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function Mi(e){for(let t=0;t<e.length;t++)e[t]=Math.random()*256>>>0;for(let t=0;t<e.length;t++)if(e[t]>0)return;e[e.length-1]=1}function Ni(e){let t=``;for(let n=0;n<e.length;n++)t+=ji[e[n]];return t}var Pi=class{generateTraceId(){return Mi(ki),Ni(ki)}generateSpanId(){return Mi(Ai),Ni(Ai)}},K;(function(e){e[e.resolved=0]=`resolved`,e[e.timeout=1]=`timeout`,e[e.error=2]=`error`,e[e.unresolved=3]=`unresolved`})(K||={});var Fi=class{_resource;_activeSpanProcessor;_forceFlushTimeoutMillis;_tracerOptions;_tracers=new Map;constructor(e={}){this._forceFlushTimeoutMillis=e.forceFlushTimeoutMillis??3e4,this._resource=e.resource??Qr(),this._activeSpanProcessor=new Si(e.spanProcessors??[]),this._tracerOptions={resource:this._resource,sampler:e.sampler??new G({root:new W}),spanLimits:{attributeCountLimit:e.spanLimits?.attributeCountLimit??128,attributeValueLengthLimit:e.spanLimits?.attributeValueLengthLimit??1/0,eventCountLimit:e.spanLimits?.eventCountLimit??128,linkCountLimit:e.spanLimits?.linkCountLimit??128,attributePerEventCountLimit:e.spanLimits?.attributePerEventCountLimit??128,attributePerLinkCountLimit:e.spanLimits?.attributePerLinkCountLimit??128},idGenerator:e.idGenerator||new Pi,spanProcessor:this._activeSpanProcessor,meterProvider:e.meterProvider??{getMeter(){return ve()}}}}getTracer(e,t,n){let r=`${e}@${t||``}:${n?.schemaUrl||``}`;return this._tracers.has(r)||this._tracers.set(r,new xi({name:e,version:t,schemaUrl:n?.schemaUrl},this._tracerOptions)),this._tracers.get(r)}forceFlush(){let e=this._forceFlushTimeoutMillis,t=this._activeSpanProcessor._spanProcessors.map(t=>new Promise(n=>{let r,i=setTimeout(()=>{n(Error(`Span processor did not completed within timeout period of ${e} ms`)),r=K.timeout},e);t.forceFlush().then(()=>{clearTimeout(i),r!==K.timeout&&(r=K.resolved,n(r))}).catch(e=>{clearTimeout(i),r=K.error,n(e)})}));return new Promise((e,n)=>{Promise.all(t).then(t=>{let r=t.filter(e=>e!==K.resolved);r.length>0?n(r):e()}).catch(e=>n([e]))})}shutdown(){return this._activeSpanProcessor.shutdown()}[ri](e,t,n){let r=this._activeSpanProcessor._spanProcessors;return ai(`TracerProvider`,{resource:{attributes:ii(this._resource)},tracers:Array.from(this._tracers.keys()),spanProcessors:r.map(e=>e.constructor?.name??`SpanProcessor`)},e,t,n)}},Ii=class{_ratio;_upperBound;constructor(e=0){this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,t){return{decision:o(t)&&this._accumulate(t)<this._upperBound?H.RECORD_AND_SAMPLED:H.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!=`number`||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n<32;n+=8){let r=0;for(let t=0;t<8;t++){let i=e.charCodeAt(n+t),a=i<58?i-48:i<71?i-55:i-87;r=r<<4|a}t=(t^r)>>>0}return t}},q;(function(e){e.AlwaysOff=`always_off`,e.AlwaysOn=`always_on`,e.ParentBasedAlwaysOff=`parentbased_always_off`,e.ParentBasedAlwaysOn=`parentbased_always_on`,e.ParentBasedTraceIdRatio=`parentbased_traceidratio`,e.TraceIdRatio=`traceidratio`})(q||={});var Li=1;function Ri(){return{sampler:zi(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},spanLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128,linkCountLimit:128,eventCountLimit:128,attributePerEventCountLimit:128,attributePerLinkCountLimit:128}}}function zi(){let e=q.ParentBasedAlwaysOn;switch(e){case q.AlwaysOn:return new W;case q.AlwaysOff:return new U;case q.ParentBasedAlwaysOn:return new G({root:new W});case q.ParentBasedAlwaysOff:return new G({root:new U});case q.TraceIdRatio:return new Ii(Bi());case q.ParentBasedTraceIdRatio:return new G({root:new Ii(Bi())});default:return _.error(`OTEL_TRACES_SAMPLER value "${e}" invalid, defaulting to "${q.ParentBasedAlwaysOn}".`),new G({root:new W})}}function Bi(){return _.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${Li}.`),Li}function Vi(e){let t=Object.assign({},e.spanLimits);return t.attributeCountLimit=e.spanLimits?.attributeCountLimit??e.generalLimits?.attributeCountLimit??void 0??void 0??128,t.attributeValueLengthLimit=e.spanLimits?.attributeValueLengthLimit??e.generalLimits?.attributeValueLengthLimit??void 0??void 0??1/0,Object.assign({},e,{spanLimits:t})}var Hi=class extends Fi{constructor(e={}){let t=Vr({},Ri(),Vi(e));delete t.generalLimits,super(t)}},Ui=class extends Ei{constructor(e,t){t||={};for(let[e,n]of[[`maxExportBatchSize`,`OTEL_BSP_MAX_EXPORT_BATCH_SIZE`],[`maxQueueSize`,`OTEL_BSP_MAX_QUEUE_SIZE`],[`scheduledDelayMillis`,`OTEL_BSP_SCHEDULE_DELAY`],[`exportTimeoutMillis`,`OTEL_BSP_EXPORT_TIMEOUT`]])t[e];super({exporter:e,...t})}},Wi=class{_enabled=!1;_currentContext=r;_bindFunction(e=r,t){let n=this,i=function(...r){return n.with(e,()=>t.apply(this,r))};return Object.defineProperty(i,`length`,{enumerable:!1,configurable:!0,writable:!1,value:t.length}),i}active(){return this._currentContext}bind(e,t){return e===void 0&&(e=this.active()),typeof t==`function`?this._bindFunction(e,t):t}disable(){return this._currentContext=r,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=r,this)}with(e,t,n,...i){let a=this._currentContext;this._currentContext=e||r;try{return t.call(n,...i)}finally{this._currentContext=a}}};function Gi(e){if(e!==null){if(e===void 0){let e=new Wi;e.enable(),m.setGlobalContextManager(e);return}e.enable(),m.setGlobalContextManager(e)}}function Ki(e){if(e!==null){if(e===void 0){h.setGlobalPropagator(new sr({propagators:[new Tr,new Bn]}));return}h.setGlobalPropagator(e)}}var qi=class extends Hi{constructor(e={}){super(e)}register(e={}){f.setGlobalTracerProvider(this),Ki(e.propagator),Gi(e.contextManager)}},J;(function(e){e.CONNECT_END=`connectEnd`,e.CONNECT_START=`connectStart`,e.DECODED_BODY_SIZE=`decodedBodySize`,e.DOM_COMPLETE=`domComplete`,e.DOM_CONTENT_LOADED_EVENT_END=`domContentLoadedEventEnd`,e.DOM_CONTENT_LOADED_EVENT_START=`domContentLoadedEventStart`,e.DOM_INTERACTIVE=`domInteractive`,e.DOMAIN_LOOKUP_END=`domainLookupEnd`,e.DOMAIN_LOOKUP_START=`domainLookupStart`,e.ENCODED_BODY_SIZE=`encodedBodySize`,e.FETCH_START=`fetchStart`,e.LOAD_EVENT_END=`loadEventEnd`,e.LOAD_EVENT_START=`loadEventStart`,e.NAVIGATION_START=`navigationStart`,e.REDIRECT_END=`redirectEnd`,e.REDIRECT_START=`redirectStart`,e.REQUEST_START=`requestStart`,e.RESPONSE_END=`responseEnd`,e.RESPONSE_START=`responseStart`,e.SECURE_CONNECTION_START=`secureConnectionStart`,e.START_TIME=`startTime`,e.UNLOAD_EVENT_END=`unloadEventEnd`,e.UNLOAD_EVENT_START=`unloadEventStart`})(J||={});var Ji=`http.response_content_length`,Yi=`http.response_content_length_uncompressed`;function Y(e,t){return t in e}function X(e,t,n,r=!0){if(Y(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function Xi(e,t,n=!1,r,i){if(r===void 0&&(r=t[J.START_TIME]!==0),n||(X(e,J.FETCH_START,t,r),X(e,J.DOMAIN_LOOKUP_START,t,r),X(e,J.DOMAIN_LOOKUP_END,t,r),X(e,J.CONNECT_START,t,r),X(e,J.SECURE_CONNECTION_START,t,r),X(e,J.CONNECT_END,t,r),X(e,J.REQUEST_START,t,r),X(e,J.RESPONSE_START,t,r),X(e,J.RESPONSE_END,t,r)),!i){let n=t[J.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(Ji,n);let r=t[J.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute(Yi,r)}}function Zi(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return`/`;let n=$i(e,t);if(t&&n.indexOf(`@id`)>0)return n;let r=``;return e.parentNode&&(r+=Zi(e.parentNode,t)),r+=n,r}function Qi(e){if(!e.parentNode)return 0;let t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);let n=Array.from(e.parentNode.childNodes);return n=n.filter(n=>{let r=n.localName;return t.indexOf(n.nodeType)>=0&&r===e.localName}),n.length>=1?n.indexOf(e)+1:0}function $i(e,t){let n=e.nodeType,r=Qi(e),i;if(n===Node.ELEMENT_NODE){let n=e.getAttribute(`id`);if(t&&n)return`//*[@id="${n}"]`;i=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i=`text()`;else if(n===Node.COMMENT_NODE)i=`comment()`;else return``;return i&&r>1?`/${i}[${r}]`:`/${i}`}var ea;(function(e){e.DOCUMENT_LOAD=`documentLoad`,e.DOCUMENT_FETCH=`documentFetch`,e.RESOURCE_FETCH=`resourceFetch`})(ea||={});var ta=`0.49.0`,na=`@opentelemetry/instrumentation-document-load`,ra;(function(e){e.FIRST_PAINT=`firstPaint`,e.FIRST_CONTENTFUL_PAINT=`firstContentfulPaint`})(ra||={});var ia=()=>{let e={},t=N.getEntriesByType?.(`navigation`)[0];if(t)Object.values(J).forEach(n=>{if(Y(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}});else{let t=N.timing;t&&Object.values(J).forEach(n=>{if(Y(t,n)){let r=t[n];typeof r==`number`&&(e[n]=r)}})}return e},aa={"first-paint":ra.FIRST_PAINT,"first-contentful-paint":ra.FIRST_CONTENTFUL_PAINT},oa=e=>{let t=N.getEntriesByType?.(`paint`);t&&t.forEach(({name:t,startTime:n})=>{Y(aa,t)&&e.addEvent(aa[t],n)})},sa=class extends kn{component=`document-load`;version=`1`;moduleName=this.component;constructor(e={}){super(na,ta,e)}init(){}_onDocumentLoaded(){window.setTimeout(()=>{this._collectPerformance()})}_addResourcesSpans(e){let t=N.getEntriesByType?.(`resource`);t&&t.forEach(t=>{this._initResourceSpan(t,e)})}_collectPerformance(){let e=Array.from(document.getElementsByTagName(`meta`)).find(e=>e.getAttribute(`name`)===F),t=ia(),n=e&&e.content||``;m.with(h.extract(r,{traceparent:n}),()=>{let e=this._startSpan(ea.DOCUMENT_LOAD,J.FETCH_START,t);e&&(m.with(f.setSpan(m.active(),e),()=>{let e=this._startSpan(ea.DOCUMENT_FETCH,J.FETCH_START,t);e&&(e.setAttribute(Ie,location.href),m.with(f.setSpan(m.active(),e),()=>{Xi(e,t,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentFetch),this._endSpan(e,J.RESPONSE_END,t)}))}),e.setAttribute(Ie,location.href),e.setAttribute(Le,navigator.userAgent),this._addResourcesSpans(e),this.getConfig().ignoreNetworkEvents||(X(e,J.FETCH_START,t),X(e,J.UNLOAD_EVENT_START,t),X(e,J.UNLOAD_EVENT_END,t),X(e,J.DOM_INTERACTIVE,t),X(e,J.DOM_CONTENT_LOADED_EVENT_START,t),X(e,J.DOM_CONTENT_LOADED_EVENT_END,t),X(e,J.DOM_COMPLETE,t),X(e,J.LOAD_EVENT_START,t),X(e,J.LOAD_EVENT_END,t)),this.getConfig().ignorePerformancePaintEvents||oa(e),this._addCustomAttributesOnSpan(e,this.getConfig().applyCustomAttributesOnSpan?.documentLoad),this._endSpan(e,J.LOAD_EVENT_END,t))})}_endSpan(e,t,n){e&&(Y(n,t)?e.end(n[t]):e.end())}_initResourceSpan(e,t){let n=this._startSpan(ea.RESOURCE_FETCH,J.FETCH_START,e,t);n&&(n.setAttribute(Ie,e.name),Xi(n,e,this.getConfig().ignoreNetworkEvents),this._addCustomAttributesOnResourceSpan(n,e,this.getConfig().applyCustomAttributesOnSpan?.resourceFetch),this._endSpan(n,J.RESPONSE_END,e))}_startSpan(e,t,n,r){if(Y(n,t)&&typeof n[t]==`number`)return this.tracer.startSpan(e,{startTime:n[t]},r?f.setSpan(m.active(),r):void 0)}_waitForPageLoad(){window.document.readyState===`complete`?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener(`load`,this._onDocumentLoaded))}_addCustomAttributesOnSpan(e,t){t&&O(()=>t(e),e=>{e&&this._diag.error(`addCustomAttributesOnSpan`,e)},!0)}_addCustomAttributesOnResourceSpan(e,t,n){n&&O(()=>n(e,t),e=>{e&&this._diag.error(`addCustomAttributesOnResourceSpan`,e)},!0)}enable(){window.removeEventListener(`load`,this._onDocumentLoaded),this._waitForPageLoad()}disable(){window.removeEventListener(`load`,this._onDocumentLoaded)}},Z;(function(e){e.CONNECT_END=`connectEnd`,e.CONNECT_START=`connectStart`,e.DECODED_BODY_SIZE=`decodedBodySize`,e.DOM_COMPLETE=`domComplete`,e.DOM_CONTENT_LOADED_EVENT_END=`domContentLoadedEventEnd`,e.DOM_CONTENT_LOADED_EVENT_START=`domContentLoadedEventStart`,e.DOM_INTERACTIVE=`domInteractive`,e.DOMAIN_LOOKUP_END=`domainLookupEnd`,e.DOMAIN_LOOKUP_START=`domainLookupStart`,e.ENCODED_BODY_SIZE=`encodedBodySize`,e.FETCH_START=`fetchStart`,e.LOAD_EVENT_END=`loadEventEnd`,e.LOAD_EVENT_START=`loadEventStart`,e.NAVIGATION_START=`navigationStart`,e.REDIRECT_END=`redirectEnd`,e.REDIRECT_START=`redirectStart`,e.REQUEST_START=`requestStart`,e.RESPONSE_END=`responseEnd`,e.RESPONSE_START=`responseStart`,e.SECURE_CONNECTION_START=`secureConnectionStart`,e.START_TIME=`startTime`,e.UNLOAD_EVENT_END=`unloadEventEnd`,e.UNLOAD_EVENT_START=`unloadEventStart`})(Z||={});var ca=`http.response_content_length`,la=`http.response_content_length_uncompressed`,ua;function da(){return ua||=document.createElement(`a`),ua}function fa(e,t){return t in e}function Q(e,t,n,r=!0){if(fa(n,t)&&typeof n[t]==`number`&&!(r&&n[t]===0))return e.addEvent(t,n[t])}function pa(e,t,n=!1,r,i){if(r===void 0&&(r=t[Z.START_TIME]!==0),n||(Q(e,Z.FETCH_START,t,r),Q(e,Z.DOMAIN_LOOKUP_START,t,r),Q(e,Z.DOMAIN_LOOKUP_END,t,r),Q(e,Z.CONNECT_START,t,r),Q(e,Z.SECURE_CONNECTION_START,t,r),Q(e,Z.CONNECT_END,t,r),Q(e,Z.REQUEST_START,t,r),Q(e,Z.RESPONSE_START,t,r),Q(e,Z.RESPONSE_END,t,r)),!i){let n=t[Z.ENCODED_BODY_SIZE];n!==void 0&&e.setAttribute(ca,n);let r=t[Z.DECODED_BODY_SIZE];r!==void 0&&n!==r&&e.setAttribute(la,r)}}function ma(e){return e.slice().sort((e,t)=>{let n=e[Z.FETCH_START],r=t[Z.FETCH_START];return n>r?1:n<r?-1:0})}function ha(){return typeof location<`u`?location.origin:void 0}function ga(e,t,n,r,i=new WeakSet,a){let o=ya(e);e=o.toString();let s=va(e,t,n,r,i,a);if(s.length===0)return{mainRequest:void 0};if(s.length===1)return{mainRequest:s[0]};let c=ma(s);if(o.origin!==ha()&&c.length>1){let e=c[0],t=_a(c,e[Z.RESPONSE_END],n),r=e[Z.RESPONSE_END];return t[Z.FETCH_START]<r&&(t=e,e=void 0),{corsPreFlightRequest:e,mainRequest:t}}else return{mainRequest:s[0]}}function _a(e,t,n){let r=b(n),i=b(y(t)),a=e[1],o,s=e.length;for(let t=1;t<s;t++){let n=e[t],s=b(y(n[Z.FETCH_START])),c=r-b(y(n[Z.RESPONSE_END]));s>=i&&(!o||c<o)&&(o=c,a=n)}return a}function va(e,t,n,r,i,a){let o=b(t),s=b(n),c=r.filter(t=>{let n=b(y(t[Z.FETCH_START])),r=b(y(t[Z.RESPONSE_END]));return t.initiatorType.toLowerCase()===(a||`xmlhttprequest`)&&t.name===e&&n>=o&&r<=s});return c.length>0&&(c=c.filter(e=>!i.has(e))),c}function ya(e){if(typeof URL==`function`)return new URL(e,typeof document<`u`?document.baseURI:typeof location<`u`?location.href:void 0);let t=da();return t.href=e,t}function ba(e,t){let n=t||[];return(typeof n==`string`||n instanceof RegExp)&&(n=[n]),ya(e).origin===ha()?!0:n.some(t=>ct(e,t))}var xa;(function(e){e.COMPONENT=`component`,e.HTTP_STATUS_TEXT=`http.status_text`})(xa||={});var Sa=`http.host`,Ca=`http.method`,wa=`http.request.body.size`,Ta=`http.request_content_length_uncompressed`,Ea=`http.scheme`,Da=`http.status_code`,Oa=`http.url`,ka=`http.user_agent`,Aa=_.createComponentLogger({namespace:`@opentelemetry/opentelemetry-instrumentation-fetch/utils`});function ja(...e){if(e[0]instanceof URL||typeof e[0]==`string`){let t=e[1];if(!t?.body)return Promise.resolve();if(t.body instanceof ReadableStream){let{body:e,length:n}=Ma(t.body);return t.body=e,n}else return Promise.resolve(Pa(t.body))}else{let t=e[0];return t?.body?t.clone().text().then(e=>Ia(e)):Promise.resolve()}}function Ma(e){if(!e.pipeThrough)return Aa.warn(`Platform has ReadableStream but not pipeThrough!`),{body:e,length:Promise.resolve(void 0)};let t=0,n,r=new Promise(e=>{n=e}),i=new TransformStream({start(){},async transform(e,n){let r=await e;t+=r.byteLength,n.enqueue(e)},flush(){n(t)}});return{body:e.pipeThrough(i),length:r}}function Na(e){return typeof Document<`u`&&e instanceof Document}function Pa(e){if(Na(e))return new XMLSerializer().serializeToString(document).length;if(typeof e==`string`)return Ia(e);if(e instanceof Blob)return e.size;if(e instanceof FormData)return La(e);if(e instanceof URLSearchParams)return Ia(e.toString());if(e.byteLength!==void 0)return e.byteLength;Aa.warn(`unknown body type`)}var Fa=new TextEncoder;function Ia(e){return Fa.encode(e).byteLength}function La(e){let t=0;for(let[n,r]of e.entries())t+=n.length,r instanceof Blob?t+=r.size:t+=r.length;return t}function Ra(e){let t=Va(),n=e.toUpperCase();return n in t?n:`_OTHER`}var za={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0},Ba;function Va(){return Ba===void 0&&(Ba=za),Ba}var Ha={"https:":`443`,"http:":`80`};function Ua(e){let t=Number(e.port||Ha[e.protocol]);if(t&&!isNaN(t))return t}var Wa=`0.204.0`,Ga=300,Ka=typeof process==`object`&&process.release?.name===`node`,qa=class extends kn{component=`fetch`;version=Wa;moduleName=this.component;_usedResources=new WeakSet;_tasksCount=0;_semconvStability;constructor(e={}){super(`@opentelemetry/instrumentation-fetch`,Wa,e),this._semconvStability=An(`http`,e?.semconvStabilityOptIn)}init(){}_addChildSpan(e,t){let n=this.tracer.startSpan(`CORS Preflight`,{startTime:t[Z.FETCH_START]},f.setSpan(m.active(),e)),r=!(this._semconvStability&A.OLD);pa(n,t,this.getConfig().ignoreNetworkEvents,void 0,r),n.end(t[Z.RESPONSE_END])}_addFinalSpanAttributes(e,t){let n=ya(t.url);if(this._semconvStability&A.OLD&&(e.setAttribute(Da,t.status),t.statusText!=null&&e.setAttribute(xa.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(Sa,n.host),e.setAttribute(Ea,n.protocol.replace(`:`,``)),typeof navigator<`u`&&e.setAttribute(ka,navigator.userAgent)),this._semconvStability&A.STABLE){e.setAttribute(Ge,t.status),e.setAttribute(Ke,n.hostname);let r=Ua(n);r&&e.setAttribute(qe,r)}}_addHeaders(e,t){if(!ba(t,this.getConfig().propagateTraceHeaderCorsUrls)){let e={};h.inject(m.active(),e),Object.keys(e).length>0&&this._diag.debug(`headers inject skipped due to CORS policy`);return}if(e instanceof Request)h.inject(m.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Headers)h.inject(m.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else if(e.headers instanceof Map)h.inject(m.active(),e.headers,{set:(e,t,n)=>e.set(t,typeof n==`string`?n:String(n))});else{let t={};h.inject(m.active(),t),e.headers=Object.assign({},t,e.headers||{})}}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(e,t={}){if(lt(e,this.getConfig().ignoreUrls)){this._diag.debug(`ignoring span as url matches ignored url`);return}let n=``,r={};if(this._semconvStability&A.OLD){let i=(t.method||`GET`).toUpperCase();n=`HTTP ${i}`,r[xa.COMPONENT]=this.moduleName,r[Ca]=i,r[Oa]=e}if(this._semconvStability&A.STABLE){let i=t.method,a=Ra(t.method||`GET`);n||=a,r[Ue]=a,a!==i&&(r[We]=i),r[et]=e}return this.tracer.startSpan(n,{kind:be.CLIENT,attributes:r})}_findResourceAndAddNetworkEvents(e,t,n){let r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType(`resource`)}let i=ga(t.spanUrl,t.startTime,n,r,this._usedResources,`fetch`);if(i.mainRequest){let t=i.mainRequest;this._markResourceAsUsed(t);let n=i.corsPreFlightRequest;n&&(this._addChildSpan(e,n),this._markResourceAsUsed(n));let r=!(this._semconvStability&A.OLD);pa(e,t,this.getConfig().ignoreNetworkEvents,void 0,r)}}_markResourceAsUsed(e){this._usedResources.add(e)}_endSpan(e,t,n){let r=v(Date.now()),i=at();this._addFinalSpanAttributes(e,n),this._semconvStability&A.STABLE&&n.status>=400&&(e.setStatus({code:c.ERROR}),e.setAttribute(ze,String(n.status))),setTimeout(()=>{t.observer?.disconnect(),this._findResourceAndAddNetworkEvents(e,t,i),this._tasksCount--,this._clearResources(),e.end(r)},Ga)}_patchConstructor(){return e=>{let t=this;return function(...n){let r=this,i=ya(n[0]instanceof Request?n[0].url:String(n[0])).href,a=n[0]instanceof Request?n[0]:n[1]||{},o=t._createSpan(i,a);if(!o)return e.apply(this,n);let s=t._prepareSpanData(i);t.getConfig().measureRequestSize&&ja(...n).then(e=>{e&&(t._semconvStability&A.OLD&&o.setAttribute(Ta,e),t._semconvStability&A.STABLE&&o.setAttribute(wa,e))}).catch(e=>{t._diag.warn(`getFetchBodyLength`,e)});function c(e,n){t._applyAttributesAfterFetch(e,a,n),t._endSpan(e,s,{status:n.status||0,statusText:n.message,url:i})}function l(e,n){t._applyAttributesAfterFetch(e,a,n),n.status>=200&&n.status<400?t._endSpan(e,s,n):t._endSpan(e,s,{status:n.status,statusText:n.statusText,url:i})}function u(e,t,n){try{let t=n.clone().body;if(t){let r=t.getReader(),i=()=>{r.read().then(({done:t})=>{t?l(e,n):i()},t=>{c(e,t)})};i()}else l(e,n)}finally{t(n)}}function d(e,t,n){try{c(e,n)}finally{t(n)}}return new Promise((n,s)=>m.with(f.setSpan(m.active(),o),()=>(t._addHeaders(a,i),t._callRequestHook(o,a),t._tasksCount++,e.apply(r,a instanceof Request?[a]:[i,a]).then(u.bind(r,o,n),d.bind(r,o,s)))))}}}_applyAttributesAfterFetch(e,t,n){let r=this.getConfig().applyCustomAttributesOnSpan;r&&O(()=>r(e,t,n),e=>{e&&this._diag.error(`applyCustomAttributesOnSpan`,e)},!0)}_callRequestHook(e,t){let n=this.getConfig().requestHook;n&&O(()=>n(e,t),e=>{e&&this._diag.error(`requestHook`,e)},!0)}_prepareSpanData(e){let t=at(),n=[];if(typeof PerformanceObserver!=`function`)return{entries:n,startTime:t,spanUrl:e};let r=new PerformanceObserver(t=>{t.getEntries().forEach(t=>{t.initiatorType===`fetch`&&t.name===e&&n.push(t)})});return r.observe({entryTypes:[`resource`]}),{entries:n,observer:r,startTime:t,spanUrl:e}}enable(){if(Ka){this._diag.warn(`this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()`);return}k(fetch)&&(this._unwrap(Me,`fetch`),this._diag.debug(`removing previous patch for constructor`)),this._wrap(Me,`fetch`,this._patchConstructor())}disable(){Ka||(this._unwrap(Me,`fetch`),this._usedResources=new WeakSet)}},$;(function(e){e.EVENT_TYPE=`event_type`,e.TARGET_ELEMENT=`target_element`,e.TARGET_XPATH=`target_xpath`,e.HTTP_URL=`http.url`})($||={});var Ja=`0.49.0`,Ya=`@opentelemetry/instrumentation-user-interaction`,Xa=`OT_ZONE_CONTEXT`,Za=`Navigation:`,Qa=[`click`];function $a(){return!1}var eo=class extends kn{version=Ja;moduleName=`user-interaction`;_spansData=new WeakMap;_wrappedListeners=new WeakMap;_eventsSpanMap=new WeakMap;_eventNames;_shouldPreventSpanCreation;constructor(e={}){super(Ya,Ja,e),this._eventNames=new Set(e?.eventNames??Qa),this._shouldPreventSpanCreation=typeof e?.shouldPreventSpanCreation==`function`?e.shouldPreventSpanCreation:$a}init(){}_checkForTimeout(e,t){let n=this._spansData.get(t);n&&(e.source===`setTimeout`?n.hrTimeLastTimeout=tr():e.source!==`Promise.then`&&e.source!==`setTimeout`&&(n.hrTimeLastTimeout=void 0))}_allowEventName(e){return this._eventNames.has(e)}_createSpan(e,t,n){if(!(e instanceof HTMLElement)||!e.getAttribute||e.hasAttribute(`disabled`)||!this._allowEventName(t))return;let r=Zi(e,!0);try{let i=this.tracer.startSpan(t,{attributes:{[$.EVENT_TYPE]:t,[$.TARGET_ELEMENT]:e.tagName,[$.TARGET_XPATH]:r,[$.HTTP_URL]:window.location.href}},n?f.setSpan(m.active(),n):void 0);return this._shouldPreventSpanCreation(t,e,i)===!0?void 0:(this._spansData.set(i,{taskCount:0}),i)}catch(e){this._diag.error(`failed to start create new user interaction span`,e)}}_decrementTask(e){let t=this._spansData.get(e);t&&(t.taskCount--,t.taskCount===0&&this._tryToEndSpan(e,t.hrTimeLastTimeout))}_getCurrentSpan(e){let t=e.get(Xa);return t&&f.getSpan(t)}_incrementTask(e){let t=this._spansData.get(e);t&&t.taskCount++}addPatchedListener(e,t,n,r){let i=this._wrappedListeners.get(n);i||(i=new Map,this._wrappedListeners.set(n,i));let a=i.get(t);return a||(a=new Map,i.set(t,a)),a.has(e)?!1:(a.set(e,r),!0)}removePatchedListener(e,t,n){let r=this._wrappedListeners.get(n);if(!r)return;let i=r.get(t);if(!i)return;let a=i.get(e);return a&&(i.delete(e),i.size===0&&(r.delete(t),r.size===0&&this._wrappedListeners.delete(n))),a}_invokeListener(e,t,n){return typeof e==`function`?e.apply(t,n):e.handleEvent(n[0])}_patchAddEventListener(){let e=this;return t=>function(n,r,i){if(!r)return t.call(this,n,r,i);let a=i&&typeof i==`object`&&i.once,o=function(...t){let i,o=t[0],s=o?.target;o&&(i=e._eventsSpanMap.get(o)),a&&e.removePatchedListener(this,n,r);let c=e._createSpan(s,n,i);return c?(o&&e._eventsSpanMap.set(o,c),m.with(f.setSpan(m.active(),c),()=>{let n=e._invokeListener(r,this,t);return c.end(),n})):e._invokeListener(r,this,t)};if(e.addPatchedListener(this,n,r,o))return t.call(this,n,o,i)}}_patchRemoveEventListener(){let e=this;return t=>function(n,r,i){let a=e.removePatchedListener(this,n,r);return a?t.call(this,n,a,i):t.call(this,n,r,i)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,`replaceState`,this._patchHistoryMethod()),this._wrap(history,`pushState`,this._patchHistoryMethod()),this._wrap(history,`back`,this._patchHistoryMethod()),this._wrap(history,`forward`,this._patchHistoryMethod()),this._wrap(history,`go`,this._patchHistoryMethod())}_patchHistoryMethod(){let e=this;return t=>function(...n){let r=`${location.pathname}${location.hash}${location.search}`,i=t.apply(this,n),a=`${location.pathname}${location.hash}${location.search}`;return r!==a&&e._updateInteractionName(a),i}}_unpatchHistoryApi(){k(history.replaceState)&&this._unwrap(history,`replaceState`),k(history.pushState)&&this._unwrap(history,`pushState`),k(history.back)&&this._unwrap(history,`back`),k(history.forward)&&this._unwrap(history,`forward`),k(history.go)&&this._unwrap(history,`go`)}_updateInteractionName(e){let t=f.getSpan(m.active());t&&typeof t.updateName==`function`&&t.updateName(`${Za} ${e}`)}_patchZoneCancelTask(){let e=this;return t=>function(n){let r=Zone.current,i=e._getCurrentSpan(r);return i&&e._shouldCountTask(n,r)&&e._decrementTask(i),t.call(this,n)}}_patchZoneScheduleTask(){let e=this;return t=>function(n){let r=Zone.current,i=e._getCurrentSpan(r);return i&&e._shouldCountTask(n,r)&&(e._incrementTask(i),e._checkForTimeout(n,i)),t.call(this,n)}}_patchZoneRunTask(){let e=this;return t=>function(n,r,i){let a=(Array.isArray(i)&&i[0]instanceof Event?i[0]:void 0)?.target,o,s=this;if(a){if(o=e._createSpan(a,n.eventName),o)return e._incrementTask(o),s.run(()=>{try{return m.with(f.setSpan(m.active(),o),()=>{let e=Zone.current;return n._zone=e,t.call(e,n,r,i)})}finally{e._decrementTask(o)}})}else o=e._getCurrentSpan(s);try{return t.call(s,n,r,i)}finally{o&&e._shouldCountTask(n,s)&&e._decrementTask(o)}}}_shouldCountTask(e,t){if(e._zone&&(t=e._zone),!t||!e.data||e.data.isPeriodic)return!1;let n=this._getCurrentSpan(t);return!n||!this._spansData.get(n)?!1:e.type===`macroTask`||e.type===`microTask`}_tryToEndSpan(e,t){e&&this._spansData.get(e)&&(e.end(t),this._spansData.delete(e))}enable(){let e=this._getZoneWithPrototype();this._diag.debug(`applying patch to`,this.moduleName,this.version,`zone:`,!!e),e?(k(e.prototype.runTask)&&(this._unwrap(e.prototype,`runTask`),this._diag.debug(`removing previous patch from method runTask`)),k(e.prototype.scheduleTask)&&(this._unwrap(e.prototype,`scheduleTask`),this._diag.debug(`removing previous patch from method scheduleTask`)),k(e.prototype.cancelTask)&&(this._unwrap(e.prototype,`cancelTask`),this._diag.debug(`removing previous patch from method cancelTask`)),this._zonePatched=!0,this._wrap(e.prototype,`runTask`,this._patchZoneRunTask()),this._wrap(e.prototype,`scheduleTask`,this._patchZoneScheduleTask()),this._wrap(e.prototype,`cancelTask`,this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(e=>{k(e.addEventListener)&&(this._unwrap(e,`addEventListener`),this._diag.debug(`removing previous patch from method addEventListener`)),k(e.removeEventListener)&&(this._unwrap(e,`removeEventListener`),this._diag.debug(`removing previous patch from method removeEventListener`)),this._wrap(e,`addEventListener`,this._patchAddEventListener()),this._wrap(e,`removeEventListener`,this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){let e=this._getZoneWithPrototype();this._diag.debug(`removing patch from`,this.moduleName,this.version,`zone:`,!!e),e&&this._zonePatched?(k(e.prototype.runTask)&&this._unwrap(e.prototype,`runTask`),k(e.prototype.scheduleTask)&&this._unwrap(e.prototype,`scheduleTask`),k(e.prototype.cancelTask)&&this._unwrap(e.prototype,`cancelTask`)):this._getPatchableEventTargets().forEach(e=>{k(e.addEventListener)&&this._unwrap(e,`addEventListener`),k(e.removeEventListener)&&this._unwrap(e,`removeEventListener`)}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}},to=`open-knowledge-app`,no=!1;function ro(){return{BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.58.9`}?.VITE_OTEL_COLLECTOR_URL??`http://localhost:14318`}function io(){if(no)return;no=!0;let e=null,t=!1;try{let n=ro(),r={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.58.9`};e=new qi({resource:Zr({[Je]:`open-knowledge-app`,[Ye]:r?.VITE_APP_VERSION??`dev`,[Re]:r?.MODE??`dev`}),spanProcessors:[new Ui(new fn({url:`${n}/v1/traces`}),{maxExportBatchSize:50,scheduledDelayMillis:2e3})]}),e.register(),t=!0,Cn({instrumentations:[new sa,new eo({eventNames:[`click`,`submit`]}),new qa({propagateTraceHeaderCorsUrls:[/^https?:\/\/localhost(:\d+)?\/api\//,/^https?:\/\/127\.0\.0\.1(:\d+)?\/api\//,/^\/api\//],clearTimingResources:!0})]}),console.info(`[otel] frontend telemetry initialized — OTLP/HTTP → ${n}/v1/traces`)}catch(n){console.warn(`[otel] frontend telemetry init failed — continuing without`,n),t&&e&&e.shutdown().catch(()=>{}),no=!1}}function ao(){return f.getTracer(to)}export{ao as getAppTracer,io as install};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./repair-skills-EH0Ffdw4.mjs";export{e as repairSkills};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,o as t,r as n}from"./server-lock-rUhECxao.mjs";export{n as markServerLockDraining,e as releaseServerLock,t as updateServerLockPort};
|
package/dist/src-FRwwqmkJ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./src-DNXRgLIt.mjs";import"./resolve-project-root-Nwm2qORT.mjs";import"./src-DganMrgf.mjs";import"./acp-harness-probe-D3XBCJlW.mjs";import"./init-7CTnd_9x.mjs";import{n as e}from"./loader-DWgAKgRN.mjs";import"./skill-teardown-C6p-GLNj.mjs";import"./preview-Byh_oZ6p.mjs";import"./mcp-migrate-event-B1gJf6bG.mjs";export{e as loadConfig};
|
package/dist/start-Co2WNLNX.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{T as e,_ as t,m as n,n as r}from"./start-xVODdbR6.mjs";export{r as bootStartServer,n as resolveBundledReactShellDir,t as resolveHost,e as startCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-acXC9Sbb.mjs";import"./src-BPVU4Y0o.mjs";import"./chunk-WYO6CB5R-DN1R0VLx.mjs";import"./chunk-ICXQ74PX-DbJy3VdO.mjs";import"./chunk-HOUHSVGY-C3h3PdhC.mjs";import"./chunk-Q4XR5HBZ-jWirJQsj.mjs";import"./chunk-7BUUIJ7U-D7hE25H9.mjs";import"./chunk-OGEWGWER-DgPAesMA.mjs";import"./chunk-32BRIVSS-Dwq69mnI.mjs";import"./chunk-XXDRQBXY-D1gFTzjI.mjs";import"./chunk-VR4S4FIN-RUJ5PgRH.mjs";import"./chunk-C7G6YPKG-BAX_SClW.mjs";import"./chunk-ZGVPDNZ5-CyyHBEs2.mjs";import"./chunk-52WLFC77-Cn-qt8h-.mjs";import"./chunk-FWX5IMBZ-Cn1xNcn5.mjs";import{i as t,n,r,t as i}from"./chunk-EX3LRPZG-Chp9b-Lc.mjs";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
2
|
-
//# sourceMappingURL=stateDiagram-v2-6OUMAXLB-DCmVVpGm.mjs.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-acXC9Sbb.mjs";import"./src-BPVU4Y0o.mjs";import"./chunk-WYO6CB5R-DN1R0VLx.mjs";import"./chunk-ICXQ74PX-DbJy3VdO.mjs";import"./chunk-HOUHSVGY-C3h3PdhC.mjs";import"./chunk-Q4XR5HBZ-jWirJQsj.mjs";import"./chunk-7BUUIJ7U-D7hE25H9.mjs";import"./chunk-OGEWGWER-DgPAesMA.mjs";import"./chunk-32BRIVSS-Dwq69mnI.mjs";import"./chunk-XXDRQBXY-D1gFTzjI.mjs";import"./chunk-VR4S4FIN-RUJ5PgRH.mjs";import"./chunk-C7G6YPKG-BAX_SClW.mjs";import"./chunk-ZGVPDNZ5-CyyHBEs2.mjs";import"./chunk-52WLFC77-Cn-qt8h-.mjs";import"./chunk-FWX5IMBZ-Cn1xNcn5.mjs";import"./chunk-ZIRB5QZD-K23GvNu-.mjs";import{r as t,t as n}from"./chunk-PUDLZKDR-CIWYIjrF.mjs";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)}
|
|
2
|
-
.swimlane.cluster rect {
|
|
3
|
-
stroke: ${e.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,`getStyles`)});export{r as diagram};
|
|
9
|
-
//# sourceMappingURL=swimlanesDiagram-G3AALYLV-CdQlHesp.mjs.map
|
|
File without changes
|