@openscout/scout 0.2.78 → 0.2.79
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 +19 -0
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/ActivityScreen-DnqqRSlS.js +1 -0
- package/dist/client/assets/{AddProjectForm-DMnobKch.js → AddProjectForm-BoVtelSP.js} +1 -1
- package/dist/client/assets/{AgentAvatar-D90c1Rzk.js → AgentAvatar-CufDA4A-.js} +1 -1
- package/dist/client/assets/AgentConfigurationScreen-CJqoMA0J.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-FpEkb-tu.js +1 -0
- package/dist/client/assets/{AgentDetailCard-BcRBRp88.js → AgentDetailCard-DxxVkgT1.js} +1 -1
- package/dist/client/assets/AgentFloorView-CycUn0Lv.js +1 -0
- package/dist/client/assets/AgentInfoScreen-CAQAxpAK.js +1 -0
- package/dist/client/assets/{AgentLaneCard-RrNnDZu8.js → AgentLaneCard-DTUvE96I.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-D9ZwUKrl.js → AgentLaneChrome-BfVygkgL.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-BXbPls9N.js → AgentLaneDetailSheet-CWs9wKWk.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-BhFmGNzT.js → AgentLaneSummaryResize-CMgzYvAA.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BUCW4nUj.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-eSAoDsPi.js → AgentLanesPreflight-KWfLcaNB.js} +1 -1
- package/dist/client/assets/AgentLanesView-CxfbV8Kd.js +2 -0
- package/dist/client/assets/{AgentLiveActions-DBtnD0qE.js → AgentLiveActions-CZdAInEu.js} +1 -1
- package/dist/client/assets/{AgentSessions-DyqOf4nG.js → AgentSessions-Bkr0lyry.js} +2 -2
- package/dist/client/assets/AgentsConsole-WtFVqaPJ.js +1 -0
- package/dist/client/assets/AgentsScreen-BMXvuiA2.js +1 -0
- package/dist/client/assets/AgentsSubnav-BTNjPYoA.js +1 -0
- package/dist/client/assets/{AtopView-BCkae3e1.js → AtopView-_OKDlZ1h.js} +1 -1
- package/dist/client/assets/BackToPicker-CkUmHuuo.js +1 -0
- package/dist/client/assets/{BriefingDetailScreen-BwFyysT8.js → BriefingDetailScreen-i54EtZKW.js} +1 -1
- package/dist/client/assets/{BriefingsScreen-BQEevztH.js → BriefingsScreen-CBrHojlQ.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-7UjcuNjd.js → BrokerMetadataPanel-opTLuZU6.js} +1 -1
- package/dist/client/assets/{BrokerScreen-7ekklu88.js → BrokerScreen-CObCQvoy.js} +2 -2
- package/dist/client/assets/{ChatCollapsedStrip-CQSYSd8s.js → ChatCollapsedStrip-Dr2vmKXQ.js} +1 -1
- package/dist/client/assets/CodeDiffPane-CLOGjwul.js +1 -0
- package/dist/client/assets/{CodeProjectPicker-DqKFCpLU.js → CodeProjectPicker-DTV8hR6A.js} +1 -1
- package/dist/client/assets/CodeScreen-BXqi72NK.js +1 -0
- package/dist/client/assets/{ContextMenu-bARZqTzD.js → ContextMenu-BlBQhpax.js} +1 -1
- package/dist/client/assets/{ConversationComposer-Bla3DDvM.js → ConversationComposer-BBNPa5S9.js} +1 -1
- package/dist/client/assets/ConversationFeedRows-BuejHMCY.js +1 -0
- package/dist/client/assets/ConversationHeader-DXMT-YXv.js +1 -0
- package/dist/client/assets/ConversationPanels-DHCtilQF.js +2 -0
- package/dist/client/assets/ConversationScreen-DSxIt9pq.css +1 -0
- package/dist/client/assets/ConversationScreen-Dz2d_Z_F.js +1 -0
- package/dist/client/assets/ConversationStatus-DSgdVofa.js +1 -0
- package/dist/client/assets/{DataTable-E8s_MmoA.js → DataTable-0DwuXyvW.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-Dpe88DFX.js → DispatchAftermath-BrreQifA.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-BeVwwl26.js → DocumentFocusViewer-DU_9BHsD.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-BQqFQVnI.js → EmbeddableSurfacesLab-DdaswbfI.js} +1 -1
- package/dist/client/assets/{EmptyState-4F9XDFQm.js → EmptyState-CoL-QuUO.js} +1 -1
- package/dist/client/assets/{FileViewerPane-CLgUhSm4.js → FileViewerPane-C9Ly01Ef.js} +1 -1
- package/dist/client/assets/{FleetSearch-Dz5euQJe.js → FleetSearch-DlWTLl-v.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-C-9S0nA5.js +1 -0
- package/dist/client/assets/{FollowScreen-DZ4qfYOY.js → FollowScreen--Q04xSSE.js} +1 -1
- package/dist/client/assets/{HarnessMark-Cbv3Ib0c.js → HarnessMark-Dm_qm1Ku.js} +1 -1
- package/dist/client/assets/HarnessesScreen-Y54viPX8.js +1 -0
- package/dist/client/assets/{HomeHero-B3uYd-pP.js → HomeHero-Cfsow7qL.js} +1 -1
- package/dist/client/assets/KnowledgeSearchInspector-DKashKoH.js +1 -0
- package/dist/client/assets/KnowledgeSearchScreen-DsdDz8wY.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-Bla0gBdm.js → LaneToolHoverCard-BzehBmdi.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-CBf_aNZx.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-BF9ERP5O.js → LaneTraceEventFocus-DYvHfs_3.js} +1 -1
- package/dist/client/assets/{MeshCanvas-DFEPkpqY.js → MeshCanvas-DIjlrMPU.js} +2 -2
- package/dist/client/assets/{MeshCanvasMinimap-CyVFYixr.js → MeshCanvasMinimap-DEq-PkF0.js} +1 -1
- package/dist/client/assets/MeshScreen-TgDtz-1l.js +1 -0
- package/dist/client/assets/{MeshTopologyView-CalkZghg.js → MeshTopologyView-BMHpH5BU.js} +2 -2
- package/dist/client/assets/{MessageComposerSuggestions-DpxN9WiB.js → MessageComposerSuggestions-zAUUcLOv.js} +1 -1
- package/dist/client/assets/MessagesScreen-BTQL0UcE.js +1 -0
- package/dist/client/assets/{MissionControlView-lUeAiSVg.js → MissionControlView-D59SPnAm.js} +1 -1
- package/dist/client/assets/{MissionFocusOverlay-wlCmWDCT.js → MissionFocusOverlay-C7cPt6eU.js} +1 -1
- package/dist/client/assets/MissionLeftAgentRow-CxlH3dON.js +1 -0
- package/dist/client/assets/{MissionLogPane-__MVtEl9.js → MissionLogPane-Ye3YlF9s.js} +1 -1
- package/dist/client/assets/{NewAgentModal-Bg-eWHpY.js → NewAgentModal-DprvD4EK.js} +1 -1
- package/dist/client/assets/NewChatComposer-B5FnPyzS.js +19 -0
- package/dist/client/assets/{NewChatOrigin-Bk2OyVjI.js → NewChatOrigin--pHWUb4V.js} +1 -1
- package/dist/client/assets/ObserveEmbedScreen-CfvrnOiZ.js +2 -0
- package/dist/client/assets/{ObserveTextFlow-rsFj_rVo.js → ObserveTextFlow-CBitljxi.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-DyUeV98H.js → ObservedTopologyPanel-Dv6fbHzW.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-BIp0WitK.js +87 -0
- package/dist/client/assets/OpsAgentsView-CoBfAigH.js +1 -0
- package/dist/client/assets/OpsScreen-Bbo0W64T.js +1 -0
- package/dist/client/assets/OpsSubnav-CoN8utF8.js +1 -0
- package/dist/client/assets/{PlanView-C1CjH3PG.js → PlanView-DYtt8H37.js} +1 -1
- package/dist/client/assets/ProjectAgentProfile-FiiIcB5R.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-CtTpj6fU.js → ProjectAgentProfileBar-B3IvVbqS.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-D5E8yvDj.js +1 -0
- package/dist/client/assets/ProjectsInbox-BWiXjGi7.js +2 -0
- package/dist/client/assets/{ProjectsRail-BgiuV4LR.js → ProjectsRail-DEDS-M1c.js} +1 -1
- package/dist/client/assets/ProjectsScreen-Cxk4CuYn.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-BF66ugT5.js +1 -0
- package/dist/client/assets/Provider-tFc3jqZ4.js +1 -0
- package/dist/client/assets/{RailRow-BoGxAHNF.js → RailRow-BTlVAnHS.js} +1 -1
- package/dist/client/assets/RawSessionsTable-BsGVgZB3.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-B0Bem5Rc.js +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-C0rumUME.js → RepoDiffEmbedScreen-CtTdlQ2A.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-DMv6DioL.js → RepoDiffPageScreen-BRvaVYoC.js} +1 -1
- package/dist/client/assets/RepoDiffViewer-Bo0gREMj.js +7 -0
- package/dist/client/assets/RepoDiffViewerLazy-C8UPk4oo.js +2 -0
- package/dist/client/assets/{ReposScreen-CB_YBWYf.js → ReposScreen-BBkJf8xT.js} +2 -2
- package/dist/client/assets/{ScoutDeckSurface-CxIYFyWx.js → ScoutDeckSurface-Bi9ov9Bm.js} +1 -1
- package/dist/client/assets/{ScoutSurface-CYz_TcWC.js → ScoutSurface-DEQg_7Io.js} +1 -1
- package/dist/client/assets/{ScoutbotBroadcastChip-L_R9atj0.js → ScoutbotBroadcastChip-DJXuyn73.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-CgiZMDMW.js → ScoutbotFxLab-BgsuLDjo.js} +1 -1
- package/dist/client/assets/{ScoutbotRealtimeVoiceCall-FMQOr1Np.js → ScoutbotRealtimeVoiceCall-Bzyl0BCS.js} +1 -1
- package/dist/client/assets/{SecondaryNav-B3-nh5dM.js → SecondaryNav-Bks0CO2h.js} +1 -1
- package/dist/client/assets/SessionEmbedScreen-b0Zgmfx5.js +1 -0
- package/dist/client/assets/SessionObserve-CLrHfAKZ.css +1 -0
- package/dist/client/assets/SessionObserve-Dlx5vDaV.js +12 -0
- package/dist/client/assets/SessionObserveEvidence-ChBD1d4c.js +1 -0
- package/dist/client/assets/SessionRefScreen-D7TfPYPN.js +1 -0
- package/dist/client/assets/SessionsScreen-BlknOWAd.js +1 -0
- package/dist/client/assets/{SettingsDrawer-XfdAa_nD.js → SettingsDrawer-C587L1i1.js} +3 -3
- package/dist/client/assets/SettingsDrawer-UX7pFJU_.css +1 -0
- package/dist/client/assets/SettingsScreen-BIlYxv_a.js +1 -0
- package/dist/client/assets/{ShikiPane-Ap1iPxYb.js → ShikiPane-I_OTW5NO.js} +1 -1
- package/dist/client/assets/{SlidePanel-COwtoJqR.js → SlidePanel-FCqT1zO3.js} +1 -1
- package/dist/client/assets/SpriteAvatar-CQs-jC-v.js +1 -0
- package/dist/client/assets/{StatusPill-DhBL__p8.js → StatusPill-CbABggnQ.js} +1 -1
- package/dist/client/assets/{TailView-DGj_5HA9.js → TailView-C_MXVSum.js} +2 -2
- package/dist/client/assets/Terminal-DwZyo8kA.js +1 -0
- package/dist/client/assets/TerminalEmbedScreen-Czp3tQyd.js +1 -0
- package/dist/client/assets/{TextDocumentSurface-BpAw4eQS.js → TextDocumentSurface-C-9EtYqt.js} +1 -1
- package/dist/client/assets/{TmuxPeek-m1osv33Q.js → TmuxPeek-Dz1gJ2pU.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-DsK53ar4.js → VoicePermissionsPanel-MfICy9kk.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-Bx0JimPC.js → WorkDetailScreen-Cs7kdllj.js} +3 -3
- package/dist/client/assets/{WorkFilesViewer-Btl6C2Q1.js → WorkFilesViewer-CF-nhtZ4.js} +1 -1
- package/dist/client/assets/{activity-CA8qS6PI.js → activity-WhBf3FXP.js} +1 -1
- package/dist/client/assets/{addon-fit-BZ-kXjeN.js → addon-fit-q-x_HytU.js} +1 -1
- package/dist/client/assets/{addon-webgl-D9-EQVEK.js → addon-webgl-fhhvEA9h.js} +1 -1
- package/dist/client/assets/{agent-essentials-BSY1o46q.js → agent-essentials-DyJiUGpZ.js} +1 -1
- package/dist/client/assets/agent-identity-xQHedtLl.js +1 -0
- package/dist/client/assets/agent-lane-card-BkWVDYM8.css +1 -0
- package/dist/client/assets/{agent-lane-card-model-r2frk57c.js → agent-lane-card-model-BCIwPjEh.js} +1 -1
- package/dist/client/assets/{agent-lane-detail-Djm3YJEa.js → agent-lane-detail-Cw4QVAgH.js} +1 -1
- package/dist/client/assets/{agent-lane-preview-CmHVe3dU.js → agent-lane-preview-BtnfNyFR.js} +1 -1
- package/dist/client/assets/{agent-lanes-model-B4YTt4OF.js → agent-lanes-model-Bl6xfviL.js} +1 -1
- package/dist/client/assets/{arc.es-CQBb-dVu.js → arc.es-DPJ0xRV6.js} +1 -1
- package/dist/client/assets/{arrow-down-BPLe0am9.js → arrow-down-DsD-dYj-.js} +1 -1
- package/dist/client/assets/{arrow-left-DEZzHiPS.js → arrow-left-WjQIN9J6.js} +1 -1
- package/dist/client/assets/{arrow-up-right-ClxBnsi7.js → arrow-up-right-CtTDrZJr.js} +1 -1
- package/dist/client/assets/{bot-eu8pBNvI.js → bot-B_Uzf4_O.js} +1 -1
- package/dist/client/assets/{check-DjgFiBxb.js → check-BbgHJX8u.js} +1 -1
- package/dist/client/assets/{chevron-down-BGk5qoEw.js → chevron-down-BFai6ZfE.js} +1 -1
- package/dist/client/assets/{chevron-right-XiIHsk4m.js → chevron-right-CyUa1zXx.js} +1 -1
- package/dist/client/assets/chunk-HRAB3GC3-CvwpNg-G.js +1 -0
- package/dist/client/assets/{chunk-T65CQEWV-CrzwSeEt.js → chunk-T65CQEWV-DI4NKdNq.js} +1 -1
- package/dist/client/assets/{chunk-YOZR3KYS-Bet8khjg.js → chunk-YOZR3KYS-BW85tiCr.js} +3 -3
- package/dist/client/assets/clock-DviOalxA.js +1 -0
- package/dist/client/assets/{code-xml-B6jOCM4V.js → code-xml-05TD3uOC.js} +1 -1
- package/dist/client/assets/content-2u_eV3fX.js +1 -0
- package/dist/client/assets/content-5irOghrY.js +1 -0
- package/dist/client/assets/content-8Z_0CwtD.js +1 -0
- package/dist/client/assets/content-B38YRDBu.js +1 -0
- package/dist/client/assets/content-BE3uK0LB.js +1 -0
- package/dist/client/assets/{content-C2EwTb2y.js → content-BtIxSqVY.js} +1 -1
- package/dist/client/assets/content-CFsPAihU.js +1 -0
- package/dist/client/assets/content-CKj5g5tu.js +1 -0
- package/dist/client/assets/{content-D5kJmfgl.js → content-CLDWXf9Z.js} +1 -1
- package/dist/client/assets/content-CRr73E0r.js +1 -0
- package/dist/client/assets/content-CVR75_Uj.js +1 -0
- package/dist/client/assets/content-Czdp7_JQ.js +1 -0
- package/dist/client/assets/content-D0_EJ6nP.js +1 -0
- package/dist/client/assets/content-DNmxpNhD.js +1 -0
- package/dist/client/assets/content-XpbI9uxd.js +1 -0
- package/dist/client/assets/content-cyxWdgKQ.js +1 -0
- package/dist/client/assets/{context-budget-CbB4BDcO.js → context-budget-DX_fwUs3.js} +1 -1
- package/dist/client/assets/{conversation-icons-IIG5ha6D.js → conversation-icons-DohQL6GI.js} +1 -1
- package/dist/client/assets/conversation-model-C4yb6_FA.js +1 -0
- package/dist/client/assets/conversation-motion-features-CifSdJtm.js +1 -0
- package/dist/client/assets/{copy-CQGYbxdu.js → copy-CwCAivnc.js} +1 -1
- package/dist/client/assets/{createLucideIcon-OpA4Amw5.js → createLucideIcon-DlxlBfLC.js} +1 -1
- package/dist/client/assets/discover-DoiAJo4Z.js +2 -0
- package/dist/client/assets/embed-entry-D1Or9S4d.js +2 -0
- package/dist/client/assets/{external-link-CXBytO9o.js → external-link-CnjcXf32.js} +1 -1
- package/dist/client/assets/{eye-0PvebX_a.js → eye-So8tNNK6.js} +1 -1
- package/dist/client/assets/{file-text-BODxCjcz.js → file-text-i3xTDUjJ.js} +1 -1
- package/dist/client/assets/{gestures-CcwOTu8C.js → gestures-CgvAMd6F.js} +1 -1
- package/dist/client/assets/{home-moving-signal-CK147hxn.js → home-moving-signal-BdkERL6B.js} +1 -1
- package/dist/client/assets/home-now-card-lLkv6nQs.js +1 -0
- package/dist/client/assets/{home-now-card-nano-BcjnOU9H.js → home-now-card-nano-CkLHUQ4J.js} +1 -1
- package/dist/client/assets/hooks-BPLDD9yu.js +2 -0
- package/dist/client/assets/inbox-thread-redesign-B_1ocqaX.css +1 -0
- package/dist/client/assets/index-DGoLx89y.js +1 -0
- package/dist/client/assets/index-DITWsjFb.css +1 -0
- package/dist/client/assets/index-m6dFtY5f.js +1 -0
- package/dist/client/assets/index-pY8-Mz7y.js +1 -0
- package/dist/client/assets/{index-DMiGbrBt.js → index-sUomXsrf.js} +6 -6
- package/dist/client/assets/{inspector-panel-DPoCWxKs.js → inspector-panel-DhXd-YbT.js} +2 -2
- package/dist/client/assets/{keyboard-nav-2kv_tGUS.js → keyboard-nav-BhZZ5HEq.js} +1 -1
- package/dist/client/assets/knowledge-search-D_bLoYtC.css +1 -0
- package/dist/client/assets/{lane-observe-D0rfKDnU.js → lane-observe-DrhKkQ3A.js} +1 -1
- package/dist/client/assets/{lane-roster-store-D8x1jac2.js → lane-roster-store-NE15Oe6M.js} +1 -1
- package/dist/client/assets/left-B6eawimv.js +1 -0
- package/dist/client/assets/left-BL2uBHe0.js +2 -0
- package/dist/client/assets/left-BNJguPDG.js +1 -0
- package/dist/client/assets/left-BvCtvN0f.js +1 -0
- package/dist/client/assets/left-CfBb6bxM.js +1 -0
- package/dist/client/assets/left-DTrlBF0h.js +2 -0
- package/dist/client/assets/left-agents-DsOHgDCY.js +1 -0
- package/dist/client/assets/left-d4hlBBxY.js +1 -0
- package/dist/client/assets/left-default-BRCwoCJr.js +1 -0
- package/dist/client/assets/left-lanes-DNtoRzoV.js +1 -0
- package/dist/client/assets/left-mission-DsTu2X5Y.js +1 -0
- package/dist/client/assets/left-plan-CtySjsXC.js +2 -0
- package/dist/client/assets/library-CLpgWNJO.js +1 -0
- package/dist/client/assets/{loader-circle-CbHjZsz1.js → loader-circle-lWOOKezu.js} +1 -1
- package/dist/client/assets/{local-agents--00gLMqr.js → local-agents-C7fDHLVC.js} +1 -1
- package/dist/client/assets/{mentions-jSuTGeet.js → mentions-CY_wPZc5.js} +1 -1
- package/dist/client/assets/mesh-ops-B1kDjizF.css +1 -0
- package/dist/client/assets/mesh-ops-Kn8pCtyJ.js +1 -0
- package/dist/client/assets/{mesh-view-store-CWidRbTE.js → mesh-view-store-D14ihwkF.js} +1 -1
- package/dist/client/assets/{message-circle-CG-96zts.js → message-circle-C5UZ6fO7.js} +1 -1
- package/dist/client/assets/{message-markup-3J9pi3nx.js → message-markup-C8Nx04sP.js} +1 -1
- package/dist/client/assets/{message-square-DSaGpjFU.js → message-square-BD-4UUdc.js} +1 -1
- package/dist/client/assets/{mission-control-store-BlnEhiCq.js → mission-control-store-xQHVQdm8.js} +1 -1
- package/dist/client/assets/{model-CpAxGuis.js → model-IGCUEsMy.js} +1 -1
- package/dist/client/assets/{observe-CuLGD9Zp.js → observe-uJfIlIUV.js} +1 -1
- package/dist/client/assets/{page-status-DpkedE1F.js → page-status-BymFEFai.js} +1 -1
- package/dist/client/assets/paperclip-DL9BXPp2.js +1 -0
- package/dist/client/assets/{plus--b1raV_O.js → plus-C9lTjsgd.js} +1 -1
- package/dist/client/assets/profile-BqY5tesX.js +1 -0
- package/dist/client/assets/{projects-inbox-CHyUFQ6w.js → projects-inbox-DfVmGFFk.js} +1 -1
- package/dist/client/assets/{radio-Bz8ZePxj.js → radio-DedMyP8J.js} +1 -1
- package/dist/client/assets/{refresh-cw-BBmAnCB7.js → refresh-cw-D8PFyhUa.js} +1 -1
- package/dist/client/assets/repo-diff-DyYmQMSA.css +1 -0
- package/dist/client/assets/resolve-panes-1xeZMuaw.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-PLr32WHN.js +1 -0
- package/dist/client/assets/right-1x7HzabC.js +1 -0
- package/dist/client/assets/{right-DjRXbnRP.js → right-C1sIsSHR.js} +1 -1
- package/dist/client/assets/right-CFzPUzlF.js +1 -0
- package/dist/client/assets/right-CRKyeJDk.js +1 -0
- package/dist/client/assets/right-CagzkLWg.js +1 -0
- package/dist/client/assets/right-CsV149pN.js +1 -0
- package/dist/client/assets/right-DITNyG2s.js +1 -0
- package/dist/client/assets/right-E3nNcLE3.js +1 -0
- package/dist/client/assets/right-eUQvSjd7.js +1 -0
- package/dist/client/assets/right-ozp4nM44.js +1 -0
- package/dist/client/assets/{rocket-BSNS_rLs.js → rocket-CriBwkHM.js} +1 -1
- package/dist/client/assets/router-Dja9_ygK.js +1 -0
- package/dist/client/assets/{runtime-picker-Bcl5iIX5.js → runtime-picker-DOZpZOlt.js} +1 -1
- package/dist/client/assets/{scope-views-U-ucT9m0.js → scope-views-BF_RvGKU.js} +1 -1
- package/dist/client/assets/{scout-voice-CU5c0LGi.js → scout-voice-BZ4KqADJ.js} +1 -1
- package/dist/client/assets/{scroll-text-D6Pdnar7.js → scroll-text-BIYf6g6N.js} +1 -1
- package/dist/client/assets/{search-CWfZtOt2.js → search-DCT_EvPr.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-Drb7wPG4.js +1 -0
- package/dist/client/assets/{selection-bridge-16pk1qyG.js → selection-bridge-CJOTyYQs.js} +1 -1
- package/dist/client/assets/{send-horizontal-Bg5-QggH.js → send-horizontal-DDwOgEs3.js} +1 -1
- package/dist/client/assets/{server-CPp4ZJhZ.js → server-CHZCp3cF.js} +1 -1
- package/dist/client/assets/{session-catalog-BmoyVTJ_.js → session-catalog-XhGxCtP-.js} +1 -1
- package/dist/client/assets/{session-table-DZcrKoIH.js → session-table-sAVe44a4.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-1oW76Xc9.js → sliders-horizontal-B9Nj-Y4J.js} +1 -1
- package/dist/client/assets/sparkles-up7pVlX-.js +1 -0
- package/dist/client/assets/{sse-CjIkKo46.js → sse-CVoGDiKW.js} +1 -1
- package/dist/client/assets/{tail-events-D19uAGe3.js → tail-events-CTipUIli.js} +1 -1
- package/dist/client/assets/{terminal-B9AOZQKR.js → terminal-DXQISjZn.js} +1 -1
- package/dist/client/assets/{terminal-relay-CWbJ1RCW.js → terminal-relay-B5Sma7fK.js} +1 -1
- package/dist/client/assets/{terminal-takeover-B8UeD9OX.js → terminal-takeover-X97KCSJk.js} +1 -1
- package/dist/client/assets/{time-DltNTpLl.js → time-Dhsh_2EG.js} +1 -1
- package/dist/client/assets/{use-conversation-list-Byab41G6.js → use-conversation-list-B1T6J_qE.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-BIbQx5AS.js → use-fleet-active-asks-DLofGhhK.js} +1 -1
- package/dist/client/assets/use-mesh-ops-items-ByGZk8rU.js +1 -0
- package/dist/client/assets/{use-reduced-motion-RRBkmVkk.js → use-reduced-motion-Cvk-HRKg.js} +1 -1
- package/dist/client/assets/use-scout-dev-flags-BHvg3G2c.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-DMrbBif0.js → useAgentHoverCard-D5e8Qg1z.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-ZfBNi3d4.js +1 -0
- package/dist/client/assets/usePierreRuntime-DIVunfX0.js +50 -0
- package/dist/client/assets/{wrench-Bkc_0lKF.js → wrench-pEVd8JnN.js} +1 -1
- package/dist/client/assets/{x-D3GElQbe.js → x-0XjXwGqq.js} +1 -1
- package/dist/client/assets/{xterm-BKR8oAkR.js → xterm-CRLlV1Xp.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/drizzle/0007_lean_venus.sql +26 -0
- package/dist/drizzle/0008_luxuriant_ted_forrester.sql +1 -0
- package/dist/drizzle/meta/0007_snapshot.json +5767 -0
- package/dist/drizzle/meta/0008_snapshot.json +5774 -0
- package/dist/drizzle/meta/_journal.json +14 -0
- package/dist/main.mjs +27836 -4437
- package/dist/node/main.mjs +31770 -12098
- package/dist/pairing-runtime-controller.mjs +37653 -16847
- package/dist/runtime/base-daemon.mjs +109 -18
- package/dist/runtime/broker-daemon.mjs +22018 -2739
- package/dist/runtime/broker-process-manager.mjs +122 -12
- package/dist/runtime/mesh-discover.mjs +90 -13
- package/dist/scout-control-plane-web.mjs +22453 -3299
- package/dist/scout-web-server.mjs +22453 -3299
- package/dist/statusline.mjs +2 -0
- package/package.json +3 -1
- package/dist/client/assets/ActivityScreen-Cu_1V4bq.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-BqfOz90D.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-CUpUrY57.js +0 -1
- package/dist/client/assets/AgentFloorView-8LoAEBwS.js +0 -1
- package/dist/client/assets/AgentInfoScreen-DZs2_ibL.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-W3qs022h.js +0 -1
- package/dist/client/assets/AgentLanesView-B9vuEEmZ.js +0 -2
- package/dist/client/assets/AgentsConsole-BgiYP2wR.js +0 -1
- package/dist/client/assets/AgentsScreen-DBi8x4MB.js +0 -1
- package/dist/client/assets/AgentsSubnav-DIEO4NPx.js +0 -1
- package/dist/client/assets/BackToPicker-BRvfostO.js +0 -1
- package/dist/client/assets/CodeDiffPane-DDPt6KPh.js +0 -1
- package/dist/client/assets/CodeScreen-BxCrpRHd.js +0 -1
- package/dist/client/assets/ConversationFeedRows-B_gPxcqA.js +0 -1
- package/dist/client/assets/ConversationHeader-DE3FC0m-.js +0 -1
- package/dist/client/assets/ConversationPanels-DLek4H6A.js +0 -2
- package/dist/client/assets/ConversationScreen-BDRhx-RU.js +0 -1
- package/dist/client/assets/ConversationScreen-C9yMAMYF.css +0 -1
- package/dist/client/assets/ConversationStatus-BwVLiiO4.js +0 -1
- package/dist/client/assets/FlightObserveScreen-6RpZYwVz.js +0 -1
- package/dist/client/assets/HarnessesScreen-CznAImej.js +0 -1
- package/dist/client/assets/KnowledgeSearchInspector-Dgdkfvvz.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-DJDGGaqC.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-D1CspRbl.js +0 -1
- package/dist/client/assets/MeshScreen-DFgevn8N.js +0 -1
- package/dist/client/assets/MessagesScreen-C8YKW10Y.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-BpZWntfl.js +0 -1
- package/dist/client/assets/NewChatComposer-Cs6OsxK6.js +0 -19
- package/dist/client/assets/ObserveEmbedScreen-y2EpuqRZ.js +0 -2
- package/dist/client/assets/OpenScoutAppShell-C_URc8sV.js +0 -87
- package/dist/client/assets/OpsAgentsView-UN7iOscs.js +0 -1
- package/dist/client/assets/OpsScreen-Buf3LKjb.js +0 -1
- package/dist/client/assets/OpsSubnav-DsuXzHah.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-DJusrAV-.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-BFwNJo_N.js +0 -1
- package/dist/client/assets/ProjectsInbox-GhVMxOhw.js +0 -2
- package/dist/client/assets/ProjectsScreen-eNUBy4YU.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-CoBgnHmr.js +0 -1
- package/dist/client/assets/Provider-C7UKGHQy.js +0 -1
- package/dist/client/assets/RawSessionsTable-DL8y_eEy.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-ffS-39zy.js +0 -1
- package/dist/client/assets/RepoDiffViewer-D_exm6xK.js +0 -7
- package/dist/client/assets/RepoDiffViewerLazy-BPgF92Bg.js +0 -2
- package/dist/client/assets/SessionEmbedScreen-BVC7yvWF.js +0 -1
- package/dist/client/assets/SessionObserve-BpggNO_M.css +0 -1
- package/dist/client/assets/SessionObserve-yfXFafp8.js +0 -12
- package/dist/client/assets/SessionRefScreen-DRgJu7Jo.js +0 -1
- package/dist/client/assets/SessionsScreen-D6XUsZfA.js +0 -1
- package/dist/client/assets/SettingsDrawer-CmJt72ww.css +0 -1
- package/dist/client/assets/SettingsScreen-Cy8z-EuR.js +0 -1
- package/dist/client/assets/SpriteAvatar-DyaGuhik.js +0 -1
- package/dist/client/assets/Terminal-CqvGbjXU.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-DuZZFFzW.js +0 -1
- package/dist/client/assets/agent-lane-card-Dm7YWoew.css +0 -1
- package/dist/client/assets/content-BDt9VBPk.js +0 -1
- package/dist/client/assets/content-BIXf4cKR.js +0 -1
- package/dist/client/assets/content-BLm0NBJM.js +0 -1
- package/dist/client/assets/content-C5UbLsDF.js +0 -1
- package/dist/client/assets/content-CR3vdrYY.js +0 -1
- package/dist/client/assets/content-CSPVmo2s.js +0 -1
- package/dist/client/assets/content-C_FGqx1X.js +0 -1
- package/dist/client/assets/content-CvlVUOG8.js +0 -1
- package/dist/client/assets/content-DTpQsomG.js +0 -1
- package/dist/client/assets/content-DikVsqLf.js +0 -1
- package/dist/client/assets/content-DlUe5Ono.js +0 -1
- package/dist/client/assets/content-GIBv_55n.js +0 -1
- package/dist/client/assets/content-Q2oclDzi.js +0 -1
- package/dist/client/assets/conversation-model-B47vYmWN.js +0 -1
- package/dist/client/assets/conversation-motion-features-BdAONVls.js +0 -1
- package/dist/client/assets/discover-C1YwpBDE.js +0 -2
- package/dist/client/assets/embed-entry-BAcGL3g9.js +0 -2
- package/dist/client/assets/home-now-card-BgvNWuea.js +0 -1
- package/dist/client/assets/hooks-B6y_O2FB.js +0 -2
- package/dist/client/assets/inbox-thread-redesign-Bz4FjWzr.css +0 -1
- package/dist/client/assets/index-BcuhqXLe.js +0 -1
- package/dist/client/assets/index-CJXzfjo9.js +0 -1
- package/dist/client/assets/index-DQPvraRS.js +0 -1
- package/dist/client/assets/index-DxGoC5l5.css +0 -1
- package/dist/client/assets/knowledge-search-CVxQwxPn.js +0 -1
- package/dist/client/assets/knowledge-search-DjrQdiiW.css +0 -1
- package/dist/client/assets/left-C--GiIh8.js +0 -2
- package/dist/client/assets/left-Cj7Rt89X.js +0 -1
- package/dist/client/assets/left-CpNEtFEg.js +0 -1
- package/dist/client/assets/left-CzXAuK_t.js +0 -2
- package/dist/client/assets/left-agents-Bo9sO1by.js +0 -1
- package/dist/client/assets/left-bN4PCAXa.js +0 -1
- package/dist/client/assets/left-default-DV9GdvYi.js +0 -1
- package/dist/client/assets/left-jYYGAOYD.js +0 -1
- package/dist/client/assets/left-lanes-D0l_Co7V.js +0 -1
- package/dist/client/assets/left-mission-Ci7zREkQ.js +0 -1
- package/dist/client/assets/left-plan-D4U1uflW.js +0 -2
- package/dist/client/assets/library-D-RxGiCw.js +0 -1
- package/dist/client/assets/profile-CVRziEDA.js +0 -1
- package/dist/client/assets/repo-diff-C9Qs-bEn.css +0 -1
- package/dist/client/assets/resolve-panes-r9B3mpW7.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-DcG8xGaB.js +0 -1
- package/dist/client/assets/right-BHeiIaty.js +0 -1
- package/dist/client/assets/right-BkgKo9VT.js +0 -1
- package/dist/client/assets/right-BpEU5jWE.js +0 -1
- package/dist/client/assets/right-CRZXoy-X.js +0 -1
- package/dist/client/assets/right-ChF_pbPy.js +0 -1
- package/dist/client/assets/right-DMoUT3KN.js +0 -1
- package/dist/client/assets/right-T4Ue6EqM.js +0 -1
- package/dist/client/assets/right-wzrLXKur.js +0 -1
- package/dist/client/assets/router-Bq5dwf78.js +0 -1
- package/dist/client/assets/secondaryNavConfig-DqUIp0Es.js +0 -1
- package/dist/client/assets/sparkles-ClfRJQ6w.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-DMl1WNm7.js +0 -1
- package/dist/client/assets/usePierreRuntime-wC-yMtBb.js +0 -50
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as x}from"./index-DMiGbrBt.js";import{b as k,p as D,V as A,D as q}from"./fx-z37u1o2z.js";function le(t){return t?t.hint?`${t.message} ${t.hint}`:t.message:"Scout voice is unavailable."}async function pe(t={}){const e=await fetch("/api/voice/engage",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(e.status===404)return j(t);if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(g(n,e.status))}return await e.json()}async function j(t={}){const e=await ce(),n=e.settings,i=e.devices,r=i.length>0||(n.permissions?.length??0)>0,o=n.permissions?.find(f=>f.kind==="microphone")??null,a=n.permissions?.find(f=>f.kind==="speechRecognition")??null,u=U(n,i);if(t.requestPermissions&&(o&&!o.granted&&o.status!=="restricted"?await C("microphone").catch(()=>{}):(o?.granted??!1)&&a&&!a.granted&&a.status!=="restricted"&&await C("speechRecognition").catch(()=>{})),!r)return{ready:!1,issue:{code:"host_offline",title:"Scout Menu is not running",message:"Launch Scout Menu on this Mac to dictate in web chat.",hint:"Restart the web server if you just updated Scout — `scout server restart` or restart `bun run server/index.ts`.",action:"launch_host"},warnings:[],settings:n,devices:i,inputDevice:null,hostOnline:!1};const h=$(o);if(h)return{ready:!1,issue:h,warnings:[],settings:n,devices:i,inputDevice:u,hostOnline:r};if(!u)return{ready:!1,issue:{code:"no_input_device",title:"No microphone detected",message:"Scout Menu did not report any audio input devices.",hint:"Plug in a microphone, check Sound settings, then refresh Settings → Voice.",action:"open_voice_settings"},warnings:[],settings:n,devices:i,inputDevice:null,hostOnline:r};const d=F(a);return{ready:!0,issue:null,warnings:d?[d]:[],settings:n,devices:i,inputDevice:u,hostOnline:r}}function U(t,e){if(e.length===0)return null;const n=t.inputDeviceId?e.find(o=>o.id===t.inputDeviceId):null,i=e.find(o=>o.isDefault)??e[0]??null,r=n??i;return r?{id:r.id,name:r.name}:null}function $(t){return!t||t.granted?null:t.canRequest?{code:"microphone_not_requested",title:"Microphone access needed",message:"Scout Menu needs microphone access before dictation can start.",hint:"Request access or tap the mic again to show the macOS prompt.",action:"request_microphone"}:{code:"microphone_denied",title:"Microphone blocked",message:"Scout Menu cannot record because microphone access is off.",hint:"Scout is opening macOS Microphone settings and will detect the change automatically.",action:"open_microphone_settings"}}function F(t){return!t||t.granted?null:t.canRequest?{code:"speech_not_requested",title:"Speech recognition needed",message:"Scout Menu needs speech recognition for live partials.",hint:"Request access to show the macOS prompt.",action:"request_speech"}:{code:"speech_denied",title:"Speech recognition blocked",message:"Speech recognition is off for Scout Menu.",hint:"Choose Retry access to reopen macOS Speech Recognition settings.",action:"open_speech_settings"}}function N(t,e){switch(e){case"microphone_permission":return"Microphone access is off for Scout Menu. Tap the mic to retry; Scout will open macOS Microphone settings.";case"empty_transcript":return"No speech was detected. Check your microphone input in Settings → Voice.";default:return t}}const H=6e4,G=3e3,J=2e4,z=8e3,B=45e3;let M=null,E=null,l=null,_=!1;const R=new Set;function W(){return typeof window>"u"?!1:typeof fetch=="function"}function X(){return M||(M=new K),M}function he(t){return R.add(t),l&&t(l),()=>{R.delete(t)}}function fe(){if(_||!W())return;_=!0;const t=X();t.probe();const e=()=>{t.probeIfStale()};window.addEventListener("focus",e),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function I(t){for(const e of R)e(t)}function O(t,e=Date.now()){const n=t.ok?J:z;return e-t.probedAt<n}class K{state="unknown";unavailableReason=null;captureMode=null;hostReachable=!1;microphoneGranted=null;microphoneCanRequest=null;get connectionState(){return this.state}get lastUnavailableReason(){return this.unavailableReason}get preferredCaptureMode(){return this.captureMode}get isVoiceHostReachable(){return this.hostReachable}get isMicrophoneGranted(){return this.microphoneGranted}get canRequestMicrophone(){return this.hostReachable&&this.microphoneGranted===!1&&this.microphoneCanRequest===!0}get isMicrophoneHardDenied(){return this.hostReachable&&this.microphoneGranted===!1&&this.microphoneCanRequest===!1}get isMicrophoneDenied(){return this.isMicrophoneHardDenied}async probeIfStale(){const e=Date.now();return l&&O(l,e)?(this.applyProbeSnapshot(l),l.ok):l&&l.ok&&e-l.probedAt<B?(this.applyProbeSnapshot(l),!0):l&&!l.ok?this.probe({force:!0}):this.probe()}async probe(e={}){const n=typeof e=="number"?{timeoutMs:e}:e,i=n.force??!1,r=n.timeoutMs??G,o=Date.now();return!i&&l&&O(l,o)?(this.applyProbeSnapshot(l),l.ok):E||(this.state="probing",E=this.fetchProbe(r).finally(()=>{E=null}),E)}async fetchProbe(e){const n=new AbortController,i=window.setTimeout(()=>n.abort(),e);try{const r=await fetch("/api/voice/health?quiet=1",{signal:n.signal}),o=await r.json().catch(()=>({})),a=!!o.host?.hostId,u=typeof o.microphoneGranted=="boolean"?o.microphoneGranted:null,h=typeof o.microphoneCanRequest=="boolean"?o.microphoneCanRequest:null,d=o.capture==="browser"?"browser":"native",f=r.ok&&o.ok===!0,v=f?null:o.detail??o.error??(a?"Scout voice is not ready.":"Scout voice service is unavailable."),w={ok:f,reason:v,captureMode:f?d:null,hostReachable:a,microphoneGranted:u,microphoneCanRequest:h,probedAt:Date.now()};return l=w,this.applyProbeSnapshot(w),I(w),f}catch(r){const a={ok:!1,reason:r instanceof Error&&r.name==="AbortError"?"Scout voice service did not respond.":"Scout voice service is unavailable.",captureMode:null,hostReachable:!1,microphoneGranted:null,microphoneCanRequest:null,probedAt:Date.now()};return l=a,this.applyProbeSnapshot(a),I(a),!1}finally{window.clearTimeout(i)}}applyProbeSnapshot(e){if(this.hostReachable=e.hostReachable,this.microphoneGranted=e.microphoneGranted,this.microphoneCanRequest=e.microphoneCanRequest,e.ok){this.unavailableReason=null,this.captureMode=e.captureMode,this.state="connected";return}this.unavailableReason=e.reason,this.captureMode=null,this.state="unavailable"}async launch(e={}){try{const i=await(await fetch("/api/scout-services/restart-link",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({target:"all"})})).json().catch(()=>({}));if(i.url?.startsWith("scout://services/restart/")){window.location.href=i.url;return}}catch{}window.location.href="scout://hud/show"}async startLive(e={},n={}){return this.captureMode!=="browser"?await Q(e,n):await Y(e)}}async function Q(t={},e={}){t.onState?.("starting");const n=await fetch("/api/voice/session",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({clientId:"openscout-web",surface:e.surface?.trim()||"chat-composer"})});if(!n.ok){const s=await n.text().catch(()=>"");throw new Error(g(s,n.status))}const r=(await n.json()).sessionId?.trim();if(!r)throw new Error("Scout voice did not return a session id.");let o=!1,a,u;const h=new Promise((s,p)=>{a=s,u=p});let d=null;const f=()=>{d&&window.clearTimeout(d),d=window.setTimeout(()=>{w(new Error("Scout voice transcription timed out. Try again or check voice settings."))},H)},v=()=>{d&&(window.clearTimeout(d),d=null)},w=(s,p="error")=>{o||(o=!0,v(),m.close(),t.onState?.(p),u(s))},y=s=>{o||(o=!0,v(),m.close(),t.onFinal?.(s),t.onState?.("done"),a(s))},m=new EventSource(`/api/voice/session/${encodeURIComponent(r)}/events`),c=s=>p=>{if(o)return;let S={};try{S=JSON.parse(p.data)}catch{return}if(s==="session.partial"){const b=typeof S.text=="string"?S.text:"";t.onPartial?.(b);return}if(s==="session.state"){const b=Z(S.state);b&&(t.onState?.(b),b==="processing"&&f());return}if(s==="session.final"){y({sessionId:r,text:typeof S.text=="string"?S.text.trim():"",durationMs:Number(S.durationMs??0)});return}if(s==="session.cancelled"){w(T(),"cancelled");return}if(s==="session.error"){const b=typeof S.message=="string"?S.message:"Scout voice session failed.",L=typeof S.code=="string"?S.code:null;w(new Error(N(b,L)))}};return m.addEventListener("session.started",()=>{t.onState?.("starting")}),m.addEventListener("session.state",c("session.state")),m.addEventListener("session.partial",c("session.partial")),m.addEventListener("session.final",c("session.final")),m.addEventListener("session.cancelled",c("session.cancelled")),m.addEventListener("session.error",c("session.error")),m.onerror=()=>{o||w(new Error("Scout voice event stream disconnected."))},{get sessionId(){return r},result:h,stop:async()=>{t.onState?.("processing"),f();const s=await fetch(`/api/voice/session/${encodeURIComponent(r)}/stop`,{method:"POST"});if(!s.ok){const p=await s.text().catch(()=>"");throw new Error(g(p,s.status))}},cancel:async()=>{o=!0,v(),m.close();const s=await fetch(`/api/voice/session/${encodeURIComponent(r)}/cancel`,{method:"POST"});if(!s.ok){const p=await s.text().catch(()=>"");throw new Error(g(p,s.status))}t.onState?.("cancelled"),u(T())}}}async function Y(t={}){if(typeof MediaRecorder>"u"||!navigator.mediaDevices?.getUserMedia)throw new Error("Scout voice capture is unavailable in this browser.");const{startStreamLevelMeter:e}=await x(async()=>{const{startStreamLevelMeter:c}=await import("./voice-levels-Dcr3jglk.js");return{startStreamLevelMeter:c}},[]),n=ae(),i=[];let r=null,o=null,a=null,u=!1,h=!1,d,f;const v=new Promise((c,s)=>{d=c,f=s}),w=()=>{a?.stop(),a=null;for(const c of r?.getTracks()??[])c.stop();r=null},y=(c,s="error")=>{h||(h=!0,w(),t.onState?.(s),f(c))},m=async()=>{if(h)return;if(w(),u){y(T(),"cancelled");return}t.onState?.("processing");const c=o?.mimeType||V()||"application/octet-stream",s=new Blob(i,{type:c});if(s.size===0){y(new Error("No voice audio was captured."));return}try{const p=await ne(s,{sessionId:n});if(h)return;h=!0,t.onFinal?.(p),t.onState?.("done"),d(p)}catch(p){y(p instanceof Error?p:new Error(String(p)))}};try{t.onState?.("starting"),r=await navigator.mediaDevices.getUserMedia({audio:!0}),t.onLevel&&(a=e(r,t.onLevel));const c=V();o=new MediaRecorder(r,c?{mimeType:c}:void 0),o.addEventListener("dataavailable",s=>{s.data.size>0&&i.push(s.data)}),o.addEventListener("error",()=>{y(new Error("Scout voice recorder failed."))}),o.addEventListener("stop",()=>{m()},{once:!0}),o.start(),t.onPartial?.(""),t.onState?.("recording")}catch(c){const s=c instanceof Error?c:new Error(String(c));throw y(s),v.catch(()=>{}),s}return{get sessionId(){return n},result:v,stop:async()=>{!o||o.state==="inactive"||o.stop()},cancel:async()=>{if(u=!0,o&&o.state!=="inactive"){o.stop();return}y(T(),"cancelled")}}}function Z(t){return t==="starting"||t==="recording"||t==="processing"||t==="done"||t==="cancelled"||t==="error"?t:null}function g(t,e){try{return JSON.parse(t).error??`Scout voice returned HTTP ${e}`}catch{return t||`Scout voice returned HTTP ${e}`}}function me(t){return t instanceof Error&&t.name==="AbortError"}async function ee(t,e={}){const n={text:t,speed:se(e.speed)};e.modelId&&(n.modelId=e.modelId),e.voiceId&&(n.voiceId=e.voiceId),e.originAppId&&(n.originAppId=e.originAppId),e.utteranceId&&(n.utteranceId=e.utteranceId),e.instructions&&(n.instructions=e.instructions),e.speechTiming?.enabled&&(n.speechTiming=e.speechTiming);const i=await fetch("/api/voice/speak",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n),signal:e.signal});if(!i.ok){const r=await i.text().catch(()=>"");try{const o=JSON.parse(r);throw new Error(o.error??`Scout voice returned HTTP ${i.status}`)}catch(o){throw o instanceof SyntaxError?new Error(r||`Scout voice returned HTTP ${i.status}`):o}}return await i.json()}async function we(t){const e=t?`?modelId=${encodeURIComponent(t)}`:"",n=await fetch(`/api/voice/catalog${e}`,{headers:{accept:"application/json"}});if(!n.ok)throw new Error(`Scout voice catalog returned HTTP ${n.status}`);return await n.json()}async function Se(t,e={}){if(e.signal?.aborted)throw P();const n=new Audio(`data:${t.contentType};base64,${t.audioBase64}`),i=()=>{n.pause(),n.currentTime=0};e.signal?.addEventListener("abort",i,{once:!0}),await n.play(),e.onPlaybackStart?.();try{return await new Promise((r,o)=>{const a=()=>{n.removeEventListener("ended",u),n.removeEventListener("error",h),e.signal?.removeEventListener("abort",d)},u=()=>{a(),r()},h=()=>{a(),o(new Error("Scout voice playback failed."))},d=()=>{a(),o(P())};if(e.signal?.aborted){d();return}n.addEventListener("ended",u,{once:!0}),n.addEventListener("error",h,{once:!0}),e.signal?.addEventListener("abort",d,{once:!0})}),t}finally{e.signal?.removeEventListener("abort",i)}}async function te(t,e={}){const n=await ee(t,e);if(e.signal?.aborted)throw P();const i=await k(n.audioBase64,n.contentType),r=ie(e.presetId,e.params);return await D(i,{params:r,signal:e.signal}).promise,n}function ge(t,e={}){const n=new AbortController;return{promise:te(t,{...e,signal:n.signal}),stop:()=>n.abort()}}async function ne(t,e){const n=new FormData,i=oe(t.type);n.append("audio",t,`audio.${re(t.type)}`),n.append("sessionId",e.sessionId),i&&n.append("format",i);const r=await fetch("/api/voice/transcribe",{method:"POST",body:n});if(!r.ok){const a=await r.text().catch(()=>"");try{const u=JSON.parse(a);throw new Error(u.error??`Scout voice returned HTTP ${r.status}`)}catch(u){throw u instanceof SyntaxError?new Error(a||`Scout voice returned HTTP ${r.status}`):u}}const o=await r.json();return{sessionId:e.sessionId,text:o.text?.trim()??"",durationMs:Number(o.durationMs??0)}}function P(){const t=new Error("Speech stopped.");return t.name="AbortError",t}function T(){const t=new Error("Voice recording was cancelled.");return t.name="AbortError",t}function V(){return typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"?void 0:["audio/webm;codecs=opus","audio/ogg;codecs=opus","audio/mp4","audio/webm","audio/wav"].find(e=>{try{return MediaRecorder.isTypeSupported(e)}catch{return!1}})}function oe(t){const e=t.toLowerCase();if(e.includes("mp3")||e.includes("mpeg"))return"mp3";if(e.includes("wav"))return"wav";if(e.includes("aac")||e.includes("mp4"))return"aac";if(e.includes("opus")||e.includes("ogg")||e.includes("webm"))return"opus"}function re(t){const e=t.toLowerCase();return e.includes("webm")?"webm":e.includes("ogg")||e.includes("opus")?"opus":e.includes("mp4")||e.includes("aac")?"m4a":e.includes("wav")?"wav":e.includes("mp3")||e.includes("mpeg")?"mp3":"audio"}function ie(t,e){const n=t?A.find(i=>i.id===t)?.params:void 0;return{...q,...n??{},...e??{}}}function se(t){if(!(t===void 0||!Number.isFinite(t)))return Math.min(2,Math.max(.5,Number(t.toFixed(2))))}function ae(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`scout-voice:${crypto.randomUUID()}`:`scout-voice:${Date.now().toString(36)}:${Math.random().toString(36).slice(2)}`}async function ce(){const t=await fetch("/api/voice/settings");if(!t.ok){const e=await t.text().catch(()=>"");throw new Error(g(e,t.status))}return await t.json()}async function ve(t="microphone"){const e=await fetch("/api/voice/permissions/open",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:t})});if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(g(n,e.status))}}async function C(t="microphone"){const e=await fetch("/api/voice/permissions/request",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:t})});if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(g(n,e.status))}}async function ye(t=12){const e=await fetch(`/api/voice/history?limit=${t}`);if(!e.ok){const i=await e.text().catch(()=>"");throw new Error(g(i,e.status))}return(await e.json()).sessions??[]}async function be(t){const e=await fetch("/api/voice/settings",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(g(n,e.status))}return await e.json()}export{pe as a,we as b,Se as c,ge as d,fe as e,le as f,X as g,ce as h,me as i,ye as j,be as k,ve as o,ee as p,C as r,he as s};
|
|
1
|
+
import{_ as x}from"./index-sUomXsrf.js";import{b as k,p as D,V as A,D as q}from"./fx-z37u1o2z.js";function le(t){return t?t.hint?`${t.message} ${t.hint}`:t.message:"Scout voice is unavailable."}async function pe(t={}){const e=await fetch("/api/voice/engage",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(e.status===404)return j(t);if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(g(n,e.status))}return await e.json()}async function j(t={}){const e=await ce(),n=e.settings,i=e.devices,r=i.length>0||(n.permissions?.length??0)>0,o=n.permissions?.find(f=>f.kind==="microphone")??null,a=n.permissions?.find(f=>f.kind==="speechRecognition")??null,u=U(n,i);if(t.requestPermissions&&(o&&!o.granted&&o.status!=="restricted"?await C("microphone").catch(()=>{}):(o?.granted??!1)&&a&&!a.granted&&a.status!=="restricted"&&await C("speechRecognition").catch(()=>{})),!r)return{ready:!1,issue:{code:"host_offline",title:"Scout Menu is not running",message:"Launch Scout Menu on this Mac to dictate in web chat.",hint:"Restart the web server if you just updated Scout — `scout server restart` or restart `bun run server/index.ts`.",action:"launch_host"},warnings:[],settings:n,devices:i,inputDevice:null,hostOnline:!1};const h=$(o);if(h)return{ready:!1,issue:h,warnings:[],settings:n,devices:i,inputDevice:u,hostOnline:r};if(!u)return{ready:!1,issue:{code:"no_input_device",title:"No microphone detected",message:"Scout Menu did not report any audio input devices.",hint:"Plug in a microphone, check Sound settings, then refresh Settings → Voice.",action:"open_voice_settings"},warnings:[],settings:n,devices:i,inputDevice:null,hostOnline:r};const d=F(a);return{ready:!0,issue:null,warnings:d?[d]:[],settings:n,devices:i,inputDevice:u,hostOnline:r}}function U(t,e){if(e.length===0)return null;const n=t.inputDeviceId?e.find(o=>o.id===t.inputDeviceId):null,i=e.find(o=>o.isDefault)??e[0]??null,r=n??i;return r?{id:r.id,name:r.name}:null}function $(t){return!t||t.granted?null:t.canRequest?{code:"microphone_not_requested",title:"Microphone access needed",message:"Scout Menu needs microphone access before dictation can start.",hint:"Request access or tap the mic again to show the macOS prompt.",action:"request_microphone"}:{code:"microphone_denied",title:"Microphone blocked",message:"Scout Menu cannot record because microphone access is off.",hint:"Scout is opening macOS Microphone settings and will detect the change automatically.",action:"open_microphone_settings"}}function F(t){return!t||t.granted?null:t.canRequest?{code:"speech_not_requested",title:"Speech recognition needed",message:"Scout Menu needs speech recognition for live partials.",hint:"Request access to show the macOS prompt.",action:"request_speech"}:{code:"speech_denied",title:"Speech recognition blocked",message:"Speech recognition is off for Scout Menu.",hint:"Choose Retry access to reopen macOS Speech Recognition settings.",action:"open_speech_settings"}}function N(t,e){switch(e){case"microphone_permission":return"Microphone access is off for Scout Menu. Tap the mic to retry; Scout will open macOS Microphone settings.";case"empty_transcript":return"No speech was detected. Check your microphone input in Settings → Voice.";default:return t}}const H=6e4,G=3e3,J=2e4,z=8e3,B=45e3;let M=null,E=null,l=null,_=!1;const R=new Set;function W(){return typeof window>"u"?!1:typeof fetch=="function"}function X(){return M||(M=new K),M}function he(t){return R.add(t),l&&t(l),()=>{R.delete(t)}}function fe(){if(_||!W())return;_=!0;const t=X();t.probe();const e=()=>{t.probeIfStale()};window.addEventListener("focus",e),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function I(t){for(const e of R)e(t)}function O(t,e=Date.now()){const n=t.ok?J:z;return e-t.probedAt<n}class K{state="unknown";unavailableReason=null;captureMode=null;hostReachable=!1;microphoneGranted=null;microphoneCanRequest=null;get connectionState(){return this.state}get lastUnavailableReason(){return this.unavailableReason}get preferredCaptureMode(){return this.captureMode}get isVoiceHostReachable(){return this.hostReachable}get isMicrophoneGranted(){return this.microphoneGranted}get canRequestMicrophone(){return this.hostReachable&&this.microphoneGranted===!1&&this.microphoneCanRequest===!0}get isMicrophoneHardDenied(){return this.hostReachable&&this.microphoneGranted===!1&&this.microphoneCanRequest===!1}get isMicrophoneDenied(){return this.isMicrophoneHardDenied}async probeIfStale(){const e=Date.now();return l&&O(l,e)?(this.applyProbeSnapshot(l),l.ok):l&&l.ok&&e-l.probedAt<B?(this.applyProbeSnapshot(l),!0):l&&!l.ok?this.probe({force:!0}):this.probe()}async probe(e={}){const n=typeof e=="number"?{timeoutMs:e}:e,i=n.force??!1,r=n.timeoutMs??G,o=Date.now();return!i&&l&&O(l,o)?(this.applyProbeSnapshot(l),l.ok):E||(this.state="probing",E=this.fetchProbe(r).finally(()=>{E=null}),E)}async fetchProbe(e){const n=new AbortController,i=window.setTimeout(()=>n.abort(),e);try{const r=await fetch("/api/voice/health?quiet=1",{signal:n.signal}),o=await r.json().catch(()=>({})),a=!!o.host?.hostId,u=typeof o.microphoneGranted=="boolean"?o.microphoneGranted:null,h=typeof o.microphoneCanRequest=="boolean"?o.microphoneCanRequest:null,d=o.capture==="browser"?"browser":"native",f=r.ok&&o.ok===!0,v=f?null:o.detail??o.error??(a?"Scout voice is not ready.":"Scout voice service is unavailable."),w={ok:f,reason:v,captureMode:f?d:null,hostReachable:a,microphoneGranted:u,microphoneCanRequest:h,probedAt:Date.now()};return l=w,this.applyProbeSnapshot(w),I(w),f}catch(r){const a={ok:!1,reason:r instanceof Error&&r.name==="AbortError"?"Scout voice service did not respond.":"Scout voice service is unavailable.",captureMode:null,hostReachable:!1,microphoneGranted:null,microphoneCanRequest:null,probedAt:Date.now()};return l=a,this.applyProbeSnapshot(a),I(a),!1}finally{window.clearTimeout(i)}}applyProbeSnapshot(e){if(this.hostReachable=e.hostReachable,this.microphoneGranted=e.microphoneGranted,this.microphoneCanRequest=e.microphoneCanRequest,e.ok){this.unavailableReason=null,this.captureMode=e.captureMode,this.state="connected";return}this.unavailableReason=e.reason,this.captureMode=null,this.state="unavailable"}async launch(e={}){try{const i=await(await fetch("/api/scout-services/restart-link",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({target:"all"})})).json().catch(()=>({}));if(i.url?.startsWith("scout://services/restart/")){window.location.href=i.url;return}}catch{}window.location.href="scout://hud/show"}async startLive(e={},n={}){return this.captureMode!=="browser"?await Q(e,n):await Y(e)}}async function Q(t={},e={}){t.onState?.("starting");const n=await fetch("/api/voice/session",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({clientId:"openscout-web",surface:e.surface?.trim()||"chat-composer"})});if(!n.ok){const s=await n.text().catch(()=>"");throw new Error(g(s,n.status))}const r=(await n.json()).sessionId?.trim();if(!r)throw new Error("Scout voice did not return a session id.");let o=!1,a,u;const h=new Promise((s,p)=>{a=s,u=p});let d=null;const f=()=>{d&&window.clearTimeout(d),d=window.setTimeout(()=>{w(new Error("Scout voice transcription timed out. Try again or check voice settings."))},H)},v=()=>{d&&(window.clearTimeout(d),d=null)},w=(s,p="error")=>{o||(o=!0,v(),m.close(),t.onState?.(p),u(s))},y=s=>{o||(o=!0,v(),m.close(),t.onFinal?.(s),t.onState?.("done"),a(s))},m=new EventSource(`/api/voice/session/${encodeURIComponent(r)}/events`),c=s=>p=>{if(o)return;let S={};try{S=JSON.parse(p.data)}catch{return}if(s==="session.partial"){const b=typeof S.text=="string"?S.text:"";t.onPartial?.(b);return}if(s==="session.state"){const b=Z(S.state);b&&(t.onState?.(b),b==="processing"&&f());return}if(s==="session.final"){y({sessionId:r,text:typeof S.text=="string"?S.text.trim():"",durationMs:Number(S.durationMs??0)});return}if(s==="session.cancelled"){w(T(),"cancelled");return}if(s==="session.error"){const b=typeof S.message=="string"?S.message:"Scout voice session failed.",L=typeof S.code=="string"?S.code:null;w(new Error(N(b,L)))}};return m.addEventListener("session.started",()=>{t.onState?.("starting")}),m.addEventListener("session.state",c("session.state")),m.addEventListener("session.partial",c("session.partial")),m.addEventListener("session.final",c("session.final")),m.addEventListener("session.cancelled",c("session.cancelled")),m.addEventListener("session.error",c("session.error")),m.onerror=()=>{o||w(new Error("Scout voice event stream disconnected."))},{get sessionId(){return r},result:h,stop:async()=>{t.onState?.("processing"),f();const s=await fetch(`/api/voice/session/${encodeURIComponent(r)}/stop`,{method:"POST"});if(!s.ok){const p=await s.text().catch(()=>"");throw new Error(g(p,s.status))}},cancel:async()=>{o=!0,v(),m.close();const s=await fetch(`/api/voice/session/${encodeURIComponent(r)}/cancel`,{method:"POST"});if(!s.ok){const p=await s.text().catch(()=>"");throw new Error(g(p,s.status))}t.onState?.("cancelled"),u(T())}}}async function Y(t={}){if(typeof MediaRecorder>"u"||!navigator.mediaDevices?.getUserMedia)throw new Error("Scout voice capture is unavailable in this browser.");const{startStreamLevelMeter:e}=await x(async()=>{const{startStreamLevelMeter:c}=await import("./voice-levels-Dcr3jglk.js");return{startStreamLevelMeter:c}},[]),n=ae(),i=[];let r=null,o=null,a=null,u=!1,h=!1,d,f;const v=new Promise((c,s)=>{d=c,f=s}),w=()=>{a?.stop(),a=null;for(const c of r?.getTracks()??[])c.stop();r=null},y=(c,s="error")=>{h||(h=!0,w(),t.onState?.(s),f(c))},m=async()=>{if(h)return;if(w(),u){y(T(),"cancelled");return}t.onState?.("processing");const c=o?.mimeType||V()||"application/octet-stream",s=new Blob(i,{type:c});if(s.size===0){y(new Error("No voice audio was captured."));return}try{const p=await ne(s,{sessionId:n});if(h)return;h=!0,t.onFinal?.(p),t.onState?.("done"),d(p)}catch(p){y(p instanceof Error?p:new Error(String(p)))}};try{t.onState?.("starting"),r=await navigator.mediaDevices.getUserMedia({audio:!0}),t.onLevel&&(a=e(r,t.onLevel));const c=V();o=new MediaRecorder(r,c?{mimeType:c}:void 0),o.addEventListener("dataavailable",s=>{s.data.size>0&&i.push(s.data)}),o.addEventListener("error",()=>{y(new Error("Scout voice recorder failed."))}),o.addEventListener("stop",()=>{m()},{once:!0}),o.start(),t.onPartial?.(""),t.onState?.("recording")}catch(c){const s=c instanceof Error?c:new Error(String(c));throw y(s),v.catch(()=>{}),s}return{get sessionId(){return n},result:v,stop:async()=>{!o||o.state==="inactive"||o.stop()},cancel:async()=>{if(u=!0,o&&o.state!=="inactive"){o.stop();return}y(T(),"cancelled")}}}function Z(t){return t==="starting"||t==="recording"||t==="processing"||t==="done"||t==="cancelled"||t==="error"?t:null}function g(t,e){try{return JSON.parse(t).error??`Scout voice returned HTTP ${e}`}catch{return t||`Scout voice returned HTTP ${e}`}}function me(t){return t instanceof Error&&t.name==="AbortError"}async function ee(t,e={}){const n={text:t,speed:se(e.speed)};e.modelId&&(n.modelId=e.modelId),e.voiceId&&(n.voiceId=e.voiceId),e.originAppId&&(n.originAppId=e.originAppId),e.utteranceId&&(n.utteranceId=e.utteranceId),e.instructions&&(n.instructions=e.instructions),e.speechTiming?.enabled&&(n.speechTiming=e.speechTiming);const i=await fetch("/api/voice/speak",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n),signal:e.signal});if(!i.ok){const r=await i.text().catch(()=>"");try{const o=JSON.parse(r);throw new Error(o.error??`Scout voice returned HTTP ${i.status}`)}catch(o){throw o instanceof SyntaxError?new Error(r||`Scout voice returned HTTP ${i.status}`):o}}return await i.json()}async function we(t){const e=t?`?modelId=${encodeURIComponent(t)}`:"",n=await fetch(`/api/voice/catalog${e}`,{headers:{accept:"application/json"}});if(!n.ok)throw new Error(`Scout voice catalog returned HTTP ${n.status}`);return await n.json()}async function Se(t,e={}){if(e.signal?.aborted)throw P();const n=new Audio(`data:${t.contentType};base64,${t.audioBase64}`),i=()=>{n.pause(),n.currentTime=0};e.signal?.addEventListener("abort",i,{once:!0}),await n.play(),e.onPlaybackStart?.();try{return await new Promise((r,o)=>{const a=()=>{n.removeEventListener("ended",u),n.removeEventListener("error",h),e.signal?.removeEventListener("abort",d)},u=()=>{a(),r()},h=()=>{a(),o(new Error("Scout voice playback failed."))},d=()=>{a(),o(P())};if(e.signal?.aborted){d();return}n.addEventListener("ended",u,{once:!0}),n.addEventListener("error",h,{once:!0}),e.signal?.addEventListener("abort",d,{once:!0})}),t}finally{e.signal?.removeEventListener("abort",i)}}async function te(t,e={}){const n=await ee(t,e);if(e.signal?.aborted)throw P();const i=await k(n.audioBase64,n.contentType),r=ie(e.presetId,e.params);return await D(i,{params:r,signal:e.signal}).promise,n}function ge(t,e={}){const n=new AbortController;return{promise:te(t,{...e,signal:n.signal}),stop:()=>n.abort()}}async function ne(t,e){const n=new FormData,i=oe(t.type);n.append("audio",t,`audio.${re(t.type)}`),n.append("sessionId",e.sessionId),i&&n.append("format",i);const r=await fetch("/api/voice/transcribe",{method:"POST",body:n});if(!r.ok){const a=await r.text().catch(()=>"");try{const u=JSON.parse(a);throw new Error(u.error??`Scout voice returned HTTP ${r.status}`)}catch(u){throw u instanceof SyntaxError?new Error(a||`Scout voice returned HTTP ${r.status}`):u}}const o=await r.json();return{sessionId:e.sessionId,text:o.text?.trim()??"",durationMs:Number(o.durationMs??0)}}function P(){const t=new Error("Speech stopped.");return t.name="AbortError",t}function T(){const t=new Error("Voice recording was cancelled.");return t.name="AbortError",t}function V(){return typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"?void 0:["audio/webm;codecs=opus","audio/ogg;codecs=opus","audio/mp4","audio/webm","audio/wav"].find(e=>{try{return MediaRecorder.isTypeSupported(e)}catch{return!1}})}function oe(t){const e=t.toLowerCase();if(e.includes("mp3")||e.includes("mpeg"))return"mp3";if(e.includes("wav"))return"wav";if(e.includes("aac")||e.includes("mp4"))return"aac";if(e.includes("opus")||e.includes("ogg")||e.includes("webm"))return"opus"}function re(t){const e=t.toLowerCase();return e.includes("webm")?"webm":e.includes("ogg")||e.includes("opus")?"opus":e.includes("mp4")||e.includes("aac")?"m4a":e.includes("wav")?"wav":e.includes("mp3")||e.includes("mpeg")?"mp3":"audio"}function ie(t,e){const n=t?A.find(i=>i.id===t)?.params:void 0;return{...q,...n??{},...e??{}}}function se(t){if(!(t===void 0||!Number.isFinite(t)))return Math.min(2,Math.max(.5,Number(t.toFixed(2))))}function ae(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`scout-voice:${crypto.randomUUID()}`:`scout-voice:${Date.now().toString(36)}:${Math.random().toString(36).slice(2)}`}async function ce(){const t=await fetch("/api/voice/settings");if(!t.ok){const e=await t.text().catch(()=>"");throw new Error(g(e,t.status))}return await t.json()}async function ve(t="microphone"){const e=await fetch("/api/voice/permissions/open",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:t})});if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(g(n,e.status))}}async function C(t="microphone"){const e=await fetch("/api/voice/permissions/request",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:t})});if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(g(n,e.status))}}async function ye(t=12){const e=await fetch(`/api/voice/history?limit=${t}`);if(!e.ok){const i=await e.text().catch(()=>"");throw new Error(g(i,e.status))}return(await e.json()).sessions??[]}async function be(t){const e=await fetch("/api/voice/settings",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(g(n,e.status))}return await e.json()}export{pe as a,we as b,Se as c,ge as d,fe as e,le as f,X as g,ce as h,me as i,ye as j,be as k,ve as o,ee as p,C as r,he as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./createLucideIcon-
|
|
1
|
+
import{c as a}from"./createLucideIcon-DlxlBfLC.js";const t=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],c=a("scroll-text",t);export{c as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./createLucideIcon-
|
|
1
|
+
import{c}from"./createLucideIcon-DlxlBfLC.js";const e=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],o=c("search",e);export{o as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as a}from"./createLucideIcon-DlxlBfLC.js";import{M as w}from"./message-square-BD-4UUdc.js";import{F as l}from"./file-text-i3xTDUjJ.js";import{S as c}from"./search-DCT_EvPr.js";import{T as y}from"./terminal-DXQISjZn.js";import{C as k}from"./code-xml-05TD3uOC.js";import{S as g}from"./scroll-text-BIYf6g6N.js";const O=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]],p=a("compass",O);const S=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],_=a("folder-kanban",S);const A=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],N=a("git-branch",A);const j=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],v=a("house",j);const E=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],u=a("send",E);const R=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],C=a("settings",R),M=[{id:"home",label:"Home",icon:v,defaultRoute:{view:"inbox"},section:"navigate"},{id:"chat",label:"Messages",icon:w,defaultRoute:{view:"messages"},section:"navigate"},{id:"projects",label:"Projects",icon:_,defaultRoute:{view:"agents-v2"},section:"navigate"},{id:"sessions",label:"Sessions",icon:l,defaultRoute:{view:"sessions"},section:"navigate"},{id:"dispatch",label:"Dispatch",icon:u,defaultRoute:{view:"broker"},section:"navigate"},{id:"search",label:"Search",icon:c,defaultRoute:{view:"search"},section:"navigate"},{id:"ops",label:"Operations",icon:p,defaultRoute:{view:"ops",mode:"mission"},section:"system"},{id:"settings",label:"Settings",icon:C,defaultRoute:{view:"settings",section:"appearance"},section:"system"}],d={inbox:"home",activity:"home",briefings:"home","agents-v2":"projects","agent-info":"projects",repos:"projects","repo-diff":"projects",code:"projects",sessions:"sessions",terminal:"sessions",messages:"chat",conversation:"chat",broker:"dispatch",work:"dispatch",follow:"dispatch",search:"search",ops:"ops",mesh:"ops","mesh-ops":"ops",harnesses:"ops",settings:"settings",voice:"settings"},T=new Map(M.map(e=>[e.id,e]));function G(e){const i=T.get(e);if(!i)throw new Error(`Unknown primary area: ${e}`);return i}function se(e){if(e.view==="follow"&&e.preferredView)switch(e.preferredView){case"tail":return"ops";case"session":return"sessions";case"chat":return"chat";case"work":return"dispatch"}return d[e.view]}function ae(e,i){const t=G(e);return e==="ops"?i?.opsControlEnabled??!0?{view:"ops",mode:"mission"}:{view:"ops",mode:"tail"}:t.defaultRoute}function P(e){return e.view==="ops"&&(e.mode===void 0||e.mode==="mission"||e.mode==="issues")}const D=[{id:"home",label:"Home",route:{view:"inbox"},active:e=>e.view==="inbox"},{id:"projects",label:"Projects",route:{view:"agents-v2"},active:e=>e.view==="agents-v2"||e.view==="agent-info"},{id:"sessions",label:"Sessions",route:{view:"sessions"},active:e=>e.view==="sessions"},{id:"chat",label:"Messages",route:{view:"messages"},active:e=>e.view==="messages"||e.view==="conversation"},{id:"search",label:"Search",route:{view:"search"},active:e=>e.view==="search"},{id:"terminals",label:"Terminals",route:{view:"terminal"},active:e=>e.view==="terminal"},{id:"tail",label:"Live Activity",route:{view:"ops",mode:"tail"},active:e=>e.view==="ops"&&e.mode==="tail"},{id:"dispatch",label:"Dispatch",route:{view:"broker"},active:e=>e.view==="broker"},{id:"activity",label:"Activity Log",route:{view:"activity"},active:e=>e.view==="activity"},{id:"mesh",label:"Network",route:{view:"mesh"},active:e=>e.view==="mesh"},{id:"mesh-ops",label:"Mesh Ops",route:{view:"mesh-ops"},active:e=>e.view==="mesh-ops",capability:"surface.mesh-ops"},{id:"mission-control",label:"Mission Control",route:{view:"ops",mode:"mission"},active:P,capability:"ops.control"},{id:"lanes",label:"Agent Lanes",route:{view:"ops",mode:"lanes"},active:e=>e.view==="ops"&&e.mode==="lanes"},{id:"repos",label:"Repositories",route:{view:"repos"},active:e=>e.view==="repos"||e.view==="repo-diff"},{id:"code",label:"Code Browser",route:{view:"code"},active:e=>e.view==="code"},{id:"providers",label:"Agent Providers",route:{view:"harnesses"},active:e=>e.view==="harnesses"},{id:"runtime",label:"Runtime Monitor",route:{view:"ops",mode:"atop"},active:e=>e.view==="ops"&&e.mode==="atop",capability:"ops.control"},{id:"plans",label:"Plans",route:{view:"ops",mode:"plan"},active:e=>e.view==="ops"&&e.mode==="plan"},{id:"agent-config",label:"Agent Configuration",route:{view:"settings",section:"agents"},active:e=>e.view==="settings"&&e.section==="agents"}],x=new Map(D.map(e=>[e.id,e]));function s(e){const i=x.get(e);if(!i)throw new Error(`Unknown nav destination: ${e}`);return i}function n(e,i){const t=s(e);return{id:t.id,label:i?.label??t.label,route:i?.route??t.route,active:i?.active??t.active,capability:t.capability}}const V=[{destinationId:"home",key:"home"},{destinationId:"projects",key:"agents",label:"Projects"},{destinationId:"sessions",key:"sessions"},{destinationId:"chat",key:"chat",label:"Messages"}];function ne(){return V.map(e=>{const i=s(e.destinationId);return{key:e.key,label:e.label??i.label,route:i.route}})}const B=[{destinationId:"search",key:"search"},{destinationId:"terminals",key:"terminals"},{destinationId:"tail",key:"tail"},{destinationId:"dispatch",key:"dispatch"}],J=[{destinationId:"mission-control",key:"control"},{destinationId:"lanes",key:"lanes"},{destinationId:"repos",key:"repos"},{destinationId:"code",key:"code"},{destinationId:"providers",key:"providers"},{destinationId:"mesh",key:"mesh"},{destinationId:"mesh-ops",key:"mesh-ops"},{destinationId:"runtime",key:"runtime"},{destinationId:"plans",key:"plans"}];function b(e){const i=n(e.destinationId,{label:e.label});return{key:e.key,label:i.label,route:i.route,active:i.active,destinationId:i.id,capability:i.capability}}function de(){return B.map(b)}function re(){return J.map(b)}function m(e){return{items:e.map(i=>{const t=n(i.destinationId,{label:i.label,route:i.route,active:i.active});return{id:i.id,label:t.label,route:t.route,active:t.active}})}}function U(){return[m([{destinationId:"agent-config",id:"config",label:"Agent Configuration"}])]}function F(){return[m([{destinationId:"lanes",id:"lanes"},{destinationId:"mission-control",id:"control"},{destinationId:"providers",id:"harnesses",label:"Agent Providers"},{destinationId:"mesh",id:"mesh"},{destinationId:"tail",id:"tail"},{destinationId:"runtime",id:"runtime"},{destinationId:"plans",id:"plans"}])]}const L=[{key:"h",label:"Go home",destinationId:"home"},{key:"i",label:"Go to messages",destinationId:"chat"},{key:"c",label:"Go to messages",destinationId:"chat"},{key:"p",label:"Go to projects",destinationId:"projects"},{key:"s",label:"Go to sessions",destinationId:"sessions"},{key:"t",label:"Go to terminals",destinationId:"terminals"},{key:"r",label:"Go to repositories",destinationId:"repos"},{key:"b",label:"Go to code browser",destinationId:"code"},{key:"f",label:"Go to search",destinationId:"search"},{key:"l",label:"Go to live activity",destinationId:"tail"},{key:"o",label:"Go to operations",destinationId:"mission-control",route:{view:"ops"}},{key:"d",label:"Go to dispatch",destinationId:"dispatch"},{key:"m",label:"Go to network",destinationId:"mesh"},{key:"a",label:"Go to activity log",destinationId:"activity"}];function le(){return L.map(e=>{const i=s(e.destinationId);return{key:e.key,label:e.label,route:e.route??i.route,destinationId:e.destinationId}})}const Y=[{destinationId:"sessions",id:"sessions",icon:l},{destinationId:"terminals",id:"terminals",icon:y},{destinationId:"repos",id:"repos",icon:N},{destinationId:"code",id:"code",icon:k},{destinationId:"search",id:"search",icon:c},{destinationId:"tail",id:"tail",icon:g},{destinationId:"mission-control",id:"ops",label:"Operations",icon:p,route:{view:"ops",mode:"mission"},opsGated:!0},{destinationId:"home",id:"home",icon:v},{destinationId:"dispatch",id:"dispatch",icon:u}];function ce(){return Y.map(e=>{const i=s(e.destinationId);return{id:e.id,label:e.label??i.label,icon:e.icon,route:e.route??i.route,destinationId:e.destinationId,opsGated:e.opsGated??i.capability==="ops.control"}})}const H=[{id:"nav:home",label:"Go to Home",destinationId:"home",shortcut:"Cmd+1"},{id:"nav:agents",label:"Go to Projects",destinationId:"projects",shortcut:"Cmd+2"},{id:"nav:messages",label:"Go to Chat",destinationId:"chat",shortcut:"Cmd+3"},{id:"nav:sessions",label:"Open Sessions",destinationId:"sessions"},{id:"nav:terminals",label:"Open Terminals",destinationId:"terminals"},{id:"nav:search",label:"Go to Search",destinationId:"search",shortcut:"Cmd+4"},{id:"nav:activity",label:"Open Activity",destinationId:"activity"},{id:"nav:mesh",label:"Open Mesh",destinationId:"mesh"},{id:"nav:dispatch",label:"Open Dispatch",destinationId:"dispatch"},{id:"nav:repos",label:"Open Repos",destinationId:"repos"},{id:"nav:code",label:"Open Code Browser",destinationId:"code"},{id:"nav:harnesses",label:"Open Providers",destinationId:"providers"},{id:"nav:ops-lanes",label:"Open Agent Lanes",destinationId:"lanes"},{id:"nav:ops",label:"Go to Ops",destinationId:"mission-control",route:{view:"ops"},shortcut:"Cmd+5",capability:"ops.control"},{id:"nav:ops-atop",label:"Open Runtime",destinationId:"runtime",capability:"ops.control"},{id:"nav:agent-config",label:"Open Agent Configuration",destinationId:"agent-config"}];function $(e){const i=e?.opsEnabled??!0;return H.filter(t=>!((t.capability??s(t.destinationId).capability)==="ops.control"&&!i)).map(t=>{const o=s(t.destinationId);return{id:t.id,label:t.label,destinationId:t.destinationId,route:t.route??o.route,shortcut:t.shortcut,capability:t.capability??o.capability}})}function pe(e,i){return $(i).map(t=>({id:t.id,label:t.label,action:()=>e(t.route),shortcut:t.shortcut}))}const h={projects:[{destinationId:"projects",id:"projects",label:"Projects"},{destinationId:"repos",id:"repos"},{destinationId:"code",id:"code"}],sessions:[{destinationId:"sessions",id:"sessions"},{destinationId:"terminals",id:"terminals"}]};function z(e){const i=n(e.destinationId,{label:e.label});return{id:e.id,label:i.label,route:i.route,active:i.active,destinationId:i.id}}function q(e){return h[e].map(z)}function ve(e){const i=d[e.view];if(i!=="projects"&&i!=="sessions")return null;const t=i;return{areaId:t,items:q(t)}}const r={...h,dispatch:[{destinationId:"dispatch",id:"dispatch-all",label:"All Dispatches",route:{view:"broker"},active:e=>e.view==="broker"&&(e.filter===void 0||e.filter==="all")},{destinationId:"dispatch",id:"dispatch-delivered",label:"Delivered",route:{view:"broker",filter:"delivered"},active:e=>e.view==="broker"&&e.filter==="delivered"},{destinationId:"dispatch",id:"dispatch-failed",label:"Failed",route:{view:"broker",filter:"failed"},active:e=>e.view==="broker"&&e.filter==="failed"}],ops:[{destinationId:"lanes",id:"lanes",label:"Lanes"},{destinationId:"mission-control",id:"control"},{destinationId:"providers",id:"harnesses",label:"Providers"},{destinationId:"runtime",id:"runtime",label:"Runtime"},{destinationId:"mesh",id:"mesh"},{destinationId:"tail",id:"tail"},{destinationId:"plans",id:"plans"}]};function K(e){const i=n(e.destinationId,{label:e.label,route:e.route,active:e.active});return{id:e.id,label:i.label,route:i.route,active:i.active,destinationId:i.id}}function ue(e,i){const t=d[e.view];if(!(t in r))return null;const o=t,I=r[o].map(K).filter(f=>s(f.destinationId).capability!=="ops.control"||i?.opsControlEnabled!==!1);return{areaId:o,items:I}}const be=U(),me=F();export{be as A,me as O,M as P,C as S,de as a,re as b,pe as c,ce as d,le as e,se as f,ae as g,G as h,ve as i,ne as p,ue as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r,r as o}from"./index-
|
|
1
|
+
import{j as r,r as o}from"./index-sUomXsrf.js";import{j as l}from"./ui-LM8pS8qE.js";function p({branch:t,fallback:s}){const e=l(t,s);return e.detached?r.jsx("span",{className:"pre",children:e.sha??"detached"}):e.prefix?r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"pre",children:e.prefix}),e.leaf]}):r.jsx(r.Fragment,{children:e.leaf})}const a={worktree:null,project:null,generatedAt:0,tone:"warm"};let n=a;const c=new Set;function i(){for(const t of c)t()}function h(t){n=t,i()}function d(){n!==a&&(n=a,i())}function m(){const[t,s]=o.useState(()=>n);return o.useEffect(()=>{s(n);const e=()=>s(n);return c.add(e),()=>{c.delete(e)}},[]),t}export{p as B,d as c,h as p,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./createLucideIcon-
|
|
1
|
+
import{c as a}from"./createLucideIcon-DlxlBfLC.js";const o=[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]],e=a("send-horizontal",o);export{e as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./createLucideIcon-
|
|
1
|
+
import{c as e}from"./createLucideIcon-DlxlBfLC.js";const r=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],i=e("server",r);export{i as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d}from"./terminal-relay-
|
|
1
|
+
import{r as d}from"./terminal-relay-B5Sma7fK.js";function S(r,e){const s=d(r),n=s?r.harnessSessionId??s.sessionName:null;return e?.activeSessionId??n}function I(r,e){return[...r].sort((s,n)=>{const t=s.id===e?1:0,o=n.id===e?1:0;return t!==o?o-t:(n.endedAt??n.startedAt)-(s.endedAt??s.startedAt)})}function c(r){const e=r;return[e.id,e.surfaceSessionId,e.harnessSessionId,e.externalSessionId,e.threadId,e.runtimeSessionId,e.runtimeSessionRef,e.runtimeRef,e.sourceSessionId,e.sessionId,e.refId].flatMap(s=>{const n=s?.trim();return n?[n]:[]})}function u(r){const e=/^relay-(.+)-(claude|codex)$/iu.exec(r);return e?{scope:e[1].toLowerCase(),harness:e[2].toLowerCase()}:null}function l(r,e){const s=u(r),n=u(e);return!s||!n?!1:s.harness===n.harness&&(s.scope===n.scope||s.scope.startsWith(`${n.scope}-`))}function f(r,e){const s=r?.trim();if(!s)return null;const n=e.find(a=>c(a).some(i=>i===s));if(n)return n.id;const t=e.filter(a=>c(a).some(i=>l(i,s)));return new Set(t.map(a=>a.id)).size===1?t[0]?.id??null:null}function h(r,e,s,n,t){const o=f(t,n);return o||(s??n[0]?.id??null)}function A(r,e,s,n){const t=!!d(r),o=n&&(!!s.canObserve||t),a=n&&(!!s.canTakeover||t||!!e?.resumeCommand);return{canObserve:o,canTakeover:a}}export{h as a,f as b,A as c,S as r,I as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u}from"./createLucideIcon-
|
|
1
|
+
import{c as u}from"./createLucideIcon-DlxlBfLC.js";const l=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],A=u("log-in",l);const d=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],y=u("power",d),f=10080*60*1e3,S=720*60*60*1e3,_={column:"state",direction:"desc"},m=[{id:"name",label:"Session",initialDirection:"asc"},{id:"host",label:"Host",initialDirection:"asc"},{id:"state",label:"State",initialDirection:"desc"},{id:"project",label:"Project",initialDirection:"asc"},{id:"activity",label:"Activity",initialDirection:"desc"}];function c(t){const e=typeof t.session.metadata?.attachedClients=="number"?t.session.metadata.attachedClients:0;return t.surface.state==="exited"?0:e>0?3:t.surface.state==="detached"?1:2}function h(t){const e=typeof t.session.metadata?.attachedClients=="number"?t.session.metadata.attachedClients:null;return t.surface.state==="exited"?"exited":e&&e>0?`${e} attached`:t.surface.state??"live"}function o(t){const e=t.session.metadata?.activityAt;if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;const n=t.session.metadata?.startedAt;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:t.origin==="backend"?null:t.session.updatedAt||null}function v(t,e=Date.now()){const n=t.session.metadata?.activityAt,i=typeof n=="number"&&Number.isFinite(n)&&n>0?n:t.origin==="backend"?null:t.session.updatedAt||null;if(i===null)return"current";const a=Math.max(0,e-i);return a>=S?"review":a>=f?"inactive":"current"}function s(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})}function N(t,e){const n=e.direction==="asc"?1:-1;return[...t].sort((i,a)=>{const r=p(i,a,e.column)*n;return r!==0?r:s(i.title,a.title)})}function p(t,e,n){switch(n){case"name":return s(t.title,e.title);case"host":return s(t.surface.backend,e.surface.backend);case"state":return c(t)-c(e);case"project":return s(t.project,e.project);case"activity":{const i=o(t),a=o(e);return i===null&&a===null?0:i===null?-1:a===null?1:i-a}}}function E(t,e){if(t.column===e)return{column:e,direction:t.direction==="asc"?"desc":"asc"};const n=m.find(i=>i.id===e)?.initialDirection??"asc";return{column:e,direction:n}}export{_ as D,A as L,y as P,m as T,E as a,o as b,h as c,N as s,v as t};
|
package/dist/client/assets/{sliders-horizontal-1oW76Xc9.js → sliders-horizontal-B9Nj-Y4J.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./createLucideIcon-
|
|
1
|
+
import{c as t}from"./createLucideIcon-DlxlBfLC.js";const a=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],h=t("sliders-horizontal",a);export{h as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as a}from"./createLucideIcon-DlxlBfLC.js";const e=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],l=a("sparkles",e);export{l as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as f}from"./index-
|
|
1
|
+
import{r as o,c as f}from"./index-sUomXsrf.js";import{c as b,a as d,w as m}from"./index-BWHgHrtv.js";const n=new Set;let u=null,i=null,s=null,r=null;function c(e){for(const t of[...n])t(e)}function p(){r||n.size===0||(r=setTimeout(()=>{r=null,l()},2e3))}function l(){s||n.size===0||(u||(u=b({url:f()}),i=d({links:[m({client:u})]})),s=i.control.events.subscribe(void 0,{onData:e=>{const t=e.data;t&&c(t)},onError:()=>{s=null,p()}}),c({kind:"unknown",payload:{reason:"control_subscription_started"}}))}function v(){r&&(clearTimeout(r),r=null),s?.unsubscribe(),s=null}function k(e){return n.add(e),l(),()=>{n.delete(e),!(n.size>0)&&v()}}function S(e){const t=o.useRef(e);t.current=e,o.useEffect(()=>k(a=>{t.current(a)}),[])}export{S as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,f as o}from"./index-
|
|
1
|
+
import{r as c,f as o}from"./index-sUomXsrf.js";import{c as f,a as b,w as d}from"./index-BWHgHrtv.js";const r=new Set;let n=null,l=null,s=null;function p(t){for(const e of[...r])e(t)}function S(){s||(n||(n=f({url:o()}),l=b({links:[d({client:n})]})),s=l.tail.events.subscribe(void 0,{onData:t=>{const e=t.data;e&&p(e)}}))}function m(){s?.unsubscribe(),s=null}function C(t,e=!0){const i=c.useRef(t);i.current=t,c.useEffect(()=>{if(!e)return;const u=a=>i.current(a);return r.add(u),S(),()=>{r.delete(u),r.size===0&&m()}},[e])}export{C as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./createLucideIcon-
|
|
1
|
+
import{c as e}from"./createLucideIcon-DlxlBfLC.js";const o=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],a=e("terminal",o);export{a as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./api-h5zurxmi.js";import{a as c}from"./router-
|
|
1
|
+
import{a as i}from"./api-h5zurxmi.js";import{a as c}from"./router-Dja9_ygK.js";import{s as l}from"./terminal-sessions-D5CIR2OL.js";const v=132,b=44;function u(e){return e==="codex"?"codex":e==="pi"?"pi":void 0}function a(e){return e==="observe"?"observe":"takeover"}function f(e,n,t="takeover"){return`scout-tmux-${e}-${n}-${t}`}function m(e){return e?e.terminalSurface?e.terminalSurface:e.transport==="tmux"&&e.harnessSessionId?{backend:"tmux",sessionName:e.harnessSessionId,paneId:null,socketDir:null}:null:null}function g(e,n){if(!n)return e;try{const t=new URL(e);return t.searchParams.set("agentId",n),t.toString()}catch{const t=e.includes("?")?"&":"?";return`${e}${t}agentId=${encodeURIComponent(n)}`}}function $(e,n){return n==="takeover"&&!!e&&!m(e)}function y(e){return e?{backend:e.backend,terminalSession:e.sessionName,...e.backend==="tmux"?{tmuxSession:e.sessionName}:{},...e.backend==="zellij"?{zellijSession:e.sessionName,...e.socketDir?{zellijSocketDir:e.socketDir}:{}}:{},...e.backend==="herdr"?{herdrSession:e.sessionName,tmuxSession:e.sessionName}:{}}:null}function T(e){const{agentId:n,agent:t,terminalSurface:o,registeredTarget:s}=e,r=a(e.mode),d=o&&t?`scout-terminal-${o.backend}-${t.id}-${o.sessionName}-${r}`:s&&o?`scout-terminal-registry-${s.session.id}-${o.backend}-${o.sessionName}-${r}`:n?`scout-takeover-${n}-${r}`:`scout-takeover-${r}`;return o?.backend==="tmux"&&t?f(t.id,o.sessionName,r):d}function N(e){const n=T({agentId:e.agentId,agent:e.agent,terminalSurface:e.terminalSurface,registeredTarget:e.registeredTarget,mode:e.mode}),t=a(e.mode);return{relayStorageSessionKey:n,scopedRelayUrl:g(e.relayUrl,e.agentId),cwd:e.cwd??void 0,relayAgent:u(e.harness),surfaceOptions:y(e.terminalSurface),orphanTTL:e.terminalSurface?1e3:void 0,controlMode:t}}function h(e){return e.registeredTarget?{view:"terminal",terminalSessionId:e.registeredTarget.session.id,terminalSurfaceKey:l(e.registeredTarget.surface)}:e.agentId?{view:"terminal",agentId:e.agentId}:{view:"terminal"}}function R(e,n){return n?{...e,mode:n}:e}function w(e){const n=c(e);return typeof window>"u"?n:new URL(n,window.location.href).toString()}function x(e,n){return i("/api/terminal-sessions/control",{method:"POST",body:JSON.stringify({backend:e.backend,sessionName:e.sessionName,action:n})})}function O(e){return i("/api/terminal-relay/session/destroy",{method:"POST",body:JSON.stringify({sessionId:e})})}function U(e){try{window.localStorage.removeItem(`hudson.relay.${e}`)}catch{}}export{v as S,b as a,N as b,x as c,h as d,w as e,U as f,O as g,m as r,$ as s,R as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as o}from"./index-
|
|
1
|
+
import{d as o}from"./index-sUomXsrf.js";async function n(e){if(t(e.agentId),!(await fetch(o("terminalRunPath"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:e.command,...e.cwd?{cwd:e.cwd}:{},...e.agentId?{agentId:e.agentId}:{}})})).ok)throw new Error("Failed to queue takeover")}function t(e){if(!(typeof window>"u"))try{window.localStorage.removeItem("hudson.relay.scout-takeover"),e&&window.localStorage.removeItem(`hudson.relay.scout-takeover-${e}`)}catch{}}export{n as q};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function l(t){return Number.isFinite(t)&&t>0}function f(t){const n=typeof t=="number"?t:typeof t=="string"?Number(t):null;return n===null||!l(n)?null:Math.trunc(n<1e12?n*1e3:n)}function i(t){return f(t)}function a(t,n){const e=i(t);if(e===null)return null;const s=Math.floor((n-e)/1e3),o=s<-4,r=Math.abs(s);return r<5?{label:"now",future:!1}:r<60?{label:`${r}s`,future:o}:r<3600?{label:`${Math.floor(r/60)}m`,future:o}:r<86400?{label:`${Math.floor(r/3600)}h`,future:o}:{label:`${Math.floor(r/86400)}d`,future:o}}function c(t,n){return(i(t)??0)-(i(n)??0)}function m(t,n){return c(n,t)}function d(t,n=Date.now()){const e=a(t,n);return e?e.future?`in ${e.label}`:e.label:""}function h(t,n=Date.now()){const e=a(t,n);return e?e.label==="now"?"just now":e.future?`in ${e.label}`:`${e.label} ago`:""}function p(t){const n=i(t);return n===null?"":new Date(n).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"})}function b(t){const n=i(t);return n===null?"":new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(n)}function S(t,n={}){const e=i(t);return e===null?"":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:n.milliseconds?3:void 0,hour12:!1}).format(e)}function g(t){if(typeof t!="number"||!Number.isFinite(t)||t<0)return"";const n=Math.floor(t/1e3),e=Math.floor(n/3600),s=Math.floor(n%3600/60),o=n%60,r=String(s).padStart(2,"0"),u=String(o).padStart(2,"0");return e>0?`${e}:${r}:${u}`:`${s}:${u}`}export{
|
|
1
|
+
function l(t){return Number.isFinite(t)&&t>0}function f(t){const n=typeof t=="number"?t:typeof t=="string"?Number(t):null;return n===null||!l(n)?null:Math.trunc(n<1e12?n*1e3:n)}function i(t){return f(t)}function a(t,n){const e=i(t);if(e===null)return null;const s=Math.floor((n-e)/1e3),o=s<-4,r=Math.abs(s);return r<5?{label:"now",future:!1}:r<60?{label:`${r}s`,future:o}:r<3600?{label:`${Math.floor(r/60)}m`,future:o}:r<86400?{label:`${Math.floor(r/3600)}h`,future:o}:{label:`${Math.floor(r/86400)}d`,future:o}}function c(t,n){return(i(t)??0)-(i(n)??0)}function m(t,n){return c(n,t)}function d(t,n=Date.now()){const e=a(t,n);return e?e.future?`in ${e.label}`:e.label:""}function h(t,n=Date.now()){const e=a(t,n);return e?e.label==="now"?"just now":e.future?`in ${e.label}`:`${e.label} ago`:""}function p(t){const n=i(t);return n===null?"":new Date(n).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"})}function b(t){const n=i(t);return n===null?"":new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(n)}function S(t,n={}){const e=i(t);return e===null?"":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:n.milliseconds?3:void 0,hour12:!1}).format(e)}function g(t){if(typeof t!="number"||!Number.isFinite(t)||t<0)return"";const n=Math.floor(t/1e3),e=Math.floor(n/3600),s=Math.floor(n%3600/60),o=n%60,r=String(s).padStart(2,"0"),u=String(o).padStart(2,"0");return e>0?`${e}:${r}:${u}`:`${s}:${u}`}export{h as a,p as b,m as c,S as d,c as e,b as f,g,i as n,d as t};
|
package/dist/client/assets/{use-conversation-list-Byab41G6.js → use-conversation-list-B1T6J_qE.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r}from"./index-
|
|
1
|
+
import{r}from"./index-sUomXsrf.js";import{f as p}from"./Provider-tFc3jqZ4.js";import{a as C}from"./api-h5zurxmi.js";import{u as v}from"./sse-CVoGDiKW.js";let e=null,a=null,l=null;const u=new Set,g=[];function f(){return e}function d(){return e??g}function S(){return l}function y(n){return u.add(n),()=>{u.delete(n)}}function h(){for(const n of u)n()}async function L(n={}){if(e&&!n.force)return e;if(a&&!n.force)return a;const o=C("/api/conversations").then(t=>(e=t,l=null,h(),t)).catch(t=>{throw l=t instanceof Error?t.message:String(t),h(),t}).finally(()=>{a=null});return a=o,o}function N(){const n=r.useSyncExternalStore(y,d,d),[o,t]=r.useState(()=>f()==null),[E,c]=r.useState(()=>S()),s=r.useCallback(async(i=!1)=>{f()!=null||t(!0);try{await L({force:i}),c(null)}catch(m){c(p(m))}finally{t(!1)}},[]);return r.useEffect(()=>{s(!1)},[s]),v(i=>{(i.kind==="message.posted"||i.kind==="conversation.upserted")&&s(!0)}),{sessions:n,loading:o,loadError:E,reload:s}}export{N as u};
|
package/dist/client/assets/{use-fleet-active-asks-BIbQx5AS.js → use-fleet-active-asks-DLofGhhK.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s}from"./index-
|
|
1
|
+
import{r as s}from"./index-sUomXsrf.js";import{a as d}from"./api-h5zurxmi.js";import{u}from"./sse-CVoGDiKW.js";const r=new Set(["working","queued","needs_attention"]);function l(){const[n,i]=s.useState(null),a=s.useCallback(async()=>{const t=await d("/api/fleet").catch(()=>null);i(t)},[]);return s.useEffect(()=>{a()},[a]),u(t=>{(t.kind==="message.posted"||t.kind==="flight.updated"||t.kind==="collaboration.event.appended")&&a()}),s.useMemo(()=>{const t=new Map;for(const e of n?.activeAsks??[]){if(!r.has(e.status))continue;const o=t.get(e.agentId);(!o||e.updatedAt>o.updatedAt)&&t.set(e.agentId,e)}return t},[n])}export{l as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as m}from"./index-sUomXsrf.js";import{a as S}from"./api-h5zurxmi.js";import{u as k}from"./sse-CVoGDiKW.js";import{u as E,m as p,j as M,k as l,l as _,n as q}from"./mesh-ops-Kn8pCtyJ.js";const w=new Set(["collaboration.event.appended","flight.updated","message.posted"]),y=750;let b=0;const c=new Map,f=new Map,g=new Map;let d=0;function h(e,s){const t=e??"",r=s.background?`background:${t}`:`foreground:${t}:${s.refreshToken??0}`,a=c.get(r);if(a)return s.background||l(e),a;const n=++b;g.set(t,n),s.background||l(e);const i=(async()=>{try{const o=new URLSearchParams;e&&o.set("machineId",e),o.set("limit","200"),s.background||o.set("refresh",String(n));const u=await S(`/api/mesh-ops?${o.toString()}`);if(g.get(t)!==n||p().machineId!==e)return;_(e,Array.isArray(u.items)?u.items:[],u.generatedAt??null,Array.isArray(u.hosts)?u.hosts:[])}catch(o){!s.background&&g.get(t)===n&&p().machineId===e&&q(e,o instanceof Error?o.message:String(o))}finally{f.get(r)===n&&(c.delete(r),f.delete(r))}})();return c.set(r,i),f.set(r,n),i}function F(e){const{items:s,status:t,error:r,refreshToken:a}=E();return m.useEffect(()=>{h(e,{background:!1,refreshToken:a})},[e,a]),k(n=>{if(!w.has(n.kind))return;const i=Date.now();i-d<y||(d=i,h(p().machineId,{background:!0}))}),{items:s,loading:t==="idle"||t==="loading",error:r,refresh:M}}export{F as u};
|
package/dist/client/assets/{use-reduced-motion-RRBkmVkk.js → use-reduced-motion-Cvk-HRKg.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h,j as et}from"./index-DMiGbrBt.js";const Ce=h.createContext({});function Pe(t){const e=h.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ae=typeof window<"u",Fe=Ae?h.useLayoutEffect:h.useEffect,$t=h.createContext(null);function Re(t,e){t.indexOf(e)===-1&&t.push(e)}function Ee(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Kt=(t,e,n)=>n>e?e:n<t?t:n;let Be=()=>{};const zt={},Ne=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ie=t=>/^0[^.\s]+$/u.test(t);function Oe(t){let e;return()=>(e===void 0&&(e=t()),e)}const Yt=t=>t;class Ut{constructor(){this.subscriptions=[]}add(e){return Re(this.subscriptions,e),()=>Ee(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const a=this.subscriptions[r];a&&a(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Xt=t=>t*1e3,q=t=>t/1e3,ke=(t,e)=>e?t*(1e3/e):0,Le=t=>Array.isArray(t)&&typeof t[0]=="number",W=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function De(t,e){let n=new Set,s=new Set,i=!1,r=!1;const a=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function c(l){a.has(l)&&(d.schedule(l),t()),l(u)}const d={schedule:(l,f=!1,p=!1)=>{const m=p&&i?n:s;return f&&a.add(l),m.add(l),l},cancel:l=>{s.delete(l),a.delete(l)},process:l=>{if(u=l,i){r=!0;return}i=!0;const f=n;n=s,s=f,n.forEach(c),n.clear(),i=!1,r&&(r=!1,d.process(l))}};return d}const je=40;function _t(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=W.reduce((b,V)=>(b[V]=De(r),b),{}),{setup:u,read:c,resolveKeyframes:d,preUpdate:l,update:f,preRender:p,render:g,postRender:m}=a,v=()=>{const b=zt.useManualTiming,V=b?i.timestamp:performance.now();n=!1,b||(i.delta=s?1e3/60:Math.max(Math.min(V-i.timestamp,je),1)),i.timestamp=V,i.isProcessing=!0,u.process(i),c.process(i),d.process(i),l.process(i),f.process(i),p.process(i),g.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(v))},x=()=>{n=!0,s=!0,i.isProcessing||t(v)};return{schedule:W.reduce((b,V)=>{const we=a[V];return b[V]=(Te,Me=!1,xe=!1)=>(n||x(),we.schedule(Te,Me,xe)),b},{}),cancel:b=>{for(let V=0;V<W.length;V++)a[W[V]].cancel(b)},state:i,steps:a}}const{schedule:k,cancel:vt,state:wt,steps:js}=_t(typeof requestAnimationFrame<"u"?requestAnimationFrame:Yt,!0);let z;function We(){z=void 0}const I={now:()=>(z===void 0&&I.set(wt.isProcessing||zt.useManualTiming?wt.timestamp:performance.now()),z),set:t=>{z=t,queueMicrotask(We)}},Ht=t=>e=>typeof e=="string"&&e.startsWith(t),$e=Ht("--"),Ke=Ht("var(--"),Ws=t=>Ke(t)?ze.test(t.split("/*")[0].trim()):!1,ze=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function $s(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const R={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},L={...R,transform:t=>Kt(0,1,t)},$={...R,default:1},O=t=>Math.round(t*1e5)/1e5,pt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ye(t){return t==null}const Ue=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mt=(t,e)=>n=>!!(typeof n=="string"&&Ue.test(n)&&n.startsWith(t)||e&&!Ye(n)&&Object.prototype.hasOwnProperty.call(n,e)),Zt=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,a,u]=s.match(pt);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(a),alpha:u!==void 0?parseFloat(u):1}},Xe=t=>Kt(0,255,t),Q={...R,transform:t=>Math.round(Xe(t))},B={test:mt("rgb","red"),parse:Zt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Q.transform(t)+", "+Q.transform(e)+", "+Q.transform(n)+", "+O(L.transform(s))+")"};function _e(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Tt={test:mt("#"),parse:_e,transform:B.transform},D=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),T=D("deg"),F=D("%"),o=D("px"),He=D("vh"),Ze=D("vw"),Mt={...F,parse:t=>F.parse(t)/100,transform:t=>F.transform(t*100)},K={test:mt("hsl","hue"),parse:Zt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+F.transform(O(e))+", "+F.transform(O(n))+", "+O(L.transform(s))+")"},y={test:t=>B.test(t)||Tt.test(t)||K.test(t),parse:t=>B.test(t)?B.parse(t):K.test(t)?K.parse(t):Tt.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?B.transform(t):K.transform(t),getAnimatableNone:t=>{const e=y.parse(t);return e.alpha=0,y.transform(e)}},Ge=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qe(t){return isNaN(t)&&typeof t=="string"&&(t.match(pt)?.length||0)+(t.match(Ge)?.length||0)>0}const Gt="number",qt="color",Qe="var",Je="var(",xt="${}",tn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function gt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const u=e.replace(tn,c=>(y.test(c)?(s.color.push(r),i.push(qt),n.push(y.parse(c))):c.startsWith(Je)?(s.var.push(r),i.push(Qe),n.push(c)):(s.number.push(r),i.push(Gt),n.push(parseFloat(c))),++r,xt)).split(xt);return{values:n,split:u,indexes:s,types:i}}function en(t){return gt(t).values}function Qt({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const a=e[r];a===Gt?i+=O(s[r]):a===qt?i+=y.transform(s[r]):i+=s[r]}return i}}function nn(t){return Qt(gt(t))}const sn=t=>typeof t=="number"?0:y.test(t)?y.getAnimatableNone(t):t,rn=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:sn(t);function an(t){const e=gt(t);return Qt(e)(e.values.map((s,i)=>rn(s,e.split[i])))}const M={test:qe,parse:en,createTransformer:nn,getAnimatableNone:an},on=(t,e,n)=>t+(e-t)*n,un=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},cn=t=>t!==null;function ln(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(cn),u=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!u||s===void 0?r[u]:s}class fn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}function dn(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const P=t=>t*180/Math.PI,nt=t=>{const e=P(Math.atan2(t[1],t[0]));return st(e)},hn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:nt,rotateZ:nt,skewX:t=>P(Math.atan(t[1])),skewY:t=>P(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},st=t=>(t=t%360,t<0&&(t+=360),t),Ct=nt,Pt=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),At=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),pn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Pt,scaleY:At,scale:t=>(Pt(t)+At(t))/2,rotateX:t=>st(P(Math.atan2(t[6],t[5]))),rotateY:t=>st(P(Math.atan2(-t[2],t[0]))),rotateZ:Ct,rotate:Ct,skewX:t=>P(Math.atan(t[4])),skewY:t=>P(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ft(t){return t.includes("scale")?1:0}function it(t,e){if(!t||t==="none")return Ft(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=pn,i=n;else{const u=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=hn,i=u}if(!i)return Ft(e);const r=s[e],a=i[1].split(",").map(mn);return typeof r=="function"?r(a):a[r]}const Ks=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return it(n,e)};function mn(t){return parseFloat(t.trim())}const j=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yt=new Set([...j,"pathRotation"]),zs=t=>t===R||t===o,gn=new Set(["x","y","z"]),yn=j.filter(t=>!gn.has(t));function bn(t){const e=[];return yn.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Y={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>it(e,"x"),y:(t,{transform:e})=>it(e,"y")};Y.translateX=Y.x;Y.translateY=Y.y;const A=new Set;let rt=!1,at=!1,ot=!1;function Jt(){if(at){const t=Array.from(A).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=bn(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,a])=>{s.getValue(r)?.set(a)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}at=!1,rt=!1,A.forEach(t=>t.complete(ot)),A.clear()}function te(){A.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(at=!0)})}function Ys(){ot=!0,te(),Jt(),ot=!1}class Sn{constructor(e,n,s,i,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(A.add(this),rt||(rt=!0,k.read(te),k.resolveKeyframes(Jt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const u=s.readValue(n,a);u!=null&&(e[0]=u)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}dn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),A.delete(this)}cancel(){this.state==="scheduled"&&(A.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Vn=t=>t.startsWith("--");function vn(t,e,n){Vn(e)?t.style.setProperty(e,n):t.style[e]=n}const wn={};function ee(t,e){const n=Oe(t);return()=>wn[e]??n()}const Tn=ee(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),ne=ee(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),N=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Rt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:N([0,.65,.55,1]),circOut:N([.55,0,1,.45]),backIn:N([.31,.01,.66,-.59]),backOut:N([.33,1.53,.69,.99])};function se(t,e){if(t)return typeof t=="function"?ne()?un(t,e):"ease-out":Le(t)?N(t):Array.isArray(t)?t.map(n=>se(n,e)||Rt.easeOut):Rt[t]}function Mn(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:a="loop",ease:u="easeOut",times:c}={},d=void 0){const l={[e]:n};c&&(l.offset=c);const f=se(u,i);Array.isArray(f)&&(l.easing=f);const p={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"};return d&&(p.pseudoElement=d),t.animate(l,p)}function xn(t){return typeof t=="function"&&"applyToOptions"in t}function Cn({type:t,...e}){return xn(t)&&ne()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Pn extends fn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:u,onComplete:c}=e;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=e,Be(typeof e.type!="string");const d=Cn(e);this.animation=Mn(n,s,i,d,r),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const l=ln(i,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(l),vn(n,s,l),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return q(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+q(e)}get time(){return q(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Xt(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Tn()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),Yt):i(this)}}const An=new Set(["opacity","clipPath","filter","transform"]),Et=30,Fn=t=>!isNaN(parseFloat(t));class Rn{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=I.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=I.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Fn(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Ut);const s=this.events[e].add(n);return e==="change"?()=>{s(),k.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=I.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Et)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Et);return ke(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ut(t,e){return new Rn(t,e)}function Bt(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function ie(t,e,n,s){if(typeof e=="function"){const[i,r]=Bt(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Bt(s);e=e(n!==void 0?n:t.custom,i,r)}return e}const S=t=>!!(t&&t.getVelocity);function En(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Bn="framerAppearId",Nn="data-"+En(Bn),In={test:t=>t==="auto",parse:t=>t},re=t=>e=>e.test(t),ae=[R,o,F,T,Ze,He,In],Us=t=>ae.find(re(t)),On=new Set(["brightness","contrast","saturate","opacity"]);function kn(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(pt)||[];if(!s)return t;const i=n.replace(s,"");let r=On.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Ln=/\b([a-z-]*)\(.*?\)/gu,ct={...M,getAnimatableNone:t=>{const e=t.match(Ln);return e?e.map(kn).join(" "):t}},lt={...M,getAnimatableNone:t=>{const e=M.parse(t);return M.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Nt={...R,transform:Math.round},Dn={rotate:T,pathRotation:T,rotateX:T,rotateY:T,rotateZ:T,scale:$,scaleX:$,scaleY:$,scaleZ:$,skew:T,skewX:T,skewY:T,distance:o,translateX:o,translateY:o,translateZ:o,x:o,y:o,z:o,perspective:o,transformPerspective:o,opacity:L,originX:Mt,originY:Mt,originZ:o},U={borderWidth:o,borderTopWidth:o,borderRightWidth:o,borderBottomWidth:o,borderLeftWidth:o,borderRadius:o,borderTopLeftRadius:o,borderTopRightRadius:o,borderBottomRightRadius:o,borderBottomLeftRadius:o,width:o,maxWidth:o,height:o,maxHeight:o,top:o,right:o,bottom:o,left:o,inset:o,insetBlock:o,insetBlockStart:o,insetBlockEnd:o,insetInline:o,insetInlineStart:o,insetInlineEnd:o,padding:o,paddingTop:o,paddingRight:o,paddingBottom:o,paddingLeft:o,paddingBlock:o,paddingBlockStart:o,paddingBlockEnd:o,paddingInline:o,paddingInlineStart:o,paddingInlineEnd:o,margin:o,marginTop:o,marginRight:o,marginBottom:o,marginLeft:o,marginBlock:o,marginBlockStart:o,marginBlockEnd:o,marginInline:o,marginInlineStart:o,marginInlineEnd:o,fontSize:o,backgroundPositionX:o,backgroundPositionY:o,...Dn,zIndex:Nt,fillOpacity:L,strokeOpacity:L,numOctaves:Nt},jn={...U,color:y,backgroundColor:y,outlineColor:y,fill:y,stroke:y,borderColor:y,borderTopColor:y,borderRightColor:y,borderBottomColor:y,borderLeftColor:y,filter:ct,WebkitFilter:ct,mask:lt,WebkitMask:lt},Wn=t=>jn[t],$n=new Set([ct,lt]);function Kn(t,e){let n=Wn(t);return $n.has(n)||(n=M),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ft=(t,e)=>e&&typeof t=="number"?e.transform(t):t,{schedule:zn}=_t(queueMicrotask,!1),Yn=[...ae,y,M],Un=t=>Yn.find(re(t)),It=()=>({translate:0,scale:1,origin:0,originPoint:0}),Xs=()=>({x:It(),y:It()}),Ot=()=>({min:0,max:0}),Xn=()=>({x:Ot(),y:Ot()}),_n=new WeakMap;function oe(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function dt(t){return typeof t=="string"||Array.isArray(t)}const Hn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Zn=["initial",...Hn];function Z(t){return oe(t.animate)||Zn.some(e=>dt(t[e]))}function ue(t){return!!(Z(t)||t.variants)}function Gn(t,e,n){for(const s in e){const i=e[s],r=n[s];if(S(i))t.addValue(s,i);else if(S(r))t.addValue(s,ut(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const a=t.getValue(s);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,ut(a!==void 0?a:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const X={current:null},bt={current:!1},qn=typeof window<"u";function ce(){if(bt.current=!0,!!qn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>X.current=t.matches;t.addEventListener("change",e),e()}else X.current=!1}const kt=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let _={};function le(t){_=t}function Qn(){return _}class _s{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:a,visualState:u},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Sn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=I.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,k.render(this.render,!1,!0))};const{latestValues:d,renderState:l}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=Z(n),this.isVariantNode=ue(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in p){const m=p[g];d[g]!==void 0&&S(m)&&m.set(d[g])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,_n.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(bt.current||ce(),this.shouldReduceMotion=X.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),vt(this.notifyUpdate),vt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&An.has(e)&&this.current instanceof HTMLElement){const{factory:a,keyframes:u,times:c,ease:d,duration:l}=n.accelerate,f=new Pn({element:this.current,name:e,keyframes:u,times:c,ease:d,duration:Xt(l)}),p=a(f);this.valueSubscriptions.set(e,()=>{p(),f.cancel()});return}const s=yt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&k.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in _){const n=_[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Xn()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<kt.length;s++){const i=kt[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,a=e[r];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Gn(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=ut(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ne(s)||Ie(s))?s=parseFloat(s):!Un(s)&&M.test(n)&&(s=Kn(e,n)),this.setBaseTarget(e,S(s)?s.get():s)),S(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=ie(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!S(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ut),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){zn.render(this.render)}}const Jn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ts=j.length;function es(t,e,n){let s="",i=!0;for(let a=0;a<ts;a++){const u=j[a],c=t[u];if(c===void 0)continue;let d=!0;if(typeof c=="number")d=c===(u.startsWith("scale")?1:0);else{const l=parseFloat(c);d=u.startsWith("scale")?l===1:l===0}if(!d||n){const l=ft(c,U[u]);if(!d){i=!1;const f=Jn[u]||u;s+=`${f}(${l}) `}n&&(e[u]=l)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${ft(r,U.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function fe(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let a=!1,u=!1;for(const c in e){const d=e[c];if(yt.has(c)){a=!0;continue}else if($e(c)){i[c]=d;continue}else{const l=ft(d,U[c]);c.startsWith("origin")?(u=!0,r[c]=l):s[c]=l}}if(e.transform||(a||n?s.transform=es(e,t.transform,n):s.transform&&(s.transform="none")),u){const{originX:c="50%",originY:d="50%",originZ:l=0}=r;s.transformOrigin=`${c} ${d} ${l}`}}function Lt(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const E={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(o.test(t))t=parseFloat(t);else return t;const n=Lt(t,e.target.x),s=Lt(t,e.target.y);return`${n}% ${s}%`}},ns={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=M.parse(t);if(i.length>5)return s;const r=M.createTransformer(t),a=typeof i[0]!="number"?1:0,u=n.x.scale*e.x,c=n.y.scale*e.y;i[0+a]/=u,i[1+a]/=c;const d=on(u,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=d),typeof i[3+a]=="number"&&(i[3+a]/=d),r(i)}},ss={borderRadius:{...E,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomLeftRadius:E,borderBottomRightRadius:E,boxShadow:ns};function de(t,{layout:e,layoutId:n}){return yt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ss[t]||t==="opacity")}function he(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const a in s)(S(s[a])||i&&S(i[a])||de(a,t)||n?.getValue(a)?.liveStyle!==void 0)&&(r[a]=s[a]);return r}const is={offset:"stroke-dashoffset",array:"stroke-dasharray"},rs={offset:"strokeDashoffset",array:"strokeDasharray"};function as(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?is:rs;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const os=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function us(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:a=0,...u},c,d,l){if(fe(t,u,d),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:p}=t;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=l?.transformBox??"fill-box",delete f.transformBox);for(const g of os)f[g]!==void 0&&(p[g]=f[g],delete f[g]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&as(f,i,r,a,!1)}const cs=t=>typeof t=="string"&&t.toLowerCase()==="svg";function ls(t,e,n){const s=he(t,e,n);for(const i in t)if(S(t[i])||S(e[i])){const r=j.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function fs(t){return S(t)?t.get():t}const pe=h.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),St=h.createContext({strict:!1}),Dt={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let jt=!1;function ds(){if(jt)return;const t={};for(const e in Dt)t[e]={isEnabled:n=>Dt[e].some(s=>!!n[s])};le(t),jt=!0}function me(){return ds(),Qn()}function ht(t){const e=me();for(const n in t)e[n]={...e[n],...t[n]};le(e)}function Hs({children:t,features:e,strict:n=!1}){const[,s]=h.useState(!J(e)),i=h.useRef(void 0);if(!J(e)){const{renderer:r,...a}=e;i.current=r,ht(a)}return h.useEffect(()=>{J(e)&&e().then(({renderer:r,...a})=>{ht(a),i.current=r,s(!0)})},[]),et.jsx(St.Provider,{value:{renderer:i.current,strict:n},children:t})}function J(t){return typeof t=="function"}const hs=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function H(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||hs.has(t)}let ge=t=>!H(t);function ps(t){typeof t=="function"&&(ge=e=>e.startsWith("on")?!H(e):t(e))}try{ps(require("@emotion/is-prop-valid").default)}catch{}function ms(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||S(t[i])||(ge(i)||n===!0&&H(i)||!e&&!H(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const G=h.createContext({});function gs(t,e){if(Z(t)){const{initial:n,animate:s}=t;return{initial:n===!1||dt(n)?n:void 0,animate:dt(s)?s:void 0}}return t.inherit!==!1?e:{}}function ys(t){const{initial:e,animate:n}=gs(t,h.useContext(G));return h.useMemo(()=>({initial:e,animate:n}),[Wt(e),Wt(n)])}function Wt(t){return Array.isArray(t)?t.join(" "):t}const Vt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ye(t,e,n){for(const s in e)!S(e[s])&&!de(s,n)&&(t[s]=e[s])}function bs({transformTemplate:t},e){return h.useMemo(()=>{const n=Vt();return fe(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Ss(t,e){const n=t.style||{},s={};return ye(s,n,t),Object.assign(s,bs(t,e)),s}function Vs(t,e){const n={},s=Ss(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const be=()=>({...Vt(),attrs:{}});function vs(t,e,n,s){const i=h.useMemo(()=>{const r=be();return us(r,e,cs(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};ye(r,t.style,t),i.style={...r,...i.style}}return i}const ws=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Se(t){return typeof t!="string"||t.includes("-")?!1:!!(ws.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ts(t,e,n,{latestValues:s},i,r=!1,a){const c=(a??Se(t)?vs:Vs)(e,s,i,t),d=ms(e,typeof t=="string",r),l=t!==h.Fragment?{...d,...c,ref:n}:{},{children:f}=e,p=h.useMemo(()=>S(f)?f.get():f,[f]);return h.createElement(t,{...l,children:p})}function Ms({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:xs(n,s,i,t),renderState:e()}}function xs(t,e,n,s){const i={},r=s(t,{});for(const p in r)i[p]=fs(r[p]);let{initial:a,animate:u}=t;const c=Z(t),d=ue(t);e&&d&&!c&&t.inherit!==!1&&(a===void 0&&(a=e.initial),u===void 0&&(u=e.animate));let l=n?n.initial===!1:!1;l=l||a===!1;const f=l?u:a;if(f&&typeof f!="boolean"&&!oe(f)){const p=Array.isArray(f)?f:[f];for(let g=0;g<p.length;g++){const m=ie(t,p[g]);if(m){const{transitionEnd:v,transition:x,...C}=m;for(const w in C){let b=C[w];if(Array.isArray(b)){const V=l?b.length-1:0;b=b[V]}b!==null&&(i[w]=b)}for(const w in v)i[w]=v[w]}}}return i}const Ve=t=>(e,n)=>{const s=h.useContext(G),i=h.useContext($t),r=()=>Ms(t,e,s,i);return n?r():Pe(r)},Cs=Ve({scrapeMotionValuesFromProps:he,createRenderState:Vt}),Ps=Ve({scrapeMotionValuesFromProps:ls,createRenderState:be}),As=Symbol.for("motionComponentSymbol");function Fs(t,e,n){const s=h.useRef(n);h.useInsertionEffect(()=>{s.current=n});const i=h.useRef(null);return h.useCallback(r=>{r&&t.onMount?.(r),e&&(r?e.mount(r):e.unmount());const a=s.current;if(typeof a=="function")if(r){const u=a(r);typeof u=="function"&&(i.current=u)}else i.current?(i.current(),i.current=null):a(r);else a&&(a.current=r)},[e])}const Rs=h.createContext({});function Es(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Bs(t,e,n,s,i,r){const{visualElement:a}=h.useContext(G),u=h.useContext(St),c=h.useContext($t),d=h.useContext(pe),l=d.reducedMotion,f=d.skipAnimations,p=h.useRef(null),g=h.useRef(!1);s=s||u.renderer,!p.current&&s&&(p.current=s(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:l,skipAnimations:f,isSVG:r}),g.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const m=p.current,v=h.useContext(Rs);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Ns(p.current,n,i,v);const x=h.useRef(!1);h.useInsertionEffect(()=>{m&&x.current&&m.update(n,c)});const C=n[Nn],w=h.useRef(!!C&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(C)&&window.MotionHasOptimisedAnimation?.(C));return Fe(()=>{g.current=!0,m&&(x.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),w.current&&m.animationState&&m.animationState.animateChanges())}),h.useEffect(()=>{m&&(!w.current&&m.animationState&&m.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(C)}),w.current=!1),m.enteringChildren=void 0)}),m}function Ns(t,e,n,s){const{layoutId:i,layout:r,drag:a,dragConstraints:u,layoutScroll:c,layoutRoot:d,layoutAnchor:l,layoutCrossfade:f}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:ve(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!a||u&&Es(u),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:f,layoutScroll:c,layoutRoot:d,layoutAnchor:l})}function ve(t){if(t)return t.options.allowProjection!==!1?t.projection:ve(t.parent)}function tt(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&ht(s);const r=n?n==="svg":Se(t),a=r?Ps:Cs;function u(d,l){let f;const p={...h.useContext(pe),...d,layoutId:Is(d)},{isStatic:g}=p,m=ys(d),v=a(d,g);if(!g&&typeof window<"u"){Os();const x=ks(p);f=x.MeasureLayout,m.visualElement=Bs(t,v,p,i,x.ProjectionNode,r)}return et.jsxs(G.Provider,{value:m,children:[f&&m.visualElement?et.jsx(f,{visualElement:m.visualElement,...p}):null,Ts(t,d,Fs(v,m.visualElement,l),v,g,e,r)]})}u.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=h.forwardRef(u);return c[As]=t,c}function Is({layoutId:t}){const e=h.useContext(Ce).id;return e&&t!==void 0?e+"-"+t:t}function Os(t,e){h.useContext(St).strict}function ks(t){const e=me(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Ls(t,e){if(typeof Proxy>"u")return tt;const n=new Map,s=(r,a)=>tt(r,a,t,e),i=(r,a)=>s(r,a);return new Proxy(i,{get:(r,a)=>a==="create"?s:(n.has(a)||n.set(a,tt(a,void 0,t,e)),n.get(a))})}const Zs=Ls();function Gs(){!bt.current&&ce();const[t]=h.useState(X.current);return t}export{Xn as $,Oe as A,Ys as B,yt as C,Ne as D,ie as E,j as F,ut as G,S as H,Nn as I,Ie as J,Sn as K,Hs as L,zt as M,Pn as N,Kn as O,Us as P,$s as Q,Y as R,zs as S,Ft as T,Ks as U,_s as V,fn as W,$e as X,fe as Y,he as Z,En as _,Be as a,ls as a0,us as a1,cs as a2,Wn as a3,dt as a4,Zn as a5,oe as a6,Hn as a7,Se as a8,F as a9,o as aa,Re as ab,Ee as ac,Ut as ad,js as ae,zn as af,Xs as ag,fs as ah,ss as ai,pe as aj,Pe as ak,$t as al,Fe as am,Ce as an,Es as ao,Rs as ap,Ls as aq,on as b,Tt as c,Ws as d,y as e,M as f,gt as g,K as h,Le as i,wt as j,vt as k,k as l,Zs as m,Yt as n,q as o,Kt as p,un as q,B as r,Xt as s,I as t,Gs as u,ke as v,ln as w,vn as x,xn as y,An as z};
|
|
1
|
+
import{r as h,j as et}from"./index-sUomXsrf.js";const Ce=h.createContext({});function Pe(t){const e=h.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ae=typeof window<"u",Fe=Ae?h.useLayoutEffect:h.useEffect,$t=h.createContext(null);function Re(t,e){t.indexOf(e)===-1&&t.push(e)}function Ee(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Kt=(t,e,n)=>n>e?e:n<t?t:n;let Be=()=>{};const zt={},Ne=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ie=t=>/^0[^.\s]+$/u.test(t);function Oe(t){let e;return()=>(e===void 0&&(e=t()),e)}const Yt=t=>t;class Ut{constructor(){this.subscriptions=[]}add(e){return Re(this.subscriptions,e),()=>Ee(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const a=this.subscriptions[r];a&&a(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Xt=t=>t*1e3,q=t=>t/1e3,ke=(t,e)=>e?t*(1e3/e):0,Le=t=>Array.isArray(t)&&typeof t[0]=="number",W=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function De(t,e){let n=new Set,s=new Set,i=!1,r=!1;const a=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function c(l){a.has(l)&&(d.schedule(l),t()),l(u)}const d={schedule:(l,f=!1,p=!1)=>{const m=p&&i?n:s;return f&&a.add(l),m.add(l),l},cancel:l=>{s.delete(l),a.delete(l)},process:l=>{if(u=l,i){r=!0;return}i=!0;const f=n;n=s,s=f,n.forEach(c),n.clear(),i=!1,r&&(r=!1,d.process(l))}};return d}const je=40;function _t(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=W.reduce((b,V)=>(b[V]=De(r),b),{}),{setup:u,read:c,resolveKeyframes:d,preUpdate:l,update:f,preRender:p,render:g,postRender:m}=a,v=()=>{const b=zt.useManualTiming,V=b?i.timestamp:performance.now();n=!1,b||(i.delta=s?1e3/60:Math.max(Math.min(V-i.timestamp,je),1)),i.timestamp=V,i.isProcessing=!0,u.process(i),c.process(i),d.process(i),l.process(i),f.process(i),p.process(i),g.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(v))},x=()=>{n=!0,s=!0,i.isProcessing||t(v)};return{schedule:W.reduce((b,V)=>{const we=a[V];return b[V]=(Te,Me=!1,xe=!1)=>(n||x(),we.schedule(Te,Me,xe)),b},{}),cancel:b=>{for(let V=0;V<W.length;V++)a[W[V]].cancel(b)},state:i,steps:a}}const{schedule:k,cancel:vt,state:wt,steps:js}=_t(typeof requestAnimationFrame<"u"?requestAnimationFrame:Yt,!0);let z;function We(){z=void 0}const I={now:()=>(z===void 0&&I.set(wt.isProcessing||zt.useManualTiming?wt.timestamp:performance.now()),z),set:t=>{z=t,queueMicrotask(We)}},Ht=t=>e=>typeof e=="string"&&e.startsWith(t),$e=Ht("--"),Ke=Ht("var(--"),Ws=t=>Ke(t)?ze.test(t.split("/*")[0].trim()):!1,ze=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function $s(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const R={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},L={...R,transform:t=>Kt(0,1,t)},$={...R,default:1},O=t=>Math.round(t*1e5)/1e5,pt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ye(t){return t==null}const Ue=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,mt=(t,e)=>n=>!!(typeof n=="string"&&Ue.test(n)&&n.startsWith(t)||e&&!Ye(n)&&Object.prototype.hasOwnProperty.call(n,e)),Zt=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,a,u]=s.match(pt);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(a),alpha:u!==void 0?parseFloat(u):1}},Xe=t=>Kt(0,255,t),Q={...R,transform:t=>Math.round(Xe(t))},B={test:mt("rgb","red"),parse:Zt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Q.transform(t)+", "+Q.transform(e)+", "+Q.transform(n)+", "+O(L.transform(s))+")"};function _e(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Tt={test:mt("#"),parse:_e,transform:B.transform},D=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),T=D("deg"),F=D("%"),o=D("px"),He=D("vh"),Ze=D("vw"),Mt={...F,parse:t=>F.parse(t)/100,transform:t=>F.transform(t*100)},K={test:mt("hsl","hue"),parse:Zt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+F.transform(O(e))+", "+F.transform(O(n))+", "+O(L.transform(s))+")"},y={test:t=>B.test(t)||Tt.test(t)||K.test(t),parse:t=>B.test(t)?B.parse(t):K.test(t)?K.parse(t):Tt.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?B.transform(t):K.transform(t),getAnimatableNone:t=>{const e=y.parse(t);return e.alpha=0,y.transform(e)}},Ge=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qe(t){return isNaN(t)&&typeof t=="string"&&(t.match(pt)?.length||0)+(t.match(Ge)?.length||0)>0}const Gt="number",qt="color",Qe="var",Je="var(",xt="${}",tn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function gt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const u=e.replace(tn,c=>(y.test(c)?(s.color.push(r),i.push(qt),n.push(y.parse(c))):c.startsWith(Je)?(s.var.push(r),i.push(Qe),n.push(c)):(s.number.push(r),i.push(Gt),n.push(parseFloat(c))),++r,xt)).split(xt);return{values:n,split:u,indexes:s,types:i}}function en(t){return gt(t).values}function Qt({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const a=e[r];a===Gt?i+=O(s[r]):a===qt?i+=y.transform(s[r]):i+=s[r]}return i}}function nn(t){return Qt(gt(t))}const sn=t=>typeof t=="number"?0:y.test(t)?y.getAnimatableNone(t):t,rn=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:sn(t);function an(t){const e=gt(t);return Qt(e)(e.values.map((s,i)=>rn(s,e.split[i])))}const M={test:qe,parse:en,createTransformer:nn,getAnimatableNone:an},on=(t,e,n)=>t+(e-t)*n,un=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},cn=t=>t!==null;function ln(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(cn),u=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!u||s===void 0?r[u]:s}class fn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}function dn(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const P=t=>t*180/Math.PI,nt=t=>{const e=P(Math.atan2(t[1],t[0]));return st(e)},hn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:nt,rotateZ:nt,skewX:t=>P(Math.atan(t[1])),skewY:t=>P(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},st=t=>(t=t%360,t<0&&(t+=360),t),Ct=nt,Pt=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),At=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),pn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Pt,scaleY:At,scale:t=>(Pt(t)+At(t))/2,rotateX:t=>st(P(Math.atan2(t[6],t[5]))),rotateY:t=>st(P(Math.atan2(-t[2],t[0]))),rotateZ:Ct,rotate:Ct,skewX:t=>P(Math.atan(t[4])),skewY:t=>P(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ft(t){return t.includes("scale")?1:0}function it(t,e){if(!t||t==="none")return Ft(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=pn,i=n;else{const u=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=hn,i=u}if(!i)return Ft(e);const r=s[e],a=i[1].split(",").map(mn);return typeof r=="function"?r(a):a[r]}const Ks=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return it(n,e)};function mn(t){return parseFloat(t.trim())}const j=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yt=new Set([...j,"pathRotation"]),zs=t=>t===R||t===o,gn=new Set(["x","y","z"]),yn=j.filter(t=>!gn.has(t));function bn(t){const e=[];return yn.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Y={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>it(e,"x"),y:(t,{transform:e})=>it(e,"y")};Y.translateX=Y.x;Y.translateY=Y.y;const A=new Set;let rt=!1,at=!1,ot=!1;function Jt(){if(at){const t=Array.from(A).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=bn(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([r,a])=>{s.getValue(r)?.set(a)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}at=!1,rt=!1,A.forEach(t=>t.complete(ot)),A.clear()}function te(){A.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(at=!0)})}function Ys(){ot=!0,te(),Jt(),ot=!1}class Sn{constructor(e,n,s,i,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(A.add(this),rt||(rt=!0,k.read(te),k.resolveKeyframes(Jt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const u=s.readValue(n,a);u!=null&&(e[0]=u)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}dn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),A.delete(this)}cancel(){this.state==="scheduled"&&(A.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Vn=t=>t.startsWith("--");function vn(t,e,n){Vn(e)?t.style.setProperty(e,n):t.style[e]=n}const wn={};function ee(t,e){const n=Oe(t);return()=>wn[e]??n()}const Tn=ee(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),ne=ee(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),N=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Rt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:N([0,.65,.55,1]),circOut:N([.55,0,1,.45]),backIn:N([.31,.01,.66,-.59]),backOut:N([.33,1.53,.69,.99])};function se(t,e){if(t)return typeof t=="function"?ne()?un(t,e):"ease-out":Le(t)?N(t):Array.isArray(t)?t.map(n=>se(n,e)||Rt.easeOut):Rt[t]}function Mn(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:a="loop",ease:u="easeOut",times:c}={},d=void 0){const l={[e]:n};c&&(l.offset=c);const f=se(u,i);Array.isArray(f)&&(l.easing=f);const p={delay:s,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"};return d&&(p.pseudoElement=d),t.animate(l,p)}function xn(t){return typeof t=="function"&&"applyToOptions"in t}function Cn({type:t,...e}){return xn(t)&&ne()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Pn extends fn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:u,onComplete:c}=e;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=e,Be(typeof e.type!="string");const d=Cn(e);this.animation=Mn(n,s,i,d,r),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const l=ln(i,this.options,u,this.speed);this.updateMotionValue&&this.updateMotionValue(l),vn(n,s,l),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return q(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+q(e)}get time(){return q(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Xt(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Tn()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),Yt):i(this)}}const An=new Set(["opacity","clipPath","filter","transform"]),Et=30,Fn=t=>!isNaN(parseFloat(t));class Rn{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=I.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=I.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Fn(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Ut);const s=this.events[e].add(n);return e==="change"?()=>{s(),k.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=I.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Et)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Et);return ke(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ut(t,e){return new Rn(t,e)}function Bt(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function ie(t,e,n,s){if(typeof e=="function"){const[i,r]=Bt(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Bt(s);e=e(n!==void 0?n:t.custom,i,r)}return e}const S=t=>!!(t&&t.getVelocity);function En(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Bn="framerAppearId",Nn="data-"+En(Bn),In={test:t=>t==="auto",parse:t=>t},re=t=>e=>e.test(t),ae=[R,o,F,T,Ze,He,In],Us=t=>ae.find(re(t)),On=new Set(["brightness","contrast","saturate","opacity"]);function kn(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(pt)||[];if(!s)return t;const i=n.replace(s,"");let r=On.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Ln=/\b([a-z-]*)\(.*?\)/gu,ct={...M,getAnimatableNone:t=>{const e=t.match(Ln);return e?e.map(kn).join(" "):t}},lt={...M,getAnimatableNone:t=>{const e=M.parse(t);return M.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Nt={...R,transform:Math.round},Dn={rotate:T,pathRotation:T,rotateX:T,rotateY:T,rotateZ:T,scale:$,scaleX:$,scaleY:$,scaleZ:$,skew:T,skewX:T,skewY:T,distance:o,translateX:o,translateY:o,translateZ:o,x:o,y:o,z:o,perspective:o,transformPerspective:o,opacity:L,originX:Mt,originY:Mt,originZ:o},U={borderWidth:o,borderTopWidth:o,borderRightWidth:o,borderBottomWidth:o,borderLeftWidth:o,borderRadius:o,borderTopLeftRadius:o,borderTopRightRadius:o,borderBottomRightRadius:o,borderBottomLeftRadius:o,width:o,maxWidth:o,height:o,maxHeight:o,top:o,right:o,bottom:o,left:o,inset:o,insetBlock:o,insetBlockStart:o,insetBlockEnd:o,insetInline:o,insetInlineStart:o,insetInlineEnd:o,padding:o,paddingTop:o,paddingRight:o,paddingBottom:o,paddingLeft:o,paddingBlock:o,paddingBlockStart:o,paddingBlockEnd:o,paddingInline:o,paddingInlineStart:o,paddingInlineEnd:o,margin:o,marginTop:o,marginRight:o,marginBottom:o,marginLeft:o,marginBlock:o,marginBlockStart:o,marginBlockEnd:o,marginInline:o,marginInlineStart:o,marginInlineEnd:o,fontSize:o,backgroundPositionX:o,backgroundPositionY:o,...Dn,zIndex:Nt,fillOpacity:L,strokeOpacity:L,numOctaves:Nt},jn={...U,color:y,backgroundColor:y,outlineColor:y,fill:y,stroke:y,borderColor:y,borderTopColor:y,borderRightColor:y,borderBottomColor:y,borderLeftColor:y,filter:ct,WebkitFilter:ct,mask:lt,WebkitMask:lt},Wn=t=>jn[t],$n=new Set([ct,lt]);function Kn(t,e){let n=Wn(t);return $n.has(n)||(n=M),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ft=(t,e)=>e&&typeof t=="number"?e.transform(t):t,{schedule:zn}=_t(queueMicrotask,!1),Yn=[...ae,y,M],Un=t=>Yn.find(re(t)),It=()=>({translate:0,scale:1,origin:0,originPoint:0}),Xs=()=>({x:It(),y:It()}),Ot=()=>({min:0,max:0}),Xn=()=>({x:Ot(),y:Ot()}),_n=new WeakMap;function oe(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function dt(t){return typeof t=="string"||Array.isArray(t)}const Hn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Zn=["initial",...Hn];function Z(t){return oe(t.animate)||Zn.some(e=>dt(t[e]))}function ue(t){return!!(Z(t)||t.variants)}function Gn(t,e,n){for(const s in e){const i=e[s],r=n[s];if(S(i))t.addValue(s,i);else if(S(r))t.addValue(s,ut(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const a=t.getValue(s);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=t.getStaticValue(s);t.addValue(s,ut(a!==void 0?a:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const X={current:null},bt={current:!1},qn=typeof window<"u";function ce(){if(bt.current=!0,!!qn)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>X.current=t.matches;t.addEventListener("change",e),e()}else X.current=!1}const kt=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let _={};function le(t){_=t}function Qn(){return _}class _s{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:a,visualState:u},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Sn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=I.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,k.render(this.render,!1,!0))};const{latestValues:d,renderState:l}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=l,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!a,this.isControllingVariants=Z(n),this.isVariantNode=ue(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in p){const m=p[g];d[g]!==void 0&&S(m)&&m.set(d[g])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,_n.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(bt.current||ce(),this.shouldReduceMotion=X.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),vt(this.notifyUpdate),vt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&An.has(e)&&this.current instanceof HTMLElement){const{factory:a,keyframes:u,times:c,ease:d,duration:l}=n.accelerate,f=new Pn({element:this.current,name:e,keyframes:u,times:c,ease:d,duration:Xt(l)}),p=a(f);this.valueSubscriptions.set(e,()=>{p(),f.cancel()});return}const s=yt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&k.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in _){const n=_[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Xn()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<kt.length;s++){const i=kt[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,a=e[r];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=Gn(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=ut(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ne(s)||Ie(s))?s=parseFloat(s):!Un(s)&&M.test(n)&&(s=Kn(e,n)),this.setBaseTarget(e,S(s)?s.get():s)),S(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=ie(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!S(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ut),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){zn.render(this.render)}}const Jn={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ts=j.length;function es(t,e,n){let s="",i=!0;for(let a=0;a<ts;a++){const u=j[a],c=t[u];if(c===void 0)continue;let d=!0;if(typeof c=="number")d=c===(u.startsWith("scale")?1:0);else{const l=parseFloat(c);d=u.startsWith("scale")?l===1:l===0}if(!d||n){const l=ft(c,U[u]);if(!d){i=!1;const f=Jn[u]||u;s+=`${f}(${l}) `}n&&(e[u]=l)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${ft(r,U.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function fe(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let a=!1,u=!1;for(const c in e){const d=e[c];if(yt.has(c)){a=!0;continue}else if($e(c)){i[c]=d;continue}else{const l=ft(d,U[c]);c.startsWith("origin")?(u=!0,r[c]=l):s[c]=l}}if(e.transform||(a||n?s.transform=es(e,t.transform,n):s.transform&&(s.transform="none")),u){const{originX:c="50%",originY:d="50%",originZ:l=0}=r;s.transformOrigin=`${c} ${d} ${l}`}}function Lt(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const E={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(o.test(t))t=parseFloat(t);else return t;const n=Lt(t,e.target.x),s=Lt(t,e.target.y);return`${n}% ${s}%`}},ns={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=M.parse(t);if(i.length>5)return s;const r=M.createTransformer(t),a=typeof i[0]!="number"?1:0,u=n.x.scale*e.x,c=n.y.scale*e.y;i[0+a]/=u,i[1+a]/=c;const d=on(u,c,.5);return typeof i[2+a]=="number"&&(i[2+a]/=d),typeof i[3+a]=="number"&&(i[3+a]/=d),r(i)}},ss={borderRadius:{...E,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomLeftRadius:E,borderBottomRightRadius:E,boxShadow:ns};function de(t,{layout:e,layoutId:n}){return yt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ss[t]||t==="opacity")}function he(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const a in s)(S(s[a])||i&&S(i[a])||de(a,t)||n?.getValue(a)?.liveStyle!==void 0)&&(r[a]=s[a]);return r}const is={offset:"stroke-dashoffset",array:"stroke-dasharray"},rs={offset:"strokeDashoffset",array:"strokeDasharray"};function as(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?is:rs;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const os=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function us(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:a=0,...u},c,d,l){if(fe(t,u,d),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:p}=t;f.transform&&(p.transform=f.transform,delete f.transform),(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=l?.transformBox??"fill-box",delete f.transformBox);for(const g of os)f[g]!==void 0&&(p[g]=f[g],delete f[g]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),i!==void 0&&as(f,i,r,a,!1)}const cs=t=>typeof t=="string"&&t.toLowerCase()==="svg";function ls(t,e,n){const s=he(t,e,n);for(const i in t)if(S(t[i])||S(e[i])){const r=j.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function fs(t){return S(t)?t.get():t}const pe=h.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),St=h.createContext({strict:!1}),Dt={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let jt=!1;function ds(){if(jt)return;const t={};for(const e in Dt)t[e]={isEnabled:n=>Dt[e].some(s=>!!n[s])};le(t),jt=!0}function me(){return ds(),Qn()}function ht(t){const e=me();for(const n in t)e[n]={...e[n],...t[n]};le(e)}function Hs({children:t,features:e,strict:n=!1}){const[,s]=h.useState(!J(e)),i=h.useRef(void 0);if(!J(e)){const{renderer:r,...a}=e;i.current=r,ht(a)}return h.useEffect(()=>{J(e)&&e().then(({renderer:r,...a})=>{ht(a),i.current=r,s(!0)})},[]),et.jsx(St.Provider,{value:{renderer:i.current,strict:n},children:t})}function J(t){return typeof t=="function"}const hs=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function H(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||hs.has(t)}let ge=t=>!H(t);function ps(t){typeof t=="function"&&(ge=e=>e.startsWith("on")?!H(e):t(e))}try{ps(require("@emotion/is-prop-valid").default)}catch{}function ms(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||S(t[i])||(ge(i)||n===!0&&H(i)||!e&&!H(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const G=h.createContext({});function gs(t,e){if(Z(t)){const{initial:n,animate:s}=t;return{initial:n===!1||dt(n)?n:void 0,animate:dt(s)?s:void 0}}return t.inherit!==!1?e:{}}function ys(t){const{initial:e,animate:n}=gs(t,h.useContext(G));return h.useMemo(()=>({initial:e,animate:n}),[Wt(e),Wt(n)])}function Wt(t){return Array.isArray(t)?t.join(" "):t}const Vt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ye(t,e,n){for(const s in e)!S(e[s])&&!de(s,n)&&(t[s]=e[s])}function bs({transformTemplate:t},e){return h.useMemo(()=>{const n=Vt();return fe(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Ss(t,e){const n=t.style||{},s={};return ye(s,n,t),Object.assign(s,bs(t,e)),s}function Vs(t,e){const n={},s=Ss(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const be=()=>({...Vt(),attrs:{}});function vs(t,e,n,s){const i=h.useMemo(()=>{const r=be();return us(r,e,cs(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};ye(r,t.style,t),i.style={...r,...i.style}}return i}const ws=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Se(t){return typeof t!="string"||t.includes("-")?!1:!!(ws.indexOf(t)>-1||/[A-Z]/u.test(t))}function Ts(t,e,n,{latestValues:s},i,r=!1,a){const c=(a??Se(t)?vs:Vs)(e,s,i,t),d=ms(e,typeof t=="string",r),l=t!==h.Fragment?{...d,...c,ref:n}:{},{children:f}=e,p=h.useMemo(()=>S(f)?f.get():f,[f]);return h.createElement(t,{...l,children:p})}function Ms({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:xs(n,s,i,t),renderState:e()}}function xs(t,e,n,s){const i={},r=s(t,{});for(const p in r)i[p]=fs(r[p]);let{initial:a,animate:u}=t;const c=Z(t),d=ue(t);e&&d&&!c&&t.inherit!==!1&&(a===void 0&&(a=e.initial),u===void 0&&(u=e.animate));let l=n?n.initial===!1:!1;l=l||a===!1;const f=l?u:a;if(f&&typeof f!="boolean"&&!oe(f)){const p=Array.isArray(f)?f:[f];for(let g=0;g<p.length;g++){const m=ie(t,p[g]);if(m){const{transitionEnd:v,transition:x,...C}=m;for(const w in C){let b=C[w];if(Array.isArray(b)){const V=l?b.length-1:0;b=b[V]}b!==null&&(i[w]=b)}for(const w in v)i[w]=v[w]}}}return i}const Ve=t=>(e,n)=>{const s=h.useContext(G),i=h.useContext($t),r=()=>Ms(t,e,s,i);return n?r():Pe(r)},Cs=Ve({scrapeMotionValuesFromProps:he,createRenderState:Vt}),Ps=Ve({scrapeMotionValuesFromProps:ls,createRenderState:be}),As=Symbol.for("motionComponentSymbol");function Fs(t,e,n){const s=h.useRef(n);h.useInsertionEffect(()=>{s.current=n});const i=h.useRef(null);return h.useCallback(r=>{r&&t.onMount?.(r),e&&(r?e.mount(r):e.unmount());const a=s.current;if(typeof a=="function")if(r){const u=a(r);typeof u=="function"&&(i.current=u)}else i.current?(i.current(),i.current=null):a(r);else a&&(a.current=r)},[e])}const Rs=h.createContext({});function Es(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Bs(t,e,n,s,i,r){const{visualElement:a}=h.useContext(G),u=h.useContext(St),c=h.useContext($t),d=h.useContext(pe),l=d.reducedMotion,f=d.skipAnimations,p=h.useRef(null),g=h.useRef(!1);s=s||u.renderer,!p.current&&s&&(p.current=s(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:l,skipAnimations:f,isSVG:r}),g.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const m=p.current,v=h.useContext(Rs);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Ns(p.current,n,i,v);const x=h.useRef(!1);h.useInsertionEffect(()=>{m&&x.current&&m.update(n,c)});const C=n[Nn],w=h.useRef(!!C&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(C)&&window.MotionHasOptimisedAnimation?.(C));return Fe(()=>{g.current=!0,m&&(x.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),w.current&&m.animationState&&m.animationState.animateChanges())}),h.useEffect(()=>{m&&(!w.current&&m.animationState&&m.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(C)}),w.current=!1),m.enteringChildren=void 0)}),m}function Ns(t,e,n,s){const{layoutId:i,layout:r,drag:a,dragConstraints:u,layoutScroll:c,layoutRoot:d,layoutAnchor:l,layoutCrossfade:f}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:ve(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!a||u&&Es(u),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:f,layoutScroll:c,layoutRoot:d,layoutAnchor:l})}function ve(t){if(t)return t.options.allowProjection!==!1?t.projection:ve(t.parent)}function tt(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&ht(s);const r=n?n==="svg":Se(t),a=r?Ps:Cs;function u(d,l){let f;const p={...h.useContext(pe),...d,layoutId:Is(d)},{isStatic:g}=p,m=ys(d),v=a(d,g);if(!g&&typeof window<"u"){Os();const x=ks(p);f=x.MeasureLayout,m.visualElement=Bs(t,v,p,i,x.ProjectionNode,r)}return et.jsxs(G.Provider,{value:m,children:[f&&m.visualElement?et.jsx(f,{visualElement:m.visualElement,...p}):null,Ts(t,d,Fs(v,m.visualElement,l),v,g,e,r)]})}u.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=h.forwardRef(u);return c[As]=t,c}function Is({layoutId:t}){const e=h.useContext(Ce).id;return e&&t!==void 0?e+"-"+t:t}function Os(t,e){h.useContext(St).strict}function ks(t){const e=me(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Ls(t,e){if(typeof Proxy>"u")return tt;const n=new Map,s=(r,a)=>tt(r,a,t,e),i=(r,a)=>s(r,a);return new Proxy(i,{get:(r,a)=>a==="create"?s:(n.has(a)||n.set(a,tt(a,void 0,t,e)),n.get(a))})}const Zs=Ls();function Gs(){!bt.current&&ce();const[t]=h.useState(X.current);return t}export{Xn as $,Oe as A,Ys as B,yt as C,Ne as D,ie as E,j as F,ut as G,S as H,Nn as I,Ie as J,Sn as K,Hs as L,zt as M,Pn as N,Kn as O,Us as P,$s as Q,Y as R,zs as S,Ft as T,Ks as U,_s as V,fn as W,$e as X,fe as Y,he as Z,En as _,Be as a,ls as a0,us as a1,cs as a2,Wn as a3,dt as a4,Zn as a5,oe as a6,Hn as a7,Se as a8,F as a9,o as aa,Re as ab,Ee as ac,Ut as ad,js as ae,zn as af,Xs as ag,fs as ah,ss as ai,pe as aj,Pe as ak,$t as al,Fe as am,Ce as an,Es as ao,Rs as ap,Ls as aq,on as b,Tt as c,Ws as d,y as e,M as f,gt as g,K as h,Le as i,wt as j,vt as k,k as l,Zs as m,Yt as n,q as o,Kt as p,un as q,B as r,Xt as s,I as t,Gs as u,ke as v,ln as w,vn as x,xn as y,An as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t}from"./index-sUomXsrf.js";import{d as f,e as p,f as m,g as w,w as s,h as v}from"./router-Dja9_ygK.js";import{a as h}from"./api-h5zurxmi.js";let o=null;function g(){return import.meta.env?.DEV===!0}function y(){if(typeof window>"u")return!1;const e=window.location.hostname.trim().toLowerCase();return e==="localhost"||e==="127.0.0.1"||e==="[::1]"||e.endsWith(".local")}function S(){typeof window>"u"||o!==null||h("/api/build").then(e=>{o=e.mode==="production"?"production":"dev"}).catch(()=>{o=null})}typeof window<"u"&&S();function b(){return!!(g()||y()||o==="dev")}function F(){const e=v(new URL(window.location.href));window.history.replaceState(window.history.state,"",`${e.pathname}${e.search}${e.hash}`)}function C(){const e=f(),a=t.useMemo(()=>p()??m(),[e.layers]),r=t.useCallback(i=>{e.resetLocalOverrides();const n=w(i);n.audience&&e.setLocalAudienceOverride(n.audience);for(const[d,l]of Object.entries(n.flags??{}))typeof l=="boolean"&&e.setLocalOverride(d,l);s({action:"set",bundle:i})},[e]),u=t.useCallback(()=>{r(a==="max-pro"?"light-prod":"max-pro")},[a,r]),c=t.useCallback(()=>{e.resetLocalOverrides(),s({action:"clear"}),F(),window.location.reload()},[e]);return{activeBundle:a,applyBundle:r,toggleBundle:u,resetBundle:c}}export{b as i,C as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,j as B}from"./index-
|
|
1
|
+
import{r as t,j as B}from"./index-sUomXsrf.js";import{r as N}from"./index-m6dFtY5f.js";import{A as Y}from"./AgentDetailCard-DxxVkgT1.js";const A=340,S=16,$=180,q=100,I=A+S;function F(s,m){const i=window.innerWidth,y=window.innerHeight,c=12,u=i-s.right,o=s.left;if(u<I&&o<I)return{top:Math.max(c,Math.min(y/2-m/2,y-m-c)),left:Math.max(c,i/2-A/2),side:"center"};const p=u>=o?"right":"left",v=p==="right"?Math.min(s.right+S,i-A-c):Math.max(s.left-S-A,c),h=s.top+s.height/2-m/2;return{top:Math.max(c,Math.min(h,y-m-c)),left:v,side:p}}function Q({agents:s,orderedIds:m,navigate:i,selectMode:y="preview"}){const[c,u]=t.useState(null),[o,p]=t.useState(null),[v,D]=t.useState(null),h=t.useRef(new Map),l=t.useRef(null),C=t.useRef(null),b=t.useRef(null),T=t.useRef(null),a=o??c,d=t.useMemo(()=>a?s.find(e=>e.id===a)??null:null,[a,s]),O=t.useMemo(()=>o?s.find(e=>e.id===o)??null:null,[o,s]),f=t.useCallback(()=>{l.current&&(window.clearTimeout(l.current),l.current=null),C.current&&(window.clearTimeout(C.current),C.current=null)},[]);t.useEffect(()=>()=>f(),[f]),t.useEffect(()=>{if(!a){D(null);return}const e=h.current.get(a);if(!e)return;const n=()=>{const E=e.getBoundingClientRect(),w=b.current?.offsetHeight??260;D(F(E,w))};n(),window.addEventListener("scroll",n,!0),window.addEventListener("resize",n);const r=new ResizeObserver(n);return b.current&&r.observe(b.current),()=>{window.removeEventListener("scroll",n,!0),window.removeEventListener("resize",n),r.disconnect()}},[a]),t.useEffect(()=>{if(!o)return;const e=r=>{r.key==="Escape"&&(p(null),u(null))},n=r=>{const E=r.target;if(!b.current?.contains(E)){for(const w of h.current.values())if(w.contains(E))return;p(null)}};return window.addEventListener("keydown",e),window.addEventListener("mousedown",n),()=>{window.removeEventListener("keydown",e),window.removeEventListener("mousedown",n)}},[o]);const g=t.useCallback(e=>{if(!e)return;const n=h.current.get(e);n&&(typeof n.focus=="function"&&n.focus({preventScroll:!1}),n.scrollIntoView({block:"nearest",behavior:"smooth"}))},[]);t.useEffect(()=>{const e=T.current;if(!e)return;const n=r=>{const E=document.activeElement,w=E?.dataset?.agentId??null,k=m;if(!(k.length===0||!e.contains(E)&&r.key!=="Escape")){if(r.key==="ArrowDown"||r.key==="ArrowUp"){r.preventDefault();const x=w?k.indexOf(w):-1,W=r.key==="ArrowDown"?x<0?0:Math.min(x+1,k.length-1):x<=0?0:x-1;g(k[W]);return}if(r.key==="Home"){r.preventDefault(),g(k[0]);return}if(r.key==="End"){r.preventDefault(),g(k[k.length-1]);return}r.key.toLowerCase()==="o"&&w&&!r.metaKey&&!r.ctrlKey&&!r.altKey&&(r.preventDefault(),i({view:"agents-v2",agentId:w}))}};return e.addEventListener("keydown",n),()=>e.removeEventListener("keydown",n)},[m,g,i]);const R=t.useCallback(e=>{if(f(),!(o&&o!==e)){if(c||o===e){u(e);return}l.current=window.setTimeout(()=>{u(e),l.current=null},$)}},[f,c,o]),L=t.useCallback(()=>{o||(l.current&&(window.clearTimeout(l.current),l.current=null),C.current=window.setTimeout(()=>{u(null),C.current=null},q))},[o]),H=t.useCallback(e=>{if(y==="navigate"){i({view:"agents-v2",agentId:e});return}f(),p(n=>n===e?null:e),u(e)},[y,i,f]),P=t.useCallback(()=>{d&&i({view:"agents-v2",agentId:d.id})},[d,i]),M=t.useCallback(()=>{f(),p(null),u(null)},[f]),_=t.useCallback(e=>({ref:n=>{n?h.current.set(e,n):h.current.delete(e)},onMouseEnter:()=>R(e),onMouseLeave:()=>L(),onFocus:()=>R(e),onBlur:()=>L(),onClick:()=>H(e),"data-agent-id":e,tabIndex:0}),[R,L,H]),K=t.useCallback(e=>({isActive:a===e,isPinned:o===e}),[a,o]),j=v?{position:"fixed",top:v.top,left:v.left,width:A}:void 0,z=d&&v&&typeof document<"u"?N.createPortal(B.jsx(Y,{ref:b,agent:d,pinned:o===d.id,onOpen:P,onClose:M,onAction:M,style:j,className:`agent-card--side-${v.side}${o===d.id?"":" agent-card--preview"}`}),document.querySelector("[data-scout-theme]")??document.body):null;return{bind:_,getState:K,activeAgent:d,pinnedAgent:O,clear:M,card:z,containerRef:T}}export{Q as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as e}from"./router-Dja9_ygK.js";function n(){return!e("nav.sidebar",!1)}export{n as u};
|