@iblai/iblai-js 2.33.2 → 2.33.3

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.
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default, { useState, useEffect, forwardRef, createElement as createElement$1, useLayoutEffect, createContext, useContext, useMemo, useReducer, useRef, useImperativeHandle, useCallback, isValidElement, Children, PureComponent, cloneElement, Component as Component$1, useDebugValue, Fragment as Fragment$2, useId as useId$2, lazy, Suspense } from 'react';
4
4
  import * as dataLayer from '@iblai/data-layer';
5
- import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useGetUserProfileSummaryQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerCourseOutlineQuery, getSections, findResumeBlock, flattenOutline, normalizeLearnerCompletionError, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation, useListArtifactsQuery, useLazyGetSessionIdQuery, useGetAiSearchMentorsQuery, useStarMentorMutation, useUnstarMentorMutation, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, useUserLlmUsageSummary, useUserLlmSpendOverTime, useUserLlmCostByModel, useUserLlmRecentActivity, USER_LLM_RECENT_ACTIVITY_PAGE_SIZE, useUserLlmTraceObservations, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useGetVectorDocumentsQuery, useGetLlmsQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetLlmUsageMetricsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, VERCEL_SPA, useGetCustomDomainsQuery, useGetHostingProjectsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useCreateHostingProjectDomainMutation, useUpdateHostingDomainMutation, useDeleteHostingDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useCreateMentorMemoryMutation, splitHostPortInput, validateHostPort, useCreateVirtualMachineNetworkPolicyMutation, useUpdateVirtualMachineNetworkPolicyMutation, VIRTUAL_MACHINE_MAX_POLICY_HOSTS, getVirtualMachineApiError, useDeleteVirtualMachineNetworkPolicyMutation, extractBoundMentorIds, useCreateVirtualMachineSecretMutation, useUpdateVirtualMachineSecretMutation, VIRTUAL_MACHINE_SECRET_VALUE_MIN_LENGTH, VIRTUAL_MACHINE_ENV_VAR_PATTERN, useDeleteVirtualMachineSecretMutation, useGetIntegrationCredentialsQuery, useListVirtualMachineNetworkPoliciesQuery, useListVirtualMachineSecretsQuery, getVirtualMachineErrorStatus, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, mentorApiSlice, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetGradeResultQuery, useOverrideGradeResultMutation, useGetChatHistoryFilterQuery, useListGradeResultsQuery, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetSpendCapStatusQuery, useGetMentorPublicSettingsQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useDeleteLtiMentorMutation, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useGetDisclaimerAgreementsQuery } from '@iblai/data-layer';
5
+ import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useGetUserProfileSummaryQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerCourseOutlineQuery, getSections, findResumeBlock, flattenOutline, normalizeLearnerCompletionError, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useUpdateMentorMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useDeleteMentorMemoryMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation, useListArtifactsQuery, useLazyGetSessionIdQuery, useGetAiSearchMentorsQuery, useStarMentorMutation, useUnstarMentorMutation, useGetUserChatHistoryReportsQuery, USER_CHAT_HISTORY_REPORT_ACTIVE_STATES, useCreateUserChatHistoryReportMutation, useLazyGetDownloadReportFromURLQuery, useGetUserChatHistoryReportStatusQuery, userChatHistoryApiSlice, USER_CHAT_HISTORY_QUERY_KEYS, useGetUserChatHistoryQuery, useGetUserChatHistoryFilterQuery, useGetMentorsQuery, useGetUserChatHistorySessionQuery, useUserLlmUsageSummary, useUserLlmSpendOverTime, useUserLlmCostByModel, useUserLlmRecentActivity, USER_LLM_RECENT_ACTIVITY_PAGE_SIZE, useUserLlmTraceObservations, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useGetVectorDocumentsQuery, useGetLlmsQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, useGetAccessibleUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacResourceDiscoveryQuery, useGetRbacResourceListQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useGetApplicationFormsQuery, useGetApplicationFormDetailQuery, useCreateApplicationFormMutation, useUpdateApplicationFormMutation, useGetApplicationAdminDetailQuery, useInviteApplicationCandidateMutation, useLazyGetApplicationAttachmentFileQuery, useCreateApplicationWaiverMutation, useDeleteApplicationWaiverMutation, useSubmitApplicationOverrideMutation, useUpdateApplicationPlacementMutation, useDeleteApplicationCourseAssignmentMutation, useCreateApplicationNoteMutation, useUpdateApplicationNoteMutation, useDeleteApplicationNoteMutation, useTransitionApplicationMutation, useLinkApplicationCandidateMutation, useCreateApplicationPlacementsMutation, useGetCustomMentorsQuery, useCreateApplicationCourseAssignmentsMutation, useGetApplicationBlocksQuery, useDeleteApplicationBlockMutation, useGetApplicationsPipelineStatsQuery, useGetApplicationsPipelineQuery, useGetTenantMetadataQuery, useUpdateTenantMetadataMutation, useLazyGetTenantMetadataQuery, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useGetAgentSpendCapQuery, useGetTenantSpendCapQuery, useListAgentUserSpendCapsQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetLlmUsageMetricsQuery, useListAgentSpendCapsQuery, useGetCreditTransactionsQuery, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, VERCEL_SPA, useGetCustomDomainsQuery, useGetHostingProjectsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useCreateHostingProjectDomainMutation, useUpdateHostingDomainMutation, useDeleteHostingDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useCreateMentorMemoryMutation, splitHostPortInput, validateHostPort, useCreateVirtualMachineNetworkPolicyMutation, useUpdateVirtualMachineNetworkPolicyMutation, VIRTUAL_MACHINE_MAX_POLICY_HOSTS, getVirtualMachineApiError, useDeleteVirtualMachineNetworkPolicyMutation, extractBoundMentorIds, useCreateVirtualMachineSecretMutation, useUpdateVirtualMachineSecretMutation, VIRTUAL_MACHINE_SECRET_VALUE_MIN_LENGTH, VIRTUAL_MACHINE_ENV_VAR_PATTERN, useDeleteVirtualMachineSecretMutation, useGetIntegrationCredentialsQuery, useListVirtualMachineNetworkPoliciesQuery, useListVirtualMachineSecretsQuery, getVirtualMachineErrorStatus, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetMentorSkillAssignmentsQuery, useGetAgentSkillsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useCreateEvalDatasetMutation, useAddEvalDatasetItemsMutation, useUploadEvalDatasetCsvMutation, useDeleteEvalDatasetItemMutation, useListEvalDatasetItemsQuery, evalTotalPages, useListEvalDatasetsQuery, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useGetSharedMemoriesQuery, useCreateSharedMemoryMutation, useUpdateSharedMemoryMutation, useDeleteSharedMemoryMutation, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, mentorApiSlice, useGetVoicesQuery, useGetVoiceQuery, isBaseAgentMentor, useGetGradeResultQuery, useOverrideGradeResultMutation, useGetChatHistoryFilterQuery, useListGradeResultsQuery, useGetMentorGraderConfigurationQuery, useListGraderCriteriaQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useGetSpendCapStatusQuery, useGetMentorPublicSettingsQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useGetSupportTicketsQuery, useGetSupportTicketMessagesQuery, useCreateSupportTicketMessageMutation, usePatchSupportTicketMutation, useCloseSupportTicketMutation, useCreateLtiMentorMutation, useUpdateLtiMentorMutation, useGetLtiMentorsQuery, useDeleteLtiMentorMutation, useCreateLtiKeyMutation, useUpdateLtiKeyMutation, useDeleteLtiKeyMutation, useGetLtiKeysQuery, useCreateLtiToolMutation, useUpdateLtiToolMutation, useGetLtiToolsQuery, useGetPlatformInfoQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStartEvalRunMutation, useEvaluateEvalRunMutation, useGetEvalRunQuery, useDeleteEvalScoreMutation, useListEvalRunJudgesQuery, useCreateEvalScoreMutation, useDeleteEvalRunMutation, useExportEvalRunMutation, useListEvalRunsQuery, useLazyGetEvalRunQuery, evaluationsApiSlice, EVALUATIONS_TAGS, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPublicMentorsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useGetDisclaimerAgreementsQuery } from '@iblai/data-layer';
6
6
  import { removeAuthItem, setAuthItem, isTauriEmbeddedLLMHost, selectRbacPermissions, useCurrentTenant, canViewOtherUsersChatHistory, isPureWatcher, getInitials, useTenantMetadata, useUsername, selectStreaming, isLoggedIn, TOOL_NAME_MAP, WRITE_TODOS_TOOL, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, selectNumberOfActiveChatMessages, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, removeFile, chatInputSliceActions, chatActions, WithFormPermissions, useTenantContext, TimeTracker, advancedTabsProperties, defaultSessionIds, pickWritableFields, ANONYMOUS_USERNAME as ANONYMOUS_USERNAME$3, redirectToAuthSpaJoinTenant, selectActiveTab, useAxdToken, useWelcomeMessage, markdownToPlainText, useCachedSessionId, use402ErrorCheck, use401TokenRefresh, selectTokenEnabled, selectToken, useServiceWorker, useUserAgreement, useAdvancedChat, sendMessageToParentWebsite, useMentorTools, useFileDragDrop, eventBus, RemoteEvents, selectEnableChatActionsPopup, advancedTabs, isInIframe, getAuthSpaJoinUrl, addMessage, clearFiles, MENTOR_VISIBILITY } from '@iblai/web-utils';
7
7
  import { useDispatch, useSelector } from 'react-redux';
8
8
  import { toast } from 'sonner';
@@ -1727,7 +1727,7 @@ function endOfISOWeek(date, options) {
1727
1727
  return endOfWeek(date, { ...options, weekStartsOn: 1 });
1728
1728
  }
1729
1729
 
1730
- const formatDistanceLocale = {
1730
+ const formatDistanceLocale$3 = {
1731
1731
  lessThanXSeconds: {
1732
1732
  one: "less than a second",
1733
1733
  other: "less than {{count}} seconds",
@@ -1806,10 +1806,10 @@ const formatDistanceLocale = {
1806
1806
  },
1807
1807
  };
1808
1808
 
1809
- const formatDistance$1 = (token, count, options) => {
1809
+ const formatDistance$4 = (token, count, options) => {
1810
1810
  let result;
1811
1811
 
1812
- const tokenValue = formatDistanceLocale[token];
1812
+ const tokenValue = formatDistanceLocale$3[token];
1813
1813
  if (typeof tokenValue === "string") {
1814
1814
  result = tokenValue;
1815
1815
  } else if (count === 1) {
@@ -1838,45 +1838,45 @@ function buildFormatLongFn(args) {
1838
1838
  };
1839
1839
  }
1840
1840
 
1841
- const dateFormats = {
1841
+ const dateFormats$3 = {
1842
1842
  full: "EEEE, MMMM do, y",
1843
1843
  long: "MMMM do, y",
1844
1844
  medium: "MMM d, y",
1845
1845
  short: "MM/dd/yyyy",
1846
1846
  };
1847
1847
 
1848
- const timeFormats = {
1848
+ const timeFormats$3 = {
1849
1849
  full: "h:mm:ss a zzzz",
1850
1850
  long: "h:mm:ss a z",
1851
1851
  medium: "h:mm:ss a",
1852
1852
  short: "h:mm a",
1853
1853
  };
1854
1854
 
1855
- const dateTimeFormats = {
1855
+ const dateTimeFormats$3 = {
1856
1856
  full: "{{date}} 'at' {{time}}",
1857
1857
  long: "{{date}} 'at' {{time}}",
1858
1858
  medium: "{{date}}, {{time}}",
1859
1859
  short: "{{date}}, {{time}}",
1860
1860
  };
1861
1861
 
1862
- const formatLong = {
1862
+ const formatLong$3 = {
1863
1863
  date: buildFormatLongFn({
1864
- formats: dateFormats,
1864
+ formats: dateFormats$3,
1865
1865
  defaultWidth: "full",
1866
1866
  }),
1867
1867
 
1868
1868
  time: buildFormatLongFn({
1869
- formats: timeFormats,
1869
+ formats: timeFormats$3,
1870
1870
  defaultWidth: "full",
1871
1871
  }),
1872
1872
 
1873
1873
  dateTime: buildFormatLongFn({
1874
- formats: dateTimeFormats,
1874
+ formats: dateTimeFormats$3,
1875
1875
  defaultWidth: "full",
1876
1876
  }),
1877
1877
  };
1878
1878
 
1879
- const formatRelativeLocale = {
1879
+ const formatRelativeLocale$3 = {
1880
1880
  lastWeek: "'last' eeee 'at' p",
1881
1881
  yesterday: "'yesterday at' p",
1882
1882
  today: "'today at' p",
@@ -1885,8 +1885,8 @@ const formatRelativeLocale = {
1885
1885
  other: "P",
1886
1886
  };
1887
1887
 
1888
- const formatRelative$1 = (token, _date, _baseDate, _options) =>
1889
- formatRelativeLocale[token];
1888
+ const formatRelative$4 = (token, _date, _baseDate, _options) =>
1889
+ formatRelativeLocale$3[token];
1890
1890
 
1891
1891
  /**
1892
1892
  * The localize function argument callback which allows to convert raw value to
@@ -1951,13 +1951,13 @@ function buildLocalizeFn(args) {
1951
1951
  };
1952
1952
  }
1953
1953
 
1954
- const eraValues = {
1954
+ const eraValues$3 = {
1955
1955
  narrow: ["B", "A"],
1956
1956
  abbreviated: ["BC", "AD"],
1957
1957
  wide: ["Before Christ", "Anno Domini"],
1958
1958
  };
1959
1959
 
1960
- const quarterValues = {
1960
+ const quarterValues$3 = {
1961
1961
  narrow: ["1", "2", "3", "4"],
1962
1962
  abbreviated: ["Q1", "Q2", "Q3", "Q4"],
1963
1963
  wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"],
@@ -1967,7 +1967,7 @@ const quarterValues = {
1967
1967
  // If you are making a new locale based on this one, check if the same is true for the language you're working on.
1968
1968
  // Generally, formatted dates should look like they are in the middle of a sentence,
1969
1969
  // e.g. in Spanish language the weekdays and months should be in the lowercase.
1970
- const monthValues = {
1970
+ const monthValues$3 = {
1971
1971
  narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
1972
1972
  abbreviated: [
1973
1973
  "Jan",
@@ -2000,7 +2000,7 @@ const monthValues = {
2000
2000
  ],
2001
2001
  };
2002
2002
 
2003
- const dayValues = {
2003
+ const dayValues$3 = {
2004
2004
  narrow: ["S", "M", "T", "W", "T", "F", "S"],
2005
2005
  short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
2006
2006
  abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
@@ -2015,7 +2015,7 @@ const dayValues = {
2015
2015
  ],
2016
2016
  };
2017
2017
 
2018
- const dayPeriodValues = {
2018
+ const dayPeriodValues$3 = {
2019
2019
  narrow: {
2020
2020
  am: "a",
2021
2021
  pm: "p",
@@ -2048,7 +2048,7 @@ const dayPeriodValues = {
2048
2048
  },
2049
2049
  };
2050
2050
 
2051
- const formattingDayPeriodValues = {
2051
+ const formattingDayPeriodValues$2 = {
2052
2052
  narrow: {
2053
2053
  am: "a",
2054
2054
  pm: "p",
@@ -2081,7 +2081,7 @@ const formattingDayPeriodValues = {
2081
2081
  },
2082
2082
  };
2083
2083
 
2084
- const ordinalNumber = (dirtyNumber, _options) => {
2084
+ const ordinalNumber$3 = (dirtyNumber, _options) => {
2085
2085
  const number = Number(dirtyNumber);
2086
2086
 
2087
2087
  // If ordinal numbers depend on context, for example,
@@ -2105,34 +2105,34 @@ const ordinalNumber = (dirtyNumber, _options) => {
2105
2105
  return number + "th";
2106
2106
  };
2107
2107
 
2108
- const localize = {
2109
- ordinalNumber,
2108
+ const localize$3 = {
2109
+ ordinalNumber: ordinalNumber$3,
2110
2110
 
2111
2111
  era: buildLocalizeFn({
2112
- values: eraValues,
2112
+ values: eraValues$3,
2113
2113
  defaultWidth: "wide",
2114
2114
  }),
2115
2115
 
2116
2116
  quarter: buildLocalizeFn({
2117
- values: quarterValues,
2117
+ values: quarterValues$3,
2118
2118
  defaultWidth: "wide",
2119
2119
  argumentCallback: (quarter) => quarter - 1,
2120
2120
  }),
2121
2121
 
2122
2122
  month: buildLocalizeFn({
2123
- values: monthValues,
2123
+ values: monthValues$3,
2124
2124
  defaultWidth: "wide",
2125
2125
  }),
2126
2126
 
2127
2127
  day: buildLocalizeFn({
2128
- values: dayValues,
2128
+ values: dayValues$3,
2129
2129
  defaultWidth: "wide",
2130
2130
  }),
2131
2131
 
2132
2132
  dayPeriod: buildLocalizeFn({
2133
- values: dayPeriodValues,
2133
+ values: dayPeriodValues$3,
2134
2134
  defaultWidth: "wide",
2135
- formattingValues: formattingDayPeriodValues,
2135
+ formattingValues: formattingDayPeriodValues$2,
2136
2136
  defaultFormattingWidth: "wide",
2137
2137
  }),
2138
2138
  };
@@ -2216,33 +2216,33 @@ function buildMatchPatternFn(args) {
2216
2216
  };
2217
2217
  }
2218
2218
 
2219
- const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
2220
- const parseOrdinalNumberPattern = /\d+/i;
2219
+ const matchOrdinalNumberPattern$3 = /^(\d+)(th|st|nd|rd)?/i;
2220
+ const parseOrdinalNumberPattern$3 = /\d+/i;
2221
2221
 
2222
- const matchEraPatterns = {
2222
+ const matchEraPatterns$3 = {
2223
2223
  narrow: /^(b|a)/i,
2224
2224
  abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
2225
2225
  wide: /^(before christ|before common era|anno domini|common era)/i,
2226
2226
  };
2227
- const parseEraPatterns = {
2227
+ const parseEraPatterns$3 = {
2228
2228
  any: [/^b/i, /^(a|c)/i],
2229
2229
  };
2230
2230
 
2231
- const matchQuarterPatterns = {
2231
+ const matchQuarterPatterns$3 = {
2232
2232
  narrow: /^[1234]/i,
2233
2233
  abbreviated: /^q[1234]/i,
2234
2234
  wide: /^[1234](th|st|nd|rd)? quarter/i,
2235
2235
  };
2236
- const parseQuarterPatterns = {
2236
+ const parseQuarterPatterns$3 = {
2237
2237
  any: [/1/i, /2/i, /3/i, /4/i],
2238
2238
  };
2239
2239
 
2240
- const matchMonthPatterns = {
2240
+ const matchMonthPatterns$3 = {
2241
2241
  narrow: /^[jfmasond]/i,
2242
2242
  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
2243
2243
  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,
2244
2244
  };
2245
- const parseMonthPatterns = {
2245
+ const parseMonthPatterns$3 = {
2246
2246
  narrow: [
2247
2247
  /^j/i,
2248
2248
  /^f/i,
@@ -2274,22 +2274,22 @@ const parseMonthPatterns = {
2274
2274
  ],
2275
2275
  };
2276
2276
 
2277
- const matchDayPatterns = {
2277
+ const matchDayPatterns$3 = {
2278
2278
  narrow: /^[smtwf]/i,
2279
2279
  short: /^(su|mo|tu|we|th|fr|sa)/i,
2280
2280
  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
2281
2281
  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,
2282
2282
  };
2283
- const parseDayPatterns = {
2283
+ const parseDayPatterns$3 = {
2284
2284
  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
2285
2285
  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],
2286
2286
  };
2287
2287
 
2288
- const matchDayPeriodPatterns = {
2288
+ const matchDayPeriodPatterns$3 = {
2289
2289
  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
2290
2290
  any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,
2291
2291
  };
2292
- const parseDayPeriodPatterns = {
2292
+ const parseDayPeriodPatterns$3 = {
2293
2293
  any: {
2294
2294
  am: /^a/i,
2295
2295
  pm: /^p/i,
@@ -2302,46 +2302,46 @@ const parseDayPeriodPatterns = {
2302
2302
  },
2303
2303
  };
2304
2304
 
2305
- const match = {
2305
+ const match$3 = {
2306
2306
  ordinalNumber: buildMatchPatternFn({
2307
- matchPattern: matchOrdinalNumberPattern,
2308
- parsePattern: parseOrdinalNumberPattern,
2307
+ matchPattern: matchOrdinalNumberPattern$3,
2308
+ parsePattern: parseOrdinalNumberPattern$3,
2309
2309
  valueCallback: (value) => parseInt(value, 10),
2310
2310
  }),
2311
2311
 
2312
2312
  era: buildMatchFn({
2313
- matchPatterns: matchEraPatterns,
2313
+ matchPatterns: matchEraPatterns$3,
2314
2314
  defaultMatchWidth: "wide",
2315
- parsePatterns: parseEraPatterns,
2315
+ parsePatterns: parseEraPatterns$3,
2316
2316
  defaultParseWidth: "any",
2317
2317
  }),
2318
2318
 
2319
2319
  quarter: buildMatchFn({
2320
- matchPatterns: matchQuarterPatterns,
2320
+ matchPatterns: matchQuarterPatterns$3,
2321
2321
  defaultMatchWidth: "wide",
2322
- parsePatterns: parseQuarterPatterns,
2322
+ parsePatterns: parseQuarterPatterns$3,
2323
2323
  defaultParseWidth: "any",
2324
2324
  valueCallback: (index) => index + 1,
2325
2325
  }),
2326
2326
 
2327
2327
  month: buildMatchFn({
2328
- matchPatterns: matchMonthPatterns,
2328
+ matchPatterns: matchMonthPatterns$3,
2329
2329
  defaultMatchWidth: "wide",
2330
- parsePatterns: parseMonthPatterns,
2330
+ parsePatterns: parseMonthPatterns$3,
2331
2331
  defaultParseWidth: "any",
2332
2332
  }),
2333
2333
 
2334
2334
  day: buildMatchFn({
2335
- matchPatterns: matchDayPatterns,
2335
+ matchPatterns: matchDayPatterns$3,
2336
2336
  defaultMatchWidth: "wide",
2337
- parsePatterns: parseDayPatterns,
2337
+ parsePatterns: parseDayPatterns$3,
2338
2338
  defaultParseWidth: "any",
2339
2339
  }),
2340
2340
 
2341
2341
  dayPeriod: buildMatchFn({
2342
- matchPatterns: matchDayPeriodPatterns,
2342
+ matchPatterns: matchDayPeriodPatterns$3,
2343
2343
  defaultMatchWidth: "any",
2344
- parsePatterns: parseDayPeriodPatterns,
2344
+ parsePatterns: parseDayPeriodPatterns$3,
2345
2345
  defaultParseWidth: "any",
2346
2346
  }),
2347
2347
  };
@@ -2356,11 +2356,11 @@ const match = {
2356
2356
  */
2357
2357
  const enUS = {
2358
2358
  code: "en-US",
2359
- formatDistance: formatDistance$1,
2360
- formatLong: formatLong,
2361
- formatRelative: formatRelative$1,
2362
- localize: localize,
2363
- match: match,
2359
+ formatDistance: formatDistance$4,
2360
+ formatLong: formatLong$3,
2361
+ formatRelative: formatRelative$4,
2362
+ localize: localize$3,
2363
+ match: match$3,
2364
2364
  options: {
2365
2365
  weekStartsOn: 0 /* Sunday */,
2366
2366
  firstWeekContainsDate: 1,
@@ -4053,7 +4053,7 @@ function cleanEscapedString(input) {
4053
4053
  * })
4054
4054
  * //=> 'pli ol 1 jaro'
4055
4055
  */
4056
- function formatDistance(laterDate, earlierDate, options) {
4056
+ function formatDistance$3(laterDate, earlierDate, options) {
4057
4057
  const defaultOptions = getDefaultOptions();
4058
4058
  const locale = options?.locale ?? defaultOptions.locale ?? enUS;
4059
4059
  const minutesInAlmostTwoDays = 2520;
@@ -4245,7 +4245,7 @@ function formatDistance(laterDate, earlierDate, options) {
4245
4245
  * //=> 'pli ol 1 jaro'
4246
4246
  */
4247
4247
  function formatDistanceToNow(date, options) {
4248
- return formatDistance(date, constructNow(date), options);
4248
+ return formatDistance$3(date, constructNow(date), options);
4249
4249
  }
4250
4250
 
4251
4251
  /**
@@ -4376,6 +4376,53 @@ function isBefore(date, dateToCompare) {
4376
4376
  return +toDate(date) < +toDate(dateToCompare);
4377
4377
  }
4378
4378
 
4379
+ /**
4380
+ * The {@link isSameWeek} function options.
4381
+ */
4382
+
4383
+ /**
4384
+ * @name isSameWeek
4385
+ * @category Week Helpers
4386
+ * @summary Are the given dates in the same week (and month and year)?
4387
+ *
4388
+ * @description
4389
+ * Are the given dates in the same week (and month and year)?
4390
+ *
4391
+ * @param laterDate - The first date to check
4392
+ * @param earlierDate - The second date to check
4393
+ * @param options - An object with options
4394
+ *
4395
+ * @returns The dates are in the same week (and month and year)
4396
+ *
4397
+ * @example
4398
+ * // Are 31 August 2014 and 4 September 2014 in the same week?
4399
+ * const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4))
4400
+ * //=> true
4401
+ *
4402
+ * @example
4403
+ * // If week starts with Monday,
4404
+ * // are 31 August 2014 and 4 September 2014 in the same week?
4405
+ * const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4), {
4406
+ * weekStartsOn: 1
4407
+ * })
4408
+ * //=> false
4409
+ *
4410
+ * @example
4411
+ * // Are 1 January 2014 and 1 January 2015 in the same week?
4412
+ * const result = isSameWeek(new Date(2014, 0, 1), new Date(2015, 0, 1))
4413
+ * //=> false
4414
+ */
4415
+ function isSameWeek(laterDate, earlierDate, options) {
4416
+ const [laterDate_, earlierDate_] = normalizeDates(
4417
+ options?.in,
4418
+ laterDate,
4419
+ earlierDate,
4420
+ );
4421
+ return (
4422
+ +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options)
4423
+ );
4424
+ }
4425
+
4379
4426
  /**
4380
4427
  * The {@link isSameMonth} function options.
4381
4428
  */
@@ -99285,13 +99332,72 @@ var memoryTabLabels$3 = {
99285
99332
  description: "Configure memory settings for your agent."
99286
99333
  },
99287
99334
  toggle: {
99288
- label: "Enable Memory",
99289
- description: "Allow this agent to remember and reference information from past conversations."
99335
+ label: "Long-term Memory",
99336
+ description: "Let this agent remember useful details from past conversations — like a returning colleague — so people don't have to repeat themselves. When on, review what it remembers about each person and add shared memories below.",
99337
+ offHint: "Turn it on to let this agent remember details across conversations."
99338
+ },
99339
+ subTabs: {
99340
+ ariaLabel: "Memory sections",
99341
+ personal: "Personal Memories",
99342
+ shared: "Shared Memory"
99343
+ },
99344
+ sharedMemory: {
99345
+ title: "Shared Memory",
99346
+ description: "Facts, rules, and background this agent should always keep in mind. Every person who chats with this agent gets these memories.",
99347
+ gatingHint: "Shared memories reach chats only while Long-term Memory is on for this agent and the person chatting has memory turned on.",
99348
+ addButton: "Add Shared Memory",
99349
+ addButtonShort: "Add",
99350
+ listAriaLabel: "Shared memories",
99351
+ actionsAria: "Shared memory actions",
99352
+ edit: "Edit",
99353
+ "delete": "Delete",
99354
+ loading: "Loading shared memories...",
99355
+ loadError: "Couldn't load this agent's shared memories. Please try again.",
99356
+ unknownAuthor: "Unknown",
99357
+ addedBy: "Added by {name}",
99358
+ empty: {
99359
+ title: "No Shared Memories Yet",
99360
+ description: "Add anything this agent should always keep in mind — how to behave, key facts, or house rules. Every person who chats with this agent gets these memories."
99361
+ },
99362
+ denied: {
99363
+ title: "No Access to Shared Memory",
99364
+ description: "You don't have permission to view this agent's shared memories. Ask an administrator for access."
99365
+ },
99366
+ modal: {
99367
+ addTitle: "Add Shared Memory",
99368
+ editTitle: "Edit Shared Memory",
99369
+ contentLabel: "Memory",
99370
+ placeholder: "Write what this agent should always keep in mind...",
99371
+ charCountMinimum: "{count}/10 characters minimum",
99372
+ charCount: "{count} characters",
99373
+ save: "Save",
99374
+ saving: "Saving...",
99375
+ cancel: "Cancel"
99376
+ },
99377
+ deleteModal: {
99378
+ title: "Delete Shared Memory",
99379
+ description: "Are you sure you want to delete this shared memory? Everyone who chats with this agent will stop seeing it. This action cannot be undone.",
99380
+ "delete": "Delete",
99381
+ deleting: "Deleting...",
99382
+ cancel: "Cancel"
99383
+ },
99384
+ errors: {
99385
+ duplicate: "This shared memory already exists.",
99386
+ tooShort: "A shared memory must be at least 10 characters.",
99387
+ forbidden: "You don't have permission to change this agent's shared memories."
99388
+ },
99389
+ toasts: {
99390
+ created: "Shared memory added",
99391
+ updated: "Shared memory updated",
99392
+ deleted: "Shared memory deleted",
99393
+ saveError: "Couldn't save shared memory",
99394
+ deleteError: "Couldn't delete shared memory"
99395
+ }
99290
99396
  },
99291
99397
  toasts: {
99292
- enableSuccess: "Memory enabled",
99293
- disableSuccess: "Memory disabled",
99294
- toggleError: "Failed to update memory setting"
99398
+ enableSuccess: "Memory turned on",
99399
+ disableSuccess: "Memory turned off",
99400
+ toggleError: "Couldn't update memory setting"
99295
99401
  }
99296
99402
  };
99297
99403
  var memoryTabLearnersMemories$3 = {
@@ -99355,7 +99461,10 @@ var memoryTabManageMemories$3 = {
99355
99461
  memoryUpdatedSuccessfully: "Memory updated successfully",
99356
99462
  failedToUpdateMemory: "Failed to update memory",
99357
99463
  memoryCreatedSuccessfully: "Memory created successfully",
99358
- failedToCreateMemory: "Failed to create memory"
99464
+ failedToCreateMemory: "Failed to create memory",
99465
+ savedMemoriesAriaLabel: "Saved memories",
99466
+ memoryActionsAriaLabel: "Memory actions",
99467
+ memoryCategoriesAriaLabel: "Memory categories"
99359
99468
  };
99360
99469
  var memoryTabSavedMemoriesModal$3 = {
99361
99470
  savedMemories: "Saved Memories",
@@ -107183,13 +107292,72 @@ var memoryTabLabels$2 = {
107183
107292
  description: "Configurez les paramètres de mémoire de votre agent."
107184
107293
  },
107185
107294
  toggle: {
107186
- label: "Activer la mémoire",
107187
- description: "Permettre à cet agent de mémoriser et de référencer des informations issues de conversations passées."
107295
+ label: "Mémoire à long terme",
107296
+ description: "Permettez à cet agent de retenir les détails utiles des conversations passées — comme un collègue qui vous connaît déjà — pour que personne n'ait à se répéter. Une fois activée, consultez ci-dessous ce qu'il retient de chaque personne et ajoutez des souvenirs partagés.",
107297
+ offHint: "Activez-la pour que cet agent retienne des détails d'une conversation à l'autre."
107298
+ },
107299
+ subTabs: {
107300
+ ariaLabel: "Sections de la mémoire",
107301
+ personal: "Souvenirs personnels",
107302
+ shared: "Mémoire partagée"
107303
+ },
107304
+ sharedMemory: {
107305
+ title: "Mémoire partagée",
107306
+ description: "Faits, règles et contexte que cet agent doit toujours garder à l'esprit. Chaque personne qui discute avec cet agent bénéficie de ces souvenirs.",
107307
+ gatingHint: "Les souvenirs partagés n'atteignent les conversations que lorsque la mémoire à long terme est activée pour cet agent et que la personne qui discute a activé sa mémoire.",
107308
+ addButton: "Ajouter un souvenir partagé",
107309
+ addButtonShort: "Ajouter",
107310
+ listAriaLabel: "Souvenirs partagés",
107311
+ actionsAria: "Actions sur le souvenir partagé",
107312
+ edit: "Modifier",
107313
+ "delete": "Supprimer",
107314
+ loading: "Chargement des souvenirs partagés...",
107315
+ loadError: "Impossible de charger les souvenirs partagés de cet agent. Veuillez réessayer.",
107316
+ unknownAuthor: "Inconnu",
107317
+ addedBy: "Ajouté par {name}",
107318
+ empty: {
107319
+ title: "Aucun souvenir partagé pour l'instant",
107320
+ description: "Ajoutez tout ce que cet agent doit toujours garder à l'esprit — comment se comporter, faits essentiels ou règles internes. Chaque personne qui discute avec cet agent bénéficie de ces souvenirs."
107321
+ },
107322
+ denied: {
107323
+ title: "Pas d'accès à la mémoire partagée",
107324
+ description: "Vous n'avez pas la permission de voir les souvenirs partagés de cet agent. Demandez l'accès à un administrateur."
107325
+ },
107326
+ modal: {
107327
+ addTitle: "Ajouter un souvenir partagé",
107328
+ editTitle: "Modifier le souvenir partagé",
107329
+ contentLabel: "Souvenir",
107330
+ placeholder: "Écrivez ce que cet agent doit toujours garder à l'esprit...",
107331
+ charCountMinimum: "{count}/10 caractères minimum",
107332
+ charCount: "{count} caractères",
107333
+ save: "Enregistrer",
107334
+ saving: "Enregistrement...",
107335
+ cancel: "Annuler"
107336
+ },
107337
+ deleteModal: {
107338
+ title: "Supprimer le souvenir partagé",
107339
+ description: "Voulez-vous vraiment supprimer ce souvenir partagé ? Tous ceux qui discutent avec cet agent cesseront de le voir. Cette action est irréversible.",
107340
+ "delete": "Supprimer",
107341
+ deleting: "Suppression...",
107342
+ cancel: "Annuler"
107343
+ },
107344
+ errors: {
107345
+ duplicate: "Ce souvenir partagé existe déjà.",
107346
+ tooShort: "Un souvenir partagé doit comporter au moins 10 caractères.",
107347
+ forbidden: "Vous n'avez pas la permission de modifier les souvenirs partagés de cet agent."
107348
+ },
107349
+ toasts: {
107350
+ created: "Souvenir partagé ajouté",
107351
+ updated: "Souvenir partagé mis à jour",
107352
+ deleted: "Souvenir partagé supprimé",
107353
+ saveError: "Impossible d'enregistrer le souvenir partagé",
107354
+ deleteError: "Impossible de supprimer le souvenir partagé"
107355
+ }
107188
107356
  },
107189
107357
  toasts: {
107190
107358
  enableSuccess: "Mémoire activée",
107191
107359
  disableSuccess: "Mémoire désactivée",
107192
- toggleError: "Échec de la mise à jour du paramètre de mémoire"
107360
+ toggleError: "Impossible de mettre à jour le paramètre de mémoire"
107193
107361
  }
107194
107362
  };
107195
107363
  var memoryTabLearnersMemories$2 = {
@@ -107253,7 +107421,10 @@ var memoryTabManageMemories$2 = {
107253
107421
  memoryUpdatedSuccessfully: "Souvenir mis à jour avec succès",
107254
107422
  failedToUpdateMemory: "Échec de la mise à jour du souvenir",
107255
107423
  memoryCreatedSuccessfully: "Souvenir créé avec succès",
107256
- failedToCreateMemory: "Échec de la création du souvenir"
107424
+ failedToCreateMemory: "Échec de la création du souvenir",
107425
+ savedMemoriesAriaLabel: "Souvenirs enregistrés",
107426
+ memoryActionsAriaLabel: "Actions sur le souvenir",
107427
+ memoryCategoriesAriaLabel: "Catégories de souvenirs"
107257
107428
  };
107258
107429
  var memoryTabSavedMemoriesModal$2 = {
107259
107430
  savedMemories: "Souvenirs enregistrés",
@@ -111234,7 +111405,7 @@ var accessibility$2 = {
111234
111405
  positionAnnouncement: "Bouton d'accessibilité déplacé vers le bord {side, select, left {gauche} other {droit}}, à {bottom} pixels du bas."
111235
111406
  }
111236
111407
  };
111237
- var fr = {
111408
+ var fr$1 = {
111238
111409
  accessTabAddAccess: accessTabAddAccess$2,
111239
111410
  accessTabLabels: accessTabLabels$2,
111240
111411
  accessTabUpdateAccess: accessTabUpdateAccess$2,
@@ -114912,16 +115083,75 @@ var memoryTabEditMemoryModal$1 = {
114912
115083
  var memoryTabLabels$1 = {
114913
115084
  header: {
114914
115085
  title: "Memoria",
114915
- description: "Configure los ajustes de memoria de su agente."
115086
+ description: "Configura los ajustes de memoria de tu agente."
114916
115087
  },
114917
115088
  toggle: {
114918
- label: "Activar memoria",
114919
- description: "Permitir que este agente recuerde y haga referencia a información de conversaciones anteriores."
115089
+ label: "Memoria a largo plazo",
115090
+ description: "Permite que este agente recuerde detalles útiles de conversaciones anteriores — como un colega que ya te conoce — para que nadie tenga que repetirse. Cuando está activada, revisa a continuación lo que recuerda de cada persona y agrega memorias compartidas.",
115091
+ offHint: "Actívala para que este agente recuerde detalles de una conversación a otra."
115092
+ },
115093
+ subTabs: {
115094
+ ariaLabel: "Secciones de memoria",
115095
+ personal: "Memorias personales",
115096
+ shared: "Memoria compartida"
115097
+ },
115098
+ sharedMemory: {
115099
+ title: "Memoria compartida",
115100
+ description: "Hechos, reglas y contexto que este agente debe tener siempre presentes. Todas las personas que chatean con este agente reciben estas memorias.",
115101
+ gatingHint: "Las memorias compartidas llegan a los chats solo mientras la memoria a largo plazo esté activada para este agente y la persona que chatea tenga la memoria activada.",
115102
+ addButton: "Agregar memoria compartida",
115103
+ addButtonShort: "Agregar",
115104
+ listAriaLabel: "Memorias compartidas",
115105
+ actionsAria: "Acciones de memoria compartida",
115106
+ edit: "Editar",
115107
+ "delete": "Eliminar",
115108
+ loading: "Cargando memorias compartidas...",
115109
+ loadError: "No se pudieron cargar las memorias compartidas de este agente. Inténtalo de nuevo.",
115110
+ unknownAuthor: "Desconocido",
115111
+ addedBy: "Agregado por {name}",
115112
+ empty: {
115113
+ title: "Aún no hay memorias compartidas",
115114
+ description: "Agrega todo lo que este agente debe tener siempre presente: cómo comportarse, hechos clave o reglas internas. Todas las personas que chatean con este agente reciben estas memorias."
115115
+ },
115116
+ denied: {
115117
+ title: "Sin acceso a la memoria compartida",
115118
+ description: "No tienes permiso para ver las memorias compartidas de este agente. Pide acceso a un administrador."
115119
+ },
115120
+ modal: {
115121
+ addTitle: "Agregar memoria compartida",
115122
+ editTitle: "Editar memoria compartida",
115123
+ contentLabel: "Memoria",
115124
+ placeholder: "Escribe lo que este agente debe tener siempre presente...",
115125
+ charCountMinimum: "{count}/10 caracteres mínimo",
115126
+ charCount: "{count} caracteres",
115127
+ save: "Guardar",
115128
+ saving: "Guardando...",
115129
+ cancel: "Cancelar"
115130
+ },
115131
+ deleteModal: {
115132
+ title: "Eliminar memoria compartida",
115133
+ description: "¿Seguro que quieres eliminar esta memoria compartida? Todas las personas que chatean con este agente dejarán de verla. Esta acción no se puede deshacer.",
115134
+ "delete": "Eliminar",
115135
+ deleting: "Eliminando...",
115136
+ cancel: "Cancelar"
115137
+ },
115138
+ errors: {
115139
+ duplicate: "Esta memoria compartida ya existe.",
115140
+ tooShort: "Una memoria compartida debe tener al menos 10 caracteres.",
115141
+ forbidden: "No tienes permiso para cambiar las memorias compartidas de este agente."
115142
+ },
115143
+ toasts: {
115144
+ created: "Memoria compartida agregada",
115145
+ updated: "Memoria compartida actualizada",
115146
+ deleted: "Memoria compartida eliminada",
115147
+ saveError: "No se pudo guardar la memoria compartida",
115148
+ deleteError: "No se pudo eliminar la memoria compartida"
115149
+ }
114920
115150
  },
114921
115151
  toasts: {
114922
115152
  enableSuccess: "Memoria activada",
114923
115153
  disableSuccess: "Memoria desactivada",
114924
- toggleError: "Error al actualizar el ajuste de memoria"
115154
+ toggleError: "No se pudo actualizar el ajuste de memoria"
114925
115155
  }
114926
115156
  };
114927
115157
  var memoryTabLearnersMemories$1 = {
@@ -114985,7 +115215,10 @@ var memoryTabManageMemories$1 = {
114985
115215
  memoryUpdatedSuccessfully: "Memoria actualizada correctamente",
114986
115216
  failedToUpdateMemory: "Error al actualizar la memoria",
114987
115217
  memoryCreatedSuccessfully: "Memoria creada correctamente",
114988
- failedToCreateMemory: "Error al crear la memoria"
115218
+ failedToCreateMemory: "Error al crear la memoria",
115219
+ savedMemoriesAriaLabel: "Memorias guardadas",
115220
+ memoryActionsAriaLabel: "Acciones de memoria",
115221
+ memoryCategoriesAriaLabel: "Categorías de memoria"
114989
115222
  };
114990
115223
  var memoryTabSavedMemoriesModal$1 = {
114991
115224
  savedMemories: "Memorias guardadas",
@@ -118966,7 +119199,7 @@ var accessibility$1 = {
118966
119199
  positionAnnouncement: "Botón de accesibilidad movido al borde {side, select, left {izquierdo} other {derecho}}, a {bottom} píxeles de la parte inferior."
118967
119200
  }
118968
119201
  };
118969
- var es = {
119202
+ var es$1 = {
118970
119203
  accessTabAddAccess: accessTabAddAccess$1,
118971
119204
  accessTabLabels: accessTabLabels$1,
118972
119205
  accessTabUpdateAccess: accessTabUpdateAccess$1,
@@ -122647,13 +122880,72 @@ var memoryTabLabels = {
122647
122880
  description: "配置您的智能体的记忆设置。"
122648
122881
  },
122649
122882
  toggle: {
122650
- label: "启用记忆",
122651
- description: "允许此智能体记住并引用过去对话中的信息。"
122883
+ label: "长期记忆",
122884
+ description: "让此智能体记住过去对话中的有用细节——就像一位熟悉情况的老同事——这样大家就不必重复说明。开启后,可在下方查看它对每个人的记忆并添加共享记忆。",
122885
+ offHint: "开启后,此智能体就能跨对话记住细节。"
122886
+ },
122887
+ subTabs: {
122888
+ ariaLabel: "记忆分区",
122889
+ personal: "个人记忆",
122890
+ shared: "共享记忆"
122891
+ },
122892
+ sharedMemory: {
122893
+ title: "共享记忆",
122894
+ description: "此智能体应始终牢记的事实、规则和背景信息。所有与此智能体聊天的人都会获得这些记忆。",
122895
+ gatingHint: "只有在此智能体开启长期记忆、且聊天者也开启了记忆时,共享记忆才会用于聊天。",
122896
+ addButton: "添加共享记忆",
122897
+ addButtonShort: "添加",
122898
+ listAriaLabel: "共享记忆",
122899
+ actionsAria: "共享记忆操作",
122900
+ edit: "编辑",
122901
+ "delete": "删除",
122902
+ loading: "加载共享记忆中...",
122903
+ loadError: "无法加载此智能体的共享记忆。请重试。",
122904
+ unknownAuthor: "未知",
122905
+ addedBy: "由 {name} 添加",
122906
+ empty: {
122907
+ title: "暂无共享记忆",
122908
+ description: "添加此智能体应始终牢记的内容——行为方式、关键事实或内部规则。所有与此智能体聊天的人都会获得这些记忆。"
122909
+ },
122910
+ denied: {
122911
+ title: "无权访问共享记忆",
122912
+ description: "您没有权限查看此智能体的共享记忆。请向管理员申请访问权限。"
122913
+ },
122914
+ modal: {
122915
+ addTitle: "添加共享记忆",
122916
+ editTitle: "编辑共享记忆",
122917
+ contentLabel: "记忆",
122918
+ placeholder: "写下此智能体应始终牢记的内容...",
122919
+ charCountMinimum: "{count}/10 个字符(最少)",
122920
+ charCount: "{count} 个字符",
122921
+ save: "保存",
122922
+ saving: "保存中...",
122923
+ cancel: "取消"
122924
+ },
122925
+ deleteModal: {
122926
+ title: "删除共享记忆",
122927
+ description: "确定要删除这条共享记忆吗?所有与此智能体聊天的人将不再看到它。此操作无法撤销。",
122928
+ "delete": "删除",
122929
+ deleting: "删除中...",
122930
+ cancel: "取消"
122931
+ },
122932
+ errors: {
122933
+ duplicate: "这条共享记忆已存在。",
122934
+ tooShort: "共享记忆至少需要 10 个字符。",
122935
+ forbidden: "您没有权限更改此智能体的共享记忆。"
122936
+ },
122937
+ toasts: {
122938
+ created: "共享记忆已添加",
122939
+ updated: "共享记忆已更新",
122940
+ deleted: "共享记忆已删除",
122941
+ saveError: "无法保存共享记忆",
122942
+ deleteError: "无法删除共享记忆"
122943
+ }
122652
122944
  },
122653
122945
  toasts: {
122654
- enableSuccess: "记忆已启用",
122655
- disableSuccess: "记忆已禁用",
122656
- toggleError: "更新记忆设置失败"
122946
+ enableSuccess: "记忆已开启",
122947
+ disableSuccess: "记忆已关闭",
122948
+ toggleError: "无法更新记忆设置"
122657
122949
  }
122658
122950
  };
122659
122951
  var memoryTabLearnersMemories = {
@@ -122717,7 +123009,10 @@ var memoryTabManageMemories = {
122717
123009
  memoryUpdatedSuccessfully: "记忆已成功更新",
122718
123010
  failedToUpdateMemory: "更新记忆失败",
122719
123011
  memoryCreatedSuccessfully: "记忆已成功创建",
122720
- failedToCreateMemory: "创建记忆失败"
123012
+ failedToCreateMemory: "创建记忆失败",
123013
+ savedMemoriesAriaLabel: "已保存的记忆",
123014
+ memoryActionsAriaLabel: "记忆操作",
123015
+ memoryCategoriesAriaLabel: "记忆分类"
122721
123016
  };
122722
123017
  var memoryTabSavedMemoriesModal = {
122723
123018
  savedMemories: "已保存的记忆",
@@ -127003,8 +127298,8 @@ var zh = {
127003
127298
  */
127004
127299
  const CATALOGS = {
127005
127300
  en: en,
127006
- fr: fr,
127007
- es: es,
127301
+ fr: fr$1,
127302
+ es: es$1,
127008
127303
  zh: zh,
127009
127304
  };
127010
127305
  /**
@@ -181289,7 +181584,7 @@ function DetailRow({ label, children }) {
181289
181584
  return (jsxs("div", { className: "flex items-center justify-between gap-4 py-2", children: [jsx("span", { className: "text-sm text-gray-500", children: label }), jsx("span", { className: "text-sm font-medium text-gray-900 text-right", children: children })] }));
181290
181585
  }
181291
181586
 
181292
- const PAGE_SIZE$f = 8;
181587
+ const PAGE_SIZE$g = 8;
181293
181588
  const CONTENT_TYPES = [
181294
181589
  { value: 'courses', labelKey: 'gradebookGradebookTab.typeCourses', icon: GraduationCap },
181295
181590
  { value: 'programs', labelKey: 'gradebookGradebookTab.typePrograms', icon: Layers },
@@ -181320,14 +181615,14 @@ function useGradebookData(type, org, username, page, search) {
181320
181615
  username,
181321
181616
  query: {
181322
181617
  page,
181323
- page_size: PAGE_SIZE$f,
181618
+ page_size: PAGE_SIZE$g,
181324
181619
  platform_key: org,
181325
181620
  ...(trimmed ? { course_name: trimmed } : {}),
181326
181621
  },
181327
181622
  }, { skip: type !== 'courses', refetchOnMountOrArgChange: true });
181328
181623
  const programsQ = useGetUserEnrolledProgramsQuery([{ username, platformKey: org }], { skip: type !== 'programs' });
181329
181624
  const pathwaysQ = useGetUserCatalogPathwaysQuery({ username, platform_key: org }, { skip: type !== 'pathways' });
181330
- const credentialsQ = useGetUsersAsAssertionsQuery({ platformKey: org, userId: username, page, pageSize: PAGE_SIZE$f }, { skip: type !== 'credentials', refetchOnMountOrArgChange: true });
181625
+ const credentialsQ = useGetUsersAsAssertionsQuery({ platformKey: org, userId: username, page, pageSize: PAGE_SIZE$g }, { skip: type !== 'credentials', refetchOnMountOrArgChange: true });
181331
181626
  const earnedQ = useGetUserEarnedSkillsQuery([{ org, userId: username }], { skip: type !== 'skills' });
181332
181627
  const reportedQ = useGetUserReportedSkillsQuery([{ username }], { skip: type !== 'skills' });
181333
181628
  const desiredQ = useGetUserDesiredSkillsQuery([{ username }], { skip: type !== 'skills' });
@@ -181337,12 +181632,12 @@ function useGradebookData(type, org, username, page, search) {
181337
181632
  const filtered = trimmed
181338
181633
  ? rows.filter((row) => row.name.toLowerCase().includes(trimmed.toLowerCase()))
181339
181634
  : rows;
181340
- const start = (page - 1) * PAGE_SIZE$f;
181635
+ const start = (page - 1) * PAGE_SIZE$g;
181341
181636
  return {
181342
- rows: filtered.slice(start, start + PAGE_SIZE$f),
181637
+ rows: filtered.slice(start, start + PAGE_SIZE$g),
181343
181638
  total: filtered.length,
181344
181639
  hasPrev: page > 1,
181345
- hasNext: start + PAGE_SIZE$f < filtered.length,
181640
+ hasNext: start + PAGE_SIZE$g < filtered.length,
181346
181641
  };
181347
181642
  };
181348
181643
  switch (type) {
@@ -181399,7 +181694,7 @@ function useGradebookData(type, org, username, page, search) {
181399
181694
  rows,
181400
181695
  total,
181401
181696
  hasPrev: page > 1,
181402
- hasNext: page * PAGE_SIZE$f < total,
181697
+ hasNext: page * PAGE_SIZE$g < total,
181403
181698
  isLoading: credentialsQ.isLoading,
181404
181699
  isFetching: credentialsQ.isFetching,
181405
181700
  isError: credentialsQ.isError,
@@ -273055,7 +273350,7 @@ const STATE_BADGE_CLASSES = {
273055
273350
  expired: 'bg-gray-50 text-gray-600',
273056
273351
  };
273057
273352
  const ACTIVE_BADGE_CLASSES = 'bg-blue-50 text-blue-700';
273058
- const timeAgo = (value) => {
273353
+ const timeAgo$1 = (value) => {
273059
273354
  if (!value)
273060
273355
  return '';
273061
273356
  const date = new Date(value);
@@ -273105,7 +273400,7 @@ function ReportHistory({ org, username, onDownload }) {
273105
273400
  const state = (_a = report.state) !== null && _a !== void 0 ? _a : '';
273106
273401
  const active = isActiveState$1(state);
273107
273402
  const labelKey = (_b = STATE_LABEL_KEYS[state]) !== null && _b !== void 0 ? _b : 'statePending';
273108
- return (jsxs(TableRow, { className: "border-b border-neutral-200", children: [jsx(TableCell, { className: "p-3 whitespace-nowrap", children: jsxs(Badge, { variant: "outline", className: cn(active ? ACTIVE_BADGE_CLASSES : (_c = STATE_BADGE_CLASSES[state]) !== null && _c !== void 0 ? _c : ''), children: [active && (jsx(LoaderCircle, { className: "mr-1 h-3 w-3 animate-spin", "aria-hidden": "true" })), t(`chatHistoryReportHistory.${labelKey}`)] }) }), jsxs(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: [timeAgo(report.created_at), report.owner && report.owner !== username && (jsx("div", { className: "text-xs text-gray-500", children: t('chatHistoryReportHistory.createdBy', { owner: report.owner }) }))] }), jsx(TableCell, { className: "max-w-[280px] truncate p-3 text-[#646464]", children: filterSummary(report, t) }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: state === 'completed' && report.expires ? timeAgo(report.expires) : '—' }), jsx(TableCell, { className: "p-3 text-right whitespace-nowrap", children: state === 'completed' && report.url && (jsxs(Button$1, { variant: "outline", size: "sm", className: "flex items-center gap-2 bg-transparent", onClick: () => handleDownload(report), disabled: downloadingId === report.report_id, children: [downloadingId === report.report_id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" })) : (jsx(Download, { className: "h-4 w-4", "aria-hidden": "true" })), t('chatHistoryReportHistory.download')] })) })] }, (_d = report.report_id) !== null && _d !== void 0 ? _d : report.created_at));
273403
+ return (jsxs(TableRow, { className: "border-b border-neutral-200", children: [jsx(TableCell, { className: "p-3 whitespace-nowrap", children: jsxs(Badge, { variant: "outline", className: cn(active ? ACTIVE_BADGE_CLASSES : (_c = STATE_BADGE_CLASSES[state]) !== null && _c !== void 0 ? _c : ''), children: [active && (jsx(LoaderCircle, { className: "mr-1 h-3 w-3 animate-spin", "aria-hidden": "true" })), t(`chatHistoryReportHistory.${labelKey}`)] }) }), jsxs(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: [timeAgo$1(report.created_at), report.owner && report.owner !== username && (jsx("div", { className: "text-xs text-gray-500", children: t('chatHistoryReportHistory.createdBy', { owner: report.owner }) }))] }), jsx(TableCell, { className: "max-w-[280px] truncate p-3 text-[#646464]", children: filterSummary(report, t) }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: state === 'completed' && report.expires ? timeAgo$1(report.expires) : '—' }), jsx(TableCell, { className: "p-3 text-right whitespace-nowrap", children: state === 'completed' && report.url && (jsxs(Button$1, { variant: "outline", size: "sm", className: "flex items-center gap-2 bg-transparent", onClick: () => handleDownload(report), disabled: downloadingId === report.report_id, children: [downloadingId === report.report_id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" })) : (jsx(Download, { className: "h-4 w-4", "aria-hidden": "true" })), t('chatHistoryReportHistory.download')] })) })] }, (_d = report.report_id) !== null && _d !== void 0 ? _d : report.created_at));
273109
273404
  })) })] })) }) }) }));
273110
273405
  }
273111
273406
 
@@ -274134,7 +274429,7 @@ function formatDuration(seconds) {
274134
274429
  return rest ? `${hours}h ${rest}m` : `${hours}h`;
274135
274430
  }
274136
274431
  /** `3 days ago`; empty for a missing or unparseable timestamp. */
274137
- function formatRelative(iso) {
274432
+ function formatRelative$3(iso) {
274138
274433
  if (!iso)
274139
274434
  return '';
274140
274435
  const date = new Date(iso);
@@ -274413,7 +274708,7 @@ function ConversationRow({ session }) {
274413
274708
  negative: t('chatHistoryChatHistoryTab.negative'),
274414
274709
  userSentiment: t('chatHistoryChatHistoryTab.userSentiment'),
274415
274710
  }), [t]);
274416
- return (jsxs("li", { className: "flex items-start gap-3 py-3 first:pt-0 last:pb-0", "data-testid": "overview-conversation", children: [jsx("span", { className: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400", "aria-hidden": "true", children: jsx(Bot, { className: "h-4 w-4" }) }), jsxs("div", { className: "min-w-0 flex-1", children: [jsxs("div", { className: "flex items-baseline justify-between gap-3", children: [jsx("span", { className: "min-w-0 truncate text-sm font-medium text-gray-900 dark:text-gray-100", title: title, children: title }), jsx("span", { className: "flex-shrink-0 text-xs text-gray-500 dark:text-gray-400", children: formatRelative(session.inserted_at) })] }), jsxs("p", { className: "mt-0.5 truncate text-xs text-gray-500 dark:text-gray-400", children: [agent, turns > 0 && ` · ${t('profileOverviewTab.messageCount', { count: turns })}`] }), jsx(ConversationTopics, { topics: session.topics, className: "mt-1.5", leading: jsx(ConversationSentiment, { sentiment: session.sentiment, labels: labels, compact: true }) })] })] }));
274711
+ return (jsxs("li", { className: "flex items-start gap-3 py-3 first:pt-0 last:pb-0", "data-testid": "overview-conversation", children: [jsx("span", { className: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400", "aria-hidden": "true", children: jsx(Bot, { className: "h-4 w-4" }) }), jsxs("div", { className: "min-w-0 flex-1", children: [jsxs("div", { className: "flex items-baseline justify-between gap-3", children: [jsx("span", { className: "min-w-0 truncate text-sm font-medium text-gray-900 dark:text-gray-100", title: title, children: title }), jsx("span", { className: "flex-shrink-0 text-xs text-gray-500 dark:text-gray-400", children: formatRelative$3(session.inserted_at) })] }), jsxs("p", { className: "mt-0.5 truncate text-xs text-gray-500 dark:text-gray-400", children: [agent, turns > 0 && ` · ${t('profileOverviewTab.messageCount', { count: turns })}`] }), jsx(ConversationTopics, { topics: session.topics, className: "mt-1.5", leading: jsx(ConversationSentiment, { sentiment: session.sentiment, labels: labels, compact: true }) })] })] }));
274417
274712
  }
274418
274713
  function MemoryRow({ memory }) {
274419
274714
  const t = useT();
@@ -274485,7 +274780,7 @@ function OverviewTab({ org, username, isOwnProfile = true, sections, onNavigate,
274485
274780
  ? unavailable
274486
274781
  : last
274487
274782
  ? t('profileOverviewTab.kpiConversationsLast', {
274488
- when: formatRelative(last.inserted_at),
274783
+ when: formatRelative$3(last.inserted_at),
274489
274784
  })
274490
274785
  : t('profileOverviewTab.kpiConversationsSub'), loading: conversations.isLoading }, "conversations"));
274491
274786
  }
@@ -277212,7 +277507,7 @@ const AdvancedPagination = ({ currentPage, totalPages, onPageChange, totalCount,
277212
277507
  return (jsxs("div", { className: cn('flex items-center gap-2', showSummary ? 'justify-between' : 'justify-center', variant === 'footer' && 'border-t border-gray-200 bg-gray-50 px-3 py-3 sm:px-6 sm:py-4', className), children: [showSummary && (jsx("p", { className: "hidden text-sm text-gray-700 sm:block", children: t('advancePagination.showing', { from, to, totalCount, itemLabel }) })), jsxs("div", { className: "flex items-center justify-center gap-1 sm:gap-2", children: [jsx(Button$1, { variant: "outline", size: "sm", className: "hidden h-8 w-8 items-center justify-center rounded-md border-gray-300 bg-transparent p-0 hover:bg-gray-100 sm:flex", onClick: () => onPageChange(1), disabled: currentPage === 1, "aria-label": t('advancePagination.goToFirstPage'), children: jsx(ChevronFirst, { className: "h-4 w-4" }) }), jsxs(Button$1, { variant: "outline", size: "sm", className: "flex h-8 w-8 items-center justify-center rounded-md border-none bg-transparent px-2 text-xs hover:bg-gray-100 sm:border-gray-300 sm:p-0 sm:text-sm", onClick: () => onPageChange(currentPage - 1), disabled: currentPage === 1, "aria-label": t('advancePagination.goToPreviousPage'), children: [jsx(ChevronLeft, { className: "mr-1 h-4 w-4 sm:mr-0" }), jsx("span", { className: "sm:hidden", children: t('advancePagination.prev') })] }), jsxs("span", { className: "mx-1 px-2 text-xs text-gray-700 sm:mx-2 sm:text-sm", children: [jsxs("span", { className: "hidden sm:inline", children: [t('advancePagination.page'), " "] }), currentPage, " ", jsxs("span", { className: "hidden sm:inline", children: [t('advancePagination.of'), " "] }), jsxs("span", { className: "inline sm:hidden", children: [" ", t('advancePagination.mobileSeparator'), " "] }), totalPages] }), jsxs(Button$1, { variant: "outline", size: "sm", className: "flex h-8 w-8 items-center justify-center rounded-md border-none bg-transparent px-2 text-xs hover:bg-gray-100 sm:border-gray-300 sm:p-0 sm:text-sm", onClick: () => onPageChange(currentPage + 1), disabled: currentPage === totalPages, "aria-label": t('advancePagination.goToNextPage'), children: [jsx("span", { className: "sm:hidden", children: t('advancePagination.next') }), jsx(ChevronRight, { className: "ml-1 h-4 w-4 sm:ml-0" })] }), jsx(Button$1, { variant: "outline", size: "sm", className: "hidden h-8 w-8 items-center justify-center rounded-md border-gray-300 bg-transparent p-0 hover:bg-gray-100 sm:flex", onClick: () => onPageChange(totalPages), disabled: currentPage === totalPages, "aria-label": t('advancePagination.goToLastPage'), children: jsx(ChevronLast, { className: "h-4 w-4" }) })] })] }));
277213
277508
  };
277214
277509
 
277215
- const PAGE_SIZE$e = 10;
277510
+ const PAGE_SIZE$f = 10;
277216
277511
  function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false, }) {
277217
277512
  var _a, _b;
277218
277513
  const t = useT();
@@ -277235,7 +277530,7 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
277235
277530
  const isWatcher = isPureWatcher(rbacPermissions, currentTenant);
277236
277531
  const { data: users, refetch: refetchPlatformUsers, isLoading: isLoadingPlatformUsers, } = usePlatformUsersQuery({
277237
277532
  page,
277238
- page_size: PAGE_SIZE$e,
277533
+ page_size: PAGE_SIZE$f,
277239
277534
  platform_key: tenant,
277240
277535
  platform_org: tenant,
277241
277536
  query: debouncedSearchQuery,
@@ -277249,7 +277544,7 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
277249
277544
  // TODO to use required_action: 'Ibl.Core/Users/read',
277250
277545
  required_action: 'Ibl.Mentor/Memory/list',
277251
277546
  page,
277252
- page_size: PAGE_SIZE$e,
277547
+ page_size: PAGE_SIZE$f,
277253
277548
  sort: 'name',
277254
277549
  ...(debouncedSearchQuery.includes('@')
277255
277550
  ? { email: debouncedSearchQuery }
@@ -277424,7 +277719,7 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
277424
277719
  managed: user,
277425
277720
  }));
277426
277721
  const totalCount = (_b = (isWatcher ? accessibleUsers === null || accessibleUsers === void 0 ? void 0 : accessibleUsers.count : users === null || users === void 0 ? void 0 : users.count)) !== null && _b !== void 0 ? _b : 0;
277427
- const totalPages = Math.ceil(totalCount / PAGE_SIZE$e);
277722
+ const totalPages = Math.ceil(totalCount / PAGE_SIZE$f);
277428
277723
  return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1", children: [jsxs("div", { className: "relative mb-6 max-w-sm", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { type: "text", value: searchQuery, onChange: (event) => setQuerySearch(event.target.value), placeholder: t('tabsUserstab.searchPlaceholder'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]", "aria-label": t('tabsUserstab.searchAriaLabel') }), searchQuery.length > 0 && (searchQuery !== debouncedSearchQuery || isLoading) && (jsx(LoaderCircle, { "data-testid": "search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), !isWatcher && (jsx("div", { className: "mb-6", children: jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", onClick: onInviteClick, children: t('tabsUserstab.inviteButton') }) }))] }), isLoading ? (jsx("div", { className: "flex justify-center items-center h-64", children: jsx(Spinner, {}) })) : (jsxs(Fragment$1, { children: [jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: `px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 ${isWatcher ? 'w-full' : 'w-[41%]'}`, children: t('tabsUserstab.columnEmail') }), !isWatcher && (jsxs(Fragment$1, { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: t('tabsUserstab.columnRole') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[25%]", children: t('tabsUserstab.columnPolicies') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[18%]", children: t('tabsUserstab.columnStatus') })] }))] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [rows.map((row) => {
277429
277724
  var _a;
277430
277725
  // Only set on the admin path — see {@link UserRow}.
@@ -277455,7 +277750,7 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
277455
277750
  })] }) })] }) }), jsx("td", { className: "px-6 py-4", onClick: (e) => e.stopPropagation(), children: jsx(Switch, { checked: user.active, onCheckedChange: (checked) => handleUserStatusChange(user, checked), disabled: updatingUserIds.has(user === null || user === void 0 ? void 0 : user.user_id), "aria-label": t('tabsUserstab.toggleStatusAriaLabel', {
277456
277751
  name: user.name,
277457
277752
  }), className: "cursor-pointer data-[state=checked]:bg-blue-500 disabled:cursor-not-allowed disabled:opacity-50" }) })] }))] }, row.key));
277458
- }), rows.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: isWatcher ? 2 : 5, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('tabsUserstab.noUsersFound') }) }))] })] }) }), jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (_page) => handlePageChange(_page), totalCount: totalCount, itemsPerPage: PAGE_SIZE$e, itemLabel: "users" })] })), selectedUser && (jsx(Dialog, { open: !!selectedUser, onOpenChange: (open) => {
277753
+ }), rows.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: isWatcher ? 2 : 5, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('tabsUserstab.noUsersFound') }) }))] })] }) }), jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (_page) => handlePageChange(_page), totalCount: totalCount, itemsPerPage: PAGE_SIZE$f, itemLabel: "users" })] })), selectedUser && (jsx(Dialog, { open: !!selectedUser, onOpenChange: (open) => {
277459
277754
  if (!open)
277460
277755
  setSelectedUser(null);
277461
277756
  }, children: jsxs(DialogContent, { autoFocus: false, className: "max-w-7xl w-[85vw] p-0 gap-0 overflow-hidden bg-white profile-component-dialog", style: { height: '85vh', display: 'flex', flexDirection: 'column' }, children: [jsx(DialogTitle, { className: "sr-only", children: t('tabsUserstab.profileDialogTitle') }), jsx(DialogDescription, { className: "sr-only", children: t('tabsUserstab.profileDialogDescription') }), jsx(Profile, { tenant: tenant, tenants: [], username: selectedUser.username, isAdmin: selectedUser.isAdmin, currentSPA: currentSpa, onClose: () => setSelectedUser(null), customization: {
@@ -278675,7 +278970,7 @@ function PoliciesTab({ tenant }) {
278675
278970
  : t('tabsPoliciestab.createPolicy')] }) }) }), editing && (policyDetails === null || policyDetails === void 0 ? void 0 : policyDetails.is_internal) && (jsx(TooltipContent, { children: jsx("p", { children: t('tabsPoliciestab.cannotEditInternal') }) }))] }) })] })] }) }), jsx(ResourcePickerModal, { open: isResourcePickerOpen, onOpenChange: setIsResourcePickerOpen, tenant: tenant, onSelect: addPickedResource })] }));
278676
278971
  }
278677
278972
 
278678
- const PAGE_SIZE$d = 10;
278973
+ const PAGE_SIZE$e = 10;
278679
278974
  function normalizeEvents(events) {
278680
278975
  if (!events)
278681
278976
  return [];
@@ -278724,8 +279019,8 @@ function AlertsTab({ tenant }) {
278724
279019
  const { data: watchedGroupsData, isLoading, isError, refetch, } = useGetWatchedGroupsQuery({
278725
279020
  params: {
278726
279021
  platform_key: tenant,
278727
- limit: PAGE_SIZE$d,
278728
- offset: (page - 1) * PAGE_SIZE$d,
279022
+ limit: PAGE_SIZE$e,
279023
+ offset: (page - 1) * PAGE_SIZE$e,
278729
279024
  },
278730
279025
  });
278731
279026
  const groups = useMemo(() => {
@@ -278738,7 +279033,7 @@ function AlertsTab({ tenant }) {
278738
279033
  return results;
278739
279034
  }, [watchedGroupsData, debouncedSearchQuery]);
278740
279035
  const totalPages = watchedGroupsData
278741
- ? Math.max(1, Math.ceil(watchedGroupsData.count / PAGE_SIZE$d))
279036
+ ? Math.max(1, Math.ceil(watchedGroupsData.count / PAGE_SIZE$e))
278742
279037
  : 0;
278743
279038
  const handlePageChange = async (newPage) => {
278744
279039
  setPage(newPage);
@@ -279047,7 +279342,7 @@ function AlertsTab({ tenant }) {
279047
279342
  setDeletingGroupId(null);
279048
279343
  }
279049
279344
  }
279050
- return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex mb-6 gap-2 flex-row items-center justify-between", children: [jsxs("div", { className: "relative max-w-sm w-full sm:w-auto", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: t('tabsAlertstab.searchAlertsPlaceholder'), "aria-label": t('tabsAlertstab.searchAlertsAriaLabel'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]" }), isLoading && (jsx(LoaderCircle, { "data-testid": "search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), jsx("div", { className: "flex gap-2", children: jsx(Button$1, { onClick: openNew, "aria-label": t('tabsAlertstab.newAlertAriaLabel'), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", children: t('tabsAlertstab.newAlert') }) })] }), isLoading && (jsx("div", { className: "flex justify-center items-center h-64", children: jsx("div", { className: "py-8 text-center text-sm text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.loading') }) })), isError && (jsx("div", { className: "py-8 text-center text-sm text-red-500", children: t('tabsAlertstab.failedToLoadAlerts') })), !isLoading && !isError && (jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.columnName') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[120px]" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [groups.map((g) => (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm", children: g.name }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex gap-2 justify-end", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(g), disabled: deletingGroupId === g.id, "aria-label": t('tabsAlertstab.editAlertAriaLabel', { name: g.name }), children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => onDelete(g), className: "text-red-600 hover:text-red-700", disabled: deletingGroupId === g.id, "aria-label": t('tabsAlertstab.deleteAlertAriaLabel', { name: g.name }), children: deletingGroupId === g.id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" })) : (jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" })) })] }) })] }, g.id))), groups.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 2, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.noAlertsFound') }) }))] })] }) })), !isLoading && !isError && (jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => handlePageChange(newPage), totalCount: watchedGroupsData === null || watchedGroupsData === void 0 ? void 0 : watchedGroupsData.count, itemsPerPage: PAGE_SIZE$d, itemLabel: "alerts" })), jsx(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: jsxs(DialogContent, { "aria-describedby": undefined, className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: editingGroup ? t('tabsAlertstab.editAlert') : t('tabsAlertstab.newAlert') }) }), jsxs("div", { className: "space-y-5", children: [jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { htmlFor: "wg-name", children: t('tabsAlertstab.nameLabel') }), jsx(Input, { id: "wg-name", value: name, onChange: (e) => setName(e.target.value), placeholder: t('tabsAlertstab.enterAlertNamePlaceholder'), required: true })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { children: t('tabsAlertstab.watchedUsersLabel') }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.watchedUsersDescription') }), watchedUsers.length > 0 ? (jsx("div", { className: "space-y-2 max-h-48 overflow-y-auto border border-gray-200 dark:border-gray-700 rounded-md p-2", children: watchedUsers.map((user) => (jsxs("div", { className: "flex items-center justify-between bg-gray-50 dark:bg-gray-800 p-2 rounded-md", children: [jsxs("div", { className: "flex flex-col", children: [jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: user.name || user.username }), user.email && (jsx("span", { className: "text-xs text-gray-500 dark:text-gray-400", children: user.email }))] }), jsx(Button$1, { type: "button", variant: "ghost", size: "sm", onClick: () => removeWatchedUserDraft(user.id), className: "h-8 w-8 p-0 text-red-600 hover:text-red-700 hover:bg-red-50 dark:hover:bg-red-900/20", "aria-label": t('tabsAlertstab.removeWatchedUserAriaLabel', {
279345
+ return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex mb-6 gap-2 flex-row items-center justify-between", children: [jsxs("div", { className: "relative max-w-sm w-full sm:w-auto", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), placeholder: t('tabsAlertstab.searchAlertsPlaceholder'), "aria-label": t('tabsAlertstab.searchAlertsAriaLabel'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]" }), isLoading && (jsx(LoaderCircle, { "data-testid": "search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), jsx("div", { className: "flex gap-2", children: jsx(Button$1, { onClick: openNew, "aria-label": t('tabsAlertstab.newAlertAriaLabel'), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", children: t('tabsAlertstab.newAlert') }) })] }), isLoading && (jsx("div", { className: "flex justify-center items-center h-64", children: jsx("div", { className: "py-8 text-center text-sm text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.loading') }) })), isError && (jsx("div", { className: "py-8 text-center text-sm text-red-500", children: t('tabsAlertstab.failedToLoadAlerts') })), !isLoading && !isError && (jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.columnName') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[120px]" })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [groups.map((g) => (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 text-sm", children: g.name }), jsx("td", { className: "px-6 py-4", children: jsxs("div", { className: "flex gap-2 justify-end", children: [jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => openEdit(g), disabled: deletingGroupId === g.id, "aria-label": t('tabsAlertstab.editAlertAriaLabel', { name: g.name }), children: jsx(Pencil, { className: "h-4 w-4", "aria-hidden": "true" }) }), jsx(Button$1, { variant: "ghost", size: "sm", onClick: () => onDelete(g), className: "text-red-600 hover:text-red-700", disabled: deletingGroupId === g.id, "aria-label": t('tabsAlertstab.deleteAlertAriaLabel', { name: g.name }), children: deletingGroupId === g.id ? (jsx(LoaderCircle, { className: "h-4 w-4 animate-spin", "aria-hidden": "true" })) : (jsx(Trash2, { className: "h-4 w-4", "aria-hidden": "true" })) })] }) })] }, g.id))), groups.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 2, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.noAlertsFound') }) }))] })] }) })), !isLoading && !isError && (jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => handlePageChange(newPage), totalCount: watchedGroupsData === null || watchedGroupsData === void 0 ? void 0 : watchedGroupsData.count, itemsPerPage: PAGE_SIZE$e, itemLabel: "alerts" })), jsx(Dialog, { open: isOpen, onOpenChange: setIsOpen, children: jsxs(DialogContent, { "aria-describedby": undefined, className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: editingGroup ? t('tabsAlertstab.editAlert') : t('tabsAlertstab.newAlert') }) }), jsxs("div", { className: "space-y-5", children: [jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { htmlFor: "wg-name", children: t('tabsAlertstab.nameLabel') }), jsx(Input, { id: "wg-name", value: name, onChange: (e) => setName(e.target.value), placeholder: t('tabsAlertstab.enterAlertNamePlaceholder'), required: true })] }), jsxs("div", { className: "grid gap-1.5", children: [jsx(Label$1, { children: t('tabsAlertstab.watchedUsersLabel') }), jsx("p", { className: "text-xs text-gray-500 dark:text-gray-400", children: t('tabsAlertstab.watchedUsersDescription') }), watchedUsers.length > 0 ? (jsx("div", { className: "space-y-2 max-h-48 overflow-y-auto border border-gray-200 dark:border-gray-700 rounded-md p-2", children: watchedUsers.map((user) => (jsxs("div", { className: "flex items-center justify-between bg-gray-50 dark:bg-gray-800 p-2 rounded-md", children: [jsxs("div", { className: "flex flex-col", children: [jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100", children: user.name || user.username }), user.email && (jsx("span", { className: "text-xs text-gray-500 dark:text-gray-400", children: user.email }))] }), jsx(Button$1, { type: "button", variant: "ghost", size: "sm", onClick: () => removeWatchedUserDraft(user.id), className: "h-8 w-8 p-0 text-red-600 hover:text-red-700 hover:bg-red-50 dark:hover:bg-red-900/20", "aria-label": t('tabsAlertstab.removeWatchedUserAriaLabel', {
279051
279346
  username: user.username,
279052
279347
  }), children: jsx(X$1, { className: "h-4 w-4" }) })] }, user.id))) })) : (jsx("div", { className: "text-sm text-gray-500 dark:text-gray-400 p-4 text-center border border-dashed border-gray-300 dark:border-gray-600 rounded-md", children: t('tabsAlertstab.noWatchedUsersAdded') })), jsxs("div", { className: "relative", children: [jsx(Input, { value: watchedUserSearch, onChange: (e) => {
279053
279348
  setWatchedUserSearch(e.target.value);
@@ -280235,7 +280530,7 @@ function BlocksView({ platformKey, onBack, }) {
280235
280530
  }
280236
280531
 
280237
280532
  const FILTER_ORDER = ['all', ...APPLICATION_STATUSES];
280238
- const PAGE_SIZE$c = 20;
280533
+ const PAGE_SIZE$d = 20;
280239
280534
  const SEARCH_DEBOUNCE_MS$1 = 300;
280240
280535
  /**
280241
280536
  * The public application URL on the auth SPA for one form of a platform
@@ -280378,7 +280673,7 @@ function SubmissionsPipeline({ platformKey, form, onBack, onOpen, }) {
280378
280673
  ...(sort !== '-created' ? { sort } : {}),
280379
280674
  ...candidateParams,
280380
280675
  page,
280381
- page_size: PAGE_SIZE$c,
280676
+ page_size: PAGE_SIZE$d,
280382
280677
  }, {
280383
280678
  refetchOnMountOrArgChange: true,
280384
280679
  });
@@ -280387,7 +280682,7 @@ function SubmissionsPipeline({ platformKey, form, onBack, onOpen, }) {
280387
280682
  : [];
280388
280683
  const rows = form ? allRows.filter((row) => row.form_id === form.id) : allRows;
280389
280684
  const count = typeof (pipeline === null || pipeline === void 0 ? void 0 : pipeline.count) === 'number' ? pipeline.count : allRows.length;
280390
- const totalPages = Math.max(1, Math.ceil(count / PAGE_SIZE$c));
280685
+ const totalPages = Math.max(1, Math.ceil(count / PAGE_SIZE$d));
280391
280686
  const counts = statsCounts(stats);
280392
280687
  const countFor = (key) => {
280393
280688
  if (!stats)
@@ -280425,7 +280720,7 @@ function SubmissionsPipeline({ platformKey, form, onBack, onOpen, }) {
280425
280720
  }) }) }), jsx("td", { className: "whitespace-nowrap px-6 py-4 text-sm text-gray-600 dark:text-gray-300", children: formatDate(row) }), jsx("td", { className: "px-6 py-4", children: jsx(Badge, { variant: "outline", className: approvalTone(row.status), children: STATUS_LABEL_KEYS[row.status]
280426
280721
  ? t(STATUS_LABEL_KEYS[row.status])
280427
280722
  : row.status }) })] }, row.id));
280428
- })) })] }) }), jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => setPage(newPage), totalCount: count, itemsPerPage: PAGE_SIZE$c, itemLabel: "applications" })] }))] }));
280723
+ })) })] }) }), jsx(AdvancedPagination, { variant: "footer", className: "-mx-6 -mb-6 mt-4 rounded-b-lg", totalPages: totalPages, currentPage: page, onPageChange: (newPage) => setPage(newPage), totalCount: count, itemsPerPage: PAGE_SIZE$d, itemLabel: "applications" })] }))] }));
280429
280724
  }
280430
280725
 
280431
280726
  // The user-onboarding form contract: the schema an admin authors in the admin
@@ -286550,7 +286845,7 @@ function ItemSearchDropdown({ platformKey, onSelect, }) {
286550
286845
  }, children: [jsx("div", { className: "flex-1 min-w-0", children: jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-gray-100 block truncate", children: item.name }) }), jsx(Badge, { variant: "secondary", className: "text-xs shrink-0 capitalize", children: displayItemType(item.itemType) })] }, `${item.itemType}-${item.id}`)))) : isFetching ? (jsx("div", { className: "px-3 py-4 text-center text-sm text-gray-400", children: t('monetizationItemSearchDropdown.searching') })) : (jsx("div", { className: "px-3 py-4 text-center text-sm text-gray-400", children: t('monetizationItemSearchDropdown.noItemsFound') })) }))] }));
286551
286846
  }
286552
286847
 
286553
- const PAGE_SIZE$b = 8;
286848
+ const PAGE_SIZE$c = 8;
286554
286849
  function PaywalledItemsList({ platformKey, onSelectItem, onAddCustomItem, }) {
286555
286850
  const t = useT();
286556
286851
  const [page, setPage] = useState(1);
@@ -286558,7 +286853,7 @@ function PaywalledItemsList({ platformKey, onSelectItem, onAddCustomItem, }) {
286558
286853
  const { data: paywalls, isLoading } = useListPaywallsQuery({
286559
286854
  platform_key: platformKey,
286560
286855
  page,
286561
- page_size: PAGE_SIZE$b,
286856
+ page_size: PAGE_SIZE$c,
286562
286857
  ...(statusFilter !== 'all' && { is_enabled: statusFilter === 'active' }),
286563
286858
  }, { refetchOnMountOrArgChange: true });
286564
286859
  return (jsxs("div", { className: "space-y-4", children: [jsx(Card$1, { className: "shadow-sm border", style: { borderColor: 'oklch(.922 0 0)' }, children: jsxs(CardContent, { className: "p-4", children: [jsx("h4", { className: "text-sm font-medium text-gray-700 dark:text-gray-300 mb-3", children: t('monetizationPaywalledItemsList.configureItemForSale') }), jsxs("div", { className: "flex items-center gap-2", children: [jsx(ItemSearchDropdown, { platformKey: platformKey, onSelect: (itemType, uniqueId, name) => onSelectItem(itemType, uniqueId, name) }), jsx(Button$1, { variant: "outline", size: "icon", onClick: onAddCustomItem, className: "shrink-0 cursor-pointer", title: t('monetizationPaywalledItemsList.addCustomItemTitle'), children: jsx(Plus, { className: "h-4 w-4" }) })] })] }) }), jsxs("div", { className: "space-y-2", children: [jsxs("div", { className: "flex items-center justify-between", children: [jsx("h4", { className: "text-sm font-medium text-gray-500", children: t('monetizationPaywalledItemsList.configuredItems') }), jsxs(Select$1, { value: statusFilter, onValueChange: (v) => {
@@ -286581,7 +286876,7 @@ function PaywalledItemsList({ platformKey, onSelectItem, onAddCustomItem, }) {
286581
286876
  : 'bg-gray-100 text-gray-500 border-gray-200 hover:bg-gray-100', children: pw.is_enabled
286582
286877
  ? t('monetizationPaywalledItemsList.statusActive')
286583
286878
  : t('monetizationPaywalledItemsList.statusDisabled') })] }) }, `${pw.item_type}-${pw.item_id}`));
286584
- }), jsx(AdvancedPagination, { variant: "footer", className: "mt-2 rounded-lg border", currentPage: page, totalPages: Math.ceil(paywalls.count / PAGE_SIZE$b), onPageChange: setPage, totalCount: paywalls.count, itemsPerPage: PAGE_SIZE$b, itemLabel: "items" })] })) : (jsx("p", { className: "text-sm text-gray-400 text-center py-6", children: statusFilter !== 'all'
286879
+ }), jsx(AdvancedPagination, { variant: "footer", className: "mt-2 rounded-lg border", currentPage: page, totalPages: Math.ceil(paywalls.count / PAGE_SIZE$c), onPageChange: setPage, totalCount: paywalls.count, itemsPerPage: PAGE_SIZE$c, itemLabel: "items" })] })) : (jsx("p", { className: "text-sm text-gray-400 text-center py-6", children: statusFilter !== 'all'
286585
286880
  ? t('monetizationPaywalledItemsList.noFilteredItemsFound', { status: statusFilter })
286586
286881
  : t('monetizationPaywalledItemsList.noItemsConfigured') }))] })] }));
286587
286882
  }
@@ -286932,7 +287227,7 @@ function MonetizationTab({ platformKey, authURL }) {
286932
287227
  }
286933
287228
 
286934
287229
  /** Matches the server-side cap on the global memories listing. */
286935
- const PAGE_SIZE$a = 25;
287230
+ const PAGE_SIZE$b = 25;
286936
287231
  /**
286937
287232
  * Popup for managing one user's global memories. Reads them the way the
286938
287233
  * profile preview does — the caller in the path, the managed user identified
@@ -286953,10 +287248,10 @@ function UserMemoriesModal({ isOpen, onClose, tenantKey, adminUsername, user, })
286953
287248
  userId: adminUsername,
286954
287249
  // `user_id` must be the managed user's id (username) — the backend does
286955
287250
  // not resolve emails here, so passing one returns an empty list.
286956
- params: { page, page_size: PAGE_SIZE$a, user_id: user.username },
287251
+ params: { page, page_size: PAGE_SIZE$b, user_id: user.username },
286957
287252
  });
286958
287253
  const memories = (_a = memoriesData === null || memoriesData === void 0 ? void 0 : memoriesData.results) !== null && _a !== void 0 ? _a : [];
286959
- const totalPages = (memoriesData === null || memoriesData === void 0 ? void 0 : memoriesData.count) ? Math.ceil(memoriesData.count / PAGE_SIZE$a) : 0;
287254
+ const totalPages = (memoriesData === null || memoriesData === void 0 ? void 0 : memoriesData.count) ? Math.ceil(memoriesData.count / PAGE_SIZE$b) : 0;
286960
287255
  const isForbidden = !!error && error.status === 403;
286961
287256
  // The managed user's capture/personalization toggles, addressed through
286962
287257
  // their path the way every admin write here is. Hidden unless they load.
@@ -287012,7 +287307,7 @@ function UserMemoriesModal({ isOpen, onClose, tenantKey, adminUsername, user, })
287012
287307
  }), className: "cursor-pointer data-[state=checked]:bg-blue-500 flex-shrink-0" })] })] })), !isForbidden && (jsx("div", { className: "flex justify-end mb-4", children: jsxs(Button$1, { "data-testid": "user-memories-add", variant: "outline", size: "sm", onClick: () => setShowAdd(true), className: "text-xs", children: [jsx(Plus, { className: "h-3 w-3 mr-1" }), t('memoryAdminUserMemoriesModal.addMemoryButton')] }) })), isForbidden ? (jsx("div", { className: "rounded-lg border px-6 py-8 text-center", style: { borderColor: 'oklch(.922 0 0)' }, children: jsx("p", { className: "text-sm text-gray-500", children: t('memoryAdminUserMemoriesModal.forbidden') }) })) : error ? (jsx("div", { className: "rounded-lg border px-6 py-8 text-center", style: { borderColor: 'oklch(.922 0 0)' }, children: jsx("p", { className: "text-sm text-gray-500", children: t('memoryAdminUserMemoriesModal.failedToLoad') }) })) : (jsx(MemoriesList, { memories: memories, isLoading: isLoading, emptyText: t('memoryAdminUserMemoriesModal.noMemories'), deletingId: deletingId, onEdit: setEditingMemory, onDelete: handleDeleteMemory, totalPages: totalPages, currentPage: page, onPageChange: setPage })), jsx(AddMemoryDialog, { open: showAdd, onOpenChange: setShowAdd, org: tenantKey, username: user.username }), editingMemory && (jsx(EditMemoryDialog, { open: !!editingMemory, onOpenChange: (open) => !open && setEditingMemory(null), org: tenantKey, username: user.username, memory: editingMemory }))] }) }));
287013
287308
  }
287014
287309
 
287015
- const PAGE_SIZE$9 = 10;
287310
+ const PAGE_SIZE$a = 10;
287016
287311
  const SEARCH_DEBOUNCE_MS = 300;
287017
287312
  /**
287018
287313
  * Tenant users table with server-side search. Opening a row shows that user's
@@ -287045,7 +287340,7 @@ function GlobalMemoriesSection({ tenantKey, username }) {
287045
287340
  platform_key: tenantKey,
287046
287341
  platform_org: tenantKey,
287047
287342
  page,
287048
- page_size: PAGE_SIZE$9,
287343
+ page_size: PAGE_SIZE$a,
287049
287344
  query: debouncedSearch,
287050
287345
  return_policies: 'false',
287051
287346
  });
@@ -287066,13 +287361,1479 @@ function GlobalMemoriesSection({ tenantKey, username }) {
287066
287361
  email: user.email,
287067
287362
  }));
287068
287363
  }, [data]);
287069
- const totalPages = Math.ceil(((_a = data === null || data === void 0 ? void 0 : data.count) !== null && _a !== void 0 ? _a : 0) / PAGE_SIZE$9);
287364
+ const totalPages = Math.ceil(((_a = data === null || data === void 0 ? void 0 : data.count) !== null && _a !== void 0 ? _a : 0) / PAGE_SIZE$a);
287070
287365
  const isForbidden = !!error && error.status === 403;
287071
287366
  return (jsxs("div", { "data-testid": "memory-admin-global-section", children: [jsxs("div", { className: "relative mb-6 max-w-sm w-full sm:w-auto", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { "data-testid": "memory-admin-users-search", type: "text", value: searchQuery, onChange: (event) => setSearchQuery(event.target.value), placeholder: t('memoryAdminTab.searchUsersPlaceholder'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]", "aria-label": t('memoryAdminTab.searchUsersAriaLabel') }), searchQuery.length > 0 && (searchQuery !== debouncedSearch || isFetching) && (jsx(LoaderCircle, { "data-testid": "user-search-spinner", className: "absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 animate-spin", "aria-hidden": "true" }))] }), isForbidden ? (jsx("div", { className: "rounded-lg border px-6 py-8 text-center", style: { borderColor: 'oklch(.922 0 0)' }, children: jsx("p", { className: "text-sm text-gray-500", children: t('memoryAdminTab.forbidden') }) })) : isLoading ? (jsx("div", { className: "flex justify-center items-center h-64", children: jsx(Spinner, {}) })) : (jsxs(Fragment$1, { children: [jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[28%]", children: t('memoryAdminTab.nameColumn') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[26%]", children: t('memoryAdminTab.usernameColumn') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[30%]", children: t('memoryAdminTab.emailColumn') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: t('memoryAdminTab.actionsColumn') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [users.map((user) => (jsxs("tr", { "data-testid": `memory-admin-user-row-${user.username}`, children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 max-w-0", children: jsx("div", { className: "truncate font-medium", children: user.name || '—' }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300 max-w-0", children: jsx("div", { className: "truncate", children: user.username }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300 max-w-0", children: jsx("div", { className: "truncate", children: user.email || '—' }) }), jsx("td", { className: "px-6 py-4", children: jsx("div", { className: "flex justify-end gap-2", children: jsx(Button$1, { "data-testid": `memory-admin-user-view-${user.username}`, variant: "ghost", size: "sm", "aria-label": t('memoryAdminTab.viewMemoriesAriaLabel', {
287072
287367
  name: user.email || user.username,
287073
287368
  }), onClick: () => setSelectedUser(user), children: jsx(Eye, { className: "h-4 w-4" }) }) }) })] }, user.username))), users.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 4, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: isFetching ? t('memoryAdminTab.loading') : t('memoryAdminTab.noUsersFound') }) }))] })] }) }), totalPages > 1 && (jsx("div", { className: "mt-6", children: jsx(IblPagination, { totalPages: totalPages, currentPage: page, onPageChange: setPage, disabled: isFetching }) }))] })), selectedUser && (jsx(UserMemoriesModal, { isOpen: !!selectedUser, onClose: () => setSelectedUser(null), tenantKey: tenantKey, adminUsername: username, user: selectedUser }))] }));
287074
287369
  }
287075
287370
 
287371
+ const formatDistanceLocale$2 = {
287372
+ lessThanXSeconds: {
287373
+ one: "menos de un segundo",
287374
+ other: "menos de {{count}} segundos",
287375
+ },
287376
+
287377
+ xSeconds: {
287378
+ one: "1 segundo",
287379
+ other: "{{count}} segundos",
287380
+ },
287381
+
287382
+ halfAMinute: "medio minuto",
287383
+
287384
+ lessThanXMinutes: {
287385
+ one: "menos de un minuto",
287386
+ other: "menos de {{count}} minutos",
287387
+ },
287388
+
287389
+ xMinutes: {
287390
+ one: "1 minuto",
287391
+ other: "{{count}} minutos",
287392
+ },
287393
+
287394
+ aboutXHours: {
287395
+ one: "alrededor de 1 hora",
287396
+ other: "alrededor de {{count}} horas",
287397
+ },
287398
+
287399
+ xHours: {
287400
+ one: "1 hora",
287401
+ other: "{{count}} horas",
287402
+ },
287403
+
287404
+ xDays: {
287405
+ one: "1 día",
287406
+ other: "{{count}} días",
287407
+ },
287408
+
287409
+ aboutXWeeks: {
287410
+ one: "alrededor de 1 semana",
287411
+ other: "alrededor de {{count}} semanas",
287412
+ },
287413
+
287414
+ xWeeks: {
287415
+ one: "1 semana",
287416
+ other: "{{count}} semanas",
287417
+ },
287418
+
287419
+ aboutXMonths: {
287420
+ one: "alrededor de 1 mes",
287421
+ other: "alrededor de {{count}} meses",
287422
+ },
287423
+
287424
+ xMonths: {
287425
+ one: "1 mes",
287426
+ other: "{{count}} meses",
287427
+ },
287428
+
287429
+ aboutXYears: {
287430
+ one: "alrededor de 1 año",
287431
+ other: "alrededor de {{count}} años",
287432
+ },
287433
+
287434
+ xYears: {
287435
+ one: "1 año",
287436
+ other: "{{count}} años",
287437
+ },
287438
+
287439
+ overXYears: {
287440
+ one: "más de 1 año",
287441
+ other: "más de {{count}} años",
287442
+ },
287443
+
287444
+ almostXYears: {
287445
+ one: "casi 1 año",
287446
+ other: "casi {{count}} años",
287447
+ },
287448
+ };
287449
+
287450
+ const formatDistance$2 = (token, count, options) => {
287451
+ let result;
287452
+
287453
+ const tokenValue = formatDistanceLocale$2[token];
287454
+ if (typeof tokenValue === "string") {
287455
+ result = tokenValue;
287456
+ } else if (count === 1) {
287457
+ result = tokenValue.one;
287458
+ } else {
287459
+ result = tokenValue.other.replace("{{count}}", count.toString());
287460
+ }
287461
+
287462
+ if (options?.addSuffix) {
287463
+ if (options.comparison && options.comparison > 0) {
287464
+ return "en " + result;
287465
+ } else {
287466
+ return "hace " + result;
287467
+ }
287468
+ }
287469
+
287470
+ return result;
287471
+ };
287472
+
287473
+ const dateFormats$2 = {
287474
+ full: "EEEE, d 'de' MMMM 'de' y",
287475
+ long: "d 'de' MMMM 'de' y",
287476
+ medium: "d MMM y",
287477
+ short: "dd/MM/y",
287478
+ };
287479
+
287480
+ const timeFormats$2 = {
287481
+ full: "HH:mm:ss zzzz",
287482
+ long: "HH:mm:ss z",
287483
+ medium: "HH:mm:ss",
287484
+ short: "HH:mm",
287485
+ };
287486
+
287487
+ const dateTimeFormats$2 = {
287488
+ full: "{{date}} 'a las' {{time}}",
287489
+ long: "{{date}} 'a las' {{time}}",
287490
+ medium: "{{date}}, {{time}}",
287491
+ short: "{{date}}, {{time}}",
287492
+ };
287493
+
287494
+ const formatLong$2 = {
287495
+ date: buildFormatLongFn({
287496
+ formats: dateFormats$2,
287497
+ defaultWidth: "full",
287498
+ }),
287499
+
287500
+ time: buildFormatLongFn({
287501
+ formats: timeFormats$2,
287502
+ defaultWidth: "full",
287503
+ }),
287504
+
287505
+ dateTime: buildFormatLongFn({
287506
+ formats: dateTimeFormats$2,
287507
+ defaultWidth: "full",
287508
+ }),
287509
+ };
287510
+
287511
+ const formatRelativeLocale$2 = {
287512
+ lastWeek: "'el' eeee 'pasado a la' p",
287513
+ yesterday: "'ayer a la' p",
287514
+ today: "'hoy a la' p",
287515
+ tomorrow: "'mañana a la' p",
287516
+ nextWeek: "eeee 'a la' p",
287517
+ other: "P",
287518
+ };
287519
+
287520
+ const formatRelativeLocalePlural = {
287521
+ lastWeek: "'el' eeee 'pasado a las' p",
287522
+ yesterday: "'ayer a las' p",
287523
+ today: "'hoy a las' p",
287524
+ tomorrow: "'mañana a las' p",
287525
+ nextWeek: "eeee 'a las' p",
287526
+ other: "P",
287527
+ };
287528
+
287529
+ const formatRelative$2 = (token, date, _baseDate, _options) => {
287530
+ if (date.getHours() !== 1) {
287531
+ return formatRelativeLocalePlural[token];
287532
+ } else {
287533
+ return formatRelativeLocale$2[token];
287534
+ }
287535
+ };
287536
+
287537
+ const eraValues$2 = {
287538
+ narrow: ["AC", "DC"],
287539
+ abbreviated: ["AC", "DC"],
287540
+ wide: ["antes de cristo", "después de cristo"],
287541
+ };
287542
+
287543
+ const quarterValues$2 = {
287544
+ narrow: ["1", "2", "3", "4"],
287545
+ abbreviated: ["T1", "T2", "T3", "T4"],
287546
+ wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"],
287547
+ };
287548
+
287549
+ const monthValues$2 = {
287550
+ narrow: ["e", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
287551
+ abbreviated: [
287552
+ "ene",
287553
+ "feb",
287554
+ "mar",
287555
+ "abr",
287556
+ "may",
287557
+ "jun",
287558
+ "jul",
287559
+ "ago",
287560
+ "sep",
287561
+ "oct",
287562
+ "nov",
287563
+ "dic",
287564
+ ],
287565
+
287566
+ wide: [
287567
+ "enero",
287568
+ "febrero",
287569
+ "marzo",
287570
+ "abril",
287571
+ "mayo",
287572
+ "junio",
287573
+ "julio",
287574
+ "agosto",
287575
+ "septiembre",
287576
+ "octubre",
287577
+ "noviembre",
287578
+ "diciembre",
287579
+ ],
287580
+ };
287581
+
287582
+ const dayValues$2 = {
287583
+ narrow: ["d", "l", "m", "m", "j", "v", "s"],
287584
+ short: ["do", "lu", "ma", "mi", "ju", "vi", "sá"],
287585
+ abbreviated: ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"],
287586
+ wide: [
287587
+ "domingo",
287588
+ "lunes",
287589
+ "martes",
287590
+ "miércoles",
287591
+ "jueves",
287592
+ "viernes",
287593
+ "sábado",
287594
+ ],
287595
+ };
287596
+
287597
+ const dayPeriodValues$2 = {
287598
+ narrow: {
287599
+ am: "a",
287600
+ pm: "p",
287601
+ midnight: "mn",
287602
+ noon: "md",
287603
+ morning: "mañana",
287604
+ afternoon: "tarde",
287605
+ evening: "tarde",
287606
+ night: "noche",
287607
+ },
287608
+ abbreviated: {
287609
+ am: "AM",
287610
+ pm: "PM",
287611
+ midnight: "medianoche",
287612
+ noon: "mediodia",
287613
+ morning: "mañana",
287614
+ afternoon: "tarde",
287615
+ evening: "tarde",
287616
+ night: "noche",
287617
+ },
287618
+ wide: {
287619
+ am: "a.m.",
287620
+ pm: "p.m.",
287621
+ midnight: "medianoche",
287622
+ noon: "mediodia",
287623
+ morning: "mañana",
287624
+ afternoon: "tarde",
287625
+ evening: "tarde",
287626
+ night: "noche",
287627
+ },
287628
+ };
287629
+
287630
+ const formattingDayPeriodValues$1 = {
287631
+ narrow: {
287632
+ am: "a",
287633
+ pm: "p",
287634
+ midnight: "mn",
287635
+ noon: "md",
287636
+ morning: "de la mañana",
287637
+ afternoon: "de la tarde",
287638
+ evening: "de la tarde",
287639
+ night: "de la noche",
287640
+ },
287641
+ abbreviated: {
287642
+ am: "AM",
287643
+ pm: "PM",
287644
+ midnight: "medianoche",
287645
+ noon: "mediodia",
287646
+ morning: "de la mañana",
287647
+ afternoon: "de la tarde",
287648
+ evening: "de la tarde",
287649
+ night: "de la noche",
287650
+ },
287651
+ wide: {
287652
+ am: "a.m.",
287653
+ pm: "p.m.",
287654
+ midnight: "medianoche",
287655
+ noon: "mediodia",
287656
+ morning: "de la mañana",
287657
+ afternoon: "de la tarde",
287658
+ evening: "de la tarde",
287659
+ night: "de la noche",
287660
+ },
287661
+ };
287662
+
287663
+ const ordinalNumber$2 = (dirtyNumber, _options) => {
287664
+ const number = Number(dirtyNumber);
287665
+ return number + "º";
287666
+ };
287667
+
287668
+ const localize$2 = {
287669
+ ordinalNumber: ordinalNumber$2,
287670
+
287671
+ era: buildLocalizeFn({
287672
+ values: eraValues$2,
287673
+ defaultWidth: "wide",
287674
+ }),
287675
+
287676
+ quarter: buildLocalizeFn({
287677
+ values: quarterValues$2,
287678
+ defaultWidth: "wide",
287679
+ argumentCallback: (quarter) => Number(quarter) - 1,
287680
+ }),
287681
+
287682
+ month: buildLocalizeFn({
287683
+ values: monthValues$2,
287684
+ defaultWidth: "wide",
287685
+ }),
287686
+
287687
+ day: buildLocalizeFn({
287688
+ values: dayValues$2,
287689
+ defaultWidth: "wide",
287690
+ }),
287691
+
287692
+ dayPeriod: buildLocalizeFn({
287693
+ values: dayPeriodValues$2,
287694
+ defaultWidth: "wide",
287695
+ formattingValues: formattingDayPeriodValues$1,
287696
+ defaultFormattingWidth: "wide",
287697
+ }),
287698
+ };
287699
+
287700
+ const matchOrdinalNumberPattern$2 = /^(\d+)(º)?/i;
287701
+ const parseOrdinalNumberPattern$2 = /\d+/i;
287702
+
287703
+ const matchEraPatterns$2 = {
287704
+ narrow: /^(ac|dc|a|d)/i,
287705
+ abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
287706
+ wide: /^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i,
287707
+ };
287708
+ const parseEraPatterns$2 = {
287709
+ any: [/^ac/i, /^dc/i],
287710
+ wide: [
287711
+ /^(antes de cristo|antes de la era com[uú]n)/i,
287712
+ /^(despu[eé]s de cristo|era com[uú]n)/i,
287713
+ ],
287714
+ };
287715
+
287716
+ const matchQuarterPatterns$2 = {
287717
+ narrow: /^[1234]/i,
287718
+ abbreviated: /^T[1234]/i,
287719
+ wide: /^[1234](º)? trimestre/i,
287720
+ };
287721
+ const parseQuarterPatterns$2 = {
287722
+ any: [/1/i, /2/i, /3/i, /4/i],
287723
+ };
287724
+
287725
+ const matchMonthPatterns$2 = {
287726
+ narrow: /^[efmajsond]/i,
287727
+ abbreviated: /^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,
287728
+ wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
287729
+ };
287730
+ const parseMonthPatterns$2 = {
287731
+ narrow: [
287732
+ /^e/i,
287733
+ /^f/i,
287734
+ /^m/i,
287735
+ /^a/i,
287736
+ /^m/i,
287737
+ /^j/i,
287738
+ /^j/i,
287739
+ /^a/i,
287740
+ /^s/i,
287741
+ /^o/i,
287742
+ /^n/i,
287743
+ /^d/i,
287744
+ ],
287745
+
287746
+ any: [
287747
+ /^en/i,
287748
+ /^feb/i,
287749
+ /^mar/i,
287750
+ /^abr/i,
287751
+ /^may/i,
287752
+ /^jun/i,
287753
+ /^jul/i,
287754
+ /^ago/i,
287755
+ /^sep/i,
287756
+ /^oct/i,
287757
+ /^nov/i,
287758
+ /^dic/i,
287759
+ ],
287760
+ };
287761
+
287762
+ const matchDayPatterns$2 = {
287763
+ narrow: /^[dlmjvs]/i,
287764
+ short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,
287765
+ abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,
287766
+ wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i,
287767
+ };
287768
+ const parseDayPatterns$2 = {
287769
+ narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
287770
+ any: [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i],
287771
+ };
287772
+
287773
+ const matchDayPeriodPatterns$2 = {
287774
+ narrow: /^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,
287775
+ any: /^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i,
287776
+ };
287777
+ const parseDayPeriodPatterns$2 = {
287778
+ any: {
287779
+ am: /^a/i,
287780
+ pm: /^p/i,
287781
+ midnight: /^mn/i,
287782
+ noon: /^md/i,
287783
+ morning: /mañana/i,
287784
+ afternoon: /tarde/i,
287785
+ evening: /tarde/i,
287786
+ night: /noche/i,
287787
+ },
287788
+ };
287789
+
287790
+ const match$2 = {
287791
+ ordinalNumber: buildMatchPatternFn({
287792
+ matchPattern: matchOrdinalNumberPattern$2,
287793
+ parsePattern: parseOrdinalNumberPattern$2,
287794
+ valueCallback: function (value) {
287795
+ return parseInt(value, 10);
287796
+ },
287797
+ }),
287798
+
287799
+ era: buildMatchFn({
287800
+ matchPatterns: matchEraPatterns$2,
287801
+ defaultMatchWidth: "wide",
287802
+ parsePatterns: parseEraPatterns$2,
287803
+ defaultParseWidth: "any",
287804
+ }),
287805
+
287806
+ quarter: buildMatchFn({
287807
+ matchPatterns: matchQuarterPatterns$2,
287808
+ defaultMatchWidth: "wide",
287809
+ parsePatterns: parseQuarterPatterns$2,
287810
+ defaultParseWidth: "any",
287811
+ valueCallback: (index) => index + 1,
287812
+ }),
287813
+
287814
+ month: buildMatchFn({
287815
+ matchPatterns: matchMonthPatterns$2,
287816
+ defaultMatchWidth: "wide",
287817
+ parsePatterns: parseMonthPatterns$2,
287818
+ defaultParseWidth: "any",
287819
+ }),
287820
+
287821
+ day: buildMatchFn({
287822
+ matchPatterns: matchDayPatterns$2,
287823
+ defaultMatchWidth: "wide",
287824
+ parsePatterns: parseDayPatterns$2,
287825
+ defaultParseWidth: "any",
287826
+ }),
287827
+
287828
+ dayPeriod: buildMatchFn({
287829
+ matchPatterns: matchDayPeriodPatterns$2,
287830
+ defaultMatchWidth: "any",
287831
+ parsePatterns: parseDayPeriodPatterns$2,
287832
+ defaultParseWidth: "any",
287833
+ }),
287834
+ };
287835
+
287836
+ /**
287837
+ * @category Locales
287838
+ * @summary Spanish locale.
287839
+ * @language Spanish
287840
+ * @iso-639-2 spa
287841
+ * @author Juan Angosto [@juanangosto](https://github.com/juanangosto)
287842
+ * @author Guillermo Grau [@guigrpa](https://github.com/guigrpa)
287843
+ * @author Fernando Agüero [@fjaguero](https://github.com/fjaguero)
287844
+ * @author Gastón Haro [@harogaston](https://github.com/harogaston)
287845
+ * @author Yago Carballo [@YagoCarballo](https://github.com/YagoCarballo)
287846
+ */
287847
+ const es = {
287848
+ code: "es",
287849
+ formatDistance: formatDistance$2,
287850
+ formatLong: formatLong$2,
287851
+ formatRelative: formatRelative$2,
287852
+ localize: localize$2,
287853
+ match: match$2,
287854
+ options: {
287855
+ weekStartsOn: 1 /* Monday */,
287856
+ firstWeekContainsDate: 1,
287857
+ },
287858
+ };
287859
+
287860
+ const formatDistanceLocale$1 = {
287861
+ lessThanXSeconds: {
287862
+ one: "moins d’une seconde",
287863
+ other: "moins de {{count}} secondes",
287864
+ },
287865
+
287866
+ xSeconds: {
287867
+ one: "1 seconde",
287868
+ other: "{{count}} secondes",
287869
+ },
287870
+
287871
+ halfAMinute: "30 secondes",
287872
+
287873
+ lessThanXMinutes: {
287874
+ one: "moins d’une minute",
287875
+ other: "moins de {{count}} minutes",
287876
+ },
287877
+
287878
+ xMinutes: {
287879
+ one: "1 minute",
287880
+ other: "{{count}} minutes",
287881
+ },
287882
+
287883
+ aboutXHours: {
287884
+ one: "environ 1 heure",
287885
+ other: "environ {{count}} heures",
287886
+ },
287887
+
287888
+ xHours: {
287889
+ one: "1 heure",
287890
+ other: "{{count}} heures",
287891
+ },
287892
+
287893
+ xDays: {
287894
+ one: "1 jour",
287895
+ other: "{{count}} jours",
287896
+ },
287897
+
287898
+ aboutXWeeks: {
287899
+ one: "environ 1 semaine",
287900
+ other: "environ {{count}} semaines",
287901
+ },
287902
+
287903
+ xWeeks: {
287904
+ one: "1 semaine",
287905
+ other: "{{count}} semaines",
287906
+ },
287907
+
287908
+ aboutXMonths: {
287909
+ one: "environ 1 mois",
287910
+ other: "environ {{count}} mois",
287911
+ },
287912
+
287913
+ xMonths: {
287914
+ one: "1 mois",
287915
+ other: "{{count}} mois",
287916
+ },
287917
+
287918
+ aboutXYears: {
287919
+ one: "environ 1 an",
287920
+ other: "environ {{count}} ans",
287921
+ },
287922
+
287923
+ xYears: {
287924
+ one: "1 an",
287925
+ other: "{{count}} ans",
287926
+ },
287927
+
287928
+ overXYears: {
287929
+ one: "plus d’un an",
287930
+ other: "plus de {{count}} ans",
287931
+ },
287932
+
287933
+ almostXYears: {
287934
+ one: "presqu’un an",
287935
+ other: "presque {{count}} ans",
287936
+ },
287937
+ };
287938
+
287939
+ const formatDistance$1 = (token, count, options) => {
287940
+ let result;
287941
+ const form = formatDistanceLocale$1[token];
287942
+ if (typeof form === "string") {
287943
+ result = form;
287944
+ } else if (count === 1) {
287945
+ result = form.one;
287946
+ } else {
287947
+ result = form.other.replace("{{count}}", String(count));
287948
+ }
287949
+
287950
+ if (options?.addSuffix) {
287951
+ if (options.comparison && options.comparison > 0) {
287952
+ return "dans " + result;
287953
+ } else {
287954
+ return "il y a " + result;
287955
+ }
287956
+ }
287957
+
287958
+ return result;
287959
+ };
287960
+
287961
+ const dateFormats$1 = {
287962
+ full: "EEEE d MMMM y",
287963
+ long: "d MMMM y",
287964
+ medium: "d MMM y",
287965
+ short: "dd/MM/y",
287966
+ };
287967
+
287968
+ const timeFormats$1 = {
287969
+ full: "HH:mm:ss zzzz",
287970
+ long: "HH:mm:ss z",
287971
+ medium: "HH:mm:ss",
287972
+ short: "HH:mm",
287973
+ };
287974
+
287975
+ const dateTimeFormats$1 = {
287976
+ full: "{{date}} 'à' {{time}}",
287977
+ long: "{{date}} 'à' {{time}}",
287978
+ medium: "{{date}}, {{time}}",
287979
+ short: "{{date}}, {{time}}",
287980
+ };
287981
+
287982
+ const formatLong$1 = {
287983
+ date: buildFormatLongFn({
287984
+ formats: dateFormats$1,
287985
+ defaultWidth: "full",
287986
+ }),
287987
+
287988
+ time: buildFormatLongFn({
287989
+ formats: timeFormats$1,
287990
+ defaultWidth: "full",
287991
+ }),
287992
+
287993
+ dateTime: buildFormatLongFn({
287994
+ formats: dateTimeFormats$1,
287995
+ defaultWidth: "full",
287996
+ }),
287997
+ };
287998
+
287999
+ const formatRelativeLocale$1 = {
288000
+ lastWeek: "eeee 'dernier à' p",
288001
+ yesterday: "'hier à' p",
288002
+ today: "'aujourd’hui à' p",
288003
+ tomorrow: "'demain à' p'",
288004
+ nextWeek: "eeee 'prochain à' p",
288005
+ other: "P",
288006
+ };
288007
+
288008
+ const formatRelative$1 = (token, _date, _baseDate, _options) =>
288009
+ formatRelativeLocale$1[token];
288010
+
288011
+ const eraValues$1 = {
288012
+ narrow: ["av. J.-C", "ap. J.-C"],
288013
+ abbreviated: ["av. J.-C", "ap. J.-C"],
288014
+ wide: ["avant Jésus-Christ", "après Jésus-Christ"],
288015
+ };
288016
+
288017
+ const quarterValues$1 = {
288018
+ narrow: ["T1", "T2", "T3", "T4"],
288019
+ abbreviated: ["1er trim.", "2ème trim.", "3ème trim.", "4ème trim."],
288020
+ wide: ["1er trimestre", "2ème trimestre", "3ème trimestre", "4ème trimestre"],
288021
+ };
288022
+
288023
+ const monthValues$1 = {
288024
+ narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
288025
+ abbreviated: [
288026
+ "janv.",
288027
+ "févr.",
288028
+ "mars",
288029
+ "avr.",
288030
+ "mai",
288031
+ "juin",
288032
+ "juil.",
288033
+ "août",
288034
+ "sept.",
288035
+ "oct.",
288036
+ "nov.",
288037
+ "déc.",
288038
+ ],
288039
+
288040
+ wide: [
288041
+ "janvier",
288042
+ "février",
288043
+ "mars",
288044
+ "avril",
288045
+ "mai",
288046
+ "juin",
288047
+ "juillet",
288048
+ "août",
288049
+ "septembre",
288050
+ "octobre",
288051
+ "novembre",
288052
+ "décembre",
288053
+ ],
288054
+ };
288055
+
288056
+ const dayValues$1 = {
288057
+ narrow: ["D", "L", "M", "M", "J", "V", "S"],
288058
+ short: ["di", "lu", "ma", "me", "je", "ve", "sa"],
288059
+ abbreviated: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."],
288060
+
288061
+ wide: [
288062
+ "dimanche",
288063
+ "lundi",
288064
+ "mardi",
288065
+ "mercredi",
288066
+ "jeudi",
288067
+ "vendredi",
288068
+ "samedi",
288069
+ ],
288070
+ };
288071
+
288072
+ const dayPeriodValues$1 = {
288073
+ narrow: {
288074
+ am: "AM",
288075
+ pm: "PM",
288076
+ midnight: "minuit",
288077
+ noon: "midi",
288078
+ morning: "mat.",
288079
+ afternoon: "ap.m.",
288080
+ evening: "soir",
288081
+ night: "mat.",
288082
+ },
288083
+ abbreviated: {
288084
+ am: "AM",
288085
+ pm: "PM",
288086
+ midnight: "minuit",
288087
+ noon: "midi",
288088
+ morning: "matin",
288089
+ afternoon: "après-midi",
288090
+ evening: "soir",
288091
+ night: "matin",
288092
+ },
288093
+ wide: {
288094
+ am: "AM",
288095
+ pm: "PM",
288096
+ midnight: "minuit",
288097
+ noon: "midi",
288098
+ morning: "du matin",
288099
+ afternoon: "de l’après-midi",
288100
+ evening: "du soir",
288101
+ night: "du matin",
288102
+ },
288103
+ };
288104
+
288105
+ const ordinalNumber$1 = (dirtyNumber, options) => {
288106
+ const number = Number(dirtyNumber);
288107
+ const unit = options?.unit;
288108
+
288109
+ if (number === 0) return "0";
288110
+
288111
+ const feminineUnits = ["year", "week", "hour", "minute", "second"];
288112
+ let suffix;
288113
+
288114
+ if (number === 1) {
288115
+ suffix = unit && feminineUnits.includes(unit) ? "ère" : "er";
288116
+ } else {
288117
+ suffix = "ème";
288118
+ }
288119
+
288120
+ return number + suffix;
288121
+ };
288122
+
288123
+ const LONG_MONTHS_TOKENS = ["MMM", "MMMM"];
288124
+
288125
+ const localize$1 = {
288126
+ preprocessor: (date, parts) => {
288127
+ // Replaces the `do` tokens with `d` when used with long month tokens and the day of the month is greater than one.
288128
+ // Use case "do MMMM" => 1er août, 29 août
288129
+ // see https://github.com/date-fns/date-fns/issues/1391
288130
+
288131
+ if (date.getDate() === 1) return parts;
288132
+
288133
+ const hasLongMonthToken = parts.some(
288134
+ (part) => part.isToken && LONG_MONTHS_TOKENS.includes(part.value),
288135
+ );
288136
+
288137
+ if (!hasLongMonthToken) return parts;
288138
+
288139
+ return parts.map((part) =>
288140
+ part.isToken && part.value === "do"
288141
+ ? { isToken: true, value: "d" }
288142
+ : part,
288143
+ );
288144
+ },
288145
+
288146
+ ordinalNumber: ordinalNumber$1,
288147
+
288148
+ era: buildLocalizeFn({
288149
+ values: eraValues$1,
288150
+ defaultWidth: "wide",
288151
+ }),
288152
+
288153
+ quarter: buildLocalizeFn({
288154
+ values: quarterValues$1,
288155
+ defaultWidth: "wide",
288156
+ argumentCallback: (quarter) => quarter - 1,
288157
+ }),
288158
+
288159
+ month: buildLocalizeFn({
288160
+ values: monthValues$1,
288161
+ defaultWidth: "wide",
288162
+ }),
288163
+
288164
+ day: buildLocalizeFn({
288165
+ values: dayValues$1,
288166
+ defaultWidth: "wide",
288167
+ }),
288168
+
288169
+ dayPeriod: buildLocalizeFn({
288170
+ values: dayPeriodValues$1,
288171
+ defaultWidth: "wide",
288172
+ }),
288173
+ };
288174
+
288175
+ const matchOrdinalNumberPattern$1 = /^(\d+)(ième|ère|ème|er|e)?/i;
288176
+ const parseOrdinalNumberPattern$1 = /\d+/i;
288177
+
288178
+ const matchEraPatterns$1 = {
288179
+ narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
288180
+ abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
288181
+ wide: /^(avant Jésus-Christ|après Jésus-Christ)/i,
288182
+ };
288183
+ const parseEraPatterns$1 = {
288184
+ any: [/^av/i, /^ap/i],
288185
+ };
288186
+
288187
+ const matchQuarterPatterns$1 = {
288188
+ narrow: /^T?[1234]/i,
288189
+ abbreviated: /^[1234](er|ème|e)? trim\.?/i,
288190
+ wide: /^[1234](er|ème|e)? trimestre/i,
288191
+ };
288192
+ const parseQuarterPatterns$1 = {
288193
+ any: [/1/i, /2/i, /3/i, /4/i],
288194
+ };
288195
+
288196
+ const matchMonthPatterns$1 = {
288197
+ narrow: /^[jfmasond]/i,
288198
+ abbreviated:
288199
+ /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
288200
+ wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
288201
+ };
288202
+ const parseMonthPatterns$1 = {
288203
+ narrow: [
288204
+ /^j/i,
288205
+ /^f/i,
288206
+ /^m/i,
288207
+ /^a/i,
288208
+ /^m/i,
288209
+ /^j/i,
288210
+ /^j/i,
288211
+ /^a/i,
288212
+ /^s/i,
288213
+ /^o/i,
288214
+ /^n/i,
288215
+ /^d/i,
288216
+ ],
288217
+
288218
+ any: [
288219
+ /^ja/i,
288220
+ /^f/i,
288221
+ /^mar/i,
288222
+ /^av/i,
288223
+ /^ma/i,
288224
+ /^juin/i,
288225
+ /^juil/i,
288226
+ /^ao/i,
288227
+ /^s/i,
288228
+ /^o/i,
288229
+ /^n/i,
288230
+ /^d/i,
288231
+ ],
288232
+ };
288233
+
288234
+ const matchDayPatterns$1 = {
288235
+ narrow: /^[lmjvsd]/i,
288236
+ short: /^(di|lu|ma|me|je|ve|sa)/i,
288237
+ abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
288238
+ wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i,
288239
+ };
288240
+ const parseDayPatterns$1 = {
288241
+ narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
288242
+ any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i],
288243
+ };
288244
+
288245
+ const matchDayPeriodPatterns$1 = {
288246
+ narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
288247
+ any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i,
288248
+ };
288249
+ const parseDayPeriodPatterns$1 = {
288250
+ any: {
288251
+ am: /^a/i,
288252
+ pm: /^p/i,
288253
+ midnight: /^min/i,
288254
+ noon: /^mid/i,
288255
+ morning: /mat/i,
288256
+ afternoon: /ap/i,
288257
+ evening: /soir/i,
288258
+ night: /nuit/i,
288259
+ },
288260
+ };
288261
+
288262
+ const match$1 = {
288263
+ ordinalNumber: buildMatchPatternFn({
288264
+ matchPattern: matchOrdinalNumberPattern$1,
288265
+ parsePattern: parseOrdinalNumberPattern$1,
288266
+ valueCallback: (value) => parseInt(value),
288267
+ }),
288268
+
288269
+ era: buildMatchFn({
288270
+ matchPatterns: matchEraPatterns$1,
288271
+ defaultMatchWidth: "wide",
288272
+ parsePatterns: parseEraPatterns$1,
288273
+ defaultParseWidth: "any",
288274
+ }),
288275
+
288276
+ quarter: buildMatchFn({
288277
+ matchPatterns: matchQuarterPatterns$1,
288278
+ defaultMatchWidth: "wide",
288279
+ parsePatterns: parseQuarterPatterns$1,
288280
+ defaultParseWidth: "any",
288281
+ valueCallback: (index) => index + 1,
288282
+ }),
288283
+
288284
+ month: buildMatchFn({
288285
+ matchPatterns: matchMonthPatterns$1,
288286
+ defaultMatchWidth: "wide",
288287
+ parsePatterns: parseMonthPatterns$1,
288288
+ defaultParseWidth: "any",
288289
+ }),
288290
+
288291
+ day: buildMatchFn({
288292
+ matchPatterns: matchDayPatterns$1,
288293
+ defaultMatchWidth: "wide",
288294
+ parsePatterns: parseDayPatterns$1,
288295
+ defaultParseWidth: "any",
288296
+ }),
288297
+
288298
+ dayPeriod: buildMatchFn({
288299
+ matchPatterns: matchDayPeriodPatterns$1,
288300
+ defaultMatchWidth: "any",
288301
+ parsePatterns: parseDayPeriodPatterns$1,
288302
+ defaultParseWidth: "any",
288303
+ }),
288304
+ };
288305
+
288306
+ /**
288307
+ * @category Locales
288308
+ * @summary French locale.
288309
+ * @language French
288310
+ * @iso-639-2 fra
288311
+ * @author Jean Dupouy [@izeau](https://github.com/izeau)
288312
+ * @author François B [@fbonzon](https://github.com/fbonzon)
288313
+ */
288314
+ const fr = {
288315
+ code: "fr",
288316
+ formatDistance: formatDistance$1,
288317
+ formatLong: formatLong$1,
288318
+ formatRelative: formatRelative$1,
288319
+ localize: localize$1,
288320
+ match: match$1,
288321
+ options: {
288322
+ weekStartsOn: 1 /* Monday */,
288323
+ firstWeekContainsDate: 4,
288324
+ },
288325
+ };
288326
+
288327
+ const formatDistanceLocale = {
288328
+ lessThanXSeconds: {
288329
+ one: "不到 1 秒",
288330
+ other: "不到 {{count}} 秒",
288331
+ },
288332
+
288333
+ xSeconds: {
288334
+ one: "1 秒",
288335
+ other: "{{count}} 秒",
288336
+ },
288337
+
288338
+ halfAMinute: "半分钟",
288339
+
288340
+ lessThanXMinutes: {
288341
+ one: "不到 1 分钟",
288342
+ other: "不到 {{count}} 分钟",
288343
+ },
288344
+
288345
+ xMinutes: {
288346
+ one: "1 分钟",
288347
+ other: "{{count}} 分钟",
288348
+ },
288349
+
288350
+ xHours: {
288351
+ one: "1 小时",
288352
+ other: "{{count}} 小时",
288353
+ },
288354
+
288355
+ aboutXHours: {
288356
+ one: "大约 1 小时",
288357
+ other: "大约 {{count}} 小时",
288358
+ },
288359
+
288360
+ xDays: {
288361
+ one: "1 天",
288362
+ other: "{{count}} 天",
288363
+ },
288364
+
288365
+ aboutXWeeks: {
288366
+ one: "大约 1 个星期",
288367
+ other: "大约 {{count}} 个星期",
288368
+ },
288369
+
288370
+ xWeeks: {
288371
+ one: "1 个星期",
288372
+ other: "{{count}} 个星期",
288373
+ },
288374
+
288375
+ aboutXMonths: {
288376
+ one: "大约 1 个月",
288377
+ other: "大约 {{count}} 个月",
288378
+ },
288379
+
288380
+ xMonths: {
288381
+ one: "1 个月",
288382
+ other: "{{count}} 个月",
288383
+ },
288384
+
288385
+ aboutXYears: {
288386
+ one: "大约 1 年",
288387
+ other: "大约 {{count}} 年",
288388
+ },
288389
+
288390
+ xYears: {
288391
+ one: "1 年",
288392
+ other: "{{count}} 年",
288393
+ },
288394
+
288395
+ overXYears: {
288396
+ one: "超过 1 年",
288397
+ other: "超过 {{count}} 年",
288398
+ },
288399
+
288400
+ almostXYears: {
288401
+ one: "将近 1 年",
288402
+ other: "将近 {{count}} 年",
288403
+ },
288404
+ };
288405
+
288406
+ const formatDistance = (token, count, options) => {
288407
+ let result;
288408
+
288409
+ const tokenValue = formatDistanceLocale[token];
288410
+ if (typeof tokenValue === "string") {
288411
+ result = tokenValue;
288412
+ } else if (count === 1) {
288413
+ result = tokenValue.one;
288414
+ } else {
288415
+ result = tokenValue.other.replace("{{count}}", String(count));
288416
+ }
288417
+
288418
+ if (options?.addSuffix) {
288419
+ if (options.comparison && options.comparison > 0) {
288420
+ return result + "内";
288421
+ } else {
288422
+ return result + "前";
288423
+ }
288424
+ }
288425
+
288426
+ return result;
288427
+ };
288428
+
288429
+ const dateFormats = {
288430
+ full: "y'年'M'月'd'日' EEEE",
288431
+ long: "y'年'M'月'd'日'",
288432
+ medium: "yyyy-MM-dd",
288433
+ short: "yy-MM-dd",
288434
+ };
288435
+
288436
+ const timeFormats = {
288437
+ full: "zzzz a h:mm:ss",
288438
+ long: "z a h:mm:ss",
288439
+ medium: "a h:mm:ss",
288440
+ short: "a h:mm",
288441
+ };
288442
+
288443
+ const dateTimeFormats = {
288444
+ full: "{{date}} {{time}}",
288445
+ long: "{{date}} {{time}}",
288446
+ medium: "{{date}} {{time}}",
288447
+ short: "{{date}} {{time}}",
288448
+ };
288449
+
288450
+ const formatLong = {
288451
+ date: buildFormatLongFn({
288452
+ formats: dateFormats,
288453
+ defaultWidth: "full",
288454
+ }),
288455
+
288456
+ time: buildFormatLongFn({
288457
+ formats: timeFormats,
288458
+ defaultWidth: "full",
288459
+ }),
288460
+
288461
+ dateTime: buildFormatLongFn({
288462
+ formats: dateTimeFormats,
288463
+ defaultWidth: "full",
288464
+ }),
288465
+ };
288466
+
288467
+ function checkWeek(date, baseDate, options) {
288468
+ const baseFormat = "eeee p";
288469
+
288470
+ if (isSameWeek(date, baseDate, options)) {
288471
+ return baseFormat; // in same week
288472
+ } else if (date.getTime() > baseDate.getTime()) {
288473
+ return "'下个'" + baseFormat; // in next week
288474
+ }
288475
+ return "'上个'" + baseFormat; // in last week
288476
+ }
288477
+
288478
+ const formatRelativeLocale = {
288479
+ lastWeek: checkWeek, // days before yesterday, maybe in this week or last week
288480
+ yesterday: "'昨天' p",
288481
+ today: "'今天' p",
288482
+ tomorrow: "'明天' p",
288483
+ nextWeek: checkWeek, // days after tomorrow, maybe in this week or next week
288484
+ other: "PP p",
288485
+ };
288486
+
288487
+ const formatRelative = (token, date, baseDate, options) => {
288488
+ const format = formatRelativeLocale[token];
288489
+
288490
+ if (typeof format === "function") {
288491
+ return format(date, baseDate, options);
288492
+ }
288493
+
288494
+ return format;
288495
+ };
288496
+
288497
+ const eraValues = {
288498
+ narrow: ["前", "公元"],
288499
+ abbreviated: ["前", "公元"],
288500
+ wide: ["公元前", "公元"],
288501
+ };
288502
+
288503
+ const quarterValues = {
288504
+ narrow: ["1", "2", "3", "4"],
288505
+ abbreviated: ["第一季", "第二季", "第三季", "第四季"],
288506
+ wide: ["第一季度", "第二季度", "第三季度", "第四季度"],
288507
+ };
288508
+
288509
+ const monthValues = {
288510
+ narrow: [
288511
+ "一",
288512
+ "二",
288513
+ "三",
288514
+ "四",
288515
+ "五",
288516
+ "六",
288517
+ "七",
288518
+ "八",
288519
+ "九",
288520
+ "十",
288521
+ "十一",
288522
+ "十二",
288523
+ ],
288524
+
288525
+ abbreviated: [
288526
+ "1月",
288527
+ "2月",
288528
+ "3月",
288529
+ "4月",
288530
+ "5月",
288531
+ "6月",
288532
+ "7月",
288533
+ "8月",
288534
+ "9月",
288535
+ "10月",
288536
+ "11月",
288537
+ "12月",
288538
+ ],
288539
+
288540
+ wide: [
288541
+ "一月",
288542
+ "二月",
288543
+ "三月",
288544
+ "四月",
288545
+ "五月",
288546
+ "六月",
288547
+ "七月",
288548
+ "八月",
288549
+ "九月",
288550
+ "十月",
288551
+ "十一月",
288552
+ "十二月",
288553
+ ],
288554
+ };
288555
+
288556
+ const dayValues = {
288557
+ narrow: ["日", "一", "二", "三", "四", "五", "六"],
288558
+ short: ["日", "一", "二", "三", "四", "五", "六"],
288559
+ abbreviated: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
288560
+
288561
+ wide: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
288562
+ };
288563
+
288564
+ const dayPeriodValues = {
288565
+ narrow: {
288566
+ am: "上",
288567
+ pm: "下",
288568
+ midnight: "凌晨",
288569
+ noon: "午",
288570
+ morning: "早",
288571
+ afternoon: "下午",
288572
+ evening: "晚",
288573
+ night: "夜",
288574
+ },
288575
+ abbreviated: {
288576
+ am: "上午",
288577
+ pm: "下午",
288578
+ midnight: "凌晨",
288579
+ noon: "中午",
288580
+ morning: "早晨",
288581
+ afternoon: "中午",
288582
+ evening: "晚上",
288583
+ night: "夜间",
288584
+ },
288585
+ wide: {
288586
+ am: "上午",
288587
+ pm: "下午",
288588
+ midnight: "凌晨",
288589
+ noon: "中午",
288590
+ morning: "早晨",
288591
+ afternoon: "中午",
288592
+ evening: "晚上",
288593
+ night: "夜间",
288594
+ },
288595
+ };
288596
+
288597
+ const formattingDayPeriodValues = {
288598
+ narrow: {
288599
+ am: "上",
288600
+ pm: "下",
288601
+ midnight: "凌晨",
288602
+ noon: "午",
288603
+ morning: "早",
288604
+ afternoon: "下午",
288605
+ evening: "晚",
288606
+ night: "夜",
288607
+ },
288608
+ abbreviated: {
288609
+ am: "上午",
288610
+ pm: "下午",
288611
+ midnight: "凌晨",
288612
+ noon: "中午",
288613
+ morning: "早晨",
288614
+ afternoon: "中午",
288615
+ evening: "晚上",
288616
+ night: "夜间",
288617
+ },
288618
+ wide: {
288619
+ am: "上午",
288620
+ pm: "下午",
288621
+ midnight: "凌晨",
288622
+ noon: "中午",
288623
+ morning: "早晨",
288624
+ afternoon: "中午",
288625
+ evening: "晚上",
288626
+ night: "夜间",
288627
+ },
288628
+ };
288629
+
288630
+ const ordinalNumber = (dirtyNumber, options) => {
288631
+ const number = Number(dirtyNumber);
288632
+
288633
+ switch (options?.unit) {
288634
+ case "date":
288635
+ return number.toString() + "日";
288636
+ case "hour":
288637
+ return number.toString() + "时";
288638
+ case "minute":
288639
+ return number.toString() + "分";
288640
+ case "second":
288641
+ return number.toString() + "秒";
288642
+ default:
288643
+ return "第 " + number.toString();
288644
+ }
288645
+ };
288646
+
288647
+ const localize = {
288648
+ ordinalNumber,
288649
+
288650
+ era: buildLocalizeFn({
288651
+ values: eraValues,
288652
+ defaultWidth: "wide",
288653
+ }),
288654
+
288655
+ quarter: buildLocalizeFn({
288656
+ values: quarterValues,
288657
+ defaultWidth: "wide",
288658
+ argumentCallback: (quarter) => quarter - 1,
288659
+ }),
288660
+
288661
+ month: buildLocalizeFn({
288662
+ values: monthValues,
288663
+ defaultWidth: "wide",
288664
+ }),
288665
+
288666
+ day: buildLocalizeFn({
288667
+ values: dayValues,
288668
+ defaultWidth: "wide",
288669
+ }),
288670
+
288671
+ dayPeriod: buildLocalizeFn({
288672
+ values: dayPeriodValues,
288673
+ defaultWidth: "wide",
288674
+ formattingValues: formattingDayPeriodValues,
288675
+ defaultFormattingWidth: "wide",
288676
+ }),
288677
+ };
288678
+
288679
+ const matchOrdinalNumberPattern = /^(第\s*)?\d+(日|时|分|秒)?/i;
288680
+ const parseOrdinalNumberPattern = /\d+/i;
288681
+
288682
+ const matchEraPatterns = {
288683
+ narrow: /^(前)/i,
288684
+ abbreviated: /^(前)/i,
288685
+ wide: /^(公元前|公元)/i,
288686
+ };
288687
+ const parseEraPatterns = {
288688
+ any: [/^(前)/i, /^(公元)/i],
288689
+ };
288690
+
288691
+ const matchQuarterPatterns = {
288692
+ narrow: /^[1234]/i,
288693
+ abbreviated: /^第[一二三四]刻/i,
288694
+ wide: /^第[一二三四]刻钟/i,
288695
+ };
288696
+ const parseQuarterPatterns = {
288697
+ any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i],
288698
+ };
288699
+
288700
+ const matchMonthPatterns = {
288701
+ narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
288702
+ abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
288703
+ wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i,
288704
+ };
288705
+ const parseMonthPatterns = {
288706
+ narrow: [
288707
+ /^一/i,
288708
+ /^二/i,
288709
+ /^三/i,
288710
+ /^四/i,
288711
+ /^五/i,
288712
+ /^六/i,
288713
+ /^七/i,
288714
+ /^八/i,
288715
+ /^九/i,
288716
+ /^十(?!(一|二))/i,
288717
+ /^十一/i,
288718
+ /^十二/i,
288719
+ ],
288720
+
288721
+ any: [
288722
+ /^一|1/i,
288723
+ /^二|2/i,
288724
+ /^三|3/i,
288725
+ /^四|4/i,
288726
+ /^五|5/i,
288727
+ /^六|6/i,
288728
+ /^七|7/i,
288729
+ /^八|8/i,
288730
+ /^九|9/i,
288731
+ /^十(?!(一|二))|10/i,
288732
+ /^十一|11/i,
288733
+ /^十二|12/i,
288734
+ ],
288735
+ };
288736
+
288737
+ const matchDayPatterns = {
288738
+ narrow: /^[一二三四五六日]/i,
288739
+ short: /^[一二三四五六日]/i,
288740
+ abbreviated: /^周[一二三四五六日]/i,
288741
+ wide: /^星期[一二三四五六日]/i,
288742
+ };
288743
+ const parseDayPatterns = {
288744
+ any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i],
288745
+ };
288746
+
288747
+ const matchDayPeriodPatterns = {
288748
+ any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i,
288749
+ };
288750
+ const parseDayPeriodPatterns = {
288751
+ any: {
288752
+ am: /^上午?/i,
288753
+ pm: /^下午?/i,
288754
+ midnight: /^午夜/i,
288755
+ noon: /^[中正]午/i,
288756
+ morning: /^早上/i,
288757
+ afternoon: /^下午/i,
288758
+ evening: /^晚上?/i,
288759
+ night: /^凌晨/i,
288760
+ },
288761
+ };
288762
+
288763
+ const match = {
288764
+ ordinalNumber: buildMatchPatternFn({
288765
+ matchPattern: matchOrdinalNumberPattern,
288766
+ parsePattern: parseOrdinalNumberPattern,
288767
+ valueCallback: (value) => parseInt(value, 10),
288768
+ }),
288769
+
288770
+ era: buildMatchFn({
288771
+ matchPatterns: matchEraPatterns,
288772
+ defaultMatchWidth: "wide",
288773
+ parsePatterns: parseEraPatterns,
288774
+ defaultParseWidth: "any",
288775
+ }),
288776
+
288777
+ quarter: buildMatchFn({
288778
+ matchPatterns: matchQuarterPatterns,
288779
+ defaultMatchWidth: "wide",
288780
+ parsePatterns: parseQuarterPatterns,
288781
+ defaultParseWidth: "any",
288782
+ valueCallback: (index) => index + 1,
288783
+ }),
288784
+
288785
+ month: buildMatchFn({
288786
+ matchPatterns: matchMonthPatterns,
288787
+ defaultMatchWidth: "wide",
288788
+ parsePatterns: parseMonthPatterns,
288789
+ defaultParseWidth: "any",
288790
+ }),
288791
+
288792
+ day: buildMatchFn({
288793
+ matchPatterns: matchDayPatterns,
288794
+ defaultMatchWidth: "wide",
288795
+ parsePatterns: parseDayPatterns,
288796
+ defaultParseWidth: "any",
288797
+ }),
288798
+
288799
+ dayPeriod: buildMatchFn({
288800
+ matchPatterns: matchDayPeriodPatterns,
288801
+ defaultMatchWidth: "any",
288802
+ parsePatterns: parseDayPeriodPatterns,
288803
+ defaultParseWidth: "any",
288804
+ }),
288805
+ };
288806
+
288807
+ /**
288808
+ * @category Locales
288809
+ * @summary Chinese Simplified locale.
288810
+ * @language Chinese Simplified
288811
+ * @iso-639-2 zho
288812
+ * @author Changyu Geng [@KingMario](https://github.com/KingMario)
288813
+ * @author Song Shuoyun [@fnlctrl](https://github.com/fnlctrl)
288814
+ * @author sabrinaM [@sabrinamiao](https://github.com/sabrinamiao)
288815
+ * @author Carney Wu [@cubicwork](https://github.com/cubicwork)
288816
+ * @author Terrence Lam [@skyuplam](https://github.com/skyuplam)
288817
+ */
288818
+ const zhCN = {
288819
+ code: "zh-CN",
288820
+ formatDistance: formatDistance,
288821
+ formatLong: formatLong,
288822
+ formatRelative: formatRelative,
288823
+ localize: localize,
288824
+ match: match,
288825
+ options: {
288826
+ weekStartsOn: 1 /* Monday */,
288827
+ firstWeekContainsDate: 4,
288828
+ },
288829
+ };
288830
+
288831
+ const DATE_FNS_LOCALES = { fr, es, zh: zhCN };
288832
+ /** The date-fns locale for the active language; undefined keeps date-fns' English default. */
288833
+ function useDateFnsLocale() {
288834
+ return DATE_FNS_LOCALES[useWebContainersLocale()];
288835
+ }
288836
+
287076
288837
  const EditMemoryModal$1 = dynamic(() => Promise.resolve().then(function () { return editMemoryModal; }).then((module) => ({
287077
288838
  default: module.EditMemoryModal,
287078
288839
  })), { ssr: false });
@@ -287088,11 +288849,12 @@ const BulkDeleteMemoryModal$1 = dynamic(() => Promise.resolve().then(function ()
287088
288849
  const ManageCategoriesModal$1 = dynamic(() => Promise.resolve().then(function () { return manageCategoriesModal; }).then((module) => ({
287089
288850
  default: module.ManageCategoriesModal,
287090
288851
  })), { ssr: false });
287091
- const PAGE_SIZE$8 = 20;
288852
+ const PAGE_SIZE$9 = 20;
287092
288853
  const SNAPSHOT_PAGE_SIZE = 1000;
287093
288854
  function ManageMemories({ tenantKey, username, mentorId }) {
287094
288855
  var _a, _b, _c, _d, _e;
287095
288856
  const t = useT();
288857
+ const dateFnsLocale = useDateFnsLocale();
287096
288858
  const [selectedLearner, setSelectedLearner] = useState('');
287097
288859
  const [dateRange, setDateRange] = useState(undefined);
287098
288860
  const [selectedCategorySlug, setSelectedCategorySlug] = useState('all');
@@ -287103,7 +288865,7 @@ function ManageMemories({ tenantKey, username, mentorId }) {
287103
288865
  setPage(1);
287104
288866
  }, [selectedLearner, dateRange, selectedCategorySlug]);
287105
288867
  const listParams = useMemo(() => {
287106
- const params = { page, page_size: PAGE_SIZE$8 };
288868
+ const params = { page, page_size: PAGE_SIZE$9 };
287107
288869
  if (selectedLearner)
287108
288870
  params.email = selectedLearner;
287109
288871
  if (selectedCategorySlug !== 'all')
@@ -287122,7 +288884,7 @@ function ManageMemories({ tenantKey, username, mentorId }) {
287122
288884
  }, {
287123
288885
  skip: !tenantKey || !username || !mentorId,
287124
288886
  });
287125
- const totalPages = Math.max(1, Math.ceil(((_a = listResponse === null || listResponse === void 0 ? void 0 : listResponse.count) !== null && _a !== void 0 ? _a : 0) / PAGE_SIZE$8));
288887
+ const totalPages = Math.max(1, Math.ceil(((_a = listResponse === null || listResponse === void 0 ? void 0 : listResponse.count) !== null && _a !== void 0 ? _a : 0) / PAGE_SIZE$9));
287126
288888
  const { data: adminCategories } = useGetMemoryCategoriesAdminQuery({
287127
288889
  org: tenantKey,
287128
288890
  mentorId,
@@ -287335,21 +289097,22 @@ function ManageMemories({ tenantKey, username, mentorId }) {
287335
289097
  setSelectedLearner(learner.email);
287336
289098
  }, children: [jsx(Check, { className: cn('mr-2 h-4 w-4', selectedLearner === learner.email ? 'opacity-100' : 'opacity-0') }), jsx("div", { className: "flex flex-col", children: jsx("span", { className: "font-medium text-gray-700", children: learner.email }) })] }, learner.email)))] })] })] }) })] }) }), jsxs(Popover, { children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", className: "flex w-full items-center gap-2 bg-transparent font-normal whitespace-nowrap lg:w-auto", children: [jsx(Calendar$1, { className: "h-4 w-4" }), (dateRange === null || dateRange === void 0 ? void 0 : dateRange.from) && (dateRange === null || dateRange === void 0 ? void 0 : dateRange.to)
287337
289099
  ? `${format$1(dateRange.from, 'MMM dd')} - ${format$1(dateRange.to, 'MMM dd')}`
287338
- : t('memoryTabManageMemories.pickDateRange')] }) }), jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: jsx(Calendar, { mode: "range", selected: dateRange, onSelect: setDateRange, numberOfMonths: 2, initialFocus: true }) })] })] }) }), jsx("div", { children: jsxs("div", { className: "flex items-center justify-between gap-4", children: [jsxs("div", { className: "scrollbar-none hidden flex-1 items-center space-x-8 overflow-x-auto sm:flex", children: [visibleCategories.map((category) => (jsxs("button", { onClick: () => setSelectedCategorySlug(category.slug), className: `relative px-1 py-2 text-sm font-medium whitespace-nowrap transition-colors ${selectedCategorySlug === category.slug
289100
+ : t('memoryTabManageMemories.pickDateRange')] }) }), jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: jsx(Calendar, { mode: "range", selected: dateRange, onSelect: setDateRange, numberOfMonths: 2, initialFocus: true }) })] })] }) }), jsx("div", { children: jsxs("div", { className: "flex items-center justify-between gap-4", children: [jsxs("div", { role: "tablist", "aria-label": t('memoryTabManageMemories.memoryCategoriesAriaLabel'), className: "scrollbar-none hidden flex-1 items-center space-x-8 overflow-x-auto sm:flex", children: [visibleCategories.map((category) => (jsxs("button", { role: "tab", "aria-selected": selectedCategorySlug === category.slug, onClick: () => setSelectedCategorySlug(category.slug), className: `relative px-1 py-2 text-sm font-medium whitespace-nowrap transition-colors ${selectedCategorySlug === category.slug
287339
289101
  ? 'text-[#38A1E5]'
287340
289102
  : 'text-gray-600 hover:text-gray-900'}`, children: [category.name, selectedCategorySlug === category.slug && (jsx("div", { className: "absolute bottom-0 left-1/2 h-0.5 -translate-x-1/2 transform bg-[#38A1E5] transition-all duration-200", style: { width: `${category.name.length * 0.55}em` } }))] }, category.slug))), overflowCategories.length > 0 && (jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs("button", { className: cn('relative flex items-center gap-1 px-1 py-2 text-sm font-medium whitespace-nowrap transition-colors', overflowSelected ? 'text-[#38A1E5]' : 'text-gray-600 hover:text-gray-900'), "aria-label": t('memoryTabManageMemories.moreCategories'), children: [overflowSelected ? overflowSelected.name : t('memoryTabManageMemories.more'), jsx(ChevronDown, { className: "h-3.5 w-3.5" }), overflowSelected && (jsx("div", { className: "absolute bottom-0 left-0 h-0.5 bg-[#38A1E5] transition-all duration-200", style: {
287341
289103
  width: `${overflowSelected.name.length * 0.55}em`,
287342
289104
  } }))] }) }), jsx(DropdownMenuContent, { align: "end", children: overflowCategories.map((category) => (jsx(DropdownMenuItem, { onClick: () => setSelectedCategorySlug(category.slug), className: selectedCategorySlug === category.slug ? 'bg-gray-100' : '', children: category.name }, category.slug))) })] }))] }), jsx("div", { className: "w-full py-2 sm:hidden", children: jsxs(DropdownMenu, { open: showMobileDropdown, onOpenChange: setShowMobileDropdown, children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", className: "w-full justify-between bg-transparent", children: [selectedCategoryName, jsx(ChevronDown, { className: "h-4 w-4" })] }) }), jsx(DropdownMenuContent, { className: "w-full", children: categories.map((category) => (jsx(DropdownMenuItem, { onClick: () => {
287343
289105
  setSelectedCategorySlug(category.slug);
287344
289106
  setShowMobileDropdown(false);
287345
- }, className: selectedCategorySlug === category.slug ? 'bg-gray-100' : '', children: category.name }, category.slug))) })] }) }), jsxs(Button$1, { onClick: () => setShowManageCategories(true), size: "sm", variant: "outline", className: "shrink-0", "aria-label": t('memoryTabManageMemories.manageCategories'), children: [jsx(Tags, { className: "h-4 w-4 sm:mr-2" }), jsx("span", { className: "hidden sm:inline", children: t('memoryTabManageMemories.categories') })] }), jsxs(Button$1, { onClick: startAddMemory, size: "sm", className: "ibl-button-primary shrink-0", children: [jsx(Plus, { className: "mr-1 h-4 w-4 sm:mr-2" }), jsx("span", { className: "hidden sm:inline", children: t('memoryTabManageMemories.addMemory') }), jsx("span", { className: "sm:hidden", children: t('memoryTabManageMemories.add') })] })] }) }), jsx("div", { className: "space-y-3 px-1 sm:px-0", children: isLoadingMemories ? (jsx("div", { className: "py-8 text-center text-gray-600", children: jsx("p", { children: t('memoryTabManageMemories.loadingMemories') }) })) : (filteredMemories.map((memory) => {
289107
+ }, className: selectedCategorySlug === category.slug ? 'bg-gray-100' : '', children: category.name }, category.slug))) })] }) }), jsxs(Button$1, { onClick: () => setShowManageCategories(true), size: "sm", variant: "outline", className: "shrink-0", "aria-label": t('memoryTabManageMemories.manageCategories'), children: [jsx(Tags, { className: "h-4 w-4 sm:mr-2" }), jsx("span", { className: "hidden sm:inline", children: t('memoryTabManageMemories.categories') })] }), jsxs(Button$1, { onClick: startAddMemory, size: "sm", className: "ibl-button-primary shrink-0", children: [jsx(Plus, { className: "mr-1 h-4 w-4 sm:mr-2" }), jsx("span", { className: "hidden sm:inline", children: t('memoryTabManageMemories.addMemory') }), jsx("span", { className: "sm:hidden", children: t('memoryTabManageMemories.add') })] })] }) }), jsx("div", { role: "list", "aria-label": t('memoryTabManageMemories.savedMemoriesAriaLabel'), className: "space-y-3 px-1 sm:px-0", children: isLoadingMemories ? (jsx("div", { className: "py-8 text-center text-gray-600", children: jsx("p", { children: t('memoryTabManageMemories.loadingMemories') }) })) : (filteredMemories.map((memory) => {
287346
289108
  const timeAgo = memory.createdAt
287347
289109
  ? formatDistanceToNow(new Date(memory.createdAt), {
287348
289110
  addSuffix: true,
289111
+ locale: dateFnsLocale,
287349
289112
  })
287350
289113
  : '';
287351
289114
  const displayUser = memory.email || t('memoryTabManageMemories.unknown');
287352
- return (jsxs("div", { className: "flex items-start gap-3 rounded-lg border border-gray-200 bg-white p-3", children: [jsxs("div", { className: "flex-1", children: [(timeAgo || displayUser) && (jsxs("div", { className: "mb-2 flex items-center justify-between", children: [timeAgo && jsx("span", { className: "text-sm text-gray-600", children: timeAgo }), displayUser && (jsx("span", { className: "max-w-[100px] truncate text-sm text-gray-900 sm:max-w-[200px]", children: displayUser }))] })), jsx("div", { className: "text-sm leading-relaxed text-gray-900", children: memory.content })] }), jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button$1, { variant: "ghost", size: "sm", className: "h-6 w-6 flex-shrink-0 p-0 text-gray-600 hover:text-gray-900", children: jsx(Ellipsis, { className: "h-4 w-4" }) }) }), jsxs(DropdownMenuContent, { align: "end", children: [jsx(DropdownMenuItem, { onClick: () => startEdit(memory), children: t('memoryTabManageMemories.edit') }), jsx(DropdownMenuItem, { onClick: () => setShowDeleteConfirm(memory.id), children: t('memoryTabManageMemories.delete') })] })] })] }, memory.id));
289115
+ return (jsxs("div", { role: "listitem", className: "flex items-start gap-3 rounded-lg border border-gray-200 bg-white p-3", children: [jsxs("div", { className: "flex-1", children: [(timeAgo || displayUser) && (jsxs("div", { className: "mb-2 flex items-center justify-between", children: [timeAgo && jsx("span", { className: "text-sm text-gray-600", children: timeAgo }), displayUser && (jsx("span", { className: "max-w-[100px] truncate text-sm text-gray-900 sm:max-w-[200px]", children: displayUser }))] })), jsx("p", { className: "text-sm leading-relaxed text-gray-900", children: memory.content })] }), jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button$1, { variant: "ghost", size: "sm", "aria-label": t('memoryTabManageMemories.memoryActionsAriaLabel'), className: "h-6 w-6 flex-shrink-0 p-0 text-gray-600 hover:text-gray-900", children: jsx(Ellipsis, { className: "h-4 w-4" }) }) }), jsxs(DropdownMenuContent, { align: "end", children: [jsx(DropdownMenuItem, { onClick: () => startEdit(memory), children: t('memoryTabManageMemories.edit') }), jsx(DropdownMenuItem, { onClick: () => setShowDeleteConfirm(memory.id), children: t('memoryTabManageMemories.delete') })] })] })] }, memory.id));
287353
289116
  })) }), filteredMemories.length > 0 && selectedCategorySlug !== 'all' && (jsx("div", { className: "flex justify-end", children: jsx(Button$1, { variant: "outline", onClick: () => setShowBulkDeleteConfirm(true), children: t('memoryTabManageMemories.deleteAll') }) })), filteredMemories.length === 0 && !isLoadingMemories && (jsx("div", { className: "py-8 text-center text-gray-600", children: jsx("p", { children: t('memoryTabManageMemories.noSavedMemories') }) })), totalPages > 1 && (jsx("div", { className: "flex justify-center pt-2", children: jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isLoadingMemories }) }))] }), jsx(EditMemoryModal$1, { open: !!editingMemory, onOpenChange: (open) => !open && cancelEdit(), editContent: editContent, editCategory: editCategory, onContentChange: setEditContent, onCategoryChange: setEditCategory, onSave: saveEdit, onCancel: cancelEdit, categories: categoryNames, isSaving: isEditing }), jsx(AddMemoryModal$1, { open: showAddMemory, onOpenChange: (open) => !open && cancelAddMemory(), newMemoryContent: newMemoryContent, newMemoryCategory: newMemoryCategory, onContentChange: setNewMemoryContent, onCategoryChange: setNewMemoryCategory, onSave: saveNewMemory, onCancel: cancelAddMemory, categories: categoryNames, isSaving: isSaving }), jsx(DeleteMemoryModal, { open: !!showDeleteConfirm, onOpenChange: (open) => !open && setShowDeleteConfirm(null), onConfirm: () => showDeleteConfirm !== null && handleDeleteMemory(showDeleteConfirm), onCancel: () => setShowDeleteConfirm(null), isDeleting: isDeleting }), jsx(ManageCategoriesModal$1, { open: showManageCategories, onOpenChange: setShowManageCategories, tenantKey: tenantKey, mentorId: mentorId }), jsx(BulkDeleteMemoryModal$1, { open: showBulkDeleteConfirm, onOpenChange: setShowBulkDeleteConfirm, onConfirm: handleBulkDelete, onCancel: () => setShowBulkDeleteConfirm(false), isDeleting: isBulkDeleting, selectedCategory: selectedCategoryName })] }));
287354
289117
  }
287355
289118
 
@@ -287364,7 +289127,7 @@ function AgentMemoriesModal({ isOpen, onClose, tenantKey, username, agent, }) {
287364
289127
  return (jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: jsxs(DialogContent, { "data-testid": "agent-memories-modal", "aria-label": "agent-memories", className: "flex max-h-[90vh] w-[calc(100vw-2rem)] flex-col gap-0 overflow-hidden p-0 sm:max-w-4xl", children: [jsxs(DialogHeader, { className: "flex-shrink-0 border-b border-gray-200 px-6 py-4 pr-12", children: [jsx(DialogTitle, { className: "ibl-dialog-title", children: agent.name }), jsx(DialogDescription, { children: t('memoryAdminAgentMemoriesModal.description') })] }), jsx("div", { className: "min-h-0 flex-1 overflow-y-auto p-3 lg:p-4", children: jsx("div", { className: "space-y-8", children: jsx(ManageMemories, { tenantKey: tenantKey, username: username, mentorId: agent.unique_id }) }) })] }) }));
287365
289128
  }
287366
289129
 
287367
- const PAGE_SIZE$7 = 10;
289130
+ const PAGE_SIZE$8 = 10;
287368
289131
  /**
287369
289132
  * Agents table filtered by the same agent autocomplete the Billing tab's
287370
289133
  * Agent Limits section uses. Opening a row shows that agent's memories in a
@@ -287397,12 +289160,12 @@ function AgentMemoriesSection({ tenantKey, username }) {
287397
289160
  const { data, isLoading, isFetching, error } = useGetMentorsQuery({
287398
289161
  org: tenantKey,
287399
289162
  username,
287400
- limit: PAGE_SIZE$7,
287401
- offset: (page - 1) * PAGE_SIZE$7,
289163
+ limit: PAGE_SIZE$8,
289164
+ offset: (page - 1) * PAGE_SIZE$8,
287402
289165
  ...(agentFilter ? { uniqueId: agentFilter.value } : {}),
287403
289166
  });
287404
289167
  const agents = ((_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : []);
287405
- const totalPages = (data === null || data === void 0 ? void 0 : data.count) ? Math.ceil(data.count / PAGE_SIZE$7) : 0;
289168
+ const totalPages = (data === null || data === void 0 ? void 0 : data.count) ? Math.ceil(data.count / PAGE_SIZE$8) : 0;
287406
289169
  const isForbidden = !!error && error.status === 403;
287407
289170
  return (jsxs("div", { "data-testid": "memory-admin-agent-section", children: [jsx("div", { className: "mb-6 max-w-sm", children: jsx(SearchSelect, { labels: {
287408
289171
  // No field label — the users tab's search carries none either.
@@ -292726,7 +294489,7 @@ const AutoResizeTextarea = ({ allowEmptySubmit = false, value, onChange, onSubmi
292726
294489
  disabled, placeholder: placeholder, style: combinedStyle, className: `flex max-h-32 min-h-[36px] w-full resize-none rounded-2xl border-0 border-gray-200 bg-transparent px-4 py-2 pt-2 pb-1 text-base ring-offset-white placeholder:text-gray-400 focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-800 dark:bg-gray-950 dark:ring-offset-gray-950 dark:placeholder:text-gray-400 ${className}`, ...props }));
292727
294490
  };
292728
294491
 
292729
- const PAGE_SIZE$6 = 10;
294492
+ const PAGE_SIZE$7 = 10;
292730
294493
  const MemoryMenu = ({ onClose, mentorId, tenantKey, username }) => {
292731
294494
  const t = useT();
292732
294495
  const [page, setPage] = useState(1);
@@ -292744,7 +294507,7 @@ const MemoryMenu = ({ onClose, mentorId, tenantKey, username }) => {
292744
294507
  mentorId,
292745
294508
  params: {
292746
294509
  page,
292747
- page_size: PAGE_SIZE$6,
294510
+ page_size: PAGE_SIZE$7,
292748
294511
  my_memory: true,
292749
294512
  },
292750
294513
  }, {
@@ -297355,7 +299118,7 @@ function DeleteItemConfirm({ isOpen, onClose, tenantKey, username, datasetName,
297355
299118
  : t('benchmarksDeleteItemConfirm.delete') })] })] }) }));
297356
299119
  }
297357
299120
 
297358
- const PAGE_SIZE$5 = 10;
299121
+ const PAGE_SIZE$6 = 10;
297359
299122
  function BenchmarkItemsModal({ isOpen, onClose, tenantKey, username, datasetName }) {
297360
299123
  var _a;
297361
299124
  const t = useT();
@@ -297367,17 +299130,17 @@ function BenchmarkItemsModal({ isOpen, onClose, tenantKey, username, datasetName
297367
299130
  userId: username,
297368
299131
  datasetName,
297369
299132
  page,
297370
- limit: PAGE_SIZE$5,
299133
+ limit: PAGE_SIZE$6,
297371
299134
  });
297372
299135
  const items = (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : [];
297373
- const totalPages = evalTotalPages(data === null || data === void 0 ? void 0 : data.count, PAGE_SIZE$5);
299136
+ const totalPages = evalTotalPages(data === null || data === void 0 ? void 0 : data.count, PAGE_SIZE$6);
297374
299137
  return (jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: jsxs(DialogContent, { "aria-label": "benchmark-items", className: "w-full max-w-4xl max-h-[90vh] overflow-y-auto", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: datasetName }), jsx(DialogDescription, { children: t('benchmarksBenchmarkItemsModal.description') })] }), jsx("div", { className: "flex justify-end mb-4", children: jsxs(Button$1, { onClick: () => setShowAdd(true), className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", children: [jsx(Plus, { className: "h-4 w-4 mr-1" }), t('benchmarksBenchmarkItemsModal.addItems')] }) }), isLoading ? (jsx("div", { className: "flex justify-center items-center h-40", children: jsx(Spinner, {}) })) : (jsxs(Fragment$1, { children: [jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-4 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[45%]", children: t('benchmarksBenchmarkItemsModal.questionColumn') }), jsx("th", { className: "px-4 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[45%]", children: t('benchmarksBenchmarkItemsModal.answerColumn') }), jsx("th", { className: "px-4 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[10%]", children: t('benchmarksBenchmarkItemsModal.actionsColumn') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [items.map((item) => {
297375
299138
  var _a;
297376
299139
  return (jsxs("tr", { className: "align-top", children: [jsx("td", { className: "px-4 py-3 text-gray-900 dark:text-gray-100", children: jsx("div", { className: "line-clamp-3 break-words", children: typeof item.input === 'string' ? item.input : JSON.stringify(item.input) }) }), jsx("td", { className: "px-4 py-3 text-gray-600 dark:text-gray-300", children: jsx("div", { className: "line-clamp-3 break-words", children: (_a = item.expected_output) !== null && _a !== void 0 ? _a : jsx("span", { className: "text-gray-400", children: "\u2014" }) }) }), jsx("td", { className: "px-4 py-3 text-right", children: jsx(Button$1, { variant: "ghost", size: "sm", "aria-label": t('benchmarksBenchmarkItemsModal.deleteItemAriaLabel'), onClick: () => setDeleteItemId(item.id), children: jsx(Trash2, { className: "h-4 w-4 text-red-500" }) }) })] }, item.id));
297377
299140
  }), items.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 3, className: "px-4 py-8 text-center text-gray-500 dark:text-gray-400", children: t('benchmarksBenchmarkItemsModal.empty') }) }))] })] }) }), totalPages > 1 && (jsx("div", { className: "mt-6", children: jsx(AdvancedPagination, { totalPages: totalPages, currentPage: page, onPageChange: setPage }) }))] })), jsx(AddItemsModal, { isOpen: showAdd, onClose: () => setShowAdd(false), tenantKey: tenantKey, username: username, datasetName: datasetName }), deleteItemId && (jsx(DeleteItemConfirm, { isOpen: !!deleteItemId, onClose: () => setDeleteItemId(null), tenantKey: tenantKey, username: username, datasetName: datasetName, itemId: deleteItemId }))] }) }));
297378
299141
  }
297379
299142
 
297380
- const PAGE_SIZE$4 = 10;
299143
+ const PAGE_SIZE$5 = 10;
297381
299144
  function BenchmarksTab({ tenantKey, username, }) {
297382
299145
  var _a;
297383
299146
  const t = useT();
@@ -297389,13 +299152,13 @@ function BenchmarksTab({ tenantKey, username, }) {
297389
299152
  org: tenantKey,
297390
299153
  userId: username,
297391
299154
  page,
297392
- limit: PAGE_SIZE$4,
299155
+ limit: PAGE_SIZE$5,
297393
299156
  });
297394
299157
  const benchmarks = (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : [];
297395
299158
  const filtered = searchQuery.trim()
297396
299159
  ? benchmarks.filter((benchmark) => benchmark.name.toLowerCase().includes(searchQuery.toLowerCase()))
297397
299160
  : benchmarks;
297398
- const totalPages = evalTotalPages(data === null || data === void 0 ? void 0 : data.count, PAGE_SIZE$4);
299161
+ const totalPages = evalTotalPages(data === null || data === void 0 ? void 0 : data.count, PAGE_SIZE$5);
297399
299162
  return (jsxs("div", { className: "mt-4", children: [jsxs("div", { className: "flex justify-between items-center gap-1 flex-wrap", children: [jsxs("div", { className: "relative mb-6 max-w-sm w-full sm:w-auto", children: [jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400" }), jsx(Input, { type: "text", value: searchQuery, onChange: (event) => setSearchQuery(event.target.value), placeholder: t('benchmarksIndex.searchPlaceholder'), className: "pl-10 pr-10 focus:ring-blue-500 focus:border-blue-500 h-[35px]", "aria-label": t('benchmarksIndex.searchAriaLabel') })] }), jsx("div", { className: "mb-6", children: jsxs(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white h-[35px]", onClick: () => setShowCreate(true), children: [jsx(Plus, { className: "h-4 w-4 mr-1" }), t('benchmarksIndex.newBenchmark')] }) })] }), isLoading ? (jsx("div", { className: "flex justify-center items-center h-64", children: jsx(Spinner, {}) })) : (jsxs(Fragment$1, { children: [jsx("div", { className: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-x-auto", children: jsxs("table", { className: "w-full text-sm", children: [jsx("thead", { className: "bg-gray-50 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-600", children: jsxs("tr", { children: [jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[28%]", children: t('benchmarksIndex.nameColumn') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[36%]", children: t('benchmarksIndex.descriptionColumn') }), jsx("th", { className: "px-6 py-3 text-left font-medium text-gray-500 dark:text-gray-400 w-[20%]", children: t('benchmarksIndex.createdColumn') }), jsx("th", { className: "px-6 py-3 text-right font-medium text-gray-500 dark:text-gray-400 w-[16%]", children: t('benchmarksIndex.actionsColumn') })] }) }), jsxs("tbody", { className: "divide-y divide-gray-200 dark:divide-gray-600", children: [filtered.map((benchmark) => (jsxs("tr", { children: [jsx("td", { className: "px-6 py-4 text-gray-900 dark:text-gray-100 max-w-0", children: jsx("div", { className: "truncate font-medium", children: benchmark.name }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300 max-w-0", children: jsx("div", { className: "truncate", children: benchmark.description || '—' }) }), jsx("td", { className: "px-6 py-4 text-gray-600 dark:text-gray-300 whitespace-nowrap", children: benchmark.created_at
297400
299163
  ? formatDistanceToNow(new Date(benchmark.created_at), {
297401
299164
  addSuffix: true,
@@ -304184,19 +305947,266 @@ function useToggleTools({ activeMentorId, tenantKey, username, tools = [] }) {
304184
305947
  };
304185
305948
  }
304186
305949
 
305950
+ const DESCRIPTION_ID = 'shared-memory-delete-description';
305951
+ function SharedMemoryDeleteModal({ open, isDeleting, labels, onOpenChange, onConfirm, onCancel, }) {
305952
+ return (jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: jsxs(DialogContent, { className: "mx-4 max-w-md sm:mx-auto", "aria-describedby": DESCRIPTION_ID, "data-testid": "shared-memory-delete-modal", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { children: labels.title }) }), jsx("p", { id: DESCRIPTION_ID, className: "text-muted-foreground text-sm", children: labels.description }), jsxs("div", { className: "mt-4 flex justify-end gap-2", children: [jsx(Button$1, { variant: "outline", onClick: onCancel, children: labels.cancel }), jsx(Button$1, { className: "ibl-button-primary", onClick: onConfirm, disabled: isDeleting, "data-testid": "shared-memory-delete-confirm", children: isDeleting ? labels.deleting : labels.delete })] })] }) }));
305953
+ }
305954
+
305955
+ function asErrorLike(error) {
305956
+ return typeof error === 'object' && error !== null ? error : undefined;
305957
+ }
305958
+ // RTK also reports non-HTTP failures here as strings ('FETCH_ERROR',
305959
+ // 'TIMEOUT_ERROR', ...) — those become NaN and fall through to `unknown`.
305960
+ function toStatusCode(status) {
305961
+ if (typeof status === 'number')
305962
+ return status;
305963
+ if (typeof status === 'string')
305964
+ return Number(status);
305965
+ return undefined;
305966
+ }
305967
+ function fieldOf(data, key) {
305968
+ return typeof data === 'object' && data !== null
305969
+ ? data[key]
305970
+ : undefined;
305971
+ }
305972
+ function firstMessage(value) {
305973
+ const candidate = Array.isArray(value) ? value[0] : value;
305974
+ return typeof candidate === 'string' && candidate.trim() !== '' ? candidate : undefined;
305975
+ }
305976
+ // DRF's min-length sentence is English in every locale and the form has its
305977
+ // own translated label for that rule; any other message is passed through
305978
+ // because the form has no words for it.
305979
+ const MIN_LENGTH_RULE = /\bat least \d+ characters\b/i;
305980
+ function validationDetail(data) {
305981
+ var _a, _b, _c;
305982
+ const message = (_c = (_b = (_a = firstMessage(fieldOf(data, 'content'))) !== null && _a !== void 0 ? _a : firstMessage(fieldOf(data, 'non_field_errors'))) !== null && _b !== void 0 ? _b : firstMessage(fieldOf(data, 'error'))) !== null && _c !== void 0 ? _c : firstMessage(fieldOf(data, 'detail'));
305983
+ return message !== undefined && MIN_LENGTH_RULE.test(message) ? undefined : message;
305984
+ }
305985
+ function withDetail(kind, detail) {
305986
+ return detail === undefined ? { kind } : { kind, detail };
305987
+ }
305988
+ function classifySharedMemoryError(error) {
305989
+ const candidate = asErrorLike(error);
305990
+ const status = toStatusCode(candidate === null || candidate === void 0 ? void 0 : candidate.status);
305991
+ switch (status) {
305992
+ case 409:
305993
+ return { kind: 'duplicate' };
305994
+ case 400:
305995
+ return withDetail('validation', validationDetail(candidate === null || candidate === void 0 ? void 0 : candidate.data));
305996
+ case 403:
305997
+ return withDetail('forbidden', firstMessage(fieldOf(candidate === null || candidate === void 0 ? void 0 : candidate.data, 'error')));
305998
+ default:
305999
+ return { kind: 'unknown' };
306000
+ }
306001
+ }
306002
+
306003
+ const SHARED_MEMORY_MIN_LENGTH = 10;
306004
+ const CONTENT_ID = 'shared-memory-content';
306005
+ const FIELD_ERROR_ID = 'shared-memory-field-error';
306006
+ function SharedMemoryModal({ open, mode, initialContent, isSaving, fieldError, labels, onOpenChange, onContentChange, onSave, onCancel, }) {
306007
+ const [content, setContent] = React__default.useState(initialContent);
306008
+ const [applied, setApplied] = React__default.useState({ open, initialContent });
306009
+ // Reset during render rather than in an effect: an effect runs after the
306010
+ // first paint, so a reopened dialog would flash the previous session's text.
306011
+ if (applied.open !== open || applied.initialContent !== initialContent) {
306012
+ setApplied({ open, initialContent });
306013
+ if (open)
306014
+ setContent(initialContent);
306015
+ }
306016
+ const trimmed = content.trim();
306017
+ const tooShort = trimmed.length < SHARED_MEMORY_MIN_LENGTH;
306018
+ const handleChange = (event) => {
306019
+ setContent(event.target.value);
306020
+ onContentChange === null || onContentChange === void 0 ? void 0 : onContentChange(event.target.value);
306021
+ };
306022
+ return (jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: jsxs(DialogContent, { className: "mx-4 max-w-2xl sm:mx-auto", "aria-describedby": undefined, "data-testid": "shared-memory-modal", children: [jsx(DialogHeader, { children: jsx(DialogTitle, { className: "text-gray-700", children: mode === 'edit' ? labels.editTitle : labels.addTitle }) }), jsxs("div", { className: "mt-4 space-y-4", children: [jsxs("div", { children: [jsx("label", { htmlFor: CONTENT_ID, className: "text-sm font-medium text-gray-600", children: labels.contentLabel }), jsx(Textarea, { id: CONTENT_ID, value: content, onChange: handleChange, placeholder: labels.placeholder, rows: 5, className: "mt-1", "aria-invalid": fieldError ? true : undefined, "aria-describedby": fieldError ? FIELD_ERROR_ID : undefined, "data-testid": "shared-memory-content" }), jsx("p", { className: "mt-1 text-xs text-gray-500", children: tooShort
306023
+ ? labels.charCountMinimum(trimmed.length)
306024
+ : labels.charCount(trimmed.length) }), fieldError && (jsx("p", { id: FIELD_ERROR_ID, role: "alert", className: "mt-1 text-xs text-red-600", "data-testid": "shared-memory-field-error", children: fieldError }))] }), jsxs("div", { className: "flex justify-end gap-2", children: [jsx(Button$1, { variant: "outline", onClick: onCancel, children: labels.cancel }), jsx(Button$1, { className: "ibl-button-primary", onClick: () => onSave(trimmed), disabled: tooShort || isSaving, "data-testid": "shared-memory-save", children: isSaving ? labels.saving : labels.save })] })] })] }) }));
306025
+ }
306026
+
306027
+ const PAGE_SIZE$4 = 20;
306028
+ function timeAgo(iso, locale) {
306029
+ const date = new Date(iso);
306030
+ return Number.isNaN(date.getTime()) ? '' : formatDistanceToNow(date, { addSuffix: true, locale });
306031
+ }
306032
+ function SharedMemorySection({ tenantKey, mentorId, labels, canWrite, }) {
306033
+ var _a, _b, _c;
306034
+ const [page, setPage] = React__default.useState(1);
306035
+ const [editor, setEditor] = React__default.useState(null);
306036
+ const [fieldError, setFieldError] = React__default.useState(null);
306037
+ const [entryToDelete, setEntryToDelete] = React__default.useState(null);
306038
+ const [writeDenied, setWriteDenied] = React__default.useState(false);
306039
+ const dateFnsLocale = useDateFnsLocale();
306040
+ const { data, currentData, error, isLoading, isFetching } = useGetSharedMemoriesQuery({ org: tenantKey, mentorId, params: { page, page_size: PAGE_SIZE$4 } }, { skip: !tenantKey || !mentorId });
306041
+ const [createSharedMemory, { isLoading: isCreating }] = useCreateSharedMemoryMutation();
306042
+ const [updateSharedMemory, { isLoading: isUpdating }] = useUpdateSharedMemoryMutation();
306043
+ const [deleteSharedMemory, { isLoading: isDeleting }] = useDeleteSharedMemoryMutation();
306044
+ // RTK keeps the previous page in `data` while the next one loads; only
306045
+ // `currentData` belongs to the page being shown, so the stale page is never
306046
+ // listed (or acted on) in between. `count` stays on the last known value so
306047
+ // the pagination does not vanish during the fetch.
306048
+ const entries = (_a = currentData === null || currentData === void 0 ? void 0 : currentData.results) !== null && _a !== void 0 ? _a : [];
306049
+ const count = (_b = data === null || data === void 0 ? void 0 : data.count) !== null && _b !== void 0 ? _b : 0;
306050
+ const totalPages = Math.max(1, Math.ceil(count / PAGE_SIZE$4));
306051
+ const showLoading = isLoading || (isFetching && !currentData);
306052
+ const isListForbidden = !!error && classifySharedMemoryError(error).kind === 'forbidden';
306053
+ const canEdit = canWrite && !writeDenied && !isListForbidden;
306054
+ const closeEditor = () => {
306055
+ setEditor(null);
306056
+ setFieldError(null);
306057
+ };
306058
+ const openEditor = (next) => {
306059
+ setFieldError(null);
306060
+ setEditor(next);
306061
+ };
306062
+ const denyWrites = () => {
306063
+ toast.error(labels.errors.forbidden);
306064
+ closeEditor();
306065
+ setEntryToDelete(null);
306066
+ setWriteDenied(true);
306067
+ };
306068
+ const handleSave = async (content) => {
306069
+ if (!editor)
306070
+ return;
306071
+ try {
306072
+ if (editor.mode === 'edit') {
306073
+ await updateSharedMemory({
306074
+ org: tenantKey,
306075
+ mentorId,
306076
+ memoryId: editor.entry.id,
306077
+ content,
306078
+ }).unwrap();
306079
+ toast.success(labels.toasts.updated);
306080
+ }
306081
+ else {
306082
+ await createSharedMemory({ org: tenantKey, mentorId, content }).unwrap();
306083
+ toast.success(labels.toasts.created);
306084
+ }
306085
+ closeEditor();
306086
+ }
306087
+ catch (saveError) {
306088
+ const { kind, detail } = classifySharedMemoryError(saveError);
306089
+ if (kind === 'duplicate') {
306090
+ setFieldError(labels.errors.duplicate);
306091
+ }
306092
+ else if (kind === 'validation') {
306093
+ setFieldError(detail !== null && detail !== void 0 ? detail : labels.errors.tooShort);
306094
+ }
306095
+ else if (kind === 'forbidden') {
306096
+ denyWrites();
306097
+ }
306098
+ else {
306099
+ toast.error(labels.toasts.saveError);
306100
+ }
306101
+ }
306102
+ };
306103
+ const handleDelete = async () => {
306104
+ if (!entryToDelete)
306105
+ return;
306106
+ // Step back before the request: the delete's cache invalidation refetches
306107
+ // whichever page is subscribed, and the emptied page no longer exists.
306108
+ const nextPage = entries.length === 1 && page > 1 ? page - 1 : page;
306109
+ setPage(nextPage);
306110
+ try {
306111
+ await deleteSharedMemory({ org: tenantKey, mentorId, memoryId: entryToDelete.id }).unwrap();
306112
+ setEntryToDelete(null);
306113
+ toast.success(labels.toasts.deleted);
306114
+ }
306115
+ catch (deleteError) {
306116
+ setPage(page);
306117
+ if (classifySharedMemoryError(deleteError).kind === 'forbidden') {
306118
+ denyWrites();
306119
+ }
306120
+ else {
306121
+ toast.error(labels.toasts.deleteError);
306122
+ }
306123
+ }
306124
+ };
306125
+ return (jsxs("div", { className: "space-y-4", "data-testid": "shared-memory-section", children: [jsxs("div", { className: "flex items-start justify-between gap-4", children: [jsxs("div", { className: "min-w-0", children: [jsx("h4", { className: "text-sm font-medium text-gray-900", children: labels.title }), jsx("p", { className: "text-xs text-gray-600", children: labels.description })] }), canEdit && (jsxs(Button$1, { onClick: () => openEditor({ mode: 'add' }), size: "sm", className: "ibl-button-primary flex-shrink-0", "data-testid": "shared-memory-add-button", children: [jsx(Plus, { className: "mr-1 h-4 w-4 sm:mr-2" }), jsx("span", { className: "hidden sm:inline", children: labels.addButton }), jsx("span", { className: "sm:hidden", children: labels.addButtonShort })] }))] }), jsx("div", { className: "rounded-md border border-gray-200 bg-gray-50 p-3 text-xs text-gray-600", "data-testid": "shared-memory-info-box", children: labels.gatingHint }), showLoading ? (jsx("div", { className: "py-8 text-center text-gray-600", children: jsx("p", { children: labels.loading }) })) : isListForbidden ? (jsxs("div", { className: "flex flex-col items-center gap-2 rounded-lg border border-gray-200 bg-gray-50 px-4 py-10 text-center", "data-testid": "shared-memory-denied", children: [jsx(ShieldAlert, { className: "h-6 w-6 text-gray-400" }), jsx("p", { className: "text-sm font-medium text-gray-900", children: labels.denied.title }), jsx("p", { className: "max-w-sm text-xs text-gray-600", children: labels.denied.description })] })) : error ? (jsx("div", { className: "py-8 text-center text-gray-600", "data-testid": "shared-memory-error", children: jsx("p", { children: labels.loadError }) })) : entries.length === 0 ? (jsxs("div", { className: "rounded-lg border border-dashed border-gray-300 px-4 py-8 text-center", "data-testid": "shared-memory-empty", children: [jsx("h5", { className: "text-sm font-medium text-gray-900", children: labels.empty.title }), jsx("p", { className: "mx-auto mt-1 max-w-md text-xs text-gray-600", children: labels.empty.description })] })) : (jsx("div", { role: "list", "aria-label": labels.listAriaLabel, className: "space-y-3", children: entries.map((entry) => {
306126
+ const author = entry.created_by_full_name || entry.created_by || labels.unknownAuthor;
306127
+ const added = timeAgo(entry.created_at, dateFnsLocale);
306128
+ return (jsxs("div", { role: "listitem", className: "flex items-start gap-3 rounded-lg border border-gray-200 bg-white p-3", "data-testid": "shared-memory-entry", children: [jsxs("div", { className: "min-w-0 flex-1", children: [jsx("p", { className: "text-sm leading-relaxed whitespace-pre-wrap break-words text-gray-900", "data-testid": "shared-memory-entry-content", children: entry.content }), jsx("span", { className: "mt-2 block text-xs text-gray-500", children: added ? `${labels.addedBy(author)} · ${added}` : labels.addedBy(author) })] }), canEdit && (jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button$1, { variant: "ghost", size: "sm", className: "h-6 w-6 flex-shrink-0 p-0 text-gray-600 hover:text-gray-900", "aria-label": labels.actionsAria, children: jsx(Ellipsis, { className: "h-4 w-4" }) }) }), jsxs(DropdownMenuContent, { align: "end", children: [jsx(DropdownMenuItem, { onClick: () => openEditor({ mode: 'edit', entry }), children: labels.edit }), jsx(DropdownMenuItem, { className: "text-red-600 focus:text-red-700", onClick: () => setEntryToDelete(entry), children: labels.delete })] })] }))] }, entry.id));
306129
+ }) })), count > PAGE_SIZE$4 && (jsx("div", { className: "flex justify-center pt-2", "data-testid": "shared-memory-pagination", children: jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isFetching }) })), jsx(SharedMemoryModal, { open: editor !== null, mode: (_c = editor === null || editor === void 0 ? void 0 : editor.mode) !== null && _c !== void 0 ? _c : 'add', initialContent: (editor === null || editor === void 0 ? void 0 : editor.mode) === 'edit' ? editor.entry.content : '', isSaving: isCreating || isUpdating, fieldError: fieldError, labels: labels.modal, onOpenChange: (open) => {
306130
+ if (!open)
306131
+ closeEditor();
306132
+ }, onContentChange: () => setFieldError(null), onSave: handleSave, onCancel: closeEditor }), jsx(SharedMemoryDeleteModal, { open: entryToDelete !== null, isDeleting: isDeleting, labels: labels.deleteModal, onOpenChange: (open) => {
306133
+ if (!open)
306134
+ setEntryToDelete(null);
306135
+ }, onConfirm: handleDelete, onCancel: () => setEntryToDelete(null) })] }));
306136
+ }
306137
+
304187
306138
  const AGENT_MEMORY_TAB_LABELS = {
304188
306139
  header: {
304189
306140
  title: 'Memory',
304190
306141
  description: 'Configure memory settings for your agent.',
304191
306142
  },
304192
306143
  toggle: {
304193
- label: 'Enable Memory',
304194
- description: 'Allow this agent to remember and reference information from past conversations.',
306144
+ label: 'Long-term Memory',
306145
+ description: "Let this agent remember useful details from past conversations — like a returning colleague — so people don't have to repeat themselves. When on, review what it remembers about each person and add shared memories below.",
306146
+ offHint: 'Turn it on to let this agent remember details across conversations.',
306147
+ },
306148
+ subTabs: {
306149
+ ariaLabel: 'Memory sections',
306150
+ personal: 'Personal Memories',
306151
+ shared: 'Shared Memory',
306152
+ },
306153
+ sharedMemory: {
306154
+ title: 'Shared Memory',
306155
+ description: 'Facts, rules, and background this agent should always keep in mind. Every person who chats with this agent gets these memories.',
306156
+ gatingHint: 'Shared memories reach chats only while Long-term Memory is on for this agent and the person chatting has memory turned on.',
306157
+ addButton: 'Add Shared Memory',
306158
+ addButtonShort: 'Add',
306159
+ listAriaLabel: 'Shared memories',
306160
+ actionsAria: 'Shared memory actions',
306161
+ edit: 'Edit',
306162
+ delete: 'Delete',
306163
+ loading: 'Loading shared memories...',
306164
+ loadError: "Couldn't load this agent's shared memories. Please try again.",
306165
+ unknownAuthor: 'Unknown',
306166
+ addedBy: (name) => `Added by ${name}`,
306167
+ empty: {
306168
+ title: 'No Shared Memories Yet',
306169
+ description: 'Add anything this agent should always keep in mind — how to behave, key facts, or house rules. Every person who chats with this agent gets these memories.',
306170
+ },
306171
+ denied: {
306172
+ title: 'No Access to Shared Memory',
306173
+ description: "You don't have permission to view this agent's shared memories. Ask an administrator for access.",
306174
+ },
306175
+ modal: {
306176
+ addTitle: 'Add Shared Memory',
306177
+ editTitle: 'Edit Shared Memory',
306178
+ contentLabel: 'Memory',
306179
+ placeholder: 'Write what this agent should always keep in mind...',
306180
+ charCountMinimum: (count) => `${count}/10 characters minimum`,
306181
+ charCount: (count) => `${count} characters`,
306182
+ save: 'Save',
306183
+ saving: 'Saving...',
306184
+ cancel: 'Cancel',
306185
+ },
306186
+ deleteModal: {
306187
+ title: 'Delete Shared Memory',
306188
+ description: 'Are you sure you want to delete this shared memory? Everyone who chats with this agent will stop seeing it. This action cannot be undone.',
306189
+ delete: 'Delete',
306190
+ deleting: 'Deleting...',
306191
+ cancel: 'Cancel',
306192
+ },
306193
+ errors: {
306194
+ duplicate: 'This shared memory already exists.',
306195
+ tooShort: 'A shared memory must be at least 10 characters.',
306196
+ forbidden: "You don't have permission to change this agent's shared memories.",
306197
+ },
306198
+ toasts: {
306199
+ created: 'Shared memory added',
306200
+ updated: 'Shared memory updated',
306201
+ deleted: 'Shared memory deleted',
306202
+ saveError: "Couldn't save shared memory",
306203
+ deleteError: "Couldn't delete shared memory",
306204
+ },
304195
306205
  },
304196
306206
  toasts: {
304197
- enableSuccess: 'Memory enabled',
304198
- disableSuccess: 'Memory disabled',
304199
- toggleError: 'Failed to update memory setting',
306207
+ enableSuccess: 'Memory turned on',
306208
+ disableSuccess: 'Memory turned off',
306209
+ toggleError: "Couldn't update memory setting",
304200
306210
  },
304201
306211
  };
304202
306212
  function buildMemoryTabLabels(t) {
@@ -304208,6 +306218,65 @@ function buildMemoryTabLabels(t) {
304208
306218
  toggle: {
304209
306219
  label: t('memoryTabLabels.toggle.label'),
304210
306220
  description: t('memoryTabLabels.toggle.description'),
306221
+ offHint: t('memoryTabLabels.toggle.offHint'),
306222
+ },
306223
+ subTabs: {
306224
+ ariaLabel: t('memoryTabLabels.subTabs.ariaLabel'),
306225
+ personal: t('memoryTabLabels.subTabs.personal'),
306226
+ shared: t('memoryTabLabels.subTabs.shared'),
306227
+ },
306228
+ sharedMemory: {
306229
+ title: t('memoryTabLabels.sharedMemory.title'),
306230
+ description: t('memoryTabLabels.sharedMemory.description'),
306231
+ gatingHint: t('memoryTabLabels.sharedMemory.gatingHint'),
306232
+ addButton: t('memoryTabLabels.sharedMemory.addButton'),
306233
+ addButtonShort: t('memoryTabLabels.sharedMemory.addButtonShort'),
306234
+ listAriaLabel: t('memoryTabLabels.sharedMemory.listAriaLabel'),
306235
+ actionsAria: t('memoryTabLabels.sharedMemory.actionsAria'),
306236
+ edit: t('memoryTabLabels.sharedMemory.edit'),
306237
+ delete: t('memoryTabLabels.sharedMemory.delete'),
306238
+ loading: t('memoryTabLabels.sharedMemory.loading'),
306239
+ loadError: t('memoryTabLabels.sharedMemory.loadError'),
306240
+ unknownAuthor: t('memoryTabLabels.sharedMemory.unknownAuthor'),
306241
+ addedBy: (name) => t('memoryTabLabels.sharedMemory.addedBy', { name }),
306242
+ empty: {
306243
+ title: t('memoryTabLabels.sharedMemory.empty.title'),
306244
+ description: t('memoryTabLabels.sharedMemory.empty.description'),
306245
+ },
306246
+ denied: {
306247
+ title: t('memoryTabLabels.sharedMemory.denied.title'),
306248
+ description: t('memoryTabLabels.sharedMemory.denied.description'),
306249
+ },
306250
+ modal: {
306251
+ addTitle: t('memoryTabLabels.sharedMemory.modal.addTitle'),
306252
+ editTitle: t('memoryTabLabels.sharedMemory.modal.editTitle'),
306253
+ contentLabel: t('memoryTabLabels.sharedMemory.modal.contentLabel'),
306254
+ placeholder: t('memoryTabLabels.sharedMemory.modal.placeholder'),
306255
+ charCountMinimum: (count) => t('memoryTabLabels.sharedMemory.modal.charCountMinimum', { count }),
306256
+ charCount: (count) => t('memoryTabLabels.sharedMemory.modal.charCount', { count }),
306257
+ save: t('memoryTabLabels.sharedMemory.modal.save'),
306258
+ saving: t('memoryTabLabels.sharedMemory.modal.saving'),
306259
+ cancel: t('memoryTabLabels.sharedMemory.modal.cancel'),
306260
+ },
306261
+ deleteModal: {
306262
+ title: t('memoryTabLabels.sharedMemory.deleteModal.title'),
306263
+ description: t('memoryTabLabels.sharedMemory.deleteModal.description'),
306264
+ delete: t('memoryTabLabels.sharedMemory.deleteModal.delete'),
306265
+ deleting: t('memoryTabLabels.sharedMemory.deleteModal.deleting'),
306266
+ cancel: t('memoryTabLabels.sharedMemory.deleteModal.cancel'),
306267
+ },
306268
+ errors: {
306269
+ duplicate: t('memoryTabLabels.sharedMemory.errors.duplicate'),
306270
+ tooShort: t('memoryTabLabels.sharedMemory.errors.tooShort'),
306271
+ forbidden: t('memoryTabLabels.sharedMemory.errors.forbidden'),
306272
+ },
306273
+ toasts: {
306274
+ created: t('memoryTabLabels.sharedMemory.toasts.created'),
306275
+ updated: t('memoryTabLabels.sharedMemory.toasts.updated'),
306276
+ deleted: t('memoryTabLabels.sharedMemory.toasts.deleted'),
306277
+ saveError: t('memoryTabLabels.sharedMemory.toasts.saveError'),
306278
+ deleteError: t('memoryTabLabels.sharedMemory.toasts.deleteError'),
306279
+ },
304211
306280
  },
304212
306281
  toasts: {
304213
306282
  enableSuccess: t('memoryTabLabels.toasts.enableSuccess'),
@@ -304223,11 +306292,86 @@ function resolveMemoryTabLabels(override, t) {
304223
306292
  return deepMerge(base, override);
304224
306293
  }
304225
306294
 
304226
- function AgentMemoryTab({ labels: labelsOverride } = {}) {
304227
- const { tenantKey, mentorId, username } = useAgentSettings();
306295
+ function useMemoryCapability({ tenantKey, mentorId, username, labels, enableRBAC = false, rbacPermissions = {}, }) {
306296
+ const identityReady = Boolean(tenantKey && mentorId && username);
306297
+ const { data: mentorSettings, isLoading } = useGetMentorSettingsQuery({
306298
+ mentor: mentorId,
306299
+ org: tenantKey,
306300
+ // @ts-expect-error userId is not in the typed args but the API accepts it
306301
+ userId: username,
306302
+ }, { skip: !identityReady });
306303
+ const serverEnabled = (mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.enable_memory_component) === true;
306304
+ // Optimistic local mirror of the flag so the switch responds instantly;
306305
+ // rolled back if the settings PATCH fails.
306306
+ const [enabled, setEnabled] = React__default.useState(serverEnabled);
306307
+ React__default.useEffect(() => {
306308
+ setEnabled(serverEnabled);
306309
+ }, [serverEnabled]);
306310
+ const [editMentor, { isLoading: isToggling }] = useEditMentorMutation();
306311
+ // The permission-check endpoint does not expose the shared-memory (AgentMemory) actions,
306312
+ // so the mentor's own `write` action stands in for them: Limited Editor has
306313
+ // it, Limited Viewer does not. Like the grader tab, it is only enforced when
306314
+ // the tree actually contains the mentor entry; otherwise everything stays
306315
+ // writable and the server's 403s remain the source of truth. While the
306316
+ // settings load the mentor id the tree is keyed by is unknown, so writes are
306317
+ // withheld rather than briefly granted to everyone.
306318
+ const mentorDbId = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor_id;
306319
+ const mentorEntry = rbacPermissions[`/mentors/${mentorDbId}/`];
306320
+ const canWrite = !isLoading &&
306321
+ (!mentorEntry ||
306322
+ checkRbacPermission(rbacPermissions, `/mentors/${mentorDbId}/#write`, enableRBAC));
306323
+ const toggle = async (checked) => {
306324
+ setEnabled(checked); // optimistic
306325
+ const formData = { enable_memory_component: checked };
306326
+ try {
306327
+ await editMentor({
306328
+ mentor: mentorId,
306329
+ org: tenantKey,
306330
+ formData,
306331
+ // @ts-expect-error userId is not in the typed args but the API accepts it
306332
+ userId: username,
306333
+ }).unwrap();
306334
+ toast.success(checked ? labels.toasts.enableSuccess : labels.toasts.disableSuccess);
306335
+ }
306336
+ catch (error) {
306337
+ setEnabled(!checked); // roll back
306338
+ console.error('[AgentMemoryTab] toggle memory error', error);
306339
+ toast.error(labels.toasts.toggleError);
306340
+ }
306341
+ };
306342
+ return { enabled, isToggling, toggle, mentorDbId, canWrite, isLoading };
306343
+ }
306344
+
306345
+ const MEMORY_SUB_TABS = {
306346
+ personal: 'personal',
306347
+ shared: 'shared',
306348
+ };
306349
+ /**
306350
+ * Standalone top-level tab for the agent's memory: the in-tab toggle flips
306351
+ * `enable_memory_component` on the agent, and the gated content splits into
306352
+ * two sub-tabs — Personal Memories (what the agent remembered per person) and
306353
+ * Shared Memory (memories every chat gets). Both sit under the same gate
306354
+ * because the backend injects neither into chats while that flag is off.
306355
+ */
306356
+ function AgentMemoryTab({ labels: labelsOverride, tenantKey: tenantKeyProp, mentorId: mentorIdProp, username: usernameProp, enableRBAC: enableRBACProp, rbacPermissions: rbacPermissionsProp, }) {
306357
+ var _a, _b, _c, _d, _e;
306358
+ const ctx = useAgentSettingsOptional();
306359
+ const tenantKey = (_a = tenantKeyProp !== null && tenantKeyProp !== void 0 ? tenantKeyProp : ctx === null || ctx === void 0 ? void 0 : ctx.tenantKey) !== null && _a !== void 0 ? _a : '';
306360
+ const mentorId = (_b = mentorIdProp !== null && mentorIdProp !== void 0 ? mentorIdProp : ctx === null || ctx === void 0 ? void 0 : ctx.mentorId) !== null && _b !== void 0 ? _b : '';
306361
+ const username = (_c = usernameProp !== null && usernameProp !== void 0 ? usernameProp : ctx === null || ctx === void 0 ? void 0 : ctx.username) !== null && _c !== void 0 ? _c : '';
306362
+ const enableRBAC = (_d = enableRBACProp !== null && enableRBACProp !== void 0 ? enableRBACProp : ctx === null || ctx === void 0 ? void 0 : ctx.enableRBAC) !== null && _d !== void 0 ? _d : false;
306363
+ const rbacPermissions = (_e = rbacPermissionsProp !== null && rbacPermissionsProp !== void 0 ? rbacPermissionsProp : ctx === null || ctx === void 0 ? void 0 : ctx.rbacPermissions) !== null && _e !== void 0 ? _e : {};
304228
306364
  const t = useT();
304229
306365
  const labels = React__default.useMemo(() => resolveMemoryTabLabels(labelsOverride, t), [labelsOverride, t]);
304230
- return (jsxs(Fragment$1, { children: [jsx("div", { className: "flex h-[73px] flex-shrink-0 items-center border-b border-gray-200 bg-white p-4 lg:block", children: jsxs("div", { children: [jsx("h3", { className: "mb-1 text-base font-medium text-gray-900", children: labels.header.title }), jsx("p", { className: "text-xs text-gray-600", children: labels.header.description })] }) }), jsx("div", { className: "flex-1 space-y-6 overflow-y-auto p-3 lg:p-4", children: jsx("div", { className: "space-y-8", children: jsx(ManageMemories, { tenantKey: tenantKey, username: username, mentorId: mentorId }) }) })] }));
306366
+ const { enabled, isToggling, toggle, canWrite, isLoading } = useMemoryCapability({
306367
+ tenantKey,
306368
+ mentorId,
306369
+ username,
306370
+ labels,
306371
+ enableRBAC,
306372
+ rbacPermissions,
306373
+ });
306374
+ return (jsxs(Fragment$1, { children: [jsx("div", { className: "flex h-[73px] flex-shrink-0 items-center border-b border-gray-200 bg-white p-4 lg:block", children: jsxs("div", { children: [jsx("h3", { className: "mb-1 text-base font-medium text-gray-900", children: labels.header.title }), jsx("p", { className: "text-xs text-gray-600", children: labels.header.description })] }) }), jsx("div", { className: "flex-1 space-y-4 p-3 lg:p-4", style: { overflowY: 'auto', overflowX: 'hidden' }, "data-testid": "memory-tab-body", children: isLoading ? (jsx("div", { className: "flex items-center justify-center py-12", "data-testid": "memory-tab-loading", children: jsx(Spinner, {}) })) : (jsx(CapabilityGate, { title: labels.toggle.label, description: labels.toggle.description, offHint: labels.toggle.offHint, enabled: enabled, onToggle: toggle, disabled: isToggling || !canWrite, ariaLabel: labels.toggle.label, toggleTestId: "memory-capability-toggle", children: jsxs(Tabs, { defaultValue: MEMORY_SUB_TABS.personal, className: "w-full", children: [jsxs(TabsList, { "aria-label": labels.subTabs.ariaLabel, "data-testid": "memory-sub-tabs", children: [jsx(TabsTrigger, { value: MEMORY_SUB_TABS.personal, "data-testid": "memory-sub-tab-personal", children: labels.subTabs.personal }), jsx(TabsTrigger, { value: MEMORY_SUB_TABS.shared, "data-testid": "memory-sub-tab-shared", children: labels.subTabs.shared })] }), jsx(TabsContent, { value: MEMORY_SUB_TABS.personal, className: "space-y-4", children: jsx(ManageMemories, { tenantKey: tenantKey, username: username, mentorId: mentorId }) }), jsx(TabsContent, { value: MEMORY_SUB_TABS.shared, className: "space-y-4", children: jsx(SharedMemorySection, { tenantKey: tenantKey, mentorId: mentorId, labels: labels.sharedMemory, canWrite: canWrite }, `${tenantKey}:${mentorId}`) })] }) })) })] }));
304231
306375
  }
304232
306376
 
304233
306377
  /**
@@ -322254,5 +324398,5 @@ var disclaimerModal = /*#__PURE__*/Object.freeze({
322254
324398
  DisclaimerModal: DisclaimerModal
322255
324399
  });
322256
324400
 
322257
- export { AGENT_ACCESS_TAB_LABELS, AGENT_ANALYTICS_TAB_LABELS, AGENT_API_TAB_LABELS, AGENT_DATASETS_TAB_LABELS, AGENT_DISCLAIMERS_TAB_LABELS, AGENT_EMBED_TAB_LABELS, AGENT_EVALUATION_TAB_LABELS, AGENT_GRADER_TAB_LABELS, AGENT_HISTORY_TAB_LABELS, AGENT_HUMAN_SUPPORT_TAB_LABELS, AGENT_LLM_TAB_LABELS, AGENT_LTI_TAB_LABELS, AGENT_MEMORY_TAB_LABELS, AGENT_PICKER_LABELS, AGENT_PRIVACY_TAB_LABELS, AGENT_PROMPTS_TAB_LABELS, AGENT_SAFETY_TAB_LABELS, AGENT_SCREENSHARE_TAB_LABELS, AGENT_SEARCH_LABELS, AGENT_SETTINGS_TAB_LABELS, AGENT_SKILLS_TAB_LABELS, AGENT_SPEND_CAPS_TAB_LABELS, AGENT_TASKS_TAB_LABELS, AGENT_TOOLS_TAB_LABELS, AGENT_VOICE_TAB_LABELS, AccessibilityFab, AccessibilityProvider, AccessibilityToolbar, Account, AgentAccessTab, AgentAnalyticsTab, AgentApiTab, AgentCard, AgentDatasetsTab, AgentDisclaimersTab, AgentEmbedTab, AgentEmptyState, AgentEvaluationTab, AgentGraderTab, AgentHistoryTab, AgentHumanSupportTab, AgentLLMTab, AgentLtiTab, AgentMemoryTab, AgentPrivacyTab, AgentPromptsTab, AgentSafetyTab, AgentScreenShareTab, AgentSearch, AgentSearchFilters, AgentSearchInput, AgentSettingsProvider, AgentSettingsTab, AgentSkillsTab, AgentSpendCapsTab, AgentTasksTab, AgentToolsTab, AgentVoiceTab, AppSidebar, CATALOGS, Chat, ClientErrorPage, ConversationStarters$1 as ConversationStarters, CopyButton, CopyMentorModal, CourseBox, CourseContentLayout, CourseContentTabPage, CreatePathwayModal, CredentialDetailModal, CredentialMiniBox, DEFAULT_ANALYTICS_HUB_TABS, DEFAULT_LOCALE, DRAGGABLE_SNAP_TRANSITION, DeleteMentorModal, EMPTY_PROGRAM_SETTINGS_FORM, EdxIframe, ErrorPage, FloatingAccessibilityButton, GRADING_TOOL_NAME, GreetingMethod, LLMProviderModal, LocalModelRow, McpTab, MediaBox, MentorSelectionGrid, NavBar, OrganizationTab, PLATFORM_SIDEBAR_FLYOUT_ITEM_COLOR, PLATFORM_SIDEBAR_FLYOUT_TITLE_COLOR, PLATFORM_SIDEBAR_NAV_ACTIVE_BG_OPEN, PLATFORM_SIDEBAR_NAV_MUTED, PathwayDetailModal, PlatformAccountSheet, PlatformSidebar, PlatformSidebarCollapsedLabelFlyout, PlatformSidebarCollapsedNavFlyout, PlatformSidebarFooter, PlatformSidebarNavDivider, PlatformSidebarNavSection, PlatformSidebarSubNavItem, ProfileInfoCards, ProfileTabs, ProgramDetailModal, ProjectsSidebarDropdown, SPEND_CAPS_SUB_TABS, SUPPORTED_LOCALES, SidebarInset, SidebarProvider, SidebarTrigger, SpendCapUsage, SsoLogin, StarButton, UserProfileDropdown, UserProfileModal, WebContainersI18nProvider, formatDateString, getCatalog, getProviderName, initializeLocalStorageWithObject, isValidLocale, resolveAgentPickerLabels, resolveAgentSearchLabels, resolveLLMTabLabels, resolveSettingsTabLabels, useAccessibility, useAgentSearch, useAgentSearchWithPagination, useAgentSettings, useAgentStar, useDraggablePosition, useGetChatDetails, usePlatformSidebarFooterActions, usePlatformSidebarNavCallback, useSidebar, useT, useTimeTracker, useToggleTools, useWebContainersI18n, useWebContainersLocale };
324401
+ export { AGENT_ACCESS_TAB_LABELS, AGENT_ANALYTICS_TAB_LABELS, AGENT_API_TAB_LABELS, AGENT_DATASETS_TAB_LABELS, AGENT_DISCLAIMERS_TAB_LABELS, AGENT_EMBED_TAB_LABELS, AGENT_EVALUATION_TAB_LABELS, AGENT_GRADER_TAB_LABELS, AGENT_HISTORY_TAB_LABELS, AGENT_HUMAN_SUPPORT_TAB_LABELS, AGENT_LLM_TAB_LABELS, AGENT_LTI_TAB_LABELS, AGENT_MEMORY_TAB_LABELS, AGENT_PICKER_LABELS, AGENT_PRIVACY_TAB_LABELS, AGENT_PROMPTS_TAB_LABELS, AGENT_SAFETY_TAB_LABELS, AGENT_SCREENSHARE_TAB_LABELS, AGENT_SEARCH_LABELS, AGENT_SETTINGS_TAB_LABELS, AGENT_SKILLS_TAB_LABELS, AGENT_SPEND_CAPS_TAB_LABELS, AGENT_TASKS_TAB_LABELS, AGENT_TOOLS_TAB_LABELS, AGENT_VOICE_TAB_LABELS, AccessibilityFab, AccessibilityProvider, AccessibilityToolbar, Account, AgentAccessTab, AgentAnalyticsTab, AgentApiTab, AgentCard, AgentDatasetsTab, AgentDisclaimersTab, AgentEmbedTab, AgentEmptyState, AgentEvaluationTab, AgentGraderTab, AgentHistoryTab, AgentHumanSupportTab, AgentLLMTab, AgentLtiTab, AgentMemoryTab, AgentPrivacyTab, AgentPromptsTab, AgentSafetyTab, AgentScreenShareTab, AgentSearch, AgentSearchFilters, AgentSearchInput, AgentSettingsProvider, AgentSettingsTab, AgentSkillsTab, AgentSpendCapsTab, AgentTasksTab, AgentToolsTab, AgentVoiceTab, AppSidebar, CATALOGS, Chat, ClientErrorPage, ConversationStarters$1 as ConversationStarters, CopyButton, CopyMentorModal, CourseBox, CourseContentLayout, CourseContentTabPage, CreatePathwayModal, CredentialDetailModal, CredentialMiniBox, DEFAULT_ANALYTICS_HUB_TABS, DEFAULT_LOCALE, DRAGGABLE_SNAP_TRANSITION, DeleteMentorModal, EMPTY_PROGRAM_SETTINGS_FORM, EdxIframe, ErrorPage, FloatingAccessibilityButton, GRADING_TOOL_NAME, GreetingMethod, LLMProviderModal, LocalModelRow, MEMORY_SUB_TABS, McpTab, MediaBox, MentorSelectionGrid, NavBar, OrganizationTab, PLATFORM_SIDEBAR_FLYOUT_ITEM_COLOR, PLATFORM_SIDEBAR_FLYOUT_TITLE_COLOR, PLATFORM_SIDEBAR_NAV_ACTIVE_BG_OPEN, PLATFORM_SIDEBAR_NAV_MUTED, PathwayDetailModal, PlatformAccountSheet, PlatformSidebar, PlatformSidebarCollapsedLabelFlyout, PlatformSidebarCollapsedNavFlyout, PlatformSidebarFooter, PlatformSidebarNavDivider, PlatformSidebarNavSection, PlatformSidebarSubNavItem, ProfileInfoCards, ProfileTabs, ProgramDetailModal, ProjectsSidebarDropdown, SPEND_CAPS_SUB_TABS, SUPPORTED_LOCALES, SidebarInset, SidebarProvider, SidebarTrigger, SpendCapUsage, SsoLogin, StarButton, UserProfileDropdown, UserProfileModal, WebContainersI18nProvider, formatDateString, getCatalog, getProviderName, initializeLocalStorageWithObject, isValidLocale, resolveAgentPickerLabels, resolveAgentSearchLabels, resolveLLMTabLabels, resolveSettingsTabLabels, useAccessibility, useAgentSearch, useAgentSearchWithPagination, useAgentSettings, useAgentStar, useDraggablePosition, useGetChatDetails, usePlatformSidebarFooterActions, usePlatformSidebarNavCallback, useSidebar, useT, useTimeTracker, useToggleTools, useWebContainersI18n, useWebContainersLocale };
322258
324402
  //# sourceMappingURL=index.esm.js.map