@openscout/scout 0.2.107 → 0.2.108
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/README.md +53 -16
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/ActivityScreen-C1H-vL0L.js +1 -0
- package/dist/client/assets/{AddProjectForm-CusDRiVO.js → AddProjectForm-4sVXmjfN.js} +1 -1
- package/dist/client/assets/{AdventureEvidence-CyegKk1V.js → AdventureEvidence-D5wq1vu8.js} +1 -1
- package/dist/client/assets/{AdventureReader-X-hbTOi0.js → AdventureReader-BICypcDY.js} +1 -1
- package/dist/client/assets/{AdventureScenery-LPXSVP67.js → AdventureScenery-CGEcG0zV.js} +1 -1
- package/dist/client/assets/AgentAdventures-5yBt-Zl3.js +1 -0
- package/dist/client/assets/{AgentAvatar-CrP1eXxk.js → AgentAvatar-Dn8TUv5W.js} +1 -1
- package/dist/client/assets/AgentConfigurationScreen-C0D9WNyL.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-BzcBdC_s.js +1 -0
- package/dist/client/assets/{AgentDetailCard-DtHT3sCo.js → AgentDetailCard-CI-ufaEP.js} +1 -1
- package/dist/client/assets/AgentFloorView-D8tlGlgy.js +1 -0
- package/dist/client/assets/{AgentFloorWorld-CjoIa6jA.js → AgentFloorWorld-DqmnQexg.js} +1 -1
- package/dist/client/assets/AgentInfoScreen-BnRhfcFy.js +1 -0
- package/dist/client/assets/{AgentLaneCard-BaZ2g-f8.js → AgentLaneCard-pppHFROz.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-TF1SlJSc.js → AgentLaneChrome-RptImDFc.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-EzEPsn3g.js → AgentLaneDetailSheet-BqbwGskh.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-dpp7YvrX.js → AgentLaneSummaryResize-DaIgwyVh.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-De6C4ZOw.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-Ry-aqDTr.js → AgentLanesPreflight-BQfj2twF.js} +1 -1
- package/dist/client/assets/{AgentLanesView-BJi9xXz6.js → AgentLanesView-CiISx7pu.js} +1 -1
- package/dist/client/assets/{AgentLiveActions-CfTupTEl.js → AgentLiveActions-CkRGkv13.js} +1 -1
- package/dist/client/assets/AgentMasterScreen-CijN_4tN.js +1 -0
- package/dist/client/assets/{AgentSessions-B1gOhDBf.js → AgentSessions-ghjQcSrh.js} +2 -2
- package/dist/client/assets/AgentsConsole-D8upjDpn.js +1 -0
- package/dist/client/assets/AgentsScreen-C17BFqjf.js +1 -0
- package/dist/client/assets/AgentsSubnav-_1GVC4hj.js +1 -0
- package/dist/client/assets/{AstronautSuit-Cchnc4Ug.js → AstronautSuit-Dzu4GOMR.js} +1 -1
- package/dist/client/assets/{AtopView-gkEp4y__.js → AtopView-DJK5b3lZ.js} +1 -1
- package/dist/client/assets/{BackToPicker-CUkjnoVk.js → BackToPicker-BPU7kbXq.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-CTvFw523.js +1 -0
- package/dist/client/assets/{BriefingsScreen-B1HlBMGZ.js → BriefingsScreen-DpVC3OUk.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-Dk242Yh_.js → BrokerMetadataPanel-glRVdwkU.js} +1 -1
- package/dist/client/assets/BrokerScreen-CqKsBwEx.js +8 -0
- package/dist/client/assets/{CastPicker-BXUtPAGC.js → CastPicker-Y29K5kKk.js} +1 -1
- package/dist/client/assets/ChannelComposer-D4EY9jVW.js +1 -0
- package/dist/client/assets/{ChannelSidebar-e9DOPulb.js → ChannelSidebar-CVmykV4d.js} +1 -1
- package/dist/client/assets/{CharacterFamilyPreview-DMfw7UM_.js → CharacterFamilyPreview-Bj8oMD-5.js} +1 -1
- package/dist/client/assets/{ChatAvatar-C3a_o5Hj.js → ChatAvatar-BsAOShUr.js} +1 -1
- package/dist/client/assets/{ChatBits-CsvxbToF.js → ChatBits-Cq54CmyB.js} +1 -1
- package/dist/client/assets/{ChatCollapsedStrip-FEmQ_G9J.js → ChatCollapsedStrip-B0DdrOo2.js} +1 -1
- package/dist/client/assets/{ChatRichInput-DhtwFxQE.js → ChatRichInput-DYJRhGTP.js} +1 -1
- package/dist/client/assets/ChatRightPanel-D94Lw7ud.js +1 -0
- package/dist/client/assets/ChatSpaceSurface-Cp532VmZ.js +1 -0
- package/dist/client/assets/{ChatSpaceTheme-CUH8bTZc.js → ChatSpaceTheme-DPzYpw-v.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-DuQRwpgK.js → CodeDiffPane-DCgMUi39.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-ZQ6gSBpg.js → CodeProjectPicker-Dq787L77.js} +1 -1
- package/dist/client/assets/{CodeScreen-BXyKeL5T.js → CodeScreen-BN4TkiR0.js} +1 -1
- package/dist/client/assets/{CommsCanvas-THp0r_U8.js → CommsCanvas-Dh056d91.js} +1 -1
- package/dist/client/assets/{CommsDeck-BVmSMV2V.js → CommsDeck-CRXKIerH.js} +1 -1
- package/dist/client/assets/{CommsFlowGraph-DxoOaLF_.js → CommsFlowGraph-Cc48o9u_.js} +1 -1
- package/dist/client/assets/{CommsFlowMap-Vi8ziCPg.js → CommsFlowMap-Ckasql5e.js} +1 -1
- package/dist/client/assets/{CommsSelection-BUoRbu9o.js → CommsSelection-CuphnUny.js} +1 -1
- package/dist/client/assets/{ComposerAttachments-DW0AIb8k.js → ComposerAttachments-9uYp_Lh5.js} +1 -1
- package/dist/client/assets/ConversationComposer-hYtLurqy.js +1 -0
- package/dist/client/assets/ConversationFeedRows-Bu0ZJcy8.js +1 -0
- package/dist/client/assets/ConversationHeader-L9738YVP.js +1 -0
- package/dist/client/assets/{ConversationPanels-D9oC0xG5.js → ConversationPanels-D6KuqvGu.js} +2 -2
- package/dist/client/assets/ConversationScreen-Pzxy9x4m.js +2 -0
- package/dist/client/assets/ConversationStatus-BEefIbXq.js +1 -0
- package/dist/client/assets/{CrewAvatar-kTznzqcO.js → CrewAvatar-a_C_F9r_.js} +1 -1
- package/dist/client/assets/{CrewSprite-Dhryjx2c.js → CrewSprite-CguHb2Ny.js} +1 -1
- package/dist/client/assets/{CrewStage-vdO0qm3D.js → CrewStage-IPpS3Oja.js} +1 -1
- package/dist/client/assets/{CrewWorkspaces-DCBzAAS4.js → CrewWorkspaces-BTPtcEcx.js} +1 -1
- package/dist/client/assets/{DataTable-aH-jCyDq.js → DataTable-DnL_8SAu.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-66uQAorV.js → DispatchAftermath-CoAYaL3B.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-DJr0v0D_.js → DocumentFocusViewer-mxzPxQQW.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-BBa70EhJ.js → EmbeddableSurfacesLab-BAZ_eRMc.js} +1 -1
- package/dist/client/assets/{EmptyState-CZlrHXy-.js → EmptyState-DLiLgtPK.js} +1 -1
- package/dist/client/assets/{FileViewerPane-BAO6mtjD.js → FileViewerPane-Dc7AoVod.js} +1 -1
- package/dist/client/assets/{FleetRollCallHud-C5q2567n.js → FleetRollCallHud-VhpxVcGO.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-C1kASP3J.js +1 -0
- package/dist/client/assets/{FloorContextSheet-2_NVPQor.js → FloorContextSheet-BfrXNoBn.js} +1 -1
- package/dist/client/assets/{FloorExchangePanel-BU1pPu8K.js → FloorExchangePanel-DsG1cRzu.js} +1 -1
- package/dist/client/assets/{FloorMessagePasses-cLW2UGNP.js → FloorMessagePasses-Cm3LbkHd.js} +1 -1
- package/dist/client/assets/{FloorReplay-VFzA6Kxc.js → FloorReplay-Bg7kA-tR.js} +1 -1
- package/dist/client/assets/FloorResourcesSheet-Ba9HubO2.js +1 -0
- package/dist/client/assets/{FloorSavedWork-BeHDejWz.js → FloorSavedWork-BDOvV3mA.js} +1 -1
- package/dist/client/assets/{FloorTacticalHUD-CO-iiFpb.js → FloorTacticalHUD-4d-Hr-YL.js} +1 -1
- package/dist/client/assets/{FollowScreen-CFfkIbc6.js → FollowScreen-DFVSlsQV.js} +1 -1
- package/dist/client/assets/{HarnessMark-C4naWc16.js → HarnessMark-CP-PWk2W.js} +1 -1
- package/dist/client/assets/HarnessesScreen-j-91IoOo.js +1 -0
- package/dist/client/assets/{HerdrSession-_t7yM8vX.js → HerdrSession-H2mmxeTK.js} +1 -1
- package/dist/client/assets/{HomeHero-DouPyNmz.js → HomeHero-g4H3Ctxg.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-CnM1i8hW.js → HostAdvisorView-Cyt3b5Fq.js} +1 -1
- package/dist/client/assets/{InviteLandingScreen-CEjG2E34.js → InviteLandingScreen-C3DtAGD4.js} +1 -1
- package/dist/client/assets/{InviteSheet-CwxZtWCl.js → InviteSheet-BiGMNpsE.js} +1 -1
- package/dist/client/assets/{JumpPalette-O1aJE9gR.js → JumpPalette-goXAVByA.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-32n9baT-.js → KnowledgeSearchInspector-BbOQIqdF.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-DC8yX-kA.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-CJa110yk.js → LaneToolHoverCard-B8Am_1DC.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-CngYIxdI.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-TbrNHRj_.js → LaneTraceEventFocus-BRR_jcl9.js} +1 -1
- package/dist/client/assets/{MeshCanvas-DWZHYh1A.js → MeshCanvas-DzkuY_XI.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-iswYFpIb.js → MeshCanvasMinimap-BrscEPAH.js} +1 -1
- package/dist/client/assets/MeshScreen-CAtRB8K6.js +1 -0
- package/dist/client/assets/{MeshTopologyView-BVvtqI8q.js → MeshTopologyView-B1I2dAhu.js} +2 -2
- package/dist/client/assets/{MessageEmbeds-ksPazAKH.js → MessageEmbeds-B-FbWI7a.js} +1 -1
- package/dist/client/assets/MessagesScreen-hq7D3Lfi.js +1 -0
- package/dist/client/assets/{MissionContextRail-D62-Wis8.js → MissionContextRail-ClR8amG1.js} +1 -1
- package/dist/client/assets/MissionControlView-D6gbMrgx.js +1 -0
- package/dist/client/assets/{MissionFocusOverlay-C1zys3Jv.js → MissionFocusOverlay-CzeNgI9Q.js} +1 -1
- package/dist/client/assets/MissionLeftAgentRow-CB3cgeYr.js +1 -0
- package/dist/client/assets/{MissionLogPane-B19lYSY9.js → MissionLogPane-2PMEoG44.js} +1 -1
- package/dist/client/assets/NativeAreaScreen-BnlrAWT8.js +1 -0
- package/dist/client/assets/NativeAreaScreen-DSR5Tf6F.js +1 -0
- package/dist/client/assets/NativeAreaScreen-fGsxyeC3.js +1 -0
- package/dist/client/assets/{NewAgentModal-Bh-L-emz.js → NewAgentModal-4b_3aoZE.js} +1 -1
- package/dist/client/assets/{NewChatComposer-C97-iTMK.js → NewChatComposer-D-VB5vdt.js} +1 -1
- package/dist/client/assets/{NewChatOrigin-DFbF_XvR.js → NewChatOrigin-BYsEu9dZ.js} +1 -1
- package/dist/client/assets/{NodeDetailPanel-CElOEpCh.js → NodeDetailPanel-9NaEnZAQ.js} +1 -1
- package/dist/client/assets/{NodeMenu-B-jjHf1c.js → NodeMenu-BgJMmffZ.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-B7Qt69Ms.js → ObserveEmbedScreen-W7Q5HbXP.js} +2 -2
- package/dist/client/assets/{ObserveTextFlow-PFnG_10h.js → ObserveTextFlow-C0oQEerY.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-CUTIoLZJ.js → ObservedTopologyPanel-Ci7emnnj.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-Di9qdmI0.js +22 -0
- package/dist/client/assets/OpsAgentsView-DVotOMg2.js +1 -0
- package/dist/client/assets/OpsScreen-C955zgr3.js +1 -0
- package/dist/client/assets/OpsSubnav-CjMVj7Sk.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-B1VqGSmu.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-DHuMKJj-.js → ProjectAgentProfileBar-DhVU7zew.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-CJk-Dx4t.js +1 -0
- package/dist/client/assets/ProjectsInbox-B7kap8nR.js +2 -0
- package/dist/client/assets/ProjectsRail-BhSaqbv0.js +1 -0
- package/dist/client/assets/ProjectsScreen-CSb7nwjb.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-pEJutIO8.js +1 -0
- package/dist/client/assets/{Provider-C35yu29I.js → Provider-BEXAZWd9.js} +2 -2
- package/dist/client/assets/{RailRow-BjmWK420.js → RailRow-Ddz90weI.js} +1 -1
- package/dist/client/assets/RawSessionsTable-TdKlJIPl.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-BU5KmlNo.js +8 -0
- package/dist/client/assets/{RenderedWorkerSprite-Dhlyg89J.js → RenderedWorkerSprite-BNhFXMIo.js} +1 -1
- package/dist/client/assets/{ReplayClock-348f17bW.js → ReplayClock-wLpb4VqN.js} +1 -1
- package/dist/client/assets/{ReplayLog-CBnAM3ui.js → ReplayLog-IUyQdklN.js} +1 -1
- package/dist/client/assets/{ReplayOutpost-DyRPfNFx.js → ReplayOutpost-C4djhjZJ.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-BWxvRDrS.js → RepoDiffEmbedScreen-BmQX_8E-.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-DN94irmY.js → RepoDiffPageScreen-B9oAjrC6.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-_4JVXBIW.js → RepoDiffViewer-Ch_lIMt-.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-DL6A2o_z.js +2 -0
- package/dist/client/assets/{ReposScreen-uMCpt0e9.js → ReposScreen-D-E7fSAB.js} +2 -2
- package/dist/client/assets/{RiggedWorkerCharacter-q6QRc7_o.js → RiggedWorkerCharacter-CF6fhzGd.js} +1 -1
- package/dist/client/assets/{SageModelStudio-CNDhZhgD.js → SageModelStudio-CSet_ITs.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-CUaU4R6T.js → ScoutDeckSurface-BJ-fl8AX.js} +1 -1
- package/dist/client/assets/{ScoutSurface-3_25USO_.js → ScoutSurface-BvFRdce6.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-CRqhYe0a.js → ScoutbotFxLab-CfPzycZ7.js} +1 -1
- package/dist/client/assets/{SecondaryNav-D7dbV2qo.js → SecondaryNav-1FjBDWuY.js} +1 -1
- package/dist/client/assets/{SessionContextStrip-CXfs9hUD.js → SessionContextStrip-BoiIxXvS.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-D0zFmou-.js → SessionEmbedScreen-BizGNGOz.js} +1 -1
- package/dist/client/assets/{SessionHopMenu-E6VJZrE0.js → SessionHopMenu-DX6PJPNk.js} +1 -1
- package/dist/client/assets/{SessionObserve-DXxBvejJ.js → SessionObserve-Dw3bVQYF.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-Cuj_KHxR.js → SessionObserveEvidence-uD1OX-R5.js} +1 -1
- package/dist/client/assets/SessionRefScreen-Ch9H-qVk.js +1 -0
- package/dist/client/assets/SessionsScreen-DUeP23Xy.js +1 -0
- package/dist/client/assets/{SettingsDrawer-juCpnbH6.js → SettingsDrawer-BVrP6J52.js} +3 -3
- package/dist/client/assets/SettingsScreen-BcJ05LE5.js +1 -0
- package/dist/client/assets/{SharedFloorCharacter-DNEiaOUh.js → SharedFloorCharacter-dnamlt1p.js} +1 -1
- package/dist/client/assets/SharedWorkFloor-H-e2TVj9.js +2 -0
- package/dist/client/assets/{ShikiPane-CRtTYkMj.js → ShikiPane-CDiIT_qn.js} +1 -1
- package/dist/client/assets/{SlidePanel-_CHAQdOa.js → SlidePanel-D5oPQocF.js} +1 -1
- package/dist/client/assets/{SpaceSwitcher-BLgSCf_T.js → SpaceSwitcher-WccPJ0fS.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-CpZWf54-.js → SpriteAvatar-D53GaaK3.js} +1 -1
- package/dist/client/assets/{SproutActionSprite-BSiTS4en.js → SproutActionSprite-BrFCmgWS.js} +1 -1
- package/dist/client/assets/{StatusPill-2gCP6H7A.js → StatusPill-jT--OXbn.js} +1 -1
- package/dist/client/assets/{TailView-CYSijNTy.js → TailView-B44cSuyl.js} +2 -2
- package/dist/client/assets/Terminal-D0PanmIk.js +4 -0
- package/dist/client/assets/TerminalEmbedScreen-Eddi4sts.js +1 -0
- package/dist/client/assets/{TerminalHeaderMount-Cq4OD_xN.js → TerminalHeaderMount-CYYcKxQ-.js} +1 -1
- package/dist/client/assets/{TextDocumentSurface-D52m7Vd8.js → TextDocumentSurface-DBslUq9k.js} +1 -1
- package/dist/client/assets/{TmuxPeek-CXFeweMg.js → TmuxPeek-Ctw5yYO5.js} +1 -1
- package/dist/client/assets/{VoiceControlWell-DF3bjcYA.js → VoiceControlWell-BkjuWjYu.js} +1 -1
- package/dist/client/assets/{VoicePathDiagram-CmpHWfO-.js → VoicePathDiagram-u0i6ntbx.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-Ok2nfxHw.js → VoicePermissionsPanel-9Nuw-xCr.js} +1 -1
- package/dist/client/assets/{VoiceTurnDetails-wAByRaNB.js → VoiceTurnDetails-kS7lfbmt.js} +1 -1
- package/dist/client/assets/{VoiceTurnStage-edoJalLV.js → VoiceTurnStage-DLY6aYDg.js} +1 -1
- package/dist/client/assets/{VoiceTurnView-D-8g5E4r.js → VoiceTurnView-CF4tIldB.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-zQkNVy2F.js → WorkDetailScreen-BrrkENYq.js} +2 -2
- package/dist/client/assets/{WorkFilesViewer-vNt01sDd.js → WorkFilesViewer-B63sKRYZ.js} +1 -1
- package/dist/client/assets/{WorkRunView-BDkR7Edq.js → WorkRunView-DLIzAsc3.js} +1 -1
- package/dist/client/assets/WorldActorTalk-CHhFTiQV.js +1 -0
- package/dist/client/assets/{WorldCharacter-CIIlutQq.js → WorldCharacter-CJGx2DVy.js} +1 -1
- package/dist/client/assets/{WorldMinimap-B6HNgcDe.js → WorldMinimap-DL12pBw3.js} +1 -1
- package/dist/client/assets/{WorldSky-Jm2Z6dfW.js → WorldSky-BlPNvGLo.js} +1 -1
- package/dist/client/assets/{activity-CIlFrfPJ.js → activity-CXkZ620t.js} +1 -1
- package/dist/client/assets/{addon-fit-dFpj9Kfq.js → addon-fit-G3qi01sy.js} +1 -1
- package/dist/client/assets/{addon-webgl-BFCGRtGh.js → addon-webgl-Bo7kSgOB.js} +1 -1
- package/dist/client/assets/{agent-essentials-BGGvT5G6.js → agent-essentials-DnfdGmIX.js} +1 -1
- package/dist/client/assets/{agent-specialization-DDc7mLCW.js → agent-specialization-DYX_DSlY.js} +1 -1
- package/dist/client/assets/{arc.es-C1SQHJ3k.js → arc.es-CLA3XI14.js} +1 -1
- package/dist/client/assets/arrow-down--OUDFWIq.js +1 -0
- package/dist/client/assets/{arrow-left-MVUKauwQ.js → arrow-left-DNjQHf4C.js} +1 -1
- package/dist/client/assets/{arrow-right-Bp-FpE5V.js → arrow-right-A_yyXwoH.js} +1 -1
- package/dist/client/assets/arrow-up-DFy-9ghF.js +1 -0
- package/dist/client/assets/{arrow-up-right-BPedAgxO.js → arrow-up-right-DUW1A1Hb.js} +1 -1
- package/dist/client/assets/{book-open-CV98WMSp.js → book-open-B_idZgTF.js} +1 -1
- package/dist/client/assets/{bot-B4zLQ4IN.js → bot-BNv_ZJzi.js} +1 -1
- package/dist/client/assets/{chat-api-DSJMBYoT.js → chat-api-BHGHALv2.js} +1 -1
- package/dist/client/assets/{chat-message-markup-91DIry6R.js → chat-message-markup-esR-YLtN.js} +1 -1
- package/dist/client/assets/{chat-transport-DNS5CB2I.js → chat-transport-CtxnPLMU.js} +1 -1
- package/dist/client/assets/{check-lrJ3a73a.js → check-BM6QtbB7.js} +1 -1
- package/dist/client/assets/{chevron-down-l1mrh5S9.js → chevron-down-DEDSNJNY.js} +1 -1
- package/dist/client/assets/{chevron-right-DrfqcerI.js → chevron-right-B02kAw12.js} +1 -1
- package/dist/client/assets/{chevron-up-CETZJzjV.js → chevron-up-CzveykKG.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-DbVLgbWX.js → chunk-HRAB3GC3-DVhUsgOw.js} +1 -1
- package/dist/client/assets/chunk-JTPDIGGW-hdpdYwXb.js +46 -0
- package/dist/client/assets/chunk-T65CQEWV-G_Z0lqtn.js +1 -0
- package/dist/client/assets/chunk-YOZR3KYS-apgUnfXh.js +2 -0
- package/dist/client/assets/{clock-BV1aqPkK.js → clock-8tb9t2t9.js} +1 -1
- package/dist/client/assets/{code-xml-BhcNbLWU.js → code-xml-E9gBuiVs.js} +1 -1
- package/dist/client/assets/{coffee-D7EAOdCk.js → coffee-D0YEK6-l.js} +1 -1
- package/dist/client/assets/{compass-63TUaz5_.js → compass-EmGkpxIe.js} +1 -1
- package/dist/client/assets/content-B-rn1rka.js +1 -0
- package/dist/client/assets/content-BHV-ZU8_.js +1 -0
- package/dist/client/assets/content-BI9yWpWC.js +1 -0
- package/dist/client/assets/content-BLVuukzF.js +1 -0
- package/dist/client/assets/content-BP3cQkAj.js +1 -0
- package/dist/client/assets/content-BRY-UTkP.js +1 -0
- package/dist/client/assets/content-BXTmYOPB.js +1 -0
- package/dist/client/assets/content-C3DZ77HZ.js +1 -0
- package/dist/client/assets/content-CPchclaV.js +1 -0
- package/dist/client/assets/{content-nGlEZhUI.js → content-CVqPTQnr.js} +1 -1
- package/dist/client/assets/content-CjAERU44.js +1 -0
- package/dist/client/assets/content-CoYG0nWL.js +1 -0
- package/dist/client/assets/content-DK1KeRPw.js +1 -0
- package/dist/client/assets/content-iWBSSXa6.js +1 -0
- package/dist/client/assets/content-ryJeaQk8.js +1 -0
- package/dist/client/assets/content-srNyLgDt.js +1 -0
- package/dist/client/assets/{conversation-icons-Tqba2d56.js → conversation-icons-Dxn9N1Kx.js} +1 -1
- package/dist/client/assets/conversation-motion-features-BfmPlONx.js +1 -0
- package/dist/client/assets/{copy-xKeM5ZtU.js → copy-C1XrY27_.js} +1 -1
- package/dist/client/assets/{cpu-BOTa_WLr.js → cpu-DVZ_LhPn.js} +1 -1
- package/dist/client/assets/{createLucideIcon-zZ8Hx7er.js → createLucideIcon-CKbjXlwv.js} +1 -1
- package/dist/client/assets/direct-voice-DAOUU-kc.js +10 -0
- package/dist/client/assets/discover-BNa3BPr_.js +2 -0
- package/dist/client/assets/embed-entry-gK3z8Yxi.js +2 -0
- package/dist/client/assets/{external-link-CUObqmgX.js → external-link-Df1R34rX.js} +1 -1
- package/dist/client/assets/{eye-LrO-cXQt.js → eye-CD-_aphP.js} +1 -1
- package/dist/client/assets/{file-code-corner-CsU7jJpu.js → file-code-corner-DtMWHBN3.js} +1 -1
- package/dist/client/assets/{file-text-CnISiiw6.js → file-text-BOJQiS8p.js} +1 -1
- package/dist/client/assets/{flag-C4wl8z2-.js → flag-CeKO8NoD.js} +1 -1
- package/dist/client/assets/{folder-D5prSkzz.js → folder-C2emmTHq.js} +1 -1
- package/dist/client/assets/{gauge-D9_5iJEm.js → gauge-BR5CrhRM.js} +1 -1
- package/dist/client/assets/{gestures-QZub3Ot9.js → gestures-Dh8szhcU.js} +1 -1
- package/dist/client/assets/{git-branch-B0_fPLO7.js → git-branch-C45vy8qT.js} +1 -1
- package/dist/client/assets/{go-shortcuts-DicR7sUf.js → go-shortcuts--25Qg0lD.js} +1 -1
- package/dist/client/assets/{home-moving-signal-rpMhsOJB.js → home-moving-signal-BiiyEKEb.js} +1 -1
- package/dist/client/assets/home-now-card-DaCpqUZe.js +1 -0
- package/dist/client/assets/{home-now-card-nano-B5Dv3-pb.js → home-now-card-nano-wbxgyY4q.js} +1 -1
- package/dist/client/assets/hooks-JNwYSH18.js +2 -0
- package/dist/client/assets/{index-EsrkGBcv.js → index-BFbLvCJn.js} +2 -2
- package/dist/client/assets/index-BRNHY2fp.css +1 -0
- package/dist/client/assets/index-BrXaMEdK.js +1 -0
- package/dist/client/assets/index-CXzJ_hGx.js +1 -0
- package/dist/client/assets/{index-CHD0qcfL.js → index-V8FYEUpD.js} +1 -1
- package/dist/client/assets/index-mYtyYeAe.js +1 -0
- package/dist/client/assets/{inspector-panel-BkgUDn6G.js → inspector-panel-BgU5xUln.js} +2 -2
- package/dist/client/assets/{keyboard-nav-DDHegDbx.js → keyboard-nav-CEe-ApvZ.js} +1 -1
- package/dist/client/assets/{lane-roster-store-D-RSWjb-.js → lane-roster-store-MraynTHP.js} +1 -1
- package/dist/client/assets/{layers-C8PDiMul.js → layers-ClmyjwpB.js} +1 -1
- package/dist/client/assets/{layout-grid-Cor2frzj.js → layout-grid-DG2-JaPn.js} +1 -1
- package/dist/client/assets/left-B66YR0c5.js +1 -0
- package/dist/client/assets/left-BP5P8lzw.js +2 -0
- package/dist/client/assets/left-BbCKRDbW.js +1 -0
- package/dist/client/assets/left-CaY5FK2k.js +1 -0
- package/dist/client/assets/left-CemrfeSs.js +1 -0
- package/dist/client/assets/left-DcYA26sH.js +1 -0
- package/dist/client/assets/left-DdMMaqFT.js +2 -0
- package/dist/client/assets/left-advisor-DBml48M5.js +1 -0
- package/dist/client/assets/left-agents-DowYF2ag.js +1 -0
- package/dist/client/assets/left-default-Bifaeg_V.js +1 -0
- package/dist/client/assets/left-lanes-BGhjdqpD.js +1 -0
- package/dist/client/assets/left-mission-CvXPUovR.js +1 -0
- package/dist/client/assets/library-CnC8uzJt.js +1 -0
- package/dist/client/assets/{loader-circle-OvccU82H.js → loader-circle-CCG7hG7z.js} +1 -1
- package/dist/client/assets/{local-agents-BqnoxJrq.js → local-agents-BMcFlY_x.js} +1 -1
- package/dist/client/assets/{log-in-7SnYqW5w.js → log-in-VL9mdgeE.js} +1 -1
- package/dist/client/assets/{machine-children-DxcqCLmd.js → machine-children-DvCiQxwA.js} +1 -1
- package/dist/client/assets/{mentions-ByUvhS-v.js → mentions-s5oW4aQU.js} +1 -1
- package/dist/client/assets/{mesh-ops-CiZ8xSAx.js → mesh-ops-9SzD3sPw.js} +1 -1
- package/dist/client/assets/{mesh-view-store-DZvJC4KU.js → mesh-view-store-CVqzYz4K.js} +1 -1
- package/dist/client/assets/{message-circle-CxRVKNE-.js → message-circle-BB3rFCVD.js} +1 -1
- package/dist/client/assets/{message-markup-Zwo3t4cI.js → message-markup-D1C7GzHo.js} +1 -1
- package/dist/client/assets/{message-square-BxesYglW.js → message-square-BwqBIfv5.js} +1 -1
- package/dist/client/assets/{mission-control-store-elEEsIvb.js → mission-control-store-e8F85JhP.js} +1 -1
- package/dist/client/assets/{monitor-DTTYEb73.js → monitor-M0VSmHQ-.js} +1 -1
- package/dist/client/assets/{nav-destinations-uorRqFxf.js → nav-destinations-B3R5zxFX.js} +1 -1
- package/dist/client/assets/{observe-BJqERJVj.js → observe-M3rLosT5.js} +1 -1
- package/dist/client/assets/{page-status-BswZLqvA.js → page-status-BIuh3C5p.js} +1 -1
- package/dist/client/assets/{panel-right-Bv7sP_fc.js → panel-right-WKLdPm0F.js} +1 -1
- package/dist/client/assets/{paperclip-BjcuP_Hx.js → paperclip-DLf_ABSv.js} +1 -1
- package/dist/client/assets/{pause-C2XTlkjs.js → pause-7mmEEvVx.js} +1 -1
- package/dist/client/assets/{persistent-state-KRk_yb0q.js → persistent-state-3mbBFRDO.js} +1 -1
- package/dist/client/assets/{pin-C2mFOV1l.js → pin-q_0gAA6i.js} +1 -1
- package/dist/client/assets/{play-FT6K3It1.js → play-N5-hnPCV.js} +1 -1
- package/dist/client/assets/{plus-DFDDeGKu.js → plus-B0hdY0fF.js} +1 -1
- package/dist/client/assets/profile-B7ZGToTo.js +1 -0
- package/dist/client/assets/{projects-inbox-C0FUCv_p.js → projects-inbox-CMFBjQt0.js} +1 -1
- package/dist/client/assets/{proxy-AJsmwA6h.js → proxy-k0ILOVkK.js} +1 -1
- package/dist/client/assets/{radio-DRoOZsws.js → radio-Bjqmv997.js} +1 -1
- package/dist/client/assets/{refresh-cw-BmVr7sCD.js → refresh-cw-BcqctLqo.js} +1 -1
- package/dist/client/assets/resolve-panes-wzGu9d8o.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-C8SOo5oZ.js +1 -0
- package/dist/client/assets/right-9rMRZN_r.js +1 -0
- package/dist/client/assets/right-BHZq648O.js +1 -0
- package/dist/client/assets/{right-DWPVB-nK.js → right-BNJzCaH9.js} +1 -1
- package/dist/client/assets/right-CAd7lTvY.js +1 -0
- package/dist/client/assets/right-Cc57bCTW.js +1 -0
- package/dist/client/assets/right-DY49Prjj.js +1 -0
- package/dist/client/assets/right-DfU47xKY.js +1 -0
- package/dist/client/assets/right-Dr7vxdZl.js +1 -0
- package/dist/client/assets/right-DsE4aR3A.js +1 -0
- package/dist/client/assets/right-zlkRjnkv.js +1 -0
- package/dist/client/assets/{rocket-CGl4RTV7.js → rocket-BahsdUe6.js} +1 -1
- package/dist/client/assets/router-CJIx83Ia.js +1 -0
- package/dist/client/assets/runtime-picker-IRcTkMZ5.js +1 -0
- package/dist/client/assets/{scope-views-RUWwCVAr.js → scope-views-KDtZoLUC.js} +1 -1
- package/dist/client/assets/{scout-voice-CZx60X6E.js → scout-voice-Cdh6pCsb.js} +1 -1
- package/dist/client/assets/{scoutbot-markdown-BKEBSbG0.js → scoutbot-markdown-7PRQHaAc.js} +1 -1
- package/dist/client/assets/{scroll-text-DNjxhyO2.js → scroll-text-CA0QxBHu.js} +1 -1
- package/dist/client/assets/{search-DT42oyRW.js → search-Bv2IONmc.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-Bmb-oRvD.js +1 -0
- package/dist/client/assets/{selection-bridge-x3wFUjxj.js → selection-bridge-CthAuPRw.js} +1 -1
- package/dist/client/assets/{send-horizontal-CH0-fbZE.js → send-horizontal-_Tf_It04.js} +1 -1
- package/dist/client/assets/{send-to-agent-session-DoKCDBJ4.js → send-to-agent-session-CWDHHgFB.js} +1 -1
- package/dist/client/assets/{server-QfsgMLk1.js → server-U_l8A83n.js} +1 -1
- package/dist/client/assets/{session-catalog-CvSdPHPe.js → session-catalog-Dx4tl3sx.js} +1 -1
- package/dist/client/assets/{session-recap-queue-41l2XVkI.js → session-recap-queue-GeicPLsQ.js} +1 -1
- package/dist/client/assets/{session-table-L-pns6Zl.js → session-table-BI62J4NP.js} +1 -1
- package/dist/client/assets/{sessions-view-Dc-QAa7O.js → sessions-view-lGMwwZY7.js} +1 -1
- package/dist/client/assets/{settings-BVh7kldq.js → settings-bo9X410k.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-782VC_yy.js → sliders-horizontal-CPSx6wd2.js} +1 -1
- package/dist/client/assets/{sparkles-BjHq_DNK.js → sparkles-Br-bA2aZ.js} +1 -1
- package/dist/client/assets/{sse-BCPRocpq.js → sse-BVxO0zNp.js} +1 -1
- package/dist/client/assets/{tail-events-d0yAYxR0.js → tail-events-C6NWFB1N.js} +1 -1
- package/dist/client/assets/{terminal-hQKQygcf.js → terminal-DMBAZjPP.js} +1 -1
- package/dist/client/assets/{terminal-relay-Bxs1hp-j.js → terminal-relay-CpGHpDa8.js} +1 -1
- package/dist/client/assets/{terminal-takeover-Ay5C2c-M.js → terminal-takeover-CXwdoZ5j.js} +1 -1
- package/dist/client/assets/{triangle-alert-CHoRGdVO.js → triangle-alert-BZikHKuT.js} +1 -1
- package/dist/client/assets/use-beside-DopIbJwf.js +1 -0
- package/dist/client/assets/{use-conversation-list-CY4JciOV.js → use-conversation-list-CGtcpdPd.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-CymmXWH4.js → use-fleet-active-asks-DAHOPYPV.js} +1 -1
- package/dist/client/assets/{use-mesh-node-state-BvaqtODo.js → use-mesh-node-state-BlWIPTc4.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-BSYaqH_0.js → use-mesh-ops-items-pKWBro7o.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-3gMYZNIp.js → use-reduced-motion-DkdIQBwh.js} +1 -1
- package/dist/client/assets/use-scout-dev-flags-CduUFb7l.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-BANmpjMh.js → useAgentHoverCard-DNlXPYQf.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-LJGNYG3U.js +1 -0
- package/dist/client/assets/{useEmbedHeadline-D6pJRxUg.js → useEmbedHeadline-BeeBDb7E.js} +1 -1
- package/dist/client/assets/{usePierreRuntime-BAQdiN0L.js → usePierreRuntime-DUXZ-DTK.js} +1 -1
- package/dist/client/assets/useSidebarCollapse-DoMvU_2R.js +1 -0
- package/dist/client/assets/{users-BUjx36gx.js → users-BQPEIUfd.js} +1 -1
- package/dist/client/assets/{wrench-DR0i5BU7.js → wrench-C-wjicn5.js} +1 -1
- package/dist/client/assets/{x-DAehov0E.js → x-BcfhXYiF.js} +1 -1
- package/dist/client/assets/{xterm-BXQiLVnI.js → xterm-qXD45dc0.js} +1 -1
- package/dist/client/assets/{zap-CEjZNZbI.js → zap-BqL8ttGz.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/main.mjs +1 -1
- package/package.json +26 -4
- package/server.json +2 -2
- package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +0 -1
- package/dist/client/assets/AgentAdventures-BAgxdOF8.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +0 -1
- package/dist/client/assets/AgentFloorView-DH4jiDgw.js +0 -1
- package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +0 -1
- package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +0 -1
- package/dist/client/assets/AgentsConsole-RXGqRvcb.js +0 -1
- package/dist/client/assets/AgentsScreen-ChwMBs11.js +0 -1
- package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +0 -1
- package/dist/client/assets/BrokerScreen-DwOF6bMA.js +0 -8
- package/dist/client/assets/Canvas-X9pVSkw3.js +0 -1
- package/dist/client/assets/ChannelComposer-DoK7IDGa.js +0 -1
- package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +0 -1
- package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +0 -1
- package/dist/client/assets/ConversationComposer-CUQyArlk.js +0 -1
- package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +0 -1
- package/dist/client/assets/ConversationHeader-C-ZWscKj.js +0 -1
- package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +0 -2
- package/dist/client/assets/ConversationStatus--IPm2nGh.js +0 -1
- package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +0 -1
- package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +0 -1
- package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +0 -1
- package/dist/client/assets/MeshScreen-8nAzQVbm.js +0 -1
- package/dist/client/assets/MessagesScreen-C3WB4T21.js +0 -1
- package/dist/client/assets/MissionControlView-B9cNPXvl.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +0 -1
- package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +0 -1
- package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +0 -1
- package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +0 -1
- package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +0 -31
- package/dist/client/assets/OpsAgentsView-DajlX8LO.js +0 -1
- package/dist/client/assets/OpsScreen-jVcaBKGi.js +0 -1
- package/dist/client/assets/OpsSubnav-BOOYShHE.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +0 -1
- package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +0 -2
- package/dist/client/assets/ProjectsRail-CDWocin_.js +0 -1
- package/dist/client/assets/ProjectsScreen-B_CJycqW.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +0 -1
- package/dist/client/assets/RawSessionsTable-DzT90hWu.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +0 -16
- package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +0 -2
- package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +0 -1
- package/dist/client/assets/SessionsScreen-BLIRkohT.js +0 -1
- package/dist/client/assets/SettingsScreen-BtGzE2-O.js +0 -1
- package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +0 -2
- package/dist/client/assets/Terminal-Bi97yb5s.js +0 -4
- package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +0 -1
- package/dist/client/assets/TerminalRelay-DrikpUSJ.js +0 -46
- package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +0 -1
- package/dist/client/assets/content-B1lgE8qr.js +0 -1
- package/dist/client/assets/content-B5l11YyQ.js +0 -1
- package/dist/client/assets/content-BNZOZEpX.js +0 -1
- package/dist/client/assets/content-BRIxP155.js +0 -1
- package/dist/client/assets/content-BWd8gt8L.js +0 -1
- package/dist/client/assets/content-BfwS2jAK.js +0 -1
- package/dist/client/assets/content-C4p43_eT.js +0 -1
- package/dist/client/assets/content-CdYfaoDV.js +0 -1
- package/dist/client/assets/content-CzldLxw0.js +0 -1
- package/dist/client/assets/content-D-olnc4U.js +0 -1
- package/dist/client/assets/content-DTioimq4.js +0 -1
- package/dist/client/assets/content-LOebm3_d.js +0 -1
- package/dist/client/assets/content-oyzDM-LK.js +0 -1
- package/dist/client/assets/content-x1PHxED7.js +0 -1
- package/dist/client/assets/content-zX3ZY3T9.js +0 -1
- package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +0 -1
- package/dist/client/assets/direct-voice-BbLPuJ04.js +0 -2
- package/dist/client/assets/discover-DJFxyV1k.js +0 -2
- package/dist/client/assets/embed-entry-Lyvu0Kfc.js +0 -2
- package/dist/client/assets/home-now-card-ByE6Umcx.js +0 -1
- package/dist/client/assets/hooks-_eCZZPsR.js +0 -2
- package/dist/client/assets/index-724SdE6r.js +0 -1
- package/dist/client/assets/index-CN4rBB_s.css +0 -1
- package/dist/client/assets/index-D1d98iYf.js +0 -1
- package/dist/client/assets/index-gGHPA-By.js +0 -1
- package/dist/client/assets/left-Bn5X7x2o.js +0 -2
- package/dist/client/assets/left-BqS0fYX1.js +0 -1
- package/dist/client/assets/left-CTCeeeD3.js +0 -1
- package/dist/client/assets/left-DhtVPVux.js +0 -1
- package/dist/client/assets/left-K39b-Wvx.js +0 -2
- package/dist/client/assets/left-KGmueNPt.js +0 -1
- package/dist/client/assets/left-P_GOYB-s.js +0 -1
- package/dist/client/assets/left-advisor-B0N47De2.js +0 -1
- package/dist/client/assets/left-agents-CsSNc51Y.js +0 -1
- package/dist/client/assets/left-default-BlO5LP2T.js +0 -1
- package/dist/client/assets/left-lanes-C4PhaJE6.js +0 -1
- package/dist/client/assets/left-mission-BjTE5vPa.js +0 -1
- package/dist/client/assets/library-CkWNPHRp.js +0 -1
- package/dist/client/assets/profile-DTmzN16I.js +0 -1
- package/dist/client/assets/provider-Dojd8quC.js +0 -1
- package/dist/client/assets/resolve-panes-pbY1fCWi.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +0 -1
- package/dist/client/assets/right-49kO-6nD.js +0 -1
- package/dist/client/assets/right-APtItA8A.js +0 -1
- package/dist/client/assets/right-BJwhPqtn.js +0 -1
- package/dist/client/assets/right-BPqrf4ek.js +0 -1
- package/dist/client/assets/right-D7djOy6K.js +0 -1
- package/dist/client/assets/right-DKOUCRob.js +0 -1
- package/dist/client/assets/right-DMNrVzg7.js +0 -1
- package/dist/client/assets/right-DppeMCy4.js +0 -1
- package/dist/client/assets/right-GAL5Mw1v.js +0 -1
- package/dist/client/assets/router-DCtl8wqb.js +0 -1
- package/dist/client/assets/runtime-picker-DXu2bOTh.js +0 -1
- package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +0 -1
- package/dist/client/assets/use-beside-DoRC1nt0.js +0 -1
- package/dist/client/assets/use-scout-dev-flags-DS_pYYQd.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +0 -1
- package/dist/client/assets/usePersistentState-B8lP7TRb.js +0 -1
- package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SageModelStudio-CSet_ITs.js","assets/index-BFbLvCJn.js","assets/index-BRNHY2fp.css","assets/SageModelStudio-768dRQr4.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as a,k as Gt,m as Ee,j as e,_ as Re}from"./index-BFbLvCJn.js";import{a as Ie}from"./api-DSqpVKC7.js";import{u as we,p as $e,z as Zt,W as De,w as Oe,c as We,a as Fe,t as Le,C as ze,Z as ue}from"./WorldMinimap-DL12pBw3.js";import{WorldSky as He}from"./WorldSky-BlPNvGLo.js";import{WorldActorTalk as Ye}from"./WorldActorTalk-CHhFTiQV.js";import{f as Xe,F as Be}from"./FloorExchangePanel-DsG1cRzu.js";import{CharacterFamilyPreview as Ke}from"./CharacterFamilyPreview-Bj8oMD-5.js";import{w as he}from"./RenderedWorkerSprite-BNhFXMIo.js";import{f as Ge}from"./floor-preview-text-HrORUJ7D.js";import{FloorMessagePasses as Ze}from"./FloorMessagePasses-Cm3LbkHd.js";import{f as Ue}from"./floor-character-name-CqJPOlXb.js";import{WorkRunView as qe}from"./WorkRunView-DLIzAsc3.js";import{b as Dt}from"./agent-lane-detail-Ti3trpfH.js";import{f as Je}from"./floor-memory-YMM8AlLY.js";import{f as Ve}from"./floor-context-model-rWKqaKmV.js";import{f as $t}from"./agent-floor-actor-DW8zLht0.js";import{b as pe}from"./shared-work-artifacts-DfNl9KTo.js";import{u as Qe}from"./Provider-BEXAZWd9.js";import{SharedFloorCharacter as to}from"./SharedFloorCharacter-dnamlt1p.js";import{j as eo}from"./agent-lanes-model-DMAdqCmK.js";import{F as oo}from"./file-code-corner-DtMWHBN3.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./createLucideIcon-CKbjXlwv.js";import"./router-CJIx83Ia.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./index-CXzJ_hGx.js";import"./NewChatComposer-D-VB5vdt.js";import"./media-blobs-Bi8pxr1u.js";import"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./agent-state-DDhnFEEP.js";import"./time-Dhsh_2EG.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./send-to-agent-session-CWDHHgFB.js";import"./theme-vars-DNK0nn3k.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BVxO0zNp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./floor-message-passes-CO3Ix_wR.js";import"./lane-observe-CteDwdD-.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./CrewSprite-CguHb2Ny.js";import"./SpriteAvatar-D53GaaK3.js";import"./lane-ask-display-BTVSakyo.js";import"./context-budget-8qFKqM-j.js";import"./WorldCharacter-CJGx2DVy.js";import"./RiggedWorkerCharacter-CF6fhzGd.js";function so(){const[r,i]=a.useState([]);return a.useEffect(()=>{let h=!1,d;const x=async()=>{try{const w=await Ie("/api/world/messages");h||i(w)}catch{}h||(d=setTimeout(x,3e3))};return x(),()=>{h=!0,clearTimeout(d)}},[]),r}const ro=5;function no(r,i){return Math.hypot(r,i)>=ro}function ao(r,i,h,d,x){const w=we(i/d,h/d,x);return{x:Math.max($,Math.round(r.x+w.x)),y:Math.max($,Math.round(r.y+w.y))}}const St=715,Ot=Math.round(St*809/647),io=647/809,Wt=.22,Ut=.78,Ft=.36,qt=.58,co=.16,me=.981,fe=64,je=84,lo=84,uo=132,ho=95,ge=.12,po=.85,mo=.5,xe=[6,-5,3,-3,5],Z=205,Ct=60,$=30,fo=(Ut-Wt)*St/((qt-Ft)*Ot);function ke(r){const i=Math.max(1,Math.min(r,Math.floor(Math.sqrt(r*fo))));return{columns:i,rows:Math.max(1,Math.ceil(Math.max(r,1)/i))}}function go(r,i){let h=0,d=$;for(const x of r)d>$&&d+x>i&&(h++,d=$),d+=x+Z;return r.length?h+1:0}function xo(r,i){const h=r.length,d=Math.min(i,h);if(d<=1)return[];const x=(b,M)=>{let g=0;for(let k=b;k<M;k++)g+=r[k]+(k>b?Z:0);return g},w=Array.from({length:h+1},()=>Array(d+1).fill(1/0)),N=Array.from({length:h+1},()=>Array(d+1).fill(0));w[0][0]=0;for(let b=1;b<=h;b++)for(let M=1;M<=Math.min(b,d);M++)for(let g=b-1;g>=M-1;g--){const k=Math.max(w[g][M-1],x(g,b));k<w[b][M]&&(w[b][M]=k,N[b][M]=g)}const j=[];let P=h;for(let b=d;b>1;b--)P=N[P][b],j.unshift(P);return j}function yo(r){const{columns:i,rows:h}=ke(r),d=(Ut-Wt)*St,x=(qt-Ft)*Ot,w=Math.max(1,i*uo/d,h*ho/x);return Math.round(Ot*w)}function bo(r,i,h){const{columns:d,rows:x}=ke(r),w=Wt*i,N=(Ut-Wt)*i,j=Ft*h,P=(qt-Ft)*h;return Array.from({length:r},(b,M)=>{const g=Math.floor(M/d),k=M%d,T=Math.min(d,r-g*d),U=x===1?mo:ge+(po-ge)*(g/(x-1)),_=(1-U)*co*N,S=N-_*2-je,q=d>1?S*(T-1)/(d-1):0,V=T>1?q/(T-1):0,F=Math.max(0,S-q),Q=T>1?(g%2===1?1:-1)*Math.min(F/2,V/4):0;return{x:Math.round(w+_+(S-q)/2+Q+k*V),y:Math.round(j+U*P-lo+xe[(k+g)%xe.length])}})}function wo(r){const i=(r.facts?.cwd||Dt(r).cwd||"").trim();if(!i.startsWith("/"))return"";const h=[];for(const d of i.split("/"))d===".."?h.pop():d&&d!=="."&&h.push(d);return`/${h.join("/")}`}function jo(r,i,h){const d=new Map;for(const n of r){const p=wo(n),m=JSON.stringify(p?["workspace",p]:["lane",n.id]),y=d.get(m)??{cwd:p,lanes:new Map};y.lanes.set(n.id,n),d.set(m,y)}const x={groups:i?.groups.map(n=>({...n,laneIds:[...n.laneIds]}))??[]};for(const[n,p]of d){let m=x.groups.find(y=>y.key===n);m||(m={key:n,laneIds:[],height:Ot},x.groups.push(m));for(const y of p.lanes.keys())m.laneIds.includes(y)||m.laneIds.push(y);m.height=Math.max(m.height,yo(m.laneIds.length))}const w=h?.positions??{},N=h?.targetAspect&&Number.isFinite(h.targetAspect)&&h.targetAspect>0?h.targetAspect:1.5,j=n=>Math.round(n.height*io),P=n=>Math.round(n*me)+fe,b=new Map,M=[],g=x.groups.filter(n=>{const p=w[n.key];if(!p)return!0;const m=Math.round(p.x),y=Math.round(p.y);return b.set(n.key,{x:m,y}),M.push({x:m,y,right:m+j(n),bottom:y+P(n.height)}),!1});M.sort((n,p)=>n.x-p.x||n.y-p.y);const k=(n,p,m,y)=>{const ft=p+P(y);return M.find(L=>n<L.right&&L.x<n+m&&p<L.bottom&&L.y<ft)},T=Math.max(St,...g.map(j)),U=g.reduce((n,p)=>n+(j(p)+Z)*(P(p.height)+Ct),0),_=Math.max(T+Z,Math.sqrt(U*N)),S=$+_,q=g.map(j),V=new Set(xo(q,go(q,S))),F=[];for(let n=0;n<g.length;n++)(V.has(n)||F.length===0)&&F.push([]),F[F.length-1].push(n);const Q=F.map(n=>n.reduce((p,m)=>p+j(g[m])+Z,-Z)),ht=Math.max(0,...Q);let At=0,E=$+Math.round(Math.max(0,ht-(Q[0]??0))/2),R=E,v=0,Y=$;for(let n=0;n<g.length;n++){const p=g[n],m=j(p);V.has(n)?(At++,Y+=v+Ct,E=$+Math.round(Math.max(0,ht-Q[At])/2),R=E,v=0):R>E&&R+m>S&&(Y+=v+Ct,R=E,v=0);for(let y=k(R,Y,m,p.height);y;y=k(R,Y,m,p.height))y.right+Z+m<=S?R=y.right+Z:(Y=Math.max(Y+v+Ct,y.bottom+Ct),R=E,v=0);b.set(p.key,{x:R,y:Y}),R+=m+Z,v=Math.max(v,P(p.height))}const pt=[];let mt=$*2+St,nt=320;for(const n of x.groups){const p=b.get(n.key),m=j(n);mt=Math.max(mt,p.x+m+$),nt=Math.max(nt,p.y+Math.round(n.height*me)+fe+$);const y=d.get(n.key);if(!y)continue;const ft=bo(n.laneIds.length,m,n.height),L=n.laneIds.flatMap((gt,xt)=>{const Nt=y.lanes.get(gt);if(!Nt)return[];const{x:at,y:tt}=ft[xt];return[{lane:Nt,x:at,y:tt,centerX:p.x+at+je/2,centerY:p.y+tt+70}]});pt.push({key:n.key,cwd:y.cwd,lanes:L.map(gt=>gt.lane),x:p.x,y:p.y,width:m,height:n.height,actors:L})}return{memory:x,groups:pt,worldWidth:mt,worldHeight:nt}}const Me="openscout:world-island-layout:v1";function ko(){try{const r=globalThis.localStorage?.getItem(Me);if(!r)return{};const i=JSON.parse(r);if(!i||typeof i!="object")return{};const h={};for(const[d,x]of Object.entries(i)){if(!x||typeof x!="object")continue;const{x:w,y:N}=x;typeof w=="number"&&Number.isFinite(w)&&typeof N=="number"&&Number.isFinite(N)&&(h[d]={x:w,y:N})}return h}catch{return{}}}function ye(r){try{globalThis.localStorage?.setItem(Me,JSON.stringify(r))}catch{}}const Mo="/assets/world-outposts-v1-DOt0i98W.png",_o="/assets/solar-system-scope-2k-stars-points-1FwHnkj0.png",Po=a.lazy(()=>Re(()=>import("./SageModelStudio-CSet_ITs.js"),__vite__mapDeps([0,1,2,3])));function be(r){return r>=1?`${Number(r.toFixed(r<10?1:0))}:1`:`1:${Math.round(1/r).toLocaleString()}`}function Co(r){let i=0;for(const h of r)i=i*31+h.charCodeAt(0)>>>0;return{outpostPosition:`${i%3*50}% center`,skyPosition:`${i%100}% ${18+i%58}%`}}function Gs({lanes:r,now:i,onActor:h}){const{openFilePreview:d}=Qe(),x=so(),[w,N]=a.useState(null),[j,P]=a.useState(null),[b,M]=a.useState(!1),[g,k]=a.useState(null),[T,U]=a.useState([]),[_,S]=a.useState(null),[q,V]=a.useState(null),[F,Q]=a.useState(!1),[ht,At]=a.useState(!0),[E,R]=a.useState("crew"),v=a.useRef({});for(const t of[...r].sort((o,c)=>o.id.localeCompare(c.id)))if(!v.current[t.id]){const o=Object.values(v.current);v.current[t.id]=Ee(t.agent.name)??Gt.find(c=>!o.includes(c.slug))?.slug??Gt[o.length%Gt.length].slug}const[Y,pt]=a.useState(!1),[mt,nt]=a.useState(!1),[n,p]=a.useState(!0),m=a.useRef([]);for(const t of r){if(m.current.length>=he.length)break;m.current.includes(t.id)||m.current.push(t.id)}const[y,ft]=a.useState(!1),[L,gt]=a.useState(!1),[xt,Nt]=a.useState(!1),[at,tt]=a.useState(!1),[it,_e]=a.useState(!1),Tt=a.useRef(null),[et,Pe]=a.useState({width:900,height:500}),[X,Jt]=a.useState(null),[z,Ce]=a.useState("flat"),[B,Vt]=a.useState(1),[K,Lt]=a.useState({x:0,y:0}),[yt,Se]=a.useState({}),[zt,Ht]=a.useState(null),ct=a.useRef(null),lt=a.useRef(!1),[Yt,vt]=a.useState(ko),[Qt,Xt]=a.useState(null),dt=a.useRef(null),D=a.useRef(null);a.useEffect(()=>{if(!Tt.current)return;const t=new ResizeObserver(([o])=>Pe({width:o.contentRect.width,height:o.contentRect.height}));return t.observe(Tt.current),()=>t.disconnect()},[b]);const te=a.useRef(void 0),J=a.useMemo(()=>jo(r,te.current,{positions:Yt,targetAspect:et.width/Math.max(et.height,1)}),[r,Yt,et]);a.useEffect(()=>{te.current=J.memory},[J]);const H=new Map(J.groups.map(t=>[t.key,t]));[...H];const Et=H,ot=r.find(t=>t.id===g)??null,Ae=ot?pe(r).filter(t=>t.owners.some(o=>o.id===ot.id)):[],bt=new Map;for(const t of Ae)for(const o of t.owners)o.id!==g&&bt.set(o.id,{lane:o,reason:"Shared file activity"});const ut=Je(r),ee=[...new Map(ut.map(({parent:t})=>[t.id,t])).values()],Rt=t=>Ue(t).label;for(const t of ut)t.child.id===g&&bt.set(t.parent.id,{lane:t.parent,reason:"Parent session"}),t.parent.id===g&&bt.set(t.child.id,{lane:t.child,reason:"Child session"});const oe=new Set(bt.keys());_&&_.forEach(t=>oe.add(t));const se=Xe(r,i,x),wt=new Map;for(const t of se)wt.set([t.from,t.to].sort().join(":"),[t.from,t.to]);for(const{parent:t,child:o}of ut){const c=[t.id,o.id].sort().join(":");wt.has(c)||wt.set(c,[t.id,o.id])}const re=!!_&&[...wt.values()].some(t=>t.every(o=>_.includes(o)));a.useEffect(()=>{_&&!re&&S(null)},[re,_]);const ne=t=>{k(null),S(t)},jt=new Map(J.groups.flatMap(t=>t.actors.map(o=>[o.lane.id,{x:o.centerX+(yt[o.lane.id]?.x??0),y:o.centerY+(yt[o.lane.id]?.y??0)}]))),kt=g?jt.get(g):null;ot&&Ve([ot],i,["tool","message","ask"]).slice(0,3),ot&&$t(ot,i);const O=J.worldWidth,W=J.worldHeight,ae=z==="iso"?Math.sqrt(3)/2*(O+W):O,ie=z==="iso"?(O+W)/2:W,ce=Math.min((et.width-36)/ae,(et.height-70)/ie),G=Math.max(.12,ce)*B,A=a.useRef({zoom:B,pan:K});A.current={zoom:B,pan:K};const Mt=(t,o)=>{const c=Math.max(.12,ce)*o;return We(t,{width:ae*c,height:ie*c},et)},Bt=t=>{A.current=t,Vt(t.zoom),Lt(t.pan)},_t=a.useRef(null),st=()=>{_t.current!==null&&(cancelAnimationFrame(_t.current),_t.current=null)},It=t=>{st();const o={zoom:t.zoom,pan:Mt(t.pan,t.zoom)};if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){Bt(o);return}const c={zoom:A.current.zoom,pan:A.current.pan},s=performance.now(),f=C=>{const l=Math.min(1,(C-s)/ze),u=Le(c,o,l);u.pan=Mt(u.pan,u.zoom),Bt(u),_t.current=l<1?requestAnimationFrame(f):null};_t.current=requestAnimationFrame(f)};a.useEffect(()=>st,[]);const Ne=(t,o)=>{st();const c=Zt(A.current.zoom,A.current.pan,t,o);c.pan=Mt(c.pan,c.zoom),Bt(c)};a.useEffect(()=>{const t=Tt.current;if(!t)return;const o=c=>{if(c.target.closest(".shared-floor__inspect"))return;c.preventDefault();const s=t.getBoundingClientRect();Ne(Oe(c.deltaY,c.deltaMode),{x:c.clientX-s.left-s.width/2,y:c.clientY-s.top-s.height/2})};return t.addEventListener("wheel",o,{passive:!1}),()=>t.removeEventListener("wheel",o)});const Kt=Fe(B),Te=a.useMemo(()=>J.groups.map(t=>{const o=$e(t.x+t.width/2-O/2,t.y+t.height/2-W/2,z);return{x:o.x*G+K.x,y:o.y*G+K.y,spread:t.width*G}}),[J.groups,z,G,K,O,W]),Pt=t=>{S(null),k(t.id),h(t)},le=t=>{U(o=>o.includes(t.id)?o.filter(c=>c!==t.id):[...o,t.id]),Pt(t)};return a.useEffect(()=>{U(t=>{const o=t.filter(c=>r.some(s=>s.id===c));return o.length===t.length?t:o})},[r]),a.useEffect(()=>{if(!g&&!_&&T.length===0)return;const t=o=>{o.key==="Escape"&&(k(null),S(null),U([]))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[g,_,T.length]),b?e.jsxs("div",{className:"shared-floor shared-floor__experiment",children:[e.jsx("button",{className:"shared-floor__back",type:"button",onClick:()=>M(!1),children:"← Back to world"}),e.jsx(qe,{lanes:r,now:i,onActor:h})]}):e.jsxs("div",{className:`shared-floor is-map is-${z}${ot||_?" has-selection":""}${L?" has-boundaries":""}${it?" is-paused":""}`,children:[j?e.jsx(Ye,{...j,onSent:()=>{N(j.lane.id),k(j.lane.id)},onTalk:()=>P({...j,compose:!0,voice:!1}),onDictate:()=>P({...j,compose:!0,voice:!0}),onProfile:()=>{Pt(j.lane),P(null)},onClose:()=>P(null)},j.lane.id):null,mt?e.jsx(a.Suspense,{fallback:e.jsx("div",{role:"status",children:"Loading 3D studio…"}),children:e.jsx(Po,{onClose:()=>nt(!1)})}):null,_?e.jsx(Be,{pair:_,lanes:r,now:i,onClose:()=>S(null),onFile:d,onSpeaker:V},_.join(":")):null,Y?e.jsx(Ke,{onClose:()=>pt(!1)}):null,e.jsxs("div",{className:"shared-floor__teams",children:[e.jsxs("button",{type:"button","aria-expanded":xt,onClick:()=>Nt(!xt),children:["Agent teams",ut.length?` · ${ut.length}`:""]}),xt?e.jsxs("section",{"aria-label":"Agent families",children:[e.jsx("strong",{children:"Parent → subagents"}),ee.length?ee.map(t=>e.jsxs("div",{children:[e.jsx("button",{type:"button",onClick:()=>Pt(t),children:Rt(t)}),ut.filter(o=>o.parent.id===t.id).map(({child:o})=>e.jsxs("button",{className:"shared-floor__team-child",type:"button",onClick:()=>Pt(o),children:["↳ ",Rt(o),e.jsx("small",{children:$t(o,i).label})]},o.id))]},t.id)):e.jsx("p",{children:"No parent links reported in this roster yet."})]}):null]}),e.jsxs("div",{className:"shared-floor__layers",children:[e.jsx("button",{type:"button","aria-expanded":at,onClick:()=>tt(!at),children:"Layers"}),at?e.jsxs("div",{children:[e.jsxs("div",{className:"shared-floor__layout-actions",role:"group","aria-label":"Island layout",children:[e.jsx("button",{type:"button",onClick:()=>{ye({}),vt({})},children:"Auto-arrange islands"}),e.jsx("small",{children:"Drag an island's backdrop to place it; auto-arrange repacks."})]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox","aria-label":"Work surfaces",checked:y,onChange:t=>ft(t.target.checked)}),"Work surfaces"]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox","aria-label":"Boundaries",checked:L,onChange:t=>gt(t.target.checked)}),"Boundaries"]}),e.jsxs("label",{children:[e.jsx("input",{type:"checkbox","aria-label":"Playful motion",checked:F,onChange:t=>Q(t.target.checked)}),"Playful motion"]}),e.jsxs("label",{children:["Characters",e.jsxs("select",{"aria-label":"Map character style",value:E,onChange:t=>R(t.target.value),children:[e.jsx("option",{value:"crew",children:"Crew"}),e.jsx("option",{value:"chip",children:"Pixel Chip"}),e.jsx("option",{value:"prototype",children:"Prototype rigs"})]})]}),E==="prototype"?e.jsxs("label",{children:[e.jsx("input",{type:"checkbox","aria-label":"Character rig",checked:ht,onChange:t=>At(t.target.checked)}),"Character rig"]}):null,e.jsx("button",{type:"button",onClick:()=>{pt(!0),tt(!1)},children:"Preview character family →"}),e.jsx("button",{type:"button",onClick:()=>{nt(!0),tt(!1)},children:"3D character studio →"}),E==="prototype"?e.jsxs("label",{children:[e.jsx("input",{type:"checkbox","aria-label":"Rendered characters",checked:n,onChange:t=>p(t.target.checked)}),"Rendered characters"]}):null,e.jsx("button",{type:"button",className:"shared-floor__run-link",onClick:()=>{tt(!1),M(!0)},children:"Try Work run →"})]}):null]}),e.jsxs("div",{className:"shared-floor__camera","aria-label":"Map camera",children:[e.jsx("button",{type:"button","aria-pressed":it,onClick:()=>_e(!it),children:it?"Resume":"Pause"}),e.jsx("div",{role:"group","aria-label":"Map projection",children:["flat","iso"].map(t=>e.jsx("button",{type:"button","aria-pressed":z===t,onClick:()=>Ce(t),children:t==="iso"?"Iso":"Flat"},t))}),e.jsx("button",{type:"button","aria-label":"Zoom shared map out",onClick:()=>It(Zt(A.current.zoom,A.current.pan,1/ue)),children:"−"}),e.jsx("button",{type:"button",onClick:()=>It({zoom:1,pan:{x:0,y:0}}),children:"Fit"}),e.jsx("button",{type:"button","aria-label":"Zoom shared map in",onClick:()=>It(Zt(A.current.zoom,A.current.pan,ue)),children:"+"}),e.jsx("output",{className:"shared-floor__zoom-readout","aria-label":`Zoom ${be(B)}`,children:be(B)})]}),e.jsx(De,{width:O,height:W,projection:z,size:et,scale:G,zoom:B,pan:K,onPan:t=>{st(),Lt(Mt(t,A.current.zoom))},onZoom:t=>{st(),Vt(t)},onLocate:t=>It({zoom:A.current.zoom,pan:t}),workspaces:[...H].map(([t,o])=>({id:t,label:`Locate workspace ${o.cwd||"unknown"}, ${o.lanes.length} actors`,x:o.x+o.width/2,y:o.y+o.height/2}))}),X&&H.has(X)?e.jsxs("aside",{className:"shared-floor__workspace-panel","aria-label":"Workspace details",children:[e.jsxs("header",{children:[e.jsx("strong",{children:H.get(X).cwd.split("/").filter(Boolean).at(-1)||"Workspace"}),e.jsx("button",{type:"button","aria-label":"Close workspace details",onClick:()=>Jt(null),children:"×"})]}),e.jsx("p",{children:H.get(X).cwd}),e.jsx("h4",{children:"Reported branches"}),e.jsx("small",{children:[...new Set(H.get(X).lanes.map(t=>t.facts?.branch||Dt(t).branch).filter(Boolean))].join(" · ")||"Branch not reported"}),e.jsx("h4",{children:"Actors in this workspace"}),H.get(X).lanes.map(t=>e.jsxs("button",{className:"shared-floor__workspace-actor",type:"button",onClick:()=>Pt(t),children:[e.jsxs("span",{className:"shared-floor__workspace-actor-heading",children:[e.jsx("strong",{children:Rt(t)}),e.jsx("small",{children:$t(t,i).label})]}),e.jsx("span",{className:"shared-floor__workspace-runtime",children:[t.agent.harness,t.facts?.model||Dt(t).model].filter(Boolean).join(" · ")||"Runtime not reported"}),e.jsx("span",{className:"shared-floor__workspace-task",children:Ge(t.facts?.currentTask)||"No task reported"}),e.jsxs("span",{className:"shared-floor__workspace-runtime",children:[t.facts?.branch||Dt(t).branch||"Branch not reported"," · ",t.id.slice(-5)]})]},t.id))]}):null,e.jsxs("div",{className:"shared-floor__viewport",ref:Tt,onPointerDown:t=>{t.button!==0||t.target.closest("button")||(st(),D.current={x:t.clientX,y:t.clientY,px:A.current.pan.x,py:A.current.pan.y},t.currentTarget.setPointerCapture(t.pointerId))},onPointerMove:t=>{D.current&&Lt(Mt({x:D.current.px+t.clientX-D.current.x,y:D.current.py+t.clientY-D.current.y},B))},onPointerUp:t=>{D.current&&Math.hypot(t.clientX-D.current.x,t.clientY-D.current.y)<4&&(k(null),S(null)),D.current=null},onPointerCancel:()=>{D.current=null},children:[e.jsx(He,{zoom:B,pan:K,beacons:Te,beaconStrength:Kt.beacons}),e.jsxs("div",{className:"shared-floor__benches",style:{opacity:Kt.world,visibility:Kt.world>0?void 0:"hidden",width:O,height:W,transform:`translate(${K.x}px, ${K.y}px) scale(${G})${z==="iso"?" matrix(0.8660254, 0.5, -0.8660254, 0.5, 0, 0)":""}`,marginLeft:-O/2,marginTop:-W/2},children:[e.jsx("svg",{className:"floor-exchange-links",width:O,height:W,"aria-label":"Agent exchange links",children:[...wt].map(([t,o])=>{const c=jt.get(o[0]),s=jt.get(o[1]);if(!c||!s)return null;const f=o.map(u=>{const I=r.find(rt=>rt.id===u);return I?Rt(I):"Actor"}).join(" and "),C=se.some(u=>o.includes(u.from)&&o.includes(u.to)),l=`M ${c.x} ${c.y} Q ${(c.x+s.x)/2} ${Math.min(c.y,s.y)-30} ${s.x} ${s.y}`;return e.jsxs("g",{role:"button",tabIndex:0,"aria-label":`${C?"Open exchanges":"Inspect relationship"} between ${f}`,className:`${C?"is-exchange":"is-family"}${_?.includes(o[0])&&_.includes(o[1])?" is-active":""}`,onPointerDown:u=>u.stopPropagation(),onClick:u=>{u.stopPropagation(),ne(o)},onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),ne(o))},children:[e.jsxs("title",{children:[C?"Recent exchanges":"Parent relationship"," · ",f]}),e.jsx("path",{className:"exchange-line",d:l}),e.jsx("path",{className:"exchange-hit",d:l})]},t)})}),e.jsx(Ze,{broker:x,lanes:r,now:i,positions:jt,paused:it}),kt?e.jsx("svg",{className:"shared-floor__connections",width:O,height:W,"aria-hidden":"true",children:[...bt].map(([t,o])=>{const c=jt.get(t);return c?e.jsx("path",{className:o.reason==="Shared file activity"?"is-shared":"is-lineage",d:`M ${kt.x} ${kt.y} Q ${(kt.x+c.x)/2} ${Math.min(kt.y,c.y)-35} ${c.x} ${c.y}`},t):null})}):null,[...H].map(([t,o])=>{const c=Co(t);return e.jsxs("section",{className:`shared-floor__island${o.actors.length>1||y?" has-place":""}${X===t?" is-open":""}${Qt===t?" is-dragging":""}`,"aria-label":o.cwd||"Agent gathering",style:{left:Et.get(t).x,top:Et.get(t).y,height:Et.get(t).height,width:Et.get(t).width,zIndex:Qt===t?5:void 0},onPointerDown:s=>{if(s.button!==0||s.target.closest("button"))return;const f=s.currentTarget.getBoundingClientRect(),C=(s.clientX-f.left)/f.width-.5,l=(s.clientY-f.top)/f.height-.5;if(C*C+l*l>.25)return;s.stopPropagation(),st();const u={};for(const[I,rt]of H)I!==t&&(u[I]={x:rt.x,y:rt.y});dt.current={key:t,sx:s.clientX,sy:s.clientY,baseX:o.x,baseY:o.y,moved:!1,before:Yt,hold:u},s.currentTarget.setPointerCapture(s.pointerId)},onPointerMove:s=>{const f=dt.current;if(!f||f.key!==t)return;s.stopPropagation();const C=s.clientX-f.sx,l=s.clientY-f.sy;!f.moved&&!no(C,l)||(f.moved=!0,Xt(t),f.last=ao({x:f.baseX,y:f.baseY},C,l,G,z),vt({...f.hold,[t]:f.last}))},onPointerUp:s=>{const f=dt.current;if(!f||f.key!==t)return;if(s.stopPropagation(),dt.current=null,Xt(null),s.currentTarget.hasPointerCapture(s.pointerId)&&s.currentTarget.releasePointerCapture(s.pointerId),!f.moved){k(null),S(null);return}const C={...f.before,[t]:f.last??{x:f.baseX,y:f.baseY}};ye(C),vt(C)},onPointerCancel:()=>{const s=dt.current;!s||s.key!==t||(dt.current=null,Xt(null),vt(s.before))},children:[e.jsxs("div",{className:"shared-floor__place-presentation",children:[e.jsx("div",{className:"shared-floor__sky","aria-hidden":"true",style:{backgroundImage:`url(${_o})`,backgroundPosition:c.skyPosition}}),e.jsx("div",{className:"shared-floor__outpost","aria-hidden":"true",style:{backgroundImage:`url(${Mo})`,backgroundPosition:c.outpostPosition}}),e.jsx("span",{className:"shared-floor__label-anchor","aria-hidden":"true"}),e.jsxs("button",{type:"button",className:"shared-floor__gathering-label","aria-expanded":X===t,onPointerDown:s=>s.stopPropagation(),onClick:()=>Jt(X===t?null:t),children:[e.jsx("strong",{children:o.cwd==="~"?"Home":o.cwd.split("/").filter(Boolean).at(-1)||"Unassigned"}),e.jsx("small",{children:o.cwd||"Workspace not reported"})]})]}),y?e.jsxs("div",{className:"shared-floor__optional-table",children:[e.jsx("span",{children:o.cwd.split("/").filter(Boolean).at(-1)||"Workspace"}),e.jsx("div",{children:pe(o.lanes).slice(0,4).map(s=>e.jsxs("button",{type:"button",title:s.path,"aria-label":`Preview ${s.path}`,disabled:!s.resolvedPath,onClick:()=>s.resolvedPath&&d(s.resolvedPath),children:[e.jsx(oo,{size:25}),e.jsx("small",{children:s.path.split("/").at(-1)})]},s.id))})]}):null,e.jsx("div",{className:"shared-floor__crew",children:o.actors.map(({lane:s,x:f,y:C})=>e.jsxs("div",{className:`shared-floor__wanderer${g===s.id?" is-selected":""}${T.includes(s.id)?" is-pinned":""}${oe.has(s.id)?" is-connected":""}${q===s.id?" is-speaking":""}`,style:{left:f+(yt[s.id]?.x??0),top:C+(yt[s.id]?.y??0),zIndex:zt===s.id?10:T.includes(s.id)?7+T.indexOf(s.id):void 0},"data-dragging":zt===s.id||void 0,onPointerDown:l=>{if(l.button!==0)return;if(l.shiftKey||l.altKey||l.metaKey||l.ctrlKey){l.stopPropagation(),lt.current=!0;const I=l.currentTarget.getBoundingClientRect();P({lane:s,x:I.left+I.width/2,y:I.bottom+32,compose:!0,voice:l.shiftKey});return}l.stopPropagation(),lt.current=!1;const u=yt[s.id]??{x:0,y:0};ct.current={id:s.id,sx:l.clientX,sy:l.clientY,...u,baseX:o.x+f,baseY:o.y+C,moved:!1},l.currentTarget.setPointerCapture(l.pointerId)},onPointerMove:l=>{const u=ct.current;if(!u||u.id!==s.id)return;l.stopPropagation();const I=l.clientX-u.sx,rt=l.clientY-u.sy;if(!u.moved&&Math.hypot(I,rt)<5)return;u.moved=!0,Ht(s.id);const de=we(I/G,rt/G,z);Se(ve=>({...ve,[s.id]:{x:Math.max(0,Math.min(O-84,u.baseX+u.x+de.x))-u.baseX,y:Math.max(20,Math.min(W-120,u.baseY+u.y+de.y))-u.baseY}}))},onPointerUp:l=>{ct.current?.id===s.id&&(l.stopPropagation(),ct.current.moved||le(s),lt.current=!0,ct.current=null,Ht(null),l.currentTarget.hasPointerCapture(l.pointerId)&&l.currentTarget.releasePointerCapture(l.pointerId))},onContextMenu:l=>{l.preventDefault(),l.stopPropagation();const u=l.currentTarget.getBoundingClientRect();P({lane:s,x:u.left+u.width/2,y:u.bottom+32,compose:!1})},onPointerCancel:()=>{ct.current=null,lt.current=!0,Ht(null)},onClickCapture:l=>{lt.current&&(l.stopPropagation(),lt.current=!1)},children:[w===s.id?e.jsxs("span",{className:"shared-floor__talk-follow",title:"Message accepted · following observed agent status",children:["↗ You ",e.jsx("span",{children:$t(s,i).label})]}):null,e.jsx(to,{crewSlug:E!=="prototype"?v.current[s.id]:void 0,pixelCrew:E==="chip",rigged:ht,lane:s,now:i,paused:it||zt===s.id,playful:F,character:n?he[m.current.indexOf(s.id)]:void 0,displayName:eo(s.agent)?s.agent.harness||"Agent":void 0,pinned:T.includes(s.id),onActor:le})]},s.id))})]},t)})]})]})]})}export{Gs as SharedWorkFloor};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/scss-D5BDwBP9.js","assets/css-CLj8gQPS.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/ruby-B13GW9FM.js","assets/sql-CRqJ_cUM.js","assets/typescript-BPQ3VLAy.js","assets/jsx-g9-lgVsj.js","assets/tsx-COt5Ahok.js","assets/cpp-DIPi6g--.js","assets/c-BIGW1oBm.js","assets/shellscript-Yzrsuije.js","assets/yaml-Buea-lGh.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as X,j as J,_ as C}from"./index-EsrkGBcv.js";var R=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Rn(t){return tt(t)}function tt(t){return Array.isArray(t)?An(t):t instanceof RegExp?t:typeof t=="object"?En(t):t}function An(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=tt(t[n]);return e}function En(t){let e={};for(let n in t)e[n]=tt(t[n]);return e}function Mt(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function Bt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Bt(t.substring(0,t.length-1)):t.substr(~e+1)}var Oe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,le=class{static hasCaptures(t){return t===null?!1:(Oe.lastIndex=0,Oe.test(t))}static replaceCaptures(t,e,n){return t.replace(Oe,(r,s,o,i)=>{let l=n[parseInt(s||o,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(i){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Dt(t,e){return t<e?-1:t>e?1:0}function Gt(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let o=Dt(t[s],e[s]);if(o!==0)return o}return 0}return n-r}function ut(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function jt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},pe=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Ln(t),e)}static createFromParsedTheme(t,e){return In(t,e)}_cachedMatchRoot=new $t(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(s=>Tn(t.parent,s.parentScopes));return r?new Ut(r.fontStyle,r.foreground,r.background):null}},Me=class fe{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new fe(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new fe(n,e[r]);return n}push(e){return new fe(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Tn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}for(;t&&!Pn(t.scopeName,r);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Pn(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Ut=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Ln(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,o=e.length;s<o;s++){let i=e[s];if(!i.settings)continue;let l;if(typeof i.scope=="string"){let h=i.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let h=i.settings.fontStyle.split(" ");for(let p=0,f=h.length;p<f;p++)switch(h[p]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof i.settings.foreground=="string"&&ut(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&ut(i.settings.background)&&(u=i.settings.background);for(let h=0,p=l.length;h<p;h++){let d=l[h].trim().split(" "),S=d[d.length-1],y=null;d.length>1&&(y=d.slice(0,d.length-1),y.reverse()),n[r++]=new xn(S,y,s,a,c,u)}}return n}var xn=class{constructor(t,e,n,r,s,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}},I=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(I||{});function In(t,e){t.sort((a,c)=>{let u=Dt(a.scope,c.scope);return u!==0||(u=Gt(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,r="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let a=t.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(s=a.background)}let o=new Nn(e),i=new Ut(n,o.getId(r),o.getId(s)),l=new Mn(new Fe(0,null,-1,0,0),[]);for(let a=0,c=t.length;a<c;a++){let u=t[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new pe(o,i,l)}var Nn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},On=Object.freeze([]),Fe=class Ft{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,o){this.scopeDepth=e,this.parentScopes=n||On,this.fontStyle=r,this.foreground=s,this.background=o}clone(){return new Ft(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},Mn=class We{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=n.parentScopes.length);){const o=n.parentScopes[s].length-e.parentScopes[r].length;if(o!==0)return o;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,o;if(r===-1?(s=e,o=""):(s=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(We._cmpBySpecificity),n}insert(e,n,r,s,o,i){if(n===""){this._doInsertHere(e,r,s,o,i);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new We(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,s,o,i)}_doInsertHere(e,n,r,s,o){if(n===null){this._mainRule.acceptOverwrite(e,r,s,o);return}for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let a=this._rulesWithParentScopes[i];if(Gt(a.parentScopes,n)===0){a.acceptOverwrite(e,r,s,o);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,n,r,s,o))}},z=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=B.getLanguageId(e),r=B.getTokenType(e),s=B.getFontStyle(e),o=B.getForeground(e),i=B.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:o,background:i})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,o,i,l){let a=B.getLanguageId(e),c=B.getTokenType(e),u=B.containsBalancedBrackets(e)?1:0,h=B.getFontStyle(e),p=B.getForeground(e),f=B.getBackground(e);return n!==0&&(a=n),r!==8&&(c=r),s!==null&&(u=s?1:0),o!==-1&&(h=o),i!==0&&(p=i),l!==0&&(f=l),(a<<0|c<<8|u<<10|h<<11|p<<15|f<<24)>>>0}};function ge(t,e){const n=[],r=Bn(t);let s=r.next();for(;s!==null;){let a=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let c=i();if(n.push({matcher:c,priority:a}),s!==",")break;s=r.next()}return n;function o(){if(s==="-"){s=r.next();const a=o();return c=>!!a&&!a(c)}if(s==="("){s=r.next();const a=l();return s===")"&&(s=r.next()),a}if(ht(s)){const a=[];do a.push(s),s=r.next();while(ht(s));return c=>e(a,c)}return null}function i(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(h=>h(u))}function l(){const a=[];let c=i();for(;c&&(a.push(c),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");c=i()}return u=>a.some(h=>h(u))}}function ht(t){return!!t&&!!t.match(/[\w\.:]+/)}function Bn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function Wt(t){typeof t.dispose=="function"&&t.dispose()}var te=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Dn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Gn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},jn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new te(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Gn;for(const n of t)$n(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof te){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function $n(t,e,n,r){const s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof te?de({baseGrammar:o,selfGrammar:s},r):ze(t.ruleName,{baseGrammar:o,selfGrammar:s,repository:s.repository},r);const i=n.injections(t.scopeName);if(i)for(const l of i)r.add(new te(l))}function ze(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];me([r],e,n)}}function de(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&me(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&me(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function me(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const s=r.repository?Mt({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&me(r.patterns,{...e,repository:s},n);const o=r.include;if(!o)continue;const i=zt(o);switch(i.kind){case 0:de({...e,selfGrammar:e.baseGrammar},n);break;case 1:de(e,n);break;case 2:ze(i.ruleName,{...e,repository:s},n);break;case 3:case 4:const l=i.scopeName===e.selfGrammar.scopeName?e.selfGrammar:i.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:s};i.kind===4?ze(i.ruleName,a,n):de(a,n)}else i.kind===4?n.add(new Dn(i.scopeName,i.ruleName)):n.add(new te(i.scopeName));break}}}var Un=class{kind=0},Fn=class{kind=1},Wn=class{constructor(t){this.ruleName=t}kind=2},zn=class{constructor(t){this.scopeName=t}kind=3},Hn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function zt(t){if(t==="$base")return new Un;if(t==="$self")return new Fn;const e=t.indexOf("#");if(e===-1)return new zn(t);if(e===0)return new Wn(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new Hn(n,r)}}var Vn=/\\(\d+)/,ft=/\\(\d+)/g,qn=-1,Ht=-2;var oe=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=le.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=le.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Bt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:le.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:le.replaceCaptures(this._contentName,t,e)}},Kn=class extends oe{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},Yn=class extends oe{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null),this._match=new ne(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},dt=class extends oe{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},He=class extends oe{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,o,i,l,a,c){super(t,e,n,r),this._begin=new ne(s,this.id),this.beginCaptures=o,this._end=new ne(i||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},_e=class extends oe{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,o,i,l,a){super(t,e,n,r),this._begin=new ne(s,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new ne(i,Ht),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Vt=class x{static createCaptureRule(e,n,r,s,o){return e.registerRule(i=>new Kn(n,i,r,s,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(s=>{if(e.id=s,e.match)return new Yn(e.$vscodeTextmateLocation,e.id,e.name,e.match,x._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=Mt({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new dt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,x._compilePatterns(o,n,r))}return e.while?new _e(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,x._compileCaptures(e.whileCaptures||e.captures,n,r),x._compilePatterns(e.patterns,n,r)):new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,x._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,x._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let s=[];if(e){let o=0;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);l>o&&(o=l)}for(let i=0;i<=o;i++)s[i]=null;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);let a=0;e[i].patterns&&(a=x.getCompiledRuleId(e[i],n,r)),s[l]=x.createCaptureRule(n,e[i].$vscodeTextmateLocation,e[i].name,e[i].contentName,a)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let o=0,i=e.length;o<i;o++){const l=e[o];let a=-1;if(l.include){const c=zt(l.include);switch(c.kind){case 0:case 1:a=x.getCompiledRuleId(r[l.include],n,r);break;case 2:let u=r[c.ruleName];u&&(a=x.getCompiledRuleId(u,n,r));break;case 3:case 4:const h=c.scopeName,p=c.kind===4?c.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(p){let d=f.repository[p];d&&(a=x.getCompiledRuleId(d,n,f.repository))}else a=x.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else a=x.getCompiledRuleId(l,n,r);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof dt||c instanceof He||c instanceof _e)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;s.push(a)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},ne=class qt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let s=0,o=[],i=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(o.push(e.substring(s,l)),o.push("$(?!\\n)(?<!\\n)"),s=l+2):(c==="A"||c==="G")&&(i=!0),l++}this.hasAnchor=i,s===0?this.source=e:(o.push(e.substring(s,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Vn.test(this.source):this.hasBackReferences=!1}clone(){return new qt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(s=>e.substring(s.start,s.end));return ft.lastIndex=0,this.source.replace(ft,(s,o)=>jt(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],o,i,l,a;for(o=0,i=this.source.length;o<i;o++)l=this.source.charAt(o),e[o]=l,n[o]=l,r[o]=l,s[o]=l,l==="\\"&&o+1<i&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="",n[o+1]="",r[o+1]="A",s[o+1]="A"):a==="G"?(e[o+1]="",n[o+1]="G",r[o+1]="",s[o+1]="G"):(e[o+1]=a,n[o+1]=a,r[o+1]=a,s[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new pt(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(s=>s.resolveAnchors(e,n));return new pt(t,r,this._items.map(s=>s.ruleId))}},pt=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
2
|
+
import{r as X,j as J,_ as C}from"./index-BFbLvCJn.js";var R=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Rn(t){return tt(t)}function tt(t){return Array.isArray(t)?An(t):t instanceof RegExp?t:typeof t=="object"?En(t):t}function An(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=tt(t[n]);return e}function En(t){let e={};for(let n in t)e[n]=tt(t[n]);return e}function Mt(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function Bt(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Bt(t.substring(0,t.length-1)):t.substr(~e+1)}var Oe=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,le=class{static hasCaptures(t){return t===null?!1:(Oe.lastIndex=0,Oe.test(t))}static replaceCaptures(t,e,n){return t.replace(Oe,(r,s,o,i)=>{let l=n[parseInt(s||o,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(i){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Dt(t,e){return t<e?-1:t>e?1:0}function Gt(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let o=Dt(t[s],e[s]);if(o!==0)return o}return 0}return n-r}function ut(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function jt(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var $t=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},pe=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(Ln(t),e)}static createFromParsedTheme(t,e){return In(t,e)}_cachedMatchRoot=new $t(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(s=>Tn(t.parent,s.parentScopes));return r?new Ut(r.fontStyle,r.foreground,r.background):null}},Me=class fe{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new fe(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new fe(n,e[r]);return n}push(e){return new fe(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Tn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}for(;t&&!Pn(t.scopeName,r);){if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Pn(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Ut=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function Ln(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,o=e.length;s<o;s++){let i=e[s];if(!i.settings)continue;let l;if(typeof i.scope=="string"){let h=i.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let h=i.settings.fontStyle.split(" ");for(let p=0,f=h.length;p<f;p++)switch(h[p]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof i.settings.foreground=="string"&&ut(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&ut(i.settings.background)&&(u=i.settings.background);for(let h=0,p=l.length;h<p;h++){let d=l[h].trim().split(" "),S=d[d.length-1],y=null;d.length>1&&(y=d.slice(0,d.length-1),y.reverse()),n[r++]=new xn(S,y,s,a,c,u)}}return n}var xn=class{constructor(t,e,n,r,s,o){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}},I=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(I||{});function In(t,e){t.sort((a,c)=>{let u=Dt(a.scope,c.scope);return u!==0||(u=Gt(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,r="#000000",s="#ffffff";for(;t.length>=1&&t[0].scope==="";){let a=t.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(s=a.background)}let o=new Nn(e),i=new Ut(n,o.getId(r),o.getId(s)),l=new Mn(new Fe(0,null,-1,0,0),[]);for(let a=0,c=t.length;a<c;a++){let u=t[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new pe(o,i,l)}var Nn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},On=Object.freeze([]),Fe=class Ft{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,o){this.scopeDepth=e,this.parentScopes=n||On,this.fontStyle=r,this.foreground=s,this.background=o}clone(){return new Ft(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},Mn=class We{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=n.parentScopes.length);){const o=n.parentScopes[s].length-e.parentScopes[r].length;if(o!==0)return o;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,o;if(r===-1?(s=e,o=""):(s=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(We._cmpBySpecificity),n}insert(e,n,r,s,o,i){if(n===""){this._doInsertHere(e,r,s,o,i);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new We(this._mainRule.clone(),Fe.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,s,o,i)}_doInsertHere(e,n,r,s,o){if(n===null){this._mainRule.acceptOverwrite(e,r,s,o);return}for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let a=this._rulesWithParentScopes[i];if(Gt(a.parentScopes,n)===0){a.acceptOverwrite(e,r,s,o);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new Fe(e,n,r,s,o))}},z=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=B.getLanguageId(e),r=B.getTokenType(e),s=B.getFontStyle(e),o=B.getForeground(e),i=B.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:o,background:i})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,o,i,l){let a=B.getLanguageId(e),c=B.getTokenType(e),u=B.containsBalancedBrackets(e)?1:0,h=B.getFontStyle(e),p=B.getForeground(e),f=B.getBackground(e);return n!==0&&(a=n),r!==8&&(c=r),s!==null&&(u=s?1:0),o!==-1&&(h=o),i!==0&&(p=i),l!==0&&(f=l),(a<<0|c<<8|u<<10|h<<11|p<<15|f<<24)>>>0}};function ge(t,e){const n=[],r=Bn(t);let s=r.next();for(;s!==null;){let a=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let c=i();if(n.push({matcher:c,priority:a}),s!==",")break;s=r.next()}return n;function o(){if(s==="-"){s=r.next();const a=o();return c=>!!a&&!a(c)}if(s==="("){s=r.next();const a=l();return s===")"&&(s=r.next()),a}if(ht(s)){const a=[];do a.push(s),s=r.next();while(ht(s));return c=>e(a,c)}return null}function i(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(h=>h(u))}function l(){const a=[];let c=i();for(;c&&(a.push(c),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");c=i()}return u=>a.some(h=>h(u))}}function ht(t){return!!t&&!!t.match(/[\w\.:]+/)}function Bn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function Wt(t){typeof t.dispose=="function"&&t.dispose()}var te=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Dn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Gn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},jn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new te(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new Gn;for(const n of t)$n(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof te){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function $n(t,e,n,r){const s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=n.lookup(e);t instanceof te?de({baseGrammar:o,selfGrammar:s},r):ze(t.ruleName,{baseGrammar:o,selfGrammar:s,repository:s.repository},r);const i=n.injections(t.scopeName);if(i)for(const l of i)r.add(new te(l))}function ze(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];me([r],e,n)}}function de(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&me(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&me(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function me(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const s=r.repository?Mt({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&me(r.patterns,{...e,repository:s},n);const o=r.include;if(!o)continue;const i=zt(o);switch(i.kind){case 0:de({...e,selfGrammar:e.baseGrammar},n);break;case 1:de(e,n);break;case 2:ze(i.ruleName,{...e,repository:s},n);break;case 3:case 4:const l=i.scopeName===e.selfGrammar.scopeName?e.selfGrammar:i.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:s};i.kind===4?ze(i.ruleName,a,n):de(a,n)}else i.kind===4?n.add(new Dn(i.scopeName,i.ruleName)):n.add(new te(i.scopeName));break}}}var Un=class{kind=0},Fn=class{kind=1},Wn=class{constructor(t){this.ruleName=t}kind=2},zn=class{constructor(t){this.scopeName=t}kind=3},Hn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function zt(t){if(t==="$base")return new Un;if(t==="$self")return new Fn;const e=t.indexOf("#");if(e===-1)return new zn(t);if(e===0)return new Wn(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new Hn(n,r)}}var Vn=/\\(\d+)/,ft=/\\(\d+)/g,qn=-1,Ht=-2;var oe=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=le.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=le.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Bt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:le.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:le.replaceCaptures(this._contentName,t,e)}},Kn=class extends oe{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,n,r){throw new Error("Not supported!")}},Yn=class extends oe{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null),this._match=new ne(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},dt=class extends oe{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},He=class extends oe{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,o,i,l,a,c){super(t,e,n,r),this._begin=new ne(s,this.id),this.beginCaptures=o,this._end=new ne(i||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},_e=class extends oe{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,o,i,l,a){super(t,e,n,r),this._begin=new ne(s,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new ne(i,Ht),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Vt=class x{static createCaptureRule(e,n,r,s,o){return e.registerRule(i=>new Kn(n,i,r,s,o))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(s=>{if(e.id=s,e.match)return new Yn(e.$vscodeTextmateLocation,e.id,e.name,e.match,x._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=Mt({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new dt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,x._compilePatterns(o,n,r))}return e.while?new _e(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,x._compileCaptures(e.whileCaptures||e.captures,n,r),x._compilePatterns(e.patterns,n,r)):new He(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,x._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,x._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let s=[];if(e){let o=0;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);l>o&&(o=l)}for(let i=0;i<=o;i++)s[i]=null;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);let a=0;e[i].patterns&&(a=x.getCompiledRuleId(e[i],n,r)),s[l]=x.createCaptureRule(n,e[i].$vscodeTextmateLocation,e[i].name,e[i].contentName,a)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let o=0,i=e.length;o<i;o++){const l=e[o];let a=-1;if(l.include){const c=zt(l.include);switch(c.kind){case 0:case 1:a=x.getCompiledRuleId(r[l.include],n,r);break;case 2:let u=r[c.ruleName];u&&(a=x.getCompiledRuleId(u,n,r));break;case 3:case 4:const h=c.scopeName,p=c.kind===4?c.ruleName:null,f=n.getExternalGrammar(h,r);if(f)if(p){let d=f.repository[p];d&&(a=x.getCompiledRuleId(d,n,f.repository))}else a=x.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else a=x.getCompiledRuleId(l,n,r);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof dt||c instanceof He||c instanceof _e)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;s.push(a)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},ne=class qt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e=="string"){const r=e.length;let s=0,o=[],i=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(o.push(e.substring(s,l)),o.push("$(?!\\n)(?<!\\n)"),s=l+2):(c==="A"||c==="G")&&(i=!0),l++}this.hasAnchor=i,s===0?this.source=e:(o.push(e.substring(s,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Vn.test(this.source):this.hasBackReferences=!1}clone(){return new qt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(s=>e.substring(s.start,s.end));return ft.lastIndex=0,this.source.replace(ft,(s,o)=>jt(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],o,i,l,a;for(o=0,i=this.source.length;o<i;o++)l=this.source.charAt(o),e[o]=l,n[o]=l,r[o]=l,s[o]=l,l==="\\"&&o+1<i&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="",n[o+1]="",r[o+1]="A",s[o+1]="A"):a==="G"?(e[o+1]="",n[o+1]="G",r[o+1]="",s[o+1]="G"):(e[o+1]=a,n[o+1]=a,r[o+1]=a,s[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new pt(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(s=>s.resolveAnchors(e,n));return new pt(t,r,this._items.map(s=>s.ruleId))}},pt=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
3
3
|
`)}findNextMatchSync(t,e,n){const r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Be=class{constructor(t,e){this.languageId=t,this.tokenType=e}},Xn=class Ve{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new Be(e,8),this._embeddedLanguagesMatcher=new Jn(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Ve._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Be(0,0);_getBasicScopeAttributes=new $t(e=>{const n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Be(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(Ve.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Jn=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,r])=>jt(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},gt=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Kt(t,e,n,r,s,o,i,l){const a=e.content.length;let c=!1,u=-1;if(i){const f=Qn(t,e,n,r,s,o);s=f.stack,r=f.linePos,n=f.isFirstLine,u=f.anchorPosition}const h=Date.now();for(;!c;){if(l!==0&&Date.now()-h>l)return new gt(s,!0);p()}return new gt(s,!1);function p(){const f=Zn(t,e,n,r,s,u);if(!f){o.produce(s,a),c=!0;return}const d=f.captureIndices,S=f.matchedRuleId,y=d&&d.length>0?d[0].end>r:!1;if(S===qn){const _=s.getRule(t);o.produce(s,d[0].start),s=s.withContentNameScopesList(s.nameScopesList),Z(t,e,n,s,o,_.endCaptures,d),o.produce(s,d[0].end);const m=s;if(s=s.parent,u=m.getAnchorPos(),!y&&m.getEnterPos()===r){s=m,o.produce(s,a),c=!0;return}}else{const _=t.getRule(S);o.produce(s,d[0].start);const m=s,b=_.getName(e.content,d),k=s.contentNameScopesList.pushAttributed(b,t);if(s=s.push(S,r,u,d[0].end===a,null,k,k),_ instanceof He){const E=_;Z(t,e,n,s,o,E.beginCaptures,d),o.produce(s,d[0].end),u=d[0].end;const N=E.getContentName(e.content,d),$=k.pushAttributed(N,t);if(s=s.withContentNameScopesList($),E.endHasBackReferences&&(s=s.withEndRule(E.getEndWithResolvedBackReferences(e.content,d))),!y&&m.hasSameRuleAs(s)){s=s.pop(),o.produce(s,a),c=!0;return}}else if(_ instanceof _e){const E=_;Z(t,e,n,s,o,E.beginCaptures,d),o.produce(s,d[0].end),u=d[0].end;const N=E.getContentName(e.content,d),$=k.pushAttributed(N,t);if(s=s.withContentNameScopesList($),E.whileHasBackReferences&&(s=s.withEndRule(E.getWhileWithResolvedBackReferences(e.content,d))),!y&&m.hasSameRuleAs(s)){s=s.pop(),o.produce(s,a),c=!0;return}}else if(Z(t,e,n,s,o,_.captures,d),o.produce(s,d[0].end),s=s.pop(),!y){s=s.safePop(),o.produce(s,a),c=!0;return}}d[0].end>r&&(r=d[0].end,n=!1)}}function Qn(t,e,n,r,s,o){let i=s.beginRuleCapturedEOL?0:-1;const l=[];for(let a=s;a;a=a.pop()){const c=a.getRule(t);c instanceof _e&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=nr(a.rule,t,a.stack.endRule,n,r===i),h=c.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==Ht){s=a.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(o.produce(a.stack,h.captureIndices[0].start),Z(t,e,n,a.stack,o,a.rule.whileCaptures,h.captureIndices),o.produce(a.stack,h.captureIndices[0].end),i=h.captureIndices[0].end,h.captureIndices[0].end>r&&(r=h.captureIndices[0].end,n=!1))}else{s=a.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:i,isFirstLine:n}}function Zn(t,e,n,r,s,o){const i=er(t,e,n,r,s,o),l=t.getInjections();if(l.length===0)return i;const a=tr(l,t,e,n,r,s,o);if(!a)return i;if(!i)return a;const c=i.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:i}function er(t,e,n,r,s,o){const i=s.getRule(t),{ruleScanner:l,findOptions:a}=Yt(i,t,s.endRule,n,r===o),c=l.findNextMatchSync(e,r,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function tr(t,e,n,r,s,o,i){let l=Number.MAX_VALUE,a=null,c,u=0;const h=o.contentNameScopesList.getScopeNames();for(let p=0,f=t.length;p<f;p++){const d=t[p];if(!d.matcher(h))continue;const S=e.getRule(d.ruleId),{ruleScanner:y,findOptions:_}=Yt(S,e,null,r,s===i),m=y.findNextMatchSync(n,s,_);if(!m)continue;const b=m.captureIndices[0].start;if(!(b>=l)&&(l=b,a=m.captureIndices,c=m.ruleId,u=d.priority,l===s))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function Yt(t,e,n,r,s){return{ruleScanner:t.compileAG(e,n,r,s),findOptions:0}}function nr(t,e,n,r,s){return{ruleScanner:t.compileWhileAG(e,n,r,s),findOptions:0}}function Z(t,e,n,r,s,o,i){if(o.length===0)return;const l=e.content,a=Math.min(o.length,i.length),c=[],u=i[0].end;for(let h=0;h<a;h++){const p=o[h];if(p===null)continue;const f=i[h];if(f.length===0)continue;if(f.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=f.start;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?s.produceFromScopes(c[c.length-1].scopes,f.start):s.produce(r,f.start),p.retokenizeCapturedWithRuleId){const S=p.getName(l,i),y=r.contentNameScopesList.pushAttributed(S,t),_=p.getContentName(l,i),m=y.pushAttributed(_,t),b=r.push(p.retokenizeCapturedWithRuleId,f.start,-1,!1,null,y,m),k=t.createOnigString(l.substring(0,f.end));Kt(t,k,n&&f.start===0,f.start,b,s,!1,0),Wt(k);continue}const d=p.getName(l,i);if(d!==null){const y=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(d,t);c.push(new rr(y,f.end))}}for(;c.length>0;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var rr=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function sr(t,e,n,r,s,o,i,l){return new ir(t,e,n,r,s,o,i,l)}function mt(t,e,n,r,s){const o=ge(e,ye),i=Vt.getCompiledRuleId(n,r,s.repository);for(const l of o)t.push({debugSelector:e,matcher:l.matcher,ruleId:i,grammar:s,priority:l.priority})}function ye(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let s=n;s<e.length;s++)if(or(e[s],r))return n=s+1,!0;return!1})}function or(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var ir=class{constructor(t,e,n,r,s,o,i,l){if(this._rootScopeName=t,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new Xn(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=_t(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const a of Object.keys(s)){const c=ge(a,ye);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[a]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){const s=r.injections;if(s)for(let i in s)mt(e,i,s[i],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(i=>{const l=this.getExternalGrammar(i);if(l){const a=l.injectionSelector;a&&mt(e,a,l,this,l)}})}return e.sort((s,o)=>s.priority-o.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=_t(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){const r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=Vt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!e||e===qe.NULL){s=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=z.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),p=this.getRule(this._rootId).getName(null,null);let f;p?f=ee.createRootAndLookUpScopeName(p,h,this):f=ee.createRoot("unknown",h),e=new qe(null,this._rootId,-1,-1,!1,null,f,f)}else s=!1,e.reset();t=t+`
|
|
4
4
|
`;const o=this.createOnigString(t),i=o.content.length,l=new lr(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Kt(this,o,s,0,e,l,!0,r);return Wt(o),{lineLength:i,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function _t(t,e){return t=Rn(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var ee=class D{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,s=e?.scopePath??null;for(const o of n)s=Me.push(s,o.scopeNames),r=new D(r,s,o.encodedTokenAttributes);return r}static createRoot(e,n){return new D(null,new Me(null,e),n)}static createRootAndLookUpScopeName(e,n,r){const s=r.getMetadataForScope(e),o=new Me(null,e),i=r.themeProvider.themeMatch(o),l=D.mergeAttributes(n,s,i);return new D(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return D.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let s=-1,o=0,i=0;return r!==null&&(s=r.fontStyle,o=r.foregroundId,i=r.backgroundId),z.set(e,n.languageId,n.tokenType,null,s,o,i)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return D._pushAttributed(this,e,n);const r=e.split(/ /g);let s=this;for(const o of r)s=D._pushAttributed(s,o,n);return s}static _pushAttributed(e,n,r){const s=r.getMetadataForScope(n),o=e.scopePath.push(n),i=r.themeProvider.themeMatch(o),l=D.mergeAttributes(e.tokenAttributes,s,i);return new D(e,o,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},qe=class F{constructor(e,n,r,s,o,i,l,a){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new F(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:F._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?ee.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){F._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,s,o,i,l){return new F(this,e,n,r,s,o,i,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new F(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){const r=ee.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new F(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,ee.fromExtension(r,n.contentNameScopesList))}},ar=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ge(n,ye).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>ge(n,ye).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},lr=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=t?.getScopeNames()??[];for(const i of this._tokenTypeOverrides)i.matcher(o)&&(r=z.set(r,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(o))}if(s&&(r=z.set(r,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}const n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},cr=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,s){if(!this._grammars.has(t)){let o=this._rawGrammars.get(t);if(!o)return null;this._grammars.set(t,sr(t,o,e,n,r,s,this,this._onigLib))}return this._grammars.get(t)}},ur=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new cr(pe.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(pe.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,r){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,n,r){return this._loadGrammar(e,n,r.embeddedLanguages,r.tokenTypes,new ar(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,r,s,o){const i=new jn(this._syncRegistry,e);for(;i.Q.length>0;)i.Q.map(l=>this._loadSingleGrammar(l.scopeName)),i.processQueue();return this._grammarForScopeName(e,n,r,s,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(e,n=[],r=0,s=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,r,s)}_grammarForScopeName(e,n=0,r=null,s=null,o=null){return this._syncRegistry.grammarForScopeName(e,n,r,s,o)}},Ke=qe.NULL;function be(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(const[s,o]of Object.entries(e?.colorReplacements||{}))typeof o=="string"?n[s]=o:s===r&&Object.assign(n,o);return n}function U(t,e){return t&&(e?.[t?.toLowerCase()]||t)}function hr(t){return Array.isArray(t)?t:[t]}async function Xt(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function ke(t){return!t||["plaintext","txt","text","plain"].includes(t)}function fr(t){return t==="ansi"||ke(t)}function Re(t){return t==="none"}function dr(t){return Re(t)}const pr=/(\r?\n)/g;function Ae(t,e=!1){if(t.length===0)return[["",0]];const n=t.split(pr);let r=0;const s=[];for(let o=0;o<n.length;o+=2){const i=e?n[o]+(n[o+1]||""):n[o];s.push([i,r]),r+=n[o].length,r+=n[o+1]?.length||0}return s}const yt={light:"#333333",dark:"#bbbbbb"},bt={light:"#fffffe",dark:"#1e1e1e"},St="__shiki_resolved";function nt(t){if(t?.[St])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){const l=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;l?.settings?.foreground&&(r=l.settings.foreground),l?.settings?.background&&(n=l.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?yt.light:yt.dark),n||(n=e.type==="light"?bt.light:bt.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0;const o=new Map;function i(l){if(o.has(l))return o.get(l);s+=1;const a=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?i(l):(o.set(l,a),a)}e.settings=e.settings.map(l=>{const a=l.settings?.foreground&&!l.settings.foreground.startsWith("#"),c=l.settings?.background&&!l.settings.background.startsWith("#");if(!a&&!c)return l;const u={...l,settings:{...l.settings}};if(a){const h=i(l.settings.foreground);e.colorReplacements[h]=l.settings.foreground,u.settings.foreground=h}if(c){const h=i(l.settings.background);e.colorReplacements[h]=l.settings.background,u.settings.background=h}return u});for(const l of Object.keys(e.colors||{}))if((l==="editor.foreground"||l==="editor.background"||l.startsWith("terminal.ansi"))&&!e.colors[l]?.startsWith("#")){const a=i(e.colors[l]);e.colorReplacements[a]=e.colors[l],e.colors[l]=a}return Object.defineProperty(e,St,{enumerable:!1,writable:!1,value:!0}),e}async function Jt(t){return[...new Set((await Promise.all(t.filter(e=>!fr(e)).map(async e=>await Xt(e).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Qt(t){return(await Promise.all(t.map(async e=>dr(e)?null:nt(await Xt(e))))).filter(e=>!!e)}function Zt(t,e){if(!e)return t;if(e[t]){const n=new Set([t]);for(;e[t];){if(t=e[t],n.has(t))throw new R(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var gr=class extends ur{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t),this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const e=nt(t);return e.name&&(this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null),e}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);e||(e=pe.createFromRawTheme(t),this._textmateThemeCache.set(t,e)),this._syncRegistry.setTheme(e)}getGrammar(t){return t=Zt(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const e=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases&&t.aliases.forEach(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,e.size)for(const s of e)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const r of t)this.resolveEmbeddedLanguages(r);const e=[...this._langGraph.entries()],n=e.filter(([r,s])=>!s);if(n.length){const r=e.filter(([s,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(i=>n.map(([l])=>l).includes(i)):!1).filter(s=>!n.includes(s));throw new R(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${r.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[r,s]of e)this._resolver.addLanguage(s);for(const[r,s]of e)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const e=t.embeddedLanguages??t.embeddedLangs;if(e)for(const n of e)this._langGraph.set(n,this._langMap.get(n))}},mr=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},e.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(e=>{this._langs.set(e,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(e=>{this._injections.get(e)||this._injections.set(e,[]),this._injections.get(e).push(t.scopeName)})}getInjections(t){const e=t.split(".");let n=[];for(let r=1;r<=e.length;r++){const s=e.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}};let Q=0;function _r(t){Q+=1,t.warnings!==!1&&Q>=10&&Q%10===0&&console.warn(`[Shiki] ${Q} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new R("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(nt),s=new gr(new mr(t.engine,n),r,n,t.langAlias);let o;function i(m){return Zt(m,t.langAlias)}function l(m){y();const b=s.getGrammar(typeof m=="string"?m:m.name);if(!b)throw new R(`Language \`${m}\` not found, you may need to load it first`);return b}function a(m){if(m==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();const b=s.getTheme(m);if(!b)throw new R(`Theme \`${m}\` not found, you may need to load it first`);return b}function c(m){y();const b=a(m);return o!==m&&(s.setTheme(b),o=m),{theme:b,colorMap:s.getColorMap()}}function u(){return y(),s.getLoadedThemes()}function h(){return y(),s.getLoadedLanguages()}function p(...m){y(),s.loadLanguages(m.flat(1))}async function f(...m){return p(await Jt(m))}function d(...m){y();for(const b of m.flat(1))s.loadTheme(b)}async function S(...m){return y(),d(await Qt(m))}function y(){if(e)throw new R("Shiki instance has been disposed")}function _(){e||(e=!0,s.dispose(),Q-=1)}return{setTheme:c,getTheme:a,getLanguage:l,getLoadedThemes:u,getLoadedLanguages:h,resolveLangAlias:i,loadLanguage:f,loadLanguageSync:p,loadTheme:S,loadThemeSync:d,dispose:_,[Symbol.dispose]:_}}async function yr(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,r]=await Promise.all([Qt(t.themes||[]),Jt(t.langs||[]),t.engine]);return _r({...t,themes:e,langs:n,engine:r})}const en=new WeakMap;function Ee(t,e){en.set(t,e)}function se(t){return en.get(t)}var Te=class tn{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new tn(Object.fromEntries(hr(n).map(r=>[r,Ke])),e)}constructor(...e){if(e.length===2){const[n,r]=e;this.lang=r,this._stacks=n}else{const[n,r,s]=e;this.lang=r,this._stacks={[s]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return br(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function br(t){const e=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);const o=s?.nameScopesList?.scopeName;o&&e.push(o),s.parent&&r(s.parent)}return r(t),e}function Sr(t,e){if(!(t instanceof Te))throw new R("Invalid grammar state");return t.getInternalStack(e)}const wr=/,/,Cr=/ /;function nn(t,e,n={}){const{theme:r=t.getLoadedThemes()[0]}=n;if(ke(t.resolveLangAlias(n.lang||"text"))||Re(r))return Ae(e).map(l=>[{content:l[0],offset:l[1]}]);const{theme:s,colorMap:o}=t.setTheme(r),i=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==i.name)throw new R(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(s.name))throw new R(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return kr(e,i,s,o,n)}function vr(...t){if(t.length===2)return se(t[1]);const[e,n,r={}]=t,{lang:s="text",theme:o=e.getLoadedThemes()[0]}=r;if(ke(s)||Re(o))throw new R("Plain language does not have grammar state");if(s==="ansi")throw new R("ANSI language does not have grammar state");const{theme:i,colorMap:l}=e.setTheme(o),a=e.getLanguage(s);return new Te(rt(n,a,i,l,r).stateStack,a.name,i.name)}function kr(t,e,n,r,s){const o=rt(t,e,n,r,s),i=new Te(o.stateStack,e.name,n.name);return Ee(o.tokens,i),o.tokens}function rt(t,e,n,r,s){const o=be(n,s),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:l=500,includeExplanation:a=!1}=s,c=Ae(t);let u=s.grammarState?Sr(s.grammarState,n.name)??Ke:s.grammarContextCode!=null?rt(s.grammarContextCode,e,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ke,h=[];const p=[];for(let f=0,d=c.length;f<d;f++){const[S,y]=c[f];if(S===""){h=[],p.push([]);continue}if(i>0&&S.length>=i){h=[],p.push([{content:S,offset:y,color:"",fontStyle:0}]);continue}let _,m,b;a&&a!=="tokenType"&&(_=e.tokenizeLine(S,u,l),m=_.tokens,b=0);const k=e.tokenizeLine2(S,u,l),E=k.tokens.length/2;for(let N=0;N<E;N++){const $=k.tokens[2*N],xe=N+1<E?k.tokens[2*N+2]:S.length;if($===xe)continue;const Ie=k.tokens[2*N+1],vn=U(r[z.getForeground(Ie)],o),kn=z.getFontStyle(Ie),ae={content:S.substring($,xe),offset:y+$,color:vn,fontStyle:kn};if(a==="tokenType")ae.type=z.getTokenType(Ie);else if(a){const lt=[];if(a!=="scopeName")for(const j of n.settings){let V;switch(typeof j.scope){case"string":V=j.scope.split(wr).map(Ne=>Ne.trim());break;case"object":V=j.scope;break;default:continue}lt.push({settings:j,selectors:V.map(Ne=>Ne.split(Cr))})}ae.explanation=[];let ct=0;for(;$+ct<xe;){const j=m[b],V=S.substring(j.startIndex,j.endIndex);ct+=V.length,ae.explanation.push({content:V,scopes:a==="scopeName"?Rr(j.scopes):Ar(lt,j.scopes)}),b+=1}}h.push(ae)}p.push(h),h=[],u=k.ruleStack}return{tokens:p,stateStack:u}}function Rr(t){return t.map(e=>({scopeName:e}))}function Ar(t,e){const n=[];for(let r=0,s=e.length;r<s;r++){const o=e[r];n[r]={scopeName:o,themeMatches:Tr(t,o,e.slice(0,r))}}return n}function wt(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function Er(t,e,n){if(!wt(t.at(-1),e))return!1;let r=t.length-2,s=n.length-1;for(;r>=0&&s>=0;)wt(t[r],n[s])&&(r-=1),s-=1;return r===-1}function Tr(t,e,n){const r=[];for(const{selectors:s,settings:o}of t)for(const i of s)if(Er(i,e,n)){r.push(o);break}return r}function rn(t,e,n,r=nn){const s=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),o=s.map(c=>{const u=r(t,e,{...n,theme:c.theme});return{tokens:u,state:se(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),i=Pr(...o.map(c=>c.tokens)),l=i[0].map((c,u)=>c.map((h,p)=>{const f={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(f.explanation=h.explanation),i.forEach((d,S)=>{const{content:y,explanation:_,offset:m,...b}=d[u][p];f.variants[s[S].color]=b}),f})),a=o[0].state?new Te(Object.fromEntries(o.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),o[0].state.lang):void 0;return a&&Ee(l,a),l}function Pr(...t){const e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){const s=t.map(a=>a[r]),o=e.map(()=>[]);e.forEach((a,c)=>a.push(o[c]));const i=s.map(()=>0),l=s.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<n;c++){const u=l[c];u.content.length===a?(o[c].push(u),i[c]+=1,l[c]=s[c][i[c]]):(o[c].push({...u,content:u.content.slice(0,a)}),l[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return e}const Lr=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class ie{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}ie.prototype.normal={};ie.prototype.property={};ie.prototype.space=void 0;function sn(t,e){const n={},r={};for(const s of t)Object.assign(n,s.property),Object.assign(r,s.normal);return new ie(n,r,e)}function Ye(t){return t.toLowerCase()}class O{constructor(e,n){this.attribute=n,this.property=e}}O.prototype.attribute="";O.prototype.booleanish=!1;O.prototype.boolean=!1;O.prototype.commaOrSpaceSeparated=!1;O.prototype.commaSeparated=!1;O.prototype.defined=!1;O.prototype.mustUseProperty=!1;O.prototype.number=!1;O.prototype.overloadedBoolean=!1;O.prototype.property="";O.prototype.spaceSeparated=!1;O.prototype.space=void 0;let xr=0;const w=H(),A=H(),Xe=H(),g=H(),v=H(),q=H(),M=H();function H(){return 2**++xr}const Je=Object.freeze(Object.defineProperty({__proto__:null,boolean:w,booleanish:A,commaOrSpaceSeparated:M,commaSeparated:q,number:g,overloadedBoolean:Xe,spaceSeparated:v},Symbol.toStringTag,{value:"Module"})),De=Object.keys(Je);class st extends O{constructor(e,n,r,s){let o=-1;if(super(e,n),Ct(this,"space",s),typeof r=="number")for(;++o<De.length;){const i=De[o];Ct(this,De[o],(r&Je[i])===Je[i])}}}st.prototype.defined=!0;function Ct(t,e,n){n&&(t[e]=n)}function Y(t){const e={},n={};for(const[r,s]of Object.entries(t.properties)){const o=new st(r,t.transform(t.attributes||{},r),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,n[Ye(r)]=r,n[Ye(o.attribute)]=r}return new ie(e,n,t.space)}const on=Y({properties:{ariaActiveDescendant:null,ariaAtomic:A,ariaAutoComplete:null,ariaBusy:A,ariaChecked:A,ariaColCount:g,ariaColIndex:g,ariaColSpan:g,ariaControls:v,ariaCurrent:null,ariaDescribedBy:v,ariaDetails:null,ariaDisabled:A,ariaDropEffect:v,ariaErrorMessage:null,ariaExpanded:A,ariaFlowTo:v,ariaGrabbed:A,ariaHasPopup:null,ariaHidden:A,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:v,ariaLevel:g,ariaLive:null,ariaModal:A,ariaMultiLine:A,ariaMultiSelectable:A,ariaOrientation:null,ariaOwns:v,ariaPlaceholder:null,ariaPosInSet:g,ariaPressed:A,ariaReadOnly:A,ariaRelevant:null,ariaRequired:A,ariaRoleDescription:v,ariaRowCount:g,ariaRowIndex:g,ariaRowSpan:g,ariaSelected:A,ariaSetSize:g,ariaSort:null,ariaValueMax:g,ariaValueMin:g,ariaValueNow:g,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function an(t,e){return e in t?t[e]:e}function ln(t,e){return an(t,e.toLowerCase())}const Ir=Y({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:q,acceptCharset:v,accessKey:v,action:null,allow:null,allowFullScreen:w,allowPaymentRequest:w,allowUserMedia:w,alt:null,as:null,async:w,autoCapitalize:null,autoComplete:v,autoFocus:w,autoPlay:w,blocking:v,capture:null,charSet:null,checked:w,cite:null,className:v,cols:g,colSpan:null,content:null,contentEditable:A,controls:w,controlsList:v,coords:g|q,crossOrigin:null,data:null,dateTime:null,decoding:null,default:w,defer:w,dir:null,dirName:null,disabled:w,download:Xe,draggable:A,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:w,formTarget:null,headers:v,height:g,hidden:Xe,high:g,href:null,hrefLang:null,htmlFor:v,httpEquiv:v,id:null,imageSizes:null,imageSrcSet:null,inert:w,inputMode:null,integrity:null,is:null,isMap:w,itemId:null,itemProp:v,itemRef:v,itemScope:w,itemType:v,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:w,low:g,manifest:null,max:null,maxLength:g,media:null,method:null,min:null,minLength:g,multiple:w,muted:w,name:null,nonce:null,noModule:w,noValidate:w,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:w,optimum:g,pattern:null,ping:v,placeholder:null,playsInline:w,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:w,referrerPolicy:null,rel:v,required:w,reversed:w,rows:g,rowSpan:g,sandbox:v,scope:null,scoped:w,seamless:w,selected:w,shadowRootClonable:w,shadowRootDelegatesFocus:w,shadowRootMode:null,shape:null,size:g,sizes:null,slot:null,span:g,spellCheck:A,src:null,srcDoc:null,srcLang:null,srcSet:null,start:g,step:null,style:null,tabIndex:g,target:null,title:null,translate:null,type:null,typeMustMatch:w,useMap:null,value:A,width:g,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:v,axis:null,background:null,bgColor:null,border:g,borderColor:null,bottomMargin:g,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:w,declare:w,event:null,face:null,frame:null,frameBorder:null,hSpace:g,leftMargin:g,link:null,longDesc:null,lowSrc:null,marginHeight:g,marginWidth:g,noResize:w,noHref:w,noShade:w,noWrap:w,object:null,profile:null,prompt:null,rev:null,rightMargin:g,rules:null,scheme:null,scrolling:A,standby:null,summary:null,text:null,topMargin:g,valueType:null,version:null,vAlign:null,vLink:null,vSpace:g,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:w,disableRemotePlayback:w,prefix:null,property:null,results:g,security:null,unselectable:null},space:"html",transform:ln}),Nr=Y({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:M,accentHeight:g,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:g,amplitude:g,arabicForm:null,ascent:g,attributeName:null,attributeType:null,azimuth:g,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:g,by:null,calcMode:null,capHeight:g,className:v,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:g,diffuseConstant:g,direction:null,display:null,dur:null,divisor:g,dominantBaseline:null,download:w,dx:null,dy:null,edgeMode:null,editable:null,elevation:g,enableBackground:null,end:null,event:null,exponent:g,externalResourcesRequired:null,fill:null,fillOpacity:g,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:q,g2:q,glyphName:q,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:g,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:g,horizOriginX:g,horizOriginY:g,id:null,ideographic:g,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:g,k:g,k1:g,k2:g,k3:g,k4:g,kernelMatrix:M,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:g,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:g,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:g,overlineThickness:g,paintOrder:null,panose1:null,path:null,pathLength:g,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:v,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:g,pointsAtY:g,pointsAtZ:g,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:M,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:M,rev:M,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:M,requiredFeatures:M,requiredFonts:M,requiredFormats:M,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:g,specularExponent:g,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:g,strikethroughThickness:g,string:null,stroke:null,strokeDashArray:M,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:g,strokeOpacity:g,strokeWidth:null,style:null,surfaceScale:g,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:M,tabIndex:g,tableValues:null,target:null,targetX:g,targetY:g,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:M,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:g,underlineThickness:g,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:g,values:null,vAlphabetic:g,vMathematical:g,vectorEffect:null,vHanging:g,vIdeographic:g,version:null,vertAdvY:g,vertOriginX:g,vertOriginY:g,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:g,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:an}),cn=Y({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),un=Y({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ln}),hn=Y({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),Or=/[A-Z]/g,vt=/-[a-z]/g,Mr=/^data[-\w.:]+$/i;function Br(t,e){const n=Ye(e);let r=e,s=O;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Mr.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(vt,Gr);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!vt.test(o)){let i=o.replace(Or,Dr);i.charAt(0)!=="-"&&(i="-"+i),e="data"+i}}s=st}return new s(r,e)}function Dr(t){return"-"+t.toLowerCase()}function Gr(t){return t.charAt(1).toUpperCase()}const jr=sn([on,Ir,cn,un,hn],"html"),fn=sn([on,Nr,cn,un,hn],"svg"),kt={}.hasOwnProperty;function $r(t,e){const n=e||{};function r(s,...o){let i=r.invalid;const l=r.handlers;if(s&&kt.call(s,t)){const a=String(s[t]);i=kt.call(l,a)?l[a]:r.unknown}if(i)return i.call(this,s,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Ur=/["&'<>`]/g,Fr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Wr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,zr=/[|\\{}()[\]^$+*?.]/g,Rt=new WeakMap;function Hr(t,e){if(t=t.replace(e.subset?Vr(e.subset):Ur,r),e.subset||e.escapeOnly)return t;return t.replace(Fr,n).replace(Wr,r);function n(s,o,i){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,i.charCodeAt(o+2),e)}function r(s,o,i){return e.format(s.charCodeAt(0),i.charCodeAt(o+1),e)}}function Vr(t){let e=Rt.get(t);return e||(e=qr(t),Rt.set(t,e)),e}function qr(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(zr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Kr=/[\dA-Fa-f]/;function Yr(t,e,n){const r="&#x"+t.toString(16).toUpperCase();return n&&e&&!Kr.test(String.fromCharCode(e))?r:r+";"}const Xr=/\d/;function Jr(t,e,n){const r="&#"+String(t);return n&&e&&!Xr.test(String.fromCharCode(e))?r:r+";"}const Qr=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Ge={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Zr=["cent","copy","divide","gt","lt","not","para","times"],dn={}.hasOwnProperty,Qe={};let ce;for(ce in Ge)dn.call(Ge,ce)&&(Qe[Ge[ce]]=ce);const es=/[^\dA-Za-z]/;function ts(t,e,n,r){const s=String.fromCharCode(t);if(dn.call(Qe,s)){const o=Qe[s],i="&"+o;return n&&Qr.includes(o)&&!Zr.includes(o)&&(!r||e&&e!==61&&es.test(String.fromCharCode(e)))?i:i+";"}return""}function ns(t,e,n){let r=Yr(t,e,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=ts(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){const o=Jr(t,e,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function K(t,e){return Hr(t,Object.assign({format:ns},e))}const rs=/^>|^->|<!--|-->|--!>|<!-$/g,ss=[">"],os=["<",">"];function is(t,e,n,r){return r.settings.bogusComments?"<?"+K(t.value,Object.assign({},r.settings.characterReferences,{subset:ss}))+">":"<!--"+t.value.replace(rs,s)+"-->";function s(o){return K(o,Object.assign({},r.settings.characterReferences,{subset:os}))}}function as(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function At(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(e);for(;s!==-1;)r++,s=n.indexOf(e,s+e.length);return r}function ls(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function cs(t){return t.join(" ").trim()}const us=/[ \t\n\f\r]/g;function ot(t){return typeof t=="object"?t.type==="text"?Et(t.value):!1:Et(t)}function Et(t){return t.replace(us,"")===""}const P=gn(1),pn=gn(-1),hs=[];function gn(t){return e;function e(n,r,s){const o=n?n.children:hs;let i=(r||0)+t,l=o[i];if(!s)for(;l&&ot(l);)i+=t,l=o[i];return l}}const fs={}.hasOwnProperty;function mn(t){return e;function e(n,r,s){return fs.call(t,n.tagName)&&t[n.tagName](n,r,s)}}const it=mn({body:ps,caption:je,colgroup:je,dd:ys,dt:_s,head:je,html:ds,li:ms,optgroup:bs,option:Ss,p:gs,rp:Tt,rt:Tt,tbody:Cs,td:Pt,tfoot:vs,th:Pt,thead:ws,tr:ks});function je(t,e,n){const r=P(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&ot(r.value.charAt(0)))}function ds(t,e,n){const r=P(n,e);return!r||r.type!=="comment"}function ps(t,e,n){const r=P(n,e);return!r||r.type!=="comment"}function gs(t,e,n){const r=P(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function ms(t,e,n){const r=P(n,e);return!r||r.type==="element"&&r.tagName==="li"}function _s(t,e,n){const r=P(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ys(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Tt(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function bs(t,e,n){const r=P(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Ss(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function ws(t,e,n){const r=P(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Cs(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function vs(t,e,n){return!P(n,e)}function ks(t,e,n){const r=P(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Pt(t,e,n){const r=P(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Rs=mn({body:Ts,colgroup:Ps,head:Es,html:As,tbody:Ls});function As(t){const e=P(t,-1);return!e||e.type!=="comment"}function Es(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function Ts(t){const e=P(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&ot(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Ps(t,e,n){const r=pn(n,e),s=P(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&it(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function Ls(t,e,n){const r=pn(n,e),s=P(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&it(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const ue={name:[[`
|
|
5
5
|
\f\r &/=>`.split(""),`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as w}from"./index-
|
|
1
|
+
import{r as s,j as w}from"./index-BFbLvCJn.js";const K=e=>e==="right"?"railOccupantRight":"railOccupantBottom";function N(e,n,r,l){s.useEffect(()=>{if(!r||typeof window>"u"||typeof document>"u")return;const d=K(e),o=document.body.dataset[d];document.body.dataset[d]=n,window.dispatchEvent(new CustomEvent("hudson:rail:claim",{detail:{owner:n,side:e}})),o&&o!==n&&window.dispatchEvent(new CustomEvent("hudson:rail:preempted",{detail:{owner:o,side:e,by:n}}));const m=f=>{const a=f.detail;a&&a.side===e&&a.owner!==n&&l?.()},v=f=>{const a=f.detail;a&&a.side===e&&a.owner===n&&l?.()};return window.addEventListener("hudson:rail:claim",m),window.addEventListener("hudson:rail:preempted",v),()=>{window.removeEventListener("hudson:rail:claim",m),window.removeEventListener("hudson:rail:preempted",v),document.body.dataset[d]===n&&delete document.body.dataset[d],window.dispatchEvent(new CustomEvent("hudson:rail:release",{detail:{owner:n,side:e}}))}},[e,n,r,l])}const k=620,B=360,$=280,H=900,X=720;function q(e,n,r,l){if(typeof window>"u")return n;try{const d=window.localStorage.getItem(e);if(d==null)return n;const o=Number(d);return Number.isFinite(o)?Math.min(l,Math.max(r,o)):n}catch{return n}}const z=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(", ");function P({open:e,onClose:n,side:r="right",owner:l,defaultSize:d,minSize:o=$,maxSize:m,resizable:v=!1,backdrop:f=!0,scrollLock:a=!1,focusTrap:A=!1,ariaLabel:_,className:F,layer:j="default",children:C}){const I=d??(r==="right"?k:B),h=m??(r==="right"?H:X),y=`slidepanel.size.${l}.${r}`,[E,L]=s.useState(()=>q(y,I,o,h)),S=s.useRef(E);S.current=E;const[g,R]=s.useState(!1),b=s.useRef(null),D=s.useRef(null),p=s.useCallback(()=>n(),[n]);N(r,l,e,p),s.useEffect(()=>{if(!e)return;const t=i=>{i.key==="Escape"&&(i.preventDefault(),p())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,p]),s.useEffect(()=>{if(!e||!a)return;const t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e,a]),s.useEffect(()=>{if(!e)return;D.current=document.activeElement;const t=b.current;return t?((t.querySelector(z)??t).focus(),()=>{D.current?.focus?.()}):void 0},[e]),s.useEffect(()=>{if(!g)return;const t=u=>{if(r==="right"){const c=window.innerWidth-u.clientX;L(Math.min(h,Math.max(o,c)))}else{const c=window.innerHeight-u.clientY;L(Math.min(h,Math.max(o,c)))}},i=()=>{R(!1);try{window.localStorage.setItem(y,String(S.current))}catch{}};return window.addEventListener("pointermove",t),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",i),()=>{window.removeEventListener("pointermove",t),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",i)}},[g,r,o,h,y]);const O=t=>{if(!A||t.key!=="Tab")return;const i=b.current;if(!i)return;const u=Array.from(i.querySelectorAll(z));if(u.length===0){t.preventDefault(),i.focus();return}const c=u[0],T=u[u.length-1],x=document.activeElement;t.shiftKey?(x===c||!i.contains(x))&&(t.preventDefault(),T.focus()):x===T&&(t.preventDefault(),c.focus())};if(!e)return null;const U=r==="right"?{width:E}:{height:E},M=j==="elevated";return w.jsxs(w.Fragment,{children:[f&&w.jsx("div",{className:`s-slide-backdrop${M?" s-slide-backdrop--elevated":""}`,"data-side":r,onClick:p,"aria-hidden":"true"}),w.jsxs("aside",{ref:b,className:["s-slide",`s-slide--${r}`,g?"s-slide--resizing":"",M?"s-slide--elevated":"",F].filter(Boolean).join(" "),role:"dialog","aria-modal":"true","aria-label":_,tabIndex:-1,onKeyDown:O,style:U,children:[v&&w.jsx("div",{className:`s-slide-resize s-slide-resize--${r}`,onPointerDown:t=>{t.preventDefault(),R(!0)},role:"separator","aria-orientation":r==="right"?"vertical":"horizontal","aria-label":"Resize panel"}),C]})]})}export{P as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,j as t}from"./index-
|
|
1
|
+
import{r as a,j as t}from"./index-BFbLvCJn.js";import{u as T}from"./chat-transport-CtxnPLMU.js";import"./chat-api-BHGHALv2.js";import"./api-DSqpVKC7.js";function L(l){return l.trim().slice(0,1).toUpperCase()||"?"}function G({spaces:l,activeSlug:D,canCreate:x,railed:S,onSelect:F,onCreate:j,onDelete:N,onExpandRail:K}){const y=T(),[n,c]=a.useState(!1),[R,u]=a.useState(!1),[o,v]=a.useState(""),[f,C]=a.useState(""),[i,h]=a.useState(!1),[w,m]=a.useState(null),[k,d]=a.useState(!1),b=a.useRef(null),s=l.find(e=>e.slug===D)??l[0]??null;a.useEffect(()=>{n||d(!1)},[n]),a.useEffect(()=>{if(!n)return;const e=p=>{const E=p.target;E instanceof Node&&b.current?.contains(E)||c(!1)};return document.addEventListener("pointerdown",e),()=>document.removeEventListener("pointerdown",e)},[n]);const g=a.useCallback(async()=>{const e=o.trim();if(!(!e||i)){h(!0),m(null);try{await j({title:e,channel:f.trim()}),v(""),C(""),u(!1),c(!1)}catch(p){m(p instanceof Error?p.message:"That space could not be created.")}finally{h(!1)}}},[i,f,j,o]);if(!s)return null;if(S)return t.jsx("div",{className:"chat-space-switch","data-railed":"true",ref:b,children:t.jsx("button",{type:"button",className:"chat-rail-row chat-space-rail","aria-label":`${s.title} — switch space`,title:s.title,onClick:()=>K(),children:t.jsx("span",{className:"chat-rail-glyph",children:L(s.title)})})});const r=l.length>1||x;return t.jsxs("div",{className:"chat-space-switch",ref:b,children:[t.jsxs("button",{type:"button",className:"chat-space-current","aria-expanded":r?n:void 0,"aria-haspopup":r?"menu":void 0,disabled:!r,onClick:()=>r&&c(e=>!e),onKeyDown:e=>{e.key==="Escape"&&n&&(e.preventDefault(),e.stopPropagation(),c(!1))},children:[t.jsx("span",{className:"chat-space-name",children:s.title}),r?t.jsx("span",{className:"chat-space-caret","aria-hidden":"true",children:n?"⌄":"⌃"}):null]}),n?t.jsxs("div",{className:"chat-space-menu",role:"menu","aria-label":"Spaces",children:[l.map(e=>t.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":e.slug===s.slug,className:"chat-space-menu-item","data-active":e.slug===s.slug,onClick:()=>{c(!1),e.slug!==s.slug&&F(e.slug)},children:[t.jsx("span",{className:"chat-space-menu-name",children:e.title}),e.channelCount===void 0?null:t.jsx("span",{className:"label-sm chat-space-menu-count",children:e.channelCount})]},e.slug)),x?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"chat-space-menu-rule"}),R?t.jsxs("div",{className:"chat-create-form",children:[t.jsx("input",{className:"chat-input",value:o,autoFocus:!0,placeholder:"Space name","aria-label":"Space name",onChange:e=>v(e.target.value),onKeyDown:e=>{e.key==="Enter"?(e.preventDefault(),g()):e.key==="Escape"&&(e.preventDefault(),u(!1))}}),y.namedFirstChannel?t.jsx("input",{className:"chat-input",value:f,placeholder:"First channel (general)","aria-label":"First channel",onChange:e=>C(e.target.value),onKeyDown:e=>{e.key==="Enter"&&(e.preventDefault(),g())}}):null,w?t.jsx("p",{className:"chat-space-error",children:w}):null,t.jsxs("div",{className:"chat-create-actions",children:[t.jsx("button",{type:"button",className:"btn btn--sm",disabled:i||!o.trim(),onClick:()=>{g()},children:i?"Creating…":"Create"}),t.jsx("button",{type:"button",className:"btn btn--ghost btn--sm",onClick:()=>u(!1),children:"Cancel"})]})]}):t.jsx("button",{type:"button",className:"chat-space-menu-item chat-space-menu-new",onClick:()=>u(!0),children:"+ New space"})]}):null,N&&y.spaceDelete?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"chat-space-menu-rule"}),t.jsx("button",{type:"button",className:"chat-space-menu-item chat-space-menu-danger",disabled:i,onClick:()=>{if(!k){d(!0);return}h(!0),m(null),N(s.slug).then(()=>{d(!1),c(!1)}).catch(e=>{d(!1),m(e instanceof Error?e.message:"That space could not be deleted.")}).finally(()=>h(!1))},children:k?`Delete ${s.title} and everything in it`:"Delete this space"})]}):null]}):null]})}export{G as SpaceSwitcher};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{H as T,r as _,s as H,j as l}from"./index-
|
|
1
|
+
import{H as T,r as _,s as H,j as l}from"./index-BFbLvCJn.js";import{n as M}from"./agent-state-DDhnFEEP.js";const N=7,e=10,R=N*e;function D({name:i,size:n,hue:x,tone:p,salt:t,spectrum:s,tile:h=!1,glow:a,corner:d,cornerPulse:m,className:g,title:f}){const u=_.useMemo(()=>H(i,{hue:x,salt:t,spectrum:s,tone:p}),[i,x,t,s,p?.l,p?.c]),b=a??(n!=null&&n>=40),y={position:"relative",display:"inline-grid",placeItems:"center",...n!=null?{width:n,height:n}:{width:"100%",height:"100%"},borderRadius:h?"26%":void 0,background:h?u.palette.soft:void 0,boxSizing:"border-box"};return l.jsxs("span",{className:g,style:y,title:f,children:[l.jsx(C,{sprite:u,glow:b,inset:h}),d&&l.jsx("span",{"aria-hidden":!0,style:{position:"absolute",right:"-4%",bottom:"-4%",width:"28%",height:"28%",minWidth:6,minHeight:6,borderRadius:"999px",background:d,boxShadow:m?`0 0 0 2px var(--scout-chrome-surface, var(--hud-bg, #000)), 0 0 0 4px color-mix(in oklab, ${d} 32%, transparent)`:"0 0 0 2px var(--scout-chrome-surface, var(--hud-bg, #000))"}})]})}function C({sprite:i,glow:n=!1,inset:x=!1}){const{cells:p,palette:t}=i,s=e*.07,h=e*.2,a=e*.24,d=.05,m=.085,g=p.length,f=c=>{const o=g>1?c/(g-1):0;return{d:d-(d+m)*o,t:o}},u=c=>Math.max(.06,Math.min(.97,c)),b=c=>{const{d:o,t:r}=f(c);return`oklch(${u(t.bodyL+o)} ${t.bodyC+r*.012} ${t.hue})`},S=c=>{const{d:o,t:r}=f(c);return`oklch(${u(t.accentL+o)} ${t.accentC+r*.012} ${t.accentHue})`},y=[n?`drop-shadow(0 1px 3.5px color-mix(in oklab, ${t.glow} 68%, transparent))`:null,`drop-shadow(0 0.35px 0.5px oklch(0.16 0.04 ${t.hue} / 0.55))`].filter(Boolean).join(" ");return l.jsx("svg",{viewBox:`0 0 ${R} ${R}`,shapeRendering:"geometricPrecision",style:{display:"block",width:x?"72%":"100%",height:"auto",aspectRatio:"1 / 1",overflow:"visible",filter:y},children:p.flatMap((c,o)=>c.map((r,k)=>{if(r==="off")return null;const w=k*e,v=o*e,$=`${o}-${k}`;if(r==="eye"){const j=w+e/2,E=v+e*.52;return l.jsxs("g",{className:"sprite-cell sprite-cell--eye",children:[l.jsx("rect",{x:w+s,y:v+s,width:e-s*2,height:e-s*2,rx:h,fill:t.sclera}),l.jsx("circle",{cx:j,cy:E,r:a,fill:t.ink}),l.jsx("ellipse",{cx:j-a*.33,cy:E-a*.36,rx:a*.34,ry:a*.34,fill:t.sclera,opacity:.9})]},$)}const A=r==="accent"?S(o):r==="mouth"?t.ink:b(o),I=r==="accent"?"sprite-cell sprite-cell--accent":"sprite-cell";return l.jsx("rect",{className:I,x:w+s,y:v+s,width:e-s*2,height:e-s*2,rx:h,fill:A},$)}))})}const L={in_turn:{l:.75,c:.16},in_flight:{l:.72,c:.14},needs_attention:{l:.78,c:.16},callable:{l:.73,c:.13},blocked:{l:.5,c:.02}};function F(i){const n=i.harness?.trim().toLowerCase();return{hue:n?T[n]:void 0,tone:L[M(i.state??null)]}}export{D as S,F as a};
|
package/dist/client/assets/{SproutActionSprite-BSiTS4en.js → SproutActionSprite-BrFCmgWS.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,j as u}from"./index-
|
|
1
|
+
import{r as t,j as u}from"./index-BFbLvCJn.js";/* empty css */const U="/assets/sprout-actions-proof-v1-BzUdc812.png",_=["run","jump","land","idle"],$={run:130,jump:130,land:65,idle:650},y=[0,323,627,950,1262],S=[0,330,610,892,1246],A=[[[85,43,283,312],[75,46,252,316],[39,44,243,314],[44,43,223,316]],[[99,16,258,264],[72,12,232,261],[44,11,230,261],[30,16,204,264]],[[94,14,264,265],[60,34,238,265],[61,5,217,267],[44,3,200,265]],[[91,8,249,289],[73,8,228,289],[61,8,220,288],[41,10,198,289]]];function H({action:n="idle",size:o=128,paused:l=!1,playbackRate:m=1}){const i=t.useRef(null),[c,f]=t.useState(0),[h,I]=t.useState(!0),[p,L]=t.useState(()=>typeof document<"u"&&document.hidden),[w,M]=t.useState(()=>typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches);t.useEffect(()=>{if(!i.current)return;const r=new IntersectionObserver(([R])=>I(R.isIntersecting));r.observe(i.current);const s=window.matchMedia("(prefers-reduced-motion: reduce)"),E=()=>M(s.matches),j=()=>L(document.hidden);return s.addEventListener("change",E),document.addEventListener("visibilitychange",j),()=>{r.disconnect(),s.removeEventListener("change",E),document.removeEventListener("visibilitychange",j)}},[]),t.useEffect(()=>{f(0)},[n]),t.useEffect(()=>{if(l||!h||p||w)return;const r=window.setInterval(()=>f(s=>n==="jump"||n==="land"?Math.min(3,s+1):(s+1)%4),$[n]/Math.max(.25,m));return()=>window.clearInterval(r)},[n,l,h,p,w,m]);const d=_.indexOf(n),v=y[c],g=S[d],x=y[c+1]-v,b=S[d+1]-g,e=o/300,a=A[d][c],N=(x/2-(a[0]+a[2])/2)*e,O=(b-a[3])*e;return u.jsx("span",{ref:i,className:"sprout-action-sprite","aria-hidden":"true",style:{width:o,height:o},children:u.jsx("span",{className:"sprout-action-sprite__crop",style:{width:x*e,height:b*e,transform:`translate(${N}px, ${O}px)`},children:u.jsx("img",{src:U,alt:"",draggable:!1,style:{width:1262*e,height:1246*e,left:-v*e,top:-g*e}})})})}export{H as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./index-
|
|
1
|
+
import{j as n}from"./index-BFbLvCJn.js";import{t as r,a as e}from"./status-tone-BM_zuRy1.js";function f({tone:s,children:t,variant:o="chip",className:i,title:a}){const l=o==="pill"?"s-pill":"sys-chip",p=o==="pill"?`s-pill-${r(s)}`:`sys-chip-${e(s)}`,c=i?`${l} ${p} ${i}`:`${l} ${p}`;return n.jsx("span",{className:c,title:a,children:t})}export{f as S};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as c,j as e}from"./index-
|
|
2
|
-
`)}function Ms(s){const t=$(s.source),r=E[s.harness],o=Rs(s.raw??s),l=[{label:"Time",value:P(s.ts)},{label:"Kind",value:s.kind},{label:"Project",value:s.project},{label:"Cwd",value:s.cwd||"—"},{label:"Session",value:s.sessionId||"—"},{label:"Source",value:t},{label:"Origin",value:r},{label:"Pid",value:s.parentPid!=null?`${s.pid} <- ${s.parentPid}`:String(s.pid)}];return{source:"tail",focus:"item",title:`${s.kind} · ${t}`,meta:`${P(s.ts)} · ${s.project} · ${es(s.sessionId)}`,body:s.summary,metadata:l,copy:[{label:"Copy message",value:s.summary},{label:"Copy metadata",value:Ds(s)},{label:"Copy raw",value:o}],action:s.sessionId?{label:"Open session",route:{view:"sessions",sessionId:s.sessionId}}:null}}function ss(s){if(typeof window>"u")return;const t=window;t.scoutOpsDetailSnapshot=s,window.dispatchEvent(new CustomEvent("scout:ops-detail",{detail:s}))}function Pe({navigate:s,initialFilter:t,variant:r="tail",chrome:o="full",filterLabel:l,filterScope:i="all"}={}){const{route:m}=gs(),d=r==="issues",u=o==="embedded",[p,f]=c.useState([]),[b,os]=c.useState(null),[y,I]=c.useState(t??""),[O,T]=c.useState(!!t&&!u),[j,H]=c.useState("warn-plus"),[x,B]=c.useState(!1),[w,z]=c.useState(0),[k,J]=c.useState(null),[g,U]=c.useState(Es),C=c.useRef(null),N=c.useRef(null),cs=c.useRef(!0),us=c.useCallback(a=>{f(n=>n.length>=Z?[...n.slice(n.length-Z+1),a]:[...n,a])},[]);xs(us),c.useEffect(()=>{I(t??""),T(!!t&&!u)},[u,t]),c.useEffect(()=>{try{sessionStorage.setItem(rs,g)}catch{}},[g]),c.useEffect(()=>{let a=!1;return(async()=>{try{const n=new URLSearchParams({limit:String(bs)});(u||t)&&n.set("transcripts","true");const h=await Q(`/api/tail/recent?${n.toString()}`);a||f(h.events??[])}catch{}})(),()=>{a=!0}},[u,t]),c.useEffect(()=>{if(!u)return ss(k?Ms(k):null),()=>ss(null)},[u,k]);const K=c.useCallback(async()=>{try{const a=await Q("/api/tail/discover");os(a)}catch{}},[]);c.useEffect(()=>{K();const a=setInterval(()=>{K()},ks);return()=>clearInterval(a)},[K]);const L=c.useMemo(()=>p.map(a=>({event:a,severity:ns(a)})),[p]),V=c.useMemo(()=>{let a=0,n=0;for(const h of L)h.severity==="error"&&n++,h.severity==="warn"&&a++;return{warn:a,error:n,total:a+n}},[L]),G=c.useMemo(()=>L.filter(({event:a,severity:n})=>d&&!Cs(n,j)?!1:_s(a,y,n,i)),[L,y,i,j,d]),S=c.useMemo(()=>{const a=G.filter(({event:n})=>g==="all"||!fs(n));return js(a.map(n=>({event:n.event,meta:n.severity})))},[g,G]);c.useLayoutEffect(()=>{const a=C.current;if(a){if(x){z(n=>n+1);return}a.scrollTop=a.scrollHeight}},[S,x]);const ds=c.useCallback(()=>{const a=C.current;if(!a)return;const h=a.scrollHeight-a.scrollTop-a.clientHeight<24;cs.current=h,h?(B(!1),z(0)):x||B(!0)},[x]),W=c.useCallback(a=>{I(a),T(!0),requestAnimationFrame(()=>N.current?.focus())},[]),q=c.useCallback(a=>{!a||!s||ys(s,{view:"sessions",sessionId:a},{returnTo:m})},[s,m]),_=c.useCallback(()=>{const a=C.current;a&&(a.scrollTop=a.scrollHeight,B(!1),z(0))},[]);c.useEffect(()=>{if(u)return;const a=n=>{const h=n.target,D=h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement||(h?.isContentEditable??!1);if(n.key==="/"&&!D){n.preventDefault(),T(!0),requestAnimationFrame(()=>N.current?.focus());return}if(n.key==="Escape"&&O&&document.activeElement===N.current){n.preventDefault(),T(!1),N.current?.blur(),I("");return}(n.key==="g"||n.key==="G")&&!D&&(n.preventDefault(),_())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[u,O,_]);const R=b?.totals?.transcripts??b?.transcripts?.length??0,X=c.useMemo(()=>ws(b,p),[b,p]);return e.jsxs("div",{className:`s-tail s-tail--${o}`,children:[e.jsxs("div",{className:`s-tail-status${d?" s-tail-status--issues":""}`,children:[e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--metrics",children:[e.jsx("span",{className:`s-tail-live-dot${x?" s-tail-live-dot--paused":""}`,"aria-hidden":"true"}),e.jsx("span",{className:`s-tail-status-state${x?" s-tail-status-state--paused":""}`,children:x?"paused":"live"})]}),!d&&e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--display",children:[e.jsx("span",{className:"s-tail-status-key",children:"view"}),e.jsxs("span",{className:"s-tail-issue-filter",role:"group","aria-label":"Tail display mode",children:[e.jsx("button",{type:"button",className:`s-tail-issue-filter-btn${g==="work"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>U("work"),"aria-pressed":g==="work",children:"work"}),e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${g==="all"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>U("all"),"aria-pressed":g==="all",children:["all:",G.length]})]})]}),d&&e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--issues",children:[e.jsx("span",{className:"s-tail-status-key",children:"flt"}),e.jsxs("span",{className:"s-tail-issue-filter",role:"group","aria-label":"Alert severity filter",children:[e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${j==="errors-only"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>H("errors-only"),"aria-pressed":j==="errors-only",children:["err:",V.error]}),e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${j==="warn-plus"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>H("warn-plus"),"aria-pressed":j==="warn-plus",children:["wrn+:",V.total]}),e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${j==="all"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>H("all"),"aria-pressed":j==="all",children:["all:",p.length]})]})]}),e.jsx("span",{className:"s-tail-status-spacer"}),e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--harnesses",children:[e.jsx("span",{className:"s-tail-status-key",children:"src"}),e.jsx("span",{className:"s-tail-status-inline",children:X.length>0?X.slice(0,4).map(a=>e.jsxs("span",{className:"s-tail-status-src",children:[e.jsx(A,{harness:a.source,size:10,title:null}),e.jsxs("span",{children:[$(a.source),":",a.count]})]},a.source)):e.jsx("span",{className:"s-tail-status-src",children:"—"})})]}),y&&u&&e.jsxs("span",{className:"s-tail-status-filter",title:y,children:["q=",l??"filtered"]})]}),O&&e.jsxs("div",{className:"s-tail-filter",children:[e.jsx("span",{className:"s-tail-filter-prompt",children:"/"}),e.jsx("input",{ref:N,className:"s-tail-filter-input",value:y,placeholder:"substring across summary · project · session",onChange:a=>I(a.target.value),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),N.current?.blur())},autoFocus:!0,spellCheck:!1}),e.jsx("span",{className:"s-tail-filter-hint",children:"esc to clear"})]}),e.jsxs("div",{className:"s-tail-body",ref:C,onScroll:ds,children:[S.length===0?e.jsxs("div",{className:"s-tail-empty",children:[e.jsxs("span",{className:"s-tail-empty-title",children:[d?"No alert events":"Waiting for events",e.jsx("span",{className:"s-tail-empty-cursor","aria-hidden":"true"})]}),e.jsx("span",{className:"s-tail-empty-body",children:y?u?e.jsxs(e.Fragment,{children:["no events match ",e.jsx("strong",{children:l??"this work filter"})]}):e.jsxs(e.Fragment,{children:["no events match filter ",e.jsx("strong",{children:y})]}):d?e.jsxs(e.Fragment,{children:["no ",Ls(j)," in the buffered session tail"]}):R?e.jsxs(e.Fragment,{children:["watching ",R," transcript",R===1?"":"s"," · no events yet"]}):e.jsx(e.Fragment,{children:"agent tool calls, messages, and system events stream here"})}),!R&&!y&&e.jsxs("span",{className:"s-tail-empty-hint",children:["Start a session to see traffic",e.jsx("span",{className:"s-tail-empty-hint-sep",children:" · "}),e.jsx("code",{children:"scout watch --tail"})]})]}):S.map(({event:a,repeatCount:n,meta:h},D)=>e.jsx(As,{event:a,repeatCount:n,issueSeverity:h,selected:k===a,onSelect:J,onProjectClick:W,onSessionClick:q},$s(a,D,n))),x&&w>0&&e.jsxs("div",{className:"s-tail-divider",onClick:_,onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),_())},role:"button",tabIndex:0,"aria-label":`Resume live tail · ${w} new`,children:["── paused · ",w," new · click or press G to jump back to live ──"]})]}),u?e.jsxs("div",{className:"s-tail-keys s-tail-keys--embedded",children:[e.jsxs("span",{children:[S.length," / ",p.length," lines buffered"]}),x&&w>0&&e.jsxs("span",{children:[w," new"]})]}):e.jsxs("div",{className:"s-tail-keys",children:[e.jsxs("span",{children:[e.jsx("kbd",{children:"j"}),e.jsx("kbd",{children:"k"})," scroll"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"/"})," filter"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"G"})," live"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"esc"})," clr"]}),e.jsx("span",{className:"s-tail-keys-spacer"}),e.jsxs("span",{children:[S.length,"/",p.length," buf"]})]}),u&&k&&e.jsx(Ps,{event:k,onClose:()=>J(null),onProjectClick:W,onSessionClick:q})]})}function As({event:s,repeatCount:t=1,issueSeverity:r,selected:o,onSelect:l,onProjectClick:i,onSessionClick:m}){const d=E[s.harness],u=$(s.source),p=r?` s-tail-row--issue s-tail-row--issue-${r}`:"";return e.jsxs("div",{className:`s-tail-row s-tail-row--${s.kind}${p}${o?" s-tail-row--selected":""}`,role:"button",tabIndex:0,onClick:()=>l(s),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),l(s))},children:[e.jsx("span",{className:"s-tail-cell-time",children:Ss(s.ts)}),e.jsxs("span",{className:"s-tail-token s-tail-token--harness",title:`source: ${u}`,children:[e.jsx(A,{harness:s.source,size:11,title:null}),e.jsx("span",{className:"s-tail-harness-label",children:u})]}),e.jsx("span",{className:"s-tail-token s-tail-token--origin",title:`origin: ${d}`,children:ls[s.harness]}),e.jsxs("span",{className:"s-tail-cell-context",children:[e.jsx(F,{className:"s-tail-link s-tail-link--project",onClick:i?()=>i(s.project):void 0,title:`Filter to ${s.project}`,children:s.project}),e.jsx("span",{className:"s-tail-sep",children:"/"}),e.jsx(F,{className:"s-tail-link s-tail-link--session",onClick:m&&s.sessionId?()=>m(s.sessionId):void 0,title:s.sessionId?`Open session ${s.sessionId}`:void 0,children:es(s.sessionId)}),e.jsx("span",{className:"s-tail-sep",children:":"}),e.jsx("span",{className:"s-tail-cell-pid",title:s.pid>0?`pid ${s.pid}`:"file-backed log",children:s.pid>0?s.pid:"log"})]}),e.jsxs("span",{className:"s-tail-kind",title:s.kind,children:[e.jsx("span",{className:`s-tail-glyph s-tail-glyph--${s.kind}`,children:ts[s.kind]}),e.jsx("span",{className:"s-tail-kind-label",children:as[s.kind]})]}),e.jsxs("span",{className:"s-tail-summary",children:[r==="error"?"✕ ":r==="warn"?"△ ":null,s.summary,t>1?e.jsxs("span",{className:"s-tail-repeat",title:`${t} identical events collapsed`,children:[" ","×",t]}):null]})]})}function F({className:s,onClick:t,title:r,children:o}){return t?e.jsx("span",{className:`${s} s-tail-link--active`,role:"link",tabIndex:0,title:r,onClick:l=>{l.stopPropagation(),t()},onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),l.stopPropagation(),t())},children:o}):e.jsx("span",{className:s,title:r,children:o})}function P(s){const t=hs(s);if(t===null)return"—";const r=new Date(t),o=r.getFullYear(),l=String(r.getMonth()+1).padStart(2,"0"),i=String(r.getDate()).padStart(2,"0"),m=String(r.getHours()).padStart(2,"0"),d=String(r.getMinutes()).padStart(2,"0"),u=String(r.getSeconds()).padStart(2,"0"),p=String(r.getMilliseconds()).padStart(3,"0");return`${o}-${l}-${i} ${m}:${d}:${u}.${p}`}function M(s){return(JSON.stringify(s,null,2)??"undefined").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/("(?:\\.|[^"\\])*"\s*:)|("(?:\\.|[^"\\])*")|\b(true|false|null)\b|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g,(o,l,i,m,d)=>l?`<span class="s-tail-jk">${l}</span>`:i?`<span class="s-tail-js">${i}</span>`:m?`<span class="s-tail-jl">${m}</span>`:d?`<span class="s-tail-jn">${d}</span>`:o)}function Fs(s){if(!s||typeof s!="object")return null;const t=s,o=t.message?.content??t.content;return Array.isArray(o)?o:typeof o=="string"?[{type:"text",text:o}]:null}function Ps({event:s,onClose:t,onProjectClick:r,onSessionClick:o}){const[l,i]=c.useState(!0),m=E[s.harness],d=$(s.source),u=ns(s),p=Fs(s.raw);return e.jsxs(ps,{open:!0,onClose:t,side:"right",owner:"openscout.tail",resizable:!0,defaultSize:620,minSize:400,maxSize:960,ariaLabel:"Tail event detail",children:[e.jsxs("div",{className:"s-slide-header s-tail-sheet-header",children:[e.jsx("span",{className:`s-tail-glyph s-tail-glyph--${s.kind}`,children:ts[s.kind]}),e.jsx("span",{className:"s-tail-sheet-kind",children:as[s.kind]}),u&&e.jsx("span",{className:`s-tail-token s-tail-token--issue-${u}`,children:u==="error"?"✕":"△"}),e.jsxs("span",{className:"s-tail-token s-tail-token--harness",children:[e.jsx(A,{harness:s.source,size:12,title:null}),e.jsx("span",{className:"s-tail-harness-label",children:d})]}),e.jsx("span",{className:"s-tail-token s-tail-token--origin",title:`origin: ${m}`,children:ls[s.harness]}),e.jsx("span",{className:"s-slide-spacer"}),e.jsx("span",{className:"s-tail-sheet-time",children:P(s.ts)}),e.jsx("button",{type:"button",className:"s-slide-close",onClick:t,"aria-label":"Close",children:"×"})]}),e.jsxs("div",{className:"s-slide-body s-tail-sheet-body",children:[e.jsx("section",{className:"s-tail-sheet-section",children:e.jsxs("div",{className:"s-tail-sheet-grid",children:[e.jsx("span",{className:"s-tail-sheet-key",children:"project"}),e.jsx("span",{className:"s-tail-sheet-val",children:e.jsx(F,{className:"s-tail-link s-tail-link--project",onClick:r?()=>r(s.project):void 0,title:`Filter to ${s.project}`,children:s.project})}),e.jsx("span",{className:"s-tail-sheet-key",children:"cwd"}),e.jsx("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:s.cwd||"—"}),e.jsx("span",{className:"s-tail-sheet-key",children:"session"}),e.jsx("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:e.jsx(F,{className:"s-tail-link s-tail-link--session",onClick:o&&s.sessionId?()=>o(s.sessionId):void 0,title:s.sessionId?`Open session ${s.sessionId}`:void 0,children:s.sessionId||"—"})}),e.jsx("span",{className:"s-tail-sheet-key",children:"harness"}),e.jsxs("span",{className:"s-tail-sheet-val s-tail-sheet-val--harness",children:[e.jsx(A,{harness:s.source,size:13,title:null}),e.jsx("span",{children:d})]}),e.jsx("span",{className:"s-tail-sheet-key",children:"origin"}),e.jsx("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:m}),e.jsx("span",{className:"s-tail-sheet-key",children:"pid"}),e.jsxs("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:[s.pid,s.parentPid!=null?` ← ${s.parentPid}`:""]})]})}),e.jsxs("section",{className:"s-tail-sheet-section",children:[e.jsx("h4",{className:"s-tail-sheet-h",children:"summary"}),e.jsx("div",{className:"s-tail-sheet-summary",children:s.summary})]}),p&&p.length>0&&e.jsxs("section",{className:"s-tail-sheet-section",children:[e.jsx("h4",{className:"s-tail-sheet-h",children:"content"}),p.map((f,b)=>e.jsx(Os,{block:f},b))]}),e.jsxs("section",{className:"s-tail-sheet-section",children:[e.jsxs("button",{type:"button",className:"s-tail-sheet-toggle",onClick:()=>i(f=>!f),children:[l?"▾":"▸"," raw event"]}),l&&e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(s.raw??s)}})]})]})]})}function Os({block:s}){if(s.type==="text"){const t=s.text??"";return e.jsx("div",{className:"s-tail-sheet-text",children:t})}if(s.type==="tool_use"){const t=s;return e.jsxs("div",{className:"s-tail-sheet-block s-tail-sheet-block--tool",children:[e.jsxs("div",{className:"s-tail-sheet-block-head",children:[e.jsx("span",{className:"s-tail-glyph s-tail-glyph--tool",children:"*"}),e.jsx("span",{className:"s-tail-sheet-block-title",children:t.name??"tool_use"})]}),e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(t.input??{})}})]})}if(s.type==="tool_result"){const t=s,r=typeof t.content=="string";return e.jsxs("div",{className:`s-tail-sheet-block s-tail-sheet-block--tool-result${t.is_error?" s-tail-sheet-block--err":""}`,children:[e.jsxs("div",{className:"s-tail-sheet-block-head",children:[e.jsx("span",{className:"s-tail-glyph s-tail-glyph--tool-result",children:"="}),e.jsxs("span",{className:"s-tail-sheet-block-title",children:["tool_result",t.is_error?" · error":""]})]}),r?e.jsx("pre",{className:"s-tail-sheet-pre",children:t.content}):e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(t.content??{})}})]})}return e.jsxs("div",{className:"s-tail-sheet-block",children:[e.jsxs("div",{className:"s-tail-sheet-block-head",children:[e.jsx("span",{className:"s-tail-glyph s-tail-glyph--other",children:"·"}),e.jsx("span",{className:"s-tail-sheet-block-title",children:s.type})]}),e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(s)}})]})}export{Pe as TailView};
|
|
1
|
+
import{r as c,j as e}from"./index-BFbLvCJn.js";import{S as ps}from"./SlidePanel-D5oPQocF.js";import{H as A,h as $}from"./HarnessMark-CP-PWk2W.js";import{a as Q}from"./api-DSqpVKC7.js";import{d as ms,n as hs}from"./time-Dhsh_2EG.js";import{i as fs,c as js,s as es,T as ts,d as as}from"./tail-display-DHSNmvor.js";import{u as xs}from"./tail-events-C6NWFB1N.js";import{o as ys}from"./openContent-C6XO6kr5.js";import{u as gs}from"./Provider-BEXAZWd9.js";import"./lane-edit-display-BjdT9oZl.js";import"./index-BWHgHrtv.js";import"./theme-vars-DNK0nn3k.js";import"./router-CJIx83Ia.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BVxO0zNp.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-D-VB5vdt.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./createLucideIcon-CKbjXlwv.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";const Z=5e3,bs=500,ks=3e4,rs="openscout:tail-display-mode",E={"scout-managed":"scout","hudson-managed":"hudson",unattributed:"native"},ls={"scout-managed":"sc","hudson-managed":"hu",unattributed:"na"};function Ns(s){return s?.trim().toLowerCase()||"unknown"}function ws(s,t){const r=new Map,o=s?.transcripts?.length?s.transcripts:s?.processes.length?s.processes:t;for(const l of o){const i=Ns(l.source);r.set(i,(r.get(i)??0)+1)}return[...r.entries()].map(([l,i])=>({source:l,count:i})).sort((l,i)=>i.count-l.count||l.source.localeCompare(i.source))}function Ss(s){return ms(s,{milliseconds:!0})||"—"}function $s(s,t,r=1){return`${s.id}:${s.ts}:${r}:${t}`}function Es(){try{const s=sessionStorage.getItem(rs);if(s==="work"||s==="all")return s}catch{}return"work"}const Is=/\b(error|failed|failure|exception|panic|timeout|timed out|refused|crash|fatal|non[- ]?zero|exit(?:ed)? with code [1-9])\b/i,Ts=/\b(warn(?:ing)?|deprecated|retry|rate limit|rate-limited|blocked|skipped|interrupted|aborted|stale|conflict|permission denied|denied)\b/i;function is(s){const t=s.replace(/[_-]+/g," ");return Is.test(t)?"error":Ts.test(t)?"warn":null}function v(s){return!(s==null||s===!1||typeof s=="string"&&!s.trim())}function Y(s,t=0){if(s==null||t>4||typeof s=="string"||typeof s!="object")return null;if(Array.isArray(s)){let o=null;for(const l of s.slice(0,40)){const i=Y(l,t+1);if(i==="error")return"error";o??=i}return o}let r=null;for(const[o,l]of Object.entries(s).slice(0,80)){const i=o.toLowerCase();if((i==="is_error"||i==="failed")&&l===!0||i==="error"&&v(l))return"error";if((i==="warning"||i==="warn")&&v(l)&&(r="warn"),typeof l=="string"&&(i==="level"||i==="severity"||i==="status"||i==="type"||i==="subtype")){const d=is(l);if(d==="error")return"error";r??=d}const m=Y(l,t+1);if(m==="error")return"error";r??=m}return r}function ns(s){const t=Y(s.raw);if(t==="error")return"error";if(s.kind==="tool-result"||s.kind==="system"||s.kind==="other"){const r=is(s.summary);return r==="error"?"error":t??r}return t}function Cs(s,t){return t==="all"?!0:t==="warn-plus"?s!=null:s==="error"}function Ls(s){switch(s){case"errors-only":return"errors";case"warn-plus":return"warnings or errors";case"all":return"all session events"}}function _s(s,t,r=null,o="all"){if(!t)return!0;const l=E[s.harness],i=r==="error"?"error failed failure issue":r==="warn"?"warn warning issue":"",d=(o==="context"?[s.project,s.cwd,s.sessionId,s.source,s.harness,l,i]:[s.summary,s.project,s.cwd,s.sessionId,s.source,s.harness,l,i]).join(" ").toLowerCase(),u=t.toLowerCase().split("|").map(p=>p.trim()).filter(Boolean);return u.length===0?!0:u.some(p=>d.includes(p))}function Rs(s){try{return JSON.stringify(s,null,2)??""}catch{return String(s)}}function Ds(s){return[["time",P(s.ts)],["kind",s.kind],["project",s.project],["cwd",s.cwd||"—"],["session",s.sessionId||"—"],["source",$(s.source)],["origin",E[s.harness]],["pid",s.parentPid!=null?`${s.pid} <- ${s.parentPid}`:String(s.pid)]].map(([r,o])=>`${r}: ${o}`).join(`
|
|
2
|
+
`)}function Ms(s){const t=$(s.source),r=E[s.harness],o=Rs(s.raw??s),l=[{label:"Time",value:P(s.ts)},{label:"Kind",value:s.kind},{label:"Project",value:s.project},{label:"Cwd",value:s.cwd||"—"},{label:"Session",value:s.sessionId||"—"},{label:"Source",value:t},{label:"Origin",value:r},{label:"Pid",value:s.parentPid!=null?`${s.pid} <- ${s.parentPid}`:String(s.pid)}];return{source:"tail",focus:"item",title:`${s.kind} · ${t}`,meta:`${P(s.ts)} · ${s.project} · ${es(s.sessionId)}`,body:s.summary,metadata:l,copy:[{label:"Copy message",value:s.summary},{label:"Copy metadata",value:Ds(s)},{label:"Copy raw",value:o}],action:s.sessionId?{label:"Open session",route:{view:"sessions",sessionId:s.sessionId}}:null}}function ss(s){if(typeof window>"u")return;const t=window;t.scoutOpsDetailSnapshot=s,window.dispatchEvent(new CustomEvent("scout:ops-detail",{detail:s}))}function Fe({navigate:s,initialFilter:t,variant:r="tail",chrome:o="full",filterLabel:l,filterScope:i="all"}={}){const{route:m}=gs(),d=r==="issues",u=o==="embedded",[p,f]=c.useState([]),[b,os]=c.useState(null),[y,I]=c.useState(t??""),[O,T]=c.useState(!!t&&!u),[j,H]=c.useState("warn-plus"),[x,B]=c.useState(!1),[w,z]=c.useState(0),[k,J]=c.useState(null),[g,U]=c.useState(Es),C=c.useRef(null),N=c.useRef(null),cs=c.useRef(!0),us=c.useCallback(a=>{f(n=>n.length>=Z?[...n.slice(n.length-Z+1),a]:[...n,a])},[]);xs(us),c.useEffect(()=>{I(t??""),T(!!t&&!u)},[u,t]),c.useEffect(()=>{try{sessionStorage.setItem(rs,g)}catch{}},[g]),c.useEffect(()=>{let a=!1;return(async()=>{try{const n=new URLSearchParams({limit:String(bs)});(u||t)&&n.set("transcripts","true");const h=await Q(`/api/tail/recent?${n.toString()}`);a||f(h.events??[])}catch{}})(),()=>{a=!0}},[u,t]),c.useEffect(()=>{if(!u)return ss(k?Ms(k):null),()=>ss(null)},[u,k]);const K=c.useCallback(async()=>{try{const a=await Q("/api/tail/discover");os(a)}catch{}},[]);c.useEffect(()=>{K();const a=setInterval(()=>{K()},ks);return()=>clearInterval(a)},[K]);const L=c.useMemo(()=>p.map(a=>({event:a,severity:ns(a)})),[p]),V=c.useMemo(()=>{let a=0,n=0;for(const h of L)h.severity==="error"&&n++,h.severity==="warn"&&a++;return{warn:a,error:n,total:a+n}},[L]),G=c.useMemo(()=>L.filter(({event:a,severity:n})=>d&&!Cs(n,j)?!1:_s(a,y,n,i)),[L,y,i,j,d]),S=c.useMemo(()=>{const a=G.filter(({event:n})=>g==="all"||!fs(n));return js(a.map(n=>({event:n.event,meta:n.severity})))},[g,G]);c.useLayoutEffect(()=>{const a=C.current;if(a){if(x){z(n=>n+1);return}a.scrollTop=a.scrollHeight}},[S,x]);const ds=c.useCallback(()=>{const a=C.current;if(!a)return;const h=a.scrollHeight-a.scrollTop-a.clientHeight<24;cs.current=h,h?(B(!1),z(0)):x||B(!0)},[x]),W=c.useCallback(a=>{I(a),T(!0),requestAnimationFrame(()=>N.current?.focus())},[]),q=c.useCallback(a=>{!a||!s||ys(s,{view:"sessions",sessionId:a},{returnTo:m})},[s,m]),_=c.useCallback(()=>{const a=C.current;a&&(a.scrollTop=a.scrollHeight,B(!1),z(0))},[]);c.useEffect(()=>{if(u)return;const a=n=>{const h=n.target,D=h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement||(h?.isContentEditable??!1);if(n.key==="/"&&!D){n.preventDefault(),T(!0),requestAnimationFrame(()=>N.current?.focus());return}if(n.key==="Escape"&&O&&document.activeElement===N.current){n.preventDefault(),T(!1),N.current?.blur(),I("");return}(n.key==="g"||n.key==="G")&&!D&&(n.preventDefault(),_())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[u,O,_]);const R=b?.totals?.transcripts??b?.transcripts?.length??0,X=c.useMemo(()=>ws(b,p),[b,p]);return e.jsxs("div",{className:`s-tail s-tail--${o}`,children:[e.jsxs("div",{className:`s-tail-status${d?" s-tail-status--issues":""}`,children:[e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--metrics",children:[e.jsx("span",{className:`s-tail-live-dot${x?" s-tail-live-dot--paused":""}`,"aria-hidden":"true"}),e.jsx("span",{className:`s-tail-status-state${x?" s-tail-status-state--paused":""}`,children:x?"paused":"live"})]}),!d&&e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--display",children:[e.jsx("span",{className:"s-tail-status-key",children:"view"}),e.jsxs("span",{className:"s-tail-issue-filter",role:"group","aria-label":"Tail display mode",children:[e.jsx("button",{type:"button",className:`s-tail-issue-filter-btn${g==="work"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>U("work"),"aria-pressed":g==="work",children:"work"}),e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${g==="all"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>U("all"),"aria-pressed":g==="all",children:["all:",G.length]})]})]}),d&&e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--issues",children:[e.jsx("span",{className:"s-tail-status-key",children:"flt"}),e.jsxs("span",{className:"s-tail-issue-filter",role:"group","aria-label":"Alert severity filter",children:[e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${j==="errors-only"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>H("errors-only"),"aria-pressed":j==="errors-only",children:["err:",V.error]}),e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${j==="warn-plus"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>H("warn-plus"),"aria-pressed":j==="warn-plus",children:["wrn+:",V.total]}),e.jsxs("button",{type:"button",className:`s-tail-issue-filter-btn${j==="all"?" s-tail-issue-filter-btn--active":""}`,onClick:()=>H("all"),"aria-pressed":j==="all",children:["all:",p.length]})]})]}),e.jsx("span",{className:"s-tail-status-spacer"}),e.jsxs("span",{className:"s-tail-status-cluster s-tail-status-cluster--harnesses",children:[e.jsx("span",{className:"s-tail-status-key",children:"src"}),e.jsx("span",{className:"s-tail-status-inline",children:X.length>0?X.slice(0,4).map(a=>e.jsxs("span",{className:"s-tail-status-src",children:[e.jsx(A,{harness:a.source,size:10,title:null}),e.jsxs("span",{children:[$(a.source),":",a.count]})]},a.source)):e.jsx("span",{className:"s-tail-status-src",children:"—"})})]}),y&&u&&e.jsxs("span",{className:"s-tail-status-filter",title:y,children:["q=",l??"filtered"]})]}),O&&e.jsxs("div",{className:"s-tail-filter",children:[e.jsx("span",{className:"s-tail-filter-prompt",children:"/"}),e.jsx("input",{ref:N,className:"s-tail-filter-input",value:y,placeholder:"substring across summary · project · session",onChange:a=>I(a.target.value),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),N.current?.blur())},autoFocus:!0,spellCheck:!1}),e.jsx("span",{className:"s-tail-filter-hint",children:"esc to clear"})]}),e.jsxs("div",{className:"s-tail-body",ref:C,onScroll:ds,children:[S.length===0?e.jsxs("div",{className:"s-tail-empty",children:[e.jsxs("span",{className:"s-tail-empty-title",children:[d?"No alert events":"Waiting for events",e.jsx("span",{className:"s-tail-empty-cursor","aria-hidden":"true"})]}),e.jsx("span",{className:"s-tail-empty-body",children:y?u?e.jsxs(e.Fragment,{children:["no events match ",e.jsx("strong",{children:l??"this work filter"})]}):e.jsxs(e.Fragment,{children:["no events match filter ",e.jsx("strong",{children:y})]}):d?e.jsxs(e.Fragment,{children:["no ",Ls(j)," in the buffered session tail"]}):R?e.jsxs(e.Fragment,{children:["watching ",R," transcript",R===1?"":"s"," · no events yet"]}):e.jsx(e.Fragment,{children:"agent tool calls, messages, and system events stream here"})}),!R&&!y&&e.jsxs("span",{className:"s-tail-empty-hint",children:["Start a session to see traffic",e.jsx("span",{className:"s-tail-empty-hint-sep",children:" · "}),e.jsx("code",{children:"scout watch --tail"})]})]}):S.map(({event:a,repeatCount:n,meta:h},D)=>e.jsx(As,{event:a,repeatCount:n,issueSeverity:h,selected:k===a,onSelect:J,onProjectClick:W,onSessionClick:q},$s(a,D,n))),x&&w>0&&e.jsxs("div",{className:"s-tail-divider",onClick:_,onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),_())},role:"button",tabIndex:0,"aria-label":`Resume live tail · ${w} new`,children:["── paused · ",w," new · click or press G to jump back to live ──"]})]}),u?e.jsxs("div",{className:"s-tail-keys s-tail-keys--embedded",children:[e.jsxs("span",{children:[S.length," / ",p.length," lines buffered"]}),x&&w>0&&e.jsxs("span",{children:[w," new"]})]}):e.jsxs("div",{className:"s-tail-keys",children:[e.jsxs("span",{children:[e.jsx("kbd",{children:"j"}),e.jsx("kbd",{children:"k"})," scroll"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"/"})," filter"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"G"})," live"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"esc"})," clr"]}),e.jsx("span",{className:"s-tail-keys-spacer"}),e.jsxs("span",{children:[S.length,"/",p.length," buf"]})]}),u&&k&&e.jsx(Ps,{event:k,onClose:()=>J(null),onProjectClick:W,onSessionClick:q})]})}function As({event:s,repeatCount:t=1,issueSeverity:r,selected:o,onSelect:l,onProjectClick:i,onSessionClick:m}){const d=E[s.harness],u=$(s.source),p=r?` s-tail-row--issue s-tail-row--issue-${r}`:"";return e.jsxs("div",{className:`s-tail-row s-tail-row--${s.kind}${p}${o?" s-tail-row--selected":""}`,role:"button",tabIndex:0,onClick:()=>l(s),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),l(s))},children:[e.jsx("span",{className:"s-tail-cell-time",children:Ss(s.ts)}),e.jsxs("span",{className:"s-tail-token s-tail-token--harness",title:`source: ${u}`,children:[e.jsx(A,{harness:s.source,size:11,title:null}),e.jsx("span",{className:"s-tail-harness-label",children:u})]}),e.jsx("span",{className:"s-tail-token s-tail-token--origin",title:`origin: ${d}`,children:ls[s.harness]}),e.jsxs("span",{className:"s-tail-cell-context",children:[e.jsx(F,{className:"s-tail-link s-tail-link--project",onClick:i?()=>i(s.project):void 0,title:`Filter to ${s.project}`,children:s.project}),e.jsx("span",{className:"s-tail-sep",children:"/"}),e.jsx(F,{className:"s-tail-link s-tail-link--session",onClick:m&&s.sessionId?()=>m(s.sessionId):void 0,title:s.sessionId?`Open session ${s.sessionId}`:void 0,children:es(s.sessionId)}),e.jsx("span",{className:"s-tail-sep",children:":"}),e.jsx("span",{className:"s-tail-cell-pid",title:s.pid>0?`pid ${s.pid}`:"file-backed log",children:s.pid>0?s.pid:"log"})]}),e.jsxs("span",{className:"s-tail-kind",title:s.kind,children:[e.jsx("span",{className:`s-tail-glyph s-tail-glyph--${s.kind}`,children:ts[s.kind]}),e.jsx("span",{className:"s-tail-kind-label",children:as[s.kind]})]}),e.jsxs("span",{className:"s-tail-summary",children:[r==="error"?"✕ ":r==="warn"?"△ ":null,s.summary,t>1?e.jsxs("span",{className:"s-tail-repeat",title:`${t} identical events collapsed`,children:[" ","×",t]}):null]})]})}function F({className:s,onClick:t,title:r,children:o}){return t?e.jsx("span",{className:`${s} s-tail-link--active`,role:"link",tabIndex:0,title:r,onClick:l=>{l.stopPropagation(),t()},onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),l.stopPropagation(),t())},children:o}):e.jsx("span",{className:s,title:r,children:o})}function P(s){const t=hs(s);if(t===null)return"—";const r=new Date(t),o=r.getFullYear(),l=String(r.getMonth()+1).padStart(2,"0"),i=String(r.getDate()).padStart(2,"0"),m=String(r.getHours()).padStart(2,"0"),d=String(r.getMinutes()).padStart(2,"0"),u=String(r.getSeconds()).padStart(2,"0"),p=String(r.getMilliseconds()).padStart(3,"0");return`${o}-${l}-${i} ${m}:${d}:${u}.${p}`}function M(s){return(JSON.stringify(s,null,2)??"undefined").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/("(?:\\.|[^"\\])*"\s*:)|("(?:\\.|[^"\\])*")|\b(true|false|null)\b|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g,(o,l,i,m,d)=>l?`<span class="s-tail-jk">${l}</span>`:i?`<span class="s-tail-js">${i}</span>`:m?`<span class="s-tail-jl">${m}</span>`:d?`<span class="s-tail-jn">${d}</span>`:o)}function Fs(s){if(!s||typeof s!="object")return null;const t=s,o=t.message?.content??t.content;return Array.isArray(o)?o:typeof o=="string"?[{type:"text",text:o}]:null}function Ps({event:s,onClose:t,onProjectClick:r,onSessionClick:o}){const[l,i]=c.useState(!0),m=E[s.harness],d=$(s.source),u=ns(s),p=Fs(s.raw);return e.jsxs(ps,{open:!0,onClose:t,side:"right",owner:"openscout.tail",resizable:!0,defaultSize:620,minSize:400,maxSize:960,ariaLabel:"Tail event detail",children:[e.jsxs("div",{className:"s-slide-header s-tail-sheet-header",children:[e.jsx("span",{className:`s-tail-glyph s-tail-glyph--${s.kind}`,children:ts[s.kind]}),e.jsx("span",{className:"s-tail-sheet-kind",children:as[s.kind]}),u&&e.jsx("span",{className:`s-tail-token s-tail-token--issue-${u}`,children:u==="error"?"✕":"△"}),e.jsxs("span",{className:"s-tail-token s-tail-token--harness",children:[e.jsx(A,{harness:s.source,size:12,title:null}),e.jsx("span",{className:"s-tail-harness-label",children:d})]}),e.jsx("span",{className:"s-tail-token s-tail-token--origin",title:`origin: ${m}`,children:ls[s.harness]}),e.jsx("span",{className:"s-slide-spacer"}),e.jsx("span",{className:"s-tail-sheet-time",children:P(s.ts)}),e.jsx("button",{type:"button",className:"s-slide-close",onClick:t,"aria-label":"Close",children:"×"})]}),e.jsxs("div",{className:"s-slide-body s-tail-sheet-body",children:[e.jsx("section",{className:"s-tail-sheet-section",children:e.jsxs("div",{className:"s-tail-sheet-grid",children:[e.jsx("span",{className:"s-tail-sheet-key",children:"project"}),e.jsx("span",{className:"s-tail-sheet-val",children:e.jsx(F,{className:"s-tail-link s-tail-link--project",onClick:r?()=>r(s.project):void 0,title:`Filter to ${s.project}`,children:s.project})}),e.jsx("span",{className:"s-tail-sheet-key",children:"cwd"}),e.jsx("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:s.cwd||"—"}),e.jsx("span",{className:"s-tail-sheet-key",children:"session"}),e.jsx("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:e.jsx(F,{className:"s-tail-link s-tail-link--session",onClick:o&&s.sessionId?()=>o(s.sessionId):void 0,title:s.sessionId?`Open session ${s.sessionId}`:void 0,children:s.sessionId||"—"})}),e.jsx("span",{className:"s-tail-sheet-key",children:"harness"}),e.jsxs("span",{className:"s-tail-sheet-val s-tail-sheet-val--harness",children:[e.jsx(A,{harness:s.source,size:13,title:null}),e.jsx("span",{children:d})]}),e.jsx("span",{className:"s-tail-sheet-key",children:"origin"}),e.jsx("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:m}),e.jsx("span",{className:"s-tail-sheet-key",children:"pid"}),e.jsxs("span",{className:"s-tail-sheet-val s-tail-sheet-val--mono",children:[s.pid,s.parentPid!=null?` ← ${s.parentPid}`:""]})]})}),e.jsxs("section",{className:"s-tail-sheet-section",children:[e.jsx("h4",{className:"s-tail-sheet-h",children:"summary"}),e.jsx("div",{className:"s-tail-sheet-summary",children:s.summary})]}),p&&p.length>0&&e.jsxs("section",{className:"s-tail-sheet-section",children:[e.jsx("h4",{className:"s-tail-sheet-h",children:"content"}),p.map((f,b)=>e.jsx(Os,{block:f},b))]}),e.jsxs("section",{className:"s-tail-sheet-section",children:[e.jsxs("button",{type:"button",className:"s-tail-sheet-toggle",onClick:()=>i(f=>!f),children:[l?"▾":"▸"," raw event"]}),l&&e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(s.raw??s)}})]})]})]})}function Os({block:s}){if(s.type==="text"){const t=s.text??"";return e.jsx("div",{className:"s-tail-sheet-text",children:t})}if(s.type==="tool_use"){const t=s;return e.jsxs("div",{className:"s-tail-sheet-block s-tail-sheet-block--tool",children:[e.jsxs("div",{className:"s-tail-sheet-block-head",children:[e.jsx("span",{className:"s-tail-glyph s-tail-glyph--tool",children:"*"}),e.jsx("span",{className:"s-tail-sheet-block-title",children:t.name??"tool_use"})]}),e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(t.input??{})}})]})}if(s.type==="tool_result"){const t=s,r=typeof t.content=="string";return e.jsxs("div",{className:`s-tail-sheet-block s-tail-sheet-block--tool-result${t.is_error?" s-tail-sheet-block--err":""}`,children:[e.jsxs("div",{className:"s-tail-sheet-block-head",children:[e.jsx("span",{className:"s-tail-glyph s-tail-glyph--tool-result",children:"="}),e.jsxs("span",{className:"s-tail-sheet-block-title",children:["tool_result",t.is_error?" · error":""]})]}),r?e.jsx("pre",{className:"s-tail-sheet-pre",children:t.content}):e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(t.content??{})}})]})}return e.jsxs("div",{className:"s-tail-sheet-block",children:[e.jsxs("div",{className:"s-tail-sheet-block-head",children:[e.jsx("span",{className:"s-tail-glyph s-tail-glyph--other",children:"·"}),e.jsx("span",{className:"s-tail-sheet-block-title",children:s.type})]}),e.jsx("pre",{className:"s-tail-sheet-json",dangerouslySetInnerHTML:{__html:M(s)}})]})}export{Fe as TailView};
|