import * as React$1 from 'react'; import React__default, { ReactNode, ReactElement, Dispatch, SetStateAction, ComponentType, FC, Component, JSX, ComponentPropsWithoutRef } from 'react'; import { M as ModuleWithPermissions, A as Action } from '../types-Bq_UA8Lg.mjs'; import { A as AuthComponent, P as PasskeyInterface, T as TotpAuthenticatorInterface, m as AiConnectionInterface, k as AiProviderRegistry, l as AiConnectionEnvDefaults } from '../ai-connection.module-28f-hux0.mjs'; export { h as AiConnection, i as AiConnectionFields, n as AiConnectionInput, p as AiConnectionModule, o as AiConnectionService, j as AiProviderFieldDescriptor, b as getIcon, a as getIconByModule, c as getIconByModuleName, g as getInitials } from '../ai-connection.module-28f-hux0.mjs'; import { e as RoleInterface, U as UserInterface, C as ContentInterface, c as CompanyInterface, b as CompanyInput, N as NotificationInterface } from '../notification.interface-BWOCvKRP.mjs'; import * as _blocknote_core from '@blocknote/core'; import { BlockNoteEditor, PartialBlock } from '@blocknote/core'; import { DefaultReactSuggestionItem, SuggestionMenuProps } from '@blocknote/react'; import { F as FeatureInterface } from '../feature.interface-CXb1-vNq.mjs'; import { D as DataListRetriever } from '../useDataListRetriever-WEXL4bqB.mjs'; import * as class_variance_authority from 'class-variance-authority'; import { VariantProps } from 'class-variance-authority'; import * as class_variance_authority_types from 'class-variance-authority/types'; import * as _base_ui_react from '@base-ui/react'; import { Combobox as Combobox$1 } from '@base-ui/react'; import { DateRange, DayPicker, DayButton } from 'react-day-picker'; import * as react_hook_form from 'react-hook-form'; import { FieldValues, UseFormReturn, Path, ControllerRenderProps, ControllerFieldState } from 'react-hook-form'; import { DropzoneState, DropzoneOptions, FileRejection } from 'react-dropzone'; export { DropzoneOptions } from 'react-dropzone'; import { B as BreadcrumbItemData, a as HowToInterface, d as AssistantMessageInterface } from '../AssistantMessageInterface-ddyG114R.mjs'; import { ColumnDef, ExpandedState } from '@tanstack/react-table'; import { J as JsonApiHydratedDataInterface, A as ApiDataInterface } from '../ApiDataInterface-BcZeXy5X.mjs'; import { b as AuthInterface } from '../auth.interface-jYD8Gc4P.mjs'; import { LucideIcon, Loader2Icon } from 'lucide-react'; import z from 'zod'; import { g as OnboardingCardRenderProps } from '../onboarding.interface-Djyl9qYu.mjs'; import { e as OAuthScopeInfo, O as OAuthClientInterface, b as OAuthClientCreateRequest, d as OAuthConsentRequest } from '../oauth.interface-DRE3NAKc.mjs'; import { Q as QuestionnaireField } from '../waitlist.config-kPfjImle.mjs'; import { P as PermissionValue } from '../RbacTypes-BTbr27Ew.mjs'; import { Accordion as Accordion$1 } from '@base-ui/react/accordion'; import { AlertDialog as AlertDialog$1 } from '@base-ui/react/alert-dialog'; import { Button as Button$1 } from '@base-ui/react/button'; import { Avatar as Avatar$1 } from '@base-ui/react/avatar'; import { useRender } from '@base-ui/react/use-render'; import useEmblaCarousel, { UseEmblaCarouselType } from 'embla-carousel-react'; import * as RechartsPrimitive from 'recharts'; import { Checkbox as Checkbox$1 } from '@base-ui/react/checkbox'; import { Collapsible as Collapsible$1 } from '@base-ui/react/collapsible'; import { Command as Command$1 } from 'cmdk'; import { Dialog as Dialog$1 } from '@base-ui/react/dialog'; import { ContextMenu as ContextMenu$1 } from '@base-ui/react/context-menu'; import { Drawer as Drawer$1 } from 'vaul'; import { Menu } from '@base-ui/react/menu'; import { PreviewCard } from '@base-ui/react/preview-card'; import { OTPInput } from 'input-otp'; import { NavigationMenu as NavigationMenu$1 } from '@base-ui/react/navigation-menu'; import { Popover as Popover$1 } from '@base-ui/react/popover'; import { Progress as Progress$1 } from '@base-ui/react/progress'; import { Radio } from '@base-ui/react/radio'; import { RadioGroup as RadioGroup$1 } from '@base-ui/react/radio-group'; import * as ResizablePrimitive from 'react-resizable-panels'; import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area'; import { Select as Select$1 } from '@base-ui/react/select'; import { Separator as Separator$1 } from '@base-ui/react/separator'; import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip'; import { Slider as Slider$1 } from '@base-ui/react/slider'; import { ToasterProps } from 'sonner'; import { Switch as Switch$1 } from '@base-ui/react/switch'; import { Tabs as Tabs$1 } from '@base-ui/react/tabs'; import { Toggle as Toggle$1 } from '@base-ui/react/toggle'; import { UniqueIdentifier, DndContextProps, DragEndEvent, DragOverlay } from '@dnd-kit/core'; import { SortableContextProps } from '@dnd-kit/sortable'; import '../ApiRequestDataTypeInterface-CYEcRUrh.mjs'; import '../AbstractApiData-XLhBP5Tl.mjs'; import '../AbstractService-B0T7h8fX.mjs'; type AddUserToRoleProps = { role: RoleInterface; refresh: () => Promise; }; declare function AddUserToRole(props: AddUserToRoleProps): React$1.JSX.Element; type UserAvatarEditorProps = { user?: UserInterface; file?: File | null; setFile: (file: File | null) => void; resetImage: boolean; setResetImage: (reset: boolean) => void; }; declare function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }: UserAvatarEditorProps): React$1.JSX.Element; type UserDeleterProps = { user: UserInterface; companyId?: string; onDeleted?: () => void; }; declare function UserDeleter(props: UserDeleterProps): React$1.JSX.Element | null; type UserEditorProps = { user?: UserInterface; propagateChanges?: (user: UserInterface) => void; adminCreated?: boolean; trigger?: ReactNode; onRevalidate?: (path: string) => Promise; forceShow?: boolean; onClose?: () => void; dialogOpen?: boolean; onDialogOpenChange?: (open: boolean) => void; }; declare function UserEditor(props: UserEditorProps): React$1.JSX.Element | null; type UserMultiSelectProps = { id: string; form: any; currentUser?: UserInterface; label?: string; placeholder?: string; onChange?: (users?: UserInterface[]) => void; maxCount?: number; isRequired?: boolean; }; declare function UserMultiSelect({ id, form, currentUser, label, placeholder, onChange, isRequired, }: UserMultiSelectProps): React$1.JSX.Element; type UserReactivatorProps = { user: UserInterface; propagateChanges: (user: UserInterface) => void; }; declare function UserReactivator(props: UserReactivatorProps): React$1.JSX.Element | null; type UserResentInvitationEmailProps = { user: UserInterface; }; declare function UserResentInvitationEmail(props: UserResentInvitationEmailProps): React$1.JSX.Element | null; type UserSelectorProps = { id: string; form: any; label?: string; placeholder?: string; onChange?: (user?: UserInterface) => void; isRequired?: boolean; }; declare function UserSelector({ id, form, label, placeholder, onChange, isRequired }: UserSelectorProps): React$1.JSX.Element; type EntityAvatarProps = { image?: string; name: string; className?: string; fallbackClassName?: string; }; declare function EntityAvatar({ image, name, className, fallbackClassName, }: EntityAvatarProps): React$1.JSX.Element; type EditableAvatarProps = { entityId: string; module: ModuleWithPermissions; image?: string; fallback: string; alt: string; patchImage: (imageKey: string) => Promise; className?: string; fallbackClassName?: string; /** * Company id used to namespace the S3 upload key. Supplied by the caller from * whichever current-user context the host app instantiates, so this leaf * component does not depend on a specific provider being mounted. */ companyId: string; }; declare function EditableAvatar({ entityId, module, image, fallback, alt, patchImage, className, fallbackClassName, companyId, }: EditableAvatarProps): React$1.JSX.Element; type TableCellAvatarProps = { image?: string; name: string; className?: string; }; declare function TableCellAvatar({ image, name, className }: TableCellAvatarProps): React$1.JSX.Element; type PageContainerProps = { children: React.ReactNode; testId?: string; className?: string; }; declare function PageContainer({ children, testId, className }: PageContainerProps): React$1.JSX.Element; type Tab = { key?: ModuleWithPermissions; label: string; contentLabel?: React.ReactNode; content: React.ReactNode; modules?: ModuleWithPermissions[]; action?: Action; /** * Section header this tab clusters under in the `RoundPageContainer` * `layout="rail"` navigation. Tabs without a `group` render at the top of the * rail (the "pinned" stratum) in declared order; groups render in first-seen * order. Ignored by the default `layout="tabs"` (flat) rendering. */ group?: string; /** * Stable identifier used for the URL `?section=` value and active-tab * matching. Defaults to `key?.name ?? label`. Provide this for tabs that have * no `key` (no backing module) but still need a stable, locale-independent * deep link — e.g. `"dashboard"`, `"analysis"`, `"timeline"`. */ sectionKey?: string; /** * When true, the tab content fills the available viewport height inside its * container. The tab's wrapper chain switches to a flex-column layout with * `flex-1 min-h-0`, the outer page scroll is suppressed, and the tab content * becomes the only scroll context. The tabs strip stays sticky at the top. * * Honoured by `RoundPageContainer`. `TabsContainer` (this file) ignores it * because it doesn't own the surrounding scroll container. */ fillHeight?: boolean; }; type TabsContainerProps = { tabs: Tab[]; defaultTab?: string; tabsListClassName?: string; tabsTriggerClassName?: string; scrollAreaClassName?: string; style?: "navigation"; additionalComponent?: React.ReactNode; }; declare function TabsContainer({ tabs, defaultTab, tabsListClassName, tabsTriggerClassName, scrollAreaClassName, style, additionalComponent, }: TabsContainerProps): string | number | bigint | boolean | Iterable | Promise> | Iterable | null | undefined> | React$1.JSX.Element | null | undefined; type PartitionedTabs = { ungrouped: Tab[]; groups: Array<{ label: string; items: Tab[]; }>; }; /** * Split a `Tab[]` into ungrouped + grouped strata for the * `RoundPageContainer` `layout="rail"` navigation. * * Tabs without a `group` land in `ungrouped` (the pinned stratum) in declared * order. Grouped tabs cluster under their `group` label; groups appear in the * order they first occur in the input array. * * Pure function — safe to call on every render. Complexity O(n). */ declare function partitionTabs(tabs: Tab[]): PartitionedTabs; type ReactMarkdownContainerProps = { content: string; collapsible?: boolean; initialLines?: number; size?: "small" | "normal"; }; declare function ReactMarkdownContainer({ content, collapsible, initialLines, size, }: ReactMarkdownContainerProps): React$1.JSX.Element; type RoundPageContainerProps = { module?: ModuleWithPermissions; id?: string; details?: ReactNode; tabs?: Tab[]; children?: ReactNode; fullWidth?: boolean; forceHeader?: boolean; header?: ReactNode; /** * Section-navigation layout for `tabs`. * - `"tabs"` (default) — horizontal `TabsList` (desktop) / `Select` (mobile). * Unchanged from prior behaviour; existing callers need no edits. * - `"rail"` — vertical 220px left rail grouped by each tab's `group`, with a * ` void; /** * `data-testid` for the page shell. Applied to the outermost content wrapper * of BOTH return branches — the pre-hydration one and the main one — so an * e2e suite gating page-readiness on the testid can attach before hydration * completes rather than racing it. */ testId?: string; /** * Initial state of the `details` panel before the persisted preference (the * `round_page_details_state` cookie) is read. Defaults to `false` — the panel * starts collapsed, which suits an informational aside. * * Pass `true` when `details` holds PRIMARY navigation rather than an aside * (e.g. the chat / conversation list), where a collapsed-by-default panel * would hide the page's main affordance behind a toggle. The stored * preference still wins in both directions once the user sets one. * * Requires the title bar to be rendered (`!fullWidth || forceHeader`) — * that is where the toggle lives, so a `fullWidth` caller passing `details` * without `forceHeader` leaves the panel unreachable. */ defaultDetailsOpen?: boolean; /** * Heading for the `details` panel. Rendered as a fixed header above the * panel's scroll area, used as the mobile `Sheet` title (replacing the old * hardcoded "Details"), and woven into the toggle's tooltip — so the control * reads "Show conversations" rather than an unlabelled icon. * * Strongly recommended whenever `details` holds primary navigation: without * it the panel is an unlabelled column and the toggle is unguessable. */ detailsTitle?: ReactNode; /** * Icon for the `details` toggle. Defaults to an info glyph, which suits an * informational aside. Pass a panel/list glyph when `details` holds primary * navigation — an "info" icon actively misdescribes a conversation list. */ detailsIcon?: ReactNode; }; declare function RoundPageContainer({ module, id, details, tabs, children, fullWidth, forceHeader, header, layout, onSectionChange, testId, defaultDetailsOpen, detailsTitle, detailsIcon, }: RoundPageContainerProps): React$1.JSX.Element; /** * Shared height floor for the card's top row. Applied BOTH here and to the * `details` panel header in RoundPageContainer, so the two line up across the * card's top edge. Expressed in px on purpose: the app scales its root * font-size (14px), so a rem value would drift between the two rows. */ declare const HEADER_ROW_MIN_H = "min-h-[53px]"; type RoundPageContainerTitleProps = { module?: ModuleWithPermissions; details?: ReactNode; /** Names what the toggle reveals, so the control is not an unlabelled icon. */ detailsTitle?: ReactNode; /** Overrides the default info glyph — see `RoundPageContainer.detailsIcon`. */ detailsIcon?: ReactNode; showDetails: boolean; setShowDetails: (show: boolean) => void; fullWidth?: boolean; }; declare function RoundPageContainerTitle({ module, details, detailsTitle, detailsIcon, showDetails, setShowDetails, }: RoundPageContainerTitleProps): React$1.JSX.Element; type AttributeElementProps = { inline?: boolean; title?: string | ReactElement; value?: string | ReactElement; className?: string; }; declare function AttributeElement({ inline, title, value, className }: AttributeElementProps): React$1.JSX.Element; type AllowedUsersDetailsProps = { showTitle?: boolean; content: ContentInterface; }; declare function AllowedUsersDetails({ showTitle, content }: AllowedUsersDetailsProps): React$1.JSX.Element; interface MentionItem { id: string; name: string; entityType: string; icon?: React__default.ReactNode; } /** * A suggestion item enriched with the entity it points at. Entity NAMES are not * unique (two clues can both be called "New clue"), so a custom * `suggestionMenuComponent` MUST key its rows on `id`, never on `title`. */ type MentionSuggestionItem = DefaultReactSuggestionItem & { id?: string; entityType?: string; }; type MentionSearchFn = (query: string, params?: Record) => Promise; type MentionInsertFn = (id: string, name: string, entityType: string) => void; declare const useMentionInsert: () => MentionInsertFn | null; interface BlockNoteEditorSuggestionMenuControllerProps { editor: BlockNoteEditor; mentionSearchFn: MentionSearchFn; mentionSearchParams?: Record; suggestionMenuComponent?: React__default.FC>; } declare function BlockNoteEditorMentionSuggestionMenu({ editor, mentionSearchFn, mentionSearchParams, suggestionMenuComponent, }: BlockNoteEditorSuggestionMenuControllerProps): React__default.JSX.Element; interface MentionRenderProps { id: string; entityType: string; alias: string; } /** @deprecated Use MentionRenderProps. */ type MentionHoverCardProps = MentionRenderProps; interface MentionResolveResult { /** Navigation target. Optional — without it, default Link goes to "#" and only renders text. */ url?: string; name: string; /** Replace the entire inline element. Receives the same props as the default. Must keep the data-mention-* attributes if hovercard support is desired. */ Inline?: React__default.ComponentType; /** Rendered inside the hovercard popup that opens on mouseover. */ HoverContent?: React__default.ComponentType; /** Override the default Link's click behavior (e.g., open a modal/sidebar instead of navigating). */ onActivate?: (e: React__default.MouseEvent, props: MentionRenderProps) => void; } type MentionResolveFn = (id: string, entityType: string, alias: string) => MentionResolveResult | null; type MentionNameResolver = (id: string, entityType: string, alias: string) => string; /** Spread on the root element of a custom Inline so the hovercard can detect hover. */ declare const mentionDataAttrs: (p: MentionRenderProps) => { "data-mention-id": string; "data-mention-type": string; "data-mention-alias": string; }; declare const parseMentionElement: (element: HTMLElement) => { id: string; entityType: string; alias: string; } | undefined; declare const createMentionInlineContentSpec: (resolveFn?: MentionResolveFn, disableMention?: boolean, nameResolver?: MentionNameResolver) => _blocknote_core.InlineContentSpec<{ readonly type: "mention"; readonly propSchema: { readonly alias: { readonly default: "Unknown"; }; readonly id: { readonly default: "Unknown"; }; readonly entityType: { readonly default: "Unknown"; }; }; readonly content: "none"; }>; type BlockNoteAiConfig = { endpoint: string; entityType: string; entityId?: string; }; type BlockNoteEditorProps = { id: string; type: string; initialContent?: PartialBlock[]; onChange?: (content: any, isEmpty: boolean, hasUnresolvedDiff: boolean) => void; size?: "sm" | "md"; className?: string; markdownContent?: string; diffContent?: PartialBlock[]; placeholder?: string; bordered?: boolean; inlineContentSpecs?: Record; renderOverlays?: (editor: any) => React__default.ReactNode; enableMentions?: boolean; disableMentions?: boolean; mentionSearchFn?: (query: string, params?: Record) => Promise; mentionSearchParams?: Record; mentionResolveFn?: MentionResolveFn; suggestionMenuComponent?: React__default.FC>; mentionNameResolver?: MentionNameResolver; onWarmMentions?: (blocks: PartialBlock[]) => void; aiConfig?: BlockNoteAiConfig; stretch?: boolean; aiEnabled?: boolean; }; declare const BlockNoteEditorContainer: React__default.NamedExoticComponent; declare function BlockNoteEditorMentionHoverCard({ containerRef, mentionResolveFn, }: { containerRef: React__default.RefObject; mentionResolveFn?: MentionResolveFn; }): React__default.ReactPortal | null; declare const BlockNoteViewerContainer: React__default.NamedExoticComponent<{ content: unknown; }>; declare function ErrorDetails({ title, message, code }: { title?: string; message: string; code: number; }): React$1.JSX.Element; declare function errorToast(params: { title?: string; error: any; }): void; type FormFeaturesProps = { form: any; name?: string; features: FeatureInterface[]; featureField?: string; }; declare function FormFeatures({ form, name, features, featureField }: FormFeaturesProps): React$1.JSX.Element; type CommonAssociationTriggerProps = { sourceType: string; destinationType: string; hasDestination?: boolean; onTrigger: () => void; }; declare function CommonAssociationTrigger({ sourceType, destinationType, hasDestination, onTrigger, }: CommonAssociationTriggerProps): React$1.JSX.Element; type CommonAssociationCommandDialogProps = { show: boolean; setShow: (show: boolean) => void; data: DataListRetriever; source: string; destination: string; destinationName: string; children: ReactNode; }; declare function CommonAssociationCommandDialog({ show, setShow, data, source, destination, destinationName, children, }: CommonAssociationCommandDialogProps): React$1.JSX.Element; declare const triggerAssociationToast: (params: { t: any; source: string; destination: string; source_name: string; destination_name: string; level?: string; }) => void; type CommonDeleterProps = { type?: string; /** Override the type-derived dialog title. */ title?: string; /** Override the type-derived dialog subtitle. */ subtitle?: string; /** Override the type-derived dialog body; rendered as-is. */ description?: ReactNode; deleteFunction: () => Promise; redirectTo?: string; forceShow?: boolean; testId?: string; /** Custom trigger element replacing the default trash button. */ trigger?: ReactNode; onSuccess?: () => void | Promise; /** Fired after a successful delete, in addition to redirect/onSuccess. */ propagateChanges?: () => void; }; declare function CommonDeleter({ deleteFunction, redirectTo, type, title, subtitle, description, forceShow, testId, trigger, onSuccess, propagateChanges, }: CommonDeleterProps): React$1.JSX.Element; type CommonEditorButtonsProps = { isEdit: boolean; form: any; disabled?: boolean; setOpen: (open: boolean) => void; hideSubmit?: boolean; centerButtons?: ReactNode; buttonTitle?: string; }; declare function CommonEditorButtons({ isEdit, form, disabled, setOpen, hideSubmit, centerButtons, buttonTitle, }: CommonEditorButtonsProps): React$1.JSX.Element; type CommonEditorDiscardDialogProps = { open: boolean; onOpenChange: (open: boolean) => void; onDiscard: () => void; }; declare function CommonEditorDiscardDialog({ open, onOpenChange, onDiscard }: CommonEditorDiscardDialogProps): React$1.JSX.Element; type CommonEditorHeaderProps = { type: string; name?: string; title?: string; description?: string; }; declare function CommonEditorHeader({ type, name, title, description }: CommonEditorHeaderProps): React$1.JSX.Element; type CommonEditorTriggerProps = { isEdit: boolean; edit?: string; create?: string; testId?: string; title?: string; }; declare function CommonEditorTrigger({ isEdit, edit: _edit, create, testId, title }: CommonEditorTriggerProps): React__default.JSX.Element; declare const CommonAddTrigger: React__default.ForwardRefExoticComponent string>, "ref"> & React__default.RefAttributes>; /** * Standalone (non-`Form*`) currency input that operates in integer cents. * * **Why this exists.** A controlled input whose displayed string is recomputed * from a canonical numeric value on every keystroke causes the browser caret * to jump to the end whenever the rendered string differs from what the user * just typed (e.g. typing "1" with selection "10.00" → onChange parses cents * → reformats to "1.00" → caret resets). To avoid that this component keeps * a **local draft string while focused** and only parses + commits the cents * value to the parent **on blur**. While typing, the input shows literally * what the user typed. * * Currency symbols and decimal-separator rules: the component accepts both * `,` and `.` as decimal separators (mirroring the codebase's `parseCurrencyInput` * utility) and renders the canonical cents → `"X.YZ"` via `(cents / 100).toFixed(2)`. * A localised display (e.g. `1.234,56`) is intentionally out of scope here — * this input is for editing; presentation lives elsewhere (`formatCurrency`). * * For form-bound inputs use ``. This component * is for standalone (non-react-hook-form) usage such as table-row editors * where each row is local component state. */ type CurrencyInputProps = { valueCents: number; onChange: (cents: number) => void; currencySymbol?: string; readOnly?: boolean; disabled?: boolean; placeholder?: string; className?: string; testId?: string; }; declare function CurrencyInput({ valueCents, onChange, currencySymbol, readOnly, disabled, placeholder, className, testId, }: CurrencyInputProps): React__default.JSX.Element; type DatePickerPopoverProps = { /** MUST be a single element — it becomes the trigger element itself (see `render` below). */ children: ReactElement; /** * Whether the element passed as `children` is a real