@halcyonlabs/app 0.47.0-halcyon.604 → 0.47.0-halcyon.607
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/app/dist/assets/{AddMachineDialog-BHF-GkBG.js → AddMachineDialog-CG2ZZhp-.js} +1 -1
- package/app/dist/assets/AddMachineDialog-CG2ZZhp-.js.br +0 -0
- package/app/dist/assets/AddMachineDialog-CG2ZZhp-.js.gz +0 -0
- package/app/dist/assets/{AppCommandShortcutHint-7JPI7Au-.js → AppCommandShortcutHint-CCVkbqD1.js} +1 -1
- package/app/dist/assets/{AppFileExternalNavigationDispatcher-BNbJsP1g.js → AppFileExternalNavigationDispatcher-DETVZfBW.js} +1 -1
- package/app/dist/assets/AppFileExternalNavigationDispatcher-DETVZfBW.js.br +0 -0
- package/app/dist/assets/AppFileExternalNavigationDispatcher-DETVZfBW.js.gz +0 -0
- package/app/dist/assets/{AppToasterView-DP33gZcS.js → AppToasterView-BpJaGVQ1.js} +1 -1
- package/app/dist/assets/{BrowserTabDeck-BlOoU-vR.js → BrowserTabDeck-c6VRKA-g.js} +1 -1
- package/app/dist/assets/BrowserTabDeck-c6VRKA-g.js.br +0 -0
- package/app/dist/assets/BrowserTabDeck-c6VRKA-g.js.gz +0 -0
- package/app/dist/assets/{CommandPaletteBody-CBbTgLrW.js → CommandPaletteBody-BeiWvSTK.js} +1 -1
- package/app/dist/assets/CommandPaletteBody-BeiWvSTK.js.br +0 -0
- package/app/dist/assets/CommandPaletteBody-BeiWvSTK.js.gz +0 -0
- package/app/dist/assets/{DiffHost-DYBSO1_c.js → DiffHost-xesYsZUt.js} +1 -1
- package/app/dist/assets/DiffHost-xesYsZUt.js.br +0 -0
- package/app/dist/assets/DiffHost-xesYsZUt.js.gz +0 -0
- package/app/dist/assets/{ExperimentalFileLinkMenu-DO2lGQoK.js → ExperimentalFileLinkMenu-CDVoETHe.js} +1 -1
- package/app/dist/assets/ExperimentalFileLinkMenu-CDVoETHe.js.br +0 -0
- package/app/dist/assets/ExperimentalFileLinkMenu-CDVoETHe.js.gz +0 -0
- package/app/dist/assets/{FilePreview-ORcgsTax.js → FilePreview-CzacGZ35.js} +1 -1
- package/app/dist/assets/FilePreview-CzacGZ35.js.br +0 -0
- package/app/dist/assets/FilePreview-CzacGZ35.js.gz +0 -0
- package/app/dist/assets/{GitDiffCardHeader-i4vt7tT5.js → GitDiffCardHeader-CJtFaq1K.js} +1 -1
- package/app/dist/assets/GitDiffCardHeader-CJtFaq1K.js.br +0 -0
- package/app/dist/assets/GitDiffCardHeader-CJtFaq1K.js.gz +0 -0
- package/app/dist/assets/{InlineMessageEditorFrame-y089xCLP.js → InlineMessageEditorFrame-C0rqOlNn.js} +1 -1
- package/app/dist/assets/InlineMessageEditorFrame-C0rqOlNn.js.br +0 -0
- package/app/dist/assets/InlineMessageEditorFrame-C0rqOlNn.js.gz +0 -0
- package/app/dist/assets/{MachineLabel-D07WUIMh.js → MachineLabel-vUI5j8ve.js} +1 -1
- package/app/dist/assets/MachineLabel-vUI5j8ve.js.br +0 -0
- package/app/dist/assets/MachineLabel-vUI5j8ve.js.gz +0 -0
- package/app/dist/assets/{MachineRenameDialog-RyrwvNas.js → MachineRenameDialog-CrnZuppe.js} +1 -1
- package/app/dist/assets/MachineRenameDialog-CrnZuppe.js.br +0 -0
- package/app/dist/assets/MachineRenameDialog-CrnZuppe.js.gz +0 -0
- package/app/dist/assets/{MachineSettingsView-Bg6Op62W.js → MachineSettingsView-BR6qseai.js} +1 -1
- package/app/dist/assets/MachineSettingsView-BR6qseai.js.br +0 -0
- package/app/dist/assets/MachineSettingsView-BR6qseai.js.gz +0 -0
- package/app/dist/assets/{MicrophonePreferences-DwsTYfON.js → MicrophonePreferences-wMQ36e_Q.js} +1 -1
- package/app/dist/assets/MicrophonePreferences-wMQ36e_Q.js.br +0 -0
- package/app/dist/assets/MicrophonePreferences-wMQ36e_Q.js.gz +0 -0
- package/app/dist/assets/{ModelReasoningMenu-Dth3XXm8.js → ModelReasoningMenu-Do0jyo5Q.js} +1 -1
- package/app/dist/assets/ModelReasoningMenu-Do0jyo5Q.js.br +0 -0
- package/app/dist/assets/ModelReasoningMenu-Do0jyo5Q.js.gz +0 -0
- package/app/dist/assets/{MoonletDiff-Da65ABAI.js → MoonletDiff-CCvaiEEC.js} +1 -1
- package/app/dist/assets/MoonletDiff-CCvaiEEC.js.br +0 -0
- package/app/dist/assets/MoonletDiff-CCvaiEEC.js.gz +0 -0
- package/app/dist/assets/{MoonletDiffSplit-Phl7m23w.js → MoonletDiffSplit-3xEwFpfu.js} +2 -2
- package/app/dist/assets/MoonletDiffSplit-3xEwFpfu.js.br +0 -0
- package/app/dist/assets/MoonletDiffSplit-3xEwFpfu.js.gz +0 -0
- package/app/dist/assets/{MoonletSourceCode-C5aa88dK.js → MoonletSourceCode-BgaVW-e6.js} +1 -1
- package/app/dist/assets/MoonletSourceCode-BgaVW-e6.js.br +0 -0
- package/app/dist/assets/MoonletSourceCode-BgaVW-e6.js.gz +0 -0
- package/app/dist/assets/{NewTabPage-BKkv1maV.js → NewTabPage-BOqCqqLe.js} +1 -1
- package/app/dist/assets/NewTabPage-BOqCqqLe.js.br +0 -0
- package/app/dist/assets/NewTabPage-BOqCqqLe.js.gz +0 -0
- package/app/dist/assets/{NewThreadComposer-00DY4i8k.js → NewThreadComposer-DyB52pmS.js} +1 -1
- package/app/dist/assets/NewThreadComposer-DyB52pmS.js.br +0 -0
- package/app/dist/assets/NewThreadComposer-DyB52pmS.js.gz +0 -0
- package/app/dist/assets/{OnboardingFlow-GwpuTTqu.js → OnboardingFlow-DTPixZrb.js} +1 -1
- package/app/dist/assets/OnboardingFlow-DTPixZrb.js.br +0 -0
- package/app/dist/assets/OnboardingFlow-DTPixZrb.js.gz +0 -0
- package/app/dist/assets/{OptionPicker-Cy_W5NWS.js → OptionPicker-CxOGHDd8.js} +1 -1
- package/app/dist/assets/OptionPicker-CxOGHDd8.js.br +0 -0
- package/app/dist/assets/OptionPicker-CxOGHDd8.js.gz +0 -0
- package/app/dist/assets/{PaletteShell-CRwrb4lb.js → PaletteShell-BMkwhUdz.js} +1 -1
- package/app/dist/assets/PaletteShell-BMkwhUdz.js.br +0 -0
- package/app/dist/assets/PaletteShell-BMkwhUdz.js.gz +0 -0
- package/app/dist/assets/{PaneMaximizeButton-CMp4cCoZ.js → PaneMaximizeButton-DgXn2p5T.js} +1 -1
- package/app/dist/assets/PaneMaximizeButton-DgXn2p5T.js.br +0 -0
- package/app/dist/assets/PaneMaximizeButton-DgXn2p5T.js.gz +0 -0
- package/app/dist/assets/{PierreLineSelectionActions-BXbCJV8P.js → PierreLineSelectionActions-V_GPrVau.js} +1 -1
- package/app/dist/assets/PierreLineSelectionActions-V_GPrVau.js.br +0 -0
- package/app/dist/assets/PierreLineSelectionActions-V_GPrVau.js.gz +0 -0
- package/app/dist/assets/{PluginPanelRightPanelHost-CuKRaAaL.js → PluginPanelRightPanelHost-CRDSntoM.js} +1 -1
- package/app/dist/assets/PluginPanelRightPanelHost-CRDSntoM.js.br +0 -0
- package/app/dist/assets/PluginPanelRightPanelHost-CRDSntoM.js.gz +0 -0
- package/app/dist/assets/{PluginSettingsSections-DJo5h7Qh.js → PluginSettingsSections-ZnUNrvlJ.js} +1 -1
- package/app/dist/assets/PluginSettingsSections-ZnUNrvlJ.js.br +0 -0
- package/app/dist/assets/PluginSettingsSections-ZnUNrvlJ.js.gz +0 -0
- package/app/dist/assets/{PluginThreadChat-BV6OMCzu.js → PluginThreadChat-DtIyKaqq.js} +1 -1
- package/app/dist/assets/PluginThreadChat-DtIyKaqq.js.br +0 -0
- package/app/dist/assets/PluginThreadChat-DtIyKaqq.js.gz +0 -0
- package/app/dist/assets/{ProjectDetailSettingsView-DdF6YsSg.js → ProjectDetailSettingsView-B3apTKMj.js} +1 -1
- package/app/dist/assets/ProjectDetailSettingsView-B3apTKMj.js.br +0 -0
- package/app/dist/assets/ProjectDetailSettingsView-B3apTKMj.js.gz +0 -0
- package/app/dist/assets/{ProjectMachineSetupDialog-CtbI4XxM.js → ProjectMachineSetupDialog-C43S09Ex.js} +1 -1
- package/app/dist/assets/ProjectMachineSetupDialog-C43S09Ex.js.br +0 -0
- package/app/dist/assets/ProjectMachineSetupDialog-C43S09Ex.js.gz +0 -0
- package/app/dist/assets/{ProjectsSettingsSection-BT1kXbPn.js → ProjectsSettingsSection-CIshX8Xc.js} +1 -1
- package/app/dist/assets/ProjectsSettingsSection-CIshX8Xc.js.br +0 -0
- package/app/dist/assets/ProjectsSettingsSection-CIshX8Xc.js.gz +0 -0
- package/app/dist/assets/{QueuedMessagesList-D1aAchqp.js → QueuedMessagesList-Dh5dxmNK.js} +1 -1
- package/app/dist/assets/QueuedMessagesList-Dh5dxmNK.js.br +0 -0
- package/app/dist/assets/QueuedMessagesList-Dh5dxmNK.js.gz +0 -0
- package/app/dist/assets/{RemotePathBrowser-vPIL8lVm.js → RemotePathBrowser-1A5-qAxD.js} +1 -1
- package/app/dist/assets/RemotePathBrowser-1A5-qAxD.js.br +0 -0
- package/app/dist/assets/RemotePathBrowser-1A5-qAxD.js.gz +0 -0
- package/app/dist/assets/{RootComposeView-DV6JGFlA.js → RootComposeView-BIZpqYG3.js} +1 -1
- package/app/dist/assets/RootComposeView-BIZpqYG3.js.br +0 -0
- package/app/dist/assets/RootComposeView-BIZpqYG3.js.gz +0 -0
- package/app/dist/assets/{SecondaryPanelLayout-BpHDgFJ_.js → SecondaryPanelLayout-BIQDxJLi.js} +1 -1
- package/app/dist/assets/SecondaryPanelLayout-BIQDxJLi.js.br +0 -0
- package/app/dist/assets/SecondaryPanelLayout-BIQDxJLi.js.gz +0 -0
- package/app/dist/assets/{ServerMoveOverlayView-CGkGzv8t.js → ServerMoveOverlayView-BSJahQeB.js} +1 -1
- package/app/dist/assets/ServerMoveOverlayView-BSJahQeB.js.br +0 -0
- package/app/dist/assets/ServerMoveOverlayView-BSJahQeB.js.gz +0 -0
- package/app/dist/assets/{SettingsSidebar-1XC0Uxwo.js → SettingsSidebar-DY_kbv4v.js} +1 -1
- package/app/dist/assets/SettingsSidebar-DY_kbv4v.js.br +0 -0
- package/app/dist/assets/SettingsSidebar-DY_kbv4v.js.gz +0 -0
- package/app/dist/assets/SettingsView-CR1GzBCl.js +7 -0
- package/app/dist/assets/SettingsView-CR1GzBCl.js.br +0 -0
- package/app/dist/assets/SettingsView-CR1GzBCl.js.gz +0 -0
- package/app/dist/assets/{SidebarFooterCustomize-D7sLYPwD.js → SidebarFooterCustomize-pIj856Zr.js} +1 -1
- package/app/dist/assets/SidebarFooterCustomize-pIj856Zr.js.br +0 -0
- package/app/dist/assets/SidebarFooterCustomize-pIj856Zr.js.gz +0 -0
- package/app/dist/assets/{SidebarVisibilityCustomize-DpTzFoGl.js → SidebarVisibilityCustomize-CR7hQOIF.js} +1 -1
- package/app/dist/assets/SidebarVisibilityCustomize-CR7hQOIF.js.br +0 -0
- package/app/dist/assets/SidebarVisibilityCustomize-CR7hQOIF.js.gz +0 -0
- package/app/dist/assets/{SourceCodeHost-DVEXLJK1.js → SourceCodeHost-DkoXO-RM.js} +2 -2
- package/app/dist/assets/SourceCodeHost-DkoXO-RM.js.br +0 -0
- package/app/dist/assets/SourceCodeHost-DkoXO-RM.js.gz +0 -0
- package/app/dist/assets/{SplitWorkspaceRoute-BfxQQdOx.js → SplitWorkspaceRoute-DN3j-Nio.js} +2 -2
- package/app/dist/assets/SplitWorkspaceRoute-DN3j-Nio.js.br +0 -0
- package/app/dist/assets/SplitWorkspaceRoute-DN3j-Nio.js.gz +0 -0
- package/app/dist/assets/{TerminalOutputBlock-COQNamKR.js → TerminalOutputBlock-DKsNjK8s.js} +1 -1
- package/app/dist/assets/TerminalOutputBlock-DKsNjK8s.js.br +0 -0
- package/app/dist/assets/TerminalOutputBlock-DKsNjK8s.js.gz +0 -0
- package/app/dist/assets/{ThreadActionsMenu-064Gcy7T.js → ThreadActionsMenu-BulopjpY.js} +1 -1
- package/app/dist/assets/ThreadActionsMenu-BulopjpY.js.br +0 -0
- package/app/dist/assets/ThreadActionsMenu-BulopjpY.js.gz +0 -0
- package/app/dist/assets/{ThreadDetailView-CjoXzweq.js → ThreadDetailView-C6cu9JmT.js} +3 -3
- package/app/dist/assets/ThreadDetailView-C6cu9JmT.js.br +0 -0
- package/app/dist/assets/ThreadDetailView-C6cu9JmT.js.gz +0 -0
- package/app/dist/assets/{ThreadSearchPaletteMode-CwdePsHK.js → ThreadSearchPaletteMode-D0MKJ8PL.js} +1 -1
- package/app/dist/assets/ThreadSearchPaletteMode-D0MKJ8PL.js.br +0 -0
- package/app/dist/assets/ThreadSearchPaletteMode-D0MKJ8PL.js.gz +0 -0
- package/app/dist/assets/{ThreadSecondaryPanel-CtYtgTla.js → ThreadSecondaryPanel-CzjhigwP.js} +1 -1
- package/app/dist/assets/ThreadSecondaryPanel-CzjhigwP.js.br +0 -0
- package/app/dist/assets/ThreadSecondaryPanel-CzjhigwP.js.gz +0 -0
- package/app/dist/assets/{ThreadSecondaryPanelTabContent-BNQi8b2n.js → ThreadSecondaryPanelTabContent-BX5A98YK.js} +1 -1
- package/app/dist/assets/ThreadSecondaryPanelTabContent-BX5A98YK.js.br +0 -0
- package/app/dist/assets/ThreadSecondaryPanelTabContent-BX5A98YK.js.gz +0 -0
- package/app/dist/assets/{ThreadStatusGlyph-DxxHDn0P.js → ThreadStatusGlyph-BYavMHiP.js} +1 -1
- package/app/dist/assets/ThreadStatusGlyph-BYavMHiP.js.br +0 -0
- package/app/dist/assets/ThreadStatusGlyph-BYavMHiP.js.gz +0 -0
- package/app/dist/assets/{ThreadTerminalPanel-fb5Kk0KG.js → ThreadTerminalPanel-Cfe76daj.js} +1 -1
- package/app/dist/assets/ThreadTerminalPanel-Cfe76daj.js.br +0 -0
- package/app/dist/assets/ThreadTerminalPanel-Cfe76daj.js.gz +0 -0
- package/app/dist/assets/{ThreadTerminalView-BiGdt3Fd.js → ThreadTerminalView-CgMKh6rk.js} +1 -1
- package/app/dist/assets/ThreadTerminalView-CgMKh6rk.js.br +0 -0
- package/app/dist/assets/ThreadTerminalView-CgMKh6rk.js.gz +0 -0
- package/app/dist/assets/{ThreadTimelineNavigationContext-epkIpS1J.js → ThreadTimelineNavigationContext-2--wIUmU.js} +2 -2
- package/app/dist/assets/ThreadTimelineNavigationContext-2--wIUmU.js.br +0 -0
- package/app/dist/assets/ThreadTimelineNavigationContext-2--wIUmU.js.gz +0 -0
- package/app/dist/assets/{ThreadUnarchiveButton-CExEP4wZ.js → ThreadUnarchiveButton-CiDbuPzJ.js} +1 -1
- package/app/dist/assets/{TimelineDetailScroll-D8gge5Y9.js → TimelineDetailScroll-DnMC8nYC.js} +1 -1
- package/app/dist/assets/TimelineDetailScroll-DnMC8nYC.js.br +0 -0
- package/app/dist/assets/TimelineDetailScroll-DnMC8nYC.js.gz +0 -0
- package/app/dist/assets/{TimelineFileDiffBlock-BJt7kifl.js → TimelineFileDiffBlock-D8pKEcE0.js} +1 -1
- package/app/dist/assets/TimelineFileDiffBlock-D8pKEcE0.js.br +0 -0
- package/app/dist/assets/TimelineFileDiffBlock-D8pKEcE0.js.gz +0 -0
- package/app/dist/assets/{TimelineSelectionMenu-DrK39LAT.js → TimelineSelectionMenu-DDYrgVgK.js} +1 -1
- package/app/dist/assets/TimelineSelectionMenu-DDYrgVgK.js.br +0 -0
- package/app/dist/assets/TimelineSelectionMenu-DDYrgVgK.js.gz +0 -0
- package/app/dist/assets/{ToolsView-4tUvUv2U.js → ToolsView-CXmmNmMz.js} +1 -1
- package/app/dist/assets/ToolsView-CXmmNmMz.js.br +0 -0
- package/app/dist/assets/ToolsView-CXmmNmMz.js.gz +0 -0
- package/app/dist/assets/{ToolsViewSplits-BWOxgNc1.js → ToolsViewSplits-VIMb0WxO.js} +2 -2
- package/app/dist/assets/ToolsViewSplits-VIMb0WxO.js.br +0 -0
- package/app/dist/assets/ToolsViewSplits-VIMb0WxO.js.gz +0 -0
- package/app/dist/assets/{WaveformVisualizer-C1SzIkiu.js → WaveformVisualizer-CyOfIcDU.js} +1 -1
- package/app/dist/assets/WaveformVisualizer-CyOfIcDU.js.br +0 -0
- package/app/dist/assets/WaveformVisualizer-CyOfIcDU.js.gz +0 -0
- package/app/dist/assets/{absolute-file-path-CbI5cppS.js → absolute-file-path-BxWHDkiV.js} +1 -1
- package/app/dist/assets/{app-fixed-tab-navigation-Cv4Tj7xZ.js → app-fixed-tab-navigation-nG5duhr6.js} +1 -1
- package/app/dist/assets/app-fixed-tab-navigation-nG5duhr6.js.br +0 -0
- package/app/dist/assets/app-fixed-tab-navigation-nG5duhr6.js.gz +0 -0
- package/app/dist/assets/{audio-input-device-preference-D8tr0bqw.js → audio-input-device-preference-Civxk2e_.js} +1 -1
- package/app/dist/assets/audio-input-device-preference-Civxk2e_.js.br +0 -0
- package/app/dist/assets/audio-input-device-preference-Civxk2e_.js.gz +0 -0
- package/app/dist/assets/{bottom-anchored-scroll-body-VYrnz8Hl.js → bottom-anchored-scroll-body-izL_2xQo.js} +1 -1
- package/app/dist/assets/bottom-anchored-scroll-body-izL_2xQo.js.br +0 -0
- package/app/dist/assets/bottom-anchored-scroll-body-izL_2xQo.js.gz +0 -0
- package/app/dist/assets/{browser-url-jhAVtSw2.js → browser-url-DQsPFWqd.js} +1 -1
- package/app/dist/assets/browser-url-DQsPFWqd.js.br +0 -0
- package/app/dist/assets/browser-url-DQsPFWqd.js.gz +0 -0
- package/app/dist/assets/{checkbox-qaQbU8-H.js → checkbox-Dxs9oAMl.js} +1 -1
- package/app/dist/assets/checkbox-Dxs9oAMl.js.br +0 -0
- package/app/dist/assets/checkbox-Dxs9oAMl.js.gz +0 -0
- package/app/dist/assets/{code-loading-skeletons-pfQDO26Y.js → code-loading-skeletons-CkiXPS0M.js} +1 -1
- package/app/dist/assets/code-loading-skeletons-CkiXPS0M.js.br +0 -0
- package/app/dist/assets/code-loading-skeletons-CkiXPS0M.js.gz +0 -0
- package/app/dist/assets/{code-rendering-CuFk1qJ1.js → code-rendering-DjLdb6cB.js} +1 -1
- package/app/dist/assets/{code-theme-registration-wCS4GRn4.js → code-theme-registration-DWaGQiqG.js} +1 -1
- package/app/dist/assets/{detail-card-C3OH86kJ.js → detail-card-BFm1NEQz.js} +1 -1
- package/app/dist/assets/detail-card-BFm1NEQz.js.br +0 -0
- package/app/dist/assets/detail-card-BFm1NEQz.js.gz +0 -0
- package/app/dist/assets/{diff-stats-tally-DkIHmiEl.js → diff-stats-tally-DQHS3tHN.js} +1 -1
- package/app/dist/assets/diff-stats-tally-DQHS3tHN.js.br +0 -0
- package/app/dist/assets/diff-stats-tally-DQHS3tHN.js.gz +0 -0
- package/app/dist/assets/{dist-CWXlD45B.js → dist-DCULoGTS.js} +1 -1
- package/app/dist/assets/dist-DCULoGTS.js.br +0 -0
- package/app/dist/assets/dist-DCULoGTS.js.gz +0 -0
- package/app/dist/assets/{environment-mutations-BrA6u8Ev.js → environment-mutations-Zes88JN-.js} +1 -1
- package/app/dist/assets/environment-mutations-Zes88JN-.js.br +0 -0
- package/app/dist/assets/environment-mutations-Zes88JN-.js.gz +0 -0
- package/app/dist/assets/{environment-workspace-display-0oqBMXMB.js → environment-workspace-display-Blt7U9Mn.js} +3 -3
- package/app/dist/assets/environment-workspace-display-Blt7U9Mn.js.br +0 -0
- package/app/dist/assets/environment-workspace-display-Blt7U9Mn.js.gz +0 -0
- package/app/dist/assets/{event-code-block-BfPSBXNn.js → event-code-block-QXnzoFqm.js} +1 -1
- package/app/dist/assets/event-code-block-QXnzoFqm.js.br +0 -0
- package/app/dist/assets/event-code-block-QXnzoFqm.js.gz +0 -0
- package/app/dist/assets/{expandable-text-01SvfXRm.js → expandable-text-DkUA9RQT.js} +1 -1
- package/app/dist/assets/expandable-text-DkUA9RQT.js.br +0 -0
- package/app/dist/assets/expandable-text-DkUA9RQT.js.gz +0 -0
- package/app/dist/assets/{file-opener-preference-C5_P-Zfr.js → file-opener-preference-CXZHmESv.js} +1 -1
- package/app/dist/assets/{file-path-link-Ddg7Fzor.js → file-path-link-D7DFjBWZ.js} +1 -1
- package/app/dist/assets/file-path-link-D7DFjBWZ.js.br +0 -0
- package/app/dist/assets/file-path-link-D7DFjBWZ.js.gz +0 -0
- package/app/dist/assets/{host-mutations-CAtir6jv.js → host-mutations-Fl0RjER0.js} +1 -1
- package/app/dist/assets/host-mutations-Fl0RjER0.js.br +0 -0
- package/app/dist/assets/host-mutations-Fl0RjER0.js.gz +0 -0
- package/app/dist/assets/{icon-extended-D2fR2GTF.js → icon-extended-C0LTNXfN.js} +1 -1
- package/app/dist/assets/icon-extended-C0LTNXfN.js.br +0 -0
- package/app/dist/assets/icon-extended-C0LTNXfN.js.gz +0 -0
- package/app/dist/assets/{image-lightbox-Dhmri6WK.js → image-lightbox-DhNslR-8.js} +1 -1
- package/app/dist/assets/image-lightbox-DhNslR-8.js.br +0 -0
- package/app/dist/assets/image-lightbox-DhNslR-8.js.gz +0 -0
- package/app/dist/assets/index-C2K528W0.css +2 -0
- package/app/dist/assets/index-C2K528W0.css.br +0 -0
- package/app/dist/assets/index-C2K528W0.css.gz +0 -0
- package/app/dist/assets/{index-CfvM6UcU.js → index-DCps_qBD.js} +8 -8
- package/app/dist/assets/index-DCps_qBD.js.br +0 -0
- package/app/dist/assets/index-DCps_qBD.js.gz +0 -0
- package/app/dist/assets/{inline-rename-editor-Bg8SXoZ3.js → inline-rename-editor-nrH2d_Gy.js} +1 -1
- package/app/dist/assets/inline-rename-editor-nrH2d_Gy.js.br +0 -0
- package/app/dist/assets/inline-rename-editor-nrH2d_Gy.js.gz +0 -0
- package/app/dist/assets/{launcherRow-CqPaUYWn.js → launcherRow-CVYGyeOl.js} +1 -1
- package/app/dist/assets/launcherRow-CVYGyeOl.js.br +0 -0
- package/app/dist/assets/launcherRow-CVYGyeOl.js.gz +0 -0
- package/app/dist/assets/{localhost-link-rewrite-description-DP-bXSL8.js → localhost-link-rewrite-description-C0FphFZq.js} +1 -1
- package/app/dist/assets/localhost-link-rewrite-description-C0FphFZq.js.br +0 -0
- package/app/dist/assets/localhost-link-rewrite-description-C0FphFZq.js.gz +0 -0
- package/app/dist/assets/{machine-provider-queries-CoghZyj9.js → machine-provider-queries-BTz8Sz3J.js} +1 -1
- package/app/dist/assets/{machine-server-access-Drk0mdHH.js → machine-server-access-CGfd5e1r.js} +1 -1
- package/app/dist/assets/{markdown-file-image-routing-BJjI1Te3.js → markdown-file-image-routing-BhGjphhz.js} +1 -1
- package/app/dist/assets/{markdown-html-BU8qsXmq.js → markdown-html-CLi3FhDR.js} +1 -1
- package/app/dist/assets/markdown-html-CLi3FhDR.js.br +0 -0
- package/app/dist/assets/markdown-html-CLi3FhDR.js.gz +0 -0
- package/app/dist/assets/{markdown-local-file-link-D-MSnVWD.js → markdown-local-file-link-BROpdQPF.js} +1 -1
- package/app/dist/assets/markdown-local-file-link-BROpdQPF.js.br +0 -0
- package/app/dist/assets/markdown-local-file-link-BROpdQPF.js.gz +0 -0
- package/app/dist/assets/{markdown-preview-BLL1QuNp.js → markdown-preview-CGXXNhJo.js} +3 -3
- package/app/dist/assets/markdown-preview-CGXXNhJo.js.br +0 -0
- package/app/dist/assets/markdown-preview-CGXXNhJo.js.gz +0 -0
- package/app/dist/assets/{markdown-prompt-mentions-B5LVmCbO.js → markdown-prompt-mentions-CPWKCtMa.js} +1 -1
- package/app/dist/assets/markdown-prompt-mentions-CPWKCtMa.js.br +0 -0
- package/app/dist/assets/markdown-prompt-mentions-CPWKCtMa.js.gz +0 -0
- package/app/dist/assets/{model-load-error-message-Dmp1hUNg.js → model-load-error-message-CH_k4E7q.js} +1 -1
- package/app/dist/assets/model-load-error-message-CH_k4E7q.js.br +0 -0
- package/app/dist/assets/model-load-error-message-CH_k4E7q.js.gz +0 -0
- package/app/dist/assets/onboarding-telemetry-BXIyQ5F4.js +1 -0
- package/app/dist/assets/{open-in-editor-button-D0wnpT6x.js → open-in-editor-button-tA10Nkqn.js} +1 -1
- package/app/dist/assets/open-in-editor-button-tA10Nkqn.js.br +0 -0
- package/app/dist/assets/open-in-editor-button-tA10Nkqn.js.gz +0 -0
- package/app/dist/assets/{page-shell-CgSxnF9m.js → page-shell-CNCVT3Uj.js} +1 -1
- package/app/dist/assets/page-shell-CNCVT3Uj.js.br +0 -0
- package/app/dist/assets/page-shell-CNCVT3Uj.js.gz +0 -0
- package/app/dist/assets/{pierre-worker-pool-CHGWu76e.js → pierre-worker-pool-pXJFsMd7.js} +1 -1
- package/app/dist/assets/pierre-worker-pool-pXJFsMd7.js.br +0 -0
- package/app/dist/assets/pierre-worker-pool-pXJFsMd7.js.gz +0 -0
- package/app/dist/assets/{plugin-detail-navigation-DuR8_JCx.js → plugin-detail-navigation-SAqiVR3K.js} +1 -1
- package/app/dist/assets/plugin-detail-navigation-SAqiVR3K.js.br +0 -0
- package/app/dist/assets/plugin-detail-navigation-SAqiVR3K.js.gz +0 -0
- package/app/dist/assets/{plugin-frontend-D5ijLuKC.js → plugin-frontend-DoWZV45B.js} +3 -3
- package/app/dist/assets/plugin-frontend-DoWZV45B.js.br +0 -0
- package/app/dist/assets/plugin-frontend-DoWZV45B.js.gz +0 -0
- package/app/dist/assets/{plugin-ui-Dpa8hcuk.js → plugin-ui-Cu8MrXLJ.js} +1 -1
- package/app/dist/assets/plugin-ui-Cu8MrXLJ.js.br +0 -0
- package/app/dist/assets/plugin-ui-Cu8MrXLJ.js.gz +0 -0
- package/app/dist/assets/{project-default-execution-options-query-DfOIRKKL.js → project-default-execution-options-query-gaQEWNK0.js} +1 -1
- package/app/dist/assets/{queued-editor-typeahead-layout-Czaq8Cl9.js → queued-editor-typeahead-layout-DTUSPVuA.js} +1 -1
- package/app/dist/assets/queued-editor-typeahead-layout-DTUSPVuA.js.br +0 -0
- package/app/dist/assets/queued-editor-typeahead-layout-DTUSPVuA.js.gz +0 -0
- package/app/dist/assets/{queued-messages-layout-B5xwiued.js → queued-messages-layout-Bj1foecI.js} +1 -1
- package/app/dist/assets/queued-messages-layout-Bj1foecI.js.br +0 -0
- package/app/dist/assets/queued-messages-layout-Bj1foecI.js.gz +0 -0
- package/app/dist/assets/{resource-list-BKpxiO2e.js → resource-list-DLZLjUCf.js} +1 -1
- package/app/dist/assets/resource-list-DLZLjUCf.js.br +0 -0
- package/app/dist/assets/resource-list-DLZLjUCf.js.gz +0 -0
- package/app/dist/assets/root-compose-create-preference-Bv_dFEsH.js +1 -0
- package/app/dist/assets/{save-file-CNFl2iiR.js → save-file-B8sl9wgP.js} +1 -1
- package/app/dist/assets/{settings-nav-C9-jh_HN.js → settings-nav-D5tWYG52.js} +1 -1
- package/app/dist/assets/settings-nav-D5tWYG52.js.br +0 -0
- package/app/dist/assets/settings-nav-D5tWYG52.js.gz +0 -0
- package/app/dist/assets/{settings-sections-BMr_XU5l.js → settings-sections-Dfo35J2q.js} +1 -1
- package/app/dist/assets/settings-sections-Dfo35J2q.js.br +0 -0
- package/app/dist/assets/settings-sections-Dfo35J2q.js.gz +0 -0
- package/app/dist/assets/{shortcut-pill-_XSUZHxZ.js → shortcut-pill-BMlNncTw.js} +1 -1
- package/app/dist/assets/{sidebarTouchSensor-DG_A1RmT.js → sidebarTouchSensor-Da_E8eSx.js} +1 -1
- package/app/dist/assets/sidebarTouchSensor-Da_E8eSx.js.br +0 -0
- package/app/dist/assets/sidebarTouchSensor-Da_E8eSx.js.gz +0 -0
- package/app/dist/assets/{switch-BjJ8825r.js → switch-BRYzbFH-.js} +1 -1
- package/app/dist/assets/switch-BRYzbFH-.js.br +0 -0
- package/app/dist/assets/switch-BRYzbFH-.js.gz +0 -0
- package/app/dist/assets/{textarea-DY_k-BJR.js → textarea-DpRLVuDl.js} +1 -1
- package/app/dist/assets/{thread-event-parser-ma5CGP66.js → thread-event-parser-BrLyjs4v.js} +1 -1
- package/app/dist/assets/thread-event-parser-BrLyjs4v.js.br +0 -0
- package/app/dist/assets/thread-event-parser-BrLyjs4v.js.gz +0 -0
- package/app/dist/assets/{thread-panel-queries-BXeOzk_6.js → thread-panel-queries-s8vzntf7.js} +1 -1
- package/app/dist/assets/thread-panel-queries-s8vzntf7.js.br +0 -0
- package/app/dist/assets/thread-panel-queries-s8vzntf7.js.gz +0 -0
- package/app/dist/assets/{thread-runtime-mutations-DmKkyel0.js → thread-runtime-mutations-BOdkZ-H-.js} +1 -1
- package/app/dist/assets/thread-runtime-mutations-BOdkZ-H-.js.br +0 -0
- package/app/dist/assets/thread-runtime-mutations-BOdkZ-H-.js.gz +0 -0
- package/app/dist/assets/{thread-terminal-queries-AFVZ5K6p.js → thread-terminal-queries-Blou76c_.js} +1 -1
- package/app/dist/assets/thread-terminal-queries-Blou76c_.js.br +0 -0
- package/app/dist/assets/thread-terminal-queries-Blou76c_.js.gz +0 -0
- package/app/dist/assets/{threadRecentItems-DXsdcpBk.js → threadRecentItems-BiCe3SkL.js} +1 -1
- package/app/dist/assets/threadRecentItems-BiCe3SkL.js.br +0 -0
- package/app/dist/assets/threadRecentItems-BiCe3SkL.js.gz +0 -0
- package/app/dist/assets/{threadWorkspaceOpenPath-DwKd-s_5.js → threadWorkspaceOpenPath-C9eC_XGN.js} +1 -1
- package/app/dist/assets/threadWorkspaceOpenPath-C9eC_XGN.js.br +0 -0
- package/app/dist/assets/threadWorkspaceOpenPath-C9eC_XGN.js.gz +0 -0
- package/app/dist/assets/{title-bar-scroll-fade-Dw_BPLyx.js → title-bar-scroll-fade-OrK4M84v.js} +1 -1
- package/app/dist/assets/title-bar-scroll-fade-OrK4M84v.js.br +0 -0
- package/app/dist/assets/title-bar-scroll-fade-OrK4M84v.js.gz +0 -0
- package/app/dist/assets/{truncate-start-CGyRoGtG.js → truncate-start-Ck1IPV62.js} +1 -1
- package/app/dist/assets/{use-hover-popover-DzrAfLzd.js → use-hover-popover-uokpMJ80.js} +1 -1
- package/app/dist/assets/use-hover-popover-uokpMJ80.js.br +0 -0
- package/app/dist/assets/use-hover-popover-uokpMJ80.js.gz +0 -0
- package/app/dist/assets/{useElementWidth-Kv5FX-9C.js → useElementWidth-EbzKQ0bg.js} +1 -1
- package/app/dist/assets/useElementWidth-EbzKQ0bg.js.br +0 -0
- package/app/dist/assets/useElementWidth-EbzKQ0bg.js.gz +0 -0
- package/app/dist/assets/{useLocalOpenTargets-B7rqz64L.js → useLocalOpenTargets-CtvcdlZg.js} +1 -1
- package/app/dist/assets/useLocalOpenTargets-CtvcdlZg.js.br +0 -0
- package/app/dist/assets/useLocalOpenTargets-CtvcdlZg.js.gz +0 -0
- package/app/dist/assets/{usePanelResizeSnap-Dizp45Ab.js → usePanelResizeSnap-CuwA4rg3.js} +1 -1
- package/app/dist/assets/usePanelResizeSnap-CuwA4rg3.js.br +0 -0
- package/app/dist/assets/usePanelResizeSnap-CuwA4rg3.js.gz +0 -0
- package/app/dist/assets/{usePanelTerminals-ByzphxXd.js → usePanelTerminals-BZhTVWNX.js} +1 -1
- package/app/dist/assets/usePanelTerminals-BZhTVWNX.js.br +0 -0
- package/app/dist/assets/usePanelTerminals-BZhTVWNX.js.gz +0 -0
- package/app/dist/assets/{usePathSuggestions-Bd5UhdCh.js → usePathSuggestions-DZ1XPM_t.js} +1 -1
- package/app/dist/assets/usePathSuggestions-DZ1XPM_t.js.br +0 -0
- package/app/dist/assets/usePathSuggestions-DZ1XPM_t.js.gz +0 -0
- package/app/dist/assets/{useResolvedLiveFileTarget-x5Gd-Gzx.js → useResolvedLiveFileTarget-DlZUgf7A.js} +1 -1
- package/app/dist/assets/useResolvedLiveFileTarget-DlZUgf7A.js.br +0 -0
- package/app/dist/assets/useResolvedLiveFileTarget-DlZUgf7A.js.gz +0 -0
- package/app/dist/assets/{useThreadTerminalController-CUnfO0Da.js → useThreadTerminalController-D4Cr2aY0.js} +1 -1
- package/app/dist/assets/useThreadTerminalController-D4Cr2aY0.js.br +0 -0
- package/app/dist/assets/useThreadTerminalController-D4Cr2aY0.js.gz +0 -0
- package/app/dist/assets/{workspace-change-summary-CLNpSq_E.js → workspace-change-summary-C1EKX0Np.js} +1 -1
- package/app/dist/assets/workspace-change-summary-C1EKX0Np.js.br +0 -0
- package/app/dist/assets/workspace-change-summary-C1EKX0Np.js.gz +0 -0
- package/app/dist/assets/{workspace-checkout-display-Aad1Wxi4.js → workspace-checkout-display-DRAc3j4u.js} +4 -4
- package/app/dist/assets/workspace-checkout-display-DRAc3j4u.js.br +0 -0
- package/app/dist/assets/workspace-checkout-display-DRAc3j4u.js.gz +0 -0
- package/app/dist/index.html +17 -17
- package/app/dist/index.html.br +0 -0
- package/app/dist/index.html.gz +0 -0
- package/dist/bb-app.js +1 -1
- package/dist/index.d.ts +64 -64
- package/dist/index.js +39 -34
- package/host-daemon/dist/bb +2 -2
- package/host-daemon/dist/daemon-bundle.mjs +9 -9
- package/host-daemon/dist/moonlet +2 -2
- package/host-daemon/dist/moonlet-chunks/{browser-LWDG5PCA.js → browser-3YADF5CZ.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-4BNITW7L.js → chunk-CJVCV7LA.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-5AOUW4I4.js → chunk-DYWN65E6.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-GUMXNH56.js → chunk-GJNT53PW.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/chunk-MNJOOMMT.js +2 -0
- package/host-daemon/dist/moonlet-chunks/{chunk-2QTAZF4P.js → chunk-OZFHGPH4.js} +2 -2
- package/host-daemon/dist/moonlet-chunks/{chunk-OW2VWWPF.js → chunk-UASCWFYV.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-3GDA5QRC.js → chunk-UBCGVKZ2.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-ZJ3M74CR.js → chunk-UZIJUXRX.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-I2TDLRZL.js → chunk-VRIDG567.js} +80 -80
- package/host-daemon/dist/moonlet-chunks/{chunk-LQ55GYT2.js → chunk-Z7UFAOBI.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-IRGDLZXQ.js → chunk-ZY4JRPPT.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{client-LVL2RUQ5.js → client-HJ57QVLD.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{commander-errors-RQKAT5HQ.js → commander-errors-VI7J6RNT.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{context-env-74PECPQU.js → context-env-C4YEBBVX.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{context-hints-GQMM7IUB.js → context-hints-FZ224BCX.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{diagnostics-GZNLDKFH.js → diagnostics-OU2KW3CN.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{environment-2OF5OYK6.js → environment-45XH2PJT.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{file-ICBUEP7H.js → file-OHC2H5AH.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{guide-I3LO3KWD.js → guide-T2HEZTCZ.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{machine-ZH4VN36Y.js → machine-7DB7FE7G.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{marketplace-72G2CIZT.js → marketplace-GSP2IPGS.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{permissions-ZKMW6XVA.js → permissions-SOZPETLR.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{plugin-J33MYYP6.js → plugin-672NQWPG.js} +26 -26
- package/host-daemon/dist/moonlet-chunks/{plugin-cli-proxy-KK4YO745.js → plugin-cli-proxy-YK6LMDCS.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{project-CAOBT6PT.js → project-KMNJH6RG.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{prompt-history-3CTG22DW.js → prompt-history-H3Y2IHDY.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{provider-T7SNTFH5.js → provider-EKKSYF2D.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{schedule-2G2I4DCW.js → schedule-KVSISSIR.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{server-R3LHIEJF.js → server-53I6IGAP.js} +2 -2
- package/host-daemon/dist/moonlet-chunks/{settings-WR7UCFPE.js → settings-MKGSGNIO.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{skill-GHMBJF4G.js → skill-DXINIPQ3.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{status-ES5SEMUE.js → status-BSMUYEAO.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{terminal-45KOGD2U.js → terminal-VKBGZFLN.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{theme-DEIR5VHK.js → theme-3YCCZBGC.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{thread-NNUIM6R7.js → thread-PFBPLD4F.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{updates-23J52P44.js → updates-OO7GE7UB.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{voice-CSQR656B.js → voice-ZJOSAJW7.js} +1 -1
- package/package.json +3 -3
- package/server/dist/builtin-plugins/account-pool/dist/app.js +9 -9
- package/server/dist/builtin-plugins/account-pool/skills/account-pool/SKILL.md +1 -1
- package/server/dist/builtin-plugins/agent-annotations/dist/app.js +2 -2
- package/server/dist/builtin-plugins/agent-board/dist/THIRD_PARTY_NOTICES.md +3 -3
- package/server/dist/builtin-plugins/agent-board/dist/app.js +6 -6
- package/server/dist/builtin-plugins/agent-board/dist/server.js +1 -1
- package/server/dist/builtin-plugins/ask-user-question/dist/app.js +6 -6
- package/server/dist/builtin-plugins/automations/dist/app.js +1 -1
- package/server/dist/builtin-plugins/automations/skills/automations/SKILL.md +1 -1
- package/server/dist/builtin-plugins/bb-account/dist/app.js +1 -1
- package/server/dist/builtin-plugins/bb-account/skills/bb-account/SKILL.md +1 -1
- package/server/dist/builtin-plugins/bb-ai/dist/server.js +2 -2
- package/server/dist/builtin-plugins/bb-ai/skills/bb-cloud-ai/SKILL.md +1 -1
- package/server/dist/builtin-plugins/bb-guide/dist/app.js +1 -1
- package/server/dist/builtin-plugins/bb-guide/dist/server.js +2 -2
- package/server/dist/builtin-plugins/bb-guide/package.json +2 -2
- package/server/dist/builtin-plugins/bb-guide/skills/bb-cli/SKILL.md +3 -3
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/SKILL.md +4 -4
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-cli-agents.md +6 -6
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-events.md +2 -2
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-foundation.md +1 -1
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-sdk.md +1 -1
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/distribution.md +2 -2
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-components.md +4 -4
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-core-slots.md +15 -15
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-hooks-and-ui.md +9 -9
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/providers.md +3 -3
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/quickstart.md +10 -10
- package/server/dist/builtin-plugins/bb-guide/skills/skill-creator/SKILL.md +2 -2
- package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/SKILL.md +3 -3
- package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/references/marketplace-entry.md +8 -8
- package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/references/plugin-release.md +1 -1
- package/server/dist/builtin-plugins/browser-automation/dist/app.js +1 -1
- package/server/dist/builtin-plugins/browser-automation/dist/server.js +2 -2
- package/server/dist/builtin-plugins/browser-automation/skills/browser-automation/SKILL.md +3 -3
- package/server/dist/builtin-plugins/composer/dist/app.js +4 -4
- package/server/dist/builtin-plugins/concurrency-limit/dist/app.js +1 -1
- package/server/dist/builtin-plugins/concurrency-limit/skills/concurrency-limit/SKILL.md +1 -1
- package/server/dist/builtin-plugins/connect/dist/app.js +2 -2
- package/server/dist/builtin-plugins/connect/skills/share-server-links/SKILL.md +1 -1
- package/server/dist/builtin-plugins/connect-next/dist/app.js +2 -2
- package/server/dist/builtin-plugins/connect-next/dist/server.js +1 -1
- package/server/dist/builtin-plugins/connect-next/skills/connect-next/SKILL.md +1 -1
- package/server/dist/builtin-plugins/custom-instructions/dist/app.js +1 -1
- package/server/dist/builtin-plugins/docs/dist/app.js +3 -3
- package/server/dist/builtin-plugins/docs/skills/docs/SKILL.md +1 -1
- package/server/dist/builtin-plugins/drafts/dist/app.js +1 -1
- package/server/dist/builtin-plugins/environment-git-worktree/dist/app.js +1 -1
- package/server/dist/builtin-plugins/environment-modal-sandbox/dist/app.js +1 -1
- package/server/dist/builtin-plugins/environment-modal-sandbox/dist/server.js +1 -1
- package/server/dist/builtin-plugins/environment-modal-sandbox/skills/modal-sandboxes/SKILL.md +5 -5
- package/server/dist/builtin-plugins/environment-project-checkout/dist/app.js +1 -1
- package/server/dist/builtin-plugins/github/dist/app.js +2 -2
- package/server/dist/builtin-plugins/github/dist/server.js +7 -7
- package/server/dist/builtin-plugins/github/package.json +2 -2
- package/server/dist/builtin-plugins/github/skills/github-change/SKILL.md +2 -2
- package/server/dist/builtin-plugins/github/skills/github-change/references/merging.md +8 -8
- package/server/dist/builtin-plugins/github-pr-status/dist/app.js +6 -6
- package/server/dist/builtin-plugins/inline-vis/dist/app.js +2 -2
- package/server/dist/builtin-plugins/inline-vis/skills/inline-vis/SKILL.md +2 -2
- package/server/dist/builtin-plugins/keep-awake/dist/app.js +1 -1
- package/server/dist/builtin-plugins/keep-awake/dist/server.js +1 -1
- package/server/dist/builtin-plugins/library/dist/app.js +2 -2
- package/server/dist/builtin-plugins/mail/skills/mail/SKILL.md +1 -1
- package/server/dist/builtin-plugins/marketplace.json +10 -10
- package/server/dist/builtin-plugins/mcp/dist/server.js +8 -8
- package/server/dist/builtin-plugins/mcp/skills/mcp/SKILL.md +1 -1
- package/server/dist/builtin-plugins/memory/dist/app.js +1 -1
- package/server/dist/builtin-plugins/memory/dist/server.js +4 -4
- package/server/dist/builtin-plugins/memory/skills/memory/SKILL.md +5 -5
- package/server/dist/builtin-plugins/monaco-editor/dist/app.js +1 -1
- package/server/dist/builtin-plugins/navigation/dist/app.js +1 -1
- package/server/dist/builtin-plugins/notify-feed/dist/app.js +3 -3
- package/server/dist/builtin-plugins/notify-feed/dist/server.js +2 -2
- package/server/dist/builtin-plugins/orbit/dist/app.js +2 -2
- package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/docs/handoff-to-new-conversation.md +1 -1
- package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/fixed-runner/linux-x64/manifest.json +4 -4
- package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/revision +1 -1
- package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/source.json +1 -1
- package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/back/CLAUDE.md +5 -5
- package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/front/CLAUDE.md +15 -15
- package/server/dist/builtin-plugins/orbit/dist/host.js +49 -49
- package/server/dist/builtin-plugins/orbit/dist/host.meta.json +1 -1
- package/server/dist/builtin-plugins/orbit/dist/server.js +148 -148
- package/server/dist/builtin-plugins/pdf-preview/dist/app.js +1 -1
- package/server/dist/builtin-plugins/plugin-api-docs/dist/app.js +2 -2
- package/server/dist/builtin-plugins/plugin-api-tester/dist/app.js +1 -1
- package/server/dist/builtin-plugins/prompt-library/dist/app.js +2 -2
- package/server/dist/builtin-plugins/prompt-library/skills/prompt-library/SKILL.md +1 -1
- package/server/dist/builtin-plugins/provider-acp/dist/app.js +1 -1
- package/server/dist/builtin-plugins/provider-acp/dist/host.js +5 -5
- package/server/dist/builtin-plugins/provider-acp/dist/host.meta.json +1 -1
- package/server/dist/builtin-plugins/provider-acp/dist/server.js +97 -97
- package/server/dist/builtin-plugins/provider-acp/skills/acp-provider/SKILL.md +9 -9
- package/server/dist/builtin-plugins/provider-claude-code/dist/app.js +1 -1
- package/server/dist/builtin-plugins/provider-claude-code/dist/host.js +3 -3
- package/server/dist/builtin-plugins/provider-claude-code/dist/host.meta.json +1 -1
- package/server/dist/builtin-plugins/provider-claude-code/dist/server.js +1 -1
- package/server/dist/builtin-plugins/provider-codex/dist/app.js +2 -2
- package/server/dist/builtin-plugins/provider-codex/dist/host.js +45 -45
- package/server/dist/builtin-plugins/provider-codex/dist/host.meta.json +1 -1
- package/server/dist/builtin-plugins/provider-codex/dist/server.js +1 -1
- package/server/dist/builtin-plugins/provider-pi/dist/app.js +1 -1
- package/server/dist/builtin-plugins/provider-pi/skills/pi-provider/SKILL.md +1 -1
- package/server/dist/builtin-plugins/provider-retry/dist/app.js +1 -1
- package/server/dist/builtin-plugins/provider-retry/skills/provider-retry/SKILL.md +1 -1
- package/server/dist/builtin-plugins/provider-usage/dist/app.js +12 -12
- package/server/dist/builtin-plugins/push-notifications/dist/app.js +2 -2
- package/server/dist/builtin-plugins/push-notifications/skills/push-notifications/SKILL.md +1 -1
- package/server/dist/builtin-plugins/scheduled-send/dist/app.js +1 -1
- package/server/dist/builtin-plugins/secrets/dist/app.js +1 -1
- package/server/dist/builtin-plugins/side-chat/dist/app.js +1 -1
- package/server/dist/builtin-plugins/storage-retention/dist/app.js +1 -1
- package/server/dist/builtin-plugins/storage-retention/dist/server.js +2 -2
- package/server/dist/builtin-plugins/storage-retention/skills/storage-retention/SKILL.md +5 -5
- package/server/dist/builtin-plugins/tasks/dist/app.js +4 -4
- package/server/dist/builtin-plugins/tasks/skills/tasks/SKILL.md +1 -1
- package/server/dist/builtin-plugins/theme-preview/dist/app.js +2 -2
- package/server/dist/builtin-plugins/theme-preview/skills/bb-theme-authoring/SKILL.md +1 -1
- package/server/dist/builtin-plugins/thread-list/dist/app.js +2 -2
- package/server/dist/builtin-plugins/thread-list/dist/server.js +2 -2
- package/server/dist/builtin-plugins/workflows/dist/app.js +1 -1
- package/server/dist/builtin-plugins/workflows/dist/server.js +4 -4
- package/server/dist/builtin-plugins/workflows/skills/workflows/SKILL.md +4 -4
- package/server/dist/builtin-plugins/workflows/skills/workflows/references/authoring.md +7 -7
- package/server/dist/builtin-skills/bb-cli/SKILL.md +3 -3
- package/server/dist/builtin-skills/bb-plugin-authoring/SKILL.md +4 -4
- package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-cli-agents.md +6 -6
- package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-events.md +2 -2
- package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-foundation.md +1 -1
- package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-sdk.md +1 -1
- package/server/dist/builtin-skills/bb-plugin-authoring/references/distribution.md +2 -2
- package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-components.md +4 -4
- package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-core-slots.md +15 -15
- package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-hooks-and-ui.md +9 -9
- package/server/dist/builtin-skills/bb-plugin-authoring/references/providers.md +3 -3
- package/server/dist/builtin-skills/bb-plugin-authoring/references/quickstart.md +10 -10
- package/server/dist/builtin-skills/skill-creator/SKILL.md +2 -2
- package/server/dist/builtin-skills/submit-a-plugin/SKILL.md +3 -3
- package/server/dist/builtin-skills/submit-a-plugin/references/marketplace-entry.md +8 -8
- package/server/dist/builtin-skills/submit-a-plugin/references/plugin-release.md +1 -1
- package/server/dist/start-server.js +75 -70
- package/app/dist/assets/AddMachineDialog-BHF-GkBG.js.br +0 -0
- package/app/dist/assets/AddMachineDialog-BHF-GkBG.js.gz +0 -0
- package/app/dist/assets/AppFileExternalNavigationDispatcher-BNbJsP1g.js.br +0 -0
- package/app/dist/assets/AppFileExternalNavigationDispatcher-BNbJsP1g.js.gz +0 -0
- package/app/dist/assets/BrowserTabDeck-BlOoU-vR.js.br +0 -0
- package/app/dist/assets/BrowserTabDeck-BlOoU-vR.js.gz +0 -0
- package/app/dist/assets/CommandPaletteBody-CBbTgLrW.js.br +0 -0
- package/app/dist/assets/CommandPaletteBody-CBbTgLrW.js.gz +0 -0
- package/app/dist/assets/DiffHost-DYBSO1_c.js.br +0 -0
- package/app/dist/assets/DiffHost-DYBSO1_c.js.gz +0 -0
- package/app/dist/assets/ExperimentalFileLinkMenu-DO2lGQoK.js.br +0 -0
- package/app/dist/assets/ExperimentalFileLinkMenu-DO2lGQoK.js.gz +0 -0
- package/app/dist/assets/FilePreview-ORcgsTax.js.br +0 -0
- package/app/dist/assets/FilePreview-ORcgsTax.js.gz +0 -0
- package/app/dist/assets/GitDiffCardHeader-i4vt7tT5.js.br +0 -0
- package/app/dist/assets/GitDiffCardHeader-i4vt7tT5.js.gz +0 -0
- package/app/dist/assets/InlineMessageEditorFrame-y089xCLP.js.br +0 -0
- package/app/dist/assets/InlineMessageEditorFrame-y089xCLP.js.gz +0 -0
- package/app/dist/assets/MachineLabel-D07WUIMh.js.br +0 -0
- package/app/dist/assets/MachineLabel-D07WUIMh.js.gz +0 -0
- package/app/dist/assets/MachineRenameDialog-RyrwvNas.js.br +0 -0
- package/app/dist/assets/MachineRenameDialog-RyrwvNas.js.gz +0 -0
- package/app/dist/assets/MachineSettingsView-Bg6Op62W.js.br +0 -0
- package/app/dist/assets/MachineSettingsView-Bg6Op62W.js.gz +0 -0
- package/app/dist/assets/MicrophonePreferences-DwsTYfON.js.br +0 -0
- package/app/dist/assets/MicrophonePreferences-DwsTYfON.js.gz +0 -0
- package/app/dist/assets/ModelReasoningMenu-Dth3XXm8.js.br +0 -0
- package/app/dist/assets/ModelReasoningMenu-Dth3XXm8.js.gz +0 -0
- package/app/dist/assets/MoonletDiff-Da65ABAI.js.br +0 -0
- package/app/dist/assets/MoonletDiff-Da65ABAI.js.gz +0 -0
- package/app/dist/assets/MoonletDiffSplit-Phl7m23w.js.br +0 -0
- package/app/dist/assets/MoonletDiffSplit-Phl7m23w.js.gz +0 -0
- package/app/dist/assets/MoonletSourceCode-C5aa88dK.js.br +0 -0
- package/app/dist/assets/MoonletSourceCode-C5aa88dK.js.gz +0 -0
- package/app/dist/assets/NewTabPage-BKkv1maV.js.br +0 -0
- package/app/dist/assets/NewTabPage-BKkv1maV.js.gz +0 -0
- package/app/dist/assets/NewThreadComposer-00DY4i8k.js.br +0 -0
- package/app/dist/assets/NewThreadComposer-00DY4i8k.js.gz +0 -0
- package/app/dist/assets/OnboardingFlow-GwpuTTqu.js.br +0 -0
- package/app/dist/assets/OnboardingFlow-GwpuTTqu.js.gz +0 -0
- package/app/dist/assets/OptionPicker-Cy_W5NWS.js.br +0 -0
- package/app/dist/assets/OptionPicker-Cy_W5NWS.js.gz +0 -0
- package/app/dist/assets/PaletteShell-CRwrb4lb.js.br +0 -0
- package/app/dist/assets/PaletteShell-CRwrb4lb.js.gz +0 -0
- package/app/dist/assets/PaneMaximizeButton-CMp4cCoZ.js.br +0 -0
- package/app/dist/assets/PaneMaximizeButton-CMp4cCoZ.js.gz +0 -0
- package/app/dist/assets/PierreLineSelectionActions-BXbCJV8P.js.br +0 -0
- package/app/dist/assets/PierreLineSelectionActions-BXbCJV8P.js.gz +0 -0
- package/app/dist/assets/PluginPanelRightPanelHost-CuKRaAaL.js.br +0 -0
- package/app/dist/assets/PluginPanelRightPanelHost-CuKRaAaL.js.gz +0 -0
- package/app/dist/assets/PluginSettingsSections-DJo5h7Qh.js.br +0 -0
- package/app/dist/assets/PluginSettingsSections-DJo5h7Qh.js.gz +0 -0
- package/app/dist/assets/PluginThreadChat-BV6OMCzu.js.br +0 -0
- package/app/dist/assets/PluginThreadChat-BV6OMCzu.js.gz +0 -0
- package/app/dist/assets/ProjectDetailSettingsView-DdF6YsSg.js.br +0 -0
- package/app/dist/assets/ProjectDetailSettingsView-DdF6YsSg.js.gz +0 -0
- package/app/dist/assets/ProjectMachineSetupDialog-CtbI4XxM.js.br +0 -0
- package/app/dist/assets/ProjectMachineSetupDialog-CtbI4XxM.js.gz +0 -0
- package/app/dist/assets/ProjectsSettingsSection-BT1kXbPn.js.br +0 -0
- package/app/dist/assets/ProjectsSettingsSection-BT1kXbPn.js.gz +0 -0
- package/app/dist/assets/QueuedMessagesList-D1aAchqp.js.br +0 -0
- package/app/dist/assets/QueuedMessagesList-D1aAchqp.js.gz +0 -0
- package/app/dist/assets/RemotePathBrowser-vPIL8lVm.js.br +0 -0
- package/app/dist/assets/RemotePathBrowser-vPIL8lVm.js.gz +0 -0
- package/app/dist/assets/RootComposeView-DV6JGFlA.js.br +0 -0
- package/app/dist/assets/RootComposeView-DV6JGFlA.js.gz +0 -0
- package/app/dist/assets/SecondaryPanelLayout-BpHDgFJ_.js.br +0 -0
- package/app/dist/assets/SecondaryPanelLayout-BpHDgFJ_.js.gz +0 -0
- package/app/dist/assets/ServerMoveOverlayView-CGkGzv8t.js.br +0 -0
- package/app/dist/assets/ServerMoveOverlayView-CGkGzv8t.js.gz +0 -0
- package/app/dist/assets/SettingsSidebar-1XC0Uxwo.js.br +0 -0
- package/app/dist/assets/SettingsSidebar-1XC0Uxwo.js.gz +0 -0
- package/app/dist/assets/SettingsView-BUobmesT.js +0 -7
- package/app/dist/assets/SettingsView-BUobmesT.js.br +0 -0
- package/app/dist/assets/SettingsView-BUobmesT.js.gz +0 -0
- package/app/dist/assets/SidebarFooterCustomize-D7sLYPwD.js.br +0 -0
- package/app/dist/assets/SidebarFooterCustomize-D7sLYPwD.js.gz +0 -0
- package/app/dist/assets/SidebarVisibilityCustomize-DpTzFoGl.js.br +0 -0
- package/app/dist/assets/SidebarVisibilityCustomize-DpTzFoGl.js.gz +0 -0
- package/app/dist/assets/SourceCodeHost-DVEXLJK1.js.br +0 -0
- package/app/dist/assets/SourceCodeHost-DVEXLJK1.js.gz +0 -0
- package/app/dist/assets/SplitWorkspaceRoute-BfxQQdOx.js.br +0 -0
- package/app/dist/assets/SplitWorkspaceRoute-BfxQQdOx.js.gz +0 -0
- package/app/dist/assets/TerminalOutputBlock-COQNamKR.js.br +0 -0
- package/app/dist/assets/TerminalOutputBlock-COQNamKR.js.gz +0 -0
- package/app/dist/assets/ThreadActionsMenu-064Gcy7T.js.br +0 -0
- package/app/dist/assets/ThreadActionsMenu-064Gcy7T.js.gz +0 -0
- package/app/dist/assets/ThreadDetailView-CjoXzweq.js.br +0 -0
- package/app/dist/assets/ThreadDetailView-CjoXzweq.js.gz +0 -0
- package/app/dist/assets/ThreadSearchPaletteMode-CwdePsHK.js.br +0 -0
- package/app/dist/assets/ThreadSearchPaletteMode-CwdePsHK.js.gz +0 -0
- package/app/dist/assets/ThreadSecondaryPanel-CtYtgTla.js.br +0 -0
- package/app/dist/assets/ThreadSecondaryPanel-CtYtgTla.js.gz +0 -0
- package/app/dist/assets/ThreadSecondaryPanelTabContent-BNQi8b2n.js.br +0 -0
- package/app/dist/assets/ThreadSecondaryPanelTabContent-BNQi8b2n.js.gz +0 -0
- package/app/dist/assets/ThreadStatusGlyph-DxxHDn0P.js.br +0 -0
- package/app/dist/assets/ThreadStatusGlyph-DxxHDn0P.js.gz +0 -0
- package/app/dist/assets/ThreadTerminalPanel-fb5Kk0KG.js.br +0 -0
- package/app/dist/assets/ThreadTerminalPanel-fb5Kk0KG.js.gz +0 -0
- package/app/dist/assets/ThreadTerminalView-BiGdt3Fd.js.br +0 -0
- package/app/dist/assets/ThreadTerminalView-BiGdt3Fd.js.gz +0 -0
- package/app/dist/assets/ThreadTimelineNavigationContext-epkIpS1J.js.br +0 -0
- package/app/dist/assets/ThreadTimelineNavigationContext-epkIpS1J.js.gz +0 -0
- package/app/dist/assets/TimelineDetailScroll-D8gge5Y9.js.br +0 -0
- package/app/dist/assets/TimelineDetailScroll-D8gge5Y9.js.gz +0 -0
- package/app/dist/assets/TimelineFileDiffBlock-BJt7kifl.js.br +0 -0
- package/app/dist/assets/TimelineFileDiffBlock-BJt7kifl.js.gz +0 -0
- package/app/dist/assets/TimelineSelectionMenu-DrK39LAT.js.br +0 -0
- package/app/dist/assets/TimelineSelectionMenu-DrK39LAT.js.gz +0 -0
- package/app/dist/assets/ToolsView-4tUvUv2U.js.br +0 -0
- package/app/dist/assets/ToolsView-4tUvUv2U.js.gz +0 -0
- package/app/dist/assets/ToolsViewSplits-BWOxgNc1.js.br +0 -0
- package/app/dist/assets/ToolsViewSplits-BWOxgNc1.js.gz +0 -0
- package/app/dist/assets/WaveformVisualizer-C1SzIkiu.js.br +0 -0
- package/app/dist/assets/WaveformVisualizer-C1SzIkiu.js.gz +0 -0
- package/app/dist/assets/app-fixed-tab-navigation-Cv4Tj7xZ.js.br +0 -0
- package/app/dist/assets/app-fixed-tab-navigation-Cv4Tj7xZ.js.gz +0 -0
- package/app/dist/assets/audio-input-device-preference-D8tr0bqw.js.br +0 -0
- package/app/dist/assets/audio-input-device-preference-D8tr0bqw.js.gz +0 -0
- package/app/dist/assets/bottom-anchored-scroll-body-VYrnz8Hl.js.br +0 -0
- package/app/dist/assets/bottom-anchored-scroll-body-VYrnz8Hl.js.gz +0 -0
- package/app/dist/assets/browser-url-jhAVtSw2.js.br +0 -0
- package/app/dist/assets/browser-url-jhAVtSw2.js.gz +0 -0
- package/app/dist/assets/checkbox-qaQbU8-H.js.br +0 -0
- package/app/dist/assets/checkbox-qaQbU8-H.js.gz +0 -0
- package/app/dist/assets/code-loading-skeletons-pfQDO26Y.js.br +0 -0
- package/app/dist/assets/code-loading-skeletons-pfQDO26Y.js.gz +0 -0
- package/app/dist/assets/detail-card-C3OH86kJ.js.br +0 -0
- package/app/dist/assets/detail-card-C3OH86kJ.js.gz +0 -0
- package/app/dist/assets/diff-stats-tally-DkIHmiEl.js.br +0 -0
- package/app/dist/assets/diff-stats-tally-DkIHmiEl.js.gz +0 -0
- package/app/dist/assets/dist-CWXlD45B.js.br +0 -0
- package/app/dist/assets/dist-CWXlD45B.js.gz +0 -0
- package/app/dist/assets/environment-mutations-BrA6u8Ev.js.br +0 -0
- package/app/dist/assets/environment-mutations-BrA6u8Ev.js.gz +0 -0
- package/app/dist/assets/environment-workspace-display-0oqBMXMB.js.br +0 -0
- package/app/dist/assets/environment-workspace-display-0oqBMXMB.js.gz +0 -0
- package/app/dist/assets/event-code-block-BfPSBXNn.js.br +0 -0
- package/app/dist/assets/event-code-block-BfPSBXNn.js.gz +0 -0
- package/app/dist/assets/expandable-text-01SvfXRm.js.br +0 -0
- package/app/dist/assets/expandable-text-01SvfXRm.js.gz +0 -0
- package/app/dist/assets/file-path-link-Ddg7Fzor.js.br +0 -0
- package/app/dist/assets/file-path-link-Ddg7Fzor.js.gz +0 -0
- package/app/dist/assets/host-mutations-CAtir6jv.js.br +0 -0
- package/app/dist/assets/host-mutations-CAtir6jv.js.gz +0 -0
- package/app/dist/assets/icon-extended-D2fR2GTF.js.br +0 -0
- package/app/dist/assets/icon-extended-D2fR2GTF.js.gz +0 -0
- package/app/dist/assets/image-lightbox-Dhmri6WK.js.br +0 -0
- package/app/dist/assets/image-lightbox-Dhmri6WK.js.gz +0 -0
- package/app/dist/assets/index-5EQKiTkW.css +0 -2
- package/app/dist/assets/index-5EQKiTkW.css.br +0 -0
- package/app/dist/assets/index-5EQKiTkW.css.gz +0 -0
- package/app/dist/assets/index-CfvM6UcU.js.br +0 -0
- package/app/dist/assets/index-CfvM6UcU.js.gz +0 -0
- package/app/dist/assets/inline-rename-editor-Bg8SXoZ3.js.br +0 -0
- package/app/dist/assets/inline-rename-editor-Bg8SXoZ3.js.gz +0 -0
- package/app/dist/assets/launcherRow-CqPaUYWn.js.br +0 -0
- package/app/dist/assets/launcherRow-CqPaUYWn.js.gz +0 -0
- package/app/dist/assets/localhost-link-rewrite-description-DP-bXSL8.js.br +0 -0
- package/app/dist/assets/localhost-link-rewrite-description-DP-bXSL8.js.gz +0 -0
- package/app/dist/assets/markdown-html-BU8qsXmq.js.br +0 -0
- package/app/dist/assets/markdown-html-BU8qsXmq.js.gz +0 -0
- package/app/dist/assets/markdown-local-file-link-D-MSnVWD.js.br +0 -0
- package/app/dist/assets/markdown-local-file-link-D-MSnVWD.js.gz +0 -0
- package/app/dist/assets/markdown-preview-BLL1QuNp.js.br +0 -0
- package/app/dist/assets/markdown-preview-BLL1QuNp.js.gz +0 -0
- package/app/dist/assets/markdown-prompt-mentions-B5LVmCbO.js.br +0 -0
- package/app/dist/assets/markdown-prompt-mentions-B5LVmCbO.js.gz +0 -0
- package/app/dist/assets/model-load-error-message-Dmp1hUNg.js.br +0 -0
- package/app/dist/assets/model-load-error-message-Dmp1hUNg.js.gz +0 -0
- package/app/dist/assets/onboarding-telemetry-BSt5c7Sg.js +0 -1
- package/app/dist/assets/open-in-editor-button-D0wnpT6x.js.br +0 -0
- package/app/dist/assets/open-in-editor-button-D0wnpT6x.js.gz +0 -0
- package/app/dist/assets/page-shell-CgSxnF9m.js.br +0 -0
- package/app/dist/assets/page-shell-CgSxnF9m.js.gz +0 -0
- package/app/dist/assets/pierre-worker-pool-CHGWu76e.js.br +0 -0
- package/app/dist/assets/pierre-worker-pool-CHGWu76e.js.gz +0 -0
- package/app/dist/assets/plugin-detail-navigation-DuR8_JCx.js.br +0 -0
- package/app/dist/assets/plugin-detail-navigation-DuR8_JCx.js.gz +0 -0
- package/app/dist/assets/plugin-frontend-D5ijLuKC.js.br +0 -0
- package/app/dist/assets/plugin-frontend-D5ijLuKC.js.gz +0 -0
- package/app/dist/assets/plugin-ui-Dpa8hcuk.js.br +0 -0
- package/app/dist/assets/plugin-ui-Dpa8hcuk.js.gz +0 -0
- package/app/dist/assets/queued-editor-typeahead-layout-Czaq8Cl9.js.br +0 -0
- package/app/dist/assets/queued-editor-typeahead-layout-Czaq8Cl9.js.gz +0 -0
- package/app/dist/assets/queued-messages-layout-B5xwiued.js.br +0 -0
- package/app/dist/assets/queued-messages-layout-B5xwiued.js.gz +0 -0
- package/app/dist/assets/resource-list-BKpxiO2e.js.br +0 -0
- package/app/dist/assets/resource-list-BKpxiO2e.js.gz +0 -0
- package/app/dist/assets/root-compose-create-preference-BeAvwSHy.js +0 -1
- package/app/dist/assets/settings-nav-C9-jh_HN.js.br +0 -0
- package/app/dist/assets/settings-nav-C9-jh_HN.js.gz +0 -0
- package/app/dist/assets/settings-sections-BMr_XU5l.js.br +0 -0
- package/app/dist/assets/settings-sections-BMr_XU5l.js.gz +0 -0
- package/app/dist/assets/sidebarTouchSensor-DG_A1RmT.js.br +0 -0
- package/app/dist/assets/sidebarTouchSensor-DG_A1RmT.js.gz +0 -0
- package/app/dist/assets/switch-BjJ8825r.js.br +0 -0
- package/app/dist/assets/switch-BjJ8825r.js.gz +0 -0
- package/app/dist/assets/thread-event-parser-ma5CGP66.js.br +0 -0
- package/app/dist/assets/thread-event-parser-ma5CGP66.js.gz +0 -0
- package/app/dist/assets/thread-panel-queries-BXeOzk_6.js.br +0 -0
- package/app/dist/assets/thread-panel-queries-BXeOzk_6.js.gz +0 -0
- package/app/dist/assets/thread-runtime-mutations-DmKkyel0.js.br +0 -0
- package/app/dist/assets/thread-runtime-mutations-DmKkyel0.js.gz +0 -0
- package/app/dist/assets/thread-terminal-queries-AFVZ5K6p.js.br +0 -0
- package/app/dist/assets/thread-terminal-queries-AFVZ5K6p.js.gz +0 -0
- package/app/dist/assets/threadRecentItems-DXsdcpBk.js.br +0 -0
- package/app/dist/assets/threadRecentItems-DXsdcpBk.js.gz +0 -0
- package/app/dist/assets/threadWorkspaceOpenPath-DwKd-s_5.js.br +0 -0
- package/app/dist/assets/threadWorkspaceOpenPath-DwKd-s_5.js.gz +0 -0
- package/app/dist/assets/title-bar-scroll-fade-Dw_BPLyx.js.br +0 -0
- package/app/dist/assets/title-bar-scroll-fade-Dw_BPLyx.js.gz +0 -0
- package/app/dist/assets/use-hover-popover-DzrAfLzd.js.br +0 -0
- package/app/dist/assets/use-hover-popover-DzrAfLzd.js.gz +0 -0
- package/app/dist/assets/useElementWidth-Kv5FX-9C.js.br +0 -0
- package/app/dist/assets/useElementWidth-Kv5FX-9C.js.gz +0 -0
- package/app/dist/assets/useLocalOpenTargets-B7rqz64L.js.br +0 -0
- package/app/dist/assets/useLocalOpenTargets-B7rqz64L.js.gz +0 -0
- package/app/dist/assets/usePanelResizeSnap-Dizp45Ab.js.br +0 -0
- package/app/dist/assets/usePanelResizeSnap-Dizp45Ab.js.gz +0 -0
- package/app/dist/assets/usePanelTerminals-ByzphxXd.js.br +0 -0
- package/app/dist/assets/usePanelTerminals-ByzphxXd.js.gz +0 -0
- package/app/dist/assets/usePathSuggestions-Bd5UhdCh.js.br +0 -0
- package/app/dist/assets/usePathSuggestions-Bd5UhdCh.js.gz +0 -0
- package/app/dist/assets/useResolvedLiveFileTarget-x5Gd-Gzx.js.br +0 -0
- package/app/dist/assets/useResolvedLiveFileTarget-x5Gd-Gzx.js.gz +0 -0
- package/app/dist/assets/useThreadTerminalController-CUnfO0Da.js.br +0 -0
- package/app/dist/assets/useThreadTerminalController-CUnfO0Da.js.gz +0 -0
- package/app/dist/assets/workspace-change-summary-CLNpSq_E.js.br +0 -0
- package/app/dist/assets/workspace-change-summary-CLNpSq_E.js.gz +0 -0
- package/app/dist/assets/workspace-checkout-display-Aad1Wxi4.js.br +0 -0
- package/app/dist/assets/workspace-checkout-display-Aad1Wxi4.js.gz +0 -0
- package/host-daemon/dist/moonlet-chunks/chunk-4XWRV5U3.js +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var yv=Object.create;var Ns=Object.defineProperty;var xv=Object.getOwnPropertyDescriptor;var bv=Object.getOwnPropertyNames;var wv=Object.getPrototypeOf,Sv=Object.prototype.hasOwnProperty;var F=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var ni=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},fc=(t,e)=>{for(var n in e)Ns(t,n,{get:e[n],enumerable:!0})},Yf=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of bv(e))!Sv.call(t,o)&&o!==n&&Ns(t,o,{get:()=>e[o],enumerable:!(r=xv(e,o))||r.enumerable});return t};var Os=(t,e,n)=>(n=t!=null?yv(wv(t)):{},Yf(e||!t||!t.__esModule?Ns(n,"default",{value:t,enumerable:!0}):n,t)),Xf=t=>Yf(Ns({},"__esModule",{value:!0}),t);var Kt={};fc(Kt,{Activity:()=>uM,Children:()=>Pa,Component:()=>dM,Fragment:()=>Qu,Profiler:()=>pM,PureComponent:()=>fM,StrictMode:()=>hM,Suspense:()=>mM,act:()=>gM,cache:()=>yM,cacheSignal:()=>xM,captureOwnerStack:()=>bM,cloneElement:()=>Ai,createContext:()=>bt,createElement:()=>Ni,createRef:()=>ed,default:()=>Qt,forwardRef:()=>ze,isValidElement:()=>Eo,lazy:()=>wM,memo:()=>td,startTransition:()=>SM,unstable_useCacheRefresh:()=>kM,use:()=>vM,useActionState:()=>EM,useCallback:()=>Z,useContext:()=>Rt,useDebugValue:()=>Oi,useDeferredValue:()=>CM,useEffect:()=>Q,useEffectEvent:()=>TM,useId:()=>Ii,useImperativeHandle:()=>MM,useInsertionEffect:()=>PM,useLayoutEffect:()=>Te,useMemo:()=>$e,useOptimistic:()=>_M,useReducer:()=>RM,useRef:()=>L,useState:()=>Ce,useSyncExternalStore:()=>nd,useTransition:()=>AM,version:()=>_a});var Xu,Ma,Qt,uM,Pa,dM,Qu,pM,fM,hM,mM,gM,yM,xM,bM,Ai,bt,Ni,ed,ze,Eo,wM,td,SM,kM,vM,EM,Z,Rt,Oi,CM,Q,TM,Ii,MM,PM,Te,$e,_M,RM,L,Ce,nd,AM,_a,ye=F(()=>{Xu=globalThis.__bbPluginRuntime;if(Xu==null||Xu.react==null)throw new Error('Cannot load "react": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');Ma=Xu.react,Qt="default"in Ma?Ma.default:Ma,{Activity:uM,Children:Pa,Component:dM,Fragment:Qu,Profiler:pM,PureComponent:fM,StrictMode:hM,Suspense:mM,act:gM,cache:yM,cacheSignal:xM,captureOwnerStack:bM,cloneElement:Ai,createContext:bt,createElement:Ni,createRef:ed,forwardRef:ze,isValidElement:Eo,lazy:wM,memo:td,startTransition:SM,unstable_useCacheRefresh:kM,use:vM,useActionState:EM,useCallback:Z,useContext:Rt,useDebugValue:Oi,useDeferredValue:CM,useEffect:Q,useEffectEvent:TM,useId:Ii,useImperativeHandle:MM,useInsertionEffect:PM,useLayoutEffect:Te,useMemo:$e,useOptimistic:_M,useReducer:RM,useRef:L,useState:Ce,useSyncExternalStore:nd,useTransition:AM,version:_a}=Ma});var Ay=ni(Ry=>{"use strict";var Co=(ye(),Xf(Kt));function NM(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var OM=typeof Object.is=="function"?Object.is:NM,IM=Co.useState,DM=Co.useEffect,zM=Co.useLayoutEffect,LM=Co.useDebugValue;function $M(t,e){var n=e(),r=IM({inst:{value:n,getSnapshot:e}}),o=r[0].inst,i=r[1];return zM(function(){o.value=n,o.getSnapshot=e,od(o)&&i({inst:o})},[t,n,e]),DM(function(){return od(o)&&i({inst:o}),t(function(){od(o)&&i({inst:o})})},[t]),LM(n),n}function od(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!OM(t,n)}catch{return!0}}function BM(t,e){return e()}var FM=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?BM:$M;Ry.useSyncExternalStore=Co.useSyncExternalStore!==void 0?Co.useSyncExternalStore:FM});var Aa=ni((ML,Ny)=>{"use strict";Ny.exports=Ay()});var Vy=ni(Fy=>{"use strict";var Da=(ye(),Xf(Kt)),CP=Aa();function TP(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var MP=typeof Object.is=="function"?Object.is:TP,PP=CP.useSyncExternalStore,_P=Da.useRef,RP=Da.useEffect,AP=Da.useMemo,NP=Da.useDebugValue;Fy.useSyncExternalStoreWithSelector=function(t,e,n,r,o){var i=_P(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=AP(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&s.hasValue){var h=s.value;if(o(h,p))return d=h}return d=p}if(h=d,MP(u,p))return h;var m=r(p);return o!==void 0&&o(h,m)?(u=p,h):(u=p,d=m)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(e())},f===null?void 0:function(){return l(f())}]},[e,n,r,o]);var a=PP(t,i[0],i[1]);return RP(function(){s.hasValue=!0,s.value=a},[a]),NP(a),a}});var Zy=ni((BL,Hy)=>{"use strict";Hy.exports=Vy()});function qn({text:t,parseLink:e,offset:n=0,allowMarkdownSuffix:r=!0}){let o=[];for(let i of t.matchAll(/https?:\/\/[^\s<>"'`]+/giu)){let s=t[i.index-1];if(s!==void 0&&/[\p{Letter}\p{Number}_/@\\=+%:.-]/u.test(s))continue;let a=i[0].replace(r?/[.,;:!)\]}*_~\u2019\u201d\u2026\u3002\uff0c\uff01\uff1b\uff1a\uff1f]+$/u:/[.,;:!)\]}\u2019\u201d\u2026\u3002\uff0c\uff01\uff1b\uff1a\uff1f]+$/u,""),l=e(a);l!==null&&o.push({from:n+i.index,to:n+i.index+a.length,text:a,threadId:l.threadId,projectId:l.projectId})}return o}var al=F(()=>{"use strict"});function cp(t,e){let n=e||$R,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return mw(t,r,o)}function mw(t,e,n){if(BR(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return hw(t.children,e,n)}return Array.isArray(t)?hw(t,e,n):""}function hw(t,e,n){let r=[],o=-1;for(;++o<t.length;)r[o]=mw(t[o],e,n);return r.join("")}function BR(t){return!!(t&&typeof t=="object")}var $R,gw=F(()=>{$R={}});var yw=F(()=>{gw()});function Lo(t){let e="&"+t+";";xw.innerHTML=e;let n=xw.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}var xw,ll=F(()=>{xw=document.createElement("i")});function ot(t,e,n,r){let o=t.length,i=0,s;if(e<0?e=-e>o?0:o+e:e=e>o?o:e,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(e,n),t.splice(...s);else for(n&&t.splice(e,n);i<r.length;)s=r.slice(i,i+1e4),s.unshift(e,0),t.splice(...s),i+=1e4,e+=1e4}function wt(t,e){return t.length>0?(ot(t,t.length,0,e),t):e}var Jn=F(()=>{});function ww(t){let e={},n=-1;for(;++n<t.length;)FR(e,t[n]);return e}function FR(t,e){let n;for(n in e){let o=(bw.call(t,n)?t[n]:void 0)||(t[n]={}),i=e[n],s;if(i)for(s in i){bw.call(o,s)||(o[s]=[]);let a=i[s];VR(o[s],Array.isArray(a)?a:a?[a]:[])}}}function VR(t,e){let n=-1,r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);ot(t,0,0,r)}var bw,Sw=F(()=>{Jn();bw={}.hasOwnProperty});function cl(t,e){let n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}var up=F(()=>{});function Mn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var ul=F(()=>{});function Xi(t){return t!==null&&(t<32||t===127)}function J(t){return t!==null&&t<-2}function Ve(t){return t!==null&&(t<0||t===32)}function re(t){return t===-2||t===-1||t===32}function Gn(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}var Lt,St,kw,Qi,vw,Ew,Cw,Tw,Me=F(()=>{Lt=Gn(/[A-Za-z]/),St=Gn(/[\dA-Za-z]/),kw=Gn(/[#-'*+\--9=?A-Z^-~]/);Qi=Gn(/\d/),vw=Gn(/[\dA-Fa-f]/),Ew=Gn(/[!-/:-@[-`{-~]/);Cw=Gn(/\p{P}|\p{S}/u),Tw=Gn(/\s/)});function oe(t,e,n,r){let o=r?r-1:Number.POSITIVE_INFINITY,i=0;return s;function s(l){return re(l)?(t.enter(n),a(l)):e(l)}function a(l){return re(l)&&i++<o?(t.consume(l),a):(t.exit(n),e(l))}}var Je=F(()=>{Me()});function HR(t){let e=t.attempt(this.parser.constructs.contentInitial,r,o),n;return e;function r(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),oe(t,e,"linePrefix")}function o(a){return t.enter("paragraph"),i(a)}function i(a){let l=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(a)}function s(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return J(a)?(t.consume(a),t.exit("chunkText"),i):(t.consume(a),s)}}var Mw,Pw=F(()=>{Je();Me();Mw={tokenize:HR}});function ZR(t){let e=this,n=[],r=0,o,i,s;return a;function a(S){if(r<n.length){let M=n[r];return e.containerState=M[1],t.attempt(M[0].continuation,l,c)(S)}return c(S)}function l(S){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,o&&E();let M=e.events.length,T=M,C;for(;T--;)if(e.events[T][0]==="exit"&&e.events[T][1].type==="chunkFlow"){C=e.events[T][1].end;break}y(r);let R=M;for(;R<e.events.length;)e.events[R][1].end={...C},R++;return ot(e.events,T+1,0,e.events.slice(M)),e.events.length=R,c(S)}return a(S)}function c(S){if(r===n.length){if(!o)return f(S);if(o.currentConstruct&&o.currentConstruct.concrete)return h(S);e.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(_w,u,d)(S)}function u(S){return o&&E(),y(r),f(S)}function d(S){return e.parser.lazy[e.now().line]=r!==n.length,s=e.now().offset,h(S)}function f(S){return e.containerState={},t.attempt(_w,p,h)(S)}function p(S){return r++,n.push([e.currentConstruct,e.containerState]),f(S)}function h(S){if(S===null){o&&E(),y(0),t.consume(S);return}return o=o||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),m(S)}function m(S){if(S===null){g(t.exit("chunkFlow"),!0),y(0),t.consume(S);return}return J(S)?(t.consume(S),g(t.exit("chunkFlow")),r=0,e.interrupt=void 0,a):(t.consume(S),m)}function g(S,M){let T=e.sliceStream(S);if(M&&T.push(null),S.previous=i,i&&(i.next=S),i=S,o.defineSkip(S.start),o.write(T),e.parser.lazy[S.start.line]){let C=o.events.length;for(;C--;)if(o.events[C][1].start.offset<s&&(!o.events[C][1].end||o.events[C][1].end.offset>s))return;let R=e.events.length,V=R,$,O;for(;V--;)if(e.events[V][0]==="exit"&&e.events[V][1].type==="chunkFlow"){if($){O=e.events[V][1].end;break}$=!0}for(y(r),C=R;C<e.events.length;)e.events[C][1].end={...O},C++;ot(e.events,V+1,0,e.events.slice(R)),e.events.length=C}}function y(S){let M=n.length;for(;M-- >S;){let T=n[M];e.containerState=T[1],T[0].exit.call(e,t)}n.length=S}function E(){o.write([null]),i=void 0,o=void 0,e.containerState._closeFlow=void 0}}function jR(t,e,n){return oe(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var Rw,_w,Aw=F(()=>{Je();Me();Jn();Rw={tokenize:ZR},_w={tokenize:jR}});function dp(t){if(t===null||Ve(t)||Tw(t))return 1;if(Cw(t))return 2}var Nw=F(()=>{Me()});function $o(t,e,n){let r=[],o=-1;for(;++o<t.length;){let i=t[o].resolveAll;i&&!r.includes(i)&&(e=i(e,n),r.push(i))}return e}var dl=F(()=>{});function UR(t,e){let n=-1,r,o,i,s,a,l,c,u;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;let d={...t[r][1].end},f={...t[n][1].start};Ow(d,-l),Ow(f,l),s={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...t[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:f},i={type:l>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},o={type:l>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},t[r][1].end={...s.start},t[n][1].start={...a.end},c=[],t[r][1].end.offset-t[r][1].start.offset&&(c=wt(c,[["enter",t[r][1],e],["exit",t[r][1],e]])),c=wt(c,[["enter",o,e],["enter",s,e],["exit",s,e],["enter",i,e]]),c=wt(c,$o(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),c=wt(c,[["exit",i,e],["enter",a,e],["exit",a,e],["exit",o,e]]),t[n][1].end.offset-t[n][1].start.offset?(u=2,c=wt(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,ot(t,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function KR(t,e){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=dp(r),i;return s;function s(l){return i=l,t.enter("attentionSequence"),a(l)}function a(l){if(l===i)return t.consume(l),a;let c=t.exit("attentionSequence"),u=dp(l),d=!u||u===2&&o||n.includes(l),f=!o||o===2&&u||n.includes(r);return c._open=!!(i===42?d:d&&(o||!f)),c._close=!!(i===42?f:f&&(u||!d)),e(l)}}function Ow(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}var es,Iw=F(()=>{Jn();Nw();dl();es={name:"attention",resolveAll:UR,tokenize:KR}});function WR(t,e,n){let r=0;return o;function o(p){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(p),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),i}function i(p){return Lt(p)?(t.consume(p),s):p===64?n(p):c(p)}function s(p){return p===43||p===45||p===46||St(p)?(r=1,a(p)):c(p)}function a(p){return p===58?(t.consume(p),r=0,l):(p===43||p===45||p===46||St(p))&&r++<32?(t.consume(p),a):(r=0,c(p))}function l(p){return p===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(p),t.exit("autolinkMarker"),t.exit("autolink"),e):p===null||p===32||p===60||Xi(p)?n(p):(t.consume(p),l)}function c(p){return p===64?(t.consume(p),u):kw(p)?(t.consume(p),c):n(p)}function u(p){return St(p)?d(p):n(p)}function d(p){return p===46?(t.consume(p),r=0,u):p===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(p),t.exit("autolinkMarker"),t.exit("autolink"),e):f(p)}function f(p){if((p===45||St(p))&&r++<63){let h=p===45?f:d;return t.consume(p),h}return n(p)}}var pp,Dw=F(()=>{Me();pp={name:"autolink",tokenize:WR}});function qR(t,e,n){return r;function r(i){return re(i)?oe(t,o,"linePrefix")(i):o(i)}function o(i){return i===null||J(i)?e(i):n(i)}}var Yn,pl=F(()=>{Je();Me();Yn={partial:!0,tokenize:qR}});function JR(t,e,n){let r=this;return o;function o(s){if(s===62){let a=r.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(s),t.exit("blockQuoteMarker"),i}return n(s)}function i(s){return re(s)?(t.enter("blockQuotePrefixWhitespace"),t.consume(s),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(s))}}function GR(t,e,n){let r=this;return o;function o(s){return re(s)?oe(t,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return t.attempt(fl,e,n)(s)}}function YR(t){t.exit("blockQuote")}var fl,zw=F(()=>{Je();Me();fl={continuation:{tokenize:GR},exit:YR,name:"blockQuote",tokenize:JR}});function XR(t,e,n){return r;function r(i){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(i),t.exit("escapeMarker"),o}function o(i){return Ew(i)?(t.enter("characterEscapeValue"),t.consume(i),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(i)}}var hl,Lw=F(()=>{Me();hl={name:"characterEscape",tokenize:XR}});function QR(t,e,n){let r=this,o=0,i,s;return a;function a(d){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),l}function l(d){return d===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(d),t.exit("characterReferenceMarkerNumeric"),c):(t.enter("characterReferenceValue"),i=31,s=St,u(d))}function c(d){return d===88||d===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(d),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),i=6,s=vw,u):(t.enter("characterReferenceValue"),i=7,s=Qi,u(d))}function u(d){if(d===59&&o){let f=t.exit("characterReferenceValue");return s===St&&!Lo(r.sliceSerialize(f))?n(d):(t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return s(d)&&o++<i?(t.consume(d),u):n(d)}}var ml,$w=F(()=>{ll();Me();ml={name:"characterReference",tokenize:QR}});function eA(t,e,n){let r=this,o={partial:!0,tokenize:T},i=0,s=0,a;return l;function l(C){return c(C)}function c(C){let R=r.events[r.events.length-1];return i=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,a=C,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(C)}function u(C){return C===a?(s++,t.consume(C),u):s<3?n(C):(t.exit("codeFencedFenceSequence"),re(C)?oe(t,d,"whitespace")(C):d(C))}function d(C){return C===null||J(C)?(t.exit("codeFencedFence"),r.interrupt?e(C):t.check(Bw,m,M)(C)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),f(C))}function f(C){return C===null||J(C)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),d(C)):re(C)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),oe(t,p,"whitespace")(C)):C===96&&C===a?n(C):(t.consume(C),f)}function p(C){return C===null||J(C)?d(C):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||J(C)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),d(C)):C===96&&C===a?n(C):(t.consume(C),h)}function m(C){return t.attempt(o,M,g)(C)}function g(C){return t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),y}function y(C){return i>0&&re(C)?oe(t,E,"linePrefix",i+1)(C):E(C)}function E(C){return C===null||J(C)?t.check(Bw,m,M)(C):(t.enter("codeFlowValue"),S(C))}function S(C){return C===null||J(C)?(t.exit("codeFlowValue"),E(C)):(t.consume(C),S)}function M(C){return t.exit("codeFenced"),e(C)}function T(C,R,V){let $=0;return O;function O(I){return C.enter("lineEnding"),C.consume(I),C.exit("lineEnding"),W}function W(I){return C.enter("codeFencedFence"),re(I)?oe(C,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):j(I)}function j(I){return I===a?(C.enter("codeFencedFenceSequence"),N(I)):V(I)}function N(I){return I===a?($++,C.consume(I),N):$>=s?(C.exit("codeFencedFenceSequence"),re(I)?oe(C,z,"whitespace")(I):z(I)):V(I)}function z(I){return I===null||J(I)?(C.exit("codeFencedFence"),R(I)):V(I)}}}function tA(t,e,n){let r=this;return o;function o(s){return s===null?n(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):e(s)}}var Bw,gl,Fw=F(()=>{Je();Me();Bw={partial:!0,tokenize:tA},gl={concrete:!0,name:"codeFenced",tokenize:eA}});function rA(t,e,n){let r=this;return o;function o(c){return t.enter("codeIndented"),oe(t,i,"linePrefix",5)(c)}function i(c){let u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?l(c):J(c)?t.attempt(nA,s,l)(c):(t.enter("codeFlowValue"),a(c))}function a(c){return c===null||J(c)?(t.exit("codeFlowValue"),s(c)):(t.consume(c),a)}function l(c){return t.exit("codeIndented"),e(c)}}function oA(t,e,n){let r=this;return o;function o(s){return r.parser.lazy[r.now().line]?n(s):J(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):oe(t,i,"linePrefix",5)(s)}function i(s){let a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):J(s)?o(s):n(s)}}var ts,nA,Vw=F(()=>{Je();Me();ts={name:"codeIndented",tokenize:rA},nA={partial:!0,tokenize:oA}});function iA(t){let e=t.length-4,n=3,r,o;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)o===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(o=r):(r===e||t[r][1].type==="lineEnding")&&(t[o][1].type="codeTextData",r!==o+2&&(t[o][1].end=t[r-1][1].end,t.splice(o+2,r-o-2),e-=r-o-2,r=o+2),o=void 0);return t}function sA(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function aA(t,e,n){let r=this,o=0,i,s;return a;function a(f){return t.enter("codeText"),t.enter("codeTextSequence"),l(f)}function l(f){return f===96?(t.consume(f),o++,l):(t.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(t.enter("space"),t.consume(f),t.exit("space"),c):f===96?(s=t.enter("codeTextSequence"),i=0,d(f)):J(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),c):(t.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||J(f)?(t.exit("codeTextData"),c(f)):(t.consume(f),u)}function d(f){return f===96?(t.consume(f),i++,d):i===o?(t.exit("codeTextSequence"),t.exit("codeText"),e(f)):(s.type="codeTextData",u(f))}}var fp,Hw=F(()=>{Me();fp={name:"codeText",previous:sA,resolve:iA,tokenize:aA}});function ns(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}var yl,Zw=F(()=>{yl=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){let r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){let o=n||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ns(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),ns(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ns(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let n=this.left.splice(e,Number.POSITIVE_INFINITY);ns(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);ns(this.left,n.reverse())}}}});function xl(t){let e={},n=-1,r,o,i,s,a,l,c,u=new yl(t);for(;++n<u.length;){for(;n in e;)n=e[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,lA(u,n)),n=e[n],c=!0);else if(r[1]._container){for(i=n,o=void 0;i--;)if(s=u.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(o&&(u.get(o)[1].type="lineEndingBlank"),s[1].type="lineEnding",o=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;o&&(r[1].end={...u.get(o)[1].start},a=u.slice(o,n),a.unshift(r),u.splice(o,n-o+1,a))}}return ot(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function lA(t,e){let n=t.get(e)[1],r=t.get(e)[2],o=e-1,i=[],s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let a=s.events,l=[],c={},u,d,f=-1,p=n,h=0,m=0,g=[m];for(;p;){for(;t.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let y=a.slice(g[f],g[f+1]),E=i.pop();l.push([E,E+y.length-1]),t.splice(E,2,y)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}var hp=F(()=>{Jn();Zw()});function uA(t){return xl(t),t}function dA(t,e){let n;return r;function r(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),o(a)}function o(a){return a===null?i(a):J(a)?t.check(cA,s,i)(a):(t.consume(a),o)}function i(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function s(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function pA(t,e,n){let r=this;return o;function o(s){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),oe(t,i,"linePrefix")}function i(s){if(s===null||J(s))return n(s);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):t.interrupt(r.parser.constructs.flow,n,e)(s)}}var mp,cA,jw=F(()=>{Je();Me();hp();mp={resolve:uA,tokenize:dA},cA={partial:!0,tokenize:pA}});function bl(t,e,n,r,o,i,s,a,l){let c=l||Number.POSITIVE_INFINITY,u=0;return d;function d(y){return y===60?(t.enter(r),t.enter(o),t.enter(i),t.consume(y),t.exit(i),f):y===null||y===32||y===41||Xi(y)?n(y):(t.enter(r),t.enter(s),t.enter(a),t.enter("chunkString",{contentType:"string"}),m(y))}function f(y){return y===62?(t.enter(i),t.consume(y),t.exit(i),t.exit(o),t.exit(r),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(t.exit("chunkString"),t.exit(a),f(y)):y===null||y===60||J(y)?n(y):(t.consume(y),y===92?h:p)}function h(y){return y===60||y===62||y===92?(t.consume(y),p):p(y)}function m(y){return!u&&(y===null||y===41||Ve(y))?(t.exit("chunkString"),t.exit(a),t.exit(s),t.exit(r),e(y)):u<c&&y===40?(t.consume(y),u++,m):y===41?(t.consume(y),u--,m):y===null||y===32||y===40||Xi(y)?n(y):(t.consume(y),y===92?g:m)}function g(y){return y===40||y===41||y===92?(t.consume(y),m):m(y)}}var gp=F(()=>{Me()});function wl(t,e,n,r,o,i){let s=this,a=0,l;return c;function c(p){return t.enter(r),t.enter(o),t.consume(p),t.exit(o),t.enter(i),u}function u(p){return a>999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(t.exit(i),t.enter(o),t.consume(p),t.exit(o),t.exit(r),e):J(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||J(p)||a++>999?(t.exit("chunkString"),u(p)):(t.consume(p),l||(l=!re(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(t.consume(p),a++,d):d(p)}}var yp=F(()=>{Me()});function Sl(t,e,n,r,o,i){let s;return a;function a(f){return f===34||f===39||f===40?(t.enter(r),t.enter(o),t.consume(f),t.exit(o),s=f===40?41:f,l):n(f)}function l(f){return f===s?(t.enter(o),t.consume(f),t.exit(o),t.exit(r),e):(t.enter(i),c(f))}function c(f){return f===s?(t.exit(i),l(s)):f===null?n(f):J(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),oe(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===s||f===null||J(f)?(t.exit("chunkString"),c(f)):(t.consume(f),f===92?d:u)}function d(f){return f===s||f===92?(t.consume(f),u):u(f)}}var xp=F(()=>{Je();Me()});function Lr(t,e){let n;return r;function r(o){return J(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),n=!0,r):re(o)?oe(t,r,n?"linePrefix":"lineSuffix")(o):e(o)}}var bp=F(()=>{Je();Me()});function hA(t,e,n){let r=this,o;return i;function i(p){return t.enter("definition"),s(p)}function s(p){return wl.call(r,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return o=Mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),l):n(p)}function l(p){return Ve(p)?Lr(t,c)(p):c(p)}function c(p){return bl(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return t.attempt(fA,d,d)(p)}function d(p){return re(p)?oe(t,f,"whitespace")(p):f(p)}function f(p){return p===null||J(p)?(t.exit("definition"),r.parser.defined.push(o),e(p)):n(p)}}function mA(t,e,n){return r;function r(a){return Ve(a)?Lr(t,o)(a):n(a)}function o(a){return Sl(t,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return re(a)?oe(t,s,"whitespace")(a):s(a)}function s(a){return a===null||J(a)?e(a):n(a)}}var wp,fA,Uw=F(()=>{gp();yp();Je();xp();bp();Me();ul();wp={name:"definition",tokenize:hA},fA={partial:!0,tokenize:mA}});function gA(t,e,n){return r;function r(i){return t.enter("hardBreakEscape"),t.consume(i),o}function o(i){return J(i)?(t.exit("hardBreakEscape"),e(i)):n(i)}}var Sp,Kw=F(()=>{Me();Sp={name:"hardBreakEscape",tokenize:gA}});function yA(t,e){let n=t.length-2,r=3,o,i;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},i={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},ot(t,r,n-r+1,[["enter",o,e],["enter",i,e],["exit",i,e],["exit",o,e]])),t}function xA(t,e,n){let r=0;return o;function o(u){return t.enter("atxHeading"),i(u)}function i(u){return t.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&r++<6?(t.consume(u),s):u===null||Ve(u)?(t.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||J(u)?(t.exit("atxHeading"),e(u)):re(u)?oe(t,a,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||Ve(u)?(t.exit("atxHeadingText"),a(u)):(t.consume(u),c)}}var kp,Ww=F(()=>{Je();Me();Jn();kp={name:"headingAtx",resolve:yA,tokenize:xA}});var qw,vp,Jw=F(()=>{qw=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],vp=["pre","script","style","textarea"]});function SA(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function kA(t,e,n){let r=this,o,i,s,a,l;return c;function c(k){return u(k)}function u(k){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(k),d}function d(k){return k===33?(t.consume(k),f):k===47?(t.consume(k),i=!0,m):k===63?(t.consume(k),o=3,r.interrupt?e:w):Lt(k)?(t.consume(k),s=String.fromCharCode(k),g):n(k)}function f(k){return k===45?(t.consume(k),o=2,p):k===91?(t.consume(k),o=5,a=0,h):Lt(k)?(t.consume(k),o=4,r.interrupt?e:w):n(k)}function p(k){return k===45?(t.consume(k),r.interrupt?e:w):n(k)}function h(k){let De="CDATA[";return k===De.charCodeAt(a++)?(t.consume(k),a===De.length?r.interrupt?e:j:h):n(k)}function m(k){return Lt(k)?(t.consume(k),s=String.fromCharCode(k),g):n(k)}function g(k){if(k===null||k===47||k===62||Ve(k)){let De=k===47,dt=s.toLowerCase();return!De&&!i&&vp.includes(dt)?(o=1,r.interrupt?e(k):j(k)):qw.includes(s.toLowerCase())?(o=6,De?(t.consume(k),y):r.interrupt?e(k):j(k)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):i?E(k):S(k))}return k===45||St(k)?(t.consume(k),s+=String.fromCharCode(k),g):n(k)}function y(k){return k===62?(t.consume(k),r.interrupt?e:j):n(k)}function E(k){return re(k)?(t.consume(k),E):O(k)}function S(k){return k===47?(t.consume(k),O):k===58||k===95||Lt(k)?(t.consume(k),M):re(k)?(t.consume(k),S):O(k)}function M(k){return k===45||k===46||k===58||k===95||St(k)?(t.consume(k),M):T(k)}function T(k){return k===61?(t.consume(k),C):re(k)?(t.consume(k),T):S(k)}function C(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(t.consume(k),l=k,R):re(k)?(t.consume(k),C):V(k)}function R(k){return k===l?(t.consume(k),l=null,$):k===null||J(k)?n(k):(t.consume(k),R)}function V(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||Ve(k)?T(k):(t.consume(k),V)}function $(k){return k===47||k===62||re(k)?S(k):n(k)}function O(k){return k===62?(t.consume(k),W):n(k)}function W(k){return k===null||J(k)?j(k):re(k)?(t.consume(k),W):n(k)}function j(k){return k===45&&o===2?(t.consume(k),ie):k===60&&o===1?(t.consume(k),H):k===62&&o===4?(t.consume(k),ue):k===63&&o===3?(t.consume(k),w):k===93&&o===5?(t.consume(k),K):J(k)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(bA,Ye,N)(k)):k===null||J(k)?(t.exit("htmlFlowData"),N(k)):(t.consume(k),j)}function N(k){return t.check(wA,z,Ye)(k)}function z(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),I}function I(k){return k===null||J(k)?N(k):(t.enter("htmlFlowData"),j(k))}function ie(k){return k===45?(t.consume(k),w):j(k)}function H(k){return k===47?(t.consume(k),s="",ce):j(k)}function ce(k){if(k===62){let De=s.toLowerCase();return vp.includes(De)?(t.consume(k),ue):j(k)}return Lt(k)&&s.length<8?(t.consume(k),s+=String.fromCharCode(k),ce):j(k)}function K(k){return k===93?(t.consume(k),w):j(k)}function w(k){return k===62?(t.consume(k),ue):k===45&&o===2?(t.consume(k),w):j(k)}function ue(k){return k===null||J(k)?(t.exit("htmlFlowData"),Ye(k)):(t.consume(k),ue)}function Ye(k){return t.exit("htmlFlow"),e(k)}}function vA(t,e,n){let r=this;return o;function o(s){return J(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):e(s)}}function EA(t,e,n){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(Yn,e,n)}}var Ep,bA,wA,Gw=F(()=>{Me();Jw();pl();Ep={concrete:!0,name:"htmlFlow",resolveTo:SA,tokenize:kA},bA={partial:!0,tokenize:EA},wA={partial:!0,tokenize:vA}});function CA(t,e,n){let r=this,o,i,s;return a;function a(w){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(w),l}function l(w){return w===33?(t.consume(w),c):w===47?(t.consume(w),T):w===63?(t.consume(w),S):Lt(w)?(t.consume(w),V):n(w)}function c(w){return w===45?(t.consume(w),u):w===91?(t.consume(w),i=0,h):Lt(w)?(t.consume(w),E):n(w)}function u(w){return w===45?(t.consume(w),p):n(w)}function d(w){return w===null?n(w):w===45?(t.consume(w),f):J(w)?(s=d,H(w)):(t.consume(w),d)}function f(w){return w===45?(t.consume(w),p):d(w)}function p(w){return w===62?ie(w):w===45?f(w):d(w)}function h(w){let ue="CDATA[";return w===ue.charCodeAt(i++)?(t.consume(w),i===ue.length?m:h):n(w)}function m(w){return w===null?n(w):w===93?(t.consume(w),g):J(w)?(s=m,H(w)):(t.consume(w),m)}function g(w){return w===93?(t.consume(w),y):m(w)}function y(w){return w===62?ie(w):w===93?(t.consume(w),y):m(w)}function E(w){return w===null||w===62?ie(w):J(w)?(s=E,H(w)):(t.consume(w),E)}function S(w){return w===null?n(w):w===63?(t.consume(w),M):J(w)?(s=S,H(w)):(t.consume(w),S)}function M(w){return w===62?ie(w):S(w)}function T(w){return Lt(w)?(t.consume(w),C):n(w)}function C(w){return w===45||St(w)?(t.consume(w),C):R(w)}function R(w){return J(w)?(s=R,H(w)):re(w)?(t.consume(w),R):ie(w)}function V(w){return w===45||St(w)?(t.consume(w),V):w===47||w===62||Ve(w)?$(w):n(w)}function $(w){return w===47?(t.consume(w),ie):w===58||w===95||Lt(w)?(t.consume(w),O):J(w)?(s=$,H(w)):re(w)?(t.consume(w),$):ie(w)}function O(w){return w===45||w===46||w===58||w===95||St(w)?(t.consume(w),O):W(w)}function W(w){return w===61?(t.consume(w),j):J(w)?(s=W,H(w)):re(w)?(t.consume(w),W):$(w)}function j(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(t.consume(w),o=w,N):J(w)?(s=j,H(w)):re(w)?(t.consume(w),j):(t.consume(w),z)}function N(w){return w===o?(t.consume(w),o=void 0,I):w===null?n(w):J(w)?(s=N,H(w)):(t.consume(w),N)}function z(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||Ve(w)?$(w):(t.consume(w),z)}function I(w){return w===47||w===62||Ve(w)?$(w):n(w)}function ie(w){return w===62?(t.consume(w),t.exit("htmlTextData"),t.exit("htmlText"),e):n(w)}function H(w){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),ce}function ce(w){return re(w)?oe(t,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):K(w)}function K(w){return t.enter("htmlTextData"),s(w)}}var Cp,Yw=F(()=>{Je();Me();Cp={name:"htmlText",tokenize:CA}});function _A(t){let e=-1,n=[];for(;++e<t.length;){let r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){let o=r.type==="labelImage"?4:2;r.type="data",e+=o}}return t.length!==n.length&&ot(t,0,t.length,n),t}function RA(t,e){let n=t.length,r=0,o,i,s,a;for(;n--;)if(o=t[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(s){if(t[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(s=n);let l={type:t[i][1].type==="labelLink"?"link":"image",start:{...t[i][1].start},end:{...t[t.length-1][1].end}},c={type:"label",start:{...t[i][1].start},end:{...t[s][1].end}},u={type:"labelText",start:{...t[i+r+2][1].end},end:{...t[s-2][1].start}};return a=[["enter",l,e],["enter",c,e]],a=wt(a,t.slice(i+1,i+r+3)),a=wt(a,[["enter",u,e]]),a=wt(a,$o(e.parser.constructs.insideSpan.null,t.slice(i+r+4,s-3),e)),a=wt(a,[["exit",u,e],t[s-2],t[s-1],["exit",c,e]]),a=wt(a,t.slice(s+1)),a=wt(a,[["exit",l,e]]),ot(t,i,t.length,a),t}function AA(t,e,n){let r=this,o=r.events.length,i,s;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return a;function a(f){return i?i._inactive?d(f):(s=r.parser.defined.includes(Mn(r.sliceSerialize({start:i.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(f),t.exit("labelMarker"),t.exit("labelEnd"),l):n(f)}function l(f){return f===40?t.attempt(TA,u,s?u:d)(f):f===91?t.attempt(MA,u,s?c:d)(f):s?u(f):d(f)}function c(f){return t.attempt(PA,u,d)(f)}function u(f){return e(f)}function d(f){return i._balanced=!0,n(f)}}function NA(t,e,n){return r;function r(d){return t.enter("resource"),t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),o}function o(d){return Ve(d)?Lr(t,i)(d):i(d)}function i(d){return d===41?u(d):bl(t,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return Ve(d)?Lr(t,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?Sl(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Ve(d)?Lr(t,u)(d):u(d)}function u(d){return d===41?(t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),t.exit("resource"),e):n(d)}}function OA(t,e,n){let r=this;return o;function o(a){return wl.call(r,t,i,s,"reference","referenceMarker","referenceString")(a)}function i(a){return r.parser.defined.includes(Mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function s(a){return n(a)}}function IA(t,e,n){return r;function r(i){return t.enter("reference"),t.enter("referenceMarker"),t.consume(i),t.exit("referenceMarker"),o}function o(i){return i===93?(t.enter("referenceMarker"),t.consume(i),t.exit("referenceMarker"),t.exit("reference"),e):n(i)}}var $r,TA,MA,PA,kl=F(()=>{gp();yp();xp();bp();Me();Jn();ul();dl();$r={name:"labelEnd",resolveAll:_A,resolveTo:RA,tokenize:AA},TA={tokenize:NA},MA={tokenize:OA},PA={tokenize:IA}});function DA(t,e,n){let r=this;return o;function o(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),i}function i(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):e(a)}}var Tp,Xw=F(()=>{kl();Tp={name:"labelStartImage",resolveAll:$r.resolveAll,tokenize:DA}});function zA(t,e,n){let r=this;return o;function o(s){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):e(s)}}var Mp,Qw=F(()=>{kl();Mp={name:"labelStartLink",resolveAll:$r.resolveAll,tokenize:zA}});function LA(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),oe(t,e,"linePrefix")}}var rs,eS=F(()=>{Je();rs={name:"lineEnding",tokenize:LA}});function $A(t,e,n){let r=0,o;return i;function i(c){return t.enter("thematicBreak"),s(c)}function s(c){return o=c,a(c)}function a(c){return c===o?(t.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||J(c))?(t.exit("thematicBreak"),e(c)):n(c)}function l(c){return c===o?(t.consume(c),r++,l):(t.exit("thematicBreakSequence"),re(c)?oe(t,a,"whitespace")(c):a(c))}}var Br,Pp=F(()=>{Je();Me();Br={name:"thematicBreak",tokenize:$A}});function VA(t,e,n){let r=this,o=r.events[r.events.length-1],i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,s=0;return a;function a(p){let h=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Qi(p)){if(r.containerState.type||(r.containerState.type=h,t.enter(h,{_container:!0})),h==="listUnordered")return t.enter("listItemPrefix"),p===42||p===45?t.check(Br,n,c)(p):c(p);if(!r.interrupt||p===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(p)}return n(p)}function l(p){return Qi(p)&&++s<10?(t.consume(p),l):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(t.exit("listItemValue"),c(p)):n(p)}function c(p){return t.enter("listItemMarker"),t.consume(p),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,t.check(Yn,r.interrupt?n:u,t.attempt(BA,f,d))}function u(p){return r.containerState.initialBlankLine=!0,i++,f(p)}function d(p){return re(p)?(t.enter("listItemPrefixWhitespace"),t.consume(p),t.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=i+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(p)}}function HA(t,e,n){let r=this;return r.containerState._closeFlow=void 0,t.check(Yn,o,i);function o(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,oe(t,e,"listItemIndent",r.containerState.size+1)(a)}function i(a){return r.containerState.furtherBlankLines||!re(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(FA,e,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,oe(t,t.attempt(ut,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ZA(t,e,n){let r=this;return oe(t,o,"listItemIndent",r.containerState.size+1);function o(i){let s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?e(i):n(i)}}function jA(t){t.exit(this.containerState.type)}function UA(t,e,n){let r=this;return oe(t,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){let s=r.events[r.events.length-1];return!re(i)&&s&&s[1].type==="listItemPrefixWhitespace"?e(i):n(i)}}var ut,BA,FA,tS=F(()=>{Je();Me();pl();Pp();ut={continuation:{tokenize:HA},exit:jA,name:"list",tokenize:VA},BA={partial:!0,tokenize:UA},FA={partial:!0,tokenize:ZA}});function KA(t,e){let n=t.length,r,o,i;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(o=n)}else t[n][1].type==="content"&&t.splice(n,1),!i&&t[n][1].type==="definition"&&(i=n);let s={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",i?(t.splice(o,0,["enter",s,e]),t.splice(i+1,0,["exit",t[r][1],e]),t[r][1].end={...t[i][1].end}):t[r][1]=s,t.push(["exit",s,e]),t}function WA(t,e,n){let r=this,o;return i;function i(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(t.enter("setextHeadingLine"),o=c,s(c)):n(c)}function s(c){return t.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===o?(t.consume(c),a):(t.exit("setextHeadingLineSequence"),re(c)?oe(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||J(c)?(t.exit("setextHeadingLine"),e(c)):n(c)}}var vl,nS=F(()=>{Je();Me();vl={name:"setextUnderline",resolveTo:KA,tokenize:WA}});var _p=F(()=>{Iw();Dw();pl();zw();Lw();$w();Fw();Vw();Hw();jw();Uw();Kw();Ww();Gw();Yw();kl();Xw();Qw();eS();tS();nS();Pp()});function qA(t){let e=this,n=t.attempt(Yn,r,t.attempt(this.parser.constructs.flowInitial,o,oe(t,t.attempt(this.parser.constructs.flow,o,t.attempt(mp,o)),"linePrefix")));return n;function r(i){if(i===null){t.consume(i);return}return t.enter("lineEndingBlank"),t.consume(i),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function o(i){if(i===null){t.consume(i);return}return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),e.currentConstruct=void 0,n}}var rS,oS=F(()=>{_p();Je();rS={tokenize:qA}});function lS(t){return{resolveAll:cS(t==="text"?JA:void 0),tokenize:e};function e(n){let r=this,o=this.parser.constructs[t],i=n.attempt(o,s,a);return s;function s(u){return c(u)?i(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;let d=o[u],f=-1;if(d)for(;++f<d.length;){let p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function cS(t){return e;function e(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return t?t(n,r):n}}function JA(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){let r=t[n-1][1],o=e.sliceStream(r),i=o.length,s=-1,a=0,l;for(;i--;){let c=o[i];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(c===-2)l=!0,a++;else if(c!==-1){i++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(a=0),a){let c={type:n===t.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(t.splice(n,0,["enter",c,e],["exit",c,e]),n+=2)}n++}return t}var iS,sS,aS,Rp=F(()=>{iS={resolveAll:cS()},sS=lS("string"),aS=lS("text")});var Ap={};fc(Ap,{attentionMarkers:()=>rN,contentInitial:()=>YA,disable:()=>oN,document:()=>GA,flow:()=>QA,flowInitial:()=>XA,insideSpan:()=>nN,string:()=>eN,text:()=>tN});var GA,YA,XA,QA,eN,tN,nN,rN,oN,uS=F(()=>{_p();Rp();GA={42:ut,43:ut,45:ut,48:ut,49:ut,50:ut,51:ut,52:ut,53:ut,54:ut,55:ut,56:ut,57:ut,62:fl},YA={91:wp},XA={[-2]:ts,[-1]:ts,32:ts},QA={35:kp,42:Br,45:[vl,Br],60:Ep,61:vl,95:Br,96:gl,126:gl},eN={38:ml,92:hl},tN={[-5]:rs,[-4]:rs,[-3]:rs,33:Tp,38:ml,42:es,60:[pp,Cp],91:Mp,92:[Sp,hl],93:$r,95:es,96:fp},nN={null:[es,iS]},rN={null:[42,95]},oN={null:[]}});function dS(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},o={},i=[],s=[],a=[],l=!0,c={attempt:$(R),check:$(V),consume:M,enter:T,exit:C,interrupt:$(V,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:g,parser:t,previous:null,sliceSerialize:h,sliceStream:m,write:p},d=e.tokenize.call(u,c),f;return e.resolveAll&&i.push(e),u;function p(N){return s=wt(s,N),E(),s[s.length-1]!==null?[]:(O(e,0),u.events=$o(i,u.events,u),u.events)}function h(N,z){return sN(m(N),z)}function m(N){return iN(s,N)}function g(){let{_bufferIndex:N,_index:z,line:I,column:ie,offset:H}=r;return{_bufferIndex:N,_index:z,line:I,column:ie,offset:H}}function y(N){o[N.line]=N.column,j()}function E(){let N;for(;r._index<s.length;){let z=s[r._index];if(typeof z=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<z.length;)S(z.charCodeAt(r._bufferIndex));else S(z)}}function S(N){l=void 0,f=N,d=d(N)}function M(N){J(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,j()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=N,l=!0}function T(N,z){let I=z||{};return I.type=N,I.start=g(),u.events.push(["enter",I,u]),a.push(I),I}function C(N){let z=a.pop();return z.end=g(),u.events.push(["exit",z,u]),z}function R(N,z){O(N,z.from)}function V(N,z){z.restore()}function $(N,z){return I;function I(ie,H,ce){let K,w,ue,Ye;return Array.isArray(ie)?De(ie):"tokenize"in ie?De([ie]):k(ie);function k(me){return kt;function kt(Re){let vt=Re!==null&&me[Re],ft=Re!==null&&me.null,pn=[...Array.isArray(vt)?vt:vt?[vt]:[],...Array.isArray(ft)?ft:ft?[ft]:[]];return De(pn)(Re)}}function De(me){return K=me,w=0,me.length===0?ce:dt(me[w])}function dt(me){return kt;function kt(Re){return Ye=W(),ue=me,me.partial||(u.currentConstruct=me),me.name&&u.parser.constructs.disable.null.includes(me.name)?pt(Re):me.tokenize.call(z?Object.assign(Object.create(u),z):u,c,qt,pt)(Re)}}function qt(me){return l=!0,N(ue,Ye),H}function pt(me){return l=!0,Ye.restore(),++w<K.length?dt(K[w]):ce}}}function O(N,z){N.resolveAll&&!i.includes(N)&&i.push(N),N.resolve&&ot(u.events,z,u.events.length-z,N.resolve(u.events.slice(z),u)),N.resolveTo&&(u.events=N.resolveTo(u.events,u))}function W(){let N=g(),z=u.previous,I=u.currentConstruct,ie=u.events.length,H=Array.from(a);return{from:ie,restore:ce};function ce(){r=N,u.previous=z,u.currentConstruct=I,u.events.length=ie,a=H,j()}}function j(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function iN(t,e){let n=e.start._index,r=e.start._bufferIndex,o=e.end._index,i=e.end._bufferIndex,s;if(n===o)s=[t[n].slice(r,i)];else{if(s=t.slice(n,o),r>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}i>0&&s.push(t[o].slice(0,i))}return s}function sN(t,e){let n=-1,r=[],o;for(;++n<t.length;){let i=t[n],s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
|
|
1
|
+
var yv=Object.create;var Ns=Object.defineProperty;var xv=Object.getOwnPropertyDescriptor;var bv=Object.getOwnPropertyNames;var wv=Object.getPrototypeOf,Sv=Object.prototype.hasOwnProperty;var F=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var ni=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(n){throw e=0,n}},fc=(t,e)=>{for(var n in e)Ns(t,n,{get:e[n],enumerable:!0})},Yf=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of bv(e))!Sv.call(t,o)&&o!==n&&Ns(t,o,{get:()=>e[o],enumerable:!(r=xv(e,o))||r.enumerable});return t};var Os=(t,e,n)=>(n=t!=null?yv(wv(t)):{},Yf(e||!t||!t.__esModule?Ns(n,"default",{value:t,enumerable:!0}):n,t)),Xf=t=>Yf(Ns({},"__esModule",{value:!0}),t);var Kt={};fc(Kt,{Activity:()=>uM,Children:()=>Pa,Component:()=>dM,Fragment:()=>Qu,Profiler:()=>pM,PureComponent:()=>fM,StrictMode:()=>hM,Suspense:()=>mM,act:()=>gM,cache:()=>yM,cacheSignal:()=>xM,captureOwnerStack:()=>bM,cloneElement:()=>Ai,createContext:()=>bt,createElement:()=>Ni,createRef:()=>ed,default:()=>Qt,forwardRef:()=>ze,isValidElement:()=>Eo,lazy:()=>wM,memo:()=>td,startTransition:()=>SM,unstable_useCacheRefresh:()=>kM,use:()=>vM,useActionState:()=>EM,useCallback:()=>Z,useContext:()=>Rt,useDebugValue:()=>Oi,useDeferredValue:()=>CM,useEffect:()=>Q,useEffectEvent:()=>TM,useId:()=>Ii,useImperativeHandle:()=>MM,useInsertionEffect:()=>PM,useLayoutEffect:()=>Te,useMemo:()=>$e,useOptimistic:()=>_M,useReducer:()=>RM,useRef:()=>L,useState:()=>Ce,useSyncExternalStore:()=>nd,useTransition:()=>AM,version:()=>_a});var Xu,Ma,Qt,uM,Pa,dM,Qu,pM,fM,hM,mM,gM,yM,xM,bM,Ai,bt,Ni,ed,ze,Eo,wM,td,SM,kM,vM,EM,Z,Rt,Oi,CM,Q,TM,Ii,MM,PM,Te,$e,_M,RM,L,Ce,nd,AM,_a,ye=F(()=>{Xu=globalThis.__bbPluginRuntime;if(Xu==null||Xu.react==null)throw new Error('Cannot load "react": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');Ma=Xu.react,Qt="default"in Ma?Ma.default:Ma,{Activity:uM,Children:Pa,Component:dM,Fragment:Qu,Profiler:pM,PureComponent:fM,StrictMode:hM,Suspense:mM,act:gM,cache:yM,cacheSignal:xM,captureOwnerStack:bM,cloneElement:Ai,createContext:bt,createElement:Ni,createRef:ed,forwardRef:ze,isValidElement:Eo,lazy:wM,memo:td,startTransition:SM,unstable_useCacheRefresh:kM,use:vM,useActionState:EM,useCallback:Z,useContext:Rt,useDebugValue:Oi,useDeferredValue:CM,useEffect:Q,useEffectEvent:TM,useId:Ii,useImperativeHandle:MM,useInsertionEffect:PM,useLayoutEffect:Te,useMemo:$e,useOptimistic:_M,useReducer:RM,useRef:L,useState:Ce,useSyncExternalStore:nd,useTransition:AM,version:_a}=Ma});var Ay=ni(Ry=>{"use strict";var Co=(ye(),Xf(Kt));function NM(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var OM=typeof Object.is=="function"?Object.is:NM,IM=Co.useState,DM=Co.useEffect,zM=Co.useLayoutEffect,LM=Co.useDebugValue;function $M(t,e){var n=e(),r=IM({inst:{value:n,getSnapshot:e}}),o=r[0].inst,i=r[1];return zM(function(){o.value=n,o.getSnapshot=e,od(o)&&i({inst:o})},[t,n,e]),DM(function(){return od(o)&&i({inst:o}),t(function(){od(o)&&i({inst:o})})},[t]),LM(n),n}function od(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!OM(t,n)}catch{return!0}}function BM(t,e){return e()}var FM=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?BM:$M;Ry.useSyncExternalStore=Co.useSyncExternalStore!==void 0?Co.useSyncExternalStore:FM});var Aa=ni((ML,Ny)=>{"use strict";Ny.exports=Ay()});var Vy=ni(Fy=>{"use strict";var Da=(ye(),Xf(Kt)),CP=Aa();function TP(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var MP=typeof Object.is=="function"?Object.is:TP,PP=CP.useSyncExternalStore,_P=Da.useRef,RP=Da.useEffect,AP=Da.useMemo,NP=Da.useDebugValue;Fy.useSyncExternalStoreWithSelector=function(t,e,n,r,o){var i=_P(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=AP(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&s.hasValue){var h=s.value;if(o(h,p))return d=h}return d=p}if(h=d,MP(u,p))return h;var m=r(p);return o!==void 0&&o(h,m)?(u=p,h):(u=p,d=m)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(e())},f===null?void 0:function(){return l(f())}]},[e,n,r,o]);var a=PP(t,i[0],i[1]);return RP(function(){s.hasValue=!0,s.value=a},[a]),NP(a),a}});var Zy=ni((BL,Hy)=>{"use strict";Hy.exports=Vy()});function qn({text:t,parseLink:e,offset:n=0,allowMarkdownSuffix:r=!0}){let o=[];for(let i of t.matchAll(/https?:\/\/[^\s<>"'`]+/giu)){let s=t[i.index-1];if(s!==void 0&&/[\p{Letter}\p{Number}_/@\\=+%:.-]/u.test(s))continue;let a=i[0].replace(r?/[.,;:!)\]}*_~\u2019\u201d\u2026\u3002\uff0c\uff01\uff1b\uff1a\uff1f]+$/u:/[.,;:!)\]}\u2019\u201d\u2026\u3002\uff0c\uff01\uff1b\uff1a\uff1f]+$/u,""),l=e(a);l!==null&&o.push({from:n+i.index,to:n+i.index+a.length,text:a,threadId:l.threadId,projectId:l.projectId})}return o}var al=F(()=>{"use strict"});function cp(t,e){let n=e||$R,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return mw(t,r,o)}function mw(t,e,n){if(BR(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return hw(t.children,e,n)}return Array.isArray(t)?hw(t,e,n):""}function hw(t,e,n){let r=[],o=-1;for(;++o<t.length;)r[o]=mw(t[o],e,n);return r.join("")}function BR(t){return!!(t&&typeof t=="object")}var $R,gw=F(()=>{$R={}});var yw=F(()=>{gw()});function Lo(t){let e="&"+t+";";xw.innerHTML=e;let n=xw.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}var xw,ll=F(()=>{xw=document.createElement("i")});function ot(t,e,n,r){let o=t.length,i=0,s;if(e<0?e=-e>o?0:o+e:e=e>o?o:e,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(e,n),t.splice(...s);else for(n&&t.splice(e,n);i<r.length;)s=r.slice(i,i+1e4),s.unshift(e,0),t.splice(...s),i+=1e4,e+=1e4}function wt(t,e){return t.length>0?(ot(t,t.length,0,e),t):e}var Jn=F(()=>{});function ww(t){let e={},n=-1;for(;++n<t.length;)FR(e,t[n]);return e}function FR(t,e){let n;for(n in e){let o=(bw.call(t,n)?t[n]:void 0)||(t[n]={}),i=e[n],s;if(i)for(s in i){bw.call(o,s)||(o[s]=[]);let a=i[s];VR(o[s],Array.isArray(a)?a:a?[a]:[])}}}function VR(t,e){let n=-1,r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);ot(t,0,0,r)}var bw,Sw=F(()=>{Jn();bw={}.hasOwnProperty});function cl(t,e){let n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}var up=F(()=>{});function Mn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var ul=F(()=>{});function Xi(t){return t!==null&&(t<32||t===127)}function J(t){return t!==null&&t<-2}function Ve(t){return t!==null&&(t<0||t===32)}function re(t){return t===-2||t===-1||t===32}function Gn(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}var Lt,St,kw,Qi,vw,Ew,Cw,Tw,Me=F(()=>{Lt=Gn(/[A-Za-z]/),St=Gn(/[\dA-Za-z]/),kw=Gn(/[#-'*+\--9=?A-Z^-~]/);Qi=Gn(/\d/),vw=Gn(/[\dA-Fa-f]/),Ew=Gn(/[!-/:-@[-`{-~]/);Cw=Gn(/\p{P}|\p{S}/u),Tw=Gn(/\s/)});function oe(t,e,n,r){let o=r?r-1:Number.POSITIVE_INFINITY,i=0;return s;function s(l){return re(l)?(t.enter(n),a(l)):e(l)}function a(l){return re(l)&&i++<o?(t.consume(l),a):(t.exit(n),e(l))}}var Je=F(()=>{Me()});function HR(t){let e=t.attempt(this.parser.constructs.contentInitial,r,o),n;return e;function r(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),oe(t,e,"linePrefix")}function o(a){return t.enter("paragraph"),i(a)}function i(a){let l=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,s(a)}function s(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return J(a)?(t.consume(a),t.exit("chunkText"),i):(t.consume(a),s)}}var Mw,Pw=F(()=>{Je();Me();Mw={tokenize:HR}});function ZR(t){let e=this,n=[],r=0,o,i,s;return a;function a(S){if(r<n.length){let M=n[r];return e.containerState=M[1],t.attempt(M[0].continuation,l,c)(S)}return c(S)}function l(S){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,o&&E();let M=e.events.length,T=M,C;for(;T--;)if(e.events[T][0]==="exit"&&e.events[T][1].type==="chunkFlow"){C=e.events[T][1].end;break}y(r);let R=M;for(;R<e.events.length;)e.events[R][1].end={...C},R++;return ot(e.events,T+1,0,e.events.slice(M)),e.events.length=R,c(S)}return a(S)}function c(S){if(r===n.length){if(!o)return f(S);if(o.currentConstruct&&o.currentConstruct.concrete)return h(S);e.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(_w,u,d)(S)}function u(S){return o&&E(),y(r),f(S)}function d(S){return e.parser.lazy[e.now().line]=r!==n.length,s=e.now().offset,h(S)}function f(S){return e.containerState={},t.attempt(_w,p,h)(S)}function p(S){return r++,n.push([e.currentConstruct,e.containerState]),f(S)}function h(S){if(S===null){o&&E(),y(0),t.consume(S);return}return o=o||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),m(S)}function m(S){if(S===null){g(t.exit("chunkFlow"),!0),y(0),t.consume(S);return}return J(S)?(t.consume(S),g(t.exit("chunkFlow")),r=0,e.interrupt=void 0,a):(t.consume(S),m)}function g(S,M){let T=e.sliceStream(S);if(M&&T.push(null),S.previous=i,i&&(i.next=S),i=S,o.defineSkip(S.start),o.write(T),e.parser.lazy[S.start.line]){let C=o.events.length;for(;C--;)if(o.events[C][1].start.offset<s&&(!o.events[C][1].end||o.events[C][1].end.offset>s))return;let R=e.events.length,V=R,$,O;for(;V--;)if(e.events[V][0]==="exit"&&e.events[V][1].type==="chunkFlow"){if($){O=e.events[V][1].end;break}$=!0}for(y(r),C=R;C<e.events.length;)e.events[C][1].end={...O},C++;ot(e.events,V+1,0,e.events.slice(R)),e.events.length=C}}function y(S){let M=n.length;for(;M-- >S;){let T=n[M];e.containerState=T[1],T[0].exit.call(e,t)}n.length=S}function E(){o.write([null]),i=void 0,o=void 0,e.containerState._closeFlow=void 0}}function jR(t,e,n){return oe(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var Rw,_w,Aw=F(()=>{Je();Me();Jn();Rw={tokenize:ZR},_w={tokenize:jR}});function dp(t){if(t===null||Ve(t)||Tw(t))return 1;if(Cw(t))return 2}var Nw=F(()=>{Me()});function $o(t,e,n){let r=[],o=-1;for(;++o<t.length;){let i=t[o].resolveAll;i&&!r.includes(i)&&(e=i(e,n),r.push(i))}return e}var dl=F(()=>{});function UR(t,e){let n=-1,r,o,i,s,a,l,c,u;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;let d={...t[r][1].end},f={...t[n][1].start};Ow(d,-l),Ow(f,l),s={type:l>1?"strongSequence":"emphasisSequence",start:d,end:{...t[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:f},i={type:l>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},o={type:l>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},t[r][1].end={...s.start},t[n][1].start={...a.end},c=[],t[r][1].end.offset-t[r][1].start.offset&&(c=wt(c,[["enter",t[r][1],e],["exit",t[r][1],e]])),c=wt(c,[["enter",o,e],["enter",s,e],["exit",s,e],["enter",i,e]]),c=wt(c,$o(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),c=wt(c,[["exit",i,e],["enter",a,e],["exit",a,e],["exit",o,e]]),t[n][1].end.offset-t[n][1].start.offset?(u=2,c=wt(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,ot(t,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function KR(t,e){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=dp(r),i;return s;function s(l){return i=l,t.enter("attentionSequence"),a(l)}function a(l){if(l===i)return t.consume(l),a;let c=t.exit("attentionSequence"),u=dp(l),d=!u||u===2&&o||n.includes(l),f=!o||o===2&&u||n.includes(r);return c._open=!!(i===42?d:d&&(o||!f)),c._close=!!(i===42?f:f&&(u||!d)),e(l)}}function Ow(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}var es,Iw=F(()=>{Jn();Nw();dl();es={name:"attention",resolveAll:UR,tokenize:KR}});function WR(t,e,n){let r=0;return o;function o(p){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(p),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),i}function i(p){return Lt(p)?(t.consume(p),s):p===64?n(p):c(p)}function s(p){return p===43||p===45||p===46||St(p)?(r=1,a(p)):c(p)}function a(p){return p===58?(t.consume(p),r=0,l):(p===43||p===45||p===46||St(p))&&r++<32?(t.consume(p),a):(r=0,c(p))}function l(p){return p===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(p),t.exit("autolinkMarker"),t.exit("autolink"),e):p===null||p===32||p===60||Xi(p)?n(p):(t.consume(p),l)}function c(p){return p===64?(t.consume(p),u):kw(p)?(t.consume(p),c):n(p)}function u(p){return St(p)?d(p):n(p)}function d(p){return p===46?(t.consume(p),r=0,u):p===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(p),t.exit("autolinkMarker"),t.exit("autolink"),e):f(p)}function f(p){if((p===45||St(p))&&r++<63){let h=p===45?f:d;return t.consume(p),h}return n(p)}}var pp,Dw=F(()=>{Me();pp={name:"autolink",tokenize:WR}});function qR(t,e,n){return r;function r(i){return re(i)?oe(t,o,"linePrefix")(i):o(i)}function o(i){return i===null||J(i)?e(i):n(i)}}var Yn,pl=F(()=>{Je();Me();Yn={partial:!0,tokenize:qR}});function JR(t,e,n){let r=this;return o;function o(s){if(s===62){let a=r.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(s),t.exit("blockQuoteMarker"),i}return n(s)}function i(s){return re(s)?(t.enter("blockQuotePrefixWhitespace"),t.consume(s),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(s))}}function GR(t,e,n){let r=this;return o;function o(s){return re(s)?oe(t,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return t.attempt(fl,e,n)(s)}}function YR(t){t.exit("blockQuote")}var fl,zw=F(()=>{Je();Me();fl={continuation:{tokenize:GR},exit:YR,name:"blockQuote",tokenize:JR}});function XR(t,e,n){return r;function r(i){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(i),t.exit("escapeMarker"),o}function o(i){return Ew(i)?(t.enter("characterEscapeValue"),t.consume(i),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(i)}}var hl,Lw=F(()=>{Me();hl={name:"characterEscape",tokenize:XR}});function QR(t,e,n){let r=this,o=0,i,s;return a;function a(d){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),l}function l(d){return d===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(d),t.exit("characterReferenceMarkerNumeric"),c):(t.enter("characterReferenceValue"),i=31,s=St,u(d))}function c(d){return d===88||d===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(d),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),i=6,s=vw,u):(t.enter("characterReferenceValue"),i=7,s=Qi,u(d))}function u(d){if(d===59&&o){let f=t.exit("characterReferenceValue");return s===St&&!Lo(r.sliceSerialize(f))?n(d):(t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return s(d)&&o++<i?(t.consume(d),u):n(d)}}var ml,$w=F(()=>{ll();Me();ml={name:"characterReference",tokenize:QR}});function eA(t,e,n){let r=this,o={partial:!0,tokenize:T},i=0,s=0,a;return l;function l(C){return c(C)}function c(C){let R=r.events[r.events.length-1];return i=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,a=C,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(C)}function u(C){return C===a?(s++,t.consume(C),u):s<3?n(C):(t.exit("codeFencedFenceSequence"),re(C)?oe(t,d,"whitespace")(C):d(C))}function d(C){return C===null||J(C)?(t.exit("codeFencedFence"),r.interrupt?e(C):t.check(Bw,m,M)(C)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),f(C))}function f(C){return C===null||J(C)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),d(C)):re(C)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),oe(t,p,"whitespace")(C)):C===96&&C===a?n(C):(t.consume(C),f)}function p(C){return C===null||J(C)?d(C):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||J(C)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),d(C)):C===96&&C===a?n(C):(t.consume(C),h)}function m(C){return t.attempt(o,M,g)(C)}function g(C){return t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),y}function y(C){return i>0&&re(C)?oe(t,E,"linePrefix",i+1)(C):E(C)}function E(C){return C===null||J(C)?t.check(Bw,m,M)(C):(t.enter("codeFlowValue"),S(C))}function S(C){return C===null||J(C)?(t.exit("codeFlowValue"),E(C)):(t.consume(C),S)}function M(C){return t.exit("codeFenced"),e(C)}function T(C,R,V){let $=0;return O;function O(I){return C.enter("lineEnding"),C.consume(I),C.exit("lineEnding"),W}function W(I){return C.enter("codeFencedFence"),re(I)?oe(C,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):j(I)}function j(I){return I===a?(C.enter("codeFencedFenceSequence"),N(I)):V(I)}function N(I){return I===a?($++,C.consume(I),N):$>=s?(C.exit("codeFencedFenceSequence"),re(I)?oe(C,z,"whitespace")(I):z(I)):V(I)}function z(I){return I===null||J(I)?(C.exit("codeFencedFence"),R(I)):V(I)}}}function tA(t,e,n){let r=this;return o;function o(s){return s===null?n(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):e(s)}}var Bw,gl,Fw=F(()=>{Je();Me();Bw={partial:!0,tokenize:tA},gl={concrete:!0,name:"codeFenced",tokenize:eA}});function rA(t,e,n){let r=this;return o;function o(c){return t.enter("codeIndented"),oe(t,i,"linePrefix",5)(c)}function i(c){let u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?l(c):J(c)?t.attempt(nA,s,l)(c):(t.enter("codeFlowValue"),a(c))}function a(c){return c===null||J(c)?(t.exit("codeFlowValue"),s(c)):(t.consume(c),a)}function l(c){return t.exit("codeIndented"),e(c)}}function oA(t,e,n){let r=this;return o;function o(s){return r.parser.lazy[r.now().line]?n(s):J(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):oe(t,i,"linePrefix",5)(s)}function i(s){let a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):J(s)?o(s):n(s)}}var ts,nA,Vw=F(()=>{Je();Me();ts={name:"codeIndented",tokenize:rA},nA={partial:!0,tokenize:oA}});function iA(t){let e=t.length-4,n=3,r,o;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)o===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(o=r):(r===e||t[r][1].type==="lineEnding")&&(t[o][1].type="codeTextData",r!==o+2&&(t[o][1].end=t[r-1][1].end,t.splice(o+2,r-o-2),e-=r-o-2,r=o+2),o=void 0);return t}function sA(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function aA(t,e,n){let r=this,o=0,i,s;return a;function a(f){return t.enter("codeText"),t.enter("codeTextSequence"),l(f)}function l(f){return f===96?(t.consume(f),o++,l):(t.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(t.enter("space"),t.consume(f),t.exit("space"),c):f===96?(s=t.enter("codeTextSequence"),i=0,d(f)):J(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),c):(t.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||J(f)?(t.exit("codeTextData"),c(f)):(t.consume(f),u)}function d(f){return f===96?(t.consume(f),i++,d):i===o?(t.exit("codeTextSequence"),t.exit("codeText"),e(f)):(s.type="codeTextData",u(f))}}var fp,Hw=F(()=>{Me();fp={name:"codeText",previous:sA,resolve:iA,tokenize:aA}});function ns(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}var yl,Zw=F(()=>{yl=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){let r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){let o=n||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ns(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),ns(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ns(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let n=this.left.splice(e,Number.POSITIVE_INFINITY);ns(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);ns(this.left,n.reverse())}}}});function xl(t){let e={},n=-1,r,o,i,s,a,l,c,u=new yl(t);for(;++n<u.length;){for(;n in e;)n=e[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,lA(u,n)),n=e[n],c=!0);else if(r[1]._container){for(i=n,o=void 0;i--;)if(s=u.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(o&&(u.get(o)[1].type="lineEndingBlank"),s[1].type="lineEnding",o=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;o&&(r[1].end={...u.get(o)[1].start},a=u.slice(o,n),a.unshift(r),u.splice(o,n-o+1,a))}}return ot(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function lA(t,e){let n=t.get(e)[1],r=t.get(e)[2],o=e-1,i=[],s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let a=s.events,l=[],c={},u,d,f=-1,p=n,h=0,m=0,g=[m];for(;p;){for(;t.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let y=a.slice(g[f],g[f+1]),E=i.pop();l.push([E,E+y.length-1]),t.splice(E,2,y)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}var hp=F(()=>{Jn();Zw()});function uA(t){return xl(t),t}function dA(t,e){let n;return r;function r(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),o(a)}function o(a){return a===null?i(a):J(a)?t.check(cA,s,i)(a):(t.consume(a),o)}function i(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function s(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function pA(t,e,n){let r=this;return o;function o(s){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),oe(t,i,"linePrefix")}function i(s){if(s===null||J(s))return n(s);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):t.interrupt(r.parser.constructs.flow,n,e)(s)}}var mp,cA,jw=F(()=>{Je();Me();hp();mp={resolve:uA,tokenize:dA},cA={partial:!0,tokenize:pA}});function bl(t,e,n,r,o,i,s,a,l){let c=l||Number.POSITIVE_INFINITY,u=0;return d;function d(y){return y===60?(t.enter(r),t.enter(o),t.enter(i),t.consume(y),t.exit(i),f):y===null||y===32||y===41||Xi(y)?n(y):(t.enter(r),t.enter(s),t.enter(a),t.enter("chunkString",{contentType:"string"}),m(y))}function f(y){return y===62?(t.enter(i),t.consume(y),t.exit(i),t.exit(o),t.exit(r),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===62?(t.exit("chunkString"),t.exit(a),f(y)):y===null||y===60||J(y)?n(y):(t.consume(y),y===92?h:p)}function h(y){return y===60||y===62||y===92?(t.consume(y),p):p(y)}function m(y){return!u&&(y===null||y===41||Ve(y))?(t.exit("chunkString"),t.exit(a),t.exit(s),t.exit(r),e(y)):u<c&&y===40?(t.consume(y),u++,m):y===41?(t.consume(y),u--,m):y===null||y===32||y===40||Xi(y)?n(y):(t.consume(y),y===92?g:m)}function g(y){return y===40||y===41||y===92?(t.consume(y),m):m(y)}}var gp=F(()=>{Me()});function wl(t,e,n,r,o,i){let s=this,a=0,l;return c;function c(p){return t.enter(r),t.enter(o),t.consume(p),t.exit(o),t.enter(i),u}function u(p){return a>999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(p):p===93?(t.exit(i),t.enter(o),t.consume(p),t.exit(o),t.exit(r),e):J(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||J(p)||a++>999?(t.exit("chunkString"),u(p)):(t.consume(p),l||(l=!re(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(t.consume(p),a++,d):d(p)}}var yp=F(()=>{Me()});function Sl(t,e,n,r,o,i){let s;return a;function a(f){return f===34||f===39||f===40?(t.enter(r),t.enter(o),t.consume(f),t.exit(o),s=f===40?41:f,l):n(f)}function l(f){return f===s?(t.enter(o),t.consume(f),t.exit(o),t.exit(r),e):(t.enter(i),c(f))}function c(f){return f===s?(t.exit(i),l(s)):f===null?n(f):J(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),oe(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===s||f===null||J(f)?(t.exit("chunkString"),c(f)):(t.consume(f),f===92?d:u)}function d(f){return f===s||f===92?(t.consume(f),u):u(f)}}var xp=F(()=>{Je();Me()});function Lr(t,e){let n;return r;function r(o){return J(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),n=!0,r):re(o)?oe(t,r,n?"linePrefix":"lineSuffix")(o):e(o)}}var bp=F(()=>{Je();Me()});function hA(t,e,n){let r=this,o;return i;function i(p){return t.enter("definition"),s(p)}function s(p){return wl.call(r,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return o=Mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),l):n(p)}function l(p){return Ve(p)?Lr(t,c)(p):c(p)}function c(p){return bl(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return t.attempt(fA,d,d)(p)}function d(p){return re(p)?oe(t,f,"whitespace")(p):f(p)}function f(p){return p===null||J(p)?(t.exit("definition"),r.parser.defined.push(o),e(p)):n(p)}}function mA(t,e,n){return r;function r(a){return Ve(a)?Lr(t,o)(a):n(a)}function o(a){return Sl(t,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return re(a)?oe(t,s,"whitespace")(a):s(a)}function s(a){return a===null||J(a)?e(a):n(a)}}var wp,fA,Uw=F(()=>{gp();yp();Je();xp();bp();Me();ul();wp={name:"definition",tokenize:hA},fA={partial:!0,tokenize:mA}});function gA(t,e,n){return r;function r(i){return t.enter("hardBreakEscape"),t.consume(i),o}function o(i){return J(i)?(t.exit("hardBreakEscape"),e(i)):n(i)}}var Sp,Kw=F(()=>{Me();Sp={name:"hardBreakEscape",tokenize:gA}});function yA(t,e){let n=t.length-2,r=3,o,i;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},i={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},ot(t,r,n-r+1,[["enter",o,e],["enter",i,e],["exit",i,e],["exit",o,e]])),t}function xA(t,e,n){let r=0;return o;function o(u){return t.enter("atxHeading"),i(u)}function i(u){return t.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&r++<6?(t.consume(u),s):u===null||Ve(u)?(t.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||J(u)?(t.exit("atxHeading"),e(u)):re(u)?oe(t,a,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||Ve(u)?(t.exit("atxHeadingText"),a(u)):(t.consume(u),c)}}var kp,Ww=F(()=>{Je();Me();Jn();kp={name:"headingAtx",resolve:yA,tokenize:xA}});var qw,vp,Jw=F(()=>{qw=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],vp=["pre","script","style","textarea"]});function SA(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function kA(t,e,n){let r=this,o,i,s,a,l;return c;function c(k){return u(k)}function u(k){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(k),d}function d(k){return k===33?(t.consume(k),f):k===47?(t.consume(k),i=!0,m):k===63?(t.consume(k),o=3,r.interrupt?e:w):Lt(k)?(t.consume(k),s=String.fromCharCode(k),g):n(k)}function f(k){return k===45?(t.consume(k),o=2,p):k===91?(t.consume(k),o=5,a=0,h):Lt(k)?(t.consume(k),o=4,r.interrupt?e:w):n(k)}function p(k){return k===45?(t.consume(k),r.interrupt?e:w):n(k)}function h(k){let De="CDATA[";return k===De.charCodeAt(a++)?(t.consume(k),a===De.length?r.interrupt?e:j:h):n(k)}function m(k){return Lt(k)?(t.consume(k),s=String.fromCharCode(k),g):n(k)}function g(k){if(k===null||k===47||k===62||Ve(k)){let De=k===47,dt=s.toLowerCase();return!De&&!i&&vp.includes(dt)?(o=1,r.interrupt?e(k):j(k)):qw.includes(s.toLowerCase())?(o=6,De?(t.consume(k),y):r.interrupt?e(k):j(k)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(k):i?E(k):S(k))}return k===45||St(k)?(t.consume(k),s+=String.fromCharCode(k),g):n(k)}function y(k){return k===62?(t.consume(k),r.interrupt?e:j):n(k)}function E(k){return re(k)?(t.consume(k),E):O(k)}function S(k){return k===47?(t.consume(k),O):k===58||k===95||Lt(k)?(t.consume(k),M):re(k)?(t.consume(k),S):O(k)}function M(k){return k===45||k===46||k===58||k===95||St(k)?(t.consume(k),M):T(k)}function T(k){return k===61?(t.consume(k),C):re(k)?(t.consume(k),T):S(k)}function C(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(t.consume(k),l=k,R):re(k)?(t.consume(k),C):V(k)}function R(k){return k===l?(t.consume(k),l=null,$):k===null||J(k)?n(k):(t.consume(k),R)}function V(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||Ve(k)?T(k):(t.consume(k),V)}function $(k){return k===47||k===62||re(k)?S(k):n(k)}function O(k){return k===62?(t.consume(k),W):n(k)}function W(k){return k===null||J(k)?j(k):re(k)?(t.consume(k),W):n(k)}function j(k){return k===45&&o===2?(t.consume(k),ie):k===60&&o===1?(t.consume(k),H):k===62&&o===4?(t.consume(k),ue):k===63&&o===3?(t.consume(k),w):k===93&&o===5?(t.consume(k),K):J(k)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(bA,Ye,N)(k)):k===null||J(k)?(t.exit("htmlFlowData"),N(k)):(t.consume(k),j)}function N(k){return t.check(wA,z,Ye)(k)}function z(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),I}function I(k){return k===null||J(k)?N(k):(t.enter("htmlFlowData"),j(k))}function ie(k){return k===45?(t.consume(k),w):j(k)}function H(k){return k===47?(t.consume(k),s="",ce):j(k)}function ce(k){if(k===62){let De=s.toLowerCase();return vp.includes(De)?(t.consume(k),ue):j(k)}return Lt(k)&&s.length<8?(t.consume(k),s+=String.fromCharCode(k),ce):j(k)}function K(k){return k===93?(t.consume(k),w):j(k)}function w(k){return k===62?(t.consume(k),ue):k===45&&o===2?(t.consume(k),w):j(k)}function ue(k){return k===null||J(k)?(t.exit("htmlFlowData"),Ye(k)):(t.consume(k),ue)}function Ye(k){return t.exit("htmlFlow"),e(k)}}function vA(t,e,n){let r=this;return o;function o(s){return J(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):e(s)}}function EA(t,e,n){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(Yn,e,n)}}var Ep,bA,wA,Gw=F(()=>{Me();Jw();pl();Ep={concrete:!0,name:"htmlFlow",resolveTo:SA,tokenize:kA},bA={partial:!0,tokenize:EA},wA={partial:!0,tokenize:vA}});function CA(t,e,n){let r=this,o,i,s;return a;function a(w){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(w),l}function l(w){return w===33?(t.consume(w),c):w===47?(t.consume(w),T):w===63?(t.consume(w),S):Lt(w)?(t.consume(w),V):n(w)}function c(w){return w===45?(t.consume(w),u):w===91?(t.consume(w),i=0,h):Lt(w)?(t.consume(w),E):n(w)}function u(w){return w===45?(t.consume(w),p):n(w)}function d(w){return w===null?n(w):w===45?(t.consume(w),f):J(w)?(s=d,H(w)):(t.consume(w),d)}function f(w){return w===45?(t.consume(w),p):d(w)}function p(w){return w===62?ie(w):w===45?f(w):d(w)}function h(w){let ue="CDATA[";return w===ue.charCodeAt(i++)?(t.consume(w),i===ue.length?m:h):n(w)}function m(w){return w===null?n(w):w===93?(t.consume(w),g):J(w)?(s=m,H(w)):(t.consume(w),m)}function g(w){return w===93?(t.consume(w),y):m(w)}function y(w){return w===62?ie(w):w===93?(t.consume(w),y):m(w)}function E(w){return w===null||w===62?ie(w):J(w)?(s=E,H(w)):(t.consume(w),E)}function S(w){return w===null?n(w):w===63?(t.consume(w),M):J(w)?(s=S,H(w)):(t.consume(w),S)}function M(w){return w===62?ie(w):S(w)}function T(w){return Lt(w)?(t.consume(w),C):n(w)}function C(w){return w===45||St(w)?(t.consume(w),C):R(w)}function R(w){return J(w)?(s=R,H(w)):re(w)?(t.consume(w),R):ie(w)}function V(w){return w===45||St(w)?(t.consume(w),V):w===47||w===62||Ve(w)?$(w):n(w)}function $(w){return w===47?(t.consume(w),ie):w===58||w===95||Lt(w)?(t.consume(w),O):J(w)?(s=$,H(w)):re(w)?(t.consume(w),$):ie(w)}function O(w){return w===45||w===46||w===58||w===95||St(w)?(t.consume(w),O):W(w)}function W(w){return w===61?(t.consume(w),j):J(w)?(s=W,H(w)):re(w)?(t.consume(w),W):$(w)}function j(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(t.consume(w),o=w,N):J(w)?(s=j,H(w)):re(w)?(t.consume(w),j):(t.consume(w),z)}function N(w){return w===o?(t.consume(w),o=void 0,I):w===null?n(w):J(w)?(s=N,H(w)):(t.consume(w),N)}function z(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||Ve(w)?$(w):(t.consume(w),z)}function I(w){return w===47||w===62||Ve(w)?$(w):n(w)}function ie(w){return w===62?(t.consume(w),t.exit("htmlTextData"),t.exit("htmlText"),e):n(w)}function H(w){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),ce}function ce(w){return re(w)?oe(t,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):K(w)}function K(w){return t.enter("htmlTextData"),s(w)}}var Cp,Yw=F(()=>{Je();Me();Cp={name:"htmlText",tokenize:CA}});function _A(t){let e=-1,n=[];for(;++e<t.length;){let r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){let o=r.type==="labelImage"?4:2;r.type="data",e+=o}}return t.length!==n.length&&ot(t,0,t.length,n),t}function RA(t,e){let n=t.length,r=0,o,i,s,a;for(;n--;)if(o=t[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(s){if(t[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(s=n);let l={type:t[i][1].type==="labelLink"?"link":"image",start:{...t[i][1].start},end:{...t[t.length-1][1].end}},c={type:"label",start:{...t[i][1].start},end:{...t[s][1].end}},u={type:"labelText",start:{...t[i+r+2][1].end},end:{...t[s-2][1].start}};return a=[["enter",l,e],["enter",c,e]],a=wt(a,t.slice(i+1,i+r+3)),a=wt(a,[["enter",u,e]]),a=wt(a,$o(e.parser.constructs.insideSpan.null,t.slice(i+r+4,s-3),e)),a=wt(a,[["exit",u,e],t[s-2],t[s-1],["exit",c,e]]),a=wt(a,t.slice(s+1)),a=wt(a,[["exit",l,e]]),ot(t,i,t.length,a),t}function AA(t,e,n){let r=this,o=r.events.length,i,s;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return a;function a(f){return i?i._inactive?d(f):(s=r.parser.defined.includes(Mn(r.sliceSerialize({start:i.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(f),t.exit("labelMarker"),t.exit("labelEnd"),l):n(f)}function l(f){return f===40?t.attempt(TA,u,s?u:d)(f):f===91?t.attempt(MA,u,s?c:d)(f):s?u(f):d(f)}function c(f){return t.attempt(PA,u,d)(f)}function u(f){return e(f)}function d(f){return i._balanced=!0,n(f)}}function NA(t,e,n){return r;function r(d){return t.enter("resource"),t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),o}function o(d){return Ve(d)?Lr(t,i)(d):i(d)}function i(d){return d===41?u(d):bl(t,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return Ve(d)?Lr(t,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?Sl(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Ve(d)?Lr(t,u)(d):u(d)}function u(d){return d===41?(t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),t.exit("resource"),e):n(d)}}function OA(t,e,n){let r=this;return o;function o(a){return wl.call(r,t,i,s,"reference","referenceMarker","referenceString")(a)}function i(a){return r.parser.defined.includes(Mn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function s(a){return n(a)}}function IA(t,e,n){return r;function r(i){return t.enter("reference"),t.enter("referenceMarker"),t.consume(i),t.exit("referenceMarker"),o}function o(i){return i===93?(t.enter("referenceMarker"),t.consume(i),t.exit("referenceMarker"),t.exit("reference"),e):n(i)}}var $r,TA,MA,PA,kl=F(()=>{gp();yp();xp();bp();Me();Jn();ul();dl();$r={name:"labelEnd",resolveAll:_A,resolveTo:RA,tokenize:AA},TA={tokenize:NA},MA={tokenize:OA},PA={tokenize:IA}});function DA(t,e,n){let r=this;return o;function o(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),i}function i(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):e(a)}}var Tp,Xw=F(()=>{kl();Tp={name:"labelStartImage",resolveAll:$r.resolveAll,tokenize:DA}});function zA(t,e,n){let r=this;return o;function o(s){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):e(s)}}var Mp,Qw=F(()=>{kl();Mp={name:"labelStartLink",resolveAll:$r.resolveAll,tokenize:zA}});function LA(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),oe(t,e,"linePrefix")}}var rs,eS=F(()=>{Je();rs={name:"lineEnding",tokenize:LA}});function $A(t,e,n){let r=0,o;return i;function i(c){return t.enter("thematicBreak"),s(c)}function s(c){return o=c,a(c)}function a(c){return c===o?(t.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||J(c))?(t.exit("thematicBreak"),e(c)):n(c)}function l(c){return c===o?(t.consume(c),r++,l):(t.exit("thematicBreakSequence"),re(c)?oe(t,a,"whitespace")(c):a(c))}}var Br,Pp=F(()=>{Je();Me();Br={name:"thematicBreak",tokenize:$A}});function VA(t,e,n){let r=this,o=r.events[r.events.length-1],i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,s=0;return a;function a(p){let h=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Qi(p)){if(r.containerState.type||(r.containerState.type=h,t.enter(h,{_container:!0})),h==="listUnordered")return t.enter("listItemPrefix"),p===42||p===45?t.check(Br,n,c)(p):c(p);if(!r.interrupt||p===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(p)}return n(p)}function l(p){return Qi(p)&&++s<10?(t.consume(p),l):(!r.interrupt||s<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(t.exit("listItemValue"),c(p)):n(p)}function c(p){return t.enter("listItemMarker"),t.consume(p),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,t.check(Yn,r.interrupt?n:u,t.attempt(BA,f,d))}function u(p){return r.containerState.initialBlankLine=!0,i++,f(p)}function d(p){return re(p)?(t.enter("listItemPrefixWhitespace"),t.consume(p),t.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=i+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(p)}}function HA(t,e,n){let r=this;return r.containerState._closeFlow=void 0,t.check(Yn,o,i);function o(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,oe(t,e,"listItemIndent",r.containerState.size+1)(a)}function i(a){return r.containerState.furtherBlankLines||!re(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(FA,e,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,oe(t,t.attempt(ut,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ZA(t,e,n){let r=this;return oe(t,o,"listItemIndent",r.containerState.size+1);function o(i){let s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?e(i):n(i)}}function jA(t){t.exit(this.containerState.type)}function UA(t,e,n){let r=this;return oe(t,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){let s=r.events[r.events.length-1];return!re(i)&&s&&s[1].type==="listItemPrefixWhitespace"?e(i):n(i)}}var ut,BA,FA,tS=F(()=>{Je();Me();pl();Pp();ut={continuation:{tokenize:HA},exit:jA,name:"list",tokenize:VA},BA={partial:!0,tokenize:UA},FA={partial:!0,tokenize:ZA}});function KA(t,e){let n=t.length,r,o,i;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(o=n)}else t[n][1].type==="content"&&t.splice(n,1),!i&&t[n][1].type==="definition"&&(i=n);let s={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",i?(t.splice(o,0,["enter",s,e]),t.splice(i+1,0,["exit",t[r][1],e]),t[r][1].end={...t[i][1].end}):t[r][1]=s,t.push(["exit",s,e]),t}function WA(t,e,n){let r=this,o;return i;function i(c){let u=r.events.length,d;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){d=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(t.enter("setextHeadingLine"),o=c,s(c)):n(c)}function s(c){return t.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===o?(t.consume(c),a):(t.exit("setextHeadingLineSequence"),re(c)?oe(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||J(c)?(t.exit("setextHeadingLine"),e(c)):n(c)}}var vl,nS=F(()=>{Je();Me();vl={name:"setextUnderline",resolveTo:KA,tokenize:WA}});var _p=F(()=>{Iw();Dw();pl();zw();Lw();$w();Fw();Vw();Hw();jw();Uw();Kw();Ww();Gw();Yw();kl();Xw();Qw();eS();tS();nS();Pp()});function qA(t){let e=this,n=t.attempt(Yn,r,t.attempt(this.parser.constructs.flowInitial,o,oe(t,t.attempt(this.parser.constructs.flow,o,t.attempt(mp,o)),"linePrefix")));return n;function r(i){if(i===null){t.consume(i);return}return t.enter("lineEndingBlank"),t.consume(i),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function o(i){if(i===null){t.consume(i);return}return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),e.currentConstruct=void 0,n}}var rS,oS=F(()=>{_p();Je();rS={tokenize:qA}});function lS(t){return{resolveAll:cS(t==="text"?JA:void 0),tokenize:e};function e(n){let r=this,o=this.parser.constructs[t],i=n.attempt(o,s,a);return s;function s(u){return c(u)?i(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;let d=o[u],f=-1;if(d)for(;++f<d.length;){let p=d[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function cS(t){return e;function e(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return t?t(n,r):n}}function JA(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){let r=t[n-1][1],o=e.sliceStream(r),i=o.length,s=-1,a=0,l;for(;i--;){let c=o[i];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(c===-2)l=!0,a++;else if(c!==-1){i++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(a=0),a){let c={type:n===t.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(t.splice(n,0,["enter",c,e],["exit",c,e]),n+=2)}n++}return t}var iS,sS,aS,Rp=F(()=>{iS={resolveAll:cS()},sS=lS("string"),aS=lS("text")});var Ap={};fc(Ap,{attentionMarkers:()=>rN,contentInitial:()=>YA,disable:()=>oN,document:()=>GA,flow:()=>QA,flowInitial:()=>XA,insideSpan:()=>nN,string:()=>eN,text:()=>tN});var GA,YA,XA,QA,eN,tN,nN,rN,oN,uS=F(()=>{_p();Rp();GA={42:ut,43:ut,45:ut,48:ut,49:ut,50:ut,51:ut,52:ut,53:ut,54:ut,55:ut,56:ut,57:ut,62:fl},YA={91:wp},XA={[-2]:ts,[-1]:ts,32:ts},QA={35:kp,42:Br,45:[vl,Br],60:Ep,61:vl,95:Br,96:gl,126:gl},eN={38:ml,92:hl},tN={[-5]:rs,[-4]:rs,[-3]:rs,33:Tp,38:ml,42:es,60:[pp,Cp],91:Mp,92:[Sp,hl],93:$r,95:es,96:fp},nN={null:[es,iS]},rN={null:[42,95]},oN={null:[]}});function dS(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},o={},i=[],s=[],a=[],l=!0,c={attempt:$(R),check:$(V),consume:M,enter:T,exit:C,interrupt:$(V,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:g,parser:t,previous:null,sliceSerialize:h,sliceStream:m,write:p},d=e.tokenize.call(u,c),f;return e.resolveAll&&i.push(e),u;function p(N){return s=wt(s,N),E(),s[s.length-1]!==null?[]:(O(e,0),u.events=$o(i,u.events,u),u.events)}function h(N,z){return sN(m(N),z)}function m(N){return iN(s,N)}function g(){let{_bufferIndex:N,_index:z,line:I,column:ie,offset:H}=r;return{_bufferIndex:N,_index:z,line:I,column:ie,offset:H}}function y(N){o[N.line]=N.column,j()}function E(){let N;for(;r._index<s.length;){let z=s[r._index];if(typeof z=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<z.length;)S(z.charCodeAt(r._bufferIndex));else S(z)}}function S(N){l=void 0,f=N,d=d(N)}function M(N){J(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,j()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=N,l=!0}function T(N,z){let I=z||{};return I.type=N,I.start=g(),u.events.push(["enter",I,u]),a.push(I),I}function C(N){let z=a.pop();return z.end=g(),u.events.push(["exit",z,u]),z}function R(N,z){O(N,z.from)}function V(N,z){z.restore()}function $(N,z){return I;function I(ie,H,ce){let K,w,ue,Ye;return Array.isArray(ie)?De(ie):"tokenize"in ie?De([ie]):k(ie);function k(me){return kt;function kt(Re){let vt=Re!==null&&me[Re],ft=Re!==null&&me.null,pn=[...Array.isArray(vt)?vt:vt?[vt]:[],...Array.isArray(ft)?ft:ft?[ft]:[]];return De(pn)(Re)}}function De(me){return K=me,w=0,me.length===0?ce:dt(me[w])}function dt(me){return kt;function kt(Re){return Ye=W(),ue=me,me.partial||(u.currentConstruct=me),me.name&&u.parser.constructs.disable.null.includes(me.name)?pt(Re):me.tokenize.call(z?Object.assign(Object.create(u),z):u,c,qt,pt)(Re)}}function qt(me){return l=!0,N(ue,Ye),H}function pt(me){return l=!0,Ye.restore(),++w<K.length?dt(K[w]):ce}}}function O(N,z){N.resolveAll&&!i.includes(N)&&i.push(N),N.resolve&&ot(u.events,z,u.events.length-z,N.resolve(u.events.slice(z),u)),N.resolveTo&&(u.events=N.resolveTo(u.events,u))}function W(){let N=g(),z=u.previous,I=u.currentConstruct,ie=u.events.length,H=Array.from(a);return{from:ie,restore:ce};function ce(){r=N,u.previous=z,u.currentConstruct=I,u.events.length=ie,a=H,j()}}function j(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function iN(t,e){let n=e.start._index,r=e.start._bufferIndex,o=e.end._index,i=e.end._bufferIndex,s;if(n===o)s=[t[n].slice(r,i)];else{if(s=t.slice(n,o),r>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}i>0&&s.push(t[o].slice(0,i))}return s}function sN(t,e){let n=-1,r=[],o;for(;++n<t.length;){let i=t[n],s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
|
|
2
2
|
`;break}case-3:{s=`\r
|
|
3
|
-
`;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&o)continue;s=" ";break}default:s=String.fromCharCode(i)}o=i===-2,r.push(s)}return r.join("")}var pS=F(()=>{Me();Jn();dl()});function Np(t){let r={constructs:ww([Ap,...(t||{}).extensions||[]]),content:o(Mw),defined:[],document:o(Rw),flow:o(rS),lazy:{},string:o(sS),text:o(aS)};return r;function o(i){return s;function s(a){return dS(r,i,a)}}}var fS=F(()=>{Sw();Pw();Aw();oS();Rp();uS();pS()});function Op(t){for(;!xl(t););return t}var hS=F(()=>{hp()});function Ip(){let t=1,e="",n=!0,r;return o;function o(i,s,a){let l=[],c,u,d,f,p;for(i=e+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),d=0,e="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(mS.lastIndex=d,c=mS.exec(i),f=c&&c.index!==void 0?c.index:i.length,p=i.charCodeAt(f),!c){e=i.slice(d);break}if(p===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(i.slice(d,f)),t+=f-d),p){case 0:{l.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,l.push(-2);t++<u;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:r=!0,t=1}d=f+1}return a&&(r&&l.push(-5),e&&l.push(e),l.push(null)),l}}var mS,gS=F(()=>{mS=/[\0\t\n\r]/g});var yS=F(()=>{fS();hS();gS()});function xS(t){return t.replace(aN,lN)}function lN(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){let o=n.charCodeAt(1),i=o===120||o===88;return cl(n.slice(i?2:1),i?16:10)}return Lo(n)||t}var aN,bS=F(()=>{ll();up();aN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});function Xn(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?wS(t.position):"start"in t||"end"in t?wS(t):"line"in t||"column"in t?Dp(t):""}function Dp(t){return SS(t&&t.line)+":"+SS(t&&t.column)}function wS(t){return Dp(t&&t.start)+"-"+Dp(t&&t.end)}function SS(t){return t&&typeof t=="number"?t:1}var kS=F(()=>{});var zp=F(()=>{kS()});function Lp(t,e,n){return typeof e!="string"&&(n=e,e=void 0),cN(n)(Op(Np(n).document().write(Ip()(t,e,!0))))}function cN(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(ds),autolinkProtocol:$,autolinkEmail:$,atxHeading:i(Se),blockQuote:i(Re),characterEscape:$,characterReference:$,codeFenced:i(vt),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(vt,s),codeText:i(ft,s),codeTextData:$,data:$,codeFlowValue:$,definition:i(pn),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(Zo),hardBreakEscape:i(jo),hardBreakTrailing:i(jo),htmlFlow:i(us,s),htmlFlowData:$,htmlText:i(us,s),htmlTextData:$,image:i(Fr),label:s,link:i(ds),listItem:i(fn),listItemValue:f,listOrdered:i(Vr,d),listUnordered:i(Vr),paragraph:i(Uo),reference:k,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(Se),strong:i(Hr),thematicBreak:i(de)},exit:{atxHeading:l(),atxHeadingSequence:T,autolink:l(),autolinkEmail:kt,autolinkProtocol:me,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:dt,characterReferenceMarkerNumeric:dt,characterReferenceValue:qt,characterReference:pt,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:O,codeIndented:l(y),codeText:l(I),codeTextData:O,data:O,definition:l(),definitionDestinationString:M,definitionLabelString:E,definitionTitleString:S,emphasis:l(),hardBreakEscape:l(j),hardBreakTrailing:l(j),htmlFlow:l(N),htmlFlowData:O,htmlText:l(z),htmlTextData:O,image:l(H),label:K,labelText:ce,lineEnding:W,link:l(ie),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:De,resourceDestinationString:w,resourceTitleString:ue,resource:Ye,setextHeading:l(V),setextHeadingLineSequence:R,setextHeadingText:C,strong:l(),thematicBreak:l()}};CS(e,(t||{}).mdastExtensions||[]);let n={};return r;function r(P){let D={type:"root",children:[]},ne={stack:[D],tokenStack:[],config:e,enter:a,exit:c,buffer:s,resume:u,data:n},se=[],ge=-1;for(;++ge<P.length;)if(P[ge][1].type==="listOrdered"||P[ge][1].type==="listUnordered")if(P[ge][0]==="enter")se.push(ge);else{let Et=se.pop();ge=o(P,Et,ge)}for(ge=-1;++ge<P.length;){let Et=e[P[ge][0]];ES.call(Et,P[ge][1].type)&&Et[P[ge][1].type].call(Object.assign({sliceSerialize:P[ge][2].sliceSerialize},ne),P[ge][1])}if(ne.tokenStack.length>0){let Et=ne.tokenStack[ne.tokenStack.length-1];(Et[1]||vS).call(ne,void 0,Et[0])}for(D.position={start:Qn(P.length>0?P[0][1].start:{line:1,column:1,offset:0}),end:Qn(P.length>0?P[P.length-2][1].end:{line:1,column:1,offset:0})},ge=-1;++ge<e.transforms.length;)D=e.transforms[ge](D)||D;return D}function o(P,D,ne){let se=D-1,ge=-1,Et=!1,Ct,Tt,Pn,Jt;for(;++se<=ne;){let Be=P[se];switch(Be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Be[0]==="enter"?ge++:ge--,Jt=void 0;break}case"lineEndingBlank":{Be[0]==="enter"&&(Ct&&!Jt&&!ge&&!Pn&&(Pn=se),Jt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Jt=void 0}if(!ge&&Be[0]==="enter"&&Be[1].type==="listItemPrefix"||ge===-1&&Be[0]==="exit"&&(Be[1].type==="listUnordered"||Be[1].type==="listOrdered")){if(Ct){let At=se;for(Tt=void 0;At--;){let Nt=P[At];if(Nt[1].type==="lineEnding"||Nt[1].type==="lineEndingBlank"){if(Nt[0]==="exit")continue;Tt&&(P[Tt][1].type="lineEndingBlank",Et=!0),Nt[1].type="lineEnding",Tt=At}else if(!(Nt[1].type==="linePrefix"||Nt[1].type==="blockQuotePrefix"||Nt[1].type==="blockQuotePrefixWhitespace"||Nt[1].type==="blockQuoteMarker"||Nt[1].type==="listItemIndent"))break}Pn&&(!Tt||Pn<Tt)&&(Ct._spread=!0),Ct.end=Object.assign({},Tt?P[Tt][1].start:Be[1].end),P.splice(Tt||se,0,["exit",Ct,Be[2]]),se++,ne++}if(Be[1].type==="listItemPrefix"){let At={type:"listItem",_spread:!1,start:Object.assign({},Be[1].start),end:void 0};Ct=At,P.splice(se,0,["enter",At,Be[2]]),se++,ne++,Pn=void 0,Jt=!0}}}return P[D][1]._spread=Et,ne}function i(P,D){return ne;function ne(se){a.call(this,P(se),se),D&&D.call(this,se)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(P,D,ne){this.stack[this.stack.length-1].children.push(P),this.stack.push(P),this.tokenStack.push([D,ne||void 0]),P.position={start:Qn(D.start),end:void 0}}function l(P){return D;function D(ne){P&&P.call(this,ne),c.call(this,ne)}}function c(P,D){let ne=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==P.type&&(D?D.call(this,P,se[0]):(se[1]||vS).call(this,P,se[0]));else throw new Error("Cannot close `"+P.type+"` ("+Xn({start:P.start,end:P.end})+"): it\u2019s not open");ne.position.end=Qn(P.end)}function u(){return cp(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(P){if(this.data.expectingFirstListItemValue){let D=this.stack[this.stack.length-2];D.start=Number.parseInt(this.sliceSerialize(P),10),this.data.expectingFirstListItemValue=void 0}}function p(){let P=this.resume(),D=this.stack[this.stack.length-1];D.lang=P}function h(){let P=this.resume(),D=this.stack[this.stack.length-1];D.meta=P}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let P=this.resume(),D=this.stack[this.stack.length-1];D.value=P.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){let P=this.resume(),D=this.stack[this.stack.length-1];D.value=P.replace(/(\r?\n|\r)$/g,"")}function E(P){let D=this.resume(),ne=this.stack[this.stack.length-1];ne.label=D,ne.identifier=Mn(this.sliceSerialize(P)).toLowerCase()}function S(){let P=this.resume(),D=this.stack[this.stack.length-1];D.title=P}function M(){let P=this.resume(),D=this.stack[this.stack.length-1];D.url=P}function T(P){let D=this.stack[this.stack.length-1];if(!D.depth){let ne=this.sliceSerialize(P).length;D.depth=ne}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function R(P){let D=this.stack[this.stack.length-1];D.depth=this.sliceSerialize(P).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function $(P){let ne=this.stack[this.stack.length-1].children,se=ne[ne.length-1];(!se||se.type!=="text")&&(se=ps(),se.position={start:Qn(P.start),end:void 0},ne.push(se)),this.stack.push(se)}function O(P){let D=this.stack.pop();D.value+=this.sliceSerialize(P),D.position.end=Qn(P.end)}function W(P){let D=this.stack[this.stack.length-1];if(this.data.atHardBreak){let ne=D.children[D.children.length-1];ne.position.end=Qn(P.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(D.type)&&($.call(this,P),O.call(this,P))}function j(){this.data.atHardBreak=!0}function N(){let P=this.resume(),D=this.stack[this.stack.length-1];D.value=P}function z(){let P=this.resume(),D=this.stack[this.stack.length-1];D.value=P}function I(){let P=this.resume(),D=this.stack[this.stack.length-1];D.value=P}function ie(){let P=this.stack[this.stack.length-1];if(this.data.inReference){let D=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=D,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function H(){let P=this.stack[this.stack.length-1];if(this.data.inReference){let D=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=D,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function ce(P){let D=this.sliceSerialize(P),ne=this.stack[this.stack.length-2];ne.label=xS(D),ne.identifier=Mn(D).toLowerCase()}function K(){let P=this.stack[this.stack.length-1],D=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){let se=P.children;ne.children=se}else ne.alt=D}function w(){let P=this.resume(),D=this.stack[this.stack.length-1];D.url=P}function ue(){let P=this.resume(),D=this.stack[this.stack.length-1];D.title=P}function Ye(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function De(P){let D=this.resume(),ne=this.stack[this.stack.length-1];ne.label=D,ne.identifier=Mn(this.sliceSerialize(P)).toLowerCase(),this.data.referenceType="full"}function dt(P){this.data.characterReferenceType=P.type}function qt(P){let D=this.sliceSerialize(P),ne=this.data.characterReferenceType,se;ne?(se=cl(D,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=Lo(D);let ge=this.stack[this.stack.length-1];ge.value+=se}function pt(P){let D=this.stack.pop();D.position.end=Qn(P.end)}function me(P){O.call(this,P);let D=this.stack[this.stack.length-1];D.url=this.sliceSerialize(P)}function kt(P){O.call(this,P);let D=this.stack[this.stack.length-1];D.url="mailto:"+this.sliceSerialize(P)}function Re(){return{type:"blockquote",children:[]}}function vt(){return{type:"code",lang:null,meta:null,value:""}}function ft(){return{type:"inlineCode",value:""}}function pn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Zo(){return{type:"emphasis",children:[]}}function Se(){return{type:"heading",depth:0,children:[]}}function jo(){return{type:"break"}}function us(){return{type:"html",value:""}}function Fr(){return{type:"image",title:null,url:"",alt:null}}function ds(){return{type:"link",title:null,url:"",children:[]}}function Vr(P){return{type:"list",ordered:P.type==="listOrdered",start:null,spread:P._spread,children:[]}}function fn(P){return{type:"listItem",spread:P._spread,checked:null,children:[]}}function Uo(){return{type:"paragraph",children:[]}}function Hr(){return{type:"strong",children:[]}}function ps(){return{type:"text",value:""}}function de(){return{type:"thematicBreak"}}}function Qn(t){return{line:t.line,column:t.column,offset:t.offset}}function CS(t,e){let n=-1;for(;++n<e.length;){let r=e[n];Array.isArray(r)?CS(t,r):uN(t,r)}}function uN(t,e){let n;for(n in e)if(ES.call(e,n))switch(n){case"canContainEols":{let r=e[n];r&&t[n].push(...r);break}case"transforms":{let r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{let r=e[n];r&&Object.assign(t[n],r);break}}}function vS(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Xn({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Xn({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Xn({start:e.start,end:e.end})+") is still open")}var ES,TS=F(()=>{yw();yS();up();bS();ul();ll();zp();ES={}.hasOwnProperty});var MS=F(()=>{TS()});function El(t){let e=this;e.parser=n;function n(r){return Lp(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}var PS=F(()=>{MS()});var _S=F(()=>{PS()});function $p(t){if(t)throw t}var RS=F(()=>{});var BS=ni((rW,$S)=>{"use strict";var Cl=Object.prototype.hasOwnProperty,LS=Object.prototype.toString,AS=Object.defineProperty,NS=Object.getOwnPropertyDescriptor,OS=function(e){return typeof Array.isArray=="function"?Array.isArray(e):LS.call(e)==="[object Array]"},IS=function(e){if(!e||LS.call(e)!=="[object Object]")return!1;var n=Cl.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Cl.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;var o;for(o in e);return typeof o>"u"||Cl.call(e,o)},DS=function(e,n){AS&&n.name==="__proto__"?AS(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},zS=function(e,n){if(n==="__proto__")if(Cl.call(e,n)){if(NS)return NS(e,n).value}else return;return e[n]};$S.exports=function t(){var e,n,r,o,i,s,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(e=arguments[l],e!=null)for(n in e)r=zS(a,n),o=zS(e,n),a!==o&&(u&&o&&(IS(o)||(i=OS(o)))?(i?(i=!1,s=r&&OS(r)?r:[]):s=r&&IS(r)?r:{},DS(a,{name:n,newValue:t(u,s,o)})):typeof o<"u"&&DS(a,{name:n,newValue:o}));return a}});function is(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}var FS=F(()=>{});function Bp(){let t=[],e={run:n,use:r};return e;function n(...o){let i=-1,s=o.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...o);function a(l,...c){let u=t[++i],d=-1;if(l){s(l);return}for(;++d<o.length;)(c[d]===null||c[d]===void 0)&&(c[d]=o[d]);o=c,u?VS(u,a)(...c):s(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),e}}function VS(t,e){let n;return r;function r(...s){let a=t.length>s.length,l;a&&s.push(o);try{l=t.apply(this,s)}catch(c){let u=c;if(a&&n)throw u;return o(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(s,...a){n||(n=!0,e(s,...a))}function i(s){o(null,s)}}var HS=F(()=>{});var ZS=F(()=>{HS()});var Ge,jS=F(()=>{zp();Ge=class extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof e=="string"?o=e:!i.cause&&e&&(s=!0,o=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof r=="string"){let l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){let l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}let a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=a?a.line:void 0,this.name=Xn(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ge.prototype.file="";Ge.prototype.name="";Ge.prototype.reason="";Ge.prototype.message="";Ge.prototype.stack="";Ge.prototype.column=void 0;Ge.prototype.line=void 0;Ge.prototype.ancestors=void 0;Ge.prototype.cause=void 0;Ge.prototype.fatal=void 0;Ge.prototype.place=void 0;Ge.prototype.ruleId=void 0;Ge.prototype.source=void 0});var US=F(()=>{jS()});function dN(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');ss(t);let n=0,r=-1,o=t.length,i;if(e===void 0||e.length===0||e.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let s=-1,a=e.length-1;for(;o--;)if(t.codePointAt(o)===47){if(i){n=o+1;break}}else s<0&&(i=!0,s=o+1),a>-1&&(t.codePointAt(o)===e.codePointAt(a--)?a<0&&(r=o):(a=-1,r=s));return n===r?r=s:r<0&&(r=t.length),t.slice(n,r)}function pN(t){if(ss(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function fN(t){ss(t);let e=t.length,n=-1,r=0,o=-1,i=0,s;for(;e--;){let a=t.codePointAt(e);if(a===47){if(s){r=e+1;break}continue}n<0&&(s=!0,n=e+1),a===46?o<0?o=e:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":t.slice(o,n)}function hN(...t){let e=-1,n;for(;++e<t.length;)ss(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":mN(n)}function mN(t){ss(t);let e=t.codePointAt(0)===47,n=gN(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function gN(t,e){let n="",r=0,o=-1,i=0,s=-1,a,l;for(;++s<=t.length;){if(s<t.length)a=t.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(o===s-1||i===1))if(o!==s-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),o=s,i=0;continue}}else if(n.length>0){n="",r=0,o=s,i=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(o+1,s):n=t.slice(o+1,s),r=s-o-1;o=s,i=0}else a===46&&i>-1?i++:i=-1}return n}function ss(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}var en,KS=F(()=>{en={basename:dN,dirname:pN,extname:fN,join:hN,sep:"/"}});function yN(){return"/"}var WS,qS=F(()=>{WS={cwd:yN}});function Bo(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}var Fp=F(()=>{});function JS(t){if(typeof t=="string")t=new URL(t);else if(!Bo(t)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return xN(t)}function xN(t){if(t.hostname!==""){let r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}let e=t.pathname,n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){let r=e.codePointAt(n+2);if(r===70||r===102){let o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(e)}var GS=F(()=>{Fp();Fp()});function Hp(t,e){if(t&&t.includes(en.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+en.sep+"`")}function Zp(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function YS(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function bN(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var Vp,as,XS=F(()=>{US();KS();qS();GS();Vp=["history","path","basename","stem","extname","dirname"],as=class{constructor(e){let n;e?Bo(e)?n={path:e}:typeof e=="string"||bN(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":WS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Vp.length;){let i=Vp[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)Vp.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?en.basename(this.path):void 0}set basename(e){Zp(e,"basename"),Hp(e,"basename"),this.path=en.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?en.dirname(this.path):void 0}set dirname(e){YS(this.basename,"dirname"),this.path=en.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?en.extname(this.path):void 0}set extname(e){if(Hp(e,"extname"),YS(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=en.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Bo(e)&&(e=JS(e)),Zp(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?en.basename(this.path,this.extname):void 0}set stem(e){Zp(e,"stem"),Hp(e,"stem"),this.path=en.join(this.dirname||"",e+(this.extname||""))}fail(e,n,r){let o=this.message(e,n,r);throw o.fatal=!0,o}info(e,n,r){let o=this.message(e,n,r);return o.fatal=void 0,o}message(e,n,r){let o=new Ge(e,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}});var QS=F(()=>{XS()});var ek,tk=F(()=>{ek=(function(t){let r=this.constructor.prototype,o=r[t],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i})});function jp(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Up(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Kp(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nk(t){if(!is(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function rk(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Tl(t){return SN(t)?t:new as(t)}function SN(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function kN(t){return typeof t=="string"||vN(t)}function vN(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var Ml,wN,Wp,qp,ok=F(()=>{RS();Ml=Os(BS(),1);FS();ZS();QS();tk();wN={}.hasOwnProperty,Wp=class t extends ek{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Bp()}copy(){let e=new t,n=-1;for(;++n<this.attachers.length;){let r=this.attachers[n];e.use(...r)}return e.data((0,Ml.default)(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(Kp("data",this.frozen),this.namespace[e]=n,this):wN.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Kp("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let o=n.call(e,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let n=Tl(e),r=this.parser||this.Parser;return jp("parse",r),r(String(n),n)}process(e,n){let r=this;return this.freeze(),jp("process",this.parser||this.Parser),Up("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,s){let a=Tl(e),l=r.parse(a);r.run(l,a,function(u,d,f){if(u||!d||!f)return c(u);let p=d,h=r.stringify(p,f);kN(h)?f.value=h:f.result=h,c(u,f)});function c(u,d){u||!d?s(u):i?i(d):n(void 0,d)}}}processSync(e){let n=!1,r;return this.freeze(),jp("processSync",this.parser||this.Parser),Up("processSync",this.compiler||this.Compiler),this.process(e,o),rk("processSync","process",n),r;function o(i,s){n=!0,$p(i),r=s}}run(e,n,r){nk(e),this.freeze();let o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,a){let l=Tl(n);o.run(e,l,c);function c(u,d,f){let p=d||e;u?a(u):s?s(p):r(void 0,p,f)}}}runSync(e,n){let r=!1,o;return this.run(e,n,i),rk("runSync","run",r),o;function i(s,a){$p(s),o=a,r=!0}}stringify(e,n){this.freeze();let r=Tl(n),o=this.compiler||this.Compiler;return Up("stringify",o),nk(e),o(e,r)}use(e,...n){let r=this.attachers,o=this.namespace;if(Kp("use",this.frozen),e!=null)if(typeof e=="function")l(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function i(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){let[u,...d]=c;l(u,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(o.settings=(0,Ml.default)(!0,o.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){let d=c[u];i(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...u]);else if(u.length>0){let[p,...h]=u,m=r[f][1];is(m)&&is(p)&&(p=(0,Ml.default)(!0,m,p)),r[f]=[c,p,...h]}}}},qp=new Wp().freeze()});var ik=F(()=>{ok()});var sk={};fc(sk,{findPastedThreadLinks:()=>TN});function TN({text:t,parseLink:e}){if(qn({text:t,parseLink:e,offset:0,allowMarkdownSuffix:!0}).length===0)return[];let n=[],r=o=>{if(!CN.has(o.type)){if(o.type==="text"){let i=o.position?.start.offset,s=o.position?.end.offset;i!==void 0&&s!==void 0&&n.push(...qn({text:t.slice(i,s),parseLink:e,offset:i,allowMarkdownSuffix:!1}))}else if("children"in o)for(let i of o.children)r(i)}};return r(EN.parse(t)),n}var EN,CN,ak=F(()=>{"use strict";_S();ik();al();EN=qp().use(El).freeze(),CN=new Set(["blockquote","code","inlineCode","link","linkReference","image","imageReference","definition","html"])});var hc=globalThis.__bbPluginRuntime;if(hc==null||hc.pluginSdkApp==null)throw new Error('Cannot load "@get-bb/plugin-sdk/app": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Is=hc.pluginSdkApp,zO="default"in Is?Is.default:Is,{Markdown:LO,ThreadChat:$O,ThreadTitle:BO,UrlLink:FO,definePluginApp:Qf,experimental_BranchPicker:VO,experimental_ComposerRoot:eh,experimental_DetailRow:HO,experimental_Diff:ZO,experimental_FailedVoiceRecordings:th,experimental_FileLink:jO,experimental_Icon:Ds,experimental_ImageLightbox:nh,experimental_InfoList:UO,experimental_InfoListRow:KO,experimental_InfoSection:WO,experimental_NewThreadComposer:qO,experimental_PermissionModePicker:JO,experimental_PluginIcon:rh,experimental_PluginRpcCallError:GO,experimental_PromptMentionIcon:ri,experimental_ProviderIcon:YO,experimental_ProviderModelPicker:XO,experimental_SettingsRow:QO,experimental_SettingsSection:eI,experimental_ShortcutHint:oh,experimental_SidebarNavigationIcon:tI,experimental_SourceCode:nI,experimental_THREAD_ACTION_GROUPS:rI,experimental_THREAD_CONTEXT_SEGMENT_GROUPS:oI,experimental_THREAD_INFO_ROW_GROUPS:iI,experimental_THREAD_INFO_SECTION_GROUPS:sI,experimental_ThreadActionsContextMenu:aI,experimental_ThreadActionsMenu:lI,experimental_ThreadStatusGlyph:cI,experimental_ThreadTitleText:ih,experimental_VoiceInputButton:mc,experimental_VoiceInputTextarea:uI,experimental_VoiceRecordingBar:sh,experimental_copyToClipboard:dI,experimental_describePromptMention:zs,experimental_promptMentionClipboardAttributes:Ls,experimental_readPromptMentionClipboard:ah,experimental_saveFile:pI,experimental_useAppPanel:fI,experimental_useArchiveEnvironmentThreads:hI,experimental_useBranches:mI,experimental_useCheckoutState:gI,experimental_useCodeTheme:yI,experimental_useComposerCommandSearch:lh,experimental_useComposerContributions:ro,experimental_useComposerMentionSearch:ch,experimental_useComposerRenderer:sr,experimental_useExperiment:xI,experimental_useFixedTabTarget:bI,experimental_usePluginId:wI,experimental_useProviders:SI,experimental_useQuestionFormHost:kI,experimental_useRpcKeyedQuery:vI,experimental_useRpcMutation:EI,experimental_useRpcQuery:CI,experimental_useRpcRefresh:TI,experimental_useSidebar:MI,experimental_useSidebarNavigation:PI,experimental_useSidebarNavigationSplit:_I,experimental_useSidebarThreadActions:RI,experimental_useSidebarThreadSplit:AI,experimental_useSidebarThreads:NI,experimental_useThreadActionRegistrations:OI,experimental_useThreadActions:II,experimental_useThreadTitleDisplayText:$s,internal_DO_NOT_USE_Outlet:DI,internal_DO_NOT_USE_useOutletFilled:zI,useBbContext:LI,useBbNavigate:$I,useComposer:uh,useComposerView:BI,useComposers:FI,useEnvironmentProviders:VI,useRealtime:HI,useRealtimeConnectionState:ZI,useRpc:jI,useSdk:UI,useSettings:KI,useSidebarSplitLayout:WI,useSidebarThreadDraft:qI,useSidebarThreadDraftIds:JI,useSidebarThreadRowStatus:GI,useSidebarThreadRowStatuses:YI,useSidebarThreadShortcut:XI,experimental_useSidebarThreadPullRequest:QI}=Is;function it(t){this.content=t}it.prototype={constructor:it,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new it(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new it(n)},addToStart:function(t,e){return new it([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new it(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new it(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=it.from(t),t.size?new it(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=it.from(t),t.size?new it(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=it.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};it.from=function(t){if(t instanceof it)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new it(e)};var gc=it;function wh(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=wh(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function Sh(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),a=e.child(--i),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let c=Sh(s.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}var A=class t{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let s=0,a=0;a<n;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&r(l,o+a,i||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,o+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?o?typeof o=="function"?o(a):o:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new t(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,s=0;s<n;i++){let a=this.content[i],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),o+=a.nodeSize),s=l}return new t(r,o)}cutByIndex(e,n){return e==n?t.empty:e==0&&n==this.content.length?this:new t(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new t(o,i)}addToStart(e){return new t([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new t(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return wh(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Sh(this,e,n,r)}findIndex(e){if(e==0)return Bs(0,e);if(e==this.size)return Bs(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e?Bs(n+1,i):Bs(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return t.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return t.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return t.empty;let n,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(n||(n=e.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new t(n||e,r)}static from(e){if(!e)return t.empty;if(e instanceof t)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new t([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};A.empty=new A([],0);var yc={index:0,offset:0};function Bs(t,e){return yc.index=t,yc.offset=e,yc}function Hs(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Hs(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Hs(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}var be=class t{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hs(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return t.none;if(e instanceof t)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};be.none=[];var cr=class extends Error{},U=class t{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=vh(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new t(r,this.openStart,this.openEnd)}removeBetween(e,n){return new t(kh(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return t.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new t(A.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new t(e,r,o)}};U.empty=new U(A.empty,0,0);function kh(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(o==e||i.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(kh(i.content,e-o-1,n-o-1)))}function vh(t,e,n,r,o,i){let{index:s,offset:a}=t.findIndex(e),l=t.maybeChild(s);if(a==e||l.isText)return i&&r<=0&&o<=0&&!i.canReplace(s,s,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=vh(l.content,e-a-1,n,s==0?r-1:0,s==t.childCount-1?o-1:0,l);return c&&t.replaceChild(s,l.copy(c))}function kv(t,e,n){if(n.openStart>t.depth)throw new cr("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new cr("Inconsistent open depths");return Eh(t,e,n,0)}function Eh(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let s=Eh(t,e,n,r+1);return i.copy(i.content.replaceChild(o,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,a=s.content;return lr(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=vv(n,t);return lr(i,Th(t,s,a,e,r))}else return lr(i,Zs(t,e,r))}function Ch(t,e){if(!e.type.compatibleContent(t.type))throw new cr("Cannot join "+e.type.name+" onto "+t.type.name)}function xc(t,e,n){let r=t.node(n);return Ch(r,e.node(n)),r}function ar(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function oi(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(ar(t.nodeAfter,r),i++));for(let a=i;a<s;a++)ar(o.child(a),r);e&&e.depth==n&&e.textOffset&&ar(e.nodeBefore,r)}function lr(t,e){return t.type.checkContent(e),t.copy(e)}function Th(t,e,n,r,o){let i=t.depth>o&&xc(t,e,o+1),s=r.depth>o&&xc(n,r,o+1),a=[];return oi(null,t,o,a),i&&s&&e.index(o)==n.index(o)?(Ch(i,s),ar(lr(i,Th(t,e,n,r,o+1)),a)):(i&&ar(lr(i,Zs(t,e,o+1)),a),oi(e,n,o,a),s&&ar(lr(s,Zs(n,r,o+1)),a)),oi(r,null,o,a),new A(a)}function Zs(t,e,n){let r=[];if(oi(null,t,n,r),t.depth>n){let o=xc(t,e,n+1);ar(lr(o,Zs(t,e,n+1)),r)}return oi(e,null,n,r),new A(r)}function vv(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(A.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}var js=class t{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return be.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let a=r;r=o,o=a}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new ur(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(i),c=i-l;if(r.push(s,a,o+l),!c||(s=s.child(a),s.isText))break;i=c-1,o+=l+1}return new t(n,r,i)}static resolveCached(e,n){let r=dh.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else dh.set(e,r=new bc);let o=r.elts[r.i]=t.resolve(e,n);return r.i=(r.i+1)%Ev,o}},bc=class{constructor(){this.elts=[],this.i=0}},Ev=12,dh=new WeakMap,ur=class{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},Cv=Object.create(null),st=class t{constructor(e,n,r,o=be.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||A.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,o=0){this.content.nodesBetween(e,n,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,o){return this.content.textBetween(e,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Hs(this.attrs,n||e.defaultAttrs||Cv)&&be.sameSet(this.marks,r||be.none)}copy(e=null){return e==this.content?this:new t(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new t(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return U.empty;let o=this.resolve(e),i=this.resolve(n),s=r?0:o.sharedDepth(n),a=o.start(s),c=o.node(s).content.cut(o.pos-a,i.pos-a);return new U(c,o.depth-s,i.depth-s)}replace(e,n,r){return kv(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return js.resolveCached(this,e)}resolveNoCache(e){return js.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Mh(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=A.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=o;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=be.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!be.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=A.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};st.prototype.text=void 0;var wc=class t extends st{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Mh(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new t(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new t(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Mh(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}var dr=class t{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Sc(e,n);if(r.next==null)return t.empty;let o=Ph(r);r.next&&r.err("Unexpected trailing text");let i=Nv(Av(o));return Ov(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function i(s,a){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return A.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let f=i(d,a.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let s=[];for(let a=o;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:a,next:l}=i.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!o.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:o}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
3
|
+
`;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&o)continue;s=" ";break}default:s=String.fromCharCode(i)}o=i===-2,r.push(s)}return r.join("")}var pS=F(()=>{Me();Jn();dl()});function Np(t){let r={constructs:ww([Ap,...(t||{}).extensions||[]]),content:o(Mw),defined:[],document:o(Rw),flow:o(rS),lazy:{},string:o(sS),text:o(aS)};return r;function o(i){return s;function s(a){return dS(r,i,a)}}}var fS=F(()=>{Sw();Pw();Aw();oS();Rp();uS();pS()});function Op(t){for(;!xl(t););return t}var hS=F(()=>{hp()});function Ip(){let t=1,e="",n=!0,r;return o;function o(i,s,a){let l=[],c,u,d,f,p;for(i=e+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),d=0,e="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(mS.lastIndex=d,c=mS.exec(i),f=c&&c.index!==void 0?c.index:i.length,p=i.charCodeAt(f),!c){e=i.slice(d);break}if(p===10&&d===f&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),d<f&&(l.push(i.slice(d,f)),t+=f-d),p){case 0:{l.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,l.push(-2);t++<u;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:r=!0,t=1}d=f+1}return a&&(r&&l.push(-5),e&&l.push(e),l.push(null)),l}}var mS,gS=F(()=>{mS=/[\0\t\n\r]/g});var yS=F(()=>{fS();hS();gS()});function xS(t){return t.replace(aN,lN)}function lN(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){let o=n.charCodeAt(1),i=o===120||o===88;return cl(n.slice(i?2:1),i?16:10)}return Lo(n)||t}var aN,bS=F(()=>{ll();up();aN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});function Xn(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?wS(t.position):"start"in t||"end"in t?wS(t):"line"in t||"column"in t?Dp(t):""}function Dp(t){return SS(t&&t.line)+":"+SS(t&&t.column)}function wS(t){return Dp(t&&t.start)+"-"+Dp(t&&t.end)}function SS(t){return t&&typeof t=="number"?t:1}var kS=F(()=>{});var zp=F(()=>{kS()});function Lp(t,e,n){return typeof e!="string"&&(n=e,e=void 0),cN(n)(Op(Np(n).document().write(Ip()(t,e,!0))))}function cN(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(ds),autolinkProtocol:$,autolinkEmail:$,atxHeading:i(Se),blockQuote:i(Re),characterEscape:$,characterReference:$,codeFenced:i(vt),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(vt,s),codeText:i(ft,s),codeTextData:$,data:$,codeFlowValue:$,definition:i(pn),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(Zo),hardBreakEscape:i(jo),hardBreakTrailing:i(jo),htmlFlow:i(us,s),htmlFlowData:$,htmlText:i(us,s),htmlTextData:$,image:i(Fr),label:s,link:i(ds),listItem:i(fn),listItemValue:f,listOrdered:i(Vr,d),listUnordered:i(Vr),paragraph:i(Uo),reference:k,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(Se),strong:i(Hr),thematicBreak:i(de)},exit:{atxHeading:l(),atxHeadingSequence:T,autolink:l(),autolinkEmail:kt,autolinkProtocol:me,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:dt,characterReferenceMarkerNumeric:dt,characterReferenceValue:qt,characterReference:pt,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:O,codeIndented:l(y),codeText:l(I),codeTextData:O,data:O,definition:l(),definitionDestinationString:M,definitionLabelString:E,definitionTitleString:S,emphasis:l(),hardBreakEscape:l(j),hardBreakTrailing:l(j),htmlFlow:l(N),htmlFlowData:O,htmlText:l(z),htmlTextData:O,image:l(H),label:K,labelText:ce,lineEnding:W,link:l(ie),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:De,resourceDestinationString:w,resourceTitleString:ue,resource:Ye,setextHeading:l(V),setextHeadingLineSequence:R,setextHeadingText:C,strong:l(),thematicBreak:l()}};CS(e,(t||{}).mdastExtensions||[]);let n={};return r;function r(P){let D={type:"root",children:[]},ne={stack:[D],tokenStack:[],config:e,enter:a,exit:c,buffer:s,resume:u,data:n},se=[],ge=-1;for(;++ge<P.length;)if(P[ge][1].type==="listOrdered"||P[ge][1].type==="listUnordered")if(P[ge][0]==="enter")se.push(ge);else{let Et=se.pop();ge=o(P,Et,ge)}for(ge=-1;++ge<P.length;){let Et=e[P[ge][0]];ES.call(Et,P[ge][1].type)&&Et[P[ge][1].type].call(Object.assign({sliceSerialize:P[ge][2].sliceSerialize},ne),P[ge][1])}if(ne.tokenStack.length>0){let Et=ne.tokenStack[ne.tokenStack.length-1];(Et[1]||vS).call(ne,void 0,Et[0])}for(D.position={start:Qn(P.length>0?P[0][1].start:{line:1,column:1,offset:0}),end:Qn(P.length>0?P[P.length-2][1].end:{line:1,column:1,offset:0})},ge=-1;++ge<e.transforms.length;)D=e.transforms[ge](D)||D;return D}function o(P,D,ne){let se=D-1,ge=-1,Et=!1,Ct,Tt,Pn,Jt;for(;++se<=ne;){let Be=P[se];switch(Be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Be[0]==="enter"?ge++:ge--,Jt=void 0;break}case"lineEndingBlank":{Be[0]==="enter"&&(Ct&&!Jt&&!ge&&!Pn&&(Pn=se),Jt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Jt=void 0}if(!ge&&Be[0]==="enter"&&Be[1].type==="listItemPrefix"||ge===-1&&Be[0]==="exit"&&(Be[1].type==="listUnordered"||Be[1].type==="listOrdered")){if(Ct){let At=se;for(Tt=void 0;At--;){let Nt=P[At];if(Nt[1].type==="lineEnding"||Nt[1].type==="lineEndingBlank"){if(Nt[0]==="exit")continue;Tt&&(P[Tt][1].type="lineEndingBlank",Et=!0),Nt[1].type="lineEnding",Tt=At}else if(!(Nt[1].type==="linePrefix"||Nt[1].type==="blockQuotePrefix"||Nt[1].type==="blockQuotePrefixWhitespace"||Nt[1].type==="blockQuoteMarker"||Nt[1].type==="listItemIndent"))break}Pn&&(!Tt||Pn<Tt)&&(Ct._spread=!0),Ct.end=Object.assign({},Tt?P[Tt][1].start:Be[1].end),P.splice(Tt||se,0,["exit",Ct,Be[2]]),se++,ne++}if(Be[1].type==="listItemPrefix"){let At={type:"listItem",_spread:!1,start:Object.assign({},Be[1].start),end:void 0};Ct=At,P.splice(se,0,["enter",At,Be[2]]),se++,ne++,Pn=void 0,Jt=!0}}}return P[D][1]._spread=Et,ne}function i(P,D){return ne;function ne(se){a.call(this,P(se),se),D&&D.call(this,se)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(P,D,ne){this.stack[this.stack.length-1].children.push(P),this.stack.push(P),this.tokenStack.push([D,ne||void 0]),P.position={start:Qn(D.start),end:void 0}}function l(P){return D;function D(ne){P&&P.call(this,ne),c.call(this,ne)}}function c(P,D){let ne=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==P.type&&(D?D.call(this,P,se[0]):(se[1]||vS).call(this,P,se[0]));else throw new Error("Cannot close `"+P.type+"` ("+Xn({start:P.start,end:P.end})+"): it\u2019s not open");ne.position.end=Qn(P.end)}function u(){return cp(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(P){if(this.data.expectingFirstListItemValue){let D=this.stack[this.stack.length-2];D.start=Number.parseInt(this.sliceSerialize(P),10),this.data.expectingFirstListItemValue=void 0}}function p(){let P=this.resume(),D=this.stack[this.stack.length-1];D.lang=P}function h(){let P=this.resume(),D=this.stack[this.stack.length-1];D.meta=P}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let P=this.resume(),D=this.stack[this.stack.length-1];D.value=P.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){let P=this.resume(),D=this.stack[this.stack.length-1];D.value=P.replace(/(\r?\n|\r)$/g,"")}function E(P){let D=this.resume(),ne=this.stack[this.stack.length-1];ne.label=D,ne.identifier=Mn(this.sliceSerialize(P)).toLowerCase()}function S(){let P=this.resume(),D=this.stack[this.stack.length-1];D.title=P}function M(){let P=this.resume(),D=this.stack[this.stack.length-1];D.url=P}function T(P){let D=this.stack[this.stack.length-1];if(!D.depth){let ne=this.sliceSerialize(P).length;D.depth=ne}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function R(P){let D=this.stack[this.stack.length-1];D.depth=this.sliceSerialize(P).codePointAt(0)===61?1:2}function V(){this.data.setextHeadingSlurpLineEnding=void 0}function $(P){let ne=this.stack[this.stack.length-1].children,se=ne[ne.length-1];(!se||se.type!=="text")&&(se=ps(),se.position={start:Qn(P.start),end:void 0},ne.push(se)),this.stack.push(se)}function O(P){let D=this.stack.pop();D.value+=this.sliceSerialize(P),D.position.end=Qn(P.end)}function W(P){let D=this.stack[this.stack.length-1];if(this.data.atHardBreak){let ne=D.children[D.children.length-1];ne.position.end=Qn(P.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(D.type)&&($.call(this,P),O.call(this,P))}function j(){this.data.atHardBreak=!0}function N(){let P=this.resume(),D=this.stack[this.stack.length-1];D.value=P}function z(){let P=this.resume(),D=this.stack[this.stack.length-1];D.value=P}function I(){let P=this.resume(),D=this.stack[this.stack.length-1];D.value=P}function ie(){let P=this.stack[this.stack.length-1];if(this.data.inReference){let D=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=D,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function H(){let P=this.stack[this.stack.length-1];if(this.data.inReference){let D=this.data.referenceType||"shortcut";P.type+="Reference",P.referenceType=D,delete P.url,delete P.title}else delete P.identifier,delete P.label;this.data.referenceType=void 0}function ce(P){let D=this.sliceSerialize(P),ne=this.stack[this.stack.length-2];ne.label=xS(D),ne.identifier=Mn(D).toLowerCase()}function K(){let P=this.stack[this.stack.length-1],D=this.resume(),ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,ne.type==="link"){let se=P.children;ne.children=se}else ne.alt=D}function w(){let P=this.resume(),D=this.stack[this.stack.length-1];D.url=P}function ue(){let P=this.resume(),D=this.stack[this.stack.length-1];D.title=P}function Ye(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function De(P){let D=this.resume(),ne=this.stack[this.stack.length-1];ne.label=D,ne.identifier=Mn(this.sliceSerialize(P)).toLowerCase(),this.data.referenceType="full"}function dt(P){this.data.characterReferenceType=P.type}function qt(P){let D=this.sliceSerialize(P),ne=this.data.characterReferenceType,se;ne?(se=cl(D,ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=Lo(D);let ge=this.stack[this.stack.length-1];ge.value+=se}function pt(P){let D=this.stack.pop();D.position.end=Qn(P.end)}function me(P){O.call(this,P);let D=this.stack[this.stack.length-1];D.url=this.sliceSerialize(P)}function kt(P){O.call(this,P);let D=this.stack[this.stack.length-1];D.url="mailto:"+this.sliceSerialize(P)}function Re(){return{type:"blockquote",children:[]}}function vt(){return{type:"code",lang:null,meta:null,value:""}}function ft(){return{type:"inlineCode",value:""}}function pn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Zo(){return{type:"emphasis",children:[]}}function Se(){return{type:"heading",depth:0,children:[]}}function jo(){return{type:"break"}}function us(){return{type:"html",value:""}}function Fr(){return{type:"image",title:null,url:"",alt:null}}function ds(){return{type:"link",title:null,url:"",children:[]}}function Vr(P){return{type:"list",ordered:P.type==="listOrdered",start:null,spread:P._spread,children:[]}}function fn(P){return{type:"listItem",spread:P._spread,checked:null,children:[]}}function Uo(){return{type:"paragraph",children:[]}}function Hr(){return{type:"strong",children:[]}}function ps(){return{type:"text",value:""}}function de(){return{type:"thematicBreak"}}}function Qn(t){return{line:t.line,column:t.column,offset:t.offset}}function CS(t,e){let n=-1;for(;++n<e.length;){let r=e[n];Array.isArray(r)?CS(t,r):uN(t,r)}}function uN(t,e){let n;for(n in e)if(ES.call(e,n))switch(n){case"canContainEols":{let r=e[n];r&&t[n].push(...r);break}case"transforms":{let r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{let r=e[n];r&&Object.assign(t[n],r);break}}}function vS(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Xn({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Xn({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Xn({start:e.start,end:e.end})+") is still open")}var ES,TS=F(()=>{yw();yS();up();bS();ul();ll();zp();ES={}.hasOwnProperty});var MS=F(()=>{TS()});function El(t){let e=this;e.parser=n;function n(r){return Lp(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}var PS=F(()=>{MS()});var _S=F(()=>{PS()});function $p(t){if(t)throw t}var RS=F(()=>{});var BS=ni((rW,$S)=>{"use strict";var Cl=Object.prototype.hasOwnProperty,LS=Object.prototype.toString,AS=Object.defineProperty,NS=Object.getOwnPropertyDescriptor,OS=function(e){return typeof Array.isArray=="function"?Array.isArray(e):LS.call(e)==="[object Array]"},IS=function(e){if(!e||LS.call(e)!=="[object Object]")return!1;var n=Cl.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Cl.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;var o;for(o in e);return typeof o>"u"||Cl.call(e,o)},DS=function(e,n){AS&&n.name==="__proto__"?AS(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},zS=function(e,n){if(n==="__proto__")if(Cl.call(e,n)){if(NS)return NS(e,n).value}else return;return e[n]};$S.exports=function t(){var e,n,r,o,i,s,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(e=arguments[l],e!=null)for(n in e)r=zS(a,n),o=zS(e,n),a!==o&&(u&&o&&(IS(o)||(i=OS(o)))?(i?(i=!1,s=r&&OS(r)?r:[]):s=r&&IS(r)?r:{},DS(a,{name:n,newValue:t(u,s,o)})):typeof o<"u"&&DS(a,{name:n,newValue:o}));return a}});function is(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}var FS=F(()=>{});function Bp(){let t=[],e={run:n,use:r};return e;function n(...o){let i=-1,s=o.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...o);function a(l,...c){let u=t[++i],d=-1;if(l){s(l);return}for(;++d<o.length;)(c[d]===null||c[d]===void 0)&&(c[d]=o[d]);o=c,u?VS(u,a)(...c):s(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),e}}function VS(t,e){let n;return r;function r(...s){let a=t.length>s.length,l;a&&s.push(o);try{l=t.apply(this,s)}catch(c){let u=c;if(a&&n)throw u;return o(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(s,...a){n||(n=!0,e(s,...a))}function i(s){o(null,s)}}var HS=F(()=>{});var ZS=F(()=>{HS()});var Ge,jS=F(()=>{zp();Ge=class extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof e=="string"?o=e:!i.cause&&e&&(s=!0,o=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof r=="string"){let l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){let l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.position)}let a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=a?a.line:void 0,this.name=Xn(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ge.prototype.file="";Ge.prototype.name="";Ge.prototype.reason="";Ge.prototype.message="";Ge.prototype.stack="";Ge.prototype.column=void 0;Ge.prototype.line=void 0;Ge.prototype.ancestors=void 0;Ge.prototype.cause=void 0;Ge.prototype.fatal=void 0;Ge.prototype.place=void 0;Ge.prototype.ruleId=void 0;Ge.prototype.source=void 0});var US=F(()=>{jS()});function dN(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');ss(t);let n=0,r=-1,o=t.length,i;if(e===void 0||e.length===0||e.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":t.slice(n,r)}if(e===t)return"";let s=-1,a=e.length-1;for(;o--;)if(t.codePointAt(o)===47){if(i){n=o+1;break}}else s<0&&(i=!0,s=o+1),a>-1&&(t.codePointAt(o)===e.codePointAt(a--)?a<0&&(r=o):(a=-1,r=s));return n===r?r=s:r<0&&(r=t.length),t.slice(n,r)}function pN(t){if(ss(t),t.length===0)return".";let e=-1,n=t.length,r;for(;--n;)if(t.codePointAt(n)===47){if(r){e=n;break}}else r||(r=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function fN(t){ss(t);let e=t.length,n=-1,r=0,o=-1,i=0,s;for(;e--;){let a=t.codePointAt(e);if(a===47){if(s){r=e+1;break}continue}n<0&&(s=!0,n=e+1),a===46?o<0?o=e:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":t.slice(o,n)}function hN(...t){let e=-1,n;for(;++e<t.length;)ss(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":mN(n)}function mN(t){ss(t);let e=t.codePointAt(0)===47,n=gN(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function gN(t,e){let n="",r=0,o=-1,i=0,s=-1,a,l;for(;++s<=t.length;){if(s<t.length)a=t.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(o===s-1||i===1))if(o!==s-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),o=s,i=0;continue}}else if(n.length>0){n="",r=0,o=s,i=0;continue}}e&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+t.slice(o+1,s):n=t.slice(o+1,s),r=s-o-1;o=s,i=0}else a===46&&i>-1?i++:i=-1}return n}function ss(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}var en,KS=F(()=>{en={basename:dN,dirname:pN,extname:fN,join:hN,sep:"/"}});function yN(){return"/"}var WS,qS=F(()=>{WS={cwd:yN}});function Bo(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}var Fp=F(()=>{});function JS(t){if(typeof t=="string")t=new URL(t);else if(!Bo(t)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return xN(t)}function xN(t){if(t.hostname!==""){let r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}let e=t.pathname,n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){let r=e.codePointAt(n+2);if(r===70||r===102){let o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(e)}var GS=F(()=>{Fp();Fp()});function Hp(t,e){if(t&&t.includes(en.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+en.sep+"`")}function Zp(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function YS(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function bN(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var Vp,as,XS=F(()=>{US();KS();qS();GS();Vp=["history","path","basename","stem","extname","dirname"],as=class{constructor(e){let n;e?Bo(e)?n={path:e}:typeof e=="string"||bN(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":WS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Vp.length;){let i=Vp[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)Vp.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?en.basename(this.path):void 0}set basename(e){Zp(e,"basename"),Hp(e,"basename"),this.path=en.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?en.dirname(this.path):void 0}set dirname(e){YS(this.basename,"dirname"),this.path=en.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?en.extname(this.path):void 0}set extname(e){if(Hp(e,"extname"),YS(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=en.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Bo(e)&&(e=JS(e)),Zp(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?en.basename(this.path,this.extname):void 0}set stem(e){Zp(e,"stem"),Hp(e,"stem"),this.path=en.join(this.dirname||"",e+(this.extname||""))}fail(e,n,r){let o=this.message(e,n,r);throw o.fatal=!0,o}info(e,n,r){let o=this.message(e,n,r);return o.fatal=void 0,o}message(e,n,r){let o=new Ge(e,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}});var QS=F(()=>{XS()});var ek,tk=F(()=>{ek=(function(t){let r=this.constructor.prototype,o=r[t],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i})});function jp(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Up(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Kp(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nk(t){if(!is(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function rk(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Tl(t){return SN(t)?t:new as(t)}function SN(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function kN(t){return typeof t=="string"||vN(t)}function vN(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var Ml,wN,Wp,qp,ok=F(()=>{RS();Ml=Os(BS(),1);FS();ZS();QS();tk();wN={}.hasOwnProperty,Wp=class t extends ek{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Bp()}copy(){let e=new t,n=-1;for(;++n<this.attachers.length;){let r=this.attachers[n];e.use(...r)}return e.data((0,Ml.default)(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(Kp("data",this.frozen),this.namespace[e]=n,this):wN.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Kp("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let o=n.call(e,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let n=Tl(e),r=this.parser||this.Parser;return jp("parse",r),r(String(n),n)}process(e,n){let r=this;return this.freeze(),jp("process",this.parser||this.Parser),Up("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,s){let a=Tl(e),l=r.parse(a);r.run(l,a,function(u,d,f){if(u||!d||!f)return c(u);let p=d,h=r.stringify(p,f);kN(h)?f.value=h:f.result=h,c(u,f)});function c(u,d){u||!d?s(u):i?i(d):n(void 0,d)}}}processSync(e){let n=!1,r;return this.freeze(),jp("processSync",this.parser||this.Parser),Up("processSync",this.compiler||this.Compiler),this.process(e,o),rk("processSync","process",n),r;function o(i,s){n=!0,$p(i),r=s}}run(e,n,r){nk(e),this.freeze();let o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,a){let l=Tl(n);o.run(e,l,c);function c(u,d,f){let p=d||e;u?a(u):s?s(p):r(void 0,p,f)}}}runSync(e,n){let r=!1,o;return this.run(e,n,i),rk("runSync","run",r),o;function i(s,a){$p(s),o=a,r=!0}}stringify(e,n){this.freeze();let r=Tl(n),o=this.compiler||this.Compiler;return Up("stringify",o),nk(e),o(e,r)}use(e,...n){let r=this.attachers,o=this.namespace;if(Kp("use",this.frozen),e!=null)if(typeof e=="function")l(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function i(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){let[u,...d]=c;l(u,d)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(o.settings=(0,Ml.default)(!0,o.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){let d=c[u];i(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===c){f=d;break}if(f===-1)r.push([c,...u]);else if(u.length>0){let[p,...h]=u,m=r[f][1];is(m)&&is(p)&&(p=(0,Ml.default)(!0,m,p)),r[f]=[c,p,...h]}}}},qp=new Wp().freeze()});var ik=F(()=>{ok()});var sk={};fc(sk,{findPastedThreadLinks:()=>TN});function TN({text:t,parseLink:e}){if(qn({text:t,parseLink:e,offset:0,allowMarkdownSuffix:!0}).length===0)return[];let n=[],r=o=>{if(!CN.has(o.type)){if(o.type==="text"){let i=o.position?.start.offset,s=o.position?.end.offset;i!==void 0&&s!==void 0&&n.push(...qn({text:t.slice(i,s),parseLink:e,offset:i,allowMarkdownSuffix:!1}))}else if("children"in o)for(let i of o.children)r(i)}};return r(EN.parse(t)),n}var EN,CN,ak=F(()=>{"use strict";_S();ik();al();EN=qp().use(El).freeze(),CN=new Set(["blockquote","code","inlineCode","link","linkReference","image","imageReference","definition","html"])});var hc=globalThis.__bbPluginRuntime;if(hc==null||hc.pluginSdkApp==null)throw new Error('Cannot load "@get-bb/plugin-sdk/app": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Is=hc.pluginSdkApp,zO="default"in Is?Is.default:Is,{Markdown:LO,ThreadChat:$O,ThreadTitle:BO,UrlLink:FO,definePluginApp:Qf,experimental_BranchPicker:VO,experimental_ComposerRoot:eh,experimental_DetailRow:HO,experimental_Diff:ZO,experimental_FailedVoiceRecordings:th,experimental_FileLink:jO,experimental_Icon:Ds,experimental_ImageLightbox:nh,experimental_InfoList:UO,experimental_InfoListRow:KO,experimental_InfoSection:WO,experimental_NewThreadComposer:qO,experimental_PermissionModePicker:JO,experimental_PluginIcon:rh,experimental_PluginRpcCallError:GO,experimental_PromptMentionIcon:ri,experimental_ProviderIcon:YO,experimental_ProviderModelPicker:XO,experimental_SettingsRow:QO,experimental_SettingsSection:eI,experimental_ShortcutHint:oh,experimental_SidebarNavigationIcon:tI,experimental_SourceCode:nI,experimental_THREAD_ACTION_GROUPS:rI,experimental_THREAD_CONTEXT_SEGMENT_GROUPS:oI,experimental_THREAD_INFO_ROW_GROUPS:iI,experimental_THREAD_INFO_SECTION_GROUPS:sI,experimental_ThreadActionsContextMenu:aI,experimental_ThreadActionsMenu:lI,experimental_ThreadStatusGlyph:cI,experimental_ThreadTitleText:ih,experimental_VoiceInputButton:mc,experimental_VoiceInputTextarea:uI,experimental_VoiceRecordingBar:sh,experimental_copyToClipboard:dI,experimental_describePromptMention:zs,experimental_promptMentionClipboardAttributes:Ls,experimental_readPromptMentionClipboard:ah,experimental_saveFile:pI,experimental_useAppPanel:fI,experimental_useArchiveEnvironmentThreads:hI,experimental_useBranches:mI,experimental_useCheckoutState:gI,experimental_useCodeTheme:yI,experimental_useComposerCommandSearch:lh,experimental_useComposerContributions:ro,experimental_useComposerMentionSearch:ch,experimental_useComposerRenderer:sr,experimental_useExperiment:xI,experimental_useFixedTabTarget:bI,experimental_usePluginId:wI,experimental_useProviders:SI,experimental_useQuestionFormHost:kI,experimental_useRpcKeyedQuery:vI,experimental_useRpcMutation:EI,experimental_useRpcQuery:CI,experimental_useRpcRefresh:TI,experimental_useSidebar:MI,experimental_useSidebarNavigation:PI,experimental_useSidebarNavigationSplit:_I,experimental_useSidebarThreadActions:RI,experimental_useSidebarThreadSplit:AI,experimental_useSidebarThreads:NI,experimental_useThreadActionRegistrations:OI,experimental_useThreadActions:II,experimental_useThreadTitleDisplayText:$s,internal_DO_NOT_USE_Outlet:DI,internal_DO_NOT_USE_useOutletFilled:zI,useBbContext:LI,useBbNavigate:$I,useComposer:uh,useComposerView:BI,useComposers:FI,useEnvironmentProviders:VI,useRealtime:HI,useRealtimeConnectionState:ZI,useRpc:jI,useSdk:UI,useSettings:KI,useSidebarSplitLayout:WI,useSidebarThreadDraft:qI,useSidebarThreadDraftIds:JI,useSidebarThreadRowStatus:GI,useSidebarThreadRowStatuses:YI,useSidebarThreadShortcut:XI,experimental_useSidebarThreadPullRequest:QI}=Is;function it(t){this.content=t}it.prototype={constructor:it,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new it(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new it(n)},addToStart:function(t,e){return new it([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new it(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new it(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=it.from(t),t.size?new it(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=it.from(t),t.size?new it(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=it.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};it.from=function(t){if(t instanceof it)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new it(e)};var gc=it;function wh(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=wh(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function Sh(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),a=e.child(--i),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let c=Sh(s.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}var A=class t{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let s=0,a=0;a<n;s++){let l=this.content[s],c=a+l.nodeSize;if(c>e&&r(l,o+a,i||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),r,o+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?o?typeof o=="function"?o(a):o:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new t(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,s=0;s<n;i++){let a=this.content[i],l=s+a.nodeSize;l>e&&((s<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,n-s-1))),r.push(a),o+=a.nodeSize),s=l}return new t(r,o)}cutByIndex(e,n){return e==n?t.empty:e==0&&n==this.content.length?this:new t(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new t(o,i)}addToStart(e){return new t([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new t(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return wh(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Sh(this,e,n,r)}findIndex(e){if(e==0)return Bs(0,e);if(e==this.size)return Bs(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e?Bs(n+1,i):Bs(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return t.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return t.fromArray(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return t.empty;let n,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(n||(n=e.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new t(n||e,r)}static from(e){if(!e)return t.empty;if(e instanceof t)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new t([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};A.empty=new A([],0);var yc={index:0,offset:0};function Bs(t,e){return yc.index=t,yc.offset=e,yc}function Hs(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Hs(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Hs(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}var be=class t{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hs(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return t.none;if(e instanceof t)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};be.none=[];var cr=class extends Error{},U=class t{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=vh(this.content,e+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new t(r,this.openStart,this.openEnd)}removeBetween(e,n){return new t(kh(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return t.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new t(A.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new t(e,r,o)}};U.empty=new U(A.empty,0,0);function kh(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(o==e||i.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(kh(i.content,e-o-1,n-o-1)))}function vh(t,e,n,r,o,i){let{index:s,offset:a}=t.findIndex(e),l=t.maybeChild(s);if(a==e||l.isText)return i&&r<=0&&o<=0&&!i.canReplace(s,s,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=vh(l.content,e-a-1,n,s==0?r-1:0,s==t.childCount-1?o-1:0,l);return c&&t.replaceChild(s,l.copy(c))}function kv(t,e,n){if(n.openStart>t.depth)throw new cr("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new cr("Inconsistent open depths");return Eh(t,e,n,0)}function Eh(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let s=Eh(t,e,n,r+1);return i.copy(i.content.replaceChild(o,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,a=s.content;return lr(s,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:s,end:a}=vv(n,t);return lr(i,Th(t,s,a,e,r))}else return lr(i,Zs(t,e,r))}function Ch(t,e){if(!e.type.compatibleContent(t.type))throw new cr("Cannot join "+e.type.name+" onto "+t.type.name)}function xc(t,e,n){let r=t.node(n);return Ch(r,e.node(n)),r}function ar(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function oi(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(ar(t.nodeAfter,r),i++));for(let a=i;a<s;a++)ar(o.child(a),r);e&&e.depth==n&&e.textOffset&&ar(e.nodeBefore,r)}function lr(t,e){return t.type.checkContent(e),t.copy(e)}function Th(t,e,n,r,o){let i=t.depth>o&&xc(t,e,o+1),s=r.depth>o&&xc(n,r,o+1),a=[];return oi(null,t,o,a),i&&s&&e.index(o)==n.index(o)?(Ch(i,s),ar(lr(i,Th(t,e,n,r,o+1)),a)):(i&&ar(lr(i,Zs(t,e,o+1)),a),oi(e,n,o,a),s&&ar(lr(s,Zs(n,r,o+1)),a)),oi(r,null,o,a),new A(a)}function Zs(t,e,n){let r=[];if(oi(null,t,n,r),t.depth>n){let o=xc(t,e,n+1);ar(lr(o,Zs(t,e,n+1)),r)}return oi(e,null,n,r),new A(r)}function vv(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(A.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}var js=class t{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return be.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let a=r;r=o,o=a}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new ur(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(i),c=i-l;if(r.push(s,a,o+l),!c||(s=s.child(a),s.isText))break;i=c-1,o+=l+1}return new t(n,r,i)}static resolveCached(e,n){let r=dh.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else dh.set(e,r=new bc);let o=r.elts[r.i]=t.resolve(e,n);return r.i=(r.i+1)%Ev,o}},bc=class{constructor(){this.elts=[],this.i=0}},Ev=12,dh=new WeakMap,ur=class{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},Cv=Object.create(null),st=class t{constructor(e,n,r,o=be.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||A.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,o=0){this.content.nodesBetween(e,n,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,o){return this.content.textBetween(e,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Hs(this.attrs,n||e.defaultAttrs||Cv)&&be.sameSet(this.marks,r||be.none)}copy(e=null){return e==this.content?this:new t(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new t(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return U.empty;let o=this.resolve(e),i=this.resolve(n),s=r?0:o.sharedDepth(n),a=o.start(s),c=o.node(s).content.cut(o.pos-a,i.pos-a);return new U(c,o.depth-s,i.depth-s)}replace(e,n,r){return kv(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return js.resolveCached(this,e)}resolveNoCache(e){return js.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Mh(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=A.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=o;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=be.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!be.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=A.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};st.prototype.text=void 0;var wc=class t extends st{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Mh(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new t(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new t(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Mh(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}var dr=class t{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Sc(e,n);if(r.next==null)return t.empty;let o=Ph(r);r.next&&r.err("Unexpected trailing text");let i=Nv(Av(o));return Ov(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function i(s,a){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return A.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:d}=s.next[c];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(d)==-1){o.push(d);let f=i(d,a.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let s=[];for(let a=o;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:a,next:l}=i.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!o.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:o}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
4
4
|
`)}};dr.empty=new dr(!0);var Sc=class{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}};function Ph(t){let e=[];do e.push(Tv(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Tv(t){let e=[];do e.push(Mv(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Mv(t){let e=Rv(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Pv(t,e);else break;return e}function ph(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Pv(t,e){let n=ph(t),r=n;return t.eat(",")&&(t.next!="}"?r=ph(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function _v(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(e)&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function Rv(t){if(t.eat("(")){let e=Ph(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=_v(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Av(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,a,l){let c={term:l,to:a};return e[s].push(c),c}function o(s,a){s.forEach(l=>l.to=a)}function i(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(i(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=i(s.exprs[l],a);if(l==s.exprs.length-1)return c;o(c,a=n())}else if(s.type=="star"){let l=n();return r(a,l),o(i(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return o(i(s.expr,a),l),o(i(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(i(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c<s.min;c++){let u=n();o(i(s.expr,l),u),l=u}if(s.max==-1)o(i(s.expr,l),l);else for(let c=s.min;c<s.max;c++){let u=n();r(l,u),o(i(s.expr,l),u),l=u}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function _h(t,e){return e-t}function fh(t,e){let n=[];return r(e),n.sort(_h);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let s=0;s<i.length;s++){let{term:a,to:l}=i[s];!a&&n.indexOf(l)==-1&&r(l)}}}function Nv(t){let e=Object.create(null);return n(fh(t,0));function n(r){let o=[];r.forEach(s=>{t[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<o.length;u++)o[u][0]==a&&(c=o[u][1]);fh(t,l).forEach(u=>{c||o.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new dr(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let a=o[s][1].sort(_h);i.next.push({type:o[s][0],next:e[a.join(",")]||n(a)})}return i}}function Ov(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,s=[];for(let a=0;a<o.next.length;a++){let{type:l,next:c}=o.next[a];s.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Rh(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function Ah(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function Nh(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let i=t[o];i.validate&&i.validate(e[o])}}function Oh(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new kc(t,r,e[r]);return n}var Us=class t{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Oh(e,r.attrs),this.defaultAttrs=Rh(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==dr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Ah(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new st(this,this.computeAttrs(e),A.from(n),be.setFrom(r))}createChecked(e=null,n,r){return n=A.from(n),this.checkContent(n),new st(this,this.computeAttrs(e),n,be.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=A.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(A.empty,!0);return i?new st(this,e,n.append(i),be.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Nh(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:be.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,s)=>r[i]=new t(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Iv(t,e,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}var kc=class{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Iv(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}},si=class t{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=Oh(e,o.attrs),this.excluded=null;let i=Rh(this.attrs);this.instance=i?new be(this,i):null}create(e=null){return!e&&this.instance?this.instance:new be(this,Ah(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new t(i,o++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){Nh(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}},io=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=gc.from(e.nodes),n.marks=gc.from(e.marks||{}),this.nodes=Us.compile(this.spec.nodes,this),this.marks=si.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",a=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=dr.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=a=="_"?null:a?hh(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:hh(this,s.split(" "))}this.nodeFromJSON=o=>st.fromJSON(this,o),this.markFromJSON=o=>be.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Us){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new wc(r,r.defaultAttrs,e,be.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};function hh(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],s=i;if(i)n.push(i);else for(let a in t.marks){let l=t.marks[a];(o=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Dv(t){return t.tag!=null}function zv(t){return t.style!=null}var rn=class t{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(Dv(o))this.tags.push(o);else if(zv(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=e.nodes[o.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new Ks(this,n,!1);return r.addAll(e,be.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Ks(this,n,!0);return r.addAll(e,be.none,n.from,n.to),U.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(Bv(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,n,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let s=this.styles[i],a=s.style;if(!(a.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<i)break}n.splice(s,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(s=>{r(s=gh(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=gh(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new t(e,t.schemaRules(e)))}},Ih={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Lv={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Dh={ol:!0,ul:!0},ai=1,vc=2,ii=4;function mh(t,e,n){return e!=null?(e?ai:0)|(e==="full"?vc:0):t&&t.whitespace=="pre"?ai|vc:n&~ii}var oo=class{constructor(e,n,r,o,i,s){this.type=e,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=be.none,this.match=i||(s&ii?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(A.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&ai)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=A.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(A.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Ih.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},Ks=class{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=mh(null,n.preserveWhitespace,0)|(r?ii:0);o?i=new oo(o.type,o.attrs,be.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new oo(null,null,be.none,!0,null,s):i=new oo(e.schema.topNodeType,null,be.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,o=this.top,i=o.options&vc?"full":this.localPreserveWS||(o.options&ai)>0,{schema:s}=this.parser;if(i==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
|
|
5
5
|
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(s.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=o.content[o.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),a;Dh.hasOwnProperty(s)&&this.parser.normalizeLists&&$v(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:Lv.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,u=this.needsBlock;if(Ih.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
6
6
|
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(i,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(a)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,a=o==null?null:e.childNodes[o];s!=a;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let o,i;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],c=l.findWrapping(e);if(c&&(!o||o.length>c.length+a)&&(o=c,i=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!o)return null;this.sync(i);for(let s=0;s<o.length;s++)n=this.enterInner(o[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=be.none;for(let a of o.concat(e.marks))(i.type?i.type.allowsMarkType(a.type):yh(a.type,e.type))&&(s=a.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let a=mh(e,i,s.options);s.options&ii&&s.content.length==0&&(a|=ii);let l=be.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):yh(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new oo(e,n,l,o,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=ai)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=i;l--)if(s(a-1,l))return!0;return!1}else{let u=l>0||l==0&&o?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};function $v(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Dh.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Bv(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function gh(t){let e={};for(let n in t)e[n]=t[n];return e}function yh(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=a=>{i.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||i.indexOf(u)<0&&s(u))return!0}};if(s(o.contentMatch))return!0}}var gn=class t{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Fs(n).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let a=0,l=0;for(;a<i.length&&l<s.marks.length;){let c=s.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(i[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<i.length;)o=i.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],u=this.serializeMark(c,s.isInline,n);u&&(i.push([c,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){if(e.isText)return Fs(n).createTextNode(e.text);let{dom:r,contentDOM:o}=Vs(Fs(n),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&Vs(Fs(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return typeof n=="string"?{dom:e.createTextNode(n)}:Vs(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new t(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=xh(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return xh(e.marks)}};function xh(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Fs(t){return t.document||window.document}var bh=new WeakMap;function Fv(t){let e=bh.get(t);return e===void 0&&bh.set(t,e=Vv(t)),e}function Vv(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(t),e}function Vs(t,e,n,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let o=e[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Fv(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let a,l=n?t.createElementNS(n,o):t.createElement(o),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&l.style?l.style.cssText=c[d]:l.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else if(typeof f=="string")l.appendChild(t.createTextNode(f));else{let{dom:p,contentDOM:h}=Vs(t,f,n,r);if(l.appendChild(p),h){if(a)throw new RangeError("Multiple content holes");a=h}}}return{dom:l,contentDOM:a}}var $h=65535,Bh=Math.pow(2,16);function Hv(t,e){return t+e*Bh}function zh(t){return t&$h}function Zv(t){return(t-(t&$h))/Bh}var Fh=1,Vh=2,Ws=4,Hh=8,ui=class{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Hh)>0}get deletedBefore(){return(this.delInfo&(Fh|Ws))>0}get deletedAfter(){return(this.delInfo&(Vh|Ws))>0}get deletedAcross(){return(this.delInfo&Ws)>0}},Xt=class t{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&t.empty)return t.empty}recover(e){let n=0,r=zh(e);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+Zv(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?o:0);if(l>e)break;let c=this.ranges[a+i],u=this.ranges[a+s],d=l+c;if(e<=d){let f=c?e==l?-1:e==d?1:n:n,p=l+o+(f<0?0:u);if(r)return p;let h=e==(n<0?l:d)?null:Hv(a/3,e-l),m=e==l?Vh:e==d?Fh:Ws;return(n<0?e!=l:e!=d)&&(m|=Hh),new ui(p,m,h)}o+=u-c}return r?e+o:new ui(e+o,0,null)}touches(e,n){let r=0,o=zh(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[a+i],u=l+c;if(e<=u&&a==o*3)return!0;r+=this.ranges[a+s]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let s=this.ranges[o],a=s-(this.inverted?i:0),l=s+(this.inverted?0:i),c=this.ranges[o+n],u=this.ranges[o+r];e(a,a+c,l,l+u),i+=u-c}}invert(){return new t(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?t.empty:new t(e<0?[0,-e,0]:[0,0,e])}};Xt.empty=new Xt([]);var di=class t{constructor(e,n,r=0,o=e?e.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new t(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let o=e.getMirror(n);this.appendMap(e._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new t;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let i=this.from;i<this.to;i++){let s=this._maps[i],a=s.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(a.recover);continue}}o|=a.delInfo,e=a.pos}return r?e:new ui(e,o,null)}},Ec=Object.create(null),Fe=class{getMap(){return Xt.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ec[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Ec)throw new RangeError("Duplicate use of step JSON ID "+e);return Ec[e]=n,n.prototype.jsonID=e,n}},Ke=class t{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new t(e,null)}static fail(e){return new t(null,e)}static fromReplace(e,n,r,o){try{return t.ok(e.replace(n,r,o))}catch(i){if(i instanceof cr)return t.fail(i.message);throw i}}};function _c(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(_c(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return A.fromArray(r)}var pi=class t extends Fe{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new U(_c(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return Ke.fromReplace(e,this.from,this.to,i)}invert(){return new yn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)}merge(e){return e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))}};Fe.jsonID("addMark",pi);var yn=class t extends Fe{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new U(_c(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return Ke.fromReplace(e,this.from,this.to,r)}invert(){return new pi(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)}merge(e){return e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))}};Fe.jsonID("removeMark",yn);var fi=class t extends Fe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ke.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ke.fromReplace(e,this.pos,this.pos+1,new U(A.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new t(this.pos,n.marks[o]);return new t(this.pos,this.mark)}}return new so(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new t(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new t(n.pos,e.markFromJSON(n.mark))}};Fe.jsonID("addNodeMark",fi);var so=class t extends Fe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ke.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ke.fromReplace(e,this.pos,this.pos+1,new U(A.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new fi(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new t(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new t(n.pos,e.markFromJSON(n.mark))}};Fe.jsonID("removeNodeMark",so);var Qe=class t extends Fe{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&Mc(e,this.from,this.to)?Ke.fail("Structure replace would overwrite content"):Ke.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Xt([this.from,this.to-this.from,this.slice.size])}invert(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&t.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new t(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof t)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?U.empty:new U(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?U.empty:new U(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,U.fromJSON(e,n.slice),!!n.structure)}};Qe.MAP_BIAS=1;Fe.jsonID("replace",Qe);var Ze=class t extends Fe{constructor(e,n,r,o,i,s,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=a}apply(e){if(this.structure&&(Mc(e,this.from,this.gapFrom)||Mc(e,this.gapTo,this.to)))return Ke.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ke.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Ke.fromReplace(e,this.from,this.to,r):Ke.fail("Content does not fit in gap")}getMap(){return new Xt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new t(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,U.fromJSON(e,n.slice),n.insert,!!n.structure)}};Fe.jsonID("replaceAround",Ze);function Mc(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function jv(t,e,n,r){let o=[],i=[],s,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),p=Math.min(c+l.nodeSize,n),h=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(h)||(s&&s.to==f&&s.mark.eq(d[m])?s.to=p:o.push(s=new yn(f,p,d[m])));a&&a.to==f?a.to=p:i.push(a=new pi(f,p,r))}}),o.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function Uv(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,a)=>{if(!s.isInline)return;i++;let l=null;if(r instanceof si){let c=s.marks,u;for(;u=r.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,n);for(let u=0;u<l.length;u++){let d=l[u],f;for(let p=0;p<o.length;p++){let h=o[p];h.step==i-1&&d.eq(o[p].style)&&(f=h)}f?(f.to=c,f.step=i):o.push({style:d,from:Math.max(a,e),to:c,step:i})}}}),o.forEach(s=>t.step(new yn(s.from,s.to,s.style)))}function Rc(t,e,n,r=n.contentMatch,o=!0){let i=t.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l<i.childCount;l++){let c=i.child(l),u=a+c.nodeSize,d=r.matchType(c.type);if(!d)s.push(new Qe(a,u,U.empty));else{r=d;for(let f=0;f<c.marks.length;f++)n.allowsMarkType(c.marks[f].type)||t.step(new yn(a,u,c.marks[f]));if(o&&c.isText&&n.whitespace!="pre"){let f,p=/\r?\n|\r/g,h;for(;f=p.exec(c.text);)h||(h=new U(A.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),s.push(new Qe(a+f.index,a+f.index+f[0].length,h))}}a=u}if(!r.validEnd){let l=r.fillBefore(A.empty,!0);t.replace(a,a,new U(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}function Kv(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function xn(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,o=0,i=0;;--r){let s=t.$from.node(r),a=t.$from.index(r)+o,l=t.$to.indexAfter(r)-i;if(r<t.depth&&s.canReplace(a,l,n))return r;if(r==0||s.type.spec.isolating||!Kv(s,a,l))break;a&&(o=1),l<s.childCount&&(i=1)}return null}function Wv(t,e,n){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),a=o.after(i+1),l=s,c=a,u=A.empty,d=0;for(let h=i,m=!1;h>n;h--)m||r.index(h)>0?(m=!0,u=A.from(r.node(h).copy(u)),d++):l--;let f=A.empty,p=0;for(let h=i,m=!1;h>n;h--)m||o.after(h+1)<o.end(h)?(m=!0,f=A.from(o.node(h).copy(f)),p++):c++;t.step(new Ze(l,c,s,a,new U(u.append(f),d,p),u.size-d,!0))}function co(t,e,n=null,r=t){let o=qv(t,e),i=o&&Jv(r,e);return i?o.map(Lh).concat({type:e,attrs:n}).concat(i.map(Lh)):null}function Lh(t){return{type:t,attrs:null}}function qv(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}function Jv(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;l&&c<o;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:s}function Gv(t,e,n){let r=A.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=A.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new Ze(o,i,o,i,new U(r,0,0),n.length,!0))}function Yv(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,a)=>{let l=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,l)&&Xv(t.doc,t.mapping.slice(i).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",h=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!h?c=!1:!p&&h&&(c=!0)}c===!1&&jh(t,s,a,i),Rc(t,t.mapping.slice(i).map(a,1),r,void 0,c===null);let u=t.mapping.slice(i),d=u.map(a,1),f=u.map(a+s.nodeSize,1);return t.step(new Ze(d,f,d+1,f-1,new U(A.from(r.create(l,null,s.marks)),0,0),1,!0)),c===!0&&Zh(t,s,a,i),!1}})}function Zh(t,e,n,r){e.forEach((o,i)=>{if(o.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(o.text);){let l=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function jh(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
|
|
@@ -103,9 +103,9 @@ ${g}
|
|
|
103
103
|
`);l+=c.type==="paragraph"?`
|
|
104
104
|
|
|
105
105
|
${h}`:`
|
|
106
|
-
${h}`}}),l}function nM(t,e,n={}){let{state:r}=e,{doc:o,tr:i}=r,s=t;o.descendants((a,l)=>{let c=i.mapping.map(l),u=i.mapping.map(l)+a.nodeSize,d=null;if(a.marks.forEach(p=>{if(p!==s)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=t.type.create({...t.attrs,...n});i.removeMark(c,u,t.type),i.addMark(c,u,p)}}),i.docChanged&&e.view.dispatch(i)}var Ut=class wy extends Hu{constructor(){super(...arguments),this.type="node"}static create(e={}){let n=typeof e=="function"?e():e;return new wy(n)}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}},Sy=class{constructor(t,e,n){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.innerDecorations=e.innerDecorations,this.view=e.view,this.HTMLAttributes=e.HTMLAttributes,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,n,r,o,i,s,a;let{view:l}=this.editor,c=t.target,u=c.nodeType===3?(e=c.parentElement)==null?void 0:e.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(c)||!u)return;let d=0,f=0;if(this.dom!==u){let E=this.dom.getBoundingClientRect(),S=u.getBoundingClientRect(),M=(o=t.offsetX)!=null?o:(r=t.nativeEvent)==null?void 0:r.offsetX,T=(s=t.offsetY)!=null?s:(i=t.nativeEvent)==null?void 0:i.offsetY;d=S.x-E.x+M,f=S.y-E.y+T}let p=this.dom.cloneNode(!0);try{let E=this.dom.getBoundingClientRect();p.style.width=`${Math.round(E.width)}px`,p.style.height=`${Math.round(E.height)}px`,p.style.boxSizing="border-box",p.style.pointerEvents="none"}catch{}let h=null;try{h=document.createElement("div"),h.style.position="absolute",h.style.top="-9999px",h.style.left="-9999px",h.style.pointerEvents="none",h.appendChild(p),document.body.appendChild(h),(a=t.dataTransfer)==null||a.setDragImage(p,d,f)}finally{h&&setTimeout(()=>{try{h?.remove()}catch{}},0)}let m=this.getPos();if(typeof m!="number")return;let g=ee.create(l.state.doc,m),y=l.state.tr.setSelection(g);l.dispatch(y)}stopEvent(t){var e;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});let n=t.target;if(!(this.dom.contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;let o=t.type.startsWith("drag"),i=t.type==="dragover"||t.type==="dragenter",s=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!s&&!o)return!0;let{isEditable:l}=this.editor,{isDragging:c}=this,u=!!this.node.type.spec.draggable,d=ee.isSelectable(this.node),f=t.type==="copy",p=t.type==="paste",h=t.type==="cut",m=t.type==="mousedown";if(!u&&d&&o&&t.target===this.dom&&t.preventDefault(),u&&o&&!c&&t.target===this.dom)return t.preventDefault(),!1;if(u&&l&&!c&&m){let g=n.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||i||s||f||p||h||m&&d)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(Pi()||Nu())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:e})=>{let n=this.getPos();return typeof n!="number"?!1:(e.setNodeMarkup(n,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){let t=this.getPos();if(typeof t!="number")return;let e=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:e})}};var Ea=200,rt=function(){};rt.prototype.append=function(e){return e.length?(e=rt.from(e),!this.length&&e||e.length<Ea&&this.leafAppend(e)||this.length<Ea&&e.leafPrepend(this)||this.appendInner(e)):this};rt.prototype.prepend=function(e){return e.length?rt.from(e).append(this):this};rt.prototype.appendInner=function(e){return new rM(this,e)};rt.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?rt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};rt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};rt.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};rt.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(e(i,s))},n,r),o};rt.from=function(e){return e instanceof rt?e:e&&e.length?new ky(e):rt.empty};var ky=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,s,a){for(var l=i;l<s;l++)if(o(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,s,a){for(var l=i-1;l>=s;l--)if(o(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=Ea)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=Ea)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(rt);rt.empty=new ky([]);var rM=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,i,s){var a=this.left.length;if(o<a&&this.left.forEachInner(r,o,Math.min(i,a),s)===!1||i>a&&this.right.forEachInner(r,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(r,o-a,Math.max(i,a)-a,s+a)===!1||i<a&&this.left.forEachInvertedInner(r,Math.min(o,a),i,s)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(rt),Ku=rt;var oM=500,vr=class t{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=e.tr,a,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,u.push(d);return}if(o){u.push(new an(d.map));let p=d.step.map(o.slice(i)),h;p&&s.maybeStep(p).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],c.push(new an(h,void 0,void 0,c.length+u.length))),i--,h&&o.appendMap(h,i)}else s.maybeStep(d.step);if(d.selection)return a=o?d.selection.map(o.slice(i)):d.selection,l=new t(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,n,r,o){let i=[],s=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),f=new an(e.mapping.maps[u],d,n),p;(p=l&&l.merge(f))&&(f=p,u?i.pop():a=a.slice(0,a.length-1)),i.push(f),n&&(s++,n=void 0),o||(l=f)}let c=s-r.depth;return c>sM&&(a=iM(a,c),s-=c),new t(a.append(i),s)}remapping(e,n){let r=new di;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new t(this.items.append(e.map(n=>new an(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},o);let l=n;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;s=Math.min(s,p);let h=i.maps[p];if(f.step){let m=e.steps[p].invert(e.docs[p]),g=f.selection&&f.selection.map(i.slice(l+1,p));g&&a++,r.push(new an(h,m,g))}else r.push(new an(h))},o);let c=[];for(let f=n;f<s;f++)c.push(new an(i.maps[f]));let u=this.items.slice(0,o).append(c).append(r),d=new t(u,a);return d.emptyItemCount()>oM&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((s,a)=>{if(a>=e)o.push(s),s.selection&&i++;else if(s.step){let l=s.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=s.selection&&s.selection.map(n.slice(r));u&&i++;let d=new an(c.invert(),l,u),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else s.map&&r--},this.items.length,0),new t(Ku.from(o.reverse()),i)}};vr.empty=new vr(Ku.empty,0);function iM(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}var an=class t{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new t(n.getMap().invert(),n,this.selection)}}},ln=class{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}},sM=20;function aM(t,e,n,r){let o=n.getMeta(Fn),i;if(o)return o.historyState;n.getMeta(Cy)&&(t=new ln(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(Fn))return s.getMeta(Fn).redo?new ln(t.done.addTransform(n,void 0,r,Ca(e)),t.undone,vy(n.mapping.maps),t.prevTime,t.prevComposition):new ln(t.done,t.undone.addTransform(n,void 0,r,Ca(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!s&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!lM(n,t.prevRanges)),c=s?Wu(t.prevRanges,n.mapping):vy(n.mapping.maps);return new ln(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Ca(e)),vr.empty,c,n.time,a??t.prevComposition)}else return(i=n.getMeta("rebased"))?new ln(t.done.rebased(n,i),t.undone.rebased(n,i),Wu(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new ln(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Wu(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function lM(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&o>=e[i]&&(n=!0)}),n}function vy(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,i,s)=>e.push(i,s));return e}function Wu(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function cM(t,e,n){let r=Ca(e),o=Fn.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),a=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),l=new ln(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(s).setMeta(Fn,{redo:n,historyState:l})}var qu=!1,Ey=null;function Ca(t){let e=t.plugins;if(Ey!=e){qu=!1,Ey=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){qu=!0;break}}return qu}function cn(t){return t.setMeta(Cy,!0)}var Fn=new xe("history"),Cy=new xe("closeHistory");function Ty(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new pe({key:Fn,state:{init(){return new ln(vr.empty,vr.empty,null,0,-1)},apply(e,n,r){return aM(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?Ju:r=="historyRedo"?Gu:null;return!o||!e.editable?!1:(n.preventDefault(),o(e.state,e.dispatch))}}}})}function Ta(t,e){return(n,r)=>{let o=Fn.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=cM(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}var Ju=Ta(!1,!0),Gu=Ta(!0,!0),cL=Ta(!1,!1),uL=Ta(!0,!1);function Yu(t){return t.getMeta(Fn)!=null}ye();ye();var rd=globalThis.__bbPluginRuntime;if(rd==null||rd.reactDom==null)throw new Error('Cannot load "react-dom": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ra=rd.reactDom,My="default"in Ra?Ra.default:Ra,{createPortal:Py,flushSync:_y,preconnect:hL,prefetchDNS:mL,preinit:gL,preinitModule:yL,preload:xL,preloadModule:bL,requestFormReset:wL,unstable_batchedUpdates:SL,useFormState:kL,useFormStatus:vL,version:EL}=Ra;var Wy=Os(Aa(),1);var id=globalThis.__bbPluginRuntime;if(id==null||id.jsxRuntime==null)throw new Error('Cannot load "react/jsx-runtime": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Na=id.jsxRuntime,PL="default"in Na?Na.default:Na,{Fragment:Ie,jsx:b,jsxs:G}=Na;ye();var qy=Os(Aa(),1);var{getOwnPropertyNames:VM,getOwnPropertySymbols:HM}=Object,{hasOwnProperty:ZM}=Object.prototype;function sd(t,e){return function(r,o,i){return t(r,o,i)&&e(r,o,i)}}function Oa(t){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,o);let{cache:i}=o,s=i.get(n),a=i.get(r);if(s&&a)return s===r&&a===n;i.set(n,r),i.set(r,n);let l=t(n,r,o);return i.delete(n),i.delete(r),l}}function jM(t){return t?.[Symbol.toStringTag]}function Oy(t){return VM(t).concat(HM(t))}var UM=Object.hasOwn||((t,e)=>ZM.call(t,e));function Er(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var KM="__v",WM="__o",qM="_owner",{getOwnPropertyDescriptor:Iy,keys:Dy}=Object;function JM(t,e){return t.byteLength===e.byteLength&&Ia(new Uint8Array(t),new Uint8Array(e))}function GM(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function YM(t,e){return t.byteLength===e.byteLength&&Ia(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function XM(t,e){return Er(t.getTime(),e.getTime())}function QM(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function eP(t,e){return t===e}function zy(t,e,n){let r=t.size;if(r!==e.size)return!1;if(!r)return!0;let o=new Array(r),i=t.entries(),s,a,l=0;for(;(s=i.next())&&!s.done;){let c=e.entries(),u=!1,d=0;for(;(a=c.next())&&!a.done;){if(o[d]){d++;continue}let f=s.value,p=a.value;if(n.equals(f[0],p[0],l,d,t,e,n)&&n.equals(f[1],p[1],f[0],p[0],t,e,n)){u=o[d]=!0;break}d++}if(!u)return!1;l++}return!0}var tP=Er;function nP(t,e,n){let r=Dy(t),o=r.length;if(Dy(e).length!==o)return!1;for(;o-- >0;)if(!$y(t,e,n,r[o]))return!1;return!0}function Di(t,e,n){let r=Oy(t),o=r.length;if(Oy(e).length!==o)return!1;let i,s,a;for(;o-- >0;)if(i=r[o],!$y(t,e,n,i)||(s=Iy(t,i),a=Iy(e,i),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable)))return!1;return!0}function rP(t,e){return Er(t.valueOf(),e.valueOf())}function oP(t,e){return t.source===e.source&&t.flags===e.flags}function Ly(t,e,n){let r=t.size;if(r!==e.size)return!1;if(!r)return!0;let o=new Array(r),i=t.values(),s,a;for(;(s=i.next())&&!s.done;){let l=e.values(),c=!1,u=0;for(;(a=l.next())&&!a.done;){if(!o[u]&&n.equals(s.value,a.value,s.value,a.value,t,e,n)){c=o[u]=!0;break}u++}if(!c)return!1}return!0}function Ia(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function iP(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function $y(t,e,n,r){return(r===qM||r===WM||r===KM)&&(t.$$typeof||e.$$typeof)?!0:UM(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}var sP="[object ArrayBuffer]",aP="[object Arguments]",lP="[object Boolean]",cP="[object DataView]",uP="[object Date]",dP="[object Error]",pP="[object Map]",fP="[object Number]",hP="[object Object]",mP="[object RegExp]",gP="[object Set]",yP="[object String]",xP={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},bP="[object URL]",wP=Object.prototype.toString;function SP({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:o,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:h}){return function(g,y,E){if(g===y)return!0;if(g==null||y==null)return!1;let S=typeof g;if(S!==typeof y)return!1;if(S!=="object")return S==="number"?a(g,y,E):S==="function"?i(g,y,E):!1;let M=g.constructor;if(M!==y.constructor)return!1;if(M===Object)return l(g,y,E);if(Array.isArray(g))return e(g,y,E);if(M===Date)return r(g,y,E);if(M===RegExp)return u(g,y,E);if(M===Map)return s(g,y,E);if(M===Set)return d(g,y,E);let T=wP.call(g);if(T===uP)return r(g,y,E);if(T===mP)return u(g,y,E);if(T===pP)return s(g,y,E);if(T===gP)return d(g,y,E);if(T===hP)return typeof g.then!="function"&&typeof y.then!="function"&&l(g,y,E);if(T===bP)return p(g,y,E);if(T===dP)return o(g,y,E);if(T===aP)return l(g,y,E);if(xP[T])return f(g,y,E);if(T===sP)return t(g,y,E);if(T===cP)return n(g,y,E);if(T===lP||T===fP||T===yP)return c(g,y,E);if(h){let C=h[T];if(!C){let R=jM(g);R&&(C=h[R])}if(C)return C(g,y,E)}return!1}}function kP({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:JM,areArraysEqual:n?Di:GM,areDataViewsEqual:YM,areDatesEqual:XM,areErrorsEqual:QM,areFunctionsEqual:eP,areMapsEqual:n?sd(zy,Di):zy,areNumbersEqual:tP,areObjectsEqual:n?Di:nP,arePrimitiveWrappersEqual:rP,areRegExpsEqual:oP,areSetsEqual:n?sd(Ly,Di):Ly,areTypedArraysEqual:n?sd(Ia,Di):Ia,areUrlsEqual:iP,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){let o=Oa(r.areArraysEqual),i=Oa(r.areMapsEqual),s=Oa(r.areObjectsEqual),a=Oa(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:o,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:a})}return r}function vP(t){return function(e,n,r,o,i,s,a){return t(e,n,a)}}function EP({circular:t,comparator:e,createState:n,equals:r,strict:o}){if(n)return function(a,l){let{cache:c=t?new WeakMap:void 0,meta:u}=n();return e(a,l,{cache:c,equals:r,meta:u,strict:o})};if(t)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:o})};let i={cache:void 0,equals:r,meta:void 0,strict:o};return function(a,l){return e(a,l,i)}}var By=Vn(),RL=Vn({strict:!0}),AL=Vn({circular:!0}),NL=Vn({circular:!0,strict:!0}),OL=Vn({createInternalComparator:()=>Er}),IL=Vn({strict:!0,createInternalComparator:()=>Er}),DL=Vn({circular:!0,createInternalComparator:()=>Er}),zL=Vn({circular:!0,createInternalComparator:()=>Er,strict:!0});function Vn(t={}){let{circular:e=!1,createInternalComparator:n,createState:r,strict:o=!1}=t,i=kP(t),s=SP(i),a=n?n(s):vP(s);return EP({circular:e,comparator:s,createState:r,equals:a,strict:o})}ye();var Jy=Os(Zy(),1);ye();ye();ye();ye();ye();ye();var OP=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},IP=({contentComponent:t})=>{let e=(0,Wy.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getServerSnapshot);return b(Ie,{children:Object.values(e)})};function DP(){let t=new Set,e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:My.createPortal(r.reactElement,r.element,n)},t.forEach(o=>o())},removeRenderer(n){let r={...e};delete r[n],e=r,t.forEach(o=>o())}}}var zP=class extends Qt.Component{constructor(t){super(t),this.editorContentRef=Qt.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;let e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;let n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=DP(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var t;let e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;let n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){let{editor:t,innerRef:e,...n}=this.props;return G(Ie,{children:[b("div",{ref:OP(e,this.editorContentRef),...n}),t?.contentComponent&&b(IP,{contentComponent:t.contentComponent})]})}},LP=ze((t,e)=>{let n=Qt.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return Qt.createElement(zP,{key:n,innerRef:e,...t})}),ad=Qt.memo(LP),$P=typeof window<"u"?Te:Q,BP=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",e),()=>{n.off("transaction",e)}}}};function FP(t){var e;let[n]=Ce(()=>new BP(t.editor)),r=(0,Jy.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:By);return $P(()=>n.watch(t.editor),[t.editor,n]),Oi(r),r}var jy=!1,Gy=typeof window>"u",VP=Gy||!!(typeof window<"u"&&window.next),HP=class Yy{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){let e=this.options.current.immediatelyRender,n=e??!0;return Gy?(n&&jy&&console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches"),n=!1):VP&&e===void 0&&(n=!1,jy&&console.warn("Next.js detected. `immediatelyRender` defaults to false to avoid hydration mismatches. Pass `immediatelyRender: true` explicitly if you are rendering the editor only on the client.")),n?this.createEditor():null}createEditor(){let e={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)==null?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)==null?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)==null?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)==null?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)==null?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)==null?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)==null?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)==null?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)==null?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)==null?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)==null?void 0:i.call(o,...r)},onDelete:(...r)=>{var o,i;return(i=(o=this.options.current).onDelete)==null?void 0:i.call(o,...r)}};return new yy(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((o,i)=>{var s;return o===((s=n.extensions)==null?void 0:s[i])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?Yy.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,o)=>r===e[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function Xy(t={},e=[]){let n=L(t);n.current=t;let[r]=Ce(()=>new HP(n)),o=(0,qy.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return Oi(o),Q(r.onRender(e)),FP({editor:o,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&i===0?0:i+1}),o}var Qy=bt({editor:null}),JL=Qy.Consumer;var ex=bt({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var ZP=()=>Rt(ex);var ld=Qt.forwardRef((t,e)=>{let{onDragStart:n}=ZP(),r=t.as||"div";return b(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function Uy(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function Ky(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.forward_ref)"||t.$$typeof.description==="react.forward_ref"))}function jP(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.memo)"||t.$$typeof.description==="react.memo"))}function UP(t){if(Uy(t)||Ky(t))return!0;if(jP(t)){let e=t.type;if(e)return Uy(e)||Ky(e)}return!1}function KP(){try{if(_a)return parseInt(_a.split(".")[0],10)>=19}catch{}return!1}var WP=class{constructor(t,{editor:e,props:n={},as:r="div",className:o=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,this.editor=e,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isEditorContentInitialized?_y(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var t;if(this.destroyed)return;let e=this.component,n=this.props,r=this.editor,o=KP(),i=UP(e),s={...n};s.ref&&!(o||i)&&delete s.ref,!s.ref&&(o||i)&&(s.ref=a=>{this.ref=a}),this.reactElement=b(e,{...s}),(t=r?.contentComponent)==null||t.setRenderer(this.id,this)}updateProps(t={}){if(this.destroyed)return;let e=!1,n=Object.keys(t);for(let r=0;r<n.length;r+=1){let o=n[r];if(t[o]!==this.props[o]){e=!0;break}}e&&(this.props={...this.props,...t},this.render())}destroy(){var t;this.destroyed=!0;let e=this.editor;(t=e?.contentComponent)==null||t.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(t){Object.keys(t).forEach(e=>{this.element.setAttribute(e,t[e])})}},i$=Qt.createContext({markViewContentRef:()=>{}});var qP=class extends Sy{constructor(t,e,n){if(super(t,e,n),this.selectionRafId=null,this.handlePositionUpdate=()=>{let r=this.getPos();typeof r!="number"||r===this.currentPos||(this.currentPos=r,this.renderer.updateProps({getPos:()=>this.getPos()}),typeof this.options.attrs=="function"&&this.updateElementAttributes())},this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";let r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}this.options.trackNodeViewPosition&&this.editor.on("update",this.handlePositionUpdate)}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){let t=this.editor,e=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(e,{get(n,r,o){var i;return r==="storage"?(i=t.storage[e.name])!=null?i:{}:Reflect.get(n,r,o)}})}return this.cachedExtensionWithSyncedStorage}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(c={})=>this.updateAttributes(c),deleteNode:()=>this.deleteNode(),ref:ed()};if(!this.component.displayName){let c=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=c(this.extension.name)}let o={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:c=>{c&&this.contentDOMElement&&c.firstChild!==this.contentDOMElement&&(c.hasAttribute("data-node-view-wrapper")&&c.removeAttribute("data-node-view-wrapper"),c.appendChild(this.contentDOMElement))}},i=this.component,s=td(c=>b(ex.Provider,{value:o,children:Ni(i,c)}));s.displayName="ReactNodeView";let a=this.node.isInline?"span":"div";this.options.as&&(a=this.options.as);let{className:l=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new WP(s,{editor:this.editor,props:e,as:a,className:`node-${this.node.type.name} ${l}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes(),this.currentPos=this.getPos()}get dom(){var t;if(this.renderer.element.firstElementChild&&!((t=this.renderer.element.firstElementChild)!=null&&t.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let t=this.currentPos;if(typeof t!="number")return;if(ey({selection:this.editor.state.selection,pos:t,nodeSize:this.node.nodeSize,selectedOnTextSelection:this.options.selectedOnTextSelection})){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(t,e,n){let r=a=>{this.renderer.updateProps(a),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(t.type!==this.node.type)return!1;if(typeof this.options.update=="function"){let a=this.node,l=this.decorations,c=this.innerDecorations;return this.node=t,this.decorations=e,this.innerDecorations=n,this.currentPos=this.getPos(),this.options.update({oldNode:a,oldDecorations:l,newNode:t,newDecorations:e,oldInnerDecorations:c,innerDecorations:n,updateProps:()=>r({node:t,decorations:e,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}if(!(t!==this.node))return this.node=t,this.decorations=e,this.innerDecorations=n,!0;let i=this.getPos();this.node=t,this.decorations=e,this.innerDecorations=n,this.currentPos=i;let s={node:t,decorations:e,innerDecorations:n,extension:this.extensionWithSyncedStorage};return this.options.trackNodeViewPosition&&(s.getPos=()=>this.getPos()),r(s),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.options.trackNodeViewPosition&&this.editor.off("update",this.handlePositionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let t={};if(typeof this.options.attrs=="function"){let e=this.editor.extensionManager.attributes,n=So(this.node,e);t=this.options.attrs({node:this.node,HTMLAttributes:n})}else t=this.options.attrs;this.renderer.updateAttributes(t)}}};function tx(t,e){return n=>n.editor.contentComponent?new qP(t,n,e):{}}var cd=bt({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});cd.displayName="TiptapContext";var JP=()=>Rt(cd);function nx({editor:t,instance:e,children:n}){let r=t??e;if(!r)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let o=$e(()=>({editor:r}),[r]),i=$e(()=>({editor:r}),[r]);return b(Qy.Provider,{value:i,children:b(cd.Provider,{value:o,children:n})})}nx.displayName="Tiptap";function rx({...t}){let{editor:e}=JP();return b(ad,{editor:e,...t})}rx.displayName="Tiptap.Content";var d$=Object.assign(nx,{Content:rx});var ox="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var ud=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=ox[n[t]&63];return e};ye();function ix({triggerPosition:t,trailingText:e}){return t+1+e.length}function GP(t){return t.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")}function YP(t,e){let n=GP(t.char),r=t.kind==="mention"?`(?:[^\\s${n}]| )*`:"\\S*",o=e.windowed?"([\\s([{])":"(^|[\\s([{])";return new RegExp(`${o}${n}(${r})$`,"u")}var XP=256;function dd(t,e){let n=t.state.selection;if(!n.empty)return null;let r=Math.max(0,n.from-XP),o=r>0,i=t.state.doc.textBetween(r,n.from,`
|
|
106
|
+
${h}`}}),l}function nM(t,e,n={}){let{state:r}=e,{doc:o,tr:i}=r,s=t;o.descendants((a,l)=>{let c=i.mapping.map(l),u=i.mapping.map(l)+a.nodeSize,d=null;if(a.marks.forEach(p=>{if(p!==s)return!1;d=p}),!d)return;let f=!1;if(Object.keys(n).forEach(p=>{n[p]!==d.attrs[p]&&(f=!0)}),f){let p=t.type.create({...t.attrs,...n});i.removeMark(c,u,t.type),i.addMark(c,u,p)}}),i.docChanged&&e.view.dispatch(i)}var Ut=class wy extends Hu{constructor(){super(...arguments),this.type="node"}static create(e={}){let n=typeof e=="function"?e():e;return new wy(n)}configure(e){return super.configure(e)}extend(e){let n=typeof e=="function"?e():e;return super.extend(n)}},Sy=class{constructor(t,e,n){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.innerDecorations=e.innerDecorations,this.view=e.view,this.HTMLAttributes=e.HTMLAttributes,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,n,r,o,i,s,a;let{view:l}=this.editor,c=t.target,u=c.nodeType===3?(e=c.parentElement)==null?void 0:e.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(c)||!u)return;let d=0,f=0;if(this.dom!==u){let E=this.dom.getBoundingClientRect(),S=u.getBoundingClientRect(),M=(o=t.offsetX)!=null?o:(r=t.nativeEvent)==null?void 0:r.offsetX,T=(s=t.offsetY)!=null?s:(i=t.nativeEvent)==null?void 0:i.offsetY;d=S.x-E.x+M,f=S.y-E.y+T}let p=this.dom.cloneNode(!0);try{let E=this.dom.getBoundingClientRect();p.style.width=`${Math.round(E.width)}px`,p.style.height=`${Math.round(E.height)}px`,p.style.boxSizing="border-box",p.style.pointerEvents="none"}catch{}let h=null;try{h=document.createElement("div"),h.style.position="absolute",h.style.top="-9999px",h.style.left="-9999px",h.style.pointerEvents="none",h.appendChild(p),document.body.appendChild(h),(a=t.dataTransfer)==null||a.setDragImage(p,d,f)}finally{h&&setTimeout(()=>{try{h?.remove()}catch{}},0)}let m=this.getPos();if(typeof m!="number")return;let g=ee.create(l.state.doc,m),y=l.state.tr.setSelection(g);l.dispatch(y)}stopEvent(t){var e;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});let n=t.target;if(!(this.dom.contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;let o=t.type.startsWith("drag"),i=t.type==="dragover"||t.type==="dragenter",s=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!s&&!o)return!0;let{isEditable:l}=this.editor,{isDragging:c}=this,u=!!this.node.type.spec.draggable,d=ee.isSelectable(this.node),f=t.type==="copy",p=t.type==="paste",h=t.type==="cut",m=t.type==="mousedown";if(!u&&d&&o&&t.target===this.dom&&t.preventDefault(),u&&o&&!c&&t.target===this.dom)return t.preventDefault(),!1;if(u&&l&&!c&&m){let g=n.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||i||s||f||p||h||m&&d)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(Pi()||Nu())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:e})=>{let n=this.getPos();return typeof n!="number"?!1:(e.setNodeMarkup(n,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){let t=this.getPos();if(typeof t!="number")return;let e=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:e})}};var Ea=200,rt=function(){};rt.prototype.append=function(e){return e.length?(e=rt.from(e),!this.length&&e||e.length<Ea&&this.leafAppend(e)||this.length<Ea&&e.leafPrepend(this)||this.appendInner(e)):this};rt.prototype.prepend=function(e){return e.length?rt.from(e).append(this):this};rt.prototype.appendInner=function(e){return new rM(this,e)};rt.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?rt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};rt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};rt.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};rt.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(e(i,s))},n,r),o};rt.from=function(e){return e instanceof rt?e:e&&e.length?new ky(e):rt.empty};var ky=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,s,a){for(var l=i;l<s;l++)if(o(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,s,a){for(var l=i-1;l>=s;l--)if(o(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=Ea)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=Ea)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(rt);rt.empty=new ky([]);var rM=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,i,s){var a=this.left.length;if(o<a&&this.left.forEachInner(r,o,Math.min(i,a),s)===!1||i>a&&this.right.forEachInner(r,Math.max(o-a,0),Math.min(this.length,i)-a,s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,s){var a=this.left.length;if(o>a&&this.right.forEachInvertedInner(r,o-a,Math.max(i,a)-a,s+a)===!1||i<a&&this.left.forEachInvertedInner(r,Math.min(o,a),i,s)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(rt),Ku=rt;var oM=500,vr=class t{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=e.tr,a,l,c=[],u=[];return this.items.forEach((d,f)=>{if(!d.step){o||(o=this.remapping(r,f+1),i=o.maps.length),i--,u.push(d);return}if(o){u.push(new an(d.map));let p=d.step.map(o.slice(i)),h;p&&s.maybeStep(p).doc&&(h=s.mapping.maps[s.mapping.maps.length-1],c.push(new an(h,void 0,void 0,c.length+u.length))),i--,h&&o.appendMap(h,i)}else s.maybeStep(d.step);if(d.selection)return a=o?d.selection.map(o.slice(i)):d.selection,l=new t(this.items.slice(0,r).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,n,r,o){let i=[],s=this.eventCount,a=this.items,l=!o&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),f=new an(e.mapping.maps[u],d,n),p;(p=l&&l.merge(f))&&(f=p,u?i.pop():a=a.slice(0,a.length-1)),i.push(f),n&&(s++,n=void 0),o||(l=f)}let c=s-r.depth;return c>sM&&(a=iM(a,c),s-=c),new t(a.append(i),s)}remapping(e,n){let r=new di;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new t(this.items.append(e.map(n=>new an(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},o);let l=n;this.items.forEach(f=>{let p=i.getMirror(--l);if(p==null)return;s=Math.min(s,p);let h=i.maps[p];if(f.step){let m=e.steps[p].invert(e.docs[p]),g=f.selection&&f.selection.map(i.slice(l+1,p));g&&a++,r.push(new an(h,m,g))}else r.push(new an(h))},o);let c=[];for(let f=n;f<s;f++)c.push(new an(i.maps[f]));let u=this.items.slice(0,o).append(c).append(r),d=new t(u,a);return d.emptyItemCount()>oM&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((s,a)=>{if(a>=e)o.push(s),s.selection&&i++;else if(s.step){let l=s.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=s.selection&&s.selection.map(n.slice(r));u&&i++;let d=new an(c.invert(),l,u),f,p=o.length-1;(f=o.length&&o[p].merge(d))?o[p]=f:o.push(d)}}else s.map&&r--},this.items.length,0),new t(Ku.from(o.reverse()),i)}};vr.empty=new vr(Ku.empty,0);function iM(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}var an=class t{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new t(n.getMap().invert(),n,this.selection)}}},ln=class{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}},sM=20;function aM(t,e,n,r){let o=n.getMeta(Fn),i;if(o)return o.historyState;n.getMeta(Cy)&&(t=new ln(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(Fn))return s.getMeta(Fn).redo?new ln(t.done.addTransform(n,void 0,r,Ca(e)),t.undone,vy(n.mapping.maps),t.prevTime,t.prevComposition):new ln(t.done,t.undone.addTransform(n,void 0,r,Ca(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!s&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!lM(n,t.prevRanges)),c=s?Wu(t.prevRanges,n.mapping):vy(n.mapping.maps);return new ln(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Ca(e)),vr.empty,c,n.time,a??t.prevComposition)}else return(i=n.getMeta("rebased"))?new ln(t.done.rebased(n,i),t.undone.rebased(n,i),Wu(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new ln(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Wu(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function lM(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&o>=e[i]&&(n=!0)}),n}function vy(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,i,s)=>e.push(i,s));return e}function Wu(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function cM(t,e,n){let r=Ca(e),o=Fn.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),a=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),l=new ln(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(s).setMeta(Fn,{redo:n,historyState:l})}var qu=!1,Ey=null;function Ca(t){let e=t.plugins;if(Ey!=e){qu=!1,Ey=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){qu=!0;break}}return qu}function cn(t){return t.setMeta(Cy,!0)}var Fn=new xe("history"),Cy=new xe("closeHistory");function Ty(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new pe({key:Fn,state:{init(){return new ln(vr.empty,vr.empty,null,0,-1)},apply(e,n,r){return aM(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?Ju:r=="historyRedo"?Gu:null;return!o||!e.editable?!1:(n.preventDefault(),o(e.state,e.dispatch))}}}})}function Ta(t,e){return(n,r)=>{let o=Fn.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=cM(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}var Ju=Ta(!1,!0),Gu=Ta(!0,!0),cL=Ta(!1,!1),uL=Ta(!0,!1);function Yu(t){return t.getMeta(Fn)!=null}ye();ye();var rd=globalThis.__bbPluginRuntime;if(rd==null||rd.reactDom==null)throw new Error('Cannot load "react-dom": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ra=rd.reactDom,My="default"in Ra?Ra.default:Ra,{createPortal:Py,flushSync:_y,preconnect:hL,prefetchDNS:mL,preinit:gL,preinitModule:yL,preload:xL,preloadModule:bL,requestFormReset:wL,unstable_batchedUpdates:SL,useFormState:kL,useFormStatus:vL,version:EL}=Ra;var Wy=Os(Aa(),1);var id=globalThis.__bbPluginRuntime;if(id==null||id.jsxRuntime==null)throw new Error('Cannot load "react/jsx-runtime": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Na=id.jsxRuntime,PL="default"in Na?Na.default:Na,{Fragment:Ie,jsx:b,jsxs:G}=Na;ye();var qy=Os(Aa(),1);var{getOwnPropertyNames:VM,getOwnPropertySymbols:HM}=Object,{hasOwnProperty:ZM}=Object.prototype;function sd(t,e){return function(r,o,i){return t(r,o,i)&&e(r,o,i)}}function Oa(t){return function(n,r,o){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,o);let{cache:i}=o,s=i.get(n),a=i.get(r);if(s&&a)return s===r&&a===n;i.set(n,r),i.set(r,n);let l=t(n,r,o);return i.delete(n),i.delete(r),l}}function jM(t){return t?.[Symbol.toStringTag]}function Oy(t){return VM(t).concat(HM(t))}var UM=Object.hasOwn||((t,e)=>ZM.call(t,e));function Er(t,e){return t===e||!t&&!e&&t!==t&&e!==e}var KM="__v",WM="__o",qM="_owner",{getOwnPropertyDescriptor:Iy,keys:Dy}=Object;function JM(t,e){return t.byteLength===e.byteLength&&Ia(new Uint8Array(t),new Uint8Array(e))}function GM(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function YM(t,e){return t.byteLength===e.byteLength&&Ia(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function XM(t,e){return Er(t.getTime(),e.getTime())}function QM(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function eP(t,e){return t===e}function zy(t,e,n){let r=t.size;if(r!==e.size)return!1;if(!r)return!0;let o=new Array(r),i=t.entries(),s,a,l=0;for(;(s=i.next())&&!s.done;){let c=e.entries(),u=!1,d=0;for(;(a=c.next())&&!a.done;){if(o[d]){d++;continue}let f=s.value,p=a.value;if(n.equals(f[0],p[0],l,d,t,e,n)&&n.equals(f[1],p[1],f[0],p[0],t,e,n)){u=o[d]=!0;break}d++}if(!u)return!1;l++}return!0}var tP=Er;function nP(t,e,n){let r=Dy(t),o=r.length;if(Dy(e).length!==o)return!1;for(;o-- >0;)if(!$y(t,e,n,r[o]))return!1;return!0}function Di(t,e,n){let r=Oy(t),o=r.length;if(Oy(e).length!==o)return!1;let i,s,a;for(;o-- >0;)if(i=r[o],!$y(t,e,n,i)||(s=Iy(t,i),a=Iy(e,i),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable)))return!1;return!0}function rP(t,e){return Er(t.valueOf(),e.valueOf())}function oP(t,e){return t.source===e.source&&t.flags===e.flags}function Ly(t,e,n){let r=t.size;if(r!==e.size)return!1;if(!r)return!0;let o=new Array(r),i=t.values(),s,a;for(;(s=i.next())&&!s.done;){let l=e.values(),c=!1,u=0;for(;(a=l.next())&&!a.done;){if(!o[u]&&n.equals(s.value,a.value,s.value,a.value,t,e,n)){c=o[u]=!0;break}u++}if(!c)return!1}return!0}function Ia(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function iP(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function $y(t,e,n,r){return(r===qM||r===WM||r===KM)&&(t.$$typeof||e.$$typeof)?!0:UM(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}var sP="[object ArrayBuffer]",aP="[object Arguments]",lP="[object Boolean]",cP="[object DataView]",uP="[object Date]",dP="[object Error]",pP="[object Map]",fP="[object Number]",hP="[object Object]",mP="[object RegExp]",gP="[object Set]",yP="[object String]",xP={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},bP="[object URL]",wP=Object.prototype.toString;function SP({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:o,areFunctionsEqual:i,areMapsEqual:s,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:h}){return function(g,y,E){if(g===y)return!0;if(g==null||y==null)return!1;let S=typeof g;if(S!==typeof y)return!1;if(S!=="object")return S==="number"?a(g,y,E):S==="function"?i(g,y,E):!1;let M=g.constructor;if(M!==y.constructor)return!1;if(M===Object)return l(g,y,E);if(Array.isArray(g))return e(g,y,E);if(M===Date)return r(g,y,E);if(M===RegExp)return u(g,y,E);if(M===Map)return s(g,y,E);if(M===Set)return d(g,y,E);let T=wP.call(g);if(T===uP)return r(g,y,E);if(T===mP)return u(g,y,E);if(T===pP)return s(g,y,E);if(T===gP)return d(g,y,E);if(T===hP)return typeof g.then!="function"&&typeof y.then!="function"&&l(g,y,E);if(T===bP)return p(g,y,E);if(T===dP)return o(g,y,E);if(T===aP)return l(g,y,E);if(xP[T])return f(g,y,E);if(T===sP)return t(g,y,E);if(T===cP)return n(g,y,E);if(T===lP||T===fP||T===yP)return c(g,y,E);if(h){let C=h[T];if(!C){let R=jM(g);R&&(C=h[R])}if(C)return C(g,y,E)}return!1}}function kP({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:JM,areArraysEqual:n?Di:GM,areDataViewsEqual:YM,areDatesEqual:XM,areErrorsEqual:QM,areFunctionsEqual:eP,areMapsEqual:n?sd(zy,Di):zy,areNumbersEqual:tP,areObjectsEqual:n?Di:nP,arePrimitiveWrappersEqual:rP,areRegExpsEqual:oP,areSetsEqual:n?sd(Ly,Di):Ly,areTypedArraysEqual:n?sd(Ia,Di):Ia,areUrlsEqual:iP,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){let o=Oa(r.areArraysEqual),i=Oa(r.areMapsEqual),s=Oa(r.areObjectsEqual),a=Oa(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:o,areMapsEqual:i,areObjectsEqual:s,areSetsEqual:a})}return r}function vP(t){return function(e,n,r,o,i,s,a){return t(e,n,a)}}function EP({circular:t,comparator:e,createState:n,equals:r,strict:o}){if(n)return function(a,l){let{cache:c=t?new WeakMap:void 0,meta:u}=n();return e(a,l,{cache:c,equals:r,meta:u,strict:o})};if(t)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:o})};let i={cache:void 0,equals:r,meta:void 0,strict:o};return function(a,l){return e(a,l,i)}}var By=Vn(),RL=Vn({strict:!0}),AL=Vn({circular:!0}),NL=Vn({circular:!0,strict:!0}),OL=Vn({createInternalComparator:()=>Er}),IL=Vn({strict:!0,createInternalComparator:()=>Er}),DL=Vn({circular:!0,createInternalComparator:()=>Er}),zL=Vn({circular:!0,createInternalComparator:()=>Er,strict:!0});function Vn(t={}){let{circular:e=!1,createInternalComparator:n,createState:r,strict:o=!1}=t,i=kP(t),s=SP(i),a=n?n(s):vP(s);return EP({circular:e,comparator:s,createState:r,equals:a,strict:o})}ye();var Jy=Os(Zy(),1);ye();ye();ye();ye();ye();ye();var OP=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},IP=({contentComponent:t})=>{let e=(0,Wy.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getServerSnapshot);return b(Ie,{children:Object.values(e)})};function DP(){let t=new Set,e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:My.createPortal(r.reactElement,r.element,n)},t.forEach(o=>o())},removeRenderer(n){let r={...e};delete r[n],e=r,t.forEach(o=>o())}}}var zP=class extends Qt.Component{constructor(t){super(t),this.editorContentRef=Qt.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;let e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;let n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=DP(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var t;let e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;let n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){let{editor:t,innerRef:e,...n}=this.props;return G(Ie,{children:[b("div",{ref:OP(e,this.editorContentRef),...n}),t?.contentComponent&&b(IP,{contentComponent:t.contentComponent})]})}},LP=ze((t,e)=>{let n=Qt.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return Qt.createElement(zP,{key:n,innerRef:e,...t})}),ad=Qt.memo(LP),$P=typeof window<"u"?Te:Q,BP=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){let e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",e),()=>{n.off("transaction",e)}}}};function FP(t){var e;let[n]=Ce(()=>new BP(t.editor)),r=(0,Jy.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:By);return $P(()=>n.watch(t.editor),[t.editor,n]),Oi(r),r}var jy=!1,Gy=typeof window>"u",VP=Gy||!!(typeof window<"u"&&window.next),HP=class Yy{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){let e=this.options.current.immediatelyRender,n=e??!0;return Gy?(n&&jy&&console.warn("SSR detected. `immediatelyRender` has been set to false to avoid hydration mismatches"),n=!1):VP&&e===void 0&&(n=!1,jy&&console.warn("Next.js detected. `immediatelyRender` defaults to false to avoid hydration mismatches. Pass `immediatelyRender: true` explicitly if you are rendering the editor only on the client.")),n?this.createEditor():null}createEditor(){let e={...this.options.current,onBeforeCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onBeforeCreate)==null?void 0:i.call(o,...r)},onBlur:(...r)=>{var o,i;return(i=(o=this.options.current).onBlur)==null?void 0:i.call(o,...r)},onCreate:(...r)=>{var o,i;return(i=(o=this.options.current).onCreate)==null?void 0:i.call(o,...r)},onDestroy:(...r)=>{var o,i;return(i=(o=this.options.current).onDestroy)==null?void 0:i.call(o,...r)},onFocus:(...r)=>{var o,i;return(i=(o=this.options.current).onFocus)==null?void 0:i.call(o,...r)},onSelectionUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onSelectionUpdate)==null?void 0:i.call(o,...r)},onTransaction:(...r)=>{var o,i;return(i=(o=this.options.current).onTransaction)==null?void 0:i.call(o,...r)},onUpdate:(...r)=>{var o,i;return(i=(o=this.options.current).onUpdate)==null?void 0:i.call(o,...r)},onContentError:(...r)=>{var o,i;return(i=(o=this.options.current).onContentError)==null?void 0:i.call(o,...r)},onDrop:(...r)=>{var o,i;return(i=(o=this.options.current).onDrop)==null?void 0:i.call(o,...r)},onPaste:(...r)=>{var o,i;return(i=(o=this.options.current).onPaste)==null?void 0:i.call(o,...r)},onDelete:(...r)=>{var o,i;return(i=(o=this.options.current).onDelete)==null?void 0:i.call(o,...r)}};return new yy(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((o,i)=>{var s;return o===((s=n.extensions)==null?void 0:s[i])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?Yy.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,o)=>r===e[o]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function Xy(t={},e=[]){let n=L(t);n.current=t;let[r]=Ce(()=>new HP(n)),o=(0,qy.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return Oi(o),Q(r.onRender(e)),FP({editor:o,selector:({transactionNumber:i})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&i===0?0:i+1}),o}var Qy=bt({editor:null}),JL=Qy.Consumer;var ex=bt({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}});var ZP=()=>Rt(ex);var ld=Qt.forwardRef((t,e)=>{let{onDragStart:n}=ZP(),r=t.as||"div";return b(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function Uy(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function Ky(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.forward_ref)"||t.$$typeof.description==="react.forward_ref"))}function jP(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.memo)"||t.$$typeof.description==="react.memo"))}function UP(t){if(Uy(t)||Ky(t))return!0;if(jP(t)){let e=t.type;if(e)return Uy(e)||Ky(e)}return!1}function KP(){try{if(_a)return parseInt(_a.split(".")[0],10)>=19}catch{}return!1}var WP=class{constructor(t,{editor:e,props:n={},as:r="div",className:o=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,this.editor=e,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),this.editor.isEditorContentInitialized?_y(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var t;if(this.destroyed)return;let e=this.component,n=this.props,r=this.editor,o=KP(),i=UP(e),s={...n};s.ref&&!(o||i)&&delete s.ref,!s.ref&&(o||i)&&(s.ref=a=>{this.ref=a}),this.reactElement=b(e,{...s}),(t=r?.contentComponent)==null||t.setRenderer(this.id,this)}updateProps(t={}){if(this.destroyed)return;let e=!1,n=Object.keys(t);for(let r=0;r<n.length;r+=1){let o=n[r];if(t[o]!==this.props[o]){e=!0;break}}e&&(this.props={...this.props,...t},this.render())}destroy(){var t;this.destroyed=!0;let e=this.editor;(t=e?.contentComponent)==null||t.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(t){Object.keys(t).forEach(e=>{this.element.setAttribute(e,t[e])})}},i$=Qt.createContext({markViewContentRef:()=>{}});var qP=class extends Sy{constructor(t,e,n){if(super(t,e,n),this.selectionRafId=null,this.handlePositionUpdate=()=>{let r=this.getPos();typeof r!="number"||r===this.currentPos||(this.currentPos=r,this.renderer.updateProps({getPos:()=>this.getPos()}),typeof this.options.attrs=="function"&&this.updateElementAttributes())},this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";let r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}this.options.trackNodeViewPosition&&this.editor.on("update",this.handlePositionUpdate)}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){let t=this.editor,e=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(e,{get(n,r,o){var i;return r==="storage"?(i=t.storage[e.name])!=null?i:{}:Reflect.get(n,r,o)}})}return this.cachedExtensionWithSyncedStorage}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(c={})=>this.updateAttributes(c),deleteNode:()=>this.deleteNode(),ref:ed()};if(!this.component.displayName){let c=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=c(this.extension.name)}let o={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:c=>{c&&this.contentDOMElement&&c.firstChild!==this.contentDOMElement&&(c.hasAttribute("data-node-view-wrapper")&&c.removeAttribute("data-node-view-wrapper"),c.appendChild(this.contentDOMElement))}},i=this.component,s=td(c=>b(ex.Provider,{value:o,children:Ni(i,c)}));s.displayName="ReactNodeView";let a=this.node.isInline?"span":"div";this.options.as&&(a=this.options.as);let{className:l=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new WP(s,{editor:this.editor,props:e,as:a,className:`node-${this.node.type.name} ${l}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes(),this.currentPos=this.getPos()}get dom(){var t;if(this.renderer.element.firstElementChild&&!((t=this.renderer.element.firstElementChild)!=null&&t.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let t=this.currentPos;if(typeof t!="number")return;if(ey({selection:this.editor.state.selection,pos:t,nodeSize:this.node.nodeSize,selectedOnTextSelection:this.options.selectedOnTextSelection})){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(t,e,n){let r=a=>{this.renderer.updateProps(a),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(t.type!==this.node.type)return!1;if(typeof this.options.update=="function"){let a=this.node,l=this.decorations,c=this.innerDecorations;return this.node=t,this.decorations=e,this.innerDecorations=n,this.currentPos=this.getPos(),this.options.update({oldNode:a,oldDecorations:l,newNode:t,newDecorations:e,oldInnerDecorations:c,innerDecorations:n,updateProps:()=>r({node:t,decorations:e,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}if(!(t!==this.node))return this.node=t,this.decorations=e,this.innerDecorations=n,!0;let i=this.getPos();this.node=t,this.decorations=e,this.innerDecorations=n,this.currentPos=i;let s={node:t,decorations:e,innerDecorations:n,extension:this.extensionWithSyncedStorage};return this.options.trackNodeViewPosition&&(s.getPos=()=>this.getPos()),r(s),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.options.trackNodeViewPosition&&this.editor.off("update",this.handlePositionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let t={};if(typeof this.options.attrs=="function"){let e=this.editor.extensionManager.attributes,n=So(this.node,e);t=this.options.attrs({node:this.node,HTMLAttributes:n})}else t=this.options.attrs;this.renderer.updateAttributes(t)}}};function tx(t,e){return n=>n.editor.contentComponent?new qP(t,n,e):{}}var cd=bt({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});cd.displayName="TiptapContext";var JP=()=>Rt(cd);function nx({editor:t,instance:e,children:n}){let r=t??e;if(!r)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let o=$e(()=>({editor:r}),[r]),i=$e(()=>({editor:r}),[r]);return b(Qy.Provider,{value:i,children:b(cd.Provider,{value:o,children:n})})}nx.displayName="Tiptap";function rx({...t}){let{editor:e}=JP();return b(ad,{editor:e,...t})}rx.displayName="Tiptap.Content";var d$=Object.assign(nx,{Content:rx});var ox="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var ud=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=ox[n[t]&63];return e};ye();function ix({triggerPosition:t,trailingText:e}){return t+1+e.length}function GP(t){return t.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")}function YP(t,e){let n=GP(t.char),r=t.kind==="mention"?`(?:[^\\s${n}]| )*`:"\\S*",o=e.windowed?"([\\s([{])":"(^|[\\s([{])";return new RegExp(`${o}${n}(${r})$`,"u")}var XP=256;function dd(t,e){let n=t.state.selection;if(!n.empty)return null;let r=Math.max(0,n.from-XP),o=r>0,i=t.state.doc.textBetween(r,n.from,`
|
|
107
107
|
`,`
|
|
108
|
-
`);for(let s of e){let a=YP(s,{windowed:o}).exec(i);if(!a)continue;let l=a[2]??"",c=n.from-l.length-1;if(!(c<0))return s.kind==="mention"?{char:s.char,kind:"mention",query:l,from:c,to:n.from}:{char:s.char,kind:"command",query:l,from:c,to:n.from}}return null}function zi(t){return t.type==="localImage"||t.mimeType?.toLowerCase().startsWith("image/")===!0}function Cr({path:t,mimeType:e}){return e?.toLowerCase().startsWith("video/")===!0||/\.(mp4|m4v|mov|webm|ogv|ogg)(?:[?#].*)?$/i.test(t)}function pd({currentIndex:t,direction:e,itemCount:n}){return n<=0?t:e==="previous"?t===0?n-1:t-1:t===n-1?0:t+1}function sx(t){return t.trim().toLowerCase()}function QP(t,e){let n=sx(t);return e.length===0||n===e?0:n.startsWith(e)?1:2}function ax(t,e){let n=sx(e),r=t.filter(o=>!zi(o)&&o.name.toLowerCase().includes(n)).map((o,i)=>({index:i,rank:QP(o.name,n),suggestion:{kind:"attachment",key:JSON.stringify(["attachment",o.path]),text:o.name,mention:{kind:"attachment",path:o.path,label:o.name}}})).sort((o,i)=>o.rank-i.rank||o.index-i.index).map(({suggestion:o})=>o);return r.length===0?null:{key:"attachments",label:"Attachments",suggestions:r}}function e1(t){return JSON.stringify([t.kind,t.source,t.origin,t.pluginId??null,t.name])}function To(t){return t.kind==="command"?e1(t):t.key}ye();ye();ye();function lx(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function t1(...t){return e=>{let n=!1,r=t.map(o=>{let i=lx(o,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){let i=r[o];typeof i=="function"?i():lx(t[o],null)}}}}function cx(...t){return Z(t1(...t),t)}function n1(t){let e=ze((n,r)=>{let{children:o,...i}=n,s=null,a=!1,l=[];ux(o)&&typeof za=="function"&&(o=za(o._payload)),Pa.forEach(o,f=>{if(a1(f)){a=!0;let p=f,h="child"in p.props?p.props.child:p.props.children;ux(h)&&typeof za=="function"&&(h=za(h._payload)),s=o1(p,h),l.push(s?.props?.children)}else l.push(f)}),s?s=Ai(s,void 0,l):!a&&Pa.count(o)===1&&Eo(o)&&(s=o);let c=s?s1(s):void 0,u=cx(r,c);if(!s){if(o||o===0)throw new Error(a?d1(t):u1(t));return o}let d=i1(i,s.props??{});return s.type!==Qu&&(d.ref=r?u:c),Ai(s,d)});return e.displayName=`${t}.Slot`,e}var Mo=n1("Slot"),r1=Symbol.for("radix.slottable");var o1=(t,e)=>{if("child"in t.props){let n=t.props.child;return Eo(n)?Ai(n,void 0,t.props.children(n.props.children)):null}return Eo(e)?e:null};function i1(t,e){let n={...e};for(let r in e){let o=t[r],i=e[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{let l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...t,...n}}function s1(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function a1(t){return Eo(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===r1}var l1=Symbol.for("react.lazy");function ux(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===l1&&"_payload"in t&&c1(t._payload)}function c1(t){return typeof t=="object"&&t!==null&&"then"in t}var u1=t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,d1=t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,za=Kt[" use ".trim().toString()];var fd=globalThis.__bbPluginRuntime;if(fd==null||fd.classVarianceAuthority==null)throw new Error('Cannot load "class-variance-authority": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var La=fd.classVarianceAuthority,P$="default"in La?La.default:La,{cva:dx,cx:_$}=La;var hd=globalThis.__bbPluginRuntime;if(hd==null||hd.clsx==null)throw new Error('Cannot load "clsx": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var $a=hd.clsx,A$="default"in $a?$a.default:$a,{clsx:px}=$a;var md=globalThis.__bbPluginRuntime;if(md==null||md.tailwindMerge==null)throw new Error('Cannot load "tailwind-merge": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ba=md.tailwindMerge,O$="default"in Ba?Ba.default:Ba,{createTailwindMerge:I$,extendTailwindMerge:D$,fromTheme:z$,getDefaultConfig:L$,mergeConfigs:$$,twJoin:B$,twMerge:fx,validators:F$}=Ba;function q(...t){return fx(px(t))}var Fa="transition-colors duration-150 hover:duration-0",Li="transition-none";var p1=dx(`inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ${Fa} focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0`,{variants:{variant:{default:"bg-foreground text-background hover:bg-foreground/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-transparent hover:bg-state-hover hover:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-state-hover hover:text-foreground aria-pressed:bg-state-active aria-pressed:text-foreground aria-pressed:hover:bg-state-active data-[state=open]:bg-state-active data-[state=open]:text-foreground data-[state=open]:hover:bg-state-active",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),un=ze(({className:t,variant:e,size:n,asChild:r=!1,...o},i)=>b(r?Mo:"button",{className:q(p1({variant:e,size:n,className:t})),ref:i,...o}));un.displayName="Button";var Ne=Ds;ye();var gd=globalThis.__bbPluginRuntime;if(gd==null||gd.radixTooltip==null)throw new Error('Cannot load "@radix-ui/react-tooltip": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Va=gd.radixTooltip,eB="default"in Va?Va.default:Va,{Arrow:tB,Content:yd,Portal:hx,Provider:mx,Root:gx,Tooltip:nB,TooltipArrow:rB,TooltipContent:oB,TooltipPortal:iB,TooltipProvider:sB,TooltipTrigger:aB,Trigger:xd,createTooltipScope:lB}=Va;function Tr(){let t="bb--composer";return{"data-bb-portaled-overlay":"","data-bb-plugin-root":"",...t!==void 0?{"data-bb-plugin":t}:{}}}var h1="select-none",m1=new Set(["button","checkbox","file","hidden","image","radio","range","reset","submit"]),Ha=t=>q(h1,t);function g1(t){return t instanceof HTMLTextAreaElement?!0:t instanceof HTMLInputElement?!t.disabled&&!t.readOnly&&!m1.has(t.type):t instanceof HTMLElement?t.isContentEditable||t.closest("[contenteditable='true']")!==null:!1}function Mr(t){if(typeof document>"u")return;let e=document.activeElement;!e||!g1(e)||t!==null&&!t.contains(e)||e.blur()}function Za(){Mr(null)}function yx(){Mr(null)}function $i(t){t.preventDefault()}var bd="pointer";typeof document<"u"&&(document.addEventListener("keydown",()=>{bd="keyboard"},{capture:!0}),document.addEventListener("pointerdown",()=>{bd="pointer"},{capture:!0}));function ja(){return bd==="keyboard"}var xx=mx,bx=gx,wd=ze(function({onFocus:e,...n},r){return b(xd,{ref:r,onFocus:o=>{e?.(o),!o.defaultPrevented&&!ja()&&o.preventDefault()},...n})});wd.displayName=xd.displayName;var Sd=ze(function({avoidCollisions:e=!0,className:n,collisionPadding:r=8,sideOffset:o=4,...i},s){return b(hx,{children:b(yd,{ref:s,...Tr(),avoidCollisions:e,collisionPadding:r,sideOffset:o,className:q("z-50 max-w-[min(20rem,var(--radix-tooltip-content-available-width))] overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground break-words animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),...i})})});Sd.displayName=yd.displayName;ye();ye();ye();var Bi="(prefers-reduced-motion: reduce)",Ua=new Map;function y1(t){if(typeof window>"u"||!window.matchMedia)return null;let e=Ua.get(t);if(e)return e;let n=window.matchMedia(t),r=new Set,o=()=>{for(let i of r)i()};return e={mql:n,subscribe(i){let s=r.size===0;return r.add(i),s&&n.addEventListener("change",o),()=>{r.delete(i),r.size===0&&(n.removeEventListener("change",o),Ua.delete(t))}}},Ua.set(t,e),e}function x1(t,e){return y1(t)?.subscribe(e)??(()=>{})}function Po(t){return typeof window>"u"||!window.matchMedia?!1:Ua.get(t)?.mql.matches??window.matchMedia(t).matches}function Ka(t){return nd(e=>x1(t,e),()=>Po(t),()=>!1)}var b1="(max-width: 767px)",w1=bt(null);function Hn(){let t=Rt(w1),e=Ka(b1);return t!==null?t:e}ye();var S1="(pointer: coarse)";function Wa(){return Ka(S1)}var k1=120,kx={width:"auto",minWidth:"auto",maxWidth:"none"},kd="--bb-drawer-keyboard-inset",v1=80;function qa(t){t!==null&&(t.style.height="",t.style.bottom="",t.style.removeProperty(kd))}function E1({layoutViewportHeight:t,visualViewportHeight:e,visualViewportOffsetTop:n}){let r=Math.round(t-(e+n));return r>=v1?r:0}function C1(t,e){Q(()=>{let n=t.current,r=window.visualViewport;if(n===null||!e||!r)return;let o=null,i=()=>{if(o=null,r.scale!==1){qa(n);return}let a=E1({layoutViewportHeight:n.ownerDocument.documentElement.clientHeight,visualViewportHeight:r.height,visualViewportOffsetTop:r.offsetTop});if(a===0){n.style.bottom="",n.style.removeProperty(kd);return}n.style.bottom=`${a}px`,n.style.setProperty(kd,`${a}px`)},s=()=>{o!==null&&window.cancelAnimationFrame(o),o=window.requestAnimationFrame(i)};return i(),r.addEventListener("resize",s),r.addEventListener("scroll",s),()=>{r.removeEventListener("resize",s),r.removeEventListener("scroll",s),o!==null&&window.cancelAnimationFrame(o),qa(n)}},[e,t])}function T1(){let t=Hn()?"drawer":"floating",e=Wa();return{presentation:t,supportsHover:t==="floating"&&!e}}function vx(t,e,n=!1){let{presentation:r}=T1(),o=r==="drawer",[i,s]=Ce(n),a=t!==void 0,l=a?t:i,c=Z(u=>{l&&!u&&o&&yx(),a||s(u),e?.(u)},[o,a,e,l]);return $e(()=>({isCompactViewport:o,open:l,onOpenChange:c}),[o,l,c])}var Ed=ze(({asChild:t,open:e,onOpenChange:n,haspopup:r,onClick:o,children:i,className:s,...a},l)=>{let c=Ha(s),u=f=>{o?.(f),f.defaultPrevented||(e||Za(),n(!e))},d={"aria-expanded":e,"aria-haspopup":r,"data-state":e?"open":"closed"};return t?b(Mo,{ref:l,onClick:u,onMouseDown:$i,className:c,...d,...a,children:i}):b("button",{ref:l,type:"button",onClick:u,onMouseDown:$i,className:c,...d,...a,children:i})});Ed.displayName="MobileTrigger";var M1=["side","sideOffset","align","alignOffset","collisionPadding","collisionBoundary","arrowPadding","sticky","hideWhenDetached","avoidCollisions","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside"],P1=new Set(M1);function Ex(t){let e={};for(let n of Object.keys(t))P1.has(n)||(e[n]=t[n]);return e}function _1({open:t,enabled:e=!0}){let[n,r]=Ce(!1),o=Z(()=>r(!0),[]);return Q(()=>{if(!e||!t||n)return;let i=null,s=null;i=window.requestAnimationFrame(()=>{i=null,s=window.requestAnimationFrame(()=>{s=null,o()})});let a=window.setTimeout(o,k1);return()=>{i!==null&&window.cancelAnimationFrame(i),s!==null&&window.cancelAnimationFrame(s),window.clearTimeout(a)}},[e,n,t,o]),{isContentRealized:e&&n,realizeContent:o}}function Ja({open:t,onOpenChange:e,onAfterCloseAutoFocus:n,closeOnBackdropClick:r=!0,srLabel:o,labelledBy:i,describedBy:s,contentClassName:a,onContentAnimationEnd:l,onEscapeKeyDown:c,onPointerDownOutside:u,onInteractOutside:d,children:f}){let{isContentRealized:p}=_1({open:t});return!t&&!p?null:b(B1,{open:t,onOpenChange:e,onAfterCloseAutoFocus:n,closeOnBackdropClick:r,srLabel:o,labelledBy:i,describedBy:s,contentClassName:a,onContentAnimationEnd:l,onEscapeKeyDown:c,onPointerDownOutside:u,onInteractOutside:d,children:p?f:b("div",{"aria-hidden":"true",className:"min-h-32","data-responsive-drawer-placeholder":""})})}var wx="cubic-bezier(0.32, 0.72, 0, 1)",R1=.25,A1=450,N1=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),vd=Symbol.for("bb.persistent-drawer-stack.v1");function O1(t){return typeof t=="object"&&t!==null&&"entries"in t&&Array.isArray(t.entries)&&"handleKeyDown"in t&&typeof t.handleKeyDown=="function"}function Sx(t){let e=Reflect.get(t,vd);return O1(e)?e:void 0}function I1(t){return Array.from(t.querySelectorAll(N1)).filter(e=>e.closest('[aria-hidden="true"], [inert]')===null)}function D1(t,e){let n=t?.closest("[data-bb-portaled-overlay]");return n!=null&&n!==e}function z1(t,e){let n=e.ownerDocument.activeElement;if(!e.contains(n)&&D1(n,e))return;let r=I1(e);if(t.preventDefault(),r.length===0){e.focus({preventScroll:!0});return}let o=r[0],i=r[r.length-1];if(t.shiftKey){if(!e.contains(n)||n===e||n===o){i?.focus({preventScroll:!0});return}let a=r.indexOf(n);r[Math.max(0,a-1)]?.focus({preventScroll:!0});return}if(!e.contains(n)||n===e||n===i){o?.focus({preventScroll:!0});return}let s=r.indexOf(n);r[Math.min(r.length-1,s+1)]?.focus({preventScroll:!0})}function L1(t,e){let n=Sx(t);if(n===void 0){let r=[],o=i=>{if(i.defaultPrevented)return;let s=r[r.length-1],a=s?.panel()??null;s===void 0||a===null||(i.key==="Escape"?(s.dismissOnEscape(i),i.preventDefault()):i.key==="Tab"&&z1(i,a))};n={entries:r,handleKeyDown:o},Reflect.set(t,vd,n),t.addEventListener("keydown",o)}return n.entries.push(e),()=>{let r=Sx(t);if(r===void 0)return;let o=r.entries.indexOf(e);o>=0&&r.entries.splice(o,1),r.entries.length===0&&(t.removeEventListener("keydown",r.handleKeyDown),Reflect.deleteProperty(t,vd))}}function $1({onAfterCloseAutoFocus:t,onBeforeCloseAutoFocus:e,onEscapeKeyDown:n,open:r,panelRef:o,requestClose:i}){let s=L(null),a=L(n);Te(()=>{a.current=n},[n]),Te(()=>{if(!r)return;let c=o.current;if(c===null)return;let u=c.ownerDocument,d=u.activeElement;s.current=d instanceof HTMLElement&&d!==u.body?d:null;let f=L1(u,{panel:()=>o.current,dismissOnEscape:p=>{a.current?.(p),p.defaultPrevented||i()}});return c.focus({preventScroll:!0}),f},[r,o,i]);let l=L(r);Te(()=>{let c;if(l.current&&!r){e?.();let u=s.current;if(u?.isConnected&&u.closest('[aria-hidden="true"], [inert]')===null&&(u.focus({preventScroll:!0}),u.ownerDocument.activeElement!==u)){let d=u.ownerDocument.defaultView;if(d!==null){let f=d.requestAnimationFrame(()=>{u.isConnected&&u.closest('[aria-hidden="true"], [inert]')===null&&u.focus({preventScroll:!0}),t?.()});c=()=>d.cancelAnimationFrame(f)}}s.current=null,c===void 0&&t?.()}return l.current=r,c},[t,e,r])}function B1({open:t,onOpenChange:e,onAfterCloseAutoFocus:n,closeOnBackdropClick:r=!0,srLabel:o,labelledBy:i,describedBy:s,contentClassName:a,motionDurationMs:l=220,onContentAnimationEnd:c,onEscapeKeyDown:u,onPointerDownOutside:d,onInteractOutside:f,children:p}){let h=L(null),m=L(null),g=L(null),y=L(null),E=L(null),S=Ii(),M=Tr(),T=`transform ${l}ms ${wx}`,C=`opacity ${l}ms ${wx}`,R=L(e);Te(()=>{R.current=e},[e]);let V=Z(()=>{Mr(h.current),qa(h.current),R.current(!1)},[]),$=Z(()=>{Mr(h.current),qa(h.current)},[]);$1({onAfterCloseAutoFocus:n,onBeforeCloseAutoFocus:$,onEscapeKeyDown:u,open:t,panelRef:h,requestClose:V});let O=()=>{let H=g.current;if(g.current=null,!!r){if(H!==null){let ce=new CustomEvent("dismissableLayer.pointerDownOutside",{cancelable:!0,detail:{originalEvent:H}});if(d?.(ce),f?.(ce),ce.defaultPrevented)return}V()}};C1(h,t);let W=Z(H=>{E.current!==H&&(E.current=H,c?.(H))},[c]);Q(()=>{E.current=null;let H=window.setTimeout(()=>W(t),l+50);return()=>window.clearTimeout(H)},[l,t,W]);let j=Z((H,ce,K)=>{let w=h.current,ue=m.current;w===null||ue===null||(w.style.transition=K?T:"none",w.style.transform=`translate3d(0, ${H}px, 0)`,ue.style.transition=K?C:"none",ue.style.opacity=String(Math.max(0,Math.min(1,1-H/ce))))},[C,T]),N=Z(H=>{if(!t||H.button!==0)return;H.currentTarget.setPointerCapture(H.pointerId);let ce=Date.now(),K=Math.max(h.current?.clientHeight??0,1);y.current={pointerId:H.pointerId,startY:H.clientY,lastY:H.clientY,lastTimeMs:ce,velocityY:0,height:K},j(0,K,!1),H.preventDefault()},[t,j]),z=Z(H=>{let ce=y.current;if(ce===null||ce.pointerId!==H.pointerId)return;let K=Date.now(),w=K-ce.lastTimeMs;w>0&&(ce.velocityY=(H.clientY-ce.lastY)/w*1e3,ce.lastY=H.clientY,ce.lastTimeMs=K),j(Math.max(0,H.clientY-ce.startY),ce.height,!1),H.preventDefault()},[j]),I=Z((H,ce)=>{let K=y.current;if(K===null||K.pointerId!==H.pointerId)return;y.current=null;let w=Math.max(0,H.clientY-K.startY);!ce&&(w>=K.height*R1||K.velocityY>=A1)?(j(K.height,K.height,!0),V()):j(0,K.height,!0),H.preventDefault()},[V,j]),ie=typeof document>"u"?null:document.body;return ie===null?null:Py(G(Ie,{children:[b("div",{ref:m,...M,"aria-hidden":"true","data-persistent-drawer-backdrop":"","data-state":t?"open":"closed",className:"fixed inset-0 z-50 bg-black/40",style:{opacity:t?1:0,pointerEvents:t?"auto":"none",transition:C},onPointerDown:H=>{g.current=H.nativeEvent},onClick:O,onTouchMove:H=>H.preventDefault()}),G("div",{ref:h,...M,"aria-hidden":!t,"aria-labelledby":i??(o===void 0?void 0:S),"aria-describedby":s,"aria-modal":t||void 0,"data-bb-portaled-overlay":"","data-persistent-drawer-content":"","data-state":t?"open":"closed",inert:!t,role:"dialog",tabIndex:-1,className:q("fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[calc(92dvh-var(--bb-drawer-keyboard-inset,0px))] flex-col rounded-t-xl border bg-background pb-[var(--bb-safe-area-bottom,env(safe-area-inset-bottom))] outline-none",a),style:{transform:t?"translate3d(0, 0, 0)":"translate3d(0, 100%, 0)",transition:T,willChange:t?"transform":void 0},onTransitionEnd:H=>{H.currentTarget===H.target&&H.propertyName==="transform"&&W(t)},children:[b("div",{"data-persistent-drawer-handle":"",className:"mx-auto flex h-8 w-16 shrink-0 touch-none cursor-grab items-center justify-center active:cursor-grabbing",onPointerDown:N,onPointerMove:z,onPointerUp:H=>I(H,!1),onPointerCancel:H=>I(H,!0),children:b("div",{className:"h-1 w-10 rounded-full bg-muted-foreground/20"})}),o===void 0?null:b("h2",{id:S,className:"sr-only",children:o}),p]})]}),ie)}function Cx(t){let{open:e,label:n,interactive:r,popupRef:o,composerRef:i,onClose:s}=t,a=Hn(),l=r&&a;Q(()=>{if(!e||l)return;let u=d=>{d.target instanceof Node&&(o.current?.contains(d.target)||i.current?.contains(d.target)||s(!1))};return document.addEventListener("pointerdown",u,!0),()=>document.removeEventListener("pointerdown",u,!0)},[i,l,s,e,o]);let c=b(F1,{...t,drawer:l});return l?b(Ja,{open:e,srLabel:n,onOpenChange:u=>{u||s(!1)},onAfterCloseAutoFocus:()=>s(!0),contentClassName:"p-0",children:c}):e?c:null}function F1({open:t,drawer:e,placement:n,label:r,interactive:o,popupKey:i,popupRef:s,children:a}){return Q(()=>{if(!t||!o)return;let l=window.requestAnimationFrame(()=>{s.current?.querySelector('input:not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex="0"]')?.focus({preventScroll:!0})});return()=>window.cancelAnimationFrame(l)},[o,t,i,s]),b("div",{ref:s,"data-promptbox-typeahead-menu":"",role:o&&!e?"dialog":void 0,"aria-label":o?r:void 0,className:e?void 0:q("absolute -left-px -right-px z-20",n==="top"?"bottom-full mb-2":"top-full mt-2"),children:a})}var Tx="text-sm max-md:pointer-coarse:text-base";var Fi="h-3.5 w-3.5 max-md:pointer-coarse:h-5 max-md:pointer-coarse:w-5",Mx="h-[28px] w-[28px] rounded-md p-0 max-md:pointer-coarse:h-[36px] max-md:pointer-coarse:w-[36px]",BB=`${Mx} [&_[data-icon-root]]:size-[16px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[20px]`,FB=`${Mx} [&_[data-icon-root]]:size-[13px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[16px]`;var Cd="h-8 px-2 transition-all max-md:pointer-coarse:h-10 max-md:pointer-coarse:px-3",Pr="size-auto h-8 px-2 transition-all max-md:pointer-coarse:h-10 max-md:pointer-coarse:px-3";var Ga="text-subtle-foreground/75 hover:text-muted-foreground data-[state=open]:text-subtle-foreground/75";ye();function Px({src:t,...e}){let n=L(null);return Q(()=>{let r=n.current;if(r)return r.src=t,()=>{r.removeAttribute("src"),r.load()}},[t]),b("video",{...e,ref:n})}var Td=globalThis.__bbPluginRuntime;if(Td==null||Td.sharedUiIcon==null)throw new Error('Cannot load "@moonlet/shared-ui/icon": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ya=Td.sharedUiIcon,KB="default"in Ya?Ya.default:Ya,{ICON_NAMES:WB,Icon:_r,isBuiltinIconName:qB,preloadExtendedIcons:JB}=Ya;function Md({src:t,className:e}){return G("span",{className:q("relative block h-16 w-24 bg-surface-recessed",e),children:[b(Px,{src:`${t.split("#")[0]}#t=0.001`,muted:!0,playsInline:!0,preload:"metadata","aria-hidden":"true",className:"size-full object-cover"}),b("span",{className:"absolute inset-0 flex items-center justify-center",children:b("span",{className:"flex size-8 items-center justify-center rounded-full bg-black/55 text-white",children:b(_r,{name:"Play",className:"size-4"})})})]})}ye();function V1(t,e,n){return t.attachmentSrc(e,n)}var Rx="inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-surface-recessed px-2 py-0.5 text-xs text-muted-foreground";function _x(t){return t.file.type.startsWith("image/")||Cr({path:t.file.name,mimeType:t.file.type})}function H1({file:t}){let[e,n]=Ce();return Q(()=>{let r=URL.createObjectURL(t);return n(r),()=>URL.revokeObjectURL(r)},[t]),G("div",{role:"status","aria-label":`Uploading ${t.name}`,className:"relative shrink-0 overflow-hidden rounded-md border border-border bg-surface-recessed",children:[b("span",{className:"block h-16 w-24",children:e?Cr({path:t.name,mimeType:t.type})?b(Md,{src:e,className:"opacity-50"}):b("img",{src:e,alt:"",className:"size-full object-cover opacity-50"}):null}),G("span",{className:"absolute inset-x-0 bottom-0 flex items-center justify-center gap-1 bg-background/90 py-1 text-xs text-foreground",children:[b(Ne,{name:"Loading",className:"size-3 animate-spin motion-reduce:animate-none"}),"Uploading"]})]})}function Z1({name:t,path:e}){let n=sr().input.resolveMentionLink,r=n({kind:"attachment",path:e,label:t});return r?b("button",{type:"button",onMouseDown:o=>o.preventDefault(),onClick:r,className:"truncate hover:underline focus-visible:outline-none focus-visible:underline",children:t}):b("span",{className:"truncate",children:t})}function j1({file:t}){return G("span",{role:"status","aria-label":`Uploading ${t.name}`,className:Rx,children:[b("span",{className:"truncate",children:t.name}),b("span",{className:"inline-flex size-4 shrink-0 items-center justify-center",children:b(Ne,{name:"Loading",className:"size-3 animate-spin motion-reduce:animate-none"})})]})}function Pd({attachments:t,pendingUploads:e=[],compact:n=!1,attachmentProjectId:r,expandedImageIndex:o,onExpandedImageIndexChange:i,onRemoveAttachment:s}){let a=sr(),l=t.filter(y=>zi(y)||Cr(y)),c=t.filter(y=>!zi(y)&&!Cr(y)),u=e.filter(_x),d=e.filter(y=>!_x(y)),f=l.map(y=>({mediaType:Cr(y)?"video":"image",alt:y.name,src:V1(a,y.path,y.sourceProjectId??r)})),p=l.length>1,h=o!==null?f[o]??null:null;Q(()=>{o!==null&&(o<l.length||i(null))},[o,l.length,i]);let m=t.length,g=e.length;return m+g===0?null:G(Ie,{children:[n?G("span",{"data-promptbox-attachments":"",role:g>0?"status":"img","aria-label":[m>0?`${m} ${m===1?"attachment":"attachments"}`:null,g>0?`${g} uploading`:null].filter(Boolean).join(", "),className:"ml-3 inline-flex h-7 shrink-0 items-center gap-0.5 rounded-md bg-surface-recessed px-1.5 text-xs text-muted-foreground",children:[b(Ne,{name:"Paperclip",className:"size-3.5"}),b("span",{"aria-hidden":"true",children:m+g}),g>0?b(Ne,{name:"Loading",className:"size-3.5 animate-spin motion-reduce:animate-none"}):null]}):G("div",{className:"mx-3 mb-1 mt-1",children:[l.length>0||u.length>0?G("div",{className:"mb-1.5 flex flex-wrap gap-2",children:[l.map((y,E)=>G("div",{className:"relative",children:[b("button",{type:"button",className:"block cursor-zoom-in overflow-hidden rounded-md border border-border bg-surface-recessed",onClick:()=>i(E),"aria-label":y.name,children:Cr(y)?b(Md,{src:f[E].src}):b("img",{src:f[E]?.src,alt:y.name,className:"h-16 w-24 object-cover",loading:"lazy",decoding:"async"})}),s?b("button",{type:"button",onMouseDown:S=>S.preventDefault(),onClick:S=>{S.currentTarget.blur(),s(y.path)},className:"group/attachment-remove-image absolute right-1 top-1 z-10 inline-flex size-4 items-center justify-center rounded-full text-white focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring max-md:pointer-coarse:-right-1 max-md:pointer-coarse:-top-1 max-md:pointer-coarse:size-7","aria-label":`Remove ${y.name}`,children:b("span",{className:"inline-flex size-4 items-center justify-center rounded-full bg-black/55 transition-colors group-hover/attachment-remove-image:bg-black/70",children:b(Ne,{name:"X",className:"size-3"})})}):null]},`${y.path}-${E}`)),u.map(y=>b(H1,{file:y.file},y.id))]}):null,c.length>0||d.length>0?G("div",{className:"flex flex-wrap gap-1.5",children:[c.map(y=>G("span",{className:Rx,children:[b(Z1,{name:y.name,path:y.path}),s?b("span",{className:"relative size-4 shrink-0",children:b("button",{type:"button",onMouseDown:E=>E.preventDefault(),onClick:E=>{E.currentTarget.blur(),s(y.path)},className:"group/attachment-remove-file absolute left-1/2 top-1/2 inline-flex size-4 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-md focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring max-md:pointer-coarse:size-7","aria-label":`Remove ${y.name}`,children:b("span",{className:"inline-flex size-4 items-center justify-center rounded transition-colors group-hover/attachment-remove-file:bg-state-hover",children:b(Ne,{name:"X",className:"size-3"})})})}):null]},y.path)),d.map(y=>b(j1,{file:y.file},y.id))]}):null]}),b(nh,{imageSrc:h?.src??null,imageAlt:h?.alt??"Attached image",title:"Attached media preview",mediaType:h?.mediaType,hasMultipleImages:p,onPrevious:()=>{i(o===null||f.length<=1?o:pd({currentIndex:o,direction:"previous",itemCount:f.length}))},onNext:()=>{i(o===null||f.length<=1?o:pd({currentIndex:o,direction:"next",itemCount:f.length}))},onClose:()=>i(null)})]})}function Nx(t){return t.text.length===0&&t.mentions.length===0&&t.attachments.length===0}function U1(t,e){return e===null||typeof e!="object"||Array.isArray(e)?e:Object.fromEntries(Object.entries(e).sort(([n],[r])=>n<r?-1:n>r?1:0))}function Ax(t){return JSON.stringify({text:t.text,mentions:t.mentions,attachments:t.attachments},U1)}function Xa(t,e){return Ax(t)===Ax(e)}function Ad(t){let e=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,o])=>e.indexOf(+r)===-1).map(([r,o])=>o)}function Ox(t,e){return typeof e=="bigint"?e.toString():e}var Rd=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Nd(t){return new Rd(t)}function Ix(t){return t==null}function Qa(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Od(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Dx(t){let e=Object.getOwnPropertyDescriptor(t,"shape");return e?.get?e.get.raw:e?.value}var Id="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Dd(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var zx=new Set(["string","number","symbol"]);function Hi(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function el(t,e,n){let r=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(r._zod.parent=t),r}function Cn(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function Lx(t){return Object.keys(t).filter(e=>t[e]._zod.optin!==void 0&&t[e]._zod.optout==="optional")}function jn(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function $x(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue===!1)return!0;return!1}function zd(t,e){return e.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(t),n})}function Vi(t){return typeof t=="string"?t:t?.message}function Ld(t,e,n){var r;for(let o=e;o<t.length;o++)(r=t[o]).schema??(r.schema=n)}function Ar(t,e,n){var r;let o=t.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=t).schema??(r.schema=t.inst):t.schema=t.inst);let i=t.schema!==t.inst?t.schema?._zod.def?.error:void 0,s=t.message?t.message:Vi(t.inst?._zod.def?.error?.(t))??Vi(i?.(t))??Vi(e?.error?.(t))??Vi(n.customError?.(t))??Vi(n.localeError?.(t))??"Invalid input",a={};for(let l of Object.keys(t))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(a[l]=t[l]);return a.path??(a.path=[]),a.message=s,e?.reportInput&&(a.input=t.input),a}var K1=/[\uD800-\uDBFF]/;function Bx(t){let e=t.length;if(!K1.test(t))return e;let n=e;for(let r=0;r<e-1;r++)(t.charCodeAt(r)&64512)===55296&&(t.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function Fx(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Vx(t,e){for(let n in e){let r=Object.getOwnPropertyDescriptor(e,n);r.get?Object.defineProperty(t,n,{...r,enumerable:!1}):W1(t,n,r.value)}}function Rr(t,e,n,r=!0){return Object.defineProperty(t,e,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function $d(t,e,n){return Rr(t,e,n,!1)}function W1(t,e,n){Object.defineProperty(t,e,{configurable:!0,get(){return this==null?n:Rr(this,e,n.bind(this))},set(r){Rr(this,e,r)}})}function q1(t,e){let n=Object.getPrototypeOf(t);return e in n?void 0:n}var _d,Zn=!1,J1={configurable:!0,get(){Zn=!0}};function ct(t,e,n){let r=Object.getPrototypeOf(t._zod);if(e in r&&_d!==t._zod){_d=void 0;return}_d=t._zod,Object.defineProperty(r,e,{configurable:!0,get(){Object.defineProperty(this,e,J1);let o=Zn;Zn=!1;try{let i=n(this);return Zn?delete this[e]:Object.defineProperty(this,e,{configurable:!0,writable:!0,value:i}),Zn=Zn||o,i}catch(i){throw delete this[e],Zn=Zn||o,i}},set(o){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:o})}})}function Hx(t,e,n,r){let o=q1(t,e);o&&Object.defineProperty(o,e,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,e,i),i.value=n(this),Object.defineProperty(this,e,i),i.value},set(i){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:r,value:i})}})}var Zx;var Bd={value:void 0,enumerable:!1},jx="captureStackTrace"in Error?Error:null;function G1(t){let e=jx;if(e){let n=e.stackTraceLimit;if(typeof n=="number"){try{e.stackTraceLimit=0}catch{return jx=null,new t}try{return new t}finally{e.stackTraceLimit=n}}}return new t}function Pe(t,e,n,r){let o={};function i(f){this.def=f,this.constr=d,this.traits=new Set}i.prototype=o;let s=n,a=s&&new WeakSet;function l(f,p){if(f._zod){if(f._zod.traits.has(t))return}else{Bd.value=new i(p);try{Object.defineProperty(f,"_zod",Bd)}finally{Bd.value=void 0}}if(f._zod.traits.add(t),e(f,p),a){let m=Object.getPrototypeOf(f),g=f._zod.constr.prototype,y=m;for(;y&&y!==g;)y=Object.getPrototypeOf(y);let E=y??m;a.has(E)||(a.add(E),Vx(E,s))}let h=d.prototype;for(let m in h)Object.prototype.hasOwnProperty.call(h,m)&&(m in f||(f[m]=h[m].bind(f)))}let c=r?.Parent??Object;class u extends c{}Object.defineProperty(u,"name",{value:t});function d(f){let p=r?.Parent?G1(u):this;l(p,f);let h=p._zod.deferred;if(h){for(let g of h)g();p._zod.deferred=void 0}let m=globalThis.__zod_globalConfig?.postProcessor;return m&&m(p),p}return Object.defineProperty(d,"init",{value:l}),Object.defineProperty(d,Symbol.hasInstance,{value:f=>r?.Parent&&f instanceof r.Parent?!0:f?._zod?.traits?.has(t)}),Object.defineProperty(d,"name",{value:t}),d}var Tn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};(Zx=globalThis).__zod_globalConfig??(Zx.__zod_globalConfig={});var tl=globalThis.__zod_globalConfig;function Or(t){return t&&Object.assign(tl,t),tl}function Y1(){let t=this._zod;return t.message??(t.message=JSON.stringify(t.def,Ox,2)),t.message}function X1(t){this._zod.message=t}var Q1={get:Y1,set:X1,enumerable:!0,configurable:!0},Vd={value:void 0,enumerable:!1},Ux=new WeakSet([Object.prototype,Error.prototype]),Kx=(t,e)=>{t.name="$ZodError",Vd.value=e,Object.defineProperty(t,"issues",Vd),Vd.value=void 0,Object.defineProperty(t,"message",Q1);let n=Object.getPrototypeOf(t);Ux.has(n)||(Ux.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},pF=Pe("$ZodError",Kx),Zi=Pe("$ZodError",Kx,void 0,{Parent:Error});var t_=t=>{let e=(n,r,o,i)=>{let s=o?{...o,async:!1}:{async:!1},a=n._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new Tn;if(a.issues.length){let l=new(i?.Err??t)(a.issues.map(c=>Ar(c,s,Or())));throw Id(l,i?.callee??e),l}return a.value};return e},Hd=t_(Zi),n_=t=>{let e=async(n,r,o,i)=>{let s=o?{...o,async:!0}:{async:!0},a=n._zod.run({value:r,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){let l=new(i?.Err??t)(a.issues.map(c=>Ar(c,s,Or())));throw Id(l,i?.callee??e),l}return a.value};return e},Zd=n_(Zi),r_=t=>(e,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=e._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Tn;return i.issues.length?Wx(t,i.issues,o):{success:!0,data:i.value}},jd=r_(Zi);function Wx(t,e,n){let r;return{success:!1,get error(){return r||(r=new t(e.map(o=>Ar(o,n,Or()))),e=void 0,n=void 0),r},set error(o){r=o,e=void 0,n=void 0}}}var o_=t=>async(e,n,r)=>{let o=r?{...r,async:!0}:{async:!0},i=e._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?Wx(t,i.issues,o):{success:!0,data:i.value}},Ud=o_(Zi);var qx=/^[\s\S]{0,}$/;var Jx=/^(?:true|false)$/i;var Kd=Pe("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])});var i_=t=>{let e=t.value;return!Ix(e)&&e.length!==void 0};var Yx=Pe("$ZodCheckMinLength",(t,e)=>{var n;Kd.init(t,e),(n=t._zod.def).when??(n.when=i_),t._zod.check=r=>{let o=r.value,i=o.length;if((typeof o=="string"&&i>=e.minimum&&i<e.minimum*2?Bx(o):i)>=e.minimum)return;let a=Fx(o);r.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}});var Xx={major:4,minor:6,patch:5};var dn=Pe("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Xx;let r=t._zod.def.checks,o=t._zod.traits.has("$ZodCheck")?[t,...r??[]]:r?.length?[...r]:[];for(let i of o)for(let s of i._zod.onattach)s(t);if(o.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=(a,l,c)=>{if(a.memo)return a;let u=jn(a),d;for(let f of l){if(f._zod.def.when){if($x(a)||!f._zod.def.when(a))continue}else if(u)continue;let p=a.issues.length,h=f._zod.check(a);if(h instanceof Promise&&c?.async===!1)throw new Tn;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,a.issues.length!==p&&(Ld(a.issues,p,t),u||(u=jn(a,p)))});else{if(a.issues.length===p)continue;Ld(a.issues,p,t),u||(u=jn(a,p))}}return d?d.then(()=>a):a},s=(a,l,c)=>{if(jn(a))return a.aborted=!0,a;let u=i(l,o,c);if(u instanceof Promise){if(c.async===!1)throw new Tn;return u.then(d=>t._zod.parse(d,c))}return t._zod.parse(u,c)};t._zod.run=(a,l)=>{if(l.skipChecks)return t._zod.parse(a,l);if(l.direction==="backward"){let u=t._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(d=>s(d,a,l)):s(u,a,l)}let c=t._zod.parse(a,l);if(c instanceof Promise){if(l.async===!1)throw new Tn;return c.then(u=>i(u,o,l))}return i(c,o,l)}}},{get"~standard"(){return $d(this,"~standard",c_(this))},set"~standard"(t){Rr(this,"~standard",t)}}),tb=(t,e)=>t.issues.length?{issues:t.issues.map(n=>Ar(n,e,Or()))}:{value:t.value};async function l_(t,e){let n={async:!0};return tb(await t._zod.run({value:e,issues:[]},n),n)}function c_(t){return{validate:e=>{let n={async:!1};try{let r=t._zod.run({value:e,issues:[]},n);if(!(r instanceof Promise))return tb(r,n)}catch{}return l_(t,e)},vendor:"zod",version:1}}var nb=Pe("$ZodString",(t,e)=>{dn.init(t,e),t._zod.pattern=e.pattern??qx,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}});var rb=Pe("$ZodBoolean",(t,e)=>{dn.init(t,e),t._zod.pattern=Jx,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=!!n.value}catch{}let o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),n}});function nl(t,e,n,r,o,i){let s=n in r,a=i==="optional";if(!(!s&&a&&o==="optional")){if(t.issues.length){if(o!==void 0&&a&&!s)return;e.issues.push(...zd(n,t.issues))}if(!s&&o===void 0){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}t.value===void 0?(s||o==="defaulted"&&!a)&&(e.value[n]=void 0):e.value[n]=t.value}}var u_=[];function d_(t){let e=Object.keys(t.shape),n=Object.getOwnPropertySymbols(t.shape),r=n.length?n:u_,o=r.length?[...e,...r]:e;for(let s of o)if(!t.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(s)}": expected a Zod schema`);let i=Lx(t.shape);return{...t,allKeys:o,symbolKeys:r,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(i)}}function p_(t,e,n,r,o,i,s){let a=[],l=o.keySet,c=o.catchall._zod,u=c.def.type,d=c.optin,f=c.optout,p=0;for(let h in e){if(s&&n.issues.length!==p){if(jn(n,p))break;p=n.issues.length}if(l.has(h))continue;if(h==="__proto__"){u==="never"&&a.push(h);continue}if(u==="never"){a.push(h);continue}let m=c.run({value:e[h],issues:[]},r);m instanceof Promise?t.push(m.then(g=>nl(g,n,h,e,d,f))):nl(m,n,h,e,d,f)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:e,inst:i,continue:!0}),t.length?Promise.all(t).then(()=>n):n}var ob=Pe("$ZodObject",(t,e)=>{dn.init(t,e);let n=Object.getOwnPropertyDescriptor(e,"shape"),r=n?.get?n.get.raw:e.shape??{};if(r){let c=()=>{let u={...r};return Object.defineProperty(e,"shape",{value:u}),c.raw=u,u};c.raw=r,Object.defineProperty(e,"shape",{get:c})}let o=Nd(()=>d_(e));ct(t,"propValues",c=>{let u=c.def.shape,d={};for(let f in u){let p=u[f]._zod;if(p.values){Object.prototype.hasOwnProperty.call(d,f)||Od(d,f,new Set);for(let h of p.values)d[f].add(h);p.optin!==void 0&&d[f].add(void 0)}}return d});let i=Dd,s=e.catchall,a,l=tl.memoizer;l?.attach(t),t._zod.parse=(c,u)=>{a??(a=o.value);let d=c.value;if(!i(d))return c.issues.push({expected:"object",code:"invalid_type",input:d,inst:t}),c;c.value=l?l.alloc(t,c,{},u):{};let f=[],p=a.shape,h=u?.abortEarly,m=c.issues.length;for(let g of a.allKeys){if(h&&c.issues.length!==m){if(jn(c,m))break;m=c.issues.length}if(g==="__proto__")continue;let y=p[g],E=y._zod.optin,S=y._zod.optout,M=y._zod.run({value:d[g],issues:[]},u);M instanceof Promise?f.push(M.then(T=>nl(T,c,g,d,E,S))):nl(M,c,g,d,E,S)}return s?p_(f,d,c,u,o.value,t,h===!0):f.length?Promise.all(f).then(()=>c):c}});function Qx(t,e,n,r){for(let i of t)if(i.issues.length===0)return e.value=i.value,e;let o=t.filter(i=>!jn(i));return o.length===1?(e.value=o[0].value,o[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(i=>i.issues.map(s=>Ar(s,r,Or())))}),e)}var ib=Pe("$ZodUnion",(t,e)=>{dn.init(t,e),ct(t,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),ct(t,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ct(t,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),ct(t,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){let o=r.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Qa(i.source)).join("|")})$`)}});let n=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(r,o)=>{if(n)return n(r,o);let i=!1,s=[];for(let a of e.options){let l=a._zod.run({value:r.value,issues:[]},o);if(l instanceof Promise)s.push(l),i=!0;else{if(l.issues.length===0)return l;s.push(l)}}return i?Promise.all(s).then(a=>Qx(a,r,t,o)):Qx(s,r,t,o)}});function f_(t){let e=new Map;for(let n of t.options){let r=n._zod.propValues?.[t.discriminator];if(!r||r.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let o of r)if(e.has(o)){if(o!==void 0)throw new Error(`Duplicate discriminator value "${String(o)}"`);e.set(o,null)}else e.set(o,n)}return e}var sb=Pe("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,ib.init(t,e);let n=t._zod.parse;ct(t,"propValues",o=>{let i={},s=0;for(let a of o.def.options){let l=a._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(a)}"`);l[o.def.discriminator]?.has(void 0)&&s++;for(let[c,u]of Object.entries(l)){Object.prototype.hasOwnProperty.call(i,c)||Od(i,c,new Set);for(let d of u)i[c].add(d)}}return!o.def.unionFallback&&s>1&&i[o.def.discriminator]?.delete(void 0),i}),e.options.forEach((o,i)=>{let s=Dx(o._zod.def);if(s&&!Object.prototype.hasOwnProperty.call(s,e.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});let r=Nd(()=>f_(e));t._zod.parse=(o,i)=>{let s=o.value;if(!Dd(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),o;let a=s?.[e.discriminator],l=r.value.get(a);return l&&(a!==void 0||i.direction!=="backward")?l._zod.run(o,i):e.unionFallback||i.direction==="backward"?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(r.value.keys()).filter(c=>r.value.get(c)!==null),input:s,path:[e.discriminator],inst:t}),o)}});var ab=Pe("$ZodEnum",(t,e)=>{dn.init(t,e);let n=Ad(e.entries),r=new Set(n);t._zod.values=r,ct(t,"pattern",o=>{let i=Ad(o.def.entries).filter(s=>zx.has(typeof s));return new RegExp(i.length?`^(${i.map(s=>Hi(s.toString())).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(o,i)=>{let s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:t}),o}}),lb=Pe("$ZodLiteral",(t,e)=>{dn.init(t,e);let n=new Set(e.values);t._zod.values=n,ct(t,"pattern",r=>{let o=r.def.values;return new RegExp(o.length?`^(${o.map(i=>typeof i=="string"?Hi(i):i?Hi(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(r,o)=>{let i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:e.values,input:i,inst:t}),r}});function eb(t,e){return t.value=e.issues.length?void 0:e.value,t}var cb=Pe("$ZodOptional",(t,e)=>{dn.init(t,e),ct(t,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",ct(t,"values",n=>{let r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),ct(t,"pattern",n=>{let r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${Qa(r.source)})?$`):void 0}),t._zod.parse=(n,r)=>{if(n.value===void 0){if(e.innerType._zod.optin!=="defaulted")return n;let o=e.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(i=>eb(n,i)):eb(n,o)}return e.innerType._zod.run(n,r)}});var ub=Pe("$ZodNullable",(t,e)=>{dn.init(t,e),ct(t,"optin",n=>n.def.innerType._zod.optin),ct(t,"optout",n=>n.def.innerType._zod.optout),ct(t,"pattern",n=>{let r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${Qa(r.source)}|null)$`):void 0}),ct(t,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),t._zod.parse=(n,r)=>n.value===null?n:e.innerType._zod.run(n,r)});function m_(t){return t.checks&&(t.checks=[...t.checks]),t}function db(t,e){return new t(m_({type:"string",...Cn(e)}))}function pb(t,e){return new t({type:"boolean",...Cn(e)})}function Wd(t,e){return new Yx({check:"min_length",...Cn(e),minimum:t})}var Un=Pe("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");dn.init(t,e),t.def=e,t.type=e.type},{get with(){return this.check},set with(t){Rr(this,"with",t)},parse(t,e){return Hd(this,t,e,{callee:this.parse})},parseAsync(t,e){return Zd(this,t,e,{callee:this.parseAsync})},safeParse(t,e){return jd(this,t,e)},safeParseAsync(t,e){return Ud(this,t,e)},check(...t){let e=this.def;return this.clone({...e,checks:[...e.checks??[],...t.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0})},clone(t,e){return el(this,t,e)},brand(){return this},register(t,e){return t.add(this,e),this},apply(t,...e){return e.length===0?t(this):t(this,...e)}}),y_=Pe("ZodMiniString",(t,e)=>{nb.init(t,e),Un.init(t,e)});function qe(t){return db(y_,t)}var x_=Pe("ZodMiniBoolean",(t,e)=>{rb.init(t,e),Un.init(t,e)});function fb(t){return pb(x_,t)}var b_=Pe("ZodMiniObject",(t,e)=>{ob.init(t,e),Un.init(t,e),Hx(t,"shape",n=>n._zod.def.shape,!1)});function Wt(t,e){let n={type:"object",shape:t??{},...Cn(e)};return new b_(n)}var w_=Pe("ZodMiniDiscriminatedUnion",(t,e)=>{sb.init(t,e),Un.init(t,e)});function hb(t,e,n){return new w_({type:"union",options:e,discriminator:t,...Cn(n)})}var S_=Pe("ZodMiniEnum",(t,e)=>{ab.init(t,e),Un.init(t,e),t.options=[...t._zod.values]});function _o(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new S_({type:"enum",entries:n,...Cn(e)})}var k_=Pe("ZodMiniLiteral",(t,e)=>{lb.init(t,e),Un.init(t,e)});function Kn(t,e){return new k_({type:"literal",values:Array.isArray(t)?t:[t],...Cn(e)})}var v_=Pe("ZodMiniOptional",(t,e)=>{cb.init(t,e),Un.init(t,e)});function qd(t){return new v_({type:"optional",innerType:t})}var E_=Pe("ZodMiniNullable",(t,e)=>{ub.init(t,e),Un.init(t,e)});function Jd(t){return new E_({type:"nullable",innerType:t})}var Ir=qe(),gb=hb("kind",[Wt({kind:Kn("thread"),threadId:qe(),projectId:qd(qe()),label:Ir}),Wt({kind:Kn("project"),projectId:qe(),label:Ir}),Wt({kind:Kn("section"),sectionId:qe(),label:Ir}),Wt({kind:Kn("path"),path:qe(),source:_o(["workspace","thread-storage"]),entryKind:_o(["file","directory"]),label:Ir}),Wt({kind:Kn("command"),trigger:_o(["/","$"]),name:qe(),source:_o(["skill","command"]),origin:_o(["builtin","project","user"]),argumentHint:Jd(qe()),label:Ir}),Wt({kind:Kn("attachment"),path:qe(),label:Ir}),Wt({kind:Kn("plugin"),pluginId:qe(),provider:qe(),id:qe(),icon:qd(Jd(qe())),label:Ir})]);function yb(t){let{from:e,to:n,...r}=t;return r}function Ro(t,e,n){return{...t,from:e,to:n}}function ji(t,e){return{...t,from:t.from+e,to:t.to+e}}function xb(t,e){if(t===e)return!0;let n=Object.entries(t);if(n.length!==Object.keys(e).length)return!1;let r=e;return n.every(([o,i])=>r[o]===i)}function Ao(t,e){return t.from-e.from||t.to-e.to}function Ui(t,e){return{kind:"command",trigger:e,name:t.name,source:t.source,origin:t.origin,label:t.name,argumentHint:t.argumentHint}}ye();ye();var Gd=globalThis.__bbPluginRuntime;if(Gd==null||Gd.radixDropdownMenu==null)throw new Error('Cannot load "@radix-ui/react-dropdown-menu": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var rl=Gd.radixDropdownMenu,EZ="default"in rl?rl.default:rl,{Arrow:CZ,CheckboxItem:bb,Content:wb,DropdownMenu:TZ,DropdownMenuArrow:MZ,DropdownMenuCheckboxItem:PZ,DropdownMenuContent:_Z,DropdownMenuGroup:RZ,DropdownMenuItem:AZ,DropdownMenuItemIndicator:NZ,DropdownMenuLabel:OZ,DropdownMenuPortal:IZ,DropdownMenuRadioGroup:DZ,DropdownMenuRadioItem:zZ,DropdownMenuSeparator:LZ,DropdownMenuSub:$Z,DropdownMenuSubContent:BZ,DropdownMenuSubTrigger:FZ,DropdownMenuTrigger:VZ,Group:Sb,Item:kb,ItemIndicator:Yd,Label:vb,Portal:Eb,RadioGroup:M_,RadioItem:Xd,Root:Cb,Separator:Tb,Sub:P_,SubContent:Qd,SubTrigger:ep,Trigger:Mb,createDropdownMenuScope:HZ}=rl;ye();function Pb(t){return t.isConnected&&t.closest("[inert]")===null}function R_(t,e){typeof t=="function"?t(e):t!==null&&(t.current=e)}function _b(t,e,n){let r=L(null),o=L(n);return Te(()=>{o.current=n},[n]),Q(()=>{let i=r.current;if(!e||i===null)return;let s=!1,a=()=>{s||r.current!==null&&r.current!==i||(s=!0,o.current(!1))},l=Pb(i),c=new MutationObserver(()=>{Pb(i)?l=!0:l&&a()});if(c.observe(i.ownerDocument.documentElement,{attributes:!0,attributeFilter:["inert"],childList:!0,subtree:!0}),typeof IntersectionObserver!="function")return()=>c.disconnect();let u=!1,d=new IntersectionObserver(f=>{let p=f.at(-1);p!==void 0&&(p.isIntersecting?u=!0:u&&a())});return d.observe(i),()=>{c.disconnect(),d.disconnect()}},[e]),Z(i=>{r.current=i,R_(t,i)},[t])}ye();var A_=new Set(["ArrowDown","ArrowUp","Home","End","PageDown","PageUp"]),ol="data-[last-hovered]:bg-state-hover data-[last-hovered]:text-foreground",Rb=Symbol.for("bb.menu-hover-context.v1");function N_(t){return typeof t=="object"&&t!==null&&"Provider"in t&&"Consumer"in t}function O_(){let t=Reflect.get(globalThis,Rb);if(N_(t))return t;let e=bt({lastHoveredId:null,setLastHovered:()=>{},clearLastHovered:()=>{}});return Reflect.set(globalThis,Rb,e),e}var Ab=O_();function Nb({children:t}){let[e,n]=Ce(null),r=$e(()=>({lastHoveredId:e,setLastHovered:n,clearLastHovered:()=>n(null)}),[e]);return b(Ab.Provider,{value:r,children:t})}function Ki(t){let e=Ii(),{lastHoveredId:n,setLastHovered:r,clearLastHovered:o}=Rt(Ab),i=n===e,s=L(t);s.current=t;let a=Z(c=>{s.current?.onPointerEnter?.(c),r(e)},[e,r]),l=Z(c=>{s.current?.onKeyDown?.(c),A_.has(c.key)&&o()},[o]);return{isLastHovered:i,hoverProps:{"data-last-hovered":i?"":void 0,onPointerEnter:a,onKeyDown:l}}}var I_="focus:bg-state-hover focus:text-foreground data-[last-hovered]:bg-state-hover data-[last-hovered]:text-foreground",D_="text-destructive focus:bg-destructive/15 focus:text-destructive data-[last-hovered]:bg-destructive/15",z_="text-destructive focus:bg-destructive/15 focus:text-destructive active:bg-destructive/20 active:text-destructive",Ob=Symbol.for("bb.responsive-menu-context.v1");function L_(t){return typeof t=="object"&&t!==null&&"Provider"in t&&"Consumer"in t}function $_(){let t=Reflect.get(globalThis,Ob);if(L_(t))return t;let e=bt({isCompactViewport:!1,open:!1,onOpenChange:()=>{}});return Reflect.set(globalThis,Ob,e),e}var tp=$_();function Wn(){return Rt(tp)}function No({children:t,open:e,onOpenChange:n,defaultOpen:r,...o}){let i=vx(e,n,r);return i.isCompactViewport?b(tp.Provider,{value:i,children:t}):b(Cb,{open:i.open,onOpenChange:i.onOpenChange,...o,children:b(tp.Provider,{value:i,children:t})})}var Wi=ze(({asChild:t,children:e,className:n,...r},o)=>{let{isCompactViewport:i,open:s,onOpenChange:a}=Wn(),l=_b(o,s&&!i,a);return i?b(Ed,{ref:o,asChild:t,open:s,onOpenChange:a,haspopup:"menu",className:n,...r,children:e}):b(Mb,{ref:l,asChild:t,className:Ha(n),onMouseDown:c=>{s||Za(),$i(c)},...r,children:e})});Wi.displayName="DropdownMenuTrigger";var Dr=ze(({className:t,sideOffset:e=4,children:n,mobileTitle:r,onCloseAutoFocus:o,...i},s)=>{let{isCompactViewport:a,open:l,onOpenChange:c}=Wn(),u=Tr();if(a){let{style:d,...f}=Ex(i);return b(Ja,{open:l,onOpenChange:c,srLabel:r??"Menu",onEscapeKeyDown:i.onEscapeKeyDown,onPointerDownOutside:i.onPointerDownOutside,onInteractOutside:i.onInteractOutside,children:b("div",{ref:s,className:q("flex flex-col gap-0.5 overflow-y-auto p-2",t),...f,style:{...d,...kx},children:n})})}return b(Eb,{children:b(wb,{ref:s,...u,sideOffset:e,onCloseAutoFocus:d=>{let f=document.activeElement!==null&&document.activeElement!==document.body;(!ja()||f)&&d.preventDefault(),o?.(d)},className:q("z-50 min-w-28 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...i,children:b(Nb,{children:n})})})});Dr.displayName="DropdownMenuContent";function Ib(){return new Event("select",{cancelable:!0})}var Oo=ze(({className:t,inset:e,variant:n="default",onSelect:r,disabled:o,role:i="menuitem","aria-checked":s,textValue:a,children:l,onPointerEnter:c,onKeyDown:u,onFocus:d,onBlur:f,onPointerMove:p,onPointerLeave:h,...m},g)=>{let{isCompactViewport:y,open:E,onOpenChange:S}=Wn(),{hoverProps:M}=Ki({onPointerEnter:c,onKeyDown:u}),T=C=>R=>{C?.(R),E||R.preventDefault()};return y?b("button",{ref:g,type:"button",role:i,disabled:o,"aria-disabled":o||void 0,"aria-checked":s,className:q("relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] max-md:pointer-coarse:py-2 text-left text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>[data-icon-root]]:size-4 [&>[data-icon-root]]:shrink-0",e&&"pl-8",n==="destructive"&&z_,t),"data-disabled":o?"":void 0,onFocus:d,onBlur:f,onClick:()=>{if(o)return;let C=Ib();r?.(C),C.defaultPrevented||S(!1)},children:l}):b(kb,{ref:g,className:q("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] text-xs outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>[data-icon-root]]:size-4 [&>[data-icon-root]]:shrink-0",Li,n==="destructive"?D_:I_,e&&"pl-8",t),disabled:o,role:i,"aria-checked":s,onSelect:r,textValue:a,onFocus:d,onBlur:f,onPointerMove:T(p),onPointerLeave:T(h),...m,...M,children:l})});Oo.displayName="DropdownMenuItem";var B_=ze(({className:t,children:e,checked:n,onSelect:r,onCheckedChange:o,disabled:i,textValue:s,onPointerEnter:a,onKeyDown:l,...c},u)=>{let{isCompactViewport:d,onOpenChange:f}=Wn(),{hoverProps:p}=Ki({onPointerEnter:a,onKeyDown:l});return d?G("button",{ref:u,type:"button",role:"menuitemcheckbox","aria-checked":n==="indeterminate"?"mixed":n===!0,disabled:i,"aria-disabled":i||void 0,className:q("relative flex w-full cursor-default select-none items-center rounded-sm py-[0.3125rem] max-md:pointer-coarse:py-2 pl-2 pr-8 text-left text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),"data-disabled":i?"":void 0,onClick:()=>{if(i)return;let h=Ib();r?.(h),o?.(n==="indeterminate"?!0:!n),h.defaultPrevented||f(!1)},children:[b("span",{className:q("absolute right-2 flex items-center justify-center",Fi),children:(n===!0||n==="indeterminate")&&b(_r,{name:"Check",className:Fi})}),e]}):G(bb,{ref:u,className:q("relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-2 pr-8 text-xs outline-none focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Li,ol,t),checked:n,onSelect:r,onCheckedChange:o,disabled:i,textValue:s,...c,...p,children:[b("span",{className:q("absolute right-2 flex items-center justify-center",Fi),children:b(Yd,{children:b(_r,{name:"Check",className:Fi})})}),e]})});B_.displayName="DropdownMenuCheckboxItem";var F_=ze(({className:t,children:e,onPointerEnter:n,onKeyDown:r,...o},i)=>{let{isCompactViewport:s}=Wn(),{hoverProps:a}=Ki({onPointerEnter:n,onKeyDown:r});return s?null:G(Xd,{ref:i,className:q("relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-8 pr-2 text-xs outline-none focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Li,ol,t),...o,...a,children:[b("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b(Yd,{children:b(_r,{name:"Circle",className:"h-2 w-2 fill-current"})})}),e]})});F_.displayName=Xd.displayName;var V_=ze(({className:t,inset:e,children:n,...r},o)=>{let{isCompactViewport:i}=Wn();return i?b("div",{ref:o,className:q("px-2 py-[0.3125rem] max-md:pointer-coarse:py-1.5 text-xs font-medium text-muted-foreground",e&&"pl-8",t),children:n}):b(vb,{ref:o,className:q("px-2 py-[0.3125rem] text-xs font-medium text-muted-foreground",e&&"pl-8",t),...r,children:n})});V_.displayName="DropdownMenuLabel";var np=ze(({className:t,...e},n)=>{let{isCompactViewport:r}=Wn();return r?b("hr",{ref:n,className:q("-mx-1 my-1 h-px border-0 bg-muted",t)}):b(Tb,{ref:n,className:q("-mx-1 my-1 h-px bg-muted",t),...e})});np.displayName="DropdownMenuSeparator";var H_=ze(({children:t,...e},n)=>{let{isCompactViewport:r}=Wn();return r?b("div",{ref:n,role:"group",...e,children:t}):b(Sb,{ref:n,...e,children:t})});H_.displayName="DropdownMenuGroup";var Z_=ze(({className:t,inset:e,children:n,onPointerEnter:r,onKeyDown:o,...i},s)=>{let{hoverProps:a}=Ki({onPointerEnter:r,onKeyDown:o});return G(ep,{ref:s,className:q("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-[0.3125rem] text-xs outline-none focus:bg-state-hover focus:text-foreground data-[state=open]:bg-state-active data-[state=open]:text-foreground [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0",Li,ol,e&&"pl-8",t),...i,...a,children:[n,b(_r,{name:"ChevronRight",className:"ml-auto"})]})});Z_.displayName=ep.displayName;var j_=ze(({className:t,...e},n)=>b(Qd,{ref:n,...Tr(),className:q("z-50 min-w-28 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));j_.displayName=Qd.displayName;var U_=({className:t,...e})=>b("span",{className:q("ml-auto text-xs tracking-widest opacity-60",t),...e});U_.displayName="DropdownMenuShortcut";function Db(t){let e=ro();return b(J_,{...t,plugins:e})}var K_={skills:{label:"Skills",icon:"Zap"},plan:{label:"Plan",icon:"ListTodo"},goal:{label:"Goal",icon:"Target"}},W_=["skills","plan","goal"];function q_(t){return W_.flatMap(e=>{let n=t.find(r=>r.kind===e);return n?[n]:[]})}function J_({actions:t=[],onAttach:e,onAction:n,plugins:r}){let o=r?.plusMenuItems??[],i=L(!1),s=L(null),a=L(null),l=q_(t).filter(d=>d.text.length>0),c=Z(()=>{let d=()=>{i.current=!1,a.current=null};if(typeof requestAnimationFrame=="function"){requestAnimationFrame(d);return}setTimeout(d,0)},[]),u=Z(d=>{let f=document.activeElement;f!==null&&f!==document.body&&f!==s.current&&f!==d.selectedElement&&f.isConnected||d.restoreComposerFocus()},[]);return l.length===0&&!e&&o.length===0?null:G(No,{modal:!1,onOpenChange:d=>{d||c()},children:[b(Wi,{asChild:!0,children:b(un,{ref:s,type:"button",size:"icon",variant:"ghost","aria-label":"Prompt actions",className:q(Pr,Ga,"-ml-1.5"),children:b(Ne,{name:"Plus",className:"size-4"})})}),G(Dr,{"aria-label":"Prompt actions",align:"start",side:"bottom",sideOffset:4,className:"w-36",mobileTitle:"Prompt actions",onCloseAutoFocus:d=>{if(i.current){d.preventDefault();let f=a.current;f&&u(f)}},children:[e?G(Ie,{children:[G(Oo,{onSelect:()=>{i.current=!0,e()},children:[b(Ne,{name:"Paperclip",className:"size-4 text-muted-foreground","aria-hidden":!0}),"Attach files"]}),l.length>0?b(np,{}):null]}):null,l.map(d=>{let f=K_[d.kind];return G(Oo,{onSelect:()=>{i.current=!0,n(d)},children:[b(Ne,{name:f.icon,className:"size-4 text-muted-foreground","aria-hidden":!0}),f.label]},d.kind)}),r?.plusMenuItems.map(d=>b(r.MenuEntry,{kind:"plus",contribution:d,onSelected:f=>{i.current=!0,a.current=f,queueMicrotask(()=>u(f))}},d.key))]})]})}var G_=Wt({mention:gb,serializedText:qe().check(Wd(1))}),zb=new WeakMap;function Io(t){let e=zb.get(t);if(e!==void 0)return e;let n=G_.safeParse(t),r=n.success?n.data:null;return zb.set(t,r),r}var Y_=/^[\p{L}\p{N}]/u,X_=/[\p{L}\p{N}]$/u;function Lb(t,e){return t===null?!1:e.type.name==="mention"?t.type.name==="mention"||t.isText&&X_.test(t.text??""):t.type.name==="mention"&&e.isText&&Y_.test(e.text??"")}function $b(t){if(t.length===0)return[];let e=[],n=t.split(`
|
|
108
|
+
`);for(let s of e){let a=YP(s,{windowed:o}).exec(i);if(!a)continue;let l=a[2]??"",c=n.from-l.length-1;if(!(c<0))return s.kind==="mention"?{char:s.char,kind:"mention",query:l,from:c,to:n.from}:{char:s.char,kind:"command",query:l,from:c,to:n.from}}return null}function zi(t){return t.type==="localImage"||t.mimeType?.toLowerCase().startsWith("image/")===!0}function Cr({path:t,mimeType:e}){return e?.toLowerCase().startsWith("video/")===!0||/\.(mp4|m4v|mov|webm|ogv|ogg)(?:[?#].*)?$/i.test(t)}function pd({currentIndex:t,direction:e,itemCount:n}){return n<=0?t:e==="previous"?t===0?n-1:t-1:t===n-1?0:t+1}function sx(t){return t.trim().toLowerCase()}function QP(t,e){let n=sx(t);return e.length===0||n===e?0:n.startsWith(e)?1:2}function ax(t,e){let n=sx(e),r=t.filter(o=>!zi(o)&&o.name.toLowerCase().includes(n)).map((o,i)=>({index:i,rank:QP(o.name,n),suggestion:{kind:"attachment",key:JSON.stringify(["attachment",o.path]),text:o.name,mention:{kind:"attachment",path:o.path,label:o.name}}})).sort((o,i)=>o.rank-i.rank||o.index-i.index).map(({suggestion:o})=>o);return r.length===0?null:{key:"attachments",label:"Attachments",suggestions:r}}function e1(t){return JSON.stringify([t.kind,t.source,t.origin,t.pluginId??null,t.name])}function To(t){return t.kind==="command"?e1(t):t.key}ye();ye();ye();function lx(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function t1(...t){return e=>{let n=!1,r=t.map(o=>{let i=lx(o,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){let i=r[o];typeof i=="function"?i():lx(t[o],null)}}}}function cx(...t){return Z(t1(...t),t)}function n1(t){let e=ze((n,r)=>{let{children:o,...i}=n,s=null,a=!1,l=[];ux(o)&&typeof za=="function"&&(o=za(o._payload)),Pa.forEach(o,f=>{if(a1(f)){a=!0;let p=f,h="child"in p.props?p.props.child:p.props.children;ux(h)&&typeof za=="function"&&(h=za(h._payload)),s=o1(p,h),l.push(s?.props?.children)}else l.push(f)}),s?s=Ai(s,void 0,l):!a&&Pa.count(o)===1&&Eo(o)&&(s=o);let c=s?s1(s):void 0,u=cx(r,c);if(!s){if(o||o===0)throw new Error(a?d1(t):u1(t));return o}let d=i1(i,s.props??{});return s.type!==Qu&&(d.ref=r?u:c),Ai(s,d)});return e.displayName=`${t}.Slot`,e}var Mo=n1("Slot"),r1=Symbol.for("radix.slottable");var o1=(t,e)=>{if("child"in t.props){let n=t.props.child;return Eo(n)?Ai(n,void 0,t.props.children(n.props.children)):null}return Eo(e)?e:null};function i1(t,e){let n={...e};for(let r in e){let o=t[r],i=e[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{let l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...t,...n}}function s1(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function a1(t){return Eo(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===r1}var l1=Symbol.for("react.lazy");function ux(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===l1&&"_payload"in t&&c1(t._payload)}function c1(t){return typeof t=="object"&&t!==null&&"then"in t}var u1=t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,d1=t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,za=Kt[" use ".trim().toString()];var fd=globalThis.__bbPluginRuntime;if(fd==null||fd.classVarianceAuthority==null)throw new Error('Cannot load "class-variance-authority": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var La=fd.classVarianceAuthority,P$="default"in La?La.default:La,{cva:dx,cx:_$}=La;var hd=globalThis.__bbPluginRuntime;if(hd==null||hd.clsx==null)throw new Error('Cannot load "clsx": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var $a=hd.clsx,A$="default"in $a?$a.default:$a,{clsx:px}=$a;var md=globalThis.__bbPluginRuntime;if(md==null||md.tailwindMerge==null)throw new Error('Cannot load "tailwind-merge": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ba=md.tailwindMerge,O$="default"in Ba?Ba.default:Ba,{createTailwindMerge:I$,extendTailwindMerge:D$,fromTheme:z$,getDefaultConfig:L$,mergeConfigs:$$,twJoin:B$,twMerge:fx,validators:F$}=Ba;function q(...t){return fx(px(t))}var Fa="transition-colors duration-150 hover:duration-0",Li="transition-none";var p1=dx(`inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ${Fa} focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0`,{variants:{variant:{default:"bg-foreground text-background hover:bg-foreground/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-transparent hover:bg-state-hover hover:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-state-hover hover:text-foreground aria-pressed:bg-state-active aria-pressed:text-foreground aria-pressed:hover:bg-state-active data-[state=open]:bg-state-active data-[state=open]:text-foreground data-[state=open]:hover:bg-state-active",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),un=ze(({className:t,variant:e,size:n,asChild:r=!1,...o},i)=>b(r?Mo:"button",{className:q(p1({variant:e,size:n,className:t})),ref:i,...o}));un.displayName="Button";var Ne=Ds;ye();var gd=globalThis.__bbPluginRuntime;if(gd==null||gd.radixTooltip==null)throw new Error('Cannot load "@radix-ui/react-tooltip": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Va=gd.radixTooltip,eB="default"in Va?Va.default:Va,{Arrow:tB,Content:yd,Portal:hx,Provider:mx,Root:gx,Tooltip:nB,TooltipArrow:rB,TooltipContent:oB,TooltipPortal:iB,TooltipProvider:sB,TooltipTrigger:aB,Trigger:xd,createTooltipScope:lB}=Va;function Tr(){let t="bb--composer";return{"data-bb-portaled-overlay":"","data-bb-plugin-root":"",...t!==void 0?{"data-bb-plugin":t}:{}}}var h1="select-none",m1=new Set(["button","checkbox","file","hidden","image","radio","range","reset","submit"]),Ha=t=>q(h1,t);function g1(t){return t instanceof HTMLTextAreaElement?!0:t instanceof HTMLInputElement?!t.disabled&&!t.readOnly&&!m1.has(t.type):t instanceof HTMLElement?t.isContentEditable||t.closest("[contenteditable='true']")!==null:!1}function Mr(t){if(typeof document>"u")return;let e=document.activeElement;!e||!g1(e)||t!==null&&!t.contains(e)||e.blur()}function Za(){Mr(null)}function yx(){Mr(null)}function $i(t){t.preventDefault()}var bd="pointer";typeof document<"u"&&(document.addEventListener("keydown",()=>{bd="keyboard"},{capture:!0}),document.addEventListener("pointerdown",()=>{bd="pointer"},{capture:!0}));function ja(){return bd==="keyboard"}var xx=mx,bx=gx,wd=ze(function({onFocus:e,...n},r){return b(xd,{ref:r,onFocus:o=>{e?.(o),!o.defaultPrevented&&!ja()&&o.preventDefault()},...n})});wd.displayName=xd.displayName;var Sd=ze(function({avoidCollisions:e=!0,className:n,collisionPadding:r=8,sideOffset:o=4,...i},s){return b(hx,{children:b(yd,{ref:s,...Tr(),avoidCollisions:e,collisionPadding:r,sideOffset:o,className:q("z-50 max-w-[min(20rem,var(--radix-tooltip-content-available-width))] overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground break-words animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n),...i})})});Sd.displayName=yd.displayName;ye();ye();ye();var Bi="(prefers-reduced-motion: reduce)",Ua=new Map;function y1(t){if(typeof window>"u"||!window.matchMedia)return null;let e=Ua.get(t);if(e)return e;let n=window.matchMedia(t),r=new Set,o=()=>{for(let i of r)i()};return e={mql:n,subscribe(i){let s=r.size===0;return r.add(i),s&&n.addEventListener("change",o),()=>{r.delete(i),r.size===0&&(n.removeEventListener("change",o),Ua.delete(t))}}},Ua.set(t,e),e}function x1(t,e){return y1(t)?.subscribe(e)??(()=>{})}function Po(t){return typeof window>"u"||!window.matchMedia?!1:Ua.get(t)?.mql.matches??window.matchMedia(t).matches}function Ka(t){return nd(e=>x1(t,e),()=>Po(t),()=>!1)}var b1="(max-width: 767px)",w1=bt(null);function Hn(){let t=Rt(w1),e=Ka(b1);return t!==null?t:e}ye();var S1="(pointer: coarse)";function Wa(){return Ka(S1)}var k1=120,kx={width:"auto",minWidth:"auto",maxWidth:"none"},kd="--bb-drawer-keyboard-inset",v1=80;function qa(t){t!==null&&(t.style.height="",t.style.bottom="",t.style.removeProperty(kd))}function E1({layoutViewportHeight:t,visualViewportHeight:e,visualViewportOffsetTop:n}){let r=Math.round(t-(e+n));return r>=v1?r:0}function C1(t,e){Q(()=>{let n=t.current,r=window.visualViewport;if(n===null||!e||!r)return;let o=null,i=()=>{if(o=null,r.scale!==1){qa(n);return}let a=E1({layoutViewportHeight:n.ownerDocument.documentElement.clientHeight,visualViewportHeight:r.height,visualViewportOffsetTop:r.offsetTop});if(a===0){n.style.bottom="",n.style.removeProperty(kd);return}n.style.bottom=`${a}px`,n.style.setProperty(kd,`${a}px`)},s=()=>{o!==null&&window.cancelAnimationFrame(o),o=window.requestAnimationFrame(i)};return i(),r.addEventListener("resize",s),r.addEventListener("scroll",s),()=>{r.removeEventListener("resize",s),r.removeEventListener("scroll",s),o!==null&&window.cancelAnimationFrame(o),qa(n)}},[e,t])}function T1(){let t=Hn()?"drawer":"floating",e=Wa();return{presentation:t,supportsHover:t==="floating"&&!e}}function vx(t,e,n=!1){let{presentation:r}=T1(),o=r==="drawer",[i,s]=Ce(n),a=t!==void 0,l=a?t:i,c=Z(u=>{l&&!u&&o&&yx(),a||s(u),e?.(u)},[o,a,e,l]);return $e(()=>({isCompactViewport:o,open:l,onOpenChange:c}),[o,l,c])}var Ed=ze(({asChild:t,open:e,onOpenChange:n,haspopup:r,onClick:o,children:i,className:s,...a},l)=>{let c=Ha(s),u=f=>{o?.(f),f.defaultPrevented||(e||Za(),n(!e))},d={"aria-expanded":e,"aria-haspopup":r,"data-state":e?"open":"closed"};return t?b(Mo,{ref:l,onClick:u,onMouseDown:$i,className:c,...d,...a,children:i}):b("button",{ref:l,type:"button",onClick:u,onMouseDown:$i,className:c,...d,...a,children:i})});Ed.displayName="MobileTrigger";var M1=["side","sideOffset","align","alignOffset","collisionPadding","collisionBoundary","arrowPadding","sticky","hideWhenDetached","avoidCollisions","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside"],P1=new Set(M1);function Ex(t){let e={};for(let n of Object.keys(t))P1.has(n)||(e[n]=t[n]);return e}function _1({open:t,enabled:e=!0}){let[n,r]=Ce(!1),o=Z(()=>r(!0),[]);return Q(()=>{if(!e||!t||n)return;let i=null,s=null;i=window.requestAnimationFrame(()=>{i=null,s=window.requestAnimationFrame(()=>{s=null,o()})});let a=window.setTimeout(o,k1);return()=>{i!==null&&window.cancelAnimationFrame(i),s!==null&&window.cancelAnimationFrame(s),window.clearTimeout(a)}},[e,n,t,o]),{isContentRealized:e&&n,realizeContent:o}}function Ja({open:t,onOpenChange:e,onAfterCloseAutoFocus:n,closeOnBackdropClick:r=!0,srLabel:o,labelledBy:i,describedBy:s,contentClassName:a,onContentAnimationEnd:l,onEscapeKeyDown:c,onPointerDownOutside:u,onInteractOutside:d,children:f}){let{isContentRealized:p}=_1({open:t});return!t&&!p?null:b(B1,{open:t,onOpenChange:e,onAfterCloseAutoFocus:n,closeOnBackdropClick:r,srLabel:o,labelledBy:i,describedBy:s,contentClassName:a,onContentAnimationEnd:l,onEscapeKeyDown:c,onPointerDownOutside:u,onInteractOutside:d,children:p?f:b("div",{"aria-hidden":"true",className:"min-h-32","data-responsive-drawer-placeholder":""})})}var wx="cubic-bezier(0.32, 0.72, 0, 1)",R1=.25,A1=450,N1=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),vd=Symbol.for("bb.persistent-drawer-stack.v1");function O1(t){return typeof t=="object"&&t!==null&&"entries"in t&&Array.isArray(t.entries)&&"handleKeyDown"in t&&typeof t.handleKeyDown=="function"}function Sx(t){let e=Reflect.get(t,vd);return O1(e)?e:void 0}function I1(t){return Array.from(t.querySelectorAll(N1)).filter(e=>e.closest('[aria-hidden="true"], [inert]')===null)}function D1(t,e){let n=t?.closest("[data-bb-portaled-overlay]");return n!=null&&n!==e}function z1(t,e){let n=e.ownerDocument.activeElement;if(!e.contains(n)&&D1(n,e))return;let r=I1(e);if(t.preventDefault(),r.length===0){e.focus({preventScroll:!0});return}let o=r[0],i=r[r.length-1];if(t.shiftKey){if(!e.contains(n)||n===e||n===o){i?.focus({preventScroll:!0});return}let a=r.indexOf(n);r[Math.max(0,a-1)]?.focus({preventScroll:!0});return}if(!e.contains(n)||n===e||n===i){o?.focus({preventScroll:!0});return}let s=r.indexOf(n);r[Math.min(r.length-1,s+1)]?.focus({preventScroll:!0})}function L1(t,e){let n=Sx(t);if(n===void 0){let r=[],o=i=>{if(i.defaultPrevented)return;let s=r[r.length-1],a=s?.panel()??null;s===void 0||a===null||(i.key==="Escape"?(s.dismissOnEscape(i),i.preventDefault()):i.key==="Tab"&&z1(i,a))};n={entries:r,handleKeyDown:o},Reflect.set(t,vd,n),t.addEventListener("keydown",o)}return n.entries.push(e),()=>{let r=Sx(t);if(r===void 0)return;let o=r.entries.indexOf(e);o>=0&&r.entries.splice(o,1),r.entries.length===0&&(t.removeEventListener("keydown",r.handleKeyDown),Reflect.deleteProperty(t,vd))}}function $1({onAfterCloseAutoFocus:t,onBeforeCloseAutoFocus:e,onEscapeKeyDown:n,open:r,panelRef:o,requestClose:i}){let s=L(null),a=L(n);Te(()=>{a.current=n},[n]),Te(()=>{if(!r)return;let c=o.current;if(c===null)return;let u=c.ownerDocument,d=u.activeElement;s.current=d instanceof HTMLElement&&d!==u.body?d:null;let f=L1(u,{panel:()=>o.current,dismissOnEscape:p=>{a.current?.(p),p.defaultPrevented||i()}});return c.focus({preventScroll:!0}),f},[r,o,i]);let l=L(r);Te(()=>{let c;if(l.current&&!r){e?.();let u=s.current;if(u?.isConnected&&u.closest('[aria-hidden="true"], [inert]')===null&&(u.focus({preventScroll:!0}),u.ownerDocument.activeElement!==u)){let d=u.ownerDocument.defaultView;if(d!==null){let f=d.requestAnimationFrame(()=>{u.isConnected&&u.closest('[aria-hidden="true"], [inert]')===null&&u.focus({preventScroll:!0}),t?.()});c=()=>d.cancelAnimationFrame(f)}}s.current=null,c===void 0&&t?.()}return l.current=r,c},[t,e,r])}function B1({open:t,onOpenChange:e,onAfterCloseAutoFocus:n,closeOnBackdropClick:r=!0,srLabel:o,labelledBy:i,describedBy:s,contentClassName:a,motionDurationMs:l=220,onContentAnimationEnd:c,onEscapeKeyDown:u,onPointerDownOutside:d,onInteractOutside:f,children:p}){let h=L(null),m=L(null),g=L(null),y=L(null),E=L(null),S=Ii(),M=Tr(),T=`transform ${l}ms ${wx}`,C=`opacity ${l}ms ${wx}`,R=L(e);Te(()=>{R.current=e},[e]);let V=Z(()=>{Mr(h.current),qa(h.current),R.current(!1)},[]),$=Z(()=>{Mr(h.current),qa(h.current)},[]);$1({onAfterCloseAutoFocus:n,onBeforeCloseAutoFocus:$,onEscapeKeyDown:u,open:t,panelRef:h,requestClose:V});let O=()=>{let H=g.current;if(g.current=null,!!r){if(H!==null){let ce=new CustomEvent("dismissableLayer.pointerDownOutside",{cancelable:!0,detail:{originalEvent:H}});if(d?.(ce),f?.(ce),ce.defaultPrevented)return}V()}};C1(h,t);let W=Z(H=>{E.current!==H&&(E.current=H,c?.(H))},[c]);Q(()=>{E.current=null;let H=window.setTimeout(()=>W(t),l+50);return()=>window.clearTimeout(H)},[l,t,W]);let j=Z((H,ce,K)=>{let w=h.current,ue=m.current;w===null||ue===null||(w.style.transition=K?T:"none",w.style.transform=`translate3d(0, ${H}px, 0)`,ue.style.transition=K?C:"none",ue.style.opacity=String(Math.max(0,Math.min(1,1-H/ce))))},[C,T]),N=Z(H=>{if(!t||H.button!==0)return;H.currentTarget.setPointerCapture(H.pointerId);let ce=Date.now(),K=Math.max(h.current?.clientHeight??0,1);y.current={pointerId:H.pointerId,startY:H.clientY,lastY:H.clientY,lastTimeMs:ce,velocityY:0,height:K},j(0,K,!1),H.preventDefault()},[t,j]),z=Z(H=>{let ce=y.current;if(ce===null||ce.pointerId!==H.pointerId)return;let K=Date.now(),w=K-ce.lastTimeMs;w>0&&(ce.velocityY=(H.clientY-ce.lastY)/w*1e3,ce.lastY=H.clientY,ce.lastTimeMs=K),j(Math.max(0,H.clientY-ce.startY),ce.height,!1),H.preventDefault()},[j]),I=Z((H,ce)=>{let K=y.current;if(K===null||K.pointerId!==H.pointerId)return;y.current=null;let w=Math.max(0,H.clientY-K.startY);!ce&&(w>=K.height*R1||K.velocityY>=A1)?(j(K.height,K.height,!0),V()):j(0,K.height,!0),H.preventDefault()},[V,j]),ie=typeof document>"u"?null:document.body;return ie===null?null:Py(G(Ie,{children:[b("div",{ref:m,...M,"aria-hidden":"true","data-persistent-drawer-backdrop":"","data-state":t?"open":"closed",className:"fixed inset-0 z-50 bg-black/40",style:{opacity:t?1:0,pointerEvents:t?"auto":"none",transition:C},onPointerDown:H=>{g.current=H.nativeEvent},onClick:O,onTouchMove:H=>H.preventDefault()}),G("div",{ref:h,...M,"aria-hidden":!t,"aria-labelledby":i??(o===void 0?void 0:S),"aria-describedby":s,"aria-modal":t||void 0,"data-bb-portaled-overlay":"","data-persistent-drawer-content":"","data-state":t?"open":"closed",inert:!t,role:"dialog",tabIndex:-1,className:q("fixed inset-x-0 bottom-0 z-50 mt-24 flex max-h-[calc(92dvh-var(--bb-drawer-keyboard-inset,0px))] flex-col rounded-t-xl border bg-background pb-[var(--bb-safe-area-bottom,env(safe-area-inset-bottom))] outline-none",a),style:{transform:t?"translate3d(0, 0, 0)":"translate3d(0, 100%, 0)",transition:T,willChange:t?"transform":void 0},onTransitionEnd:H=>{H.currentTarget===H.target&&H.propertyName==="transform"&&W(t)},children:[b("div",{"data-persistent-drawer-handle":"",className:"mx-auto flex h-8 w-16 shrink-0 touch-none cursor-grab items-center justify-center active:cursor-grabbing",onPointerDown:N,onPointerMove:z,onPointerUp:H=>I(H,!1),onPointerCancel:H=>I(H,!0),children:b("div",{className:"h-1 w-10 rounded-full bg-muted-foreground/20"})}),o===void 0?null:b("h2",{id:S,className:"sr-only",children:o}),p]})]}),ie)}function Cx(t){let{open:e,label:n,interactive:r,popupRef:o,composerRef:i,onClose:s}=t,a=Hn(),l=r&&a;Q(()=>{if(!e||l)return;let u=d=>{d.target instanceof Node&&(o.current?.contains(d.target)||i.current?.contains(d.target)||s(!1))};return document.addEventListener("pointerdown",u,!0),()=>document.removeEventListener("pointerdown",u,!0)},[i,l,s,e,o]);let c=b(F1,{...t,drawer:l});return l?b(Ja,{open:e,srLabel:n,onOpenChange:u=>{u||s(!1)},onAfterCloseAutoFocus:()=>s(!0),contentClassName:"p-0",children:c}):e?c:null}function F1({open:t,drawer:e,placement:n,label:r,interactive:o,popupKey:i,popupRef:s,children:a}){return Q(()=>{if(!t||!o)return;let l=window.requestAnimationFrame(()=>{s.current?.querySelector('input:not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex="0"]')?.focus({preventScroll:!0})});return()=>window.cancelAnimationFrame(l)},[o,t,i,s]),b("div",{ref:s,"data-promptbox-typeahead-menu":"",role:o&&!e?"dialog":void 0,"aria-label":o?r:void 0,className:e?void 0:q("absolute -left-px -right-px z-20",n==="top"?"bottom-full mb-2":"top-full mt-2"),children:a})}var Tx="text-sm max-md:pointer-coarse:text-base";var Fi="h-3.5 w-3.5 max-md:pointer-coarse:h-5 max-md:pointer-coarse:w-5",Mx="h-[28px] w-[28px] rounded-md p-0 max-md:pointer-coarse:h-[36px] max-md:pointer-coarse:w-[36px]",BB=`${Mx} [&_[data-icon-root]]:size-[16px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[20px]`,FB=`${Mx} [&_[data-icon-root]]:size-[13px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[16px]`;var Cd="h-8 px-2 transition-all max-md:pointer-coarse:h-10 max-md:pointer-coarse:px-3",Pr="size-auto h-8 px-2 transition-all max-md:pointer-coarse:h-10 max-md:pointer-coarse:px-3";var Ga="text-subtle-foreground/75 hover:text-muted-foreground data-[state=open]:text-subtle-foreground/75";ye();function Px({src:t,...e}){let n=L(null);return Q(()=>{let r=n.current;if(r)return r.src=t,()=>{r.removeAttribute("src"),r.load()}},[t]),b("video",{...e,ref:n})}var Td=globalThis.__bbPluginRuntime;if(Td==null||Td.sharedUiIcon==null)throw new Error('Cannot load "@moonlet/shared-ui/icon": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ya=Td.sharedUiIcon,KB="default"in Ya?Ya.default:Ya,{ICON_NAMES:WB,Icon:_r,isBuiltinIconName:qB,preloadExtendedIcons:JB}=Ya;function Md({src:t,className:e}){return G("span",{className:q("relative block h-16 w-24 bg-surface-recessed",e),children:[b(Px,{src:`${t.split("#")[0]}#t=0.001`,muted:!0,playsInline:!0,preload:"metadata","aria-hidden":"true",className:"size-full object-cover"}),b("span",{className:"absolute inset-0 flex items-center justify-center",children:b("span",{className:"flex size-8 items-center justify-center rounded-full bg-black/55 text-white",children:b(_r,{name:"Play",className:"size-4"})})})]})}ye();function V1(t,e,n){return t.attachmentSrc(e,n)}var Rx="inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-surface-recessed px-2 py-0.5 text-xs text-muted-foreground";function _x(t){return t.file.type.startsWith("image/")||Cr({path:t.file.name,mimeType:t.file.type})}function H1({file:t}){let[e,n]=Ce();return Q(()=>{let r=URL.createObjectURL(t);return n(r),()=>URL.revokeObjectURL(r)},[t]),G("div",{role:"status","aria-label":`Uploading ${t.name}`,className:"relative shrink-0 overflow-hidden rounded-md border border-border bg-surface-recessed",children:[b("span",{className:"block h-16 w-24",children:e?Cr({path:t.name,mimeType:t.type})?b(Md,{src:e,className:"opacity-50"}):b("img",{src:e,alt:"",className:"size-full object-cover opacity-50"}):null}),G("span",{className:"absolute inset-x-0 bottom-0 flex items-center justify-center gap-1 bg-background/90 py-1 text-xs text-foreground",children:[b(Ne,{name:"Loading",className:"size-3 animate-spin motion-reduce:animate-none"}),"Uploading"]})]})}function Z1({name:t,path:e}){let n=sr().input.resolveMentionLink,r=n({kind:"attachment",path:e,label:t});return r?b("button",{type:"button",onMouseDown:o=>o.preventDefault(),onClick:r,className:"truncate hover:underline focus-visible:outline-none focus-visible:underline",children:t}):b("span",{className:"truncate",children:t})}function j1({file:t}){return G("span",{role:"status","aria-label":`Uploading ${t.name}`,className:Rx,children:[b("span",{className:"truncate",children:t.name}),b("span",{className:"inline-flex size-4 shrink-0 items-center justify-center",children:b(Ne,{name:"Loading",className:"size-3 animate-spin motion-reduce:animate-none"})})]})}function Pd({attachments:t,pendingUploads:e=[],compact:n=!1,attachmentProjectId:r,expandedImageIndex:o,onExpandedImageIndexChange:i,onRemoveAttachment:s}){let a=sr(),l=t.filter(y=>zi(y)||Cr(y)),c=t.filter(y=>!zi(y)&&!Cr(y)),u=e.filter(_x),d=e.filter(y=>!_x(y)),f=l.map(y=>({mediaType:Cr(y)?"video":"image",alt:y.name,src:V1(a,y.path,y.sourceProjectId??r)})),p=l.length>1,h=o!==null?f[o]??null:null;Q(()=>{o!==null&&(o<l.length||i(null))},[o,l.length,i]);let m=t.length,g=e.length;return m+g===0?null:G(Ie,{children:[n?G("span",{"data-promptbox-attachments":"",role:g>0?"status":"img","aria-label":[m>0?`${m} ${m===1?"attachment":"attachments"}`:null,g>0?`${g} uploading`:null].filter(Boolean).join(", "),className:"ml-3 inline-flex h-7 shrink-0 items-center gap-0.5 rounded-md bg-surface-recessed px-1.5 text-xs text-muted-foreground",children:[b(Ne,{name:"Paperclip",className:"size-3.5"}),b("span",{"aria-hidden":"true",children:m+g}),g>0?b(Ne,{name:"Loading",className:"size-3.5 animate-spin motion-reduce:animate-none"}):null]}):G("div",{className:"mx-3 mb-1 mt-1",children:[l.length>0||u.length>0?G("div",{className:"mb-1.5 flex flex-wrap gap-2",children:[l.map((y,E)=>G("div",{className:"relative",children:[b("button",{type:"button",className:"block cursor-zoom-in overflow-hidden rounded-md border border-border bg-surface-recessed",onClick:()=>i(E),"aria-label":y.name,children:Cr(y)?b(Md,{src:f[E].src}):b("img",{src:f[E]?.src,alt:y.name,className:"h-16 w-24 object-cover",loading:"lazy",decoding:"async"})}),s?b("button",{type:"button",onMouseDown:S=>S.preventDefault(),onClick:S=>{S.currentTarget.blur(),s(y.path)},className:"group/attachment-remove-image absolute right-1 top-1 z-10 inline-flex size-4 items-center justify-center rounded-full text-white focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring max-md:pointer-coarse:-right-1 max-md:pointer-coarse:-top-1 max-md:pointer-coarse:size-7","aria-label":`Remove ${y.name}`,children:b("span",{className:"inline-flex size-4 items-center justify-center rounded-full bg-black/55 transition-colors group-hover/attachment-remove-image:bg-black/70",children:b(Ne,{name:"X",className:"size-3"})})}):null]},`${y.path}-${E}`)),u.map(y=>b(H1,{file:y.file},y.id))]}):null,c.length>0||d.length>0?G("div",{className:"flex flex-wrap gap-1.5",children:[c.map(y=>G("span",{className:Rx,children:[b(Z1,{name:y.name,path:y.path}),s?b("span",{className:"relative size-4 shrink-0",children:b("button",{type:"button",onMouseDown:E=>E.preventDefault(),onClick:E=>{E.currentTarget.blur(),s(y.path)},className:"group/attachment-remove-file absolute left-1/2 top-1/2 inline-flex size-4 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-md focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring max-md:pointer-coarse:size-7","aria-label":`Remove ${y.name}`,children:b("span",{className:"inline-flex size-4 items-center justify-center rounded transition-colors group-hover/attachment-remove-file:bg-state-hover",children:b(Ne,{name:"X",className:"size-3"})})})}):null]},y.path)),d.map(y=>b(j1,{file:y.file},y.id))]}):null]}),b(nh,{imageSrc:h?.src??null,imageAlt:h?.alt??"Attached image",title:"Attached media preview",mediaType:h?.mediaType,hasMultipleImages:p,onPrevious:()=>{i(o===null||f.length<=1?o:pd({currentIndex:o,direction:"previous",itemCount:f.length}))},onNext:()=>{i(o===null||f.length<=1?o:pd({currentIndex:o,direction:"next",itemCount:f.length}))},onClose:()=>i(null)})]})}function Nx(t){return t.text.length===0&&t.mentions.length===0&&t.attachments.length===0}function U1(t,e){return e===null||typeof e!="object"||Array.isArray(e)?e:Object.fromEntries(Object.entries(e).sort(([n],[r])=>n<r?-1:n>r?1:0))}function Ax(t){return JSON.stringify({text:t.text,mentions:t.mentions,attachments:t.attachments},U1)}function Xa(t,e){return Ax(t)===Ax(e)}function Ad(t){let e=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,o])=>e.indexOf(+r)===-1).map(([r,o])=>o)}function Ox(t,e){return typeof e=="bigint"?e.toString():e}var Rd=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Nd(t){return new Rd(t)}function Ix(t){return t==null}function Qa(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Od(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Dx(t){let e=Object.getOwnPropertyDescriptor(t,"shape");return e?.get?e.get.raw:e?.value}var Id="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Dd(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var zx=new Set(["string","number","symbol"]);function Hi(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function el(t,e,n){let r=new t._zod.constr(e??t._zod.def);return(!e||n?.parent)&&(r._zod.parent=t),r}function Cn(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function Lx(t){return Object.keys(t).filter(e=>t[e]._zod.optin!==void 0&&t[e]._zod.optout==="optional")}function jn(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue!==!0)return!0;return!1}function $x(t,e=0){if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(t.issues[n]?.continue===!1)return!0;return!1}function zd(t,e){return e.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(t),n})}function Vi(t){return typeof t=="string"?t:t?.message}function Ld(t,e,n){var r;for(let o=e;o<t.length;o++)(r=t[o]).schema??(r.schema=n)}function Ar(t,e,n){var r;let o=t.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=t).schema??(r.schema=t.inst):t.schema=t.inst);let i=t.schema!==t.inst?t.schema?._zod.def?.error:void 0,s=t.message?t.message:Vi(t.inst?._zod.def?.error?.(t))??Vi(i?.(t))??Vi(e?.error?.(t))??Vi(n.customError?.(t))??Vi(n.localeError?.(t))??"Invalid input",a={};for(let l of Object.keys(t))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(a[l]=t[l]);return a.path??(a.path=[]),a.message=s,e?.reportInput&&(a.input=t.input),a}var K1=/[\uD800-\uDBFF]/;function Bx(t){let e=t.length;if(!K1.test(t))return e;let n=e;for(let r=0;r<e-1;r++)(t.charCodeAt(r)&64512)===55296&&(t.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function Fx(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Vx(t,e){for(let n in e){let r=Object.getOwnPropertyDescriptor(e,n);r.get?Object.defineProperty(t,n,{...r,enumerable:!1}):W1(t,n,r.value)}}function Rr(t,e,n,r=!0){return Object.defineProperty(t,e,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function $d(t,e,n){return Rr(t,e,n,!1)}function W1(t,e,n){Object.defineProperty(t,e,{configurable:!0,get(){return this==null?n:Rr(this,e,n.bind(this))},set(r){Rr(this,e,r)}})}function q1(t,e){let n=Object.getPrototypeOf(t);return e in n?void 0:n}var _d,Zn=!1,J1={configurable:!0,get(){Zn=!0}};function ct(t,e,n){let r=Object.getPrototypeOf(t._zod);if(e in r&&_d!==t._zod){_d=void 0;return}_d=t._zod,Object.defineProperty(r,e,{configurable:!0,get(){Object.defineProperty(this,e,J1);let o=Zn;Zn=!1;try{let i=n(this);return Zn?delete this[e]:Object.defineProperty(this,e,{configurable:!0,writable:!0,value:i}),Zn=Zn||o,i}catch(i){throw delete this[e],Zn=Zn||o,i}},set(o){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:o})}})}function Hx(t,e,n,r){let o=q1(t,e);o&&Object.defineProperty(o,e,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,e,i),i.value=n(this),Object.defineProperty(this,e,i),i.value},set(i){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:r,value:i})}})}var Zx;var Bd={value:void 0,enumerable:!1},jx="captureStackTrace"in Error?Error:null;function G1(t){let e=jx;if(e){let n=e.stackTraceLimit;if(typeof n=="number"){try{e.stackTraceLimit=0}catch{return jx=null,new t}try{return new t}finally{e.stackTraceLimit=n}}}return new t}function Pe(t,e,n,r){let o={};function i(f){this.def=f,this.constr=d,this.traits=new Set}i.prototype=o;let s=n,a=s&&new WeakSet;function l(f,p){if(f._zod){if(f._zod.traits.has(t))return}else{Bd.value=new i(p);try{Object.defineProperty(f,"_zod",Bd)}finally{Bd.value=void 0}}if(f._zod.traits.add(t),e(f,p),a){let m=Object.getPrototypeOf(f),g=f._zod.constr.prototype,y=m;for(;y&&y!==g;)y=Object.getPrototypeOf(y);let E=y??m;a.has(E)||(a.add(E),Vx(E,s))}let h=d.prototype;for(let m in h)Object.prototype.hasOwnProperty.call(h,m)&&(m in f||(f[m]=h[m].bind(f)))}let c=r?.Parent??Object;class u extends c{}Object.defineProperty(u,"name",{value:t});function d(f){let p=r?.Parent?G1(u):this;l(p,f);let h=p._zod.deferred;if(h){for(let g of h)g();p._zod.deferred=void 0}let m=globalThis.__zod_globalConfig?.postProcessor;return m&&m(p),p}return Object.defineProperty(d,"init",{value:l}),Object.defineProperty(d,Symbol.hasInstance,{value:f=>r?.Parent&&f instanceof r.Parent?!0:f?._zod?.traits?.has(t)}),Object.defineProperty(d,"name",{value:t}),d}var Tn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};(Zx=globalThis).__zod_globalConfig??(Zx.__zod_globalConfig={});var tl=globalThis.__zod_globalConfig;function Or(t){return t&&Object.assign(tl,t),tl}function Y1(){let t=this._zod;return t.message??(t.message=JSON.stringify(t.def,Ox,2)),t.message}function X1(t){this._zod.message=t}var Q1={get:Y1,set:X1,enumerable:!0,configurable:!0},Vd={value:void 0,enumerable:!1},Ux=new WeakSet([Object.prototype,Error.prototype]),Kx=(t,e)=>{t.name="$ZodError",Vd.value=e,Object.defineProperty(t,"issues",Vd),Vd.value=void 0,Object.defineProperty(t,"message",Q1);let n=Object.getPrototypeOf(t);Ux.has(n)||(Ux.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},pF=Pe("$ZodError",Kx),Zi=Pe("$ZodError",Kx,void 0,{Parent:Error});var t_=t=>{let e=(n,r,o,i)=>{let s=o?{...o,async:!1}:{async:!1},a=n._zod.run({value:r,issues:[]},s);if(a instanceof Promise)throw new Tn;if(a.issues.length){let l=new(i?.Err??t)(a.issues.map(c=>Ar(c,s,Or())));throw Id(l,i?.callee??e),l}return a.value};return e},Hd=t_(Zi),n_=t=>{let e=async(n,r,o,i)=>{let s=o?{...o,async:!0}:{async:!0},a=n._zod.run({value:r,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){let l=new(i?.Err??t)(a.issues.map(c=>Ar(c,s,Or())));throw Id(l,i?.callee??e),l}return a.value};return e},Zd=n_(Zi),r_=t=>(e,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=e._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Tn;return i.issues.length?Wx(t,i.issues,o):{success:!0,data:i.value}},jd=r_(Zi);function Wx(t,e,n){let r;return{success:!1,get error(){return r||(r=new t(e.map(o=>Ar(o,n,Or()))),e=void 0,n=void 0),r},set error(o){r=o,e=void 0,n=void 0}}}var o_=t=>async(e,n,r)=>{let o=r?{...r,async:!0}:{async:!0},i=e._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?Wx(t,i.issues,o):{success:!0,data:i.value}},Ud=o_(Zi);var qx=/^[\s\S]{0,}$/;var Jx=/^(?:true|false)$/i;var Kd=Pe("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])});var i_=t=>{let e=t.value;return!Ix(e)&&e.length!==void 0};var Yx=Pe("$ZodCheckMinLength",(t,e)=>{var n;Kd.init(t,e),(n=t._zod.def).when??(n.when=i_),t._zod.check=r=>{let o=r.value,i=o.length;if((typeof o=="string"&&i>=e.minimum&&i<e.minimum*2?Bx(o):i)>=e.minimum)return;let a=Fx(o);r.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}});var Xx={major:4,minor:6,patch:5};var dn=Pe("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Xx;let r=t._zod.def.checks,o=t._zod.traits.has("$ZodCheck")?[t,...r??[]]:r?.length?[...r]:[];for(let i of o)for(let s of i._zod.onattach)s(t);if(o.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let i=(a,l,c)=>{if(a.memo)return a;let u=jn(a),d;for(let f of l){if(f._zod.def.when){if($x(a)||!f._zod.def.when(a))continue}else if(u)continue;let p=a.issues.length,h=f._zod.check(a);if(h instanceof Promise&&c?.async===!1)throw new Tn;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,a.issues.length!==p&&(Ld(a.issues,p,t),u||(u=jn(a,p)))});else{if(a.issues.length===p)continue;Ld(a.issues,p,t),u||(u=jn(a,p))}}return d?d.then(()=>a):a},s=(a,l,c)=>{if(jn(a))return a.aborted=!0,a;let u=i(l,o,c);if(u instanceof Promise){if(c.async===!1)throw new Tn;return u.then(d=>t._zod.parse(d,c))}return t._zod.parse(u,c)};t._zod.run=(a,l)=>{if(l.skipChecks)return t._zod.parse(a,l);if(l.direction==="backward"){let u=t._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(d=>s(d,a,l)):s(u,a,l)}let c=t._zod.parse(a,l);if(c instanceof Promise){if(l.async===!1)throw new Tn;return c.then(u=>i(u,o,l))}return i(c,o,l)}}},{get"~standard"(){return $d(this,"~standard",c_(this))},set"~standard"(t){Rr(this,"~standard",t)}}),tb=(t,e)=>t.issues.length?{issues:t.issues.map(n=>Ar(n,e,Or()))}:{value:t.value};async function l_(t,e){let n={async:!0};return tb(await t._zod.run({value:e,issues:[]},n),n)}function c_(t){return{validate:e=>{let n={async:!1};try{let r=t._zod.run({value:e,issues:[]},n);if(!(r instanceof Promise))return tb(r,n)}catch{}return l_(t,e)},vendor:"zod",version:1}}var nb=Pe("$ZodString",(t,e)=>{dn.init(t,e),t._zod.pattern=e.pattern??qx,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}});var rb=Pe("$ZodBoolean",(t,e)=>{dn.init(t,e),t._zod.pattern=Jx,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=!!n.value}catch{}let o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),n}});function nl(t,e,n,r,o,i){let s=n in r,a=i==="optional";if(!(!s&&a&&o==="optional")){if(t.issues.length){if(o!==void 0&&a&&!s)return;e.issues.push(...zd(n,t.issues))}if(!s&&o===void 0){t.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}t.value===void 0?(s||o==="defaulted"&&!a)&&(e.value[n]=void 0):e.value[n]=t.value}}var u_=[];function d_(t){let e=Object.keys(t.shape),n=Object.getOwnPropertySymbols(t.shape),r=n.length?n:u_,o=r.length?[...e,...r]:e;for(let s of o)if(!t.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(s)}": expected a Zod schema`);let i=Lx(t.shape);return{...t,allKeys:o,symbolKeys:r,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(i)}}function p_(t,e,n,r,o,i,s){let a=[],l=o.keySet,c=o.catchall._zod,u=c.def.type,d=c.optin,f=c.optout,p=0;for(let h in e){if(s&&n.issues.length!==p){if(jn(n,p))break;p=n.issues.length}if(l.has(h))continue;if(h==="__proto__"){u==="never"&&a.push(h);continue}if(u==="never"){a.push(h);continue}let m=c.run({value:e[h],issues:[]},r);m instanceof Promise?t.push(m.then(g=>nl(g,n,h,e,d,f))):nl(m,n,h,e,d,f)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:e,inst:i,continue:!0}),t.length?Promise.all(t).then(()=>n):n}var ob=Pe("$ZodObject",(t,e)=>{dn.init(t,e);let n=Object.getOwnPropertyDescriptor(e,"shape"),r=n?.get?n.get.raw:e.shape??{};if(r){let c=()=>{let u={...r};return Object.defineProperty(e,"shape",{value:u}),c.raw=u,u};c.raw=r,Object.defineProperty(e,"shape",{get:c})}let o=Nd(()=>d_(e));ct(t,"propValues",c=>{let u=c.def.shape,d={};for(let f in u){let p=u[f]._zod;if(p.values){Object.prototype.hasOwnProperty.call(d,f)||Od(d,f,new Set);for(let h of p.values)d[f].add(h);p.optin!==void 0&&d[f].add(void 0)}}return d});let i=Dd,s=e.catchall,a,l=tl.memoizer;l?.attach(t),t._zod.parse=(c,u)=>{a??(a=o.value);let d=c.value;if(!i(d))return c.issues.push({expected:"object",code:"invalid_type",input:d,inst:t}),c;c.value=l?l.alloc(t,c,{},u):{};let f=[],p=a.shape,h=u?.abortEarly,m=c.issues.length;for(let g of a.allKeys){if(h&&c.issues.length!==m){if(jn(c,m))break;m=c.issues.length}if(g==="__proto__")continue;let y=p[g],E=y._zod.optin,S=y._zod.optout,M=y._zod.run({value:d[g],issues:[]},u);M instanceof Promise?f.push(M.then(T=>nl(T,c,g,d,E,S))):nl(M,c,g,d,E,S)}return s?p_(f,d,c,u,o.value,t,h===!0):f.length?Promise.all(f).then(()=>c):c}});function Qx(t,e,n,r){for(let i of t)if(i.issues.length===0)return e.value=i.value,e;let o=t.filter(i=>!jn(i));return o.length===1?(e.value=o[0].value,o[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(i=>i.issues.map(s=>Ar(s,r,Or())))}),e)}var ib=Pe("$ZodUnion",(t,e)=>{dn.init(t,e),ct(t,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),ct(t,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ct(t,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),ct(t,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){let o=r.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Qa(i.source)).join("|")})$`)}});let n=e.options.length===1?e.options[0]._zod.run:null;t._zod.parse=(r,o)=>{if(n)return n(r,o);let i=!1,s=[];for(let a of e.options){let l=a._zod.run({value:r.value,issues:[]},o);if(l instanceof Promise)s.push(l),i=!0;else{if(l.issues.length===0)return l;s.push(l)}}return i?Promise.all(s).then(a=>Qx(a,r,t,o)):Qx(s,r,t,o)}});function f_(t){let e=new Map;for(let n of t.options){let r=n._zod.propValues?.[t.discriminator];if(!r||r.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let o of r)if(e.has(o)){if(o!==void 0)throw new Error(`Duplicate discriminator value "${String(o)}"`);e.set(o,null)}else e.set(o,n)}return e}var sb=Pe("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,ib.init(t,e);let n=t._zod.parse;ct(t,"propValues",o=>{let i={},s=0;for(let a of o.def.options){let l=a._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(a)}"`);l[o.def.discriminator]?.has(void 0)&&s++;for(let[c,u]of Object.entries(l)){Object.prototype.hasOwnProperty.call(i,c)||Od(i,c,new Set);for(let d of u)i[c].add(d)}}return!o.def.unionFallback&&s>1&&i[o.def.discriminator]?.delete(void 0),i}),e.options.forEach((o,i)=>{let s=Dx(o._zod.def);if(s&&!Object.prototype.hasOwnProperty.call(s,e.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});let r=Nd(()=>f_(e));t._zod.parse=(o,i)=>{let s=o.value;if(!Dd(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),o;let a=s?.[e.discriminator],l=r.value.get(a);return l&&(a!==void 0||i.direction!=="backward")?l._zod.run(o,i):e.unionFallback||i.direction==="backward"?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(r.value.keys()).filter(c=>r.value.get(c)!==null),input:s,path:[e.discriminator],inst:t}),o)}});var ab=Pe("$ZodEnum",(t,e)=>{dn.init(t,e);let n=Ad(e.entries),r=new Set(n);t._zod.values=r,ct(t,"pattern",o=>{let i=Ad(o.def.entries).filter(s=>zx.has(typeof s));return new RegExp(i.length?`^(${i.map(s=>Hi(s.toString())).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(o,i)=>{let s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:t}),o}}),lb=Pe("$ZodLiteral",(t,e)=>{dn.init(t,e);let n=new Set(e.values);t._zod.values=n,ct(t,"pattern",r=>{let o=r.def.values;return new RegExp(o.length?`^(${o.map(i=>typeof i=="string"?Hi(i):i?Hi(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(r,o)=>{let i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:e.values,input:i,inst:t}),r}});function eb(t,e){return t.value=e.issues.length?void 0:e.value,t}var cb=Pe("$ZodOptional",(t,e)=>{dn.init(t,e),ct(t,"optin",n=>n.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",ct(t,"values",n=>{let r=n.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),ct(t,"pattern",n=>{let r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${Qa(r.source)})?$`):void 0}),t._zod.parse=(n,r)=>{if(n.value===void 0){if(e.innerType._zod.optin!=="defaulted")return n;let o=e.innerType._zod.run({value:n.value,issues:[]},r);return o instanceof Promise?o.then(i=>eb(n,i)):eb(n,o)}return e.innerType._zod.run(n,r)}});var ub=Pe("$ZodNullable",(t,e)=>{dn.init(t,e),ct(t,"optin",n=>n.def.innerType._zod.optin),ct(t,"optout",n=>n.def.innerType._zod.optout),ct(t,"pattern",n=>{let r=n.def.innerType._zod.pattern;return r?new RegExp(`^(${Qa(r.source)}|null)$`):void 0}),ct(t,"values",n=>n.def.innerType._zod.values?new Set([...n.def.innerType._zod.values,null]):void 0),t._zod.parse=(n,r)=>n.value===null?n:e.innerType._zod.run(n,r)});function m_(t){return t.checks&&(t.checks=[...t.checks]),t}function db(t,e){return new t(m_({type:"string",...Cn(e)}))}function pb(t,e){return new t({type:"boolean",...Cn(e)})}function Wd(t,e){return new Yx({check:"min_length",...Cn(e),minimum:t})}var Un=Pe("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");dn.init(t,e),t.def=e,t.type=e.type},{get with(){return this.check},set with(t){Rr(this,"with",t)},parse(t,e){return Hd(this,t,e,{callee:this.parse})},parseAsync(t,e){return Zd(this,t,e,{callee:this.parseAsync})},safeParse(t,e){return jd(this,t,e)},safeParseAsync(t,e){return Ud(this,t,e)},check(...t){let e=this.def;return this.clone({...e,checks:[...e.checks??[],...t.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0})},clone(t,e){return el(this,t,e)},brand(){return this},register(t,e){return t.add(this,e),this},apply(t,...e){return e.length===0?t(this):t(this,...e)}}),y_=Pe("ZodMiniString",(t,e)=>{nb.init(t,e),Un.init(t,e)});function qe(t){return db(y_,t)}var x_=Pe("ZodMiniBoolean",(t,e)=>{rb.init(t,e),Un.init(t,e)});function fb(t){return pb(x_,t)}var b_=Pe("ZodMiniObject",(t,e)=>{ob.init(t,e),Un.init(t,e),Hx(t,"shape",n=>n._zod.def.shape,!1)});function Wt(t,e){let n={type:"object",shape:t??{},...Cn(e)};return new b_(n)}var w_=Pe("ZodMiniDiscriminatedUnion",(t,e)=>{sb.init(t,e),Un.init(t,e)});function hb(t,e,n){return new w_({type:"union",options:e,discriminator:t,...Cn(n)})}var S_=Pe("ZodMiniEnum",(t,e)=>{ab.init(t,e),Un.init(t,e),t.options=[...t._zod.values]});function _o(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new S_({type:"enum",entries:n,...Cn(e)})}var k_=Pe("ZodMiniLiteral",(t,e)=>{lb.init(t,e),Un.init(t,e)});function Kn(t,e){return new k_({type:"literal",values:Array.isArray(t)?t:[t],...Cn(e)})}var v_=Pe("ZodMiniOptional",(t,e)=>{cb.init(t,e),Un.init(t,e)});function qd(t){return new v_({type:"optional",innerType:t})}var E_=Pe("ZodMiniNullable",(t,e)=>{ub.init(t,e),Un.init(t,e)});function Jd(t){return new E_({type:"nullable",innerType:t})}var Ir=qe(),gb=hb("kind",[Wt({kind:Kn("thread"),threadId:qe(),projectId:qd(qe()),label:Ir}),Wt({kind:Kn("project"),projectId:qe(),label:Ir}),Wt({kind:Kn("section"),sectionId:qe(),label:Ir}),Wt({kind:Kn("path"),path:qe(),source:_o(["workspace","thread-storage"]),entryKind:_o(["file","directory"]),label:Ir}),Wt({kind:Kn("command"),trigger:_o(["/","$"]),name:qe(),source:_o(["skill","command"]),origin:_o(["builtin","project","user"]),argumentHint:Jd(qe()),label:Ir}),Wt({kind:Kn("attachment"),path:qe(),label:Ir}),Wt({kind:Kn("plugin"),pluginId:qe(),provider:qe(),id:qe(),icon:qd(Jd(qe())),label:Ir})]);function yb(t){let{from:e,to:n,...r}=t;return r}function Ro(t,e,n){return{...t,from:e,to:n}}function ji(t,e){return{...t,from:t.from+e,to:t.to+e}}function xb(t,e){if(t===e)return!0;let n=Object.entries(t);if(n.length!==Object.keys(e).length)return!1;let r=e;return n.every(([o,i])=>r[o]===i)}function Ao(t,e){return t.from-e.from||t.to-e.to}function Ui(t,e){return{kind:"command",trigger:e,name:t.name,source:t.source,origin:t.origin,label:t.name,argumentHint:t.argumentHint}}ye();ye();var Gd=globalThis.__bbPluginRuntime;if(Gd==null||Gd.radixDropdownMenu==null)throw new Error('Cannot load "@radix-ui/react-dropdown-menu": this bundle must be loaded by the Moonlet app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var rl=Gd.radixDropdownMenu,EZ="default"in rl?rl.default:rl,{Arrow:CZ,CheckboxItem:bb,Content:wb,DropdownMenu:TZ,DropdownMenuArrow:MZ,DropdownMenuCheckboxItem:PZ,DropdownMenuContent:_Z,DropdownMenuGroup:RZ,DropdownMenuItem:AZ,DropdownMenuItemIndicator:NZ,DropdownMenuLabel:OZ,DropdownMenuPortal:IZ,DropdownMenuRadioGroup:DZ,DropdownMenuRadioItem:zZ,DropdownMenuSeparator:LZ,DropdownMenuSub:$Z,DropdownMenuSubContent:BZ,DropdownMenuSubTrigger:FZ,DropdownMenuTrigger:VZ,Group:Sb,Item:kb,ItemIndicator:Yd,Label:vb,Portal:Eb,RadioGroup:M_,RadioItem:Xd,Root:Cb,Separator:Tb,Sub:P_,SubContent:Qd,SubTrigger:ep,Trigger:Mb,createDropdownMenuScope:HZ}=rl;ye();function Pb(t){return t.isConnected&&t.closest("[inert]")===null}function R_(t,e){typeof t=="function"?t(e):t!==null&&(t.current=e)}function _b(t,e,n){let r=L(null),o=L(n);return Te(()=>{o.current=n},[n]),Q(()=>{let i=r.current;if(!e||i===null)return;let s=!1,a=()=>{s||r.current!==null&&r.current!==i||(s=!0,o.current(!1))},l=Pb(i),c=new MutationObserver(()=>{Pb(i)?l=!0:l&&a()});if(c.observe(i.ownerDocument.documentElement,{attributes:!0,attributeFilter:["inert"],childList:!0,subtree:!0}),typeof IntersectionObserver!="function")return()=>c.disconnect();let u=!1,d=new IntersectionObserver(f=>{let p=f.at(-1);p!==void 0&&(p.isIntersecting?u=!0:u&&a())});return d.observe(i),()=>{c.disconnect(),d.disconnect()}},[e]),Z(i=>{r.current=i,R_(t,i)},[t])}ye();var A_=new Set(["ArrowDown","ArrowUp","Home","End","PageDown","PageUp"]),ol="data-[last-hovered]:bg-state-hover data-[last-hovered]:text-foreground",Rb=Symbol.for("bb.menu-hover-context.v1");function N_(t){return typeof t=="object"&&t!==null&&"Provider"in t&&"Consumer"in t}function O_(){let t=Reflect.get(globalThis,Rb);if(N_(t))return t;let e=bt({lastHoveredId:null,setLastHovered:()=>{},clearLastHovered:()=>{}});return Reflect.set(globalThis,Rb,e),e}var Ab=O_();function Nb({children:t}){let[e,n]=Ce(null),r=$e(()=>({lastHoveredId:e,setLastHovered:n,clearLastHovered:()=>n(null)}),[e]);return b(Ab.Provider,{value:r,children:t})}function Ki(t){let e=Ii(),{lastHoveredId:n,setLastHovered:r,clearLastHovered:o}=Rt(Ab),i=n===e,s=L(t);s.current=t;let a=Z(c=>{s.current?.onPointerEnter?.(c),r(e)},[e,r]),l=Z(c=>{s.current?.onKeyDown?.(c),A_.has(c.key)&&o()},[o]);return{isLastHovered:i,hoverProps:{"data-last-hovered":i?"":void 0,onPointerEnter:a,onKeyDown:l}}}var I_="focus:bg-state-hover focus:text-foreground data-[last-hovered]:bg-state-hover data-[last-hovered]:text-foreground",D_="text-destructive focus:bg-destructive/15 focus:text-destructive data-[last-hovered]:bg-destructive/15",z_="text-destructive focus:bg-destructive/15 focus:text-destructive active:bg-destructive/20 active:text-destructive",Ob=Symbol.for("bb.responsive-menu-context.v1");function L_(t){return typeof t=="object"&&t!==null&&"Provider"in t&&"Consumer"in t}function $_(){let t=Reflect.get(globalThis,Ob);if(L_(t))return t;let e=bt({isCompactViewport:!1,open:!1,onOpenChange:()=>{}});return Reflect.set(globalThis,Ob,e),e}var tp=$_();function Wn(){return Rt(tp)}function No({children:t,open:e,onOpenChange:n,defaultOpen:r,...o}){let i=vx(e,n,r);return i.isCompactViewport?b(tp.Provider,{value:i,children:t}):b(Cb,{open:i.open,onOpenChange:i.onOpenChange,...o,children:b(tp.Provider,{value:i,children:t})})}var Wi=ze(({asChild:t,children:e,className:n,...r},o)=>{let{isCompactViewport:i,open:s,onOpenChange:a}=Wn(),l=_b(o,s&&!i,a);return i?b(Ed,{ref:o,asChild:t,open:s,onOpenChange:a,haspopup:"menu",className:n,...r,children:e}):b(Mb,{ref:l,asChild:t,className:Ha(n),onMouseDown:c=>{s||Za(),$i(c)},...r,children:e})});Wi.displayName="DropdownMenuTrigger";var Dr=ze(({className:t,sideOffset:e=4,children:n,mobileTitle:r,onCloseAutoFocus:o,...i},s)=>{let{isCompactViewport:a,open:l,onOpenChange:c}=Wn(),u=Tr();if(a){let{style:d,...f}=Ex(i);return b(Ja,{open:l,onOpenChange:c,srLabel:r??"Menu",onEscapeKeyDown:i.onEscapeKeyDown,onPointerDownOutside:i.onPointerDownOutside,onInteractOutside:i.onInteractOutside,children:b("div",{ref:s,className:q("flex flex-col gap-0.5 overflow-y-auto p-2",t),...f,style:{...d,...kx},children:n})})}return b(Eb,{children:b(wb,{ref:s,...u,sideOffset:e,onCloseAutoFocus:d=>{let f=document.activeElement!==null&&document.activeElement!==document.body;(!ja()||f)&&d.preventDefault(),o?.(d)},className:q("z-50 min-w-28 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...i,children:b(Nb,{children:n})})})});Dr.displayName="DropdownMenuContent";function Ib(){return new Event("select",{cancelable:!0})}var Oo=ze(({className:t,inset:e,variant:n="default",onSelect:r,disabled:o,role:i="menuitem","aria-checked":s,textValue:a,children:l,onPointerEnter:c,onKeyDown:u,onFocus:d,onBlur:f,onPointerMove:p,onPointerLeave:h,...m},g)=>{let{isCompactViewport:y,open:E,onOpenChange:S}=Wn(),{hoverProps:M}=Ki({onPointerEnter:c,onKeyDown:u}),T=C=>R=>{C?.(R),E||R.preventDefault()};return y?b("button",{ref:g,type:"button",role:i,disabled:o,"aria-disabled":o||void 0,"aria-checked":s,className:q("relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] max-md:pointer-coarse:py-2 text-left text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>[data-icon-root]]:size-4 [&>[data-icon-root]]:shrink-0",e&&"pl-8",n==="destructive"&&z_,t),"data-disabled":o?"":void 0,onFocus:d,onBlur:f,onClick:()=>{if(o)return;let C=Ib();r?.(C),C.defaultPrevented||S(!1)},children:l}):b(kb,{ref:g,className:q("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-[0.3125rem] text-xs outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>[data-icon-root]]:size-4 [&>[data-icon-root]]:shrink-0",Li,n==="destructive"?D_:I_,e&&"pl-8",t),disabled:o,role:i,"aria-checked":s,onSelect:r,textValue:a,onFocus:d,onBlur:f,onPointerMove:T(p),onPointerLeave:T(h),...m,...M,children:l})});Oo.displayName="DropdownMenuItem";var B_=ze(({className:t,children:e,checked:n,onSelect:r,onCheckedChange:o,disabled:i,textValue:s,onPointerEnter:a,onKeyDown:l,...c},u)=>{let{isCompactViewport:d,onOpenChange:f}=Wn(),{hoverProps:p}=Ki({onPointerEnter:a,onKeyDown:l});return d?G("button",{ref:u,type:"button",role:"menuitemcheckbox","aria-checked":n==="indeterminate"?"mixed":n===!0,disabled:i,"aria-disabled":i||void 0,className:q("relative flex w-full cursor-default select-none items-center rounded-sm py-[0.3125rem] max-md:pointer-coarse:py-2 pl-2 pr-8 text-left text-xs outline-none transition-colors focus:bg-state-hover focus:text-foreground active:bg-state-active active:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),"data-disabled":i?"":void 0,onClick:()=>{if(i)return;let h=Ib();r?.(h),o?.(n==="indeterminate"?!0:!n),h.defaultPrevented||f(!1)},children:[b("span",{className:q("absolute right-2 flex items-center justify-center",Fi),children:(n===!0||n==="indeterminate")&&b(_r,{name:"Check",className:Fi})}),e]}):G(bb,{ref:u,className:q("relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-2 pr-8 text-xs outline-none focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Li,ol,t),checked:n,onSelect:r,onCheckedChange:o,disabled:i,textValue:s,...c,...p,children:[b("span",{className:q("absolute right-2 flex items-center justify-center",Fi),children:b(Yd,{children:b(_r,{name:"Check",className:Fi})})}),e]})});B_.displayName="DropdownMenuCheckboxItem";var F_=ze(({className:t,children:e,onPointerEnter:n,onKeyDown:r,...o},i)=>{let{isCompactViewport:s}=Wn(),{hoverProps:a}=Ki({onPointerEnter:n,onKeyDown:r});return s?null:G(Xd,{ref:i,className:q("relative flex cursor-default select-none items-center rounded-sm py-[0.3125rem] pl-8 pr-2 text-xs outline-none focus:bg-state-hover focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",Li,ol,t),...o,...a,children:[b("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b(Yd,{children:b(_r,{name:"Circle",className:"h-2 w-2 fill-current"})})}),e]})});F_.displayName=Xd.displayName;var V_=ze(({className:t,inset:e,children:n,...r},o)=>{let{isCompactViewport:i}=Wn();return i?b("div",{ref:o,className:q("px-2 py-[0.3125rem] max-md:pointer-coarse:py-1.5 text-xs font-medium text-muted-foreground",e&&"pl-8",t),children:n}):b(vb,{ref:o,className:q("px-2 py-[0.3125rem] text-xs font-medium text-muted-foreground",e&&"pl-8",t),...r,children:n})});V_.displayName="DropdownMenuLabel";var np=ze(({className:t,...e},n)=>{let{isCompactViewport:r}=Wn();return r?b("hr",{ref:n,className:q("-mx-1 my-1 h-px border-0 bg-muted",t)}):b(Tb,{ref:n,className:q("-mx-1 my-1 h-px bg-muted",t),...e})});np.displayName="DropdownMenuSeparator";var H_=ze(({children:t,...e},n)=>{let{isCompactViewport:r}=Wn();return r?b("div",{ref:n,role:"group",...e,children:t}):b(Sb,{ref:n,...e,children:t})});H_.displayName="DropdownMenuGroup";var Z_=ze(({className:t,inset:e,children:n,onPointerEnter:r,onKeyDown:o,...i},s)=>{let{hoverProps:a}=Ki({onPointerEnter:r,onKeyDown:o});return G(ep,{ref:s,className:q("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-[0.3125rem] text-xs outline-none focus:bg-state-hover focus:text-foreground data-[state=open]:bg-state-active data-[state=open]:text-foreground [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0",Li,ol,e&&"pl-8",t),...i,...a,children:[n,b(_r,{name:"ChevronRight",className:"ml-auto"})]})});Z_.displayName=ep.displayName;var j_=ze(({className:t,...e},n)=>b(Qd,{ref:n,...Tr(),className:q("z-50 min-w-28 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));j_.displayName=Qd.displayName;var U_=({className:t,...e})=>b("span",{className:q("ml-auto text-xs tracking-widest opacity-60",t),...e});U_.displayName="DropdownMenuShortcut";function Db(t){let e=ro();return b(J_,{...t,plugins:e})}var K_={skills:{label:"Skills",icon:"Zap"},plan:{label:"Plan",icon:"ListTodo"},goal:{label:"Goal",icon:"Target"}},W_=["skills","plan","goal"];function q_(t){return W_.flatMap(e=>{let n=t.find(r=>r.kind===e);return n?[n]:[]})}function J_({actions:t=[],onAttach:e,onAction:n,plugins:r}){let o=r?.plusMenuItems??[],i=L(!1),s=L(null),a=L(null),l=q_(t).filter(d=>d.text.length>0),c=Z(()=>{let d=()=>{i.current=!1,a.current=null};if(typeof requestAnimationFrame=="function"){requestAnimationFrame(d);return}setTimeout(d,0)},[]),u=Z(d=>{let f=document.activeElement;f!==null&&f!==document.body&&f!==s.current&&f!==d.selectedElement&&f.isConnected||d.restoreComposerFocus()},[]);return l.length===0&&!e&&o.length===0?null:G(No,{modal:!1,onOpenChange:d=>{d||c()},children:[b(Wi,{asChild:!0,children:b(un,{ref:s,type:"button",size:"icon",variant:"ghost","aria-label":"Prompt actions",className:q(Pr,Ga,"-ml-1.5"),children:b(Ne,{name:"Plus",className:"size-4"})})}),G(Dr,{"aria-label":"Prompt actions",align:"start",side:"bottom",sideOffset:4,className:"w-36",mobileTitle:"Prompt actions",onCloseAutoFocus:d=>{if(i.current){d.preventDefault();let f=a.current;f&&u(f)}},children:[e?G(Ie,{children:[G(Oo,{onSelect:()=>{i.current=!0,e()},children:[b(Ne,{name:"Paperclip",className:"size-4 text-muted-foreground","aria-hidden":!0}),"Attach files"]}),l.length>0?b(np,{}):null]}):null,l.map(d=>{let f=K_[d.kind];return G(Oo,{onSelect:()=>{i.current=!0,n(d)},children:[b(Ne,{name:f.icon,className:"size-4 text-muted-foreground","aria-hidden":!0}),f.label]},d.kind)}),r?.plusMenuItems.map(d=>b(r.MenuEntry,{kind:"plus",contribution:d,onSelected:f=>{i.current=!0,a.current=f,queueMicrotask(()=>u(f))}},d.key))]})]})}var G_=Wt({mention:gb,serializedText:qe().check(Wd(1))}),zb=new WeakMap;function Io(t){let e=zb.get(t);if(e!==void 0)return e;let n=G_.safeParse(t),r=n.success?n.data:null;return zb.set(t,r),r}var Y_=/^[\p{L}\p{N}]/u,X_=/[\p{L}\p{N}]$/u;function Lb(t,e){return t===null?!1:e.type.name==="mention"?t.type.name==="mention"||t.isText&&X_.test(t.text??""):t.type.name==="mention"&&e.isText&&Y_.test(e.text??"")}function $b(t){if(t.length===0)return[];let e=[],n=t.split(`
|
|
109
109
|
`);for(let[r,o]of n.entries())r>0&&e.push({type:"hardBreak"}),o.length>0&&e.push({type:"text",text:o});return e}function Q_(t){return t.mentions.filter(e=>e.from>=0&&e.to>e.from&&e.to<=t.text.length).sort(Ao)}function rp(t){return t===">"||t.startsWith("> ")}function eR(t){return t.length===0}function tR(t){return t.startsWith("> ")?t.slice(2):t===">"?"":t}function nR(t,e){let n=[];for(let r of t.mentions)for(let o of e)if(r.from>=o.contentStart&&r.to<=o.contentEnd){n.push(ji(r,o.innerStart-o.contentStart));break}return n}function rR(t,e,n){let r=e.map(l=>tR(l)),o=r.join(`
|
|
110
110
|
`),i=[],s=0;for(let[l,c]of e.entries()){let u=c.length-r[l].length,d=n[l]+u,f=n[l]+c.length;i.push({contentStart:d,contentEnd:f,innerStart:s}),s+=r[l].length+1}let a=nR(t,i);return{type:"blockquote",content:[{type:"paragraph",content:zr({text:o,mentions:a})}]}}function oR(t,e,n){return{type:"paragraph",content:sR({sourceEnd:n,sourceStart:e,value:t})}}function iR({sourceEnd:t,sourceStart:e,value:n}){let r=n.text.slice(e,t),o=n.mentions.flatMap(i=>i.from>=e&&i.to<=t?[ji(i,-e)]:[]);return{text:r,mentions:o}}function sR({sourceEnd:t,sourceStart:e,value:n}){return zr(iR({sourceEnd:t,sourceStart:e,value:n}))}function qi(t){if(t.text.length===0)return{type:"doc",content:[{type:"paragraph",content:[]}]};let e=t.text.split(`
|
|
111
111
|
`),n=[],r=0;for(let s of e)n.push(r),r+=s.length+1;let o=[],i=0;for(;i<e.length;){let s=rp(e[i]),a=i;for(;a<e.length&&rp(e[a])===s;)a+=1;let l=e.slice(i,a),c=n.slice(i,a);if(s)o.push(rR(t,l,c)),eR(e[a]??"")&&a+1<e.length&&!rp(e[a+1])&&(a+=1);else{let u=c[0],d=l[l.length-1],f=c[c.length-1]+d.length;o.push(oR(t,u,f))}i=a}return o.length===0&&o.push({type:"paragraph",content:[]}),{type:"doc",content:o}}function zr(t){let e=[],n=0;for(let r of Q_(t))r.from<n||(e.push(...$b(t.text.slice(n,r.from))),e.push({type:"mention",attrs:{mention:yb(r),serializedText:t.text.slice(r.from,r.to)}}),n=r.to);return e.push(...$b(t.text.slice(n))),e}function Bb(t,e){let n="",r=null,o=[],i=[],s=null,a=(p,h,m,g)=>{let y=n.length;return n+=p,i.push({textFrom:y,textTo:n.length,docFrom:h,docTo:m,kind:g}),{start:y,end:n.length}},l=p=>{s=null,r!==null&&(n+=r&&!p?`
|