@nodefony/studio 10.0.0-alpha.2 → 10.0.0-alpha.4
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/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/decorate.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/decorateMetadata.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/decorateParam.js +1 -1
- package/dist/frontend/assets/{Accordion-DeeP_sUE.js → Accordion-MpCaanBp.js} +1 -1
- package/dist/frontend/assets/{ActionsLiveGraph-OtAEmCbe.js → ActionsLiveGraph-Bn9aDMoy.js} +1 -1
- package/dist/frontend/assets/{ApiKeys-Do5AqihE.js → ApiKeys-CkrfHvuz.js} +1 -1
- package/dist/frontend/assets/{ArchitectureLiveGraph-UVR2nwmV.js → ArchitectureLiveGraph-FiAXWEmb.js} +1 -1
- package/dist/frontend/assets/{Audit-CC2uyz48.js → Audit-CXwK0CaZ.js} +1 -1
- package/dist/frontend/assets/{BackplaneLiveGraph-BsKE3ofy.js → BackplaneLiveGraph-Cp6QpU0L.js} +1 -1
- package/dist/frontend/assets/{Breadcrumbs-Di_zerWP.js → Breadcrumbs-CzapNMrQ.js} +1 -1
- package/dist/frontend/assets/{BrickStoreChip-ChQfhXYK.js → BrickStoreChip-BIXuy1kL.js} +1 -1
- package/dist/frontend/assets/{Chat-BlyYQbsu.js → Chat-Do9NIPmS.js} +1 -1
- package/dist/frontend/assets/{Chip-Bl5u9dbS.js → Chip-BjqN597E.js} +1 -1
- package/dist/frontend/assets/{Cluster-Dxqjasb2.js → Cluster-BkZt_mYF.js} +1 -1
- package/dist/frontend/assets/Collapse-CmBXtX5V.js +1 -0
- package/dist/frontend/assets/{ConfigPage-Pd1VGrYE.js → ConfigPage-v0om_j8G.js} +1 -1
- package/dist/frontend/assets/{ConnectorCard-COW3xxIY.js → ConnectorCard-DbRP2RJi.js} +1 -1
- package/dist/frontend/assets/{Create-BtNi60yz.js → Create-fZhx_pmV.js} +1 -1
- package/dist/frontend/assets/{DashboardSupervision-DzES5rH6.js → DashboardSupervision-BuMAg987.js} +1 -1
- package/dist/frontend/assets/{Database-B9ML7R0q.js → Database-DRXFZ4wa.js} +1 -1
- package/dist/frontend/assets/{DbLogo-Banbmr1E.js → DbLogo-Do6DLwZ4.js} +1 -1
- package/dist/frontend/assets/{Documentation-D5GFgWWF.js → Documentation-DsWmvZxK.js} +1 -1
- package/dist/frontend/assets/{FanOutLiveGraph-C9XplTDk.js → FanOutLiveGraph-DGM9BK5-.js} +1 -1
- package/dist/frontend/assets/{Firewall-8mJttiRK.js → Firewall-DpC4JJJR.js} +1 -1
- package/dist/frontend/assets/{IconAdjustments-D0HfIe2W.js → IconAdjustments-BMMLxTcM.js} +1 -1
- package/dist/frontend/assets/{IconAdjustmentsAlt-CpX5lLHt.js → IconAdjustmentsAlt-Ir4G4Y7Z.js} +1 -1
- package/dist/frontend/assets/{IconAdjustmentsHorizontal-DImXiF4f.js → IconAdjustmentsHorizontal-BxMmRrUv.js} +1 -1
- package/dist/frontend/assets/{IconAffiliate-BlILKrfl.js → IconAffiliate-1tDrNA0o.js} +1 -1
- package/dist/frontend/assets/{IconApps-D42Eh0ms.js → IconApps-CRDRa7tT.js} +1 -1
- package/dist/frontend/assets/{IconArchive-B3mckh6a.js → IconArchive-D8HwRV4a.js} +1 -1
- package/dist/frontend/assets/{IconArrowDown-x3fexITu.js → IconArrowDown-GaUymYBK.js} +1 -1
- package/dist/frontend/assets/{IconArrowLeft-BW1qFtph.js → IconArrowLeft-DferA-ep.js} +1 -1
- package/dist/frontend/assets/{IconArrowUp-BA1LHiHP.js → IconArrowUp-PCiLTfG1.js} +1 -1
- package/dist/frontend/assets/IconArrowsExchange-DCapIwe0.js +1 -0
- package/dist/frontend/assets/{IconArrowsSplit2-CQ6kodDz.js → IconArrowsSplit2-W0sh3TaC.js} +1 -1
- package/dist/frontend/assets/IconBan-Dp5q0Lnv.js +1 -0
- package/dist/frontend/assets/{IconBook-BBvFf5ZR.js → IconBook-BmsZkk0J.js} +1 -1
- package/dist/frontend/assets/{IconCircleCheck-A40shAqp.js → IconCircleCheck-CFT2zXBN.js} +1 -1
- package/dist/frontend/assets/{IconCircleDot-DJ3TPKeX.js → IconCircleDot-DNL8Ny4t.js} +1 -1
- package/dist/frontend/assets/IconCircuitResistor-B7RDK9N_.js +1 -0
- package/dist/frontend/assets/{IconCode-CKau3qWG.js → IconCode-C-xjq0yN.js} +1 -1
- package/dist/frontend/assets/{IconDeviceDesktop-D5JRHElk.js → IconDeviceDesktop-COvdDCew.js} +1 -1
- package/dist/frontend/assets/{IconDots-DxBL013E.js → IconDots-DmeZz8jE.js} +1 -1
- package/dist/frontend/assets/{IconDownload-JE7axuwl.js → IconDownload-gN-jUZIw.js} +1 -1
- package/dist/frontend/assets/{IconEye-DO2HMGkp.js → IconEye-Bk_cwCK8.js} +1 -1
- package/dist/frontend/assets/{IconFile-BhdAnR_G.js → IconFile-CGY0avHw.js} +1 -1
- package/dist/frontend/assets/{IconFolder-Yt7HBZMR.js → IconFolder-fobXch7V.js} +1 -1
- package/dist/frontend/assets/{IconGitBranch-BMDmzaoq.js → IconGitBranch-BSdsugvP.js} +1 -1
- package/dist/frontend/assets/{IconHeartRateMonitor-CD4lXee2.js → IconHeartRateMonitor-DnLjWo9E.js} +1 -1
- package/dist/frontend/assets/{IconHelpCircle-Dn9dibbs.js → IconHelpCircle-B_oofaHt.js} +1 -1
- package/dist/frontend/assets/{IconLayoutGrid-BgtRb6yj.js → IconLayoutGrid-RQQcbQ4V.js} +1 -1
- package/dist/frontend/assets/{IconNetwork-zXiVscld.js → IconNetwork-CVh_7SBg.js} +1 -1
- package/dist/frontend/assets/{IconPackages-n3HB7b1q.js → IconPackages-DtokEJ4h.js} +1 -1
- package/dist/frontend/assets/{IconPencil-DbS-vJyZ.js → IconPencil-aoiAHL8L.js} +1 -1
- package/dist/frontend/assets/{IconPlayerPause-C7lj1Zh9.js → IconPlayerPause-DKHqe8vf.js} +1 -1
- package/dist/frontend/assets/IconPlayerPlay-Bf3fub_J.js +1 -0
- package/dist/frontend/assets/IconPlus-WkavYvcK.js +1 -0
- package/dist/frontend/assets/{IconPuzzle-CwhG8MRK.js → IconPuzzle-CVsu0cJb.js} +1 -1
- package/dist/frontend/assets/{IconRecycle-BY_5VEAJ.js → IconRecycle-Be0bCfZE.js} +1 -1
- package/dist/frontend/assets/{IconSend-BcRgfgxx.js → IconSend-B1EAVyLW.js} +1 -1
- package/dist/frontend/assets/{IconServer2-C6dpzUEW.js → IconServer2-X42sUHRA.js} +1 -1
- package/dist/frontend/assets/{IconShieldOff-D79HNNIy.js → IconShieldOff-33j_CISf.js} +1 -1
- package/dist/frontend/assets/{IconSitemap-Dab03rIE.js → IconSitemap-DzQiVK2C.js} +1 -1
- package/dist/frontend/assets/{IconStack2-DyGf4gBB.js → IconStack2-DiTO4Kti.js} +1 -1
- package/dist/frontend/assets/{IconTerminal2-DSH3YLIn.js → IconTerminal2-BV1pt7OG.js} +1 -1
- package/dist/frontend/assets/{IconUserOff-ChnC-rv1.js → IconUserOff-UXY4H2d4.js} +1 -1
- package/dist/frontend/assets/{IconWorld-hgife9QW.js → IconWorld-PcZDgbVL.js} +1 -1
- package/dist/frontend/assets/{List-DRlGV5Z9.js → List-uo3j-T0O.js} +1 -1
- package/dist/frontend/assets/{LogVisuals-CT7njxyS.js → LogVisuals-DsuR5jXM.js} +1 -1
- package/dist/frontend/assets/Logs-C_qQuQSO.js +1 -0
- package/dist/frontend/assets/{Migrations-B-_naVTR.js → Migrations-BGVVcM1R.js} +1 -1
- package/dist/frontend/assets/{ModuleDetail-B0GAuHqs.js → ModuleDetail-DxODg8lc.js} +1 -1
- package/dist/frontend/assets/{Modules-DmjSVmji.js → Modules-DGDFYWQ9.js} +1 -1
- package/dist/frontend/assets/{OrmEntity-BEZx7FYP.js → OrmEntity-C3-wD82Y.js} +1 -1
- package/dist/frontend/assets/{OrmOverview-CMxzsr9H.js → OrmOverview-C8TdHQaY.js} +1 -1
- package/dist/frontend/assets/{OrmWorker-D93uHZtx.js → OrmWorker-DyLcehCD.js} +1 -1
- package/dist/frontend/assets/{Playground-D_rfpkvQ.js → Playground-aTDJ_ivl.js} +1 -1
- package/dist/frontend/assets/{ProbesLiveGraph-BDd95SoY.js → ProbesLiveGraph-D44vbnP7.js} +1 -1
- package/dist/frontend/assets/{Profile-2wi5abhR.js → Profile-C3LAvLC8.js} +1 -1
- package/dist/frontend/assets/{ProfileFields-CrS9PGuv.js → ProfileFields-DklbGAtG.js} +1 -1
- package/dist/frontend/assets/{Progress-DInNqOHx.js → Progress-Dwkf5mnx.js} +1 -1
- package/dist/frontend/assets/{ProtocoleLiveGraph-BW9WiiJR.js → ProtocoleLiveGraph-CH4059bb.js} +1 -1
- package/dist/frontend/assets/{RealtimeConsole-77e0iDl2.js → RealtimeConsole-D4_d84f7.js} +1 -1
- package/dist/frontend/assets/{RingProgress-CDDSa9QM.js → RingProgress-Dlgky3bB.js} +1 -1
- package/dist/frontend/assets/{Roadmap-CSv00gl7.js → Roadmap-7uQkHixK.js} +1 -1
- package/dist/frontend/assets/{RoleSwitch-BVx1Ea5b.js → RoleSwitch-Dsf9uvrn.js} +1 -1
- package/dist/frontend/assets/{Roles-CvbxUgPg.js → Roles-DXNeicSE.js} +1 -1
- package/dist/frontend/assets/{RoutesView-D61oUF0X.js → RoutesView-23RFz8El.js} +1 -1
- package/dist/frontend/assets/{Runtime-UIvgh_gO.js → Runtime-D3ci7YVL.js} +1 -1
- package/dist/frontend/assets/{Sessions-Chibt7_c.js → Sessions-ovPwp-Ey.js} +1 -1
- package/dist/frontend/assets/{Skeleton-Bo9zmk9r.js → Skeleton-CEx0u6Vm.js} +1 -1
- package/dist/frontend/assets/{Slider-CEX_48EM.js → Slider-Br43Xp6v.js} +1 -1
- package/dist/frontend/assets/{StoresView-dGRhFCd-.js → StoresView-Cl70sL24.js} +1 -1
- package/dist/frontend/assets/{System-qj1r2iXo.js → System-T23m0nmJ.js} +1 -1
- package/dist/frontend/assets/{TagsInput-BL_ud2uJ.js → TagsInput-D0w9J-41.js} +1 -1
- package/dist/frontend/assets/{Textarea-BlO8gUlE.js → Textarea-Ckgp9_Aw.js} +1 -1
- package/dist/frontend/assets/{TraceView-Ufd3bDP0.js → TraceView-BuC-6ahG.js} +1 -1
- package/dist/frontend/assets/{Twin-J5wcamTD.js → Twin-DUxfPm05.js} +1 -1
- package/dist/frontend/assets/{UserProfile-BC6vIHRr.js → UserProfile-BMwvavKN.js} +1 -1
- package/dist/frontend/assets/{Users-D5DFs-rY.js → Users-BPIMHLWM.js} +1 -1
- package/dist/frontend/assets/{Webhooks-DNnY2_6O.js → Webhooks-CvNou0qr.js} +1 -1
- package/dist/frontend/assets/{Workspace-CMTzcN6A.js → Workspace-CQptEGuu.js} +1 -1
- package/dist/frontend/assets/{abnfDiagram-VCTEODGH-Cernzewp.js → abnfDiagram-VCTEODGH-DakEpAso.js} +1 -1
- package/dist/frontend/assets/{apiKeysModel-CDXHN9jJ.js → apiKeysModel-BqjObqyi.js} +1 -1
- package/dist/frontend/assets/architecture-7GRP2DOG-Zh-DJtq2.js +1 -0
- package/dist/frontend/assets/{architectureDiagram-5GKGNRK7-ybI3XK-Z.js → architectureDiagram-5GKGNRK7-rHr5JN-x.js} +1 -1
- package/dist/frontend/assets/{auditFormat-0-j3KQs8.js → auditFormat-CupHRkJY.js} +1 -1
- package/dist/frontend/assets/{auditModel-A_5uW57O.js → auditModel-CTzDSxkP.js} +1 -1
- package/dist/frontend/assets/{chunk-FOHPRMQF-CoA4358r.js → chunk-FOHPRMQF-DzxwRta7.js} +2 -2
- package/dist/frontend/assets/{chunk-IMKFNOWR-BrX7FTwU.js → chunk-IMKFNOWR-C0dajEEe.js} +1 -1
- package/dist/frontend/assets/{chunk-SHT3W25Y-C_yspRzD.js → chunk-SHT3W25Y-BkMRzaYI.js} +1 -1
- package/dist/frontend/assets/{chunk-SVP7TREG-DDQGdttt.js → chunk-SVP7TREG-oTcoMsBW.js} +1 -1
- package/dist/frontend/assets/{chunk-TICWLB2K-CKVEp1Rl.js → chunk-TICWLB2K-BC-WUp6G.js} +1 -1
- package/dist/frontend/assets/{classDiagram-ZZMXUADV-DG8wCuQd.js → classDiagram-ZZMXUADV-C1pS6Zpy.js} +1 -1
- package/dist/frontend/assets/{classDiagram-v2-VYDZK3BY-DG8wCuQd.js → classDiagram-v2-VYDZK3BY-C1pS6Zpy.js} +1 -1
- package/dist/frontend/assets/{configModel-DrP4M7xH.js → configModel-9wff8bR0.js} +1 -1
- package/dist/frontend/assets/{cose-bilkent-JH36ORCC-De3bNEVd.js → cose-bilkent-JH36ORCC-DrgF-lEP.js} +1 -1
- package/dist/frontend/assets/cynefin-OW5HDTMX-DTQAFPRh.js +1 -0
- package/dist/frontend/assets/{cynefinDiagram-5FMLGOSQ-DumbCcQA.js → cynefinDiagram-5FMLGOSQ-D6MsKNt5.js} +1 -1
- package/dist/frontend/assets/cytoscape.esm-EK2DW5Qr.js +321 -0
- package/dist/frontend/assets/{dagre-GXQ25YYZ-C_dPDp-P.js → dagre-GXQ25YYZ-Ci7TKj6S.js} +1 -1
- package/dist/frontend/assets/{diagram-S7CK7UJ4-CiH5G7oo.js → diagram-S7CK7UJ4-Cwd6kIV8.js} +1 -1
- package/dist/frontend/assets/{diagram-UQ7AKVKN-KJ4yQtke.js → diagram-UQ7AKVKN-B5dc--Uo.js} +1 -1
- package/dist/frontend/assets/{diagram-VSXAHHWV-C2RlE7sA.js → diagram-VSXAHHWV-Bbk7qR-7.js} +1 -1
- package/dist/frontend/assets/{diagram-VX7I27RA-C35dzzE2.js → diagram-VX7I27RA-TWNFQjSJ.js} +1 -1
- package/dist/frontend/assets/{diagram-Z3DM3KII-dkqe3QpU.js → diagram-Z3DM3KII-BMmQZ4NG.js} +1 -1
- package/dist/frontend/assets/{ebnfDiagram-PWID7BFC-BNGHaYJh.js → ebnfDiagram-PWID7BFC-CAX8xfdl.js} +1 -1
- package/dist/frontend/assets/{erDiagram-RLTQ6QDP-Bid1pEh4.js → erDiagram-RLTQ6QDP-CWmhnVLB.js} +1 -1
- package/dist/frontend/assets/{eventFlow-DkVb8OS6.js → eventFlow-DFfppLtR.js} +1 -1
- package/dist/frontend/assets/eventmodeling-NTZA5JFV-DkQbKxGr.js +1 -0
- package/dist/frontend/assets/{flowDiagram-HODETNUW-BtETiN6B.js → flowDiagram-HODETNUW-bvCiZixO.js} +1 -1
- package/dist/frontend/assets/gitGraph-4MIJSDKK-BXX9MUcA.js +1 -0
- package/dist/frontend/assets/{gitGraphDiagram-WWUBYQGX-_DeBz2Y8.js → gitGraphDiagram-WWUBYQGX-BauOrV6h.js} +1 -1
- package/dist/frontend/assets/{hooks-Cq2g1mUn.js → hooks-CfKRhu_H.js} +1 -1
- package/dist/frontend/assets/index-22LA2xX4.css +1 -0
- package/dist/frontend/assets/index-B5XPwAJ0.js +28 -0
- package/dist/frontend/assets/info-A6RAGUB7-C6_XFf2W.js +1 -0
- package/dist/frontend/assets/{infoDiagram-27XIBGKW-BLdr5J8o.js → infoDiagram-27XIBGKW-B7tu0JSw.js} +1 -1
- package/dist/frontend/assets/{ishikawaDiagram-5VMMS53U-V6b0BWGR.js → ishikawaDiagram-5VMMS53U-CDxS8D1o.js} +1 -1
- package/dist/frontend/assets/{kanban-definition-UXKFOSKX-iK7pOag1.js → kanban-definition-UXKFOSKX-DyHAh7b3.js} +1 -1
- package/dist/frontend/assets/{mermaid-parser.core-CjM11pEo.js → mermaid-parser.core-CHfQPsU0.js} +3 -3
- package/dist/frontend/assets/{mermaid.core-D0q9HDk7.js → mermaid.core--ckckkca.js} +4 -4
- package/dist/frontend/assets/{mindmap-definition-YA3MSWOX-DmZ6mtFL.js → mindmap-definition-YA3MSWOX-BFkOwGys.js} +1 -1
- package/dist/frontend/assets/packet-AYTQ26CC-HR9HA7Bb.js +1 -0
- package/dist/frontend/assets/{pegDiagram-XKGWAZYB-CBbcb55o.js → pegDiagram-XKGWAZYB-ChUjCgzu.js} +1 -1
- package/dist/frontend/assets/pie-WAS4IAKB-D-TpfAfM.js +1 -0
- package/dist/frontend/assets/{pieDiagram-E7YTZNPT-DvIb4hiL.js → pieDiagram-E7YTZNPT-CuQuN02N.js} +1 -1
- package/dist/frontend/assets/{profileVisuals-ctjaF0gr.js → profileVisuals-AfQmPBF0.js} +1 -1
- package/dist/frontend/assets/radar-RG4KPBEZ-C4k2mLY3.js +1 -0
- package/dist/frontend/assets/railroad-74A4TZTK-CYIPd3_z.js +1 -0
- package/dist/frontend/assets/railroad-abnf-HS5TGJTU-dM0hWQvr.js +1 -0
- package/dist/frontend/assets/railroad-ebnf-LZEXJU2U-DWGR3jQw.js +1 -0
- package/dist/frontend/assets/railroad-peg-WCYAUIDC-DGCWi8va.js +1 -0
- package/dist/frontend/assets/{railroadDiagram-O6MQD6OU-D3MMDWru.js → railroadDiagram-O6MQD6OU-BUXWMmma.js} +1 -1
- package/dist/frontend/assets/{requirementDiagram-BXWQKSXE-nt85uyup.js → requirementDiagram-BXWQKSXE-Bsh-F7ML.js} +1 -1
- package/dist/frontend/assets/{sequenceDiagram-WJ2MYXX4-Cug_t4vg.js → sequenceDiagram-WJ2MYXX4-DymwOXlw.js} +1 -1
- package/dist/frontend/assets/{stateDiagram-D77RDMKH-kjE2O9aM.js → stateDiagram-D77RDMKH-vCnR_fnm.js} +1 -1
- package/dist/frontend/assets/{stateDiagram-v2-MP3YSRHH-D7X2YGJU.js → stateDiagram-v2-MP3YSRHH-CRYTgAP0.js} +1 -1
- package/dist/frontend/assets/{stores-CLUS0FeB.js → stores-qxxkbS9c.js} +1 -1
- package/dist/frontend/assets/{swimlanes-42K2YHIH-6q0raMmQ.js → swimlanes-42K2YHIH-Cinv35_9.js} +1 -1
- package/dist/frontend/assets/{swimlanesDiagram-VR7AAH4N-BPC18vf0.js → swimlanesDiagram-VR7AAH4N-C32RYZYz.js} +1 -1
- package/dist/frontend/assets/{timeline-definition-24CTP7MA-D_-APocZ.js → timeline-definition-24CTP7MA-rEBLQF9P.js} +1 -1
- package/dist/frontend/assets/treeView-Q6P3EWNA-CZk8-mN6.js +1 -0
- package/dist/frontend/assets/treemap-WGGIJYW6-Bo7KzIC6.js +1 -0
- package/dist/frontend/assets/ui-a5TQE0p7.js +319 -0
- package/dist/frontend/assets/{useBlockSource-zm0JfWOg.js → useBlockSource-Ebxw3nWx.js} +1 -1
- package/dist/frontend/assets/{useSocketLiveData-D5yoLGQm.js → useSocketLiveData-DS1IelEt.js} +1 -1
- package/dist/frontend/assets/{usersFormat-D4sIKqYw.js → usersFormat-DfK4u7y3.js} +1 -1
- package/dist/frontend/assets/{vennDiagram-4TSXK5OY-D2AZPLVm.js → vennDiagram-4TSXK5OY-BVy8Lal-.js} +1 -1
- package/dist/frontend/assets/wardley-WFR3VGLG-Bk_ZXh6D.js +1 -0
- package/dist/frontend/assets/{wardleyDiagram-VM6X3IG4-D0hzksZQ.js → wardleyDiagram-VM6X3IG4-ME0kZTnx.js} +1 -1
- package/dist/frontend/assets/{xychartDiagram-S5SC5T6Z-4iH1cxcS.js → xychartDiagram-S5SC5T6Z-BqWnjUPr.js} +1 -1
- package/dist/frontend/index.html +12 -12
- package/dist/index.js +20 -4
- package/dist/nodefony/config/config.js +14 -20
- package/dist/nodefony/config/defineModuleConfig.js +33 -0
- package/dist/nodefony/controller/StudioController.js +2 -2
- package/dist/nodefony/controller/StudioCreateController.js +3 -3
- package/dist/nodefony/controller/StudioRealtimeController.js +2 -2
- package/dist/nodefony/interfaces/IStudioConfig.js +1 -0
- package/dist/nodefony/service/ScaffoldService.js +8 -6
- package/dist/types/index.d.ts +43 -0
- package/dist/types/nodefony/config/config.d.ts +20 -0
- package/dist/types/nodefony/config/defineModuleConfig.d.ts +24 -0
- package/dist/types/nodefony/controller/StudioController.d.ts +98 -0
- package/dist/types/nodefony/controller/StudioCreateController.d.ts +58 -0
- package/dist/types/nodefony/controller/StudioRealtimeController.d.ts +93 -0
- package/dist/types/nodefony/interfaces/IStudioConfig.d.ts +19 -0
- package/dist/types/nodefony/realtime/clusterOrm.d.ts +30 -0
- package/dist/types/nodefony/realtime/clusterSupervision.d.ts +35 -0
- package/dist/types/nodefony/realtime/providers.d.ts +134 -0
- package/dist/types/nodefony/service/ScaffoldService.d.ts +199 -0
- package/package.json +25 -22
- package/dist/frontend/assets/Collapse-c8A5_Xw2.js +0 -1
- package/dist/frontend/assets/IconArrowsExchange-F0lEv98_.js +0 -1
- package/dist/frontend/assets/IconBan-VAlsgp2Z.js +0 -1
- package/dist/frontend/assets/IconCircuitResistor-DPBm4VS4.js +0 -1
- package/dist/frontend/assets/IconPlayerPlay-BnMxtNtL.js +0 -1
- package/dist/frontend/assets/IconPlus-C3Eai0ws.js +0 -1
- package/dist/frontend/assets/Logs-BjbwxWdb.js +0 -1
- package/dist/frontend/assets/architecture-7GRP2DOG-D19eKeHC.js +0 -1
- package/dist/frontend/assets/cynefin-OW5HDTMX-CSeOsgpk.js +0 -1
- package/dist/frontend/assets/cytoscape.esm-BsO9fSUN.js +0 -321
- package/dist/frontend/assets/eventmodeling-NTZA5JFV-CMXM4LWU.js +0 -1
- package/dist/frontend/assets/gitGraph-4MIJSDKK-CwmqWyfB.js +0 -1
- package/dist/frontend/assets/index-8Y7Th-EF.js +0 -28
- package/dist/frontend/assets/index-Bq9SDW24.css +0 -1
- package/dist/frontend/assets/info-A6RAGUB7-BNNzbqYr.js +0 -1
- package/dist/frontend/assets/packet-AYTQ26CC-CZMkZPcq.js +0 -1
- package/dist/frontend/assets/pie-WAS4IAKB-CI0EpLeA.js +0 -1
- package/dist/frontend/assets/radar-RG4KPBEZ-CyQDAhu-.js +0 -1
- package/dist/frontend/assets/railroad-74A4TZTK-B71O9n_n.js +0 -1
- package/dist/frontend/assets/railroad-abnf-HS5TGJTU-Df0ab8ny.js +0 -1
- package/dist/frontend/assets/railroad-ebnf-LZEXJU2U-Dcr334FZ.js +0 -1
- package/dist/frontend/assets/railroad-peg-WCYAUIDC-mcmVaJ9_.js +0 -1
- package/dist/frontend/assets/treeView-Q6P3EWNA-CC1707mF.js +0 -1
- package/dist/frontend/assets/treemap-WGGIJYW6-DBD8zPzq.js +0 -1
- package/dist/frontend/assets/ui-KaBQR2GX.js +0 -319
- package/dist/frontend/assets/wardley-WFR3VGLG-905RnCT1.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-CmaQbKwl.js";import{H as r,K as i,U as a,a as o,b as s,v as c,w as l,x as u,y as d}from"./chunk-DU6HZSFF-Ddor4J2O.js";import{g as f}from"./chunk-75Z2AOVW-8XdKJlnw.js";import"./chunk-PWAF6VOD-8aIc0M2s.js";import"./chunk-GMAD6QVW-T1eAn0xk.js";import"./chunk-P2QGCYS3-B9TYBq1U.js";import"./chunk-4HAMMTFA-BVE3Ntuo.js";import"./chunk-GVQU2GXP-CJTCPJEH.js";import"./chunk-OSK3NFVY-COHJYKGg.js";import{t as p}from"./chunk-XXDRQBXY-IULPM7G2.js";import{t as m}from"./chunk-POPQ4Y6H-DjvzCiTE.js";import"./chunk-L3NEJ4N5-CIKjoshr.js";import{d as h,u as g}from"./mermaid.core-D0q9HDk7.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,6:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},t(o,[2,4]),t(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},t(D,[2,29]),t(D,[2,30]),t(D,[2,31]),t(D,[2,32]),t(D,[2,33]),t(D,[2,34]),t(O,[2,81]),t(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(k,[2,79]),t(k,[2,80]),{27:[1,67],29:[1,68]},t(k,[2,85]),t(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,60]),t(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(H,[2,54]),t(H,[2,55]),t(H,[2,56]),{64:[1,100]},t(T,[2,59],{76:M}),t(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},t(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),t(U,[2,67]),t(U,[2,69]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),t(T,[2,57],{76:se}),t(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,61]),t(oe,[2,63]),t(U,[2,68]),t(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
1
|
+
import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-CmaQbKwl.js";import{H as r,K as i,U as a,a as o,b as s,v as c,w as l,x as u,y as d}from"./chunk-DU6HZSFF-Ddor4J2O.js";import{g as f}from"./chunk-75Z2AOVW-8XdKJlnw.js";import"./chunk-PWAF6VOD-8aIc0M2s.js";import"./chunk-GMAD6QVW-T1eAn0xk.js";import"./chunk-P2QGCYS3-B9TYBq1U.js";import"./chunk-4HAMMTFA-BVE3Ntuo.js";import"./chunk-GVQU2GXP-CJTCPJEH.js";import"./chunk-OSK3NFVY-COHJYKGg.js";import{t as p}from"./chunk-XXDRQBXY-IULPM7G2.js";import{t as m}from"./chunk-POPQ4Y6H-DjvzCiTE.js";import"./chunk-L3NEJ4N5-CIKjoshr.js";import{d as h,u as g}from"./mermaid.core--ckckkca.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,6:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},t(o,[2,4]),t(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},t(D,[2,29]),t(D,[2,30]),t(D,[2,31]),t(D,[2,32]),t(D,[2,33]),t(D,[2,34]),t(O,[2,81]),t(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(k,[2,79]),t(k,[2,80]),{27:[1,67],29:[1,68]},t(k,[2,85]),t(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,60]),t(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(H,[2,54]),t(H,[2,55]),t(H,[2,56]),{64:[1,100]},t(T,[2,59],{76:M}),t(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},t(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),t(U,[2,67]),t(U,[2,69]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),t(T,[2,57],{76:se}),t(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,61]),t(oe,[2,63]),t(U,[2,68]),t(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:A})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),ee=s[r[r.length-2]][r[r.length-1]],r.push(ee);break;case 3:return!0}}return!0},`parse`)};le.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{w as e}from"./src-Dvwdl2PF.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-CmaQbKwl.js";import{A as r,F as i,G as a,H as o,K as s,O as c,U as l,a as u,b as d,c as f,i as p,r as m,s as h,v as g,w as _,x as v,y,z as b}from"./chunk-DU6HZSFF-Ddor4J2O.js";import{t as x}from"./dist-B9M-KAS4.js";import{g as S,p as C}from"./chunk-75Z2AOVW-8XdKJlnw.js";import{a as w,c as T,i as E,n as D,r as O,s as k}from"./chunk-F27PBJKO-9OJHGb4f.js";import{t as A}from"./chunk-2Q5K7J3B-C1jixKkw.js";import{n as j,t as M}from"./mermaid.core-D0q9HDk7.js";var N=x(),P=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],ee=[1,74],L=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1))}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:ee},{23:75,55:76,73:ee},{23:77,73:F},{69:78,72:[1,79],78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),e(I,[2,6]),e(I,[2,16]),e(ve,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(ye,a,{7:120}),e(ye,a,{7:121}),e(ye,a,{7:122}),e(be,a,{41:123,7:124}),e(xe,a,{43:125,7:126}),e(xe,a,{7:126,43:127}),e(Se,a,{46:128,7:129}),e(ye,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},e(q,[2,79]),e(q,[2,80]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),e(q,[2,84]),e(q,[2,85]),e(q,[2,86]),e(q,[2,87]),e(q,[2,88]),e(q,[2,89]),e(q,[2,90]),e(q,[2,91]),e(q,[2,92]),e(q,[2,93]),e(q,[2,94]),e(q,[2,95]),e(q,[2,96]),e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e(q,[2,101]),e(q,[2,102]),e(q,[2,103]),e(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Ce,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(ve,[2,11]),{13:186,51:D,53:O,54:k},e(ve,[2,13]),e(ve,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},e(ve,[2,12]),e(be,a,{7:124,41:201}),e(xe,a,{7:126,43:202}),e(Se,a,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Ce,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
1
|
+
import{w as e}from"./src-Dvwdl2PF.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-CmaQbKwl.js";import{A as r,F as i,G as a,H as o,K as s,O as c,U as l,a as u,b as d,c as f,i as p,r as m,s as h,v as g,w as _,x as v,y,z as b}from"./chunk-DU6HZSFF-Ddor4J2O.js";import{t as x}from"./dist-B9M-KAS4.js";import{g as S,p as C}from"./chunk-75Z2AOVW-8XdKJlnw.js";import{a as w,c as T,i as E,n as D,r as O,s as k}from"./chunk-F27PBJKO-9OJHGb4f.js";import{t as A}from"./chunk-2Q5K7J3B-C1jixKkw.js";import{n as j,t as M}from"./mermaid.core--ckckkca.js";var N=x(),P=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],ee=[1,74],L=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1))}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),e(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(I,[2,30]),e(I,[2,31]),{33:[1,62]},{35:[1,63]},e(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:ee},{23:75,55:76,73:ee},{23:77,73:F},{69:78,72:[1,79],78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),e(I,[2,6]),e(I,[2,16]),e(ve,[2,10],{11:114}),e(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(I,[2,22]),{5:[1,118]},{5:[1,119]},e(I,[2,25]),e(I,[2,26]),e(I,[2,27]),e(I,[2,28]),e(I,[2,29]),e(I,[2,32]),e(I,[2,33]),e(ye,a,{7:120}),e(ye,a,{7:121}),e(ye,a,{7:122}),e(be,a,{41:123,7:124}),e(xe,a,{43:125,7:126}),e(xe,a,{7:126,43:127}),e(Se,a,{46:128,7:129}),e(ye,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},e(q,[2,79]),e(q,[2,80]),e(q,[2,81]),e(q,[2,82]),e(q,[2,83]),e(q,[2,84]),e(q,[2,85]),e(q,[2,86]),e(q,[2,87]),e(q,[2,88]),e(q,[2,89]),e(q,[2,90]),e(q,[2,91]),e(q,[2,92]),e(q,[2,93]),e(q,[2,94]),e(q,[2,95]),e(q,[2,96]),e(q,[2,97]),e(q,[2,98]),e(q,[2,99]),e(q,[2,100]),e(q,[2,101]),e(q,[2,102]),e(q,[2,103]),e(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},e(I,[2,20]),e(I,[2,21]),e(I,[2,23]),e(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},e(I,[2,50]),{16:[1,173]},e(I,[2,55]),e(Ce,[2,76]),{76:[1,174]},{16:[1,175]},e(I,[2,52]),{16:[1,176]},e(I,[2,57]),e(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(I,[2,17]),e(ve,[2,11]),{13:186,51:D,53:O,54:k},e(ve,[2,13]),e(ve,[2,14]),e(I,[2,19]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),e(I,[2,38]),{16:[1,187]},e(I,[2,39]),{16:[1,188]},e(I,[2,40]),e(I,[2,41]),{16:[1,189]},e(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},e(ve,[2,12]),e(be,a,{7:124,41:201}),e(xe,a,{7:126,43:202}),e(Se,a,{7:129,46:203}),e(I,[2,49]),e(I,[2,54]),e(Ce,[2,77]),e(I,[2,51]),e(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};we.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
package/dist/frontend/assets/{stateDiagram-D77RDMKH-kjE2O9aM.js → stateDiagram-D77RDMKH-vCnR_fnm.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as e}from"./src-Dvwdl2PF.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-CmaQbKwl.js";import{O as r,c as i,s as a,x as o}from"./chunk-DU6HZSFF-Ddor4J2O.js";import{et as s,g as c}from"./chunk-75Z2AOVW-8XdKJlnw.js";import{t as l}from"./line-M-d-d1EU.js";import"./chunk-PWAF6VOD-8aIc0M2s.js";import"./chunk-GMAD6QVW-T1eAn0xk.js";import"./chunk-P2QGCYS3-B9TYBq1U.js";import"./chunk-4HAMMTFA-BVE3Ntuo.js";import"./chunk-GVQU2GXP-CJTCPJEH.js";import"./chunk-OSK3NFVY-COHJYKGg.js";import{t as u}from"./graphlib-DS17s2tU.js";import{t as d}from"./dagre-C-rnJpZF.js";import"./chunk-F27PBJKO-9OJHGb4f.js";import"./chunk-XXDRQBXY-IULPM7G2.js";import"./chunk-POPQ4Y6H-DjvzCiTE.js";import"./chunk-L3NEJ4N5-CIKjoshr.js";import{i as f,n as p,t as m}from"./chunk-IMKFNOWR-BrX7FTwU.js";import"./mermaid.core-D0q9HDk7.js";var h=t(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=t(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=t((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=t((e,n)=>{let r=t(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),a=i.height,s=e.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=e.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),e},`drawDescrState`),y=t((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)<r&&u>s&&(f=c-(u-s)/2);let m=1-o().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=t(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=t((e,t)=>{let n=o().state.forkWidth,r=o().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=t((e,t,n,r)=>{let i=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`<br/>`);c=c.replace(/\n/g,`<br/>`);let l=c.split(a.lineBreakRegex),u=1.25*o().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}i+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,n+i+1.25*o().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},`_drawLongText`),C=t((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=t(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type==="default"&&t.descriptions.length===0&&_(i,t),t.type==="default"&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=t(function(e,i,u){let d=t(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);i.points=i.points.filter(e=>!Number.isNaN(e.y));let f=i.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=e.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let t=e.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(i.points),l=a.getRows(u.title),d=0,f=[],p=0,m=0;for(let e=0;e<=l.length;e++){let i=t.append(`text`).attr(`text-anchor`,`middle`).text(l[e]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),n.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,n.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=t.node().getBBox();t.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,s-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),n.info(g)}T++},`drawEdge`),D,O={},k=t(function(){},`setConf`),A=t(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=t(function(t,r,a,s){D=o().state;let c=o().securityLevel,l;c===`sandbox`&&(l=e(`#i`+r));let u=e(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;n.debug(`Rendering diagram `+t);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2,_=h*1.75;i(f,g,_,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=t(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=t((e,t,r,i,o,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<e.length;f++)if(e[f].stmt===`relation`){p=!1;break}r?l.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):l.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,ranker:`tight-tree`,isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}});let m=c.db.getStates(),h=c.db.getRelations(),g=Object.keys(m);for(let e of g){let n=m[e];r&&(n.parentId=r);let a;if(n.doc){let e=t.append(`g`).attr(`id`,n.id).attr(`class`,`stateGroup`);a=N(n.doc,e,n.id,!i,o,s,c);{e=y(e,n,i);let t=e.node().getBBox();a.width=t.width,a.height=t.height+D.padding/2,O[n.id]={y:D.compositTitleSize}}}else a=w(t,n,l);if(n.note){let e=w(t,{descriptions:[],id:n.id+`-note`,note:n.note,type:`note`},l);n.note.position===`left of`?(l.setNode(a.id+`-note`,e),l.setNode(a.id,a)):(l.setNode(a.id,a),l.setNode(a.id+`-note`,e)),l.setParent(a.id,a.id+`-group`),l.setParent(a.id+`-note`,a.id+`-group`)}else l.setNode(a.id,a)}n.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(e){_++,n.debug(`Setting edge`,e),l.setEdge(e.id1,e.id2,{relation:e,width:M(e.title),height:D.labelHeight*a.getRows(e.title).length,labelpos:`c`},`id`+_)}),d(l),n.debug(`Graph after layout`,l.nodes());let v=t.node();l.nodes().forEach(function(e){e!==void 0&&l.node(e)!==void 0?(n.warn(`Node `+e+`: `+JSON.stringify(l.node(e))),o.select(`#`+v.id+` #`+e).attr(`transform`,`translate(`+(l.node(e).x-l.node(e).width/2)+`,`+(l.node(e).y+(O[e]?O[e].y:0)-l.node(e).height/2)+` )`),o.select(`#`+v.id+` #`+e).attr(`data-x-shift`,l.node(e).x-l.node(e).width/2),s.querySelectorAll(`#`+v.id+` #`+e+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):n.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(n.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(t,l.edge(e),l.edge(e).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,n.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:t(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
|
|
1
|
+
import{w as e}from"./src-Dvwdl2PF.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{t as n}from"./src-CmaQbKwl.js";import{O as r,c as i,s as a,x as o}from"./chunk-DU6HZSFF-Ddor4J2O.js";import{et as s,g as c}from"./chunk-75Z2AOVW-8XdKJlnw.js";import{t as l}from"./line-M-d-d1EU.js";import"./chunk-PWAF6VOD-8aIc0M2s.js";import"./chunk-GMAD6QVW-T1eAn0xk.js";import"./chunk-P2QGCYS3-B9TYBq1U.js";import"./chunk-4HAMMTFA-BVE3Ntuo.js";import"./chunk-GVQU2GXP-CJTCPJEH.js";import"./chunk-OSK3NFVY-COHJYKGg.js";import{t as u}from"./graphlib-DS17s2tU.js";import{t as d}from"./dagre-C-rnJpZF.js";import"./chunk-F27PBJKO-9OJHGb4f.js";import"./chunk-XXDRQBXY-IULPM7G2.js";import"./chunk-POPQ4Y6H-DjvzCiTE.js";import"./chunk-L3NEJ4N5-CIKjoshr.js";import{i as f,n as p,t as m}from"./chunk-IMKFNOWR-C0dajEEe.js";import"./mermaid.core--ckckkca.js";var h=t(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=t(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=t((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=t((e,n)=>{let r=t(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),a=i.height,s=e.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=e.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),e},`drawDescrState`),y=t((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)<r&&u>s&&(f=c-(u-s)/2);let m=1-o().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=t(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=t((e,t)=>{let n=o().state.forkWidth,r=o().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=t((e,t,n,r)=>{let i=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`<br/>`);c=c.replace(/\n/g,`<br/>`);let l=c.split(a.lineBreakRegex),u=1.25*o().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}i+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,n+i+1.25*o().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},`_drawLongText`),C=t((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=t(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type==="default"&&t.descriptions.length===0&&_(i,t),t.type==="default"&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=t(function(e,i,u){let d=t(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);i.points=i.points.filter(e=>!Number.isNaN(e.y));let f=i.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=e.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let t=e.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(i.points),l=a.getRows(u.title),d=0,f=[],p=0,m=0;for(let e=0;e<=l.length;e++){let i=t.append(`text`).attr(`text-anchor`,`middle`).text(l[e]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),n.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,n.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=t.node().getBBox();t.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,s-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),n.info(g)}T++},`drawEdge`),D,O={},k=t(function(){},`setConf`),A=t(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=t(function(t,r,a,s){D=o().state;let c=o().securityLevel,l;c===`sandbox`&&(l=e(`#i`+r));let u=e(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;n.debug(`Rendering diagram `+t);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2,_=h*1.75;i(f,g,_,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=t(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=t((e,t,r,i,o,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<e.length;f++)if(e[f].stmt===`relation`){p=!1;break}r?l.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):l.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,ranker:`tight-tree`,isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}});let m=c.db.getStates(),h=c.db.getRelations(),g=Object.keys(m);for(let e of g){let n=m[e];r&&(n.parentId=r);let a;if(n.doc){let e=t.append(`g`).attr(`id`,n.id).attr(`class`,`stateGroup`);a=N(n.doc,e,n.id,!i,o,s,c);{e=y(e,n,i);let t=e.node().getBBox();a.width=t.width,a.height=t.height+D.padding/2,O[n.id]={y:D.compositTitleSize}}}else a=w(t,n,l);if(n.note){let e=w(t,{descriptions:[],id:n.id+`-note`,note:n.note,type:`note`},l);n.note.position===`left of`?(l.setNode(a.id+`-note`,e),l.setNode(a.id,a)):(l.setNode(a.id,a),l.setNode(a.id+`-note`,e)),l.setParent(a.id,a.id+`-group`),l.setParent(a.id+`-note`,a.id+`-group`)}else l.setNode(a.id,a)}n.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(e){_++,n.debug(`Setting edge`,e),l.setEdge(e.id1,e.id2,{relation:e,width:M(e.title),height:D.labelHeight*a.getRows(e.title).length,labelpos:`c`},`id`+_)}),d(l),n.debug(`Graph after layout`,l.nodes());let v=t.node();l.nodes().forEach(function(e){e!==void 0&&l.node(e)!==void 0?(n.warn(`Node `+e+`: `+JSON.stringify(l.node(e))),o.select(`#`+v.id+` #`+e).attr(`transform`,`translate(`+(l.node(e).x-l.node(e).width/2)+`,`+(l.node(e).y+(O[e]?O[e].y:0)-l.node(e).height/2)+` )`),o.select(`#`+v.id+` #`+e).attr(`data-x-shift`,l.node(e).x-l.node(e).width/2),s.querySelectorAll(`#`+v.id+` #`+e+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):n.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(n.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(t,l.edge(e),l.edge(e).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,n.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:t(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-CmaQbKwl.js";import"./chunk-DU6HZSFF-Ddor4J2O.js";import"./chunk-75Z2AOVW-8XdKJlnw.js";import"./chunk-PWAF6VOD-8aIc0M2s.js";import"./chunk-GMAD6QVW-T1eAn0xk.js";import"./chunk-P2QGCYS3-B9TYBq1U.js";import"./chunk-4HAMMTFA-BVE3Ntuo.js";import"./chunk-GVQU2GXP-CJTCPJEH.js";import"./chunk-OSK3NFVY-COHJYKGg.js";import"./chunk-F27PBJKO-9OJHGb4f.js";import"./chunk-XXDRQBXY-IULPM7G2.js";import"./chunk-POPQ4Y6H-DjvzCiTE.js";import"./chunk-L3NEJ4N5-CIKjoshr.js";import{i as t,n,r,t as i}from"./chunk-IMKFNOWR-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-CmaQbKwl.js";import"./chunk-DU6HZSFF-Ddor4J2O.js";import"./chunk-75Z2AOVW-8XdKJlnw.js";import"./chunk-PWAF6VOD-8aIc0M2s.js";import"./chunk-GMAD6QVW-T1eAn0xk.js";import"./chunk-P2QGCYS3-B9TYBq1U.js";import"./chunk-4HAMMTFA-BVE3Ntuo.js";import"./chunk-GVQU2GXP-CJTCPJEH.js";import"./chunk-OSK3NFVY-COHJYKGg.js";import"./chunk-F27PBJKO-9OJHGb4f.js";import"./chunk-XXDRQBXY-IULPM7G2.js";import"./chunk-POPQ4Y6H-DjvzCiTE.js";import"./chunk-L3NEJ4N5-CIKjoshr.js";import{i as t,n,r,t as i}from"./chunk-IMKFNOWR-C0dajEEe.js";import"./mermaid.core--ckckkca.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 +1 @@
|
|
|
1
|
-
import{k as e}from"./src-Dvwdl2PF.js";import{At as t,Dt as n,Et as r,Lr as i,Ot as a,ci as o,di as s,kt as c,li as l,si as u}from"./ui-KaBQR2GX.js";var d=e(s(),1);function f(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function p(e){return(0,d.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}var m=0;function ee(e,t,n){let r=[],i=[],a=new Map;for(let n of e){let e=n.position||t,r=a.get(e);r?r.push(n):a.set(e,[n])}for(let e of a.values())e.sort((e,t)=>(t.priority??0)-(e.priority??0)||(e.__sequence??0)-(t.__sequence??0)),e.forEach((e,t)=>{t<n?i.push(e):r.push(e)});return{notifications:i,queue:r}}var h=f({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5}),te=(e=h)=>p(e);function g(e,t){let n=e.getState(),r=t([...n.notifications,...n.queue]);for(let e of r)e.__sequence===void 0&&(e.__sequence=m,m+=1);let i=ee(r,n.defaultPosition,n.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function ne(e,t=h){let n=e.id||i();return g(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function _(e,t=h){return g(t,t=>t.filter(t=>t.id!==e||(t.onClose?.(t),!1))),e}function re(e,t=h){return g(t,t=>t.map(t=>t.id===e.id?{...t,...e}:t)),e.id}function ie(e=h){g(e,()=>[])}function ae(e=h){let{defaultPosition:t,limit:n}=e.getState();g(e,e=>ee(e,t,n).notifications)}var v={show:ne,hide:_,update:re,clean:ie,cleanQueue:ae,updateState:g},y=class extends Error{status;body;constructor(e,t,n){super(n),this.status=e,this.body=t,this.name=`ApiError`}};function oe(e,t){if(e&&typeof e==`object`){let t=e,n=t.error??t;if(typeof n.message==`string`&&n.message)return n.message}return t}function se(e){return e&&typeof e==`object`&&`result`in e?e.result:e}var ce=-32601;function le(e){let t=e.indexOf(`?`);return t===-1?e:e.slice(0,t)}function ue(e,t){return`${e} ${le(t)}`}function de(){let e=globalThis.crypto;return e&&typeof e.randomUUID==`function`?e.randomUUID():`idem-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}var fe=class{baseUrl;onUnauthorized;onError;socket;socketEnabled;socketBridgeDown=!1;httpOnlyRoutes=new Set;constructor(e={}){this.baseUrl=e.baseUrl??`/nodefony/studio/api`,this.onUnauthorized=e.onUnauthorized,this.onError=e.onError,this.socket=e.socket,this.socketEnabled=e.socketEnabled}async get(e,t){return this.request(`GET`,e,void 0,t)}async post(e,t,n){return this.request(`POST`,e,t,n)}async put(e,t,n){return this.request(`PUT`,e,t,n)}async delete(e,t){return this.request(`DELETE`,e,void 0,t)}async getAbsolute(e,t){return this.send(`GET`,e,void 0,t)}async postAbsolute(e,t,n){return this.send(`POST`,e,t,n)}async patchAbsolute(e,t,n){return this.send(`PATCH`,e,t,n)}async deleteAbsolute(e,t){return this.send(`DELETE`,e,void 0,t)}async request(e,t,n,r){let i=`${this.baseUrl}${t.startsWith(`/`)?t:`/`+t}`;return this.send(e,i,n,r)}canUseSocket(e,t,n){return(e===`GET`||e===`POST`||e===`PUT`||e===`PATCH`||e===`DELETE`)&&this.socket!==void 0&&!this.socketBridgeDown&&(this.socketEnabled?.()??!0)&&this.socket.state===`connected`&&t.startsWith(`/`)&&!n?.signal&&!n?.headers&&!this.httpOnlyRoutes.has(ue(e,t))}learnFromSocketError(e,t,n){let r=n;if(n&&typeof n==`object`&&r.name===`RpcError`){if(r.code===ce){this.socketBridgeDown=!0;return}r.data?.status===405&&this.httpOnlyRoutes.add(ue(e,t))}}async send(e,t,n,r){let i=e!==`GET`&&e!==`HEAD`?de():void 0;if(this.canUseSocket(e,t,r))try{return se(e===`GET`?await this.socket.request(t):await this.socket.mutate(t,{method:e,body:n,idempotencyKey:i}))}catch(n){this.learnFromSocketError(e,t,n)}let a=new Headers(r?.headers);a.set(`Accept`,`application/json`),n!==void 0&&a.set(`Content-Type`,`application/json`),i&&a.set(`Idempotency-Key`,i);let o=await fetch(t,{...r,method:e,headers:a,body:n===void 0?void 0:JSON.stringify(n),credentials:`same-origin`}),s=t.includes(`/api/auth/`);o.status===401&&!s&&this.onUnauthorized?.();let c=(o.headers.get(`Content-Type`)??``).includes(`application/json`),l=c?await o.json():await o.text();if(!o.ok){let n=oe(l,`HTTP ${o.status}`);throw this.onError?.({method:e,status:o.status,message:n,body:l}),new y(o.status,l,`${e} ${t} → HTTP ${o.status}`)}return c?se(l):l}};function b(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function x(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function S(){return pe.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var pe={stubThis:e=>e};function me(e){let{id:t}=e;return{...e,id:x(t),transports:e.transports,type:e.type}}function C(e){return e===`localhost`||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}var w=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function he({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new w({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new w({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new w({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new w({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new w({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new w({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new w({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new w({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!C(t))return new w({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new w({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new w({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new w({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var ge=new class{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},_e=[`cross-platform`,`platform`];function ve(e){if(e&&!(_e.indexOf(e)<0))return e}async function ye(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!S())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:x(t.challenge),user:{...t.user,id:x(t.user.id)},excludeCredentials:t.excludeCredentials?.map(me)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=ge.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw he({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){T(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=b(e))}catch(e){T(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=b(c.getAuthenticatorData())}catch(e){T(`getAuthenticatorData()`,e)}return{id:o,rawId:b(s),response:{attestationObject:b(c.attestationObject),clientDataJSON:b(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:ve(a.authenticatorAttachment)}}function T(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function be(){if(!S())return E.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?E.stubThis(new Promise(e=>e(!1))):E.stubThis(e.isConditionalMediationAvailable())}var E={stubThis:e=>e};function xe({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new w({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new w({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!C(t))return new w({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new w({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new w({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function Se(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!S())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(me));let a={...t,challenge:x(t.challenge),allowCredentials:i},o={};if(n){if(!await be())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=ge.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw xe({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=b(u.userHandle)),{id:c,rawId:b(l),response:{authenticatorData:b(u.authenticatorData),clientDataJSON:b(u.clientDataJSON),signature:b(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:ve(s.authenticatorAttachment)}}var D=`/nodefony/security/api/auth`,O=`/nodefony/security/api/webauthn`,Ce=class{api;constructor(e){this.api=e}async login(e){let t=await this.api.postAbsolute(`${D}/login`,e);return t.mfaRequired?{kind:`mfaRequired`,methods:t.methods??[`totp`]}:{kind:`authenticated`,user:t.user}}async verifyTotpLogin(e){let{user:t}=await this.api.postAbsolute(`${D}/login/totp`,{code:e});return t}async me(){let{user:e}=await this.api.getAbsolute(`${D}/me`);return e}async logout(){await this.api.postAbsolute(`${D}/logout`)}async loginWithPasskey(){let e=await Se({optionsJSON:await this.api.postAbsolute(`${O}/login/options`,{})}),{user:t}=await this.api.postAbsolute(`${O}/login/verify`,{response:e});return t}async registerPasskey(){let e=await ye({optionsJSON:await this.api.postAbsolute(`${O}/register/options`,{})}),{credentialId:t}=await this.api.postAbsolute(`${O}/register/verify`,{response:e});return t}async ping(){return this.api.get(`/health`)}},we=`BROWSER_ERROR`,Te=`BROWSER_REJECTION`;function Ee(e){if(typeof window>`u`)return()=>{};let{syslog:t,msgid:n=we,dedupeMs:r=1e3}=e,i=null,a=0,o=e=>{if(r<=0)return!1;let t=Date.now();return e===i&&t-a<r||(i=e,a=t,!1)},s=e=>{let r=e.filename!==void 0&&e.filename!==``?`${e.filename}:${e.lineno}:${e.colno}`:void 0,i=`error|${e.message}|${r??``}`;o(i)||t.log(e.error??e.message,`ERROR`,n,r??``)},c=e=>{let n=e.reason,r=`rejection|${n instanceof Error?n.message:String(n)}`;o(r)||t.log(n,`ERROR`,Te,``)};return window.addEventListener(`error`,s),window.addEventListener(`unhandledrejection`,c),()=>{window.removeEventListener(`error`,s),window.removeEventListener(`unhandledrejection`,c)}}function k(e,t){return e!=null&&e.includes(t)}function A(e,t){if(e==null||t.length===0)return!1;for(let n of t)if(e.includes(n))return!0;return!1}var j=r(`outline`,`activity-heartbeat`,`ActivityHeartbeat`,[[`path`,{d:`M3 12h4.5l1.5 -6l4 12l2 -9l1.5 3h4.5`,key:`svg-0`}]]),De=`ROLE_USER`,M=`ROLE_DEV`,N=`ROLE_SUPERVISOR`,Oe=`ROLE_SECURITY_AUDITOR`,ke=`ROLE_ADMIN`,P=`ROLE_NODEFONY_ADMIN`,Ae=[De,M,N,Oe,ke,P];function F(e,t){return k(t,`ROLE_NODEFONY_ADMIN`)||!e||e.length===0?!0:A(t,e)}var I={devops:[M,N],dev:[M],ops:[N],admin:[P]},je=[{role:N,path:`/nodefony/supervision`,label:`Supervision`,description:`Santé applicative, charge, erreurs, alertes.`,icon:j}],L=`nf.studio.lastUser`,R=`nf.studio.lastMethod`,z=`nf.studio.pendingMethod`;function B(e){try{localStorage.setItem(L,e)}catch{}}function V(e){try{localStorage.setItem(R,e),localStorage.removeItem(z)}catch{}}var Me=class{auth;user=null;status=`idle`;error=null;mfaPending=!1;constructor(e){this.auth=e,u(this)}get isAuthenticated(){return this.status===`authenticated`&&!!this.user}get displayName(){return this.user?.username??`guest`}get roles(){return this.user?.roles??[]}get dashboards(){let e=this.roles;return je.filter(t=>k(e,t.role))}get homePath(){return`/nodefony/workspace`}async checkSession(){this.status=`loading`;try{let e=await this.auth.me();l(()=>{this.user=e,this.status=`authenticated`,this.error=null}),B(e.username);try{let e=localStorage.getItem(z);e&&V(e)}catch{}}catch{l(()=>{this.user=null,this.status=`unauthenticated`,this.error=null})}}async login(e){this.status=`loading`,this.error=null,this.mfaPending=!1;try{let t=await this.auth.login(e);return t.kind===`mfaRequired`?(l(()=>{this.mfaPending=!0,this.status=`idle`}),`mfa_required`):(l(()=>{this.user=t.user,this.status=`authenticated`}),B(t.user.username),V(`password`),`authenticated`)}catch(e){throw l(()=>{this.status=`error`,this.error=e instanceof Error?e.message:String(e)}),e}}async completeMfa(e){this.status=`loading`,this.error=null;try{let t=await this.auth.verifyTotpLogin(e);l(()=>{this.user=t,this.status=`authenticated`,this.mfaPending=!1}),B(t.username),V(`password`)}catch(e){throw l(()=>{this.status=`idle`,this.error=e instanceof Error?e.message:String(e)}),e}}cancelMfa(){l(()=>{this.mfaPending=!1,this.status=`unauthenticated`,this.error=null})}async loginWithPasskey(){this.status=`loading`,this.error=null;try{let e=await this.auth.loginWithPasskey();l(()=>{this.user=e,this.status=`authenticated`}),B(e.username),V(`passkey`)}catch(e){throw l(()=>{this.status=`error`,this.error=e instanceof Error?e.message:String(e)}),e}}registerPasskey(){return this.auth.registerPasskey()}async logout(){try{await this.auth.logout()}catch{}l(()=>{this.user=null,this.status=`unauthenticated`})}clearLocalSession(){l(()=>{this.user=null,this.status=`unauthenticated`})}},Ne=class{client;state=`disconnected`;lastError=null;latencyMs=null;activeSubscriptions=new Map;connectedAt=null;everConnected=!1;reconnectAttempt=0;nextRetryAt=null;endpointUrl=``;framesReceived=0;lastFrameAt=null;lastFrameMethod=null;clientHandlers=new Map;constructor(e,t=``){this.client=e,this.endpointUrl=t,u(this,{},{autoBind:!0}),this.client.onState(e=>{l(()=>{this.state=e,e===`connected`?(this.lastError=null,this.connectedAt=Date.now(),this.everConnected=!0,this.reconnectAttempt=0,this.nextRetryAt=null):(e===`disconnected`||e===`error`)&&(this.connectedAt=null)})}),this.client.onStats(()=>this.syncStats()),this.client.onReconnect(e=>{l(()=>{this.reconnectAttempt=e.attempt,this.nextRetryAt=e.nextRetryAt})}),l(()=>{this.state=this.client.state,this.client.state===`connected`&&(this.connectedAt=Date.now(),this.everConnected=!0)}),this.syncStats()}get isDown(){return this.state===`reconnecting`||this.state===`error`||this.state===`disconnected`&&this.everConnected}retryNow(){this.client.retryNow()}syncStats(){l(()=>{this.framesReceived=this.client.framesReceived,this.lastFrameAt=this.client.lastFrameAt,this.lastFrameMethod=this.client.lastFrameMethod;let e=new Set(this.client.subscribedChannels);for(let t of e)this.activeSubscriptions.has(t)||this.activeSubscriptions.set(t,{channel:t,msgCount:0,lastMessage:null,subscribedAt:Date.now(),rate:0,series:[],protocol:`json-rpc-2.0`,transport:`ws`,kind:`channel`});for(let t of this.activeSubscriptions.keys())e.has(t)||this.activeSubscriptions.delete(t);for(let e of this.activeSubscriptions.values()){let t=this.client.getChannelStats(e.channel);t&&(e.msgCount=t.msgCount,e.lastMessage=t.lastMessage,e.rate=t.rate,e.series=t.series)}})}get isConnected(){return this.state===`connected`}get subscriptionCount(){return this.activeSubscriptions.size}get totalMessages(){let e=0;for(let t of this.activeSubscriptions.values())e+=t.msgCount;return e}reconnect(){this.client.connect()}async connect(e){if(this.state===`connected`||this.state===`connecting`)return;let t=performance.now();try{await Promise.race([this.client.connect(),new Promise((e,t)=>setTimeout(()=>t(Error(`Backend WS pas prêt (P13.4 RealtimeService)`)),3e3))]),l(()=>{this.latencyMs=Math.round(performance.now()-t)})}catch(e){l(()=>{this.lastError=e instanceof Error?e.message:String(e),this.latencyMs=null})}}disconnect(){this.client.disconnect(),l(()=>{this.activeSubscriptions.clear()}),this.clientHandlers.clear()}subscribe(e,t,n={}){if(this.clientHandlers.has(e))return console.warn(`[Connection] already subscribed to ${e}`),()=>this.unsubscribe(e);let r={channel:e,msgCount:0,lastMessage:null,subscribedAt:Date.now(),rate:0,series:[],protocol:n.protocol??`json-rpc-2.0`,transport:n.transport??`ws`,kind:n.kind??`channel`,peer:n.peer},i=(...e)=>{t(...e)},a=this.client.on(e,i);return l(()=>{this.activeSubscriptions.set(e,r)}),this.clientHandlers.set(e,{dispose:a,wrapped:i}),this.client.subscribe(e),()=>this.unsubscribe(e)}unsubscribe(e){this.clientHandlers.get(e)?.dispose(),this.clientHandlers.delete(e),l(()=>{this.activeSubscriptions.delete(e)}),this.client.unsubscribe(e)}simulateMessage(e,t){this.clientHandlers.get(e)?.wrapped(t)}},Pe=`nodefony.studio.theme`,Fe=`nodefony.studio.palette`,Ie=`nodefony.studio.sidebar.rail`,Le=`nodefony.studio.sidebar.groups.v3`,H=`nodefony.studio.sidebar.pinned`,Re=`nf.debugbar.visible`,ze=`nf.realtime.adaptive`,Be=`nf.realtime.live`,Ve=`nf.api.socket`,He=class{theme=`dark`;palette=`nodefony`;rail=!1;collapsedGroups={};pinned=[];navQuery=``;debugBar=!0;adaptiveCadence=!1;realtimeLive=!1;apiViaSocket=!0;constructor(){u(this),this.loadPrefs()}setRealtimeLive(e){this.realtimeLive=e;try{localStorage.setItem(Be,e?`1`:`0`)}catch{}}toggleRealtimeLive(){this.setRealtimeLive(!this.realtimeLive)}setDebugBar(e){this.debugBar=e,this.applyDebugBar()}toggleDebugBar(){this.setDebugBar(!this.debugBar)}applyDebugBar(){try{localStorage.setItem(Re,this.debugBar?`1`:`0`)}catch{}window.__NODEFONY_DEBUGBAR__?.setVisible(this.debugBar)}setTheme(e){this.theme=e,this.persist()}toggleTheme(){this.theme=this.theme===`dark`?`light`:`dark`,this.persist()}toggleRail(){this.rail=!this.rail,this.persist()}setPalette(e){this.palette=e,this.persist()}togglePalette(){this.palette=this.palette===`nodefony`?`orange`:`nodefony`,this.persist()}isGroupCollapsed(e,t=!1){let n=this.collapsedGroups[e];return typeof n==`boolean`?n:t}toggleGroup(e,t=!1){this.collapsedGroups[e]=!this.isGroupCollapsed(e,t),this.persist()}isPinned(e){return this.pinned.includes(e)}togglePin(e){this.pinned=this.isPinned(e)?this.pinned.filter(t=>t!==e):[...this.pinned,e],this.persist()}setNavQuery(e){this.navQuery=e}setAdaptiveCadence(e){this.adaptiveCadence=e,this.persist()}toggleAdaptiveCadence(){this.setAdaptiveCadence(!this.adaptiveCadence)}setApiViaSocket(e){this.apiViaSocket=e;try{localStorage.setItem(Ve,e?`1`:`0`)}catch{}}toggleApiViaSocket(){this.setApiViaSocket(!this.apiViaSocket)}loadPrefs(){try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(Pe);(e===`light`||e===`dark`||e===`auto`)&&(this.theme=e);let t=localStorage.getItem(Fe);(t===`orange`||t===`nodefony`)&&(this.palette=t),this.rail=localStorage.getItem(Ie)===`1`,this.debugBar=localStorage.getItem(Re)!==`0`,this.adaptiveCadence=localStorage.getItem(ze)===`1`,this.realtimeLive=localStorage.getItem(Be)===`1`,this.apiViaSocket=localStorage.getItem(Ve)!==`0`;let n=localStorage.getItem(Le);if(n){let e=JSON.parse(n);e&&typeof e==`object`&&(this.collapsedGroups=e)}let r=localStorage.getItem(H);if(r){let e=JSON.parse(r);Array.isArray(e)&&(this.pinned=e.filter(e=>typeof e==`string`))}}catch{}}persist(){try{if(typeof localStorage>`u`)return;localStorage.setItem(Pe,this.theme),localStorage.setItem(Fe,this.palette),localStorage.setItem(Ie,this.rail?`1`:`0`),localStorage.setItem(ze,this.adaptiveCadence?`1`:`0`),localStorage.setItem(Le,JSON.stringify(this.collapsedGroups)),localStorage.setItem(H,JSON.stringify(this.pinned))}catch{}}},Ue=class{client;messages=[];currentResponse=``;isStreaming=!1;error=null;constructor(e){this.client=e,u(this)}clear(){this.messages=[],this.currentResponse=``,this.error=null}async send(e){if(!e.trim()||this.isStreaming)return;let t={id:`u-${Date.now()}`,role:`user`,content:e,ts:Date.now()};l(()=>{this.messages.push(t),this.isStreaming=!0,this.currentResponse=``,this.error=null});try{await this.mockStream(e),l(()=>{this.messages.push({id:`a-${Date.now()}`,role:`assistant`,content:this.currentResponse,ts:Date.now()}),this.currentResponse=``,this.isStreaming=!1})}catch(e){l(()=>{this.error=e instanceof Error?e.message:String(e),this.isStreaming=!1})}}async mockStream(e){let t=`[mock] Reçu "${e}". Le pipeline @nodefony/agent (P12) répondra ici en streaming via RealtimeClient + JSON-RPC 2.0.`;for(let e of t.split(``))await new Promise(e=>setTimeout(e,15)),l(()=>this.currentResponse+=e)}},We=`/nodefony/framework/api/admin`,Ge=class{api;producers=[];loading=!1;error=null;env=null;invocations=new Map;constructor(e){this.api=e,u(this,{},{autoBind:!0})}get isProd(){return this.env===`production`}async loadInfo(){try{let e=await this.api.get(`/info`);l(()=>{this.env=typeof e.env==`string`?e.env:null})}catch{}}async loadCatalog(){this.loading=!0,this.error=null;try{let e=await this.api.getAbsolute(We);l(()=>{this.producers=e.producers??[],this.loading=!1})}catch(e){l(()=>{this.error=e instanceof Error?e.message:String(e),this.loading=!1})}}async invoke(e){this.invocations.set(e,{loading:!0});try{let t=await this.api.getAbsolute(e);l(()=>{this.invocations.set(e,{loading:!1,data:t,at:Date.now()})})}catch(t){l(()=>{this.invocations.set(e,{loading:!1,error:t instanceof Error?t.message:String(t),at:Date.now()})})}}reset(){this.producers=[],this.invocations.clear(),this.error=null,this.loading=!1}get endpointCount(){return this.producers.reduce((e,t)=>e+t.endpoints.length,0)}pageCapabilities(e,t=`GET`){for(let n of this.producers)for(let r of n.endpoints)if(r.path===e&&r.method===t)return r.page??null;return null}},U=`/nodefony/profiler/api`,Ke=class{api;recent=[];count=0;loading=!1;error=null;unavailable=!1;selectedId=null;detail=null;detailLoading=!1;detailError=null;autoRefresh=!1;timer=null;constructor(e){this.api=e,u(this,{},{autoBind:!0})}async loadRecent(){this.loading=!0,this.error=null,this.unavailable=!1;try{let e=await this.api.getAbsolute(`${U}/recent`);l(()=>{this.recent=e.entries??[],this.count=e.count??this.recent.length,this.loading=!1})}catch(e){l(()=>{e instanceof y&&e.status===404?this.unavailable=!0:this.error=e instanceof Error?e.message:String(e),this.loading=!1})}}async select(e){this.selectedId=e,this.detail=null,this.detailLoading=!0,this.detailError=null;try{let t=await this.api.getAbsolute(`${U}/${encodeURIComponent(e)}`);l(()=>{this.selectedId===e&&(this.detail=t,this.detailLoading=!1)})}catch(t){l(()=>{this.selectedId===e&&(this.detailError=t instanceof Error?t.message:String(t),this.detailLoading=!1)})}}async clear(){try{await this.api.deleteAbsolute(`${U}/recent`)}catch{}l(()=>{this.recent=[],this.count=0,this.selectedId=null,this.detail=null})}setAutoRefresh(e){this.autoRefresh=e,this.timer&&=(clearInterval(this.timer),null),e&&(this.timer=setInterval(()=>void this.loadRecent(),3e3))}dispose(){this.timer&&clearInterval(this.timer),this.timer=null,this.autoRefresh=!1}},qe=50,Je={success:`teal`,info:`blue`,warning:`yellow`,error:`red`},Ye={success:3e3,info:4e3,warning:6e3,error:1e4},Xe=class{recent=[];constructor(e){u(this,{},{autoBind:!0}),e.onNotice(e=>this.push(e))}push(e){this.recent.push(e),this.recent.length>qe&&this.recent.splice(0,this.recent.length-qe),e.source!==`realtime`&&v.show({color:Je[e.level],title:e.title,message:e.message,autoClose:Ye[e.level],withBorder:!0})}notify(e,t,n={}){this.push({level:e,message:t,title:n.title,source:n.source??`api`,code:n.code,ts:Date.now()})}get realtimeIncidents(){return this.recent.filter(e=>e.source===`realtime`||e.source===`server`).slice().reverse()}clear(){this.recent=[]}},Ze=1/48,Qe=1/6,$e=.008,et={runtime:`Runtime & lancement`,system:`Système & santé`,logs:`Logs`,orm:`Données / ORM`,realtime:`Temps réel`,cluster:`Cluster`,security:`Sécurité`,account:`Mon compte`,ai:`IA`},W=[{id:`account`,label:`Mon compte`,items:[{widgetId:`account.profile`,span:6,h:4},{widgetId:`account.apikeys`,span:6,h:3},{widgetId:`account.sessions`,span:6,h:3}]},{id:`dev`,label:`Développeur`,roles:I.dev,items:[{widgetId:`runtime.mode`,span:6,h:4},{widgetId:`system.info`,span:6,h:4},{widgetId:`system.git`,span:4,h:3},{widgetId:`system.uptime`,span:4,h:3},{widgetId:`system.cpu`,span:4,h:4},{widgetId:`system.heap`,span:4,h:4},{widgetId:`system.eventloop`,span:4,h:4},{widgetId:`orm.health`,span:6,h:4},{widgetId:`logs.live`,span:6,h:5}]},{id:`admin`,label:`Admin`,roles:I.admin,items:[{widgetId:`runtime.mode`,span:6,h:4},{widgetId:`runtime.modes`,span:6,h:4},{widgetId:`system.health`,span:6,h:3},{widgetId:`orm.health`,span:6,h:4},{widgetId:`realtime.hub`,span:6,h:4},{widgetId:`realtime.channels`,span:6,h:4}]},{id:`supervision`,label:`Supervision`,roles:I.ops,items:[],layout:[{widgetId:`supervision.health`,x:0,y:0,w:1,h:216,z:10},{widgetId:`runtime.mode`,x:0,y:228,w:.2917,h:208,z:2},{widgetId:`system.eventloop`,x:.2997,y:228,w:.2083,h:208,z:3},{widgetId:`system.cpu`,x:.516,y:228,w:.2292,h:208,z:4},{widgetId:`system.heap`,x:.7532,y:228,w:.2292,h:208,z:5},{widgetId:`supervision.correlation`,x:0,y:448,w:1,h:312,z:9},{widgetId:`orm.flow`,x:0,y:772,w:1,h:320,z:7},{widgetId:`supervision.gc`,x:0,y:1104,w:1,h:384,z:8}]},{id:`systeme`,label:`Système`,roles:I.devops,items:[{widgetId:`supervision.health`,span:12,h:6},{widgetId:`system.cpu`,span:4,h:4},{widgetId:`system.heap`,span:4,h:4},{widgetId:`system.eventloop`,span:4,h:4},{widgetId:`supervision.correlation`,span:6,h:5},{widgetId:`supervision.gc`,span:6,h:6},{widgetId:`system.info`,span:6,h:4},{widgetId:`runtime.mode`,span:6,h:4}]},{id:`config`,label:`Configuration`,roles:I.dev,items:[{widgetId:`runtime.mode`,span:6,h:4},{widgetId:`runtime.modes`,span:6,h:4},{widgetId:`runtime.vite`,span:4,h:4},{widgetId:`system.info`,span:8,h:4},{widgetId:`system.git`,span:6,h:3},{widgetId:`system.uptime`,span:6,h:3}]},{id:`logs`,label:`Logs`,roles:I.devops,items:[{widgetId:`logs.live`,span:12,h:7},{widgetId:`logs.backplane`,span:12,h:5},{widgetId:`supervision.alerts`,span:6,h:4},{widgetId:`realtime.channels`,span:6,h:4}]},{id:`memoire`,label:`Mémoire`,roles:I.devops,items:[{widgetId:`supervision.memory`,span:8,h:6},{widgetId:`supervision.handles`,span:4,h:6},{widgetId:`supervision.gc`,span:12,h:6},{widgetId:`system.heap`,span:6,h:4},{widgetId:`supervision.correlation`,span:6,h:5}]},{id:`erreurs`,label:`Erreurs`,roles:I.devops,items:[{widgetId:`supervision.errors`,span:6,h:5},{widgetId:`supervision.alerts`,span:6,h:5},{widgetId:`logs.live`,span:12,h:7}]},{id:`blank`,label:`Vierge`,items:[]}];function tt(e){return W.find(t=>t.id===e)?.roles}function nt(e,t){return F(tt(e),t)}var rt=`account`,G=new Map,it={runtime:I.devops,system:I.devops,realtime:I.devops,logs:I.devops,cluster:I.ops,orm:I.dev,ai:I.dev,security:I.admin};function at(e){G.set(e.id,e)}function ot(e){return G.get(e)}function st(e=[]){let t=[];for(let n of G.values())F(n.roles??it[n.category],e)&&t.push(n);return t.sort((e,t)=>e.title.localeCompare(t.title))}function K(e,t){return t<=0?e:Math.round(e/t)*t}function q(e,t,n){return Math.max(t,Math.min(n,e))}function ct(e){let t=[],n=0,r=0,i=0;for(let a of e){let e=q(a.w,.05,1);n>0&&n+e>1+1e-6&&(n=0,r+=i+12,i=0),t.push({id:a.id,x:n,y:r,w:e,h:a.h}),n+=e+$e,i=Math.max(i,a.h)}return t}var J=`nf.workspace.layouts.v3`,Y=`nf.workspace.active.v3`;function X(e){return q(Number.isFinite(e)?e:.33,Qe,1)}function Z(e){return Math.max(96,Number.isFinite(e)?Math.round(e):192)}function Q(e){if(e.layout&&e.layout.length)return{id:e.id,label:e.label,items:e.layout.map(lt)};let t=ct(e.items.map(e=>({id:e.widgetId,w:X((e.span??4)/12),h:Z((e.h??3)*64)})));return{id:e.id,label:e.label,items:t.map((e,t)=>({widgetId:e.id,x:e.x,y:e.y,w:e.w,h:e.h,z:t+1}))}}function lt(e){return{widgetId:e.widgetId,x:q(e.x,0,1),y:Math.max(0,Math.round(e.y)),w:X(e.w),h:Z(e.h),z:e.z}}function ut(e){let t=e;return!!t&&typeof t.widgetId==`string`&&typeof t.x==`number`&&typeof t.y==`number`&&typeof t.w==`number`&&typeof t.h==`number`&&typeof t.z==`number`}var dt=class{layouts={};activeId=rt;constructor(){u(this),this.load()}get active(){return this.layouts[this.activeId]??this.layouts.blank??{id:`blank`,label:`Vierge`,items:[]}}get layoutList(){return Object.values(this.layouts)}setActive(e){this.layouts[e]&&(this.activeId=e,this.persist())}hasWidget(e){return this.active.items.some(t=>t.widgetId===e)}topZ(e){return e.reduce((e,t)=>Math.max(e,t.z),0)}addWidget(e){let t=ot(e),n=this.layouts[this.activeId];if(!t||!n||n.items.some(t=>t.widgetId===e))return;let r=X((t.defaultSpan??4)/12),i=Z((t.defaultH??3)*64),a=n.items.reduce((e,t)=>Math.max(e,t.y+t.h),0);n.items.push({widgetId:e,x:0,y:n.items.length?a+8:0,w:r,h:i,z:this.topZ(n.items)+1}),this.persist()}removeWidget(e){let t=this.layouts[this.activeId];t&&(t.items=t.items.filter(t=>t.widgetId!==e),this.persist())}moveTo(e,t,n){let r=this.layouts[this.activeId]?.items.find(t=>t.widgetId===e);r&&(r.x=q(K(t,Ze),0,1-r.w),r.y=Math.max(0,K(n,8)),this.persist())}setSize(e,t,n){let r=this.layouts[this.activeId]?.items.find(t=>t.widgetId===e);r&&(r.w=X(K(t,Ze)),r.h=Z(K(n,8)),r.x=Math.min(r.x,1-r.w),this.persist())}bringToFront(e){let t=this.layouts[this.activeId]?.items,n=t?.find(t=>t.widgetId===e);if(!t||!n)return;let r=this.topZ(t);n.z!==r&&(n.z=r+1,this.persist())}tidy(){let e=this.layouts[this.activeId];if(!e||!e.items.length)return;let t=[...e.items].sort((e,t)=>e.y-t.y||e.x-t.x),n=t.map(e=>({id:e.widgetId,w:e.w,h:e.h})),r=new Map(ct(n).map(e=>[e.id,e]));t.forEach((e,t)=>{let n=r.get(e.widgetId);n&&(e.x=n.x,e.y=n.y,e.z=t+1)}),this.persist()}resetToPreset(){let e=W.find(e=>e.id===this.activeId);e&&(this.layouts[this.activeId]=Q(e),this.persist())}get templates(){return W.map(e=>({id:e.id,label:e.label}))}uniqueId(){let e=`ws_${Date.now().toString(36)}`;for(;this.layouts[e];)e+=`x`;return e}uniqueLabel(e){let t=new Set(Object.values(this.layouts).map(e=>e.label));if(!t.has(e))return e;let n=2;for(;t.has(`${e} ${n}`);)n++;return`${e} ${n}`}createWorkspace(e){let t=e?W.find(t=>t.id===e):null,n=this.uniqueId(),r=this.uniqueLabel(t?.label??`Bureau`),i=t?Q(t).items:[];return this.layouts[n]={id:n,label:r,items:i},this.activeId=n,this.persist(),n}renameWorkspace(e,t){let n=this.layouts[e],r=t.trim();n&&r&&(n.label=r,this.persist())}deleteWorkspace(e){Object.keys(this.layouts).length<=1||!this.layouts[e]||(delete this.layouts[e],this.activeId===e&&(this.activeId=Object.keys(this.layouts)[0]),this.persist())}moveWorkspace(e,t){if(!this.layouts[e]||e===t)return;let n=Object.keys(this.layouts).filter(t=>t!==e),r=t?n.indexOf(t):-1;if(t&&r<0)return;n.splice(r<0?n.length:r,0,e);let i={};for(let e of n)i[e]=this.layouts[e];this.layouts=i,this.persist()}duplicateWorkspace(e){let t=this.layouts[e];if(!t)return;let n=this.uniqueId();this.layouts[n]={id:n,label:this.uniqueLabel(`${t.label} (copie)`),items:t.items.map(e=>({...e}))},this.activeId=n,this.persist()}resetForIdentity(){try{typeof localStorage<`u`&&(localStorage.removeItem(J),localStorage.removeItem(Y))}catch{}this.activeId=rt,this.load()}load(){try{if(typeof localStorage<`u`){let e=localStorage.getItem(J);if(e){let t=JSON.parse(e);if(t&&typeof t==`object`){let e={};for(let[n,r]of Object.entries(t))r&&Array.isArray(r.items)&&(e[n]={id:n,label:r.label??n,items:r.items.filter(ut).map(lt)});if(Object.keys(e).length){this.layouts=e;let t=localStorage.getItem(Y);this.activeId=t&&e[t]?t:Object.keys(e)[0];return}}}}}catch{}let e={};for(let t of W)e[t.id]=Q(t);this.layouts=e,e[this.activeId]||(this.activeId=Object.keys(e)[0]??`account`)}persist(){try{if(typeof localStorage>`u`)return;localStorage.setItem(J,JSON.stringify(this.layouts)),localStorage.setItem(Y,this.activeId)}catch{}}};function ft(){return typeof window>`u`?`ws://127.0.0.1/nodefony/studio/api/realtime`:`${window.location.protocol===`https:`?`wss`:`ws`}://${window.location.host}/nodefony/studio/api/realtime`}var pt=class{ui;auth;connection;chat;admin;profiler;notifications;workspace;api;kernel;realtime;browserLog;constructor(){this.ui=new He,this.workspace=new dt,this.kernel=c({name:`STUDIO`,connectOnBoot:!1,realtime:{url:ft(),autoReconnect:!0,reconnectDelay:800,reconnectDelayMax:4e3}});let e=this.kernel.get(`realtime`);if(!e)throw Error(`RootStore : le noyau client n'a pas composé de socket temps réel.`);this.realtime=e,this.browserLog=new t({moduleName:`studio`}),a(),Ee({syslog:this.browserLog}),n({syslog:this.browserLog,publisher:this.realtime}),this.notifications=new Xe(this.realtime),this.api=new fe({socket:this.realtime,socketEnabled:()=>this.ui.apiViaSocket,onUnauthorized:()=>{this.auth?.clearLocalSession()},onError:({method:e,status:t,message:n})=>{t!==401&&e!==`GET`&&this.notifications.notify(`error`,n,{title:`Erreur ${t}`,source:`api`,code:t})}});let r=new Ce(this.api);this.auth=new Me(r),this.connection=new Ne(this.realtime,ft()),this.chat=new Ue(this.realtime),this.admin=new Ge(this.api),this.profiler=new Ke(this.api),o(()=>this.auth.user?.id??null,e=>{this.kernel.setIdentity(e===null?null:{key:String(e)})}),this.kernel.on(`onIdentityChange`,(...e)=>{let[,t]=e;if(this.admin.reset(),t!==null){this.workspace.resetForIdentity();try{if(typeof localStorage<`u`){let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n&&(n.startsWith(`studio.`)||n.startsWith(`nf.datagrid:`))&&e.push(n)}for(let t of e)localStorage.removeItem(t)}}catch{}}}),this.kernel.boot()}},mt=`__nfStudioStoreContext__`,ht=globalThis,gt=ht[mt]??(ht[mt]=(0,d.createContext)(null)),_t=gt.Provider;function $(){let e=(0,d.useContext)(gt);if(!e)throw Error(`useStore() called outside <StoreProvider>. Wrap your tree with StoreProvider.`);return e}var vt=()=>$().auth,yt=()=>$().ui,bt=()=>$().connection,xt=()=>$().chat,St=()=>$().admin,Ct=()=>$().profiler,wt=()=>$().notifications,Tt=()=>$().workspace;export{k as A,P as C,F as D,I as E,te as F,_ as M,v as N,j as O,h as P,M as S,Ae as T,Qe as _,bt as a,L as b,$ as c,pt as d,q as f,nt as g,at as h,xt as i,y as j,A as k,yt as l,st as m,St as n,wt as o,ot as p,vt as r,Ct as s,_t as t,Tt as u,et as v,N as w,z as x,R as y};
|
|
1
|
+
import{k as e}from"./src-Dvwdl2PF.js";import{At as t,Dt as n,Et as r,Lr as i,Ot as a,ci as o,di as s,kt as c,li as l,si as u}from"./ui-a5TQE0p7.js";var d=e(s(),1);function f(e){let t=e,n=!1,r=new Set;return{getState(){return t},updateState(e){t=typeof e==`function`?e(t):e},setState(e){this.updateState(e),r.forEach(e=>e(t))},initialize(e){n||=(t=e,!0)},subscribe(e){return r.add(e),()=>r.delete(e)}}}function p(e){return(0,d.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}var m=0;function ee(e,t,n){let r=[],i=[],a=new Map;for(let n of e){let e=n.position||t,r=a.get(e);r?r.push(n):a.set(e,[n])}for(let e of a.values())e.sort((e,t)=>(t.priority??0)-(e.priority??0)||(e.__sequence??0)-(t.__sequence??0)),e.forEach((e,t)=>{t<n?i.push(e):r.push(e)});return{notifications:i,queue:r}}var h=f({notifications:[],queue:[],defaultPosition:`bottom-right`,limit:5}),te=(e=h)=>p(e);function g(e,t){let n=e.getState(),r=t([...n.notifications,...n.queue]);for(let e of r)e.__sequence===void 0&&(e.__sequence=m,m+=1);let i=ee(r,n.defaultPosition,n.limit);e.setState({notifications:i.notifications,queue:i.queue,limit:n.limit,defaultPosition:n.defaultPosition})}function ne(e,t=h){let n=e.id||i();return g(t,t=>e.id&&t.some(t=>t.id===e.id)?t:[...t,{...e,id:n}]),n}function _(e,t=h){return g(t,t=>t.filter(t=>t.id!==e||(t.onClose?.(t),!1))),e}function re(e,t=h){return g(t,t=>t.map(t=>t.id===e.id?{...t,...e}:t)),e.id}function ie(e=h){g(e,()=>[])}function ae(e=h){let{defaultPosition:t,limit:n}=e.getState();g(e,e=>ee(e,t,n).notifications)}var v={show:ne,hide:_,update:re,clean:ie,cleanQueue:ae,updateState:g},y=class extends Error{status;body;constructor(e,t,n){super(n),this.status=e,this.body=t,this.name=`ApiError`}};function oe(e,t){if(e&&typeof e==`object`){let t=e,n=t.error??t;if(typeof n.message==`string`&&n.message)return n.message}return t}function se(e){return e&&typeof e==`object`&&`result`in e?e.result:e}var ce=-32601;function le(e){let t=e.indexOf(`?`);return t===-1?e:e.slice(0,t)}function ue(e,t){return`${e} ${le(t)}`}function de(){let e=globalThis.crypto;return e&&typeof e.randomUUID==`function`?e.randomUUID():`idem-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}var fe=class{baseUrl;onUnauthorized;onError;socket;socketEnabled;socketBridgeDown=!1;httpOnlyRoutes=new Set;constructor(e={}){this.baseUrl=e.baseUrl??`/nodefony/studio/api`,this.onUnauthorized=e.onUnauthorized,this.onError=e.onError,this.socket=e.socket,this.socketEnabled=e.socketEnabled}async get(e,t){return this.request(`GET`,e,void 0,t)}async post(e,t,n){return this.request(`POST`,e,t,n)}async put(e,t,n){return this.request(`PUT`,e,t,n)}async delete(e,t){return this.request(`DELETE`,e,void 0,t)}async getAbsolute(e,t){return this.send(`GET`,e,void 0,t)}async postAbsolute(e,t,n){return this.send(`POST`,e,t,n)}async patchAbsolute(e,t,n){return this.send(`PATCH`,e,t,n)}async deleteAbsolute(e,t){return this.send(`DELETE`,e,void 0,t)}async request(e,t,n,r){let i=`${this.baseUrl}${t.startsWith(`/`)?t:`/`+t}`;return this.send(e,i,n,r)}canUseSocket(e,t,n){return(e===`GET`||e===`POST`||e===`PUT`||e===`PATCH`||e===`DELETE`)&&this.socket!==void 0&&!this.socketBridgeDown&&(this.socketEnabled?.()??!0)&&this.socket.state===`connected`&&t.startsWith(`/`)&&!n?.signal&&!n?.headers&&!this.httpOnlyRoutes.has(ue(e,t))}learnFromSocketError(e,t,n){let r=n;if(n&&typeof n==`object`&&r.name===`RpcError`){if(r.code===ce){this.socketBridgeDown=!0;return}r.data?.status===405&&this.httpOnlyRoutes.add(ue(e,t))}}async send(e,t,n,r){let i=e!==`GET`&&e!==`HEAD`?de():void 0;if(this.canUseSocket(e,t,r))try{return se(e===`GET`?await this.socket.request(t):await this.socket.mutate(t,{method:e,body:n,idempotencyKey:i}))}catch(n){this.learnFromSocketError(e,t,n)}let a=new Headers(r?.headers);a.set(`Accept`,`application/json`),n!==void 0&&a.set(`Content-Type`,`application/json`),i&&a.set(`Idempotency-Key`,i);let o=await fetch(t,{...r,method:e,headers:a,body:n===void 0?void 0:JSON.stringify(n),credentials:`same-origin`}),s=t.includes(`/api/auth/`);o.status===401&&!s&&this.onUnauthorized?.();let c=(o.headers.get(`Content-Type`)??``).includes(`application/json`),l=c?await o.json():await o.text();if(!o.ok){let n=oe(l,`HTTP ${o.status}`);throw this.onError?.({method:e,status:o.status,message:n,body:l}),new y(o.status,l,`${e} ${t} → HTTP ${o.status}`)}return c?se(l):l}};function b(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function x(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function S(){return pe.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var pe={stubThis:e=>e};function me(e){let{id:t}=e;return{...e,id:x(t),transports:e.transports,type:e.type}}function C(e){return e===`localhost`||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}var w=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function he({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new w({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new w({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new w({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new w({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new w({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new w({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new w({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new w({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!C(t))return new w({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new w({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new w({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new w({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var ge=new class{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},_e=[`cross-platform`,`platform`];function ve(e){if(e&&!(_e.indexOf(e)<0))return e}async function ye(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!S())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:x(t.challenge),user:{...t.user,id:x(t.user.id)},excludeCredentials:t.excludeCredentials?.map(me)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=ge.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw he({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){T(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=b(e))}catch(e){T(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=b(c.getAuthenticatorData())}catch(e){T(`getAuthenticatorData()`,e)}return{id:o,rawId:b(s),response:{attestationObject:b(c.attestationObject),clientDataJSON:b(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:ve(a.authenticatorAttachment)}}function T(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function be(){if(!S())return E.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?E.stubThis(new Promise(e=>e(!1))):E.stubThis(e.isConditionalMediationAvailable())}var E={stubThis:e=>e};function xe({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new w({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new w({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!C(t))return new w({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new w({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new w({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function Se(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!S())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(me));let a={...t,challenge:x(t.challenge),allowCredentials:i},o={};if(n){if(!await be())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=ge.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw xe({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=b(u.userHandle)),{id:c,rawId:b(l),response:{authenticatorData:b(u.authenticatorData),clientDataJSON:b(u.clientDataJSON),signature:b(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:ve(s.authenticatorAttachment)}}var D=`/nodefony/security/api/auth`,O=`/nodefony/security/api/webauthn`,Ce=class{api;constructor(e){this.api=e}async login(e){let t=await this.api.postAbsolute(`${D}/login`,e);return t.mfaRequired?{kind:`mfaRequired`,methods:t.methods??[`totp`]}:{kind:`authenticated`,user:t.user}}async verifyTotpLogin(e){let{user:t}=await this.api.postAbsolute(`${D}/login/totp`,{code:e});return t}async me(){let{user:e}=await this.api.getAbsolute(`${D}/me`);return e}async logout(){await this.api.postAbsolute(`${D}/logout`)}async loginWithPasskey(){let e=await Se({optionsJSON:await this.api.postAbsolute(`${O}/login/options`,{})}),{user:t}=await this.api.postAbsolute(`${O}/login/verify`,{response:e});return t}async registerPasskey(){let e=await ye({optionsJSON:await this.api.postAbsolute(`${O}/register/options`,{})}),{credentialId:t}=await this.api.postAbsolute(`${O}/register/verify`,{response:e});return t}async ping(){return this.api.get(`/health`)}},we=`BROWSER_ERROR`,Te=`BROWSER_REJECTION`;function Ee(e){if(typeof window>`u`)return()=>{};let{syslog:t,msgid:n=we,dedupeMs:r=1e3}=e,i=null,a=0,o=e=>{if(r<=0)return!1;let t=Date.now();return e===i&&t-a<r||(i=e,a=t,!1)},s=e=>{let r=e.filename!==void 0&&e.filename!==``?`${e.filename}:${e.lineno}:${e.colno}`:void 0,i=`error|${e.message}|${r??``}`;o(i)||t.log(e.error??e.message,`ERROR`,n,r??``)},c=e=>{let n=e.reason,r=`rejection|${n instanceof Error?n.message:String(n)}`;o(r)||t.log(n,`ERROR`,Te,``)};return window.addEventListener(`error`,s),window.addEventListener(`unhandledrejection`,c),()=>{window.removeEventListener(`error`,s),window.removeEventListener(`unhandledrejection`,c)}}function k(e,t){return e!=null&&e.includes(t)}function A(e,t){if(e==null||t.length===0)return!1;for(let n of t)if(e.includes(n))return!0;return!1}var j=r(`outline`,`activity-heartbeat`,`ActivityHeartbeat`,[[`path`,{d:`M3 12h4.5l1.5 -6l4 12l2 -9l1.5 3h4.5`,key:`svg-0`}]]),De=`ROLE_USER`,M=`ROLE_DEV`,N=`ROLE_SUPERVISOR`,Oe=`ROLE_SECURITY_AUDITOR`,ke=`ROLE_ADMIN`,P=`ROLE_NODEFONY_ADMIN`,Ae=[De,M,N,Oe,ke,P];function F(e,t){return k(t,`ROLE_NODEFONY_ADMIN`)||!e||e.length===0?!0:A(t,e)}var I={devops:[M,N],dev:[M],ops:[N],admin:[P]},je=[{role:N,path:`/nodefony/supervision`,label:`Supervision`,description:`Santé applicative, charge, erreurs, alertes.`,icon:j}],L=`nf.studio.lastUser`,R=`nf.studio.lastMethod`,z=`nf.studio.pendingMethod`;function B(e){try{localStorage.setItem(L,e)}catch{}}function V(e){try{localStorage.setItem(R,e),localStorage.removeItem(z)}catch{}}var Me=class{auth;user=null;status=`idle`;error=null;mfaPending=!1;constructor(e){this.auth=e,u(this)}get isAuthenticated(){return this.status===`authenticated`&&!!this.user}get displayName(){return this.user?.username??`guest`}get roles(){return this.user?.roles??[]}get dashboards(){let e=this.roles;return je.filter(t=>k(e,t.role))}get homePath(){return`/nodefony/workspace`}async checkSession(){this.status=`loading`;try{let e=await this.auth.me();l(()=>{this.user=e,this.status=`authenticated`,this.error=null}),B(e.username);try{let e=localStorage.getItem(z);e&&V(e)}catch{}}catch{l(()=>{this.user=null,this.status=`unauthenticated`,this.error=null})}}async login(e){this.status=`loading`,this.error=null,this.mfaPending=!1;try{let t=await this.auth.login(e);return t.kind===`mfaRequired`?(l(()=>{this.mfaPending=!0,this.status=`idle`}),`mfa_required`):(l(()=>{this.user=t.user,this.status=`authenticated`}),B(t.user.username),V(`password`),`authenticated`)}catch(e){throw l(()=>{this.status=`error`,this.error=e instanceof Error?e.message:String(e)}),e}}async completeMfa(e){this.status=`loading`,this.error=null;try{let t=await this.auth.verifyTotpLogin(e);l(()=>{this.user=t,this.status=`authenticated`,this.mfaPending=!1}),B(t.username),V(`password`)}catch(e){throw l(()=>{this.status=`idle`,this.error=e instanceof Error?e.message:String(e)}),e}}cancelMfa(){l(()=>{this.mfaPending=!1,this.status=`unauthenticated`,this.error=null})}async loginWithPasskey(){this.status=`loading`,this.error=null;try{let e=await this.auth.loginWithPasskey();l(()=>{this.user=e,this.status=`authenticated`}),B(e.username),V(`passkey`)}catch(e){throw l(()=>{this.status=`error`,this.error=e instanceof Error?e.message:String(e)}),e}}registerPasskey(){return this.auth.registerPasskey()}async logout(){try{await this.auth.logout()}catch{}l(()=>{this.user=null,this.status=`unauthenticated`})}clearLocalSession(){l(()=>{this.user=null,this.status=`unauthenticated`})}},Ne=class{client;state=`disconnected`;lastError=null;latencyMs=null;activeSubscriptions=new Map;connectedAt=null;everConnected=!1;reconnectAttempt=0;nextRetryAt=null;endpointUrl=``;framesReceived=0;lastFrameAt=null;lastFrameMethod=null;clientHandlers=new Map;constructor(e,t=``){this.client=e,this.endpointUrl=t,u(this,{},{autoBind:!0}),this.client.onState(e=>{l(()=>{this.state=e,e===`connected`?(this.lastError=null,this.connectedAt=Date.now(),this.everConnected=!0,this.reconnectAttempt=0,this.nextRetryAt=null):(e===`disconnected`||e===`error`)&&(this.connectedAt=null)})}),this.client.onStats(()=>this.syncStats()),this.client.onReconnect(e=>{l(()=>{this.reconnectAttempt=e.attempt,this.nextRetryAt=e.nextRetryAt})}),l(()=>{this.state=this.client.state,this.client.state===`connected`&&(this.connectedAt=Date.now(),this.everConnected=!0)}),this.syncStats()}get isDown(){return this.state===`reconnecting`||this.state===`error`||this.state===`disconnected`&&this.everConnected}retryNow(){this.client.retryNow()}syncStats(){l(()=>{this.framesReceived=this.client.framesReceived,this.lastFrameAt=this.client.lastFrameAt,this.lastFrameMethod=this.client.lastFrameMethod;let e=new Set(this.client.subscribedChannels);for(let t of e)this.activeSubscriptions.has(t)||this.activeSubscriptions.set(t,{channel:t,msgCount:0,lastMessage:null,subscribedAt:Date.now(),rate:0,series:[],protocol:`json-rpc-2.0`,transport:`ws`,kind:`channel`});for(let t of this.activeSubscriptions.keys())e.has(t)||this.activeSubscriptions.delete(t);for(let e of this.activeSubscriptions.values()){let t=this.client.getChannelStats(e.channel);t&&(e.msgCount=t.msgCount,e.lastMessage=t.lastMessage,e.rate=t.rate,e.series=t.series)}})}get isConnected(){return this.state===`connected`}get subscriptionCount(){return this.activeSubscriptions.size}get totalMessages(){let e=0;for(let t of this.activeSubscriptions.values())e+=t.msgCount;return e}reconnect(){this.client.connect()}async connect(e){if(this.state===`connected`||this.state===`connecting`)return;let t=performance.now();try{await Promise.race([this.client.connect(),new Promise((e,t)=>setTimeout(()=>t(Error(`Backend WS pas prêt (P13.4 RealtimeService)`)),3e3))]),l(()=>{this.latencyMs=Math.round(performance.now()-t)})}catch(e){l(()=>{this.lastError=e instanceof Error?e.message:String(e),this.latencyMs=null})}}disconnect(){this.client.disconnect(),l(()=>{this.activeSubscriptions.clear()}),this.clientHandlers.clear()}subscribe(e,t,n={}){if(this.clientHandlers.has(e))return console.warn(`[Connection] already subscribed to ${e}`),()=>this.unsubscribe(e);let r={channel:e,msgCount:0,lastMessage:null,subscribedAt:Date.now(),rate:0,series:[],protocol:n.protocol??`json-rpc-2.0`,transport:n.transport??`ws`,kind:n.kind??`channel`,peer:n.peer},i=(...e)=>{t(...e)},a=this.client.on(e,i);return l(()=>{this.activeSubscriptions.set(e,r)}),this.clientHandlers.set(e,{dispose:a,wrapped:i}),this.client.subscribe(e),()=>this.unsubscribe(e)}unsubscribe(e){this.clientHandlers.get(e)?.dispose(),this.clientHandlers.delete(e),l(()=>{this.activeSubscriptions.delete(e)}),this.client.unsubscribe(e)}simulateMessage(e,t){this.clientHandlers.get(e)?.wrapped(t)}},Pe=`nodefony.studio.theme`,Fe=`nodefony.studio.palette`,Ie=`nodefony.studio.sidebar.rail`,Le=`nodefony.studio.sidebar.groups.v3`,H=`nodefony.studio.sidebar.pinned`,Re=`nf.debugbar.visible`,ze=`nf.realtime.adaptive`,Be=`nf.realtime.live`,Ve=`nf.api.socket`,He=class{theme=`dark`;palette=`nodefony`;rail=!1;collapsedGroups={};pinned=[];navQuery=``;debugBar=!0;adaptiveCadence=!1;realtimeLive=!1;apiViaSocket=!0;constructor(){u(this),this.loadPrefs()}setRealtimeLive(e){this.realtimeLive=e;try{localStorage.setItem(Be,e?`1`:`0`)}catch{}}toggleRealtimeLive(){this.setRealtimeLive(!this.realtimeLive)}setDebugBar(e){this.debugBar=e,this.applyDebugBar()}toggleDebugBar(){this.setDebugBar(!this.debugBar)}applyDebugBar(){try{localStorage.setItem(Re,this.debugBar?`1`:`0`)}catch{}window.__NODEFONY_DEBUGBAR__?.setVisible(this.debugBar)}setTheme(e){this.theme=e,this.persist()}toggleTheme(){this.theme=this.theme===`dark`?`light`:`dark`,this.persist()}toggleRail(){this.rail=!this.rail,this.persist()}setPalette(e){this.palette=e,this.persist()}togglePalette(){this.palette=this.palette===`nodefony`?`orange`:`nodefony`,this.persist()}isGroupCollapsed(e,t=!1){let n=this.collapsedGroups[e];return typeof n==`boolean`?n:t}toggleGroup(e,t=!1){this.collapsedGroups[e]=!this.isGroupCollapsed(e,t),this.persist()}isPinned(e){return this.pinned.includes(e)}togglePin(e){this.pinned=this.isPinned(e)?this.pinned.filter(t=>t!==e):[...this.pinned,e],this.persist()}setNavQuery(e){this.navQuery=e}setAdaptiveCadence(e){this.adaptiveCadence=e,this.persist()}toggleAdaptiveCadence(){this.setAdaptiveCadence(!this.adaptiveCadence)}setApiViaSocket(e){this.apiViaSocket=e;try{localStorage.setItem(Ve,e?`1`:`0`)}catch{}}toggleApiViaSocket(){this.setApiViaSocket(!this.apiViaSocket)}loadPrefs(){try{if(typeof localStorage>`u`)return;let e=localStorage.getItem(Pe);(e===`light`||e===`dark`||e===`auto`)&&(this.theme=e);let t=localStorage.getItem(Fe);(t===`orange`||t===`nodefony`)&&(this.palette=t),this.rail=localStorage.getItem(Ie)===`1`,this.debugBar=localStorage.getItem(Re)!==`0`,this.adaptiveCadence=localStorage.getItem(ze)===`1`,this.realtimeLive=localStorage.getItem(Be)===`1`,this.apiViaSocket=localStorage.getItem(Ve)!==`0`;let n=localStorage.getItem(Le);if(n){let e=JSON.parse(n);e&&typeof e==`object`&&(this.collapsedGroups=e)}let r=localStorage.getItem(H);if(r){let e=JSON.parse(r);Array.isArray(e)&&(this.pinned=e.filter(e=>typeof e==`string`))}}catch{}}persist(){try{if(typeof localStorage>`u`)return;localStorage.setItem(Pe,this.theme),localStorage.setItem(Fe,this.palette),localStorage.setItem(Ie,this.rail?`1`:`0`),localStorage.setItem(ze,this.adaptiveCadence?`1`:`0`),localStorage.setItem(Le,JSON.stringify(this.collapsedGroups)),localStorage.setItem(H,JSON.stringify(this.pinned))}catch{}}},Ue=class{client;messages=[];currentResponse=``;isStreaming=!1;error=null;constructor(e){this.client=e,u(this)}clear(){this.messages=[],this.currentResponse=``,this.error=null}async send(e){if(!e.trim()||this.isStreaming)return;let t={id:`u-${Date.now()}`,role:`user`,content:e,ts:Date.now()};l(()=>{this.messages.push(t),this.isStreaming=!0,this.currentResponse=``,this.error=null});try{await this.mockStream(e),l(()=>{this.messages.push({id:`a-${Date.now()}`,role:`assistant`,content:this.currentResponse,ts:Date.now()}),this.currentResponse=``,this.isStreaming=!1})}catch(e){l(()=>{this.error=e instanceof Error?e.message:String(e),this.isStreaming=!1})}}async mockStream(e){let t=`[mock] Reçu "${e}". Le pipeline @nodefony/agent (P12) répondra ici en streaming via RealtimeClient + JSON-RPC 2.0.`;for(let e of t.split(``))await new Promise(e=>setTimeout(e,15)),l(()=>this.currentResponse+=e)}},We=`/nodefony/framework/api/admin`,Ge=class{api;producers=[];loading=!1;error=null;env=null;invocations=new Map;constructor(e){this.api=e,u(this,{},{autoBind:!0})}get isProd(){return this.env===`production`}async loadInfo(){try{let e=await this.api.get(`/info`);l(()=>{this.env=typeof e.env==`string`?e.env:null})}catch{}}async loadCatalog(){this.loading=!0,this.error=null;try{let e=await this.api.getAbsolute(We);l(()=>{this.producers=e.producers??[],this.loading=!1})}catch(e){l(()=>{this.error=e instanceof Error?e.message:String(e),this.loading=!1})}}async invoke(e){this.invocations.set(e,{loading:!0});try{let t=await this.api.getAbsolute(e);l(()=>{this.invocations.set(e,{loading:!1,data:t,at:Date.now()})})}catch(t){l(()=>{this.invocations.set(e,{loading:!1,error:t instanceof Error?t.message:String(t),at:Date.now()})})}}reset(){this.producers=[],this.invocations.clear(),this.error=null,this.loading=!1}get endpointCount(){return this.producers.reduce((e,t)=>e+t.endpoints.length,0)}pageCapabilities(e,t=`GET`){for(let n of this.producers)for(let r of n.endpoints)if(r.path===e&&r.method===t)return r.page??null;return null}},U=`/nodefony/profiler/api`,Ke=class{api;recent=[];count=0;loading=!1;error=null;unavailable=!1;selectedId=null;detail=null;detailLoading=!1;detailError=null;autoRefresh=!1;timer=null;constructor(e){this.api=e,u(this,{},{autoBind:!0})}async loadRecent(){this.loading=!0,this.error=null,this.unavailable=!1;try{let e=await this.api.getAbsolute(`${U}/recent`);l(()=>{this.recent=e.entries??[],this.count=e.count??this.recent.length,this.loading=!1})}catch(e){l(()=>{e instanceof y&&e.status===404?this.unavailable=!0:this.error=e instanceof Error?e.message:String(e),this.loading=!1})}}async select(e){this.selectedId=e,this.detail=null,this.detailLoading=!0,this.detailError=null;try{let t=await this.api.getAbsolute(`${U}/${encodeURIComponent(e)}`);l(()=>{this.selectedId===e&&(this.detail=t,this.detailLoading=!1)})}catch(t){l(()=>{this.selectedId===e&&(this.detailError=t instanceof Error?t.message:String(t),this.detailLoading=!1)})}}async clear(){try{await this.api.deleteAbsolute(`${U}/recent`)}catch{}l(()=>{this.recent=[],this.count=0,this.selectedId=null,this.detail=null})}setAutoRefresh(e){this.autoRefresh=e,this.timer&&=(clearInterval(this.timer),null),e&&(this.timer=setInterval(()=>void this.loadRecent(),3e3))}dispose(){this.timer&&clearInterval(this.timer),this.timer=null,this.autoRefresh=!1}},qe=50,Je={success:`teal`,info:`blue`,warning:`yellow`,error:`red`},Ye={success:3e3,info:4e3,warning:6e3,error:1e4},Xe=class{recent=[];constructor(e){u(this,{},{autoBind:!0}),e.onNotice(e=>this.push(e))}push(e){this.recent.push(e),this.recent.length>qe&&this.recent.splice(0,this.recent.length-qe),e.source!==`realtime`&&v.show({color:Je[e.level],title:e.title,message:e.message,autoClose:Ye[e.level],withBorder:!0})}notify(e,t,n={}){this.push({level:e,message:t,title:n.title,source:n.source??`api`,code:n.code,ts:Date.now()})}get realtimeIncidents(){return this.recent.filter(e=>e.source===`realtime`||e.source===`server`).slice().reverse()}clear(){this.recent=[]}},Ze=1/48,Qe=1/6,$e=.008,et={runtime:`Runtime & lancement`,system:`Système & santé`,logs:`Logs`,orm:`Données / ORM`,realtime:`Temps réel`,cluster:`Cluster`,security:`Sécurité`,account:`Mon compte`,ai:`IA`},W=[{id:`account`,label:`Mon compte`,items:[{widgetId:`account.profile`,span:6,h:4},{widgetId:`account.apikeys`,span:6,h:3},{widgetId:`account.sessions`,span:6,h:3}]},{id:`dev`,label:`Développeur`,roles:I.dev,items:[{widgetId:`runtime.mode`,span:6,h:4},{widgetId:`system.info`,span:6,h:4},{widgetId:`system.git`,span:4,h:3},{widgetId:`system.uptime`,span:4,h:3},{widgetId:`system.cpu`,span:4,h:4},{widgetId:`system.heap`,span:4,h:4},{widgetId:`system.eventloop`,span:4,h:4},{widgetId:`orm.health`,span:6,h:4},{widgetId:`logs.live`,span:6,h:5}]},{id:`admin`,label:`Admin`,roles:I.admin,items:[{widgetId:`runtime.mode`,span:6,h:4},{widgetId:`runtime.modes`,span:6,h:4},{widgetId:`system.health`,span:6,h:3},{widgetId:`orm.health`,span:6,h:4},{widgetId:`realtime.hub`,span:6,h:4},{widgetId:`realtime.channels`,span:6,h:4}]},{id:`supervision`,label:`Supervision`,roles:I.ops,items:[],layout:[{widgetId:`supervision.health`,x:0,y:0,w:1,h:216,z:10},{widgetId:`runtime.mode`,x:0,y:228,w:.2917,h:208,z:2},{widgetId:`system.eventloop`,x:.2997,y:228,w:.2083,h:208,z:3},{widgetId:`system.cpu`,x:.516,y:228,w:.2292,h:208,z:4},{widgetId:`system.heap`,x:.7532,y:228,w:.2292,h:208,z:5},{widgetId:`supervision.correlation`,x:0,y:448,w:1,h:312,z:9},{widgetId:`orm.flow`,x:0,y:772,w:1,h:320,z:7},{widgetId:`supervision.gc`,x:0,y:1104,w:1,h:384,z:8}]},{id:`systeme`,label:`Système`,roles:I.devops,items:[{widgetId:`supervision.health`,span:12,h:6},{widgetId:`system.cpu`,span:4,h:4},{widgetId:`system.heap`,span:4,h:4},{widgetId:`system.eventloop`,span:4,h:4},{widgetId:`supervision.correlation`,span:6,h:5},{widgetId:`supervision.gc`,span:6,h:6},{widgetId:`system.info`,span:6,h:4},{widgetId:`runtime.mode`,span:6,h:4}]},{id:`config`,label:`Configuration`,roles:I.dev,items:[{widgetId:`runtime.mode`,span:6,h:4},{widgetId:`runtime.modes`,span:6,h:4},{widgetId:`runtime.vite`,span:4,h:4},{widgetId:`system.info`,span:8,h:4},{widgetId:`system.git`,span:6,h:3},{widgetId:`system.uptime`,span:6,h:3}]},{id:`logs`,label:`Logs`,roles:I.devops,items:[{widgetId:`logs.live`,span:12,h:7},{widgetId:`logs.backplane`,span:12,h:5},{widgetId:`supervision.alerts`,span:6,h:4},{widgetId:`realtime.channels`,span:6,h:4}]},{id:`memoire`,label:`Mémoire`,roles:I.devops,items:[{widgetId:`supervision.memory`,span:8,h:6},{widgetId:`supervision.handles`,span:4,h:6},{widgetId:`supervision.gc`,span:12,h:6},{widgetId:`system.heap`,span:6,h:4},{widgetId:`supervision.correlation`,span:6,h:5}]},{id:`erreurs`,label:`Erreurs`,roles:I.devops,items:[{widgetId:`supervision.errors`,span:6,h:5},{widgetId:`supervision.alerts`,span:6,h:5},{widgetId:`logs.live`,span:12,h:7}]},{id:`blank`,label:`Vierge`,items:[]}];function tt(e){return W.find(t=>t.id===e)?.roles}function nt(e,t){return F(tt(e),t)}var rt=`account`,G=new Map,it={runtime:I.devops,system:I.devops,realtime:I.devops,logs:I.devops,cluster:I.ops,orm:I.dev,ai:I.dev,security:I.admin};function at(e){G.set(e.id,e)}function ot(e){return G.get(e)}function st(e=[]){let t=[];for(let n of G.values())F(n.roles??it[n.category],e)&&t.push(n);return t.sort((e,t)=>e.title.localeCompare(t.title))}function K(e,t){return t<=0?e:Math.round(e/t)*t}function q(e,t,n){return Math.max(t,Math.min(n,e))}function ct(e){let t=[],n=0,r=0,i=0;for(let a of e){let e=q(a.w,.05,1);n>0&&n+e>1+1e-6&&(n=0,r+=i+12,i=0),t.push({id:a.id,x:n,y:r,w:e,h:a.h}),n+=e+$e,i=Math.max(i,a.h)}return t}var J=`nf.workspace.layouts.v3`,Y=`nf.workspace.active.v3`;function X(e){return q(Number.isFinite(e)?e:.33,Qe,1)}function Z(e){return Math.max(96,Number.isFinite(e)?Math.round(e):192)}function Q(e){if(e.layout&&e.layout.length)return{id:e.id,label:e.label,items:e.layout.map(lt)};let t=ct(e.items.map(e=>({id:e.widgetId,w:X((e.span??4)/12),h:Z((e.h??3)*64)})));return{id:e.id,label:e.label,items:t.map((e,t)=>({widgetId:e.id,x:e.x,y:e.y,w:e.w,h:e.h,z:t+1}))}}function lt(e){return{widgetId:e.widgetId,x:q(e.x,0,1),y:Math.max(0,Math.round(e.y)),w:X(e.w),h:Z(e.h),z:e.z}}function ut(e){let t=e;return!!t&&typeof t.widgetId==`string`&&typeof t.x==`number`&&typeof t.y==`number`&&typeof t.w==`number`&&typeof t.h==`number`&&typeof t.z==`number`}var dt=class{layouts={};activeId=rt;constructor(){u(this),this.load()}get active(){return this.layouts[this.activeId]??this.layouts.blank??{id:`blank`,label:`Vierge`,items:[]}}get layoutList(){return Object.values(this.layouts)}setActive(e){this.layouts[e]&&(this.activeId=e,this.persist())}hasWidget(e){return this.active.items.some(t=>t.widgetId===e)}topZ(e){return e.reduce((e,t)=>Math.max(e,t.z),0)}addWidget(e){let t=ot(e),n=this.layouts[this.activeId];if(!t||!n||n.items.some(t=>t.widgetId===e))return;let r=X((t.defaultSpan??4)/12),i=Z((t.defaultH??3)*64),a=n.items.reduce((e,t)=>Math.max(e,t.y+t.h),0);n.items.push({widgetId:e,x:0,y:n.items.length?a+8:0,w:r,h:i,z:this.topZ(n.items)+1}),this.persist()}removeWidget(e){let t=this.layouts[this.activeId];t&&(t.items=t.items.filter(t=>t.widgetId!==e),this.persist())}moveTo(e,t,n){let r=this.layouts[this.activeId]?.items.find(t=>t.widgetId===e);r&&(r.x=q(K(t,Ze),0,1-r.w),r.y=Math.max(0,K(n,8)),this.persist())}setSize(e,t,n){let r=this.layouts[this.activeId]?.items.find(t=>t.widgetId===e);r&&(r.w=X(K(t,Ze)),r.h=Z(K(n,8)),r.x=Math.min(r.x,1-r.w),this.persist())}bringToFront(e){let t=this.layouts[this.activeId]?.items,n=t?.find(t=>t.widgetId===e);if(!t||!n)return;let r=this.topZ(t);n.z!==r&&(n.z=r+1,this.persist())}tidy(){let e=this.layouts[this.activeId];if(!e||!e.items.length)return;let t=[...e.items].sort((e,t)=>e.y-t.y||e.x-t.x),n=t.map(e=>({id:e.widgetId,w:e.w,h:e.h})),r=new Map(ct(n).map(e=>[e.id,e]));t.forEach((e,t)=>{let n=r.get(e.widgetId);n&&(e.x=n.x,e.y=n.y,e.z=t+1)}),this.persist()}resetToPreset(){let e=W.find(e=>e.id===this.activeId);e&&(this.layouts[this.activeId]=Q(e),this.persist())}get templates(){return W.map(e=>({id:e.id,label:e.label}))}uniqueId(){let e=`ws_${Date.now().toString(36)}`;for(;this.layouts[e];)e+=`x`;return e}uniqueLabel(e){let t=new Set(Object.values(this.layouts).map(e=>e.label));if(!t.has(e))return e;let n=2;for(;t.has(`${e} ${n}`);)n++;return`${e} ${n}`}createWorkspace(e){let t=e?W.find(t=>t.id===e):null,n=this.uniqueId(),r=this.uniqueLabel(t?.label??`Bureau`),i=t?Q(t).items:[];return this.layouts[n]={id:n,label:r,items:i},this.activeId=n,this.persist(),n}renameWorkspace(e,t){let n=this.layouts[e],r=t.trim();n&&r&&(n.label=r,this.persist())}deleteWorkspace(e){Object.keys(this.layouts).length<=1||!this.layouts[e]||(delete this.layouts[e],this.activeId===e&&(this.activeId=Object.keys(this.layouts)[0]),this.persist())}moveWorkspace(e,t){if(!this.layouts[e]||e===t)return;let n=Object.keys(this.layouts).filter(t=>t!==e),r=t?n.indexOf(t):-1;if(t&&r<0)return;n.splice(r<0?n.length:r,0,e);let i={};for(let e of n)i[e]=this.layouts[e];this.layouts=i,this.persist()}duplicateWorkspace(e){let t=this.layouts[e];if(!t)return;let n=this.uniqueId();this.layouts[n]={id:n,label:this.uniqueLabel(`${t.label} (copie)`),items:t.items.map(e=>({...e}))},this.activeId=n,this.persist()}resetForIdentity(){try{typeof localStorage<`u`&&(localStorage.removeItem(J),localStorage.removeItem(Y))}catch{}this.activeId=rt,this.load()}load(){try{if(typeof localStorage<`u`){let e=localStorage.getItem(J);if(e){let t=JSON.parse(e);if(t&&typeof t==`object`){let e={};for(let[n,r]of Object.entries(t))r&&Array.isArray(r.items)&&(e[n]={id:n,label:r.label??n,items:r.items.filter(ut).map(lt)});if(Object.keys(e).length){this.layouts=e;let t=localStorage.getItem(Y);this.activeId=t&&e[t]?t:Object.keys(e)[0];return}}}}}catch{}let e={};for(let t of W)e[t.id]=Q(t);this.layouts=e,e[this.activeId]||(this.activeId=Object.keys(e)[0]??`account`)}persist(){try{if(typeof localStorage>`u`)return;localStorage.setItem(J,JSON.stringify(this.layouts)),localStorage.setItem(Y,this.activeId)}catch{}}};function ft(){return typeof window>`u`?`ws://127.0.0.1/nodefony/studio/api/realtime`:`${window.location.protocol===`https:`?`wss`:`ws`}://${window.location.host}/nodefony/studio/api/realtime`}var pt=class{ui;auth;connection;chat;admin;profiler;notifications;workspace;api;kernel;realtime;browserLog;constructor(){this.ui=new He,this.workspace=new dt,this.kernel=c({name:`STUDIO`,connectOnBoot:!1,realtime:{url:ft(),autoReconnect:!0,reconnectDelay:800,reconnectDelayMax:4e3}});let e=this.kernel.get(`realtime`);if(!e)throw Error(`RootStore : le noyau client n'a pas composé de socket temps réel.`);this.realtime=e,this.browserLog=new t({moduleName:`studio`}),a(),Ee({syslog:this.browserLog}),n({syslog:this.browserLog,publisher:this.realtime}),this.notifications=new Xe(this.realtime),this.api=new fe({socket:this.realtime,socketEnabled:()=>this.ui.apiViaSocket,onUnauthorized:()=>{this.auth?.clearLocalSession()},onError:({method:e,status:t,message:n})=>{t!==401&&e!==`GET`&&this.notifications.notify(`error`,n,{title:`Erreur ${t}`,source:`api`,code:t})}});let r=new Ce(this.api);this.auth=new Me(r),this.connection=new Ne(this.realtime,ft()),this.chat=new Ue(this.realtime),this.admin=new Ge(this.api),this.profiler=new Ke(this.api),o(()=>this.auth.user?.id??null,e=>{this.kernel.setIdentity(e===null?null:{key:String(e)})}),this.kernel.on(`onIdentityChange`,(...e)=>{let[,t]=e;if(this.admin.reset(),t!==null){this.workspace.resetForIdentity();try{if(typeof localStorage<`u`){let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n&&(n.startsWith(`studio.`)||n.startsWith(`nf.datagrid:`))&&e.push(n)}for(let t of e)localStorage.removeItem(t)}}catch{}}}),this.kernel.boot()}},mt=`__nfStudioStoreContext__`,ht=globalThis,gt=ht[mt]??(ht[mt]=(0,d.createContext)(null)),_t=gt.Provider;function $(){let e=(0,d.useContext)(gt);if(!e)throw Error(`useStore() called outside <StoreProvider>. Wrap your tree with StoreProvider.`);return e}var vt=()=>$().auth,yt=()=>$().ui,bt=()=>$().connection,xt=()=>$().chat,St=()=>$().admin,Ct=()=>$().profiler,wt=()=>$().notifications,Tt=()=>$().workspace;export{k as A,P as C,F as D,I as E,te as F,_ as M,v as N,j as O,h as P,M as S,Ae as T,Qe as _,bt as a,L as b,$ as c,pt as d,q as f,nt as g,at as h,xt as i,y as j,A as k,yt as l,st as m,St as n,wt as o,ot as p,vt as r,Ct as s,_t as t,Tt as u,et as v,N as w,z as x,R as y};
|