@iblai/iblai-js 2.33.2 → 2.34.0
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$
|
|
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$
|
|
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$
|
|
2360
|
-
formatLong: formatLong,
|
|
2361
|
-
formatRelative: formatRelative$
|
|
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
|
*/
|
|
@@ -98652,6 +98699,10 @@ var embedTabLabels$3 = {
|
|
|
98652
98699
|
label: "Show Voice Record",
|
|
98653
98700
|
tooltip: "Show Voice Recording Options in Chat Interface"
|
|
98654
98701
|
},
|
|
98702
|
+
allowMentorSelection: {
|
|
98703
|
+
label: "Allow Agent Selection",
|
|
98704
|
+
tooltip: "Let signed-in visitors open Explore from the embed and switch to another agent."
|
|
98705
|
+
},
|
|
98655
98706
|
shareableLink: {
|
|
98656
98707
|
label: "Shareable Link",
|
|
98657
98708
|
tooltip: "Generate a link users can use to chat with this agent anonymously"
|
|
@@ -99285,13 +99336,72 @@ var memoryTabLabels$3 = {
|
|
|
99285
99336
|
description: "Configure memory settings for your agent."
|
|
99286
99337
|
},
|
|
99287
99338
|
toggle: {
|
|
99288
|
-
label: "
|
|
99289
|
-
description: "
|
|
99339
|
+
label: "Long-term Memory",
|
|
99340
|
+
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.",
|
|
99341
|
+
offHint: "Turn it on to let this agent remember details across conversations."
|
|
99342
|
+
},
|
|
99343
|
+
subTabs: {
|
|
99344
|
+
ariaLabel: "Memory sections",
|
|
99345
|
+
personal: "Personal Memories",
|
|
99346
|
+
shared: "Shared Memory"
|
|
99347
|
+
},
|
|
99348
|
+
sharedMemory: {
|
|
99349
|
+
title: "Shared Memory",
|
|
99350
|
+
description: "Facts, rules, and background this agent should always keep in mind. Every person who chats with this agent gets these memories.",
|
|
99351
|
+
gatingHint: "Shared memories reach chats only while Long-term Memory is on for this agent and the person chatting has memory turned on.",
|
|
99352
|
+
addButton: "Add Shared Memory",
|
|
99353
|
+
addButtonShort: "Add",
|
|
99354
|
+
listAriaLabel: "Shared memories",
|
|
99355
|
+
actionsAria: "Shared memory actions",
|
|
99356
|
+
edit: "Edit",
|
|
99357
|
+
"delete": "Delete",
|
|
99358
|
+
loading: "Loading shared memories...",
|
|
99359
|
+
loadError: "Couldn't load this agent's shared memories. Please try again.",
|
|
99360
|
+
unknownAuthor: "Unknown",
|
|
99361
|
+
addedBy: "Added by {name}",
|
|
99362
|
+
empty: {
|
|
99363
|
+
title: "No Shared Memories Yet",
|
|
99364
|
+
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."
|
|
99365
|
+
},
|
|
99366
|
+
denied: {
|
|
99367
|
+
title: "No Access to Shared Memory",
|
|
99368
|
+
description: "You don't have permission to view this agent's shared memories. Ask an administrator for access."
|
|
99369
|
+
},
|
|
99370
|
+
modal: {
|
|
99371
|
+
addTitle: "Add Shared Memory",
|
|
99372
|
+
editTitle: "Edit Shared Memory",
|
|
99373
|
+
contentLabel: "Memory",
|
|
99374
|
+
placeholder: "Write what this agent should always keep in mind...",
|
|
99375
|
+
charCountMinimum: "{count}/10 characters minimum",
|
|
99376
|
+
charCount: "{count} characters",
|
|
99377
|
+
save: "Save",
|
|
99378
|
+
saving: "Saving...",
|
|
99379
|
+
cancel: "Cancel"
|
|
99380
|
+
},
|
|
99381
|
+
deleteModal: {
|
|
99382
|
+
title: "Delete Shared Memory",
|
|
99383
|
+
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.",
|
|
99384
|
+
"delete": "Delete",
|
|
99385
|
+
deleting: "Deleting...",
|
|
99386
|
+
cancel: "Cancel"
|
|
99387
|
+
},
|
|
99388
|
+
errors: {
|
|
99389
|
+
duplicate: "This shared memory already exists.",
|
|
99390
|
+
tooShort: "A shared memory must be at least 10 characters.",
|
|
99391
|
+
forbidden: "You don't have permission to change this agent's shared memories."
|
|
99392
|
+
},
|
|
99393
|
+
toasts: {
|
|
99394
|
+
created: "Shared memory added",
|
|
99395
|
+
updated: "Shared memory updated",
|
|
99396
|
+
deleted: "Shared memory deleted",
|
|
99397
|
+
saveError: "Couldn't save shared memory",
|
|
99398
|
+
deleteError: "Couldn't delete shared memory"
|
|
99399
|
+
}
|
|
99290
99400
|
},
|
|
99291
99401
|
toasts: {
|
|
99292
|
-
enableSuccess: "Memory
|
|
99293
|
-
disableSuccess: "Memory
|
|
99294
|
-
toggleError: "
|
|
99402
|
+
enableSuccess: "Memory turned on",
|
|
99403
|
+
disableSuccess: "Memory turned off",
|
|
99404
|
+
toggleError: "Couldn't update memory setting"
|
|
99295
99405
|
}
|
|
99296
99406
|
};
|
|
99297
99407
|
var memoryTabLearnersMemories$3 = {
|
|
@@ -99355,7 +99465,10 @@ var memoryTabManageMemories$3 = {
|
|
|
99355
99465
|
memoryUpdatedSuccessfully: "Memory updated successfully",
|
|
99356
99466
|
failedToUpdateMemory: "Failed to update memory",
|
|
99357
99467
|
memoryCreatedSuccessfully: "Memory created successfully",
|
|
99358
|
-
failedToCreateMemory: "Failed to create memory"
|
|
99468
|
+
failedToCreateMemory: "Failed to create memory",
|
|
99469
|
+
savedMemoriesAriaLabel: "Saved memories",
|
|
99470
|
+
memoryActionsAriaLabel: "Memory actions",
|
|
99471
|
+
memoryCategoriesAriaLabel: "Memory categories"
|
|
99359
99472
|
};
|
|
99360
99473
|
var memoryTabSavedMemoriesModal$3 = {
|
|
99361
99474
|
savedMemories: "Saved Memories",
|
|
@@ -101224,6 +101337,9 @@ var tabsEmbedTab$3 = {
|
|
|
101224
101337
|
moreInfoShowVoiceRecord: "More info about show voice record",
|
|
101225
101338
|
showVoiceRecordEnabled: "Show voice record enabled",
|
|
101226
101339
|
showVoiceRecordDisabled: "Show voice record disabled",
|
|
101340
|
+
moreInfoAllowMentorSelection: "More info about agent selection",
|
|
101341
|
+
allowMentorSelectionEnabled: "Agent selection enabled",
|
|
101342
|
+
allowMentorSelectionDisabled: "Agent selection disabled",
|
|
101227
101343
|
moreInfoStarterPrompts: "More info about starter prompts",
|
|
101228
101344
|
moreInfoShareableLink: "More info about shareable link",
|
|
101229
101345
|
shareableLinkEnabled: "Generate / Revoke shareable link enabled",
|
|
@@ -106550,6 +106666,10 @@ var embedTabLabels$2 = {
|
|
|
106550
106666
|
label: "Afficher l'enregistrement vocal",
|
|
106551
106667
|
tooltip: "Afficher les options d'enregistrement vocal dans l'interface de chat"
|
|
106552
106668
|
},
|
|
106669
|
+
allowMentorSelection: {
|
|
106670
|
+
label: "Autoriser la sélection d'agent",
|
|
106671
|
+
tooltip: "Permettre aux visiteurs connectés d'ouvrir Explorer depuis l'intégration et de passer à un autre agent."
|
|
106672
|
+
},
|
|
106553
106673
|
shareableLink: {
|
|
106554
106674
|
label: "Lien partageable",
|
|
106555
106675
|
tooltip: "Générer un lien que les utilisateurs peuvent utiliser pour discuter avec cet agent de manière anonyme"
|
|
@@ -107183,13 +107303,72 @@ var memoryTabLabels$2 = {
|
|
|
107183
107303
|
description: "Configurez les paramètres de mémoire de votre agent."
|
|
107184
107304
|
},
|
|
107185
107305
|
toggle: {
|
|
107186
|
-
label: "
|
|
107187
|
-
description: "
|
|
107306
|
+
label: "Mémoire à long terme",
|
|
107307
|
+
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.",
|
|
107308
|
+
offHint: "Activez-la pour que cet agent retienne des détails d'une conversation à l'autre."
|
|
107309
|
+
},
|
|
107310
|
+
subTabs: {
|
|
107311
|
+
ariaLabel: "Sections de la mémoire",
|
|
107312
|
+
personal: "Souvenirs personnels",
|
|
107313
|
+
shared: "Mémoire partagée"
|
|
107314
|
+
},
|
|
107315
|
+
sharedMemory: {
|
|
107316
|
+
title: "Mémoire partagée",
|
|
107317
|
+
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.",
|
|
107318
|
+
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.",
|
|
107319
|
+
addButton: "Ajouter un souvenir partagé",
|
|
107320
|
+
addButtonShort: "Ajouter",
|
|
107321
|
+
listAriaLabel: "Souvenirs partagés",
|
|
107322
|
+
actionsAria: "Actions sur le souvenir partagé",
|
|
107323
|
+
edit: "Modifier",
|
|
107324
|
+
"delete": "Supprimer",
|
|
107325
|
+
loading: "Chargement des souvenirs partagés...",
|
|
107326
|
+
loadError: "Impossible de charger les souvenirs partagés de cet agent. Veuillez réessayer.",
|
|
107327
|
+
unknownAuthor: "Inconnu",
|
|
107328
|
+
addedBy: "Ajouté par {name}",
|
|
107329
|
+
empty: {
|
|
107330
|
+
title: "Aucun souvenir partagé pour l'instant",
|
|
107331
|
+
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."
|
|
107332
|
+
},
|
|
107333
|
+
denied: {
|
|
107334
|
+
title: "Pas d'accès à la mémoire partagée",
|
|
107335
|
+
description: "Vous n'avez pas la permission de voir les souvenirs partagés de cet agent. Demandez l'accès à un administrateur."
|
|
107336
|
+
},
|
|
107337
|
+
modal: {
|
|
107338
|
+
addTitle: "Ajouter un souvenir partagé",
|
|
107339
|
+
editTitle: "Modifier le souvenir partagé",
|
|
107340
|
+
contentLabel: "Souvenir",
|
|
107341
|
+
placeholder: "Écrivez ce que cet agent doit toujours garder à l'esprit...",
|
|
107342
|
+
charCountMinimum: "{count}/10 caractères minimum",
|
|
107343
|
+
charCount: "{count} caractères",
|
|
107344
|
+
save: "Enregistrer",
|
|
107345
|
+
saving: "Enregistrement...",
|
|
107346
|
+
cancel: "Annuler"
|
|
107347
|
+
},
|
|
107348
|
+
deleteModal: {
|
|
107349
|
+
title: "Supprimer le souvenir partagé",
|
|
107350
|
+
description: "Voulez-vous vraiment supprimer ce souvenir partagé ? Tous ceux qui discutent avec cet agent cesseront de le voir. Cette action est irréversible.",
|
|
107351
|
+
"delete": "Supprimer",
|
|
107352
|
+
deleting: "Suppression...",
|
|
107353
|
+
cancel: "Annuler"
|
|
107354
|
+
},
|
|
107355
|
+
errors: {
|
|
107356
|
+
duplicate: "Ce souvenir partagé existe déjà.",
|
|
107357
|
+
tooShort: "Un souvenir partagé doit comporter au moins 10 caractères.",
|
|
107358
|
+
forbidden: "Vous n'avez pas la permission de modifier les souvenirs partagés de cet agent."
|
|
107359
|
+
},
|
|
107360
|
+
toasts: {
|
|
107361
|
+
created: "Souvenir partagé ajouté",
|
|
107362
|
+
updated: "Souvenir partagé mis à jour",
|
|
107363
|
+
deleted: "Souvenir partagé supprimé",
|
|
107364
|
+
saveError: "Impossible d'enregistrer le souvenir partagé",
|
|
107365
|
+
deleteError: "Impossible de supprimer le souvenir partagé"
|
|
107366
|
+
}
|
|
107188
107367
|
},
|
|
107189
107368
|
toasts: {
|
|
107190
107369
|
enableSuccess: "Mémoire activée",
|
|
107191
107370
|
disableSuccess: "Mémoire désactivée",
|
|
107192
|
-
toggleError: "
|
|
107371
|
+
toggleError: "Impossible de mettre à jour le paramètre de mémoire"
|
|
107193
107372
|
}
|
|
107194
107373
|
};
|
|
107195
107374
|
var memoryTabLearnersMemories$2 = {
|
|
@@ -107253,7 +107432,10 @@ var memoryTabManageMemories$2 = {
|
|
|
107253
107432
|
memoryUpdatedSuccessfully: "Souvenir mis à jour avec succès",
|
|
107254
107433
|
failedToUpdateMemory: "Échec de la mise à jour du souvenir",
|
|
107255
107434
|
memoryCreatedSuccessfully: "Souvenir créé avec succès",
|
|
107256
|
-
failedToCreateMemory: "Échec de la création du souvenir"
|
|
107435
|
+
failedToCreateMemory: "Échec de la création du souvenir",
|
|
107436
|
+
savedMemoriesAriaLabel: "Souvenirs enregistrés",
|
|
107437
|
+
memoryActionsAriaLabel: "Actions sur le souvenir",
|
|
107438
|
+
memoryCategoriesAriaLabel: "Catégories de souvenirs"
|
|
107257
107439
|
};
|
|
107258
107440
|
var memoryTabSavedMemoriesModal$2 = {
|
|
107259
107441
|
savedMemories: "Souvenirs enregistrés",
|
|
@@ -109122,6 +109304,9 @@ var tabsEmbedTab$2 = {
|
|
|
109122
109304
|
moreInfoShowVoiceRecord: "Plus d'informations sur l'affichage des enregistrements vocaux",
|
|
109123
109305
|
showVoiceRecordEnabled: "Affichage des enregistrements vocaux activé",
|
|
109124
109306
|
showVoiceRecordDisabled: "Affichage des enregistrements vocaux désactivé",
|
|
109307
|
+
moreInfoAllowMentorSelection: "Plus d'informations sur la sélection d'agent",
|
|
109308
|
+
allowMentorSelectionEnabled: "Sélection d'agent activée",
|
|
109309
|
+
allowMentorSelectionDisabled: "Sélection d'agent désactivée",
|
|
109125
109310
|
moreInfoStarterPrompts: "Plus d'informations sur les suggestions de départ",
|
|
109126
109311
|
moreInfoShareableLink: "Plus d'informations sur le lien partageable",
|
|
109127
109312
|
shareableLinkEnabled: "Lien partageable activé",
|
|
@@ -111234,7 +111419,7 @@ var accessibility$2 = {
|
|
|
111234
111419
|
positionAnnouncement: "Bouton d'accessibilité déplacé vers le bord {side, select, left {gauche} other {droit}}, à {bottom} pixels du bas."
|
|
111235
111420
|
}
|
|
111236
111421
|
};
|
|
111237
|
-
var fr = {
|
|
111422
|
+
var fr$1 = {
|
|
111238
111423
|
accessTabAddAccess: accessTabAddAccess$2,
|
|
111239
111424
|
accessTabLabels: accessTabLabels$2,
|
|
111240
111425
|
accessTabUpdateAccess: accessTabUpdateAccess$2,
|
|
@@ -114282,6 +114467,10 @@ var embedTabLabels$1 = {
|
|
|
114282
114467
|
label: "Mostrar grabación de voz",
|
|
114283
114468
|
tooltip: "Mostrar opciones de grabación de voz en la interfaz de chat"
|
|
114284
114469
|
},
|
|
114470
|
+
allowMentorSelection: {
|
|
114471
|
+
label: "Permitir selección de agente",
|
|
114472
|
+
tooltip: "Permite a los visitantes con sesión iniciada abrir Explorar desde la inserción y cambiar a otro agente."
|
|
114473
|
+
},
|
|
114285
114474
|
shareableLink: {
|
|
114286
114475
|
label: "Enlace compartible",
|
|
114287
114476
|
tooltip: "Genere un enlace que los usuarios puedan usar para chatear con este agente de forma anónima"
|
|
@@ -114912,16 +115101,75 @@ var memoryTabEditMemoryModal$1 = {
|
|
|
114912
115101
|
var memoryTabLabels$1 = {
|
|
114913
115102
|
header: {
|
|
114914
115103
|
title: "Memoria",
|
|
114915
|
-
description: "
|
|
115104
|
+
description: "Configura los ajustes de memoria de tu agente."
|
|
114916
115105
|
},
|
|
114917
115106
|
toggle: {
|
|
114918
|
-
label: "
|
|
114919
|
-
description: "
|
|
115107
|
+
label: "Memoria a largo plazo",
|
|
115108
|
+
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.",
|
|
115109
|
+
offHint: "Actívala para que este agente recuerde detalles de una conversación a otra."
|
|
115110
|
+
},
|
|
115111
|
+
subTabs: {
|
|
115112
|
+
ariaLabel: "Secciones de memoria",
|
|
115113
|
+
personal: "Memorias personales",
|
|
115114
|
+
shared: "Memoria compartida"
|
|
115115
|
+
},
|
|
115116
|
+
sharedMemory: {
|
|
115117
|
+
title: "Memoria compartida",
|
|
115118
|
+
description: "Hechos, reglas y contexto que este agente debe tener siempre presentes. Todas las personas que chatean con este agente reciben estas memorias.",
|
|
115119
|
+
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.",
|
|
115120
|
+
addButton: "Agregar memoria compartida",
|
|
115121
|
+
addButtonShort: "Agregar",
|
|
115122
|
+
listAriaLabel: "Memorias compartidas",
|
|
115123
|
+
actionsAria: "Acciones de memoria compartida",
|
|
115124
|
+
edit: "Editar",
|
|
115125
|
+
"delete": "Eliminar",
|
|
115126
|
+
loading: "Cargando memorias compartidas...",
|
|
115127
|
+
loadError: "No se pudieron cargar las memorias compartidas de este agente. Inténtalo de nuevo.",
|
|
115128
|
+
unknownAuthor: "Desconocido",
|
|
115129
|
+
addedBy: "Agregado por {name}",
|
|
115130
|
+
empty: {
|
|
115131
|
+
title: "Aún no hay memorias compartidas",
|
|
115132
|
+
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."
|
|
115133
|
+
},
|
|
115134
|
+
denied: {
|
|
115135
|
+
title: "Sin acceso a la memoria compartida",
|
|
115136
|
+
description: "No tienes permiso para ver las memorias compartidas de este agente. Pide acceso a un administrador."
|
|
115137
|
+
},
|
|
115138
|
+
modal: {
|
|
115139
|
+
addTitle: "Agregar memoria compartida",
|
|
115140
|
+
editTitle: "Editar memoria compartida",
|
|
115141
|
+
contentLabel: "Memoria",
|
|
115142
|
+
placeholder: "Escribe lo que este agente debe tener siempre presente...",
|
|
115143
|
+
charCountMinimum: "{count}/10 caracteres mínimo",
|
|
115144
|
+
charCount: "{count} caracteres",
|
|
115145
|
+
save: "Guardar",
|
|
115146
|
+
saving: "Guardando...",
|
|
115147
|
+
cancel: "Cancelar"
|
|
115148
|
+
},
|
|
115149
|
+
deleteModal: {
|
|
115150
|
+
title: "Eliminar memoria compartida",
|
|
115151
|
+
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.",
|
|
115152
|
+
"delete": "Eliminar",
|
|
115153
|
+
deleting: "Eliminando...",
|
|
115154
|
+
cancel: "Cancelar"
|
|
115155
|
+
},
|
|
115156
|
+
errors: {
|
|
115157
|
+
duplicate: "Esta memoria compartida ya existe.",
|
|
115158
|
+
tooShort: "Una memoria compartida debe tener al menos 10 caracteres.",
|
|
115159
|
+
forbidden: "No tienes permiso para cambiar las memorias compartidas de este agente."
|
|
115160
|
+
},
|
|
115161
|
+
toasts: {
|
|
115162
|
+
created: "Memoria compartida agregada",
|
|
115163
|
+
updated: "Memoria compartida actualizada",
|
|
115164
|
+
deleted: "Memoria compartida eliminada",
|
|
115165
|
+
saveError: "No se pudo guardar la memoria compartida",
|
|
115166
|
+
deleteError: "No se pudo eliminar la memoria compartida"
|
|
115167
|
+
}
|
|
114920
115168
|
},
|
|
114921
115169
|
toasts: {
|
|
114922
115170
|
enableSuccess: "Memoria activada",
|
|
114923
115171
|
disableSuccess: "Memoria desactivada",
|
|
114924
|
-
toggleError: "
|
|
115172
|
+
toggleError: "No se pudo actualizar el ajuste de memoria"
|
|
114925
115173
|
}
|
|
114926
115174
|
};
|
|
114927
115175
|
var memoryTabLearnersMemories$1 = {
|
|
@@ -114985,7 +115233,10 @@ var memoryTabManageMemories$1 = {
|
|
|
114985
115233
|
memoryUpdatedSuccessfully: "Memoria actualizada correctamente",
|
|
114986
115234
|
failedToUpdateMemory: "Error al actualizar la memoria",
|
|
114987
115235
|
memoryCreatedSuccessfully: "Memoria creada correctamente",
|
|
114988
|
-
failedToCreateMemory: "Error al crear la memoria"
|
|
115236
|
+
failedToCreateMemory: "Error al crear la memoria",
|
|
115237
|
+
savedMemoriesAriaLabel: "Memorias guardadas",
|
|
115238
|
+
memoryActionsAriaLabel: "Acciones de memoria",
|
|
115239
|
+
memoryCategoriesAriaLabel: "Categorías de memoria"
|
|
114989
115240
|
};
|
|
114990
115241
|
var memoryTabSavedMemoriesModal$1 = {
|
|
114991
115242
|
savedMemories: "Memorias guardadas",
|
|
@@ -116854,6 +117105,9 @@ var tabsEmbedTab$1 = {
|
|
|
116854
117105
|
moreInfoShowVoiceRecord: "Más información sobre mostrar grabaciones de voz",
|
|
116855
117106
|
showVoiceRecordEnabled: "Mostrar grabaciones de voz habilitado",
|
|
116856
117107
|
showVoiceRecordDisabled: "Mostrar grabaciones de voz deshabilitado",
|
|
117108
|
+
moreInfoAllowMentorSelection: "Más información sobre la selección de agente",
|
|
117109
|
+
allowMentorSelectionEnabled: "Selección de agente habilitada",
|
|
117110
|
+
allowMentorSelectionDisabled: "Selección de agente deshabilitada",
|
|
116857
117111
|
moreInfoStarterPrompts: "Más información sobre las sugerencias iniciales",
|
|
116858
117112
|
moreInfoShareableLink: "Más información sobre el enlace compartible",
|
|
116859
117113
|
shareableLinkEnabled: "Enlace compartible habilitado",
|
|
@@ -118966,7 +119220,7 @@ var accessibility$1 = {
|
|
|
118966
119220
|
positionAnnouncement: "Botón de accesibilidad movido al borde {side, select, left {izquierdo} other {derecho}}, a {bottom} píxeles de la parte inferior."
|
|
118967
119221
|
}
|
|
118968
119222
|
};
|
|
118969
|
-
var es = {
|
|
119223
|
+
var es$1 = {
|
|
118970
119224
|
accessTabAddAccess: accessTabAddAccess$1,
|
|
118971
119225
|
accessTabLabels: accessTabLabels$1,
|
|
118972
119226
|
accessTabUpdateAccess: accessTabUpdateAccess$1,
|
|
@@ -122014,6 +122268,10 @@ var embedTabLabels = {
|
|
|
122014
122268
|
label: "显示语音录制",
|
|
122015
122269
|
tooltip: "在聊天界面中显示语音录制选项"
|
|
122016
122270
|
},
|
|
122271
|
+
allowMentorSelection: {
|
|
122272
|
+
label: "允许选择智能体",
|
|
122273
|
+
tooltip: "允许已登录的访问者从嵌入中打开探索并切换到其他智能体。"
|
|
122274
|
+
},
|
|
122017
122275
|
shareableLink: {
|
|
122018
122276
|
label: "可分享链接",
|
|
122019
122277
|
tooltip: "生成一个链接,用户可使用该链接匿名与此智能体聊天"
|
|
@@ -122647,13 +122905,72 @@ var memoryTabLabels = {
|
|
|
122647
122905
|
description: "配置您的智能体的记忆设置。"
|
|
122648
122906
|
},
|
|
122649
122907
|
toggle: {
|
|
122650
|
-
label: "
|
|
122651
|
-
description: "
|
|
122908
|
+
label: "长期记忆",
|
|
122909
|
+
description: "让此智能体记住过去对话中的有用细节——就像一位熟悉情况的老同事——这样大家就不必重复说明。开启后,可在下方查看它对每个人的记忆并添加共享记忆。",
|
|
122910
|
+
offHint: "开启后,此智能体就能跨对话记住细节。"
|
|
122911
|
+
},
|
|
122912
|
+
subTabs: {
|
|
122913
|
+
ariaLabel: "记忆分区",
|
|
122914
|
+
personal: "个人记忆",
|
|
122915
|
+
shared: "共享记忆"
|
|
122916
|
+
},
|
|
122917
|
+
sharedMemory: {
|
|
122918
|
+
title: "共享记忆",
|
|
122919
|
+
description: "此智能体应始终牢记的事实、规则和背景信息。所有与此智能体聊天的人都会获得这些记忆。",
|
|
122920
|
+
gatingHint: "只有在此智能体开启长期记忆、且聊天者也开启了记忆时,共享记忆才会用于聊天。",
|
|
122921
|
+
addButton: "添加共享记忆",
|
|
122922
|
+
addButtonShort: "添加",
|
|
122923
|
+
listAriaLabel: "共享记忆",
|
|
122924
|
+
actionsAria: "共享记忆操作",
|
|
122925
|
+
edit: "编辑",
|
|
122926
|
+
"delete": "删除",
|
|
122927
|
+
loading: "加载共享记忆中...",
|
|
122928
|
+
loadError: "无法加载此智能体的共享记忆。请重试。",
|
|
122929
|
+
unknownAuthor: "未知",
|
|
122930
|
+
addedBy: "由 {name} 添加",
|
|
122931
|
+
empty: {
|
|
122932
|
+
title: "暂无共享记忆",
|
|
122933
|
+
description: "添加此智能体应始终牢记的内容——行为方式、关键事实或内部规则。所有与此智能体聊天的人都会获得这些记忆。"
|
|
122934
|
+
},
|
|
122935
|
+
denied: {
|
|
122936
|
+
title: "无权访问共享记忆",
|
|
122937
|
+
description: "您没有权限查看此智能体的共享记忆。请向管理员申请访问权限。"
|
|
122938
|
+
},
|
|
122939
|
+
modal: {
|
|
122940
|
+
addTitle: "添加共享记忆",
|
|
122941
|
+
editTitle: "编辑共享记忆",
|
|
122942
|
+
contentLabel: "记忆",
|
|
122943
|
+
placeholder: "写下此智能体应始终牢记的内容...",
|
|
122944
|
+
charCountMinimum: "{count}/10 个字符(最少)",
|
|
122945
|
+
charCount: "{count} 个字符",
|
|
122946
|
+
save: "保存",
|
|
122947
|
+
saving: "保存中...",
|
|
122948
|
+
cancel: "取消"
|
|
122949
|
+
},
|
|
122950
|
+
deleteModal: {
|
|
122951
|
+
title: "删除共享记忆",
|
|
122952
|
+
description: "确定要删除这条共享记忆吗?所有与此智能体聊天的人将不再看到它。此操作无法撤销。",
|
|
122953
|
+
"delete": "删除",
|
|
122954
|
+
deleting: "删除中...",
|
|
122955
|
+
cancel: "取消"
|
|
122956
|
+
},
|
|
122957
|
+
errors: {
|
|
122958
|
+
duplicate: "这条共享记忆已存在。",
|
|
122959
|
+
tooShort: "共享记忆至少需要 10 个字符。",
|
|
122960
|
+
forbidden: "您没有权限更改此智能体的共享记忆。"
|
|
122961
|
+
},
|
|
122962
|
+
toasts: {
|
|
122963
|
+
created: "共享记忆已添加",
|
|
122964
|
+
updated: "共享记忆已更新",
|
|
122965
|
+
deleted: "共享记忆已删除",
|
|
122966
|
+
saveError: "无法保存共享记忆",
|
|
122967
|
+
deleteError: "无法删除共享记忆"
|
|
122968
|
+
}
|
|
122652
122969
|
},
|
|
122653
122970
|
toasts: {
|
|
122654
|
-
enableSuccess: "
|
|
122655
|
-
disableSuccess: "
|
|
122656
|
-
toggleError: "
|
|
122971
|
+
enableSuccess: "记忆已开启",
|
|
122972
|
+
disableSuccess: "记忆已关闭",
|
|
122973
|
+
toggleError: "无法更新记忆设置"
|
|
122657
122974
|
}
|
|
122658
122975
|
};
|
|
122659
122976
|
var memoryTabLearnersMemories = {
|
|
@@ -122717,7 +123034,10 @@ var memoryTabManageMemories = {
|
|
|
122717
123034
|
memoryUpdatedSuccessfully: "记忆已成功更新",
|
|
122718
123035
|
failedToUpdateMemory: "更新记忆失败",
|
|
122719
123036
|
memoryCreatedSuccessfully: "记忆已成功创建",
|
|
122720
|
-
failedToCreateMemory: "创建记忆失败"
|
|
123037
|
+
failedToCreateMemory: "创建记忆失败",
|
|
123038
|
+
savedMemoriesAriaLabel: "已保存的记忆",
|
|
123039
|
+
memoryActionsAriaLabel: "记忆操作",
|
|
123040
|
+
memoryCategoriesAriaLabel: "记忆分类"
|
|
122721
123041
|
};
|
|
122722
123042
|
var memoryTabSavedMemoriesModal = {
|
|
122723
123043
|
savedMemories: "已保存的记忆",
|
|
@@ -124586,6 +124906,9 @@ var tabsEmbedTab = {
|
|
|
124586
124906
|
moreInfoShowVoiceRecord: "更多关于显示语音录制的信息",
|
|
124587
124907
|
showVoiceRecordEnabled: "显示语音录制已启用",
|
|
124588
124908
|
showVoiceRecordDisabled: "显示语音录制已禁用",
|
|
124909
|
+
moreInfoAllowMentorSelection: "有关选择智能体的更多信息",
|
|
124910
|
+
allowMentorSelectionEnabled: "选择智能体已启用",
|
|
124911
|
+
allowMentorSelectionDisabled: "选择智能体已禁用",
|
|
124589
124912
|
moreInfoStarterPrompts: "更多关于起始提示的信息",
|
|
124590
124913
|
moreInfoShareableLink: "更多关于可分享链接的信息",
|
|
124591
124914
|
shareableLinkEnabled: "可分享链接已启用",
|
|
@@ -127003,8 +127326,8 @@ var zh = {
|
|
|
127003
127326
|
*/
|
|
127004
127327
|
const CATALOGS = {
|
|
127005
127328
|
en: en,
|
|
127006
|
-
fr: fr,
|
|
127007
|
-
es: es,
|
|
127329
|
+
fr: fr$1,
|
|
127330
|
+
es: es$1,
|
|
127008
127331
|
zh: zh,
|
|
127009
127332
|
};
|
|
127010
127333
|
/**
|
|
@@ -181289,7 +181612,7 @@ function DetailRow({ label, children }) {
|
|
|
181289
181612
|
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
181613
|
}
|
|
181291
181614
|
|
|
181292
|
-
const PAGE_SIZE$
|
|
181615
|
+
const PAGE_SIZE$g = 8;
|
|
181293
181616
|
const CONTENT_TYPES = [
|
|
181294
181617
|
{ value: 'courses', labelKey: 'gradebookGradebookTab.typeCourses', icon: GraduationCap },
|
|
181295
181618
|
{ value: 'programs', labelKey: 'gradebookGradebookTab.typePrograms', icon: Layers },
|
|
@@ -181320,14 +181643,14 @@ function useGradebookData(type, org, username, page, search) {
|
|
|
181320
181643
|
username,
|
|
181321
181644
|
query: {
|
|
181322
181645
|
page,
|
|
181323
|
-
page_size: PAGE_SIZE$
|
|
181646
|
+
page_size: PAGE_SIZE$g,
|
|
181324
181647
|
platform_key: org,
|
|
181325
181648
|
...(trimmed ? { course_name: trimmed } : {}),
|
|
181326
181649
|
},
|
|
181327
181650
|
}, { skip: type !== 'courses', refetchOnMountOrArgChange: true });
|
|
181328
181651
|
const programsQ = useGetUserEnrolledProgramsQuery([{ username, platformKey: org }], { skip: type !== 'programs' });
|
|
181329
181652
|
const pathwaysQ = useGetUserCatalogPathwaysQuery({ username, platform_key: org }, { skip: type !== 'pathways' });
|
|
181330
|
-
const credentialsQ = useGetUsersAsAssertionsQuery({ platformKey: org, userId: username, page, pageSize: PAGE_SIZE$
|
|
181653
|
+
const credentialsQ = useGetUsersAsAssertionsQuery({ platformKey: org, userId: username, page, pageSize: PAGE_SIZE$g }, { skip: type !== 'credentials', refetchOnMountOrArgChange: true });
|
|
181331
181654
|
const earnedQ = useGetUserEarnedSkillsQuery([{ org, userId: username }], { skip: type !== 'skills' });
|
|
181332
181655
|
const reportedQ = useGetUserReportedSkillsQuery([{ username }], { skip: type !== 'skills' });
|
|
181333
181656
|
const desiredQ = useGetUserDesiredSkillsQuery([{ username }], { skip: type !== 'skills' });
|
|
@@ -181337,12 +181660,12 @@ function useGradebookData(type, org, username, page, search) {
|
|
|
181337
181660
|
const filtered = trimmed
|
|
181338
181661
|
? rows.filter((row) => row.name.toLowerCase().includes(trimmed.toLowerCase()))
|
|
181339
181662
|
: rows;
|
|
181340
|
-
const start = (page - 1) * PAGE_SIZE$
|
|
181663
|
+
const start = (page - 1) * PAGE_SIZE$g;
|
|
181341
181664
|
return {
|
|
181342
|
-
rows: filtered.slice(start, start + PAGE_SIZE$
|
|
181665
|
+
rows: filtered.slice(start, start + PAGE_SIZE$g),
|
|
181343
181666
|
total: filtered.length,
|
|
181344
181667
|
hasPrev: page > 1,
|
|
181345
|
-
hasNext: start + PAGE_SIZE$
|
|
181668
|
+
hasNext: start + PAGE_SIZE$g < filtered.length,
|
|
181346
181669
|
};
|
|
181347
181670
|
};
|
|
181348
181671
|
switch (type) {
|
|
@@ -181399,7 +181722,7 @@ function useGradebookData(type, org, username, page, search) {
|
|
|
181399
181722
|
rows,
|
|
181400
181723
|
total,
|
|
181401
181724
|
hasPrev: page > 1,
|
|
181402
|
-
hasNext: page * PAGE_SIZE$
|
|
181725
|
+
hasNext: page * PAGE_SIZE$g < total,
|
|
181403
181726
|
isLoading: credentialsQ.isLoading,
|
|
181404
181727
|
isFetching: credentialsQ.isFetching,
|
|
181405
181728
|
isError: credentialsQ.isError,
|
|
@@ -273055,7 +273378,7 @@ const STATE_BADGE_CLASSES = {
|
|
|
273055
273378
|
expired: 'bg-gray-50 text-gray-600',
|
|
273056
273379
|
};
|
|
273057
273380
|
const ACTIVE_BADGE_CLASSES = 'bg-blue-50 text-blue-700';
|
|
273058
|
-
const timeAgo = (value) => {
|
|
273381
|
+
const timeAgo$1 = (value) => {
|
|
273059
273382
|
if (!value)
|
|
273060
273383
|
return '';
|
|
273061
273384
|
const date = new Date(value);
|
|
@@ -273105,7 +273428,7 @@ function ReportHistory({ org, username, onDownload }) {
|
|
|
273105
273428
|
const state = (_a = report.state) !== null && _a !== void 0 ? _a : '';
|
|
273106
273429
|
const active = isActiveState$1(state);
|
|
273107
273430
|
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));
|
|
273431
|
+
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
273432
|
})) })] })) }) }) }));
|
|
273110
273433
|
}
|
|
273111
273434
|
|
|
@@ -274134,7 +274457,7 @@ function formatDuration(seconds) {
|
|
|
274134
274457
|
return rest ? `${hours}h ${rest}m` : `${hours}h`;
|
|
274135
274458
|
}
|
|
274136
274459
|
/** `3 days ago`; empty for a missing or unparseable timestamp. */
|
|
274137
|
-
function formatRelative(iso) {
|
|
274460
|
+
function formatRelative$3(iso) {
|
|
274138
274461
|
if (!iso)
|
|
274139
274462
|
return '';
|
|
274140
274463
|
const date = new Date(iso);
|
|
@@ -274413,7 +274736,7 @@ function ConversationRow({ session }) {
|
|
|
274413
274736
|
negative: t('chatHistoryChatHistoryTab.negative'),
|
|
274414
274737
|
userSentiment: t('chatHistoryChatHistoryTab.userSentiment'),
|
|
274415
274738
|
}), [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 }) })] })] }));
|
|
274739
|
+
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
274740
|
}
|
|
274418
274741
|
function MemoryRow({ memory }) {
|
|
274419
274742
|
const t = useT();
|
|
@@ -274485,7 +274808,7 @@ function OverviewTab({ org, username, isOwnProfile = true, sections, onNavigate,
|
|
|
274485
274808
|
? unavailable
|
|
274486
274809
|
: last
|
|
274487
274810
|
? t('profileOverviewTab.kpiConversationsLast', {
|
|
274488
|
-
when: formatRelative(last.inserted_at),
|
|
274811
|
+
when: formatRelative$3(last.inserted_at),
|
|
274489
274812
|
})
|
|
274490
274813
|
: t('profileOverviewTab.kpiConversationsSub'), loading: conversations.isLoading }, "conversations"));
|
|
274491
274814
|
}
|
|
@@ -277212,7 +277535,7 @@ const AdvancedPagination = ({ currentPage, totalPages, onPageChange, totalCount,
|
|
|
277212
277535
|
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
277536
|
};
|
|
277214
277537
|
|
|
277215
|
-
const PAGE_SIZE$
|
|
277538
|
+
const PAGE_SIZE$f = 10;
|
|
277216
277539
|
function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false, }) {
|
|
277217
277540
|
var _a, _b;
|
|
277218
277541
|
const t = useT();
|
|
@@ -277235,7 +277558,7 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
|
|
|
277235
277558
|
const isWatcher = isPureWatcher(rbacPermissions, currentTenant);
|
|
277236
277559
|
const { data: users, refetch: refetchPlatformUsers, isLoading: isLoadingPlatformUsers, } = usePlatformUsersQuery({
|
|
277237
277560
|
page,
|
|
277238
|
-
page_size: PAGE_SIZE$
|
|
277561
|
+
page_size: PAGE_SIZE$f,
|
|
277239
277562
|
platform_key: tenant,
|
|
277240
277563
|
platform_org: tenant,
|
|
277241
277564
|
query: debouncedSearchQuery,
|
|
@@ -277249,7 +277572,7 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
|
|
|
277249
277572
|
// TODO to use required_action: 'Ibl.Core/Users/read',
|
|
277250
277573
|
required_action: 'Ibl.Mentor/Memory/list',
|
|
277251
277574
|
page,
|
|
277252
|
-
page_size: PAGE_SIZE$
|
|
277575
|
+
page_size: PAGE_SIZE$f,
|
|
277253
277576
|
sort: 'name',
|
|
277254
277577
|
...(debouncedSearchQuery.includes('@')
|
|
277255
277578
|
? { email: debouncedSearchQuery }
|
|
@@ -277424,7 +277747,7 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
|
|
|
277424
277747
|
managed: user,
|
|
277425
277748
|
}));
|
|
277426
277749
|
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$
|
|
277750
|
+
const totalPages = Math.ceil(totalCount / PAGE_SIZE$f);
|
|
277428
277751
|
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
277752
|
var _a;
|
|
277430
277753
|
// Only set on the admin path — see {@link UserRow}.
|
|
@@ -277455,7 +277778,7 @@ function UsersTab({ tenant, onInviteClick, currentSpa, showGradebookTab = false,
|
|
|
277455
277778
|
})] }) })] }) }), 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
277779
|
name: user.name,
|
|
277457
277780
|
}), 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$
|
|
277781
|
+
}), 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
277782
|
if (!open)
|
|
277460
277783
|
setSelectedUser(null);
|
|
277461
277784
|
}, 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 +278998,7 @@ function PoliciesTab({ tenant }) {
|
|
|
278675
278998
|
: 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
278999
|
}
|
|
278677
279000
|
|
|
278678
|
-
const PAGE_SIZE$
|
|
279001
|
+
const PAGE_SIZE$e = 10;
|
|
278679
279002
|
function normalizeEvents(events) {
|
|
278680
279003
|
if (!events)
|
|
278681
279004
|
return [];
|
|
@@ -278724,8 +279047,8 @@ function AlertsTab({ tenant }) {
|
|
|
278724
279047
|
const { data: watchedGroupsData, isLoading, isError, refetch, } = useGetWatchedGroupsQuery({
|
|
278725
279048
|
params: {
|
|
278726
279049
|
platform_key: tenant,
|
|
278727
|
-
limit: PAGE_SIZE$
|
|
278728
|
-
offset: (page - 1) * PAGE_SIZE$
|
|
279050
|
+
limit: PAGE_SIZE$e,
|
|
279051
|
+
offset: (page - 1) * PAGE_SIZE$e,
|
|
278729
279052
|
},
|
|
278730
279053
|
});
|
|
278731
279054
|
const groups = useMemo(() => {
|
|
@@ -278738,7 +279061,7 @@ function AlertsTab({ tenant }) {
|
|
|
278738
279061
|
return results;
|
|
278739
279062
|
}, [watchedGroupsData, debouncedSearchQuery]);
|
|
278740
279063
|
const totalPages = watchedGroupsData
|
|
278741
|
-
? Math.max(1, Math.ceil(watchedGroupsData.count / PAGE_SIZE$
|
|
279064
|
+
? Math.max(1, Math.ceil(watchedGroupsData.count / PAGE_SIZE$e))
|
|
278742
279065
|
: 0;
|
|
278743
279066
|
const handlePageChange = async (newPage) => {
|
|
278744
279067
|
setPage(newPage);
|
|
@@ -279047,7 +279370,7 @@ function AlertsTab({ tenant }) {
|
|
|
279047
279370
|
setDeletingGroupId(null);
|
|
279048
279371
|
}
|
|
279049
279372
|
}
|
|
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$
|
|
279373
|
+
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
279374
|
username: user.username,
|
|
279052
279375
|
}), 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
279376
|
setWatchedUserSearch(e.target.value);
|
|
@@ -280235,7 +280558,7 @@ function BlocksView({ platformKey, onBack, }) {
|
|
|
280235
280558
|
}
|
|
280236
280559
|
|
|
280237
280560
|
const FILTER_ORDER = ['all', ...APPLICATION_STATUSES];
|
|
280238
|
-
const PAGE_SIZE$
|
|
280561
|
+
const PAGE_SIZE$d = 20;
|
|
280239
280562
|
const SEARCH_DEBOUNCE_MS$1 = 300;
|
|
280240
280563
|
/**
|
|
280241
280564
|
* The public application URL on the auth SPA for one form of a platform
|
|
@@ -280378,7 +280701,7 @@ function SubmissionsPipeline({ platformKey, form, onBack, onOpen, }) {
|
|
|
280378
280701
|
...(sort !== '-created' ? { sort } : {}),
|
|
280379
280702
|
...candidateParams,
|
|
280380
280703
|
page,
|
|
280381
|
-
page_size: PAGE_SIZE$
|
|
280704
|
+
page_size: PAGE_SIZE$d,
|
|
280382
280705
|
}, {
|
|
280383
280706
|
refetchOnMountOrArgChange: true,
|
|
280384
280707
|
});
|
|
@@ -280387,7 +280710,7 @@ function SubmissionsPipeline({ platformKey, form, onBack, onOpen, }) {
|
|
|
280387
280710
|
: [];
|
|
280388
280711
|
const rows = form ? allRows.filter((row) => row.form_id === form.id) : allRows;
|
|
280389
280712
|
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$
|
|
280713
|
+
const totalPages = Math.max(1, Math.ceil(count / PAGE_SIZE$d));
|
|
280391
280714
|
const counts = statsCounts(stats);
|
|
280392
280715
|
const countFor = (key) => {
|
|
280393
280716
|
if (!stats)
|
|
@@ -280425,7 +280748,7 @@ function SubmissionsPipeline({ platformKey, form, onBack, onOpen, }) {
|
|
|
280425
280748
|
}) }) }), 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
280749
|
? t(STATUS_LABEL_KEYS[row.status])
|
|
280427
280750
|
: 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$
|
|
280751
|
+
})) })] }) }), 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
280752
|
}
|
|
280430
280753
|
|
|
280431
280754
|
// The user-onboarding form contract: the schema an admin authors in the admin
|
|
@@ -286550,7 +286873,7 @@ function ItemSearchDropdown({ platformKey, onSelect, }) {
|
|
|
286550
286873
|
}, 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
286874
|
}
|
|
286552
286875
|
|
|
286553
|
-
const PAGE_SIZE$
|
|
286876
|
+
const PAGE_SIZE$c = 8;
|
|
286554
286877
|
function PaywalledItemsList({ platformKey, onSelectItem, onAddCustomItem, }) {
|
|
286555
286878
|
const t = useT();
|
|
286556
286879
|
const [page, setPage] = useState(1);
|
|
@@ -286558,7 +286881,7 @@ function PaywalledItemsList({ platformKey, onSelectItem, onAddCustomItem, }) {
|
|
|
286558
286881
|
const { data: paywalls, isLoading } = useListPaywallsQuery({
|
|
286559
286882
|
platform_key: platformKey,
|
|
286560
286883
|
page,
|
|
286561
|
-
page_size: PAGE_SIZE$
|
|
286884
|
+
page_size: PAGE_SIZE$c,
|
|
286562
286885
|
...(statusFilter !== 'all' && { is_enabled: statusFilter === 'active' }),
|
|
286563
286886
|
}, { refetchOnMountOrArgChange: true });
|
|
286564
286887
|
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 +286904,7 @@ function PaywalledItemsList({ platformKey, onSelectItem, onAddCustomItem, }) {
|
|
|
286581
286904
|
: 'bg-gray-100 text-gray-500 border-gray-200 hover:bg-gray-100', children: pw.is_enabled
|
|
286582
286905
|
? t('monetizationPaywalledItemsList.statusActive')
|
|
286583
286906
|
: 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$
|
|
286907
|
+
}), 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
286908
|
? t('monetizationPaywalledItemsList.noFilteredItemsFound', { status: statusFilter })
|
|
286586
286909
|
: t('monetizationPaywalledItemsList.noItemsConfigured') }))] })] }));
|
|
286587
286910
|
}
|
|
@@ -286932,7 +287255,7 @@ function MonetizationTab({ platformKey, authURL }) {
|
|
|
286932
287255
|
}
|
|
286933
287256
|
|
|
286934
287257
|
/** Matches the server-side cap on the global memories listing. */
|
|
286935
|
-
const PAGE_SIZE$
|
|
287258
|
+
const PAGE_SIZE$b = 25;
|
|
286936
287259
|
/**
|
|
286937
287260
|
* Popup for managing one user's global memories. Reads them the way the
|
|
286938
287261
|
* profile preview does — the caller in the path, the managed user identified
|
|
@@ -286953,10 +287276,10 @@ function UserMemoriesModal({ isOpen, onClose, tenantKey, adminUsername, user, })
|
|
|
286953
287276
|
userId: adminUsername,
|
|
286954
287277
|
// `user_id` must be the managed user's id (username) — the backend does
|
|
286955
287278
|
// not resolve emails here, so passing one returns an empty list.
|
|
286956
|
-
params: { page, page_size: PAGE_SIZE$
|
|
287279
|
+
params: { page, page_size: PAGE_SIZE$b, user_id: user.username },
|
|
286957
287280
|
});
|
|
286958
287281
|
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$
|
|
287282
|
+
const totalPages = (memoriesData === null || memoriesData === void 0 ? void 0 : memoriesData.count) ? Math.ceil(memoriesData.count / PAGE_SIZE$b) : 0;
|
|
286960
287283
|
const isForbidden = !!error && error.status === 403;
|
|
286961
287284
|
// The managed user's capture/personalization toggles, addressed through
|
|
286962
287285
|
// their path the way every admin write here is. Hidden unless they load.
|
|
@@ -287012,7 +287335,7 @@ function UserMemoriesModal({ isOpen, onClose, tenantKey, adminUsername, user, })
|
|
|
287012
287335
|
}), 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
287336
|
}
|
|
287014
287337
|
|
|
287015
|
-
const PAGE_SIZE$
|
|
287338
|
+
const PAGE_SIZE$a = 10;
|
|
287016
287339
|
const SEARCH_DEBOUNCE_MS = 300;
|
|
287017
287340
|
/**
|
|
287018
287341
|
* Tenant users table with server-side search. Opening a row shows that user's
|
|
@@ -287045,7 +287368,7 @@ function GlobalMemoriesSection({ tenantKey, username }) {
|
|
|
287045
287368
|
platform_key: tenantKey,
|
|
287046
287369
|
platform_org: tenantKey,
|
|
287047
287370
|
page,
|
|
287048
|
-
page_size: PAGE_SIZE$
|
|
287371
|
+
page_size: PAGE_SIZE$a,
|
|
287049
287372
|
query: debouncedSearch,
|
|
287050
287373
|
return_policies: 'false',
|
|
287051
287374
|
});
|
|
@@ -287066,13 +287389,1479 @@ function GlobalMemoriesSection({ tenantKey, username }) {
|
|
|
287066
287389
|
email: user.email,
|
|
287067
287390
|
}));
|
|
287068
287391
|
}, [data]);
|
|
287069
|
-
const totalPages = Math.ceil(((_a = data === null || data === void 0 ? void 0 : data.count) !== null && _a !== void 0 ? _a : 0) / PAGE_SIZE$
|
|
287392
|
+
const totalPages = Math.ceil(((_a = data === null || data === void 0 ? void 0 : data.count) !== null && _a !== void 0 ? _a : 0) / PAGE_SIZE$a);
|
|
287070
287393
|
const isForbidden = !!error && error.status === 403;
|
|
287071
287394
|
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
287395
|
name: user.email || user.username,
|
|
287073
287396
|
}), 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
287397
|
}
|
|
287075
287398
|
|
|
287399
|
+
const formatDistanceLocale$2 = {
|
|
287400
|
+
lessThanXSeconds: {
|
|
287401
|
+
one: "menos de un segundo",
|
|
287402
|
+
other: "menos de {{count}} segundos",
|
|
287403
|
+
},
|
|
287404
|
+
|
|
287405
|
+
xSeconds: {
|
|
287406
|
+
one: "1 segundo",
|
|
287407
|
+
other: "{{count}} segundos",
|
|
287408
|
+
},
|
|
287409
|
+
|
|
287410
|
+
halfAMinute: "medio minuto",
|
|
287411
|
+
|
|
287412
|
+
lessThanXMinutes: {
|
|
287413
|
+
one: "menos de un minuto",
|
|
287414
|
+
other: "menos de {{count}} minutos",
|
|
287415
|
+
},
|
|
287416
|
+
|
|
287417
|
+
xMinutes: {
|
|
287418
|
+
one: "1 minuto",
|
|
287419
|
+
other: "{{count}} minutos",
|
|
287420
|
+
},
|
|
287421
|
+
|
|
287422
|
+
aboutXHours: {
|
|
287423
|
+
one: "alrededor de 1 hora",
|
|
287424
|
+
other: "alrededor de {{count}} horas",
|
|
287425
|
+
},
|
|
287426
|
+
|
|
287427
|
+
xHours: {
|
|
287428
|
+
one: "1 hora",
|
|
287429
|
+
other: "{{count}} horas",
|
|
287430
|
+
},
|
|
287431
|
+
|
|
287432
|
+
xDays: {
|
|
287433
|
+
one: "1 día",
|
|
287434
|
+
other: "{{count}} días",
|
|
287435
|
+
},
|
|
287436
|
+
|
|
287437
|
+
aboutXWeeks: {
|
|
287438
|
+
one: "alrededor de 1 semana",
|
|
287439
|
+
other: "alrededor de {{count}} semanas",
|
|
287440
|
+
},
|
|
287441
|
+
|
|
287442
|
+
xWeeks: {
|
|
287443
|
+
one: "1 semana",
|
|
287444
|
+
other: "{{count}} semanas",
|
|
287445
|
+
},
|
|
287446
|
+
|
|
287447
|
+
aboutXMonths: {
|
|
287448
|
+
one: "alrededor de 1 mes",
|
|
287449
|
+
other: "alrededor de {{count}} meses",
|
|
287450
|
+
},
|
|
287451
|
+
|
|
287452
|
+
xMonths: {
|
|
287453
|
+
one: "1 mes",
|
|
287454
|
+
other: "{{count}} meses",
|
|
287455
|
+
},
|
|
287456
|
+
|
|
287457
|
+
aboutXYears: {
|
|
287458
|
+
one: "alrededor de 1 año",
|
|
287459
|
+
other: "alrededor de {{count}} años",
|
|
287460
|
+
},
|
|
287461
|
+
|
|
287462
|
+
xYears: {
|
|
287463
|
+
one: "1 año",
|
|
287464
|
+
other: "{{count}} años",
|
|
287465
|
+
},
|
|
287466
|
+
|
|
287467
|
+
overXYears: {
|
|
287468
|
+
one: "más de 1 año",
|
|
287469
|
+
other: "más de {{count}} años",
|
|
287470
|
+
},
|
|
287471
|
+
|
|
287472
|
+
almostXYears: {
|
|
287473
|
+
one: "casi 1 año",
|
|
287474
|
+
other: "casi {{count}} años",
|
|
287475
|
+
},
|
|
287476
|
+
};
|
|
287477
|
+
|
|
287478
|
+
const formatDistance$2 = (token, count, options) => {
|
|
287479
|
+
let result;
|
|
287480
|
+
|
|
287481
|
+
const tokenValue = formatDistanceLocale$2[token];
|
|
287482
|
+
if (typeof tokenValue === "string") {
|
|
287483
|
+
result = tokenValue;
|
|
287484
|
+
} else if (count === 1) {
|
|
287485
|
+
result = tokenValue.one;
|
|
287486
|
+
} else {
|
|
287487
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
287488
|
+
}
|
|
287489
|
+
|
|
287490
|
+
if (options?.addSuffix) {
|
|
287491
|
+
if (options.comparison && options.comparison > 0) {
|
|
287492
|
+
return "en " + result;
|
|
287493
|
+
} else {
|
|
287494
|
+
return "hace " + result;
|
|
287495
|
+
}
|
|
287496
|
+
}
|
|
287497
|
+
|
|
287498
|
+
return result;
|
|
287499
|
+
};
|
|
287500
|
+
|
|
287501
|
+
const dateFormats$2 = {
|
|
287502
|
+
full: "EEEE, d 'de' MMMM 'de' y",
|
|
287503
|
+
long: "d 'de' MMMM 'de' y",
|
|
287504
|
+
medium: "d MMM y",
|
|
287505
|
+
short: "dd/MM/y",
|
|
287506
|
+
};
|
|
287507
|
+
|
|
287508
|
+
const timeFormats$2 = {
|
|
287509
|
+
full: "HH:mm:ss zzzz",
|
|
287510
|
+
long: "HH:mm:ss z",
|
|
287511
|
+
medium: "HH:mm:ss",
|
|
287512
|
+
short: "HH:mm",
|
|
287513
|
+
};
|
|
287514
|
+
|
|
287515
|
+
const dateTimeFormats$2 = {
|
|
287516
|
+
full: "{{date}} 'a las' {{time}}",
|
|
287517
|
+
long: "{{date}} 'a las' {{time}}",
|
|
287518
|
+
medium: "{{date}}, {{time}}",
|
|
287519
|
+
short: "{{date}}, {{time}}",
|
|
287520
|
+
};
|
|
287521
|
+
|
|
287522
|
+
const formatLong$2 = {
|
|
287523
|
+
date: buildFormatLongFn({
|
|
287524
|
+
formats: dateFormats$2,
|
|
287525
|
+
defaultWidth: "full",
|
|
287526
|
+
}),
|
|
287527
|
+
|
|
287528
|
+
time: buildFormatLongFn({
|
|
287529
|
+
formats: timeFormats$2,
|
|
287530
|
+
defaultWidth: "full",
|
|
287531
|
+
}),
|
|
287532
|
+
|
|
287533
|
+
dateTime: buildFormatLongFn({
|
|
287534
|
+
formats: dateTimeFormats$2,
|
|
287535
|
+
defaultWidth: "full",
|
|
287536
|
+
}),
|
|
287537
|
+
};
|
|
287538
|
+
|
|
287539
|
+
const formatRelativeLocale$2 = {
|
|
287540
|
+
lastWeek: "'el' eeee 'pasado a la' p",
|
|
287541
|
+
yesterday: "'ayer a la' p",
|
|
287542
|
+
today: "'hoy a la' p",
|
|
287543
|
+
tomorrow: "'mañana a la' p",
|
|
287544
|
+
nextWeek: "eeee 'a la' p",
|
|
287545
|
+
other: "P",
|
|
287546
|
+
};
|
|
287547
|
+
|
|
287548
|
+
const formatRelativeLocalePlural = {
|
|
287549
|
+
lastWeek: "'el' eeee 'pasado a las' p",
|
|
287550
|
+
yesterday: "'ayer a las' p",
|
|
287551
|
+
today: "'hoy a las' p",
|
|
287552
|
+
tomorrow: "'mañana a las' p",
|
|
287553
|
+
nextWeek: "eeee 'a las' p",
|
|
287554
|
+
other: "P",
|
|
287555
|
+
};
|
|
287556
|
+
|
|
287557
|
+
const formatRelative$2 = (token, date, _baseDate, _options) => {
|
|
287558
|
+
if (date.getHours() !== 1) {
|
|
287559
|
+
return formatRelativeLocalePlural[token];
|
|
287560
|
+
} else {
|
|
287561
|
+
return formatRelativeLocale$2[token];
|
|
287562
|
+
}
|
|
287563
|
+
};
|
|
287564
|
+
|
|
287565
|
+
const eraValues$2 = {
|
|
287566
|
+
narrow: ["AC", "DC"],
|
|
287567
|
+
abbreviated: ["AC", "DC"],
|
|
287568
|
+
wide: ["antes de cristo", "después de cristo"],
|
|
287569
|
+
};
|
|
287570
|
+
|
|
287571
|
+
const quarterValues$2 = {
|
|
287572
|
+
narrow: ["1", "2", "3", "4"],
|
|
287573
|
+
abbreviated: ["T1", "T2", "T3", "T4"],
|
|
287574
|
+
wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"],
|
|
287575
|
+
};
|
|
287576
|
+
|
|
287577
|
+
const monthValues$2 = {
|
|
287578
|
+
narrow: ["e", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
|
287579
|
+
abbreviated: [
|
|
287580
|
+
"ene",
|
|
287581
|
+
"feb",
|
|
287582
|
+
"mar",
|
|
287583
|
+
"abr",
|
|
287584
|
+
"may",
|
|
287585
|
+
"jun",
|
|
287586
|
+
"jul",
|
|
287587
|
+
"ago",
|
|
287588
|
+
"sep",
|
|
287589
|
+
"oct",
|
|
287590
|
+
"nov",
|
|
287591
|
+
"dic",
|
|
287592
|
+
],
|
|
287593
|
+
|
|
287594
|
+
wide: [
|
|
287595
|
+
"enero",
|
|
287596
|
+
"febrero",
|
|
287597
|
+
"marzo",
|
|
287598
|
+
"abril",
|
|
287599
|
+
"mayo",
|
|
287600
|
+
"junio",
|
|
287601
|
+
"julio",
|
|
287602
|
+
"agosto",
|
|
287603
|
+
"septiembre",
|
|
287604
|
+
"octubre",
|
|
287605
|
+
"noviembre",
|
|
287606
|
+
"diciembre",
|
|
287607
|
+
],
|
|
287608
|
+
};
|
|
287609
|
+
|
|
287610
|
+
const dayValues$2 = {
|
|
287611
|
+
narrow: ["d", "l", "m", "m", "j", "v", "s"],
|
|
287612
|
+
short: ["do", "lu", "ma", "mi", "ju", "vi", "sá"],
|
|
287613
|
+
abbreviated: ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"],
|
|
287614
|
+
wide: [
|
|
287615
|
+
"domingo",
|
|
287616
|
+
"lunes",
|
|
287617
|
+
"martes",
|
|
287618
|
+
"miércoles",
|
|
287619
|
+
"jueves",
|
|
287620
|
+
"viernes",
|
|
287621
|
+
"sábado",
|
|
287622
|
+
],
|
|
287623
|
+
};
|
|
287624
|
+
|
|
287625
|
+
const dayPeriodValues$2 = {
|
|
287626
|
+
narrow: {
|
|
287627
|
+
am: "a",
|
|
287628
|
+
pm: "p",
|
|
287629
|
+
midnight: "mn",
|
|
287630
|
+
noon: "md",
|
|
287631
|
+
morning: "mañana",
|
|
287632
|
+
afternoon: "tarde",
|
|
287633
|
+
evening: "tarde",
|
|
287634
|
+
night: "noche",
|
|
287635
|
+
},
|
|
287636
|
+
abbreviated: {
|
|
287637
|
+
am: "AM",
|
|
287638
|
+
pm: "PM",
|
|
287639
|
+
midnight: "medianoche",
|
|
287640
|
+
noon: "mediodia",
|
|
287641
|
+
morning: "mañana",
|
|
287642
|
+
afternoon: "tarde",
|
|
287643
|
+
evening: "tarde",
|
|
287644
|
+
night: "noche",
|
|
287645
|
+
},
|
|
287646
|
+
wide: {
|
|
287647
|
+
am: "a.m.",
|
|
287648
|
+
pm: "p.m.",
|
|
287649
|
+
midnight: "medianoche",
|
|
287650
|
+
noon: "mediodia",
|
|
287651
|
+
morning: "mañana",
|
|
287652
|
+
afternoon: "tarde",
|
|
287653
|
+
evening: "tarde",
|
|
287654
|
+
night: "noche",
|
|
287655
|
+
},
|
|
287656
|
+
};
|
|
287657
|
+
|
|
287658
|
+
const formattingDayPeriodValues$1 = {
|
|
287659
|
+
narrow: {
|
|
287660
|
+
am: "a",
|
|
287661
|
+
pm: "p",
|
|
287662
|
+
midnight: "mn",
|
|
287663
|
+
noon: "md",
|
|
287664
|
+
morning: "de la mañana",
|
|
287665
|
+
afternoon: "de la tarde",
|
|
287666
|
+
evening: "de la tarde",
|
|
287667
|
+
night: "de la noche",
|
|
287668
|
+
},
|
|
287669
|
+
abbreviated: {
|
|
287670
|
+
am: "AM",
|
|
287671
|
+
pm: "PM",
|
|
287672
|
+
midnight: "medianoche",
|
|
287673
|
+
noon: "mediodia",
|
|
287674
|
+
morning: "de la mañana",
|
|
287675
|
+
afternoon: "de la tarde",
|
|
287676
|
+
evening: "de la tarde",
|
|
287677
|
+
night: "de la noche",
|
|
287678
|
+
},
|
|
287679
|
+
wide: {
|
|
287680
|
+
am: "a.m.",
|
|
287681
|
+
pm: "p.m.",
|
|
287682
|
+
midnight: "medianoche",
|
|
287683
|
+
noon: "mediodia",
|
|
287684
|
+
morning: "de la mañana",
|
|
287685
|
+
afternoon: "de la tarde",
|
|
287686
|
+
evening: "de la tarde",
|
|
287687
|
+
night: "de la noche",
|
|
287688
|
+
},
|
|
287689
|
+
};
|
|
287690
|
+
|
|
287691
|
+
const ordinalNumber$2 = (dirtyNumber, _options) => {
|
|
287692
|
+
const number = Number(dirtyNumber);
|
|
287693
|
+
return number + "º";
|
|
287694
|
+
};
|
|
287695
|
+
|
|
287696
|
+
const localize$2 = {
|
|
287697
|
+
ordinalNumber: ordinalNumber$2,
|
|
287698
|
+
|
|
287699
|
+
era: buildLocalizeFn({
|
|
287700
|
+
values: eraValues$2,
|
|
287701
|
+
defaultWidth: "wide",
|
|
287702
|
+
}),
|
|
287703
|
+
|
|
287704
|
+
quarter: buildLocalizeFn({
|
|
287705
|
+
values: quarterValues$2,
|
|
287706
|
+
defaultWidth: "wide",
|
|
287707
|
+
argumentCallback: (quarter) => Number(quarter) - 1,
|
|
287708
|
+
}),
|
|
287709
|
+
|
|
287710
|
+
month: buildLocalizeFn({
|
|
287711
|
+
values: monthValues$2,
|
|
287712
|
+
defaultWidth: "wide",
|
|
287713
|
+
}),
|
|
287714
|
+
|
|
287715
|
+
day: buildLocalizeFn({
|
|
287716
|
+
values: dayValues$2,
|
|
287717
|
+
defaultWidth: "wide",
|
|
287718
|
+
}),
|
|
287719
|
+
|
|
287720
|
+
dayPeriod: buildLocalizeFn({
|
|
287721
|
+
values: dayPeriodValues$2,
|
|
287722
|
+
defaultWidth: "wide",
|
|
287723
|
+
formattingValues: formattingDayPeriodValues$1,
|
|
287724
|
+
defaultFormattingWidth: "wide",
|
|
287725
|
+
}),
|
|
287726
|
+
};
|
|
287727
|
+
|
|
287728
|
+
const matchOrdinalNumberPattern$2 = /^(\d+)(º)?/i;
|
|
287729
|
+
const parseOrdinalNumberPattern$2 = /\d+/i;
|
|
287730
|
+
|
|
287731
|
+
const matchEraPatterns$2 = {
|
|
287732
|
+
narrow: /^(ac|dc|a|d)/i,
|
|
287733
|
+
abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
|
|
287734
|
+
wide: /^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i,
|
|
287735
|
+
};
|
|
287736
|
+
const parseEraPatterns$2 = {
|
|
287737
|
+
any: [/^ac/i, /^dc/i],
|
|
287738
|
+
wide: [
|
|
287739
|
+
/^(antes de cristo|antes de la era com[uú]n)/i,
|
|
287740
|
+
/^(despu[eé]s de cristo|era com[uú]n)/i,
|
|
287741
|
+
],
|
|
287742
|
+
};
|
|
287743
|
+
|
|
287744
|
+
const matchQuarterPatterns$2 = {
|
|
287745
|
+
narrow: /^[1234]/i,
|
|
287746
|
+
abbreviated: /^T[1234]/i,
|
|
287747
|
+
wide: /^[1234](º)? trimestre/i,
|
|
287748
|
+
};
|
|
287749
|
+
const parseQuarterPatterns$2 = {
|
|
287750
|
+
any: [/1/i, /2/i, /3/i, /4/i],
|
|
287751
|
+
};
|
|
287752
|
+
|
|
287753
|
+
const matchMonthPatterns$2 = {
|
|
287754
|
+
narrow: /^[efmajsond]/i,
|
|
287755
|
+
abbreviated: /^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,
|
|
287756
|
+
wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
|
|
287757
|
+
};
|
|
287758
|
+
const parseMonthPatterns$2 = {
|
|
287759
|
+
narrow: [
|
|
287760
|
+
/^e/i,
|
|
287761
|
+
/^f/i,
|
|
287762
|
+
/^m/i,
|
|
287763
|
+
/^a/i,
|
|
287764
|
+
/^m/i,
|
|
287765
|
+
/^j/i,
|
|
287766
|
+
/^j/i,
|
|
287767
|
+
/^a/i,
|
|
287768
|
+
/^s/i,
|
|
287769
|
+
/^o/i,
|
|
287770
|
+
/^n/i,
|
|
287771
|
+
/^d/i,
|
|
287772
|
+
],
|
|
287773
|
+
|
|
287774
|
+
any: [
|
|
287775
|
+
/^en/i,
|
|
287776
|
+
/^feb/i,
|
|
287777
|
+
/^mar/i,
|
|
287778
|
+
/^abr/i,
|
|
287779
|
+
/^may/i,
|
|
287780
|
+
/^jun/i,
|
|
287781
|
+
/^jul/i,
|
|
287782
|
+
/^ago/i,
|
|
287783
|
+
/^sep/i,
|
|
287784
|
+
/^oct/i,
|
|
287785
|
+
/^nov/i,
|
|
287786
|
+
/^dic/i,
|
|
287787
|
+
],
|
|
287788
|
+
};
|
|
287789
|
+
|
|
287790
|
+
const matchDayPatterns$2 = {
|
|
287791
|
+
narrow: /^[dlmjvs]/i,
|
|
287792
|
+
short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,
|
|
287793
|
+
abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,
|
|
287794
|
+
wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i,
|
|
287795
|
+
};
|
|
287796
|
+
const parseDayPatterns$2 = {
|
|
287797
|
+
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
|
|
287798
|
+
any: [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i],
|
|
287799
|
+
};
|
|
287800
|
+
|
|
287801
|
+
const matchDayPeriodPatterns$2 = {
|
|
287802
|
+
narrow: /^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,
|
|
287803
|
+
any: /^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i,
|
|
287804
|
+
};
|
|
287805
|
+
const parseDayPeriodPatterns$2 = {
|
|
287806
|
+
any: {
|
|
287807
|
+
am: /^a/i,
|
|
287808
|
+
pm: /^p/i,
|
|
287809
|
+
midnight: /^mn/i,
|
|
287810
|
+
noon: /^md/i,
|
|
287811
|
+
morning: /mañana/i,
|
|
287812
|
+
afternoon: /tarde/i,
|
|
287813
|
+
evening: /tarde/i,
|
|
287814
|
+
night: /noche/i,
|
|
287815
|
+
},
|
|
287816
|
+
};
|
|
287817
|
+
|
|
287818
|
+
const match$2 = {
|
|
287819
|
+
ordinalNumber: buildMatchPatternFn({
|
|
287820
|
+
matchPattern: matchOrdinalNumberPattern$2,
|
|
287821
|
+
parsePattern: parseOrdinalNumberPattern$2,
|
|
287822
|
+
valueCallback: function (value) {
|
|
287823
|
+
return parseInt(value, 10);
|
|
287824
|
+
},
|
|
287825
|
+
}),
|
|
287826
|
+
|
|
287827
|
+
era: buildMatchFn({
|
|
287828
|
+
matchPatterns: matchEraPatterns$2,
|
|
287829
|
+
defaultMatchWidth: "wide",
|
|
287830
|
+
parsePatterns: parseEraPatterns$2,
|
|
287831
|
+
defaultParseWidth: "any",
|
|
287832
|
+
}),
|
|
287833
|
+
|
|
287834
|
+
quarter: buildMatchFn({
|
|
287835
|
+
matchPatterns: matchQuarterPatterns$2,
|
|
287836
|
+
defaultMatchWidth: "wide",
|
|
287837
|
+
parsePatterns: parseQuarterPatterns$2,
|
|
287838
|
+
defaultParseWidth: "any",
|
|
287839
|
+
valueCallback: (index) => index + 1,
|
|
287840
|
+
}),
|
|
287841
|
+
|
|
287842
|
+
month: buildMatchFn({
|
|
287843
|
+
matchPatterns: matchMonthPatterns$2,
|
|
287844
|
+
defaultMatchWidth: "wide",
|
|
287845
|
+
parsePatterns: parseMonthPatterns$2,
|
|
287846
|
+
defaultParseWidth: "any",
|
|
287847
|
+
}),
|
|
287848
|
+
|
|
287849
|
+
day: buildMatchFn({
|
|
287850
|
+
matchPatterns: matchDayPatterns$2,
|
|
287851
|
+
defaultMatchWidth: "wide",
|
|
287852
|
+
parsePatterns: parseDayPatterns$2,
|
|
287853
|
+
defaultParseWidth: "any",
|
|
287854
|
+
}),
|
|
287855
|
+
|
|
287856
|
+
dayPeriod: buildMatchFn({
|
|
287857
|
+
matchPatterns: matchDayPeriodPatterns$2,
|
|
287858
|
+
defaultMatchWidth: "any",
|
|
287859
|
+
parsePatterns: parseDayPeriodPatterns$2,
|
|
287860
|
+
defaultParseWidth: "any",
|
|
287861
|
+
}),
|
|
287862
|
+
};
|
|
287863
|
+
|
|
287864
|
+
/**
|
|
287865
|
+
* @category Locales
|
|
287866
|
+
* @summary Spanish locale.
|
|
287867
|
+
* @language Spanish
|
|
287868
|
+
* @iso-639-2 spa
|
|
287869
|
+
* @author Juan Angosto [@juanangosto](https://github.com/juanangosto)
|
|
287870
|
+
* @author Guillermo Grau [@guigrpa](https://github.com/guigrpa)
|
|
287871
|
+
* @author Fernando Agüero [@fjaguero](https://github.com/fjaguero)
|
|
287872
|
+
* @author Gastón Haro [@harogaston](https://github.com/harogaston)
|
|
287873
|
+
* @author Yago Carballo [@YagoCarballo](https://github.com/YagoCarballo)
|
|
287874
|
+
*/
|
|
287875
|
+
const es = {
|
|
287876
|
+
code: "es",
|
|
287877
|
+
formatDistance: formatDistance$2,
|
|
287878
|
+
formatLong: formatLong$2,
|
|
287879
|
+
formatRelative: formatRelative$2,
|
|
287880
|
+
localize: localize$2,
|
|
287881
|
+
match: match$2,
|
|
287882
|
+
options: {
|
|
287883
|
+
weekStartsOn: 1 /* Monday */,
|
|
287884
|
+
firstWeekContainsDate: 1,
|
|
287885
|
+
},
|
|
287886
|
+
};
|
|
287887
|
+
|
|
287888
|
+
const formatDistanceLocale$1 = {
|
|
287889
|
+
lessThanXSeconds: {
|
|
287890
|
+
one: "moins d’une seconde",
|
|
287891
|
+
other: "moins de {{count}} secondes",
|
|
287892
|
+
},
|
|
287893
|
+
|
|
287894
|
+
xSeconds: {
|
|
287895
|
+
one: "1 seconde",
|
|
287896
|
+
other: "{{count}} secondes",
|
|
287897
|
+
},
|
|
287898
|
+
|
|
287899
|
+
halfAMinute: "30 secondes",
|
|
287900
|
+
|
|
287901
|
+
lessThanXMinutes: {
|
|
287902
|
+
one: "moins d’une minute",
|
|
287903
|
+
other: "moins de {{count}} minutes",
|
|
287904
|
+
},
|
|
287905
|
+
|
|
287906
|
+
xMinutes: {
|
|
287907
|
+
one: "1 minute",
|
|
287908
|
+
other: "{{count}} minutes",
|
|
287909
|
+
},
|
|
287910
|
+
|
|
287911
|
+
aboutXHours: {
|
|
287912
|
+
one: "environ 1 heure",
|
|
287913
|
+
other: "environ {{count}} heures",
|
|
287914
|
+
},
|
|
287915
|
+
|
|
287916
|
+
xHours: {
|
|
287917
|
+
one: "1 heure",
|
|
287918
|
+
other: "{{count}} heures",
|
|
287919
|
+
},
|
|
287920
|
+
|
|
287921
|
+
xDays: {
|
|
287922
|
+
one: "1 jour",
|
|
287923
|
+
other: "{{count}} jours",
|
|
287924
|
+
},
|
|
287925
|
+
|
|
287926
|
+
aboutXWeeks: {
|
|
287927
|
+
one: "environ 1 semaine",
|
|
287928
|
+
other: "environ {{count}} semaines",
|
|
287929
|
+
},
|
|
287930
|
+
|
|
287931
|
+
xWeeks: {
|
|
287932
|
+
one: "1 semaine",
|
|
287933
|
+
other: "{{count}} semaines",
|
|
287934
|
+
},
|
|
287935
|
+
|
|
287936
|
+
aboutXMonths: {
|
|
287937
|
+
one: "environ 1 mois",
|
|
287938
|
+
other: "environ {{count}} mois",
|
|
287939
|
+
},
|
|
287940
|
+
|
|
287941
|
+
xMonths: {
|
|
287942
|
+
one: "1 mois",
|
|
287943
|
+
other: "{{count}} mois",
|
|
287944
|
+
},
|
|
287945
|
+
|
|
287946
|
+
aboutXYears: {
|
|
287947
|
+
one: "environ 1 an",
|
|
287948
|
+
other: "environ {{count}} ans",
|
|
287949
|
+
},
|
|
287950
|
+
|
|
287951
|
+
xYears: {
|
|
287952
|
+
one: "1 an",
|
|
287953
|
+
other: "{{count}} ans",
|
|
287954
|
+
},
|
|
287955
|
+
|
|
287956
|
+
overXYears: {
|
|
287957
|
+
one: "plus d’un an",
|
|
287958
|
+
other: "plus de {{count}} ans",
|
|
287959
|
+
},
|
|
287960
|
+
|
|
287961
|
+
almostXYears: {
|
|
287962
|
+
one: "presqu’un an",
|
|
287963
|
+
other: "presque {{count}} ans",
|
|
287964
|
+
},
|
|
287965
|
+
};
|
|
287966
|
+
|
|
287967
|
+
const formatDistance$1 = (token, count, options) => {
|
|
287968
|
+
let result;
|
|
287969
|
+
const form = formatDistanceLocale$1[token];
|
|
287970
|
+
if (typeof form === "string") {
|
|
287971
|
+
result = form;
|
|
287972
|
+
} else if (count === 1) {
|
|
287973
|
+
result = form.one;
|
|
287974
|
+
} else {
|
|
287975
|
+
result = form.other.replace("{{count}}", String(count));
|
|
287976
|
+
}
|
|
287977
|
+
|
|
287978
|
+
if (options?.addSuffix) {
|
|
287979
|
+
if (options.comparison && options.comparison > 0) {
|
|
287980
|
+
return "dans " + result;
|
|
287981
|
+
} else {
|
|
287982
|
+
return "il y a " + result;
|
|
287983
|
+
}
|
|
287984
|
+
}
|
|
287985
|
+
|
|
287986
|
+
return result;
|
|
287987
|
+
};
|
|
287988
|
+
|
|
287989
|
+
const dateFormats$1 = {
|
|
287990
|
+
full: "EEEE d MMMM y",
|
|
287991
|
+
long: "d MMMM y",
|
|
287992
|
+
medium: "d MMM y",
|
|
287993
|
+
short: "dd/MM/y",
|
|
287994
|
+
};
|
|
287995
|
+
|
|
287996
|
+
const timeFormats$1 = {
|
|
287997
|
+
full: "HH:mm:ss zzzz",
|
|
287998
|
+
long: "HH:mm:ss z",
|
|
287999
|
+
medium: "HH:mm:ss",
|
|
288000
|
+
short: "HH:mm",
|
|
288001
|
+
};
|
|
288002
|
+
|
|
288003
|
+
const dateTimeFormats$1 = {
|
|
288004
|
+
full: "{{date}} 'à' {{time}}",
|
|
288005
|
+
long: "{{date}} 'à' {{time}}",
|
|
288006
|
+
medium: "{{date}}, {{time}}",
|
|
288007
|
+
short: "{{date}}, {{time}}",
|
|
288008
|
+
};
|
|
288009
|
+
|
|
288010
|
+
const formatLong$1 = {
|
|
288011
|
+
date: buildFormatLongFn({
|
|
288012
|
+
formats: dateFormats$1,
|
|
288013
|
+
defaultWidth: "full",
|
|
288014
|
+
}),
|
|
288015
|
+
|
|
288016
|
+
time: buildFormatLongFn({
|
|
288017
|
+
formats: timeFormats$1,
|
|
288018
|
+
defaultWidth: "full",
|
|
288019
|
+
}),
|
|
288020
|
+
|
|
288021
|
+
dateTime: buildFormatLongFn({
|
|
288022
|
+
formats: dateTimeFormats$1,
|
|
288023
|
+
defaultWidth: "full",
|
|
288024
|
+
}),
|
|
288025
|
+
};
|
|
288026
|
+
|
|
288027
|
+
const formatRelativeLocale$1 = {
|
|
288028
|
+
lastWeek: "eeee 'dernier à' p",
|
|
288029
|
+
yesterday: "'hier à' p",
|
|
288030
|
+
today: "'aujourd’hui à' p",
|
|
288031
|
+
tomorrow: "'demain à' p'",
|
|
288032
|
+
nextWeek: "eeee 'prochain à' p",
|
|
288033
|
+
other: "P",
|
|
288034
|
+
};
|
|
288035
|
+
|
|
288036
|
+
const formatRelative$1 = (token, _date, _baseDate, _options) =>
|
|
288037
|
+
formatRelativeLocale$1[token];
|
|
288038
|
+
|
|
288039
|
+
const eraValues$1 = {
|
|
288040
|
+
narrow: ["av. J.-C", "ap. J.-C"],
|
|
288041
|
+
abbreviated: ["av. J.-C", "ap. J.-C"],
|
|
288042
|
+
wide: ["avant Jésus-Christ", "après Jésus-Christ"],
|
|
288043
|
+
};
|
|
288044
|
+
|
|
288045
|
+
const quarterValues$1 = {
|
|
288046
|
+
narrow: ["T1", "T2", "T3", "T4"],
|
|
288047
|
+
abbreviated: ["1er trim.", "2ème trim.", "3ème trim.", "4ème trim."],
|
|
288048
|
+
wide: ["1er trimestre", "2ème trimestre", "3ème trimestre", "4ème trimestre"],
|
|
288049
|
+
};
|
|
288050
|
+
|
|
288051
|
+
const monthValues$1 = {
|
|
288052
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
288053
|
+
abbreviated: [
|
|
288054
|
+
"janv.",
|
|
288055
|
+
"févr.",
|
|
288056
|
+
"mars",
|
|
288057
|
+
"avr.",
|
|
288058
|
+
"mai",
|
|
288059
|
+
"juin",
|
|
288060
|
+
"juil.",
|
|
288061
|
+
"août",
|
|
288062
|
+
"sept.",
|
|
288063
|
+
"oct.",
|
|
288064
|
+
"nov.",
|
|
288065
|
+
"déc.",
|
|
288066
|
+
],
|
|
288067
|
+
|
|
288068
|
+
wide: [
|
|
288069
|
+
"janvier",
|
|
288070
|
+
"février",
|
|
288071
|
+
"mars",
|
|
288072
|
+
"avril",
|
|
288073
|
+
"mai",
|
|
288074
|
+
"juin",
|
|
288075
|
+
"juillet",
|
|
288076
|
+
"août",
|
|
288077
|
+
"septembre",
|
|
288078
|
+
"octobre",
|
|
288079
|
+
"novembre",
|
|
288080
|
+
"décembre",
|
|
288081
|
+
],
|
|
288082
|
+
};
|
|
288083
|
+
|
|
288084
|
+
const dayValues$1 = {
|
|
288085
|
+
narrow: ["D", "L", "M", "M", "J", "V", "S"],
|
|
288086
|
+
short: ["di", "lu", "ma", "me", "je", "ve", "sa"],
|
|
288087
|
+
abbreviated: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."],
|
|
288088
|
+
|
|
288089
|
+
wide: [
|
|
288090
|
+
"dimanche",
|
|
288091
|
+
"lundi",
|
|
288092
|
+
"mardi",
|
|
288093
|
+
"mercredi",
|
|
288094
|
+
"jeudi",
|
|
288095
|
+
"vendredi",
|
|
288096
|
+
"samedi",
|
|
288097
|
+
],
|
|
288098
|
+
};
|
|
288099
|
+
|
|
288100
|
+
const dayPeriodValues$1 = {
|
|
288101
|
+
narrow: {
|
|
288102
|
+
am: "AM",
|
|
288103
|
+
pm: "PM",
|
|
288104
|
+
midnight: "minuit",
|
|
288105
|
+
noon: "midi",
|
|
288106
|
+
morning: "mat.",
|
|
288107
|
+
afternoon: "ap.m.",
|
|
288108
|
+
evening: "soir",
|
|
288109
|
+
night: "mat.",
|
|
288110
|
+
},
|
|
288111
|
+
abbreviated: {
|
|
288112
|
+
am: "AM",
|
|
288113
|
+
pm: "PM",
|
|
288114
|
+
midnight: "minuit",
|
|
288115
|
+
noon: "midi",
|
|
288116
|
+
morning: "matin",
|
|
288117
|
+
afternoon: "après-midi",
|
|
288118
|
+
evening: "soir",
|
|
288119
|
+
night: "matin",
|
|
288120
|
+
},
|
|
288121
|
+
wide: {
|
|
288122
|
+
am: "AM",
|
|
288123
|
+
pm: "PM",
|
|
288124
|
+
midnight: "minuit",
|
|
288125
|
+
noon: "midi",
|
|
288126
|
+
morning: "du matin",
|
|
288127
|
+
afternoon: "de l’après-midi",
|
|
288128
|
+
evening: "du soir",
|
|
288129
|
+
night: "du matin",
|
|
288130
|
+
},
|
|
288131
|
+
};
|
|
288132
|
+
|
|
288133
|
+
const ordinalNumber$1 = (dirtyNumber, options) => {
|
|
288134
|
+
const number = Number(dirtyNumber);
|
|
288135
|
+
const unit = options?.unit;
|
|
288136
|
+
|
|
288137
|
+
if (number === 0) return "0";
|
|
288138
|
+
|
|
288139
|
+
const feminineUnits = ["year", "week", "hour", "minute", "second"];
|
|
288140
|
+
let suffix;
|
|
288141
|
+
|
|
288142
|
+
if (number === 1) {
|
|
288143
|
+
suffix = unit && feminineUnits.includes(unit) ? "ère" : "er";
|
|
288144
|
+
} else {
|
|
288145
|
+
suffix = "ème";
|
|
288146
|
+
}
|
|
288147
|
+
|
|
288148
|
+
return number + suffix;
|
|
288149
|
+
};
|
|
288150
|
+
|
|
288151
|
+
const LONG_MONTHS_TOKENS = ["MMM", "MMMM"];
|
|
288152
|
+
|
|
288153
|
+
const localize$1 = {
|
|
288154
|
+
preprocessor: (date, parts) => {
|
|
288155
|
+
// Replaces the `do` tokens with `d` when used with long month tokens and the day of the month is greater than one.
|
|
288156
|
+
// Use case "do MMMM" => 1er août, 29 août
|
|
288157
|
+
// see https://github.com/date-fns/date-fns/issues/1391
|
|
288158
|
+
|
|
288159
|
+
if (date.getDate() === 1) return parts;
|
|
288160
|
+
|
|
288161
|
+
const hasLongMonthToken = parts.some(
|
|
288162
|
+
(part) => part.isToken && LONG_MONTHS_TOKENS.includes(part.value),
|
|
288163
|
+
);
|
|
288164
|
+
|
|
288165
|
+
if (!hasLongMonthToken) return parts;
|
|
288166
|
+
|
|
288167
|
+
return parts.map((part) =>
|
|
288168
|
+
part.isToken && part.value === "do"
|
|
288169
|
+
? { isToken: true, value: "d" }
|
|
288170
|
+
: part,
|
|
288171
|
+
);
|
|
288172
|
+
},
|
|
288173
|
+
|
|
288174
|
+
ordinalNumber: ordinalNumber$1,
|
|
288175
|
+
|
|
288176
|
+
era: buildLocalizeFn({
|
|
288177
|
+
values: eraValues$1,
|
|
288178
|
+
defaultWidth: "wide",
|
|
288179
|
+
}),
|
|
288180
|
+
|
|
288181
|
+
quarter: buildLocalizeFn({
|
|
288182
|
+
values: quarterValues$1,
|
|
288183
|
+
defaultWidth: "wide",
|
|
288184
|
+
argumentCallback: (quarter) => quarter - 1,
|
|
288185
|
+
}),
|
|
288186
|
+
|
|
288187
|
+
month: buildLocalizeFn({
|
|
288188
|
+
values: monthValues$1,
|
|
288189
|
+
defaultWidth: "wide",
|
|
288190
|
+
}),
|
|
288191
|
+
|
|
288192
|
+
day: buildLocalizeFn({
|
|
288193
|
+
values: dayValues$1,
|
|
288194
|
+
defaultWidth: "wide",
|
|
288195
|
+
}),
|
|
288196
|
+
|
|
288197
|
+
dayPeriod: buildLocalizeFn({
|
|
288198
|
+
values: dayPeriodValues$1,
|
|
288199
|
+
defaultWidth: "wide",
|
|
288200
|
+
}),
|
|
288201
|
+
};
|
|
288202
|
+
|
|
288203
|
+
const matchOrdinalNumberPattern$1 = /^(\d+)(ième|ère|ème|er|e)?/i;
|
|
288204
|
+
const parseOrdinalNumberPattern$1 = /\d+/i;
|
|
288205
|
+
|
|
288206
|
+
const matchEraPatterns$1 = {
|
|
288207
|
+
narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
|
|
288208
|
+
abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
|
|
288209
|
+
wide: /^(avant Jésus-Christ|après Jésus-Christ)/i,
|
|
288210
|
+
};
|
|
288211
|
+
const parseEraPatterns$1 = {
|
|
288212
|
+
any: [/^av/i, /^ap/i],
|
|
288213
|
+
};
|
|
288214
|
+
|
|
288215
|
+
const matchQuarterPatterns$1 = {
|
|
288216
|
+
narrow: /^T?[1234]/i,
|
|
288217
|
+
abbreviated: /^[1234](er|ème|e)? trim\.?/i,
|
|
288218
|
+
wide: /^[1234](er|ème|e)? trimestre/i,
|
|
288219
|
+
};
|
|
288220
|
+
const parseQuarterPatterns$1 = {
|
|
288221
|
+
any: [/1/i, /2/i, /3/i, /4/i],
|
|
288222
|
+
};
|
|
288223
|
+
|
|
288224
|
+
const matchMonthPatterns$1 = {
|
|
288225
|
+
narrow: /^[jfmasond]/i,
|
|
288226
|
+
abbreviated:
|
|
288227
|
+
/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
|
|
288228
|
+
wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
|
|
288229
|
+
};
|
|
288230
|
+
const parseMonthPatterns$1 = {
|
|
288231
|
+
narrow: [
|
|
288232
|
+
/^j/i,
|
|
288233
|
+
/^f/i,
|
|
288234
|
+
/^m/i,
|
|
288235
|
+
/^a/i,
|
|
288236
|
+
/^m/i,
|
|
288237
|
+
/^j/i,
|
|
288238
|
+
/^j/i,
|
|
288239
|
+
/^a/i,
|
|
288240
|
+
/^s/i,
|
|
288241
|
+
/^o/i,
|
|
288242
|
+
/^n/i,
|
|
288243
|
+
/^d/i,
|
|
288244
|
+
],
|
|
288245
|
+
|
|
288246
|
+
any: [
|
|
288247
|
+
/^ja/i,
|
|
288248
|
+
/^f/i,
|
|
288249
|
+
/^mar/i,
|
|
288250
|
+
/^av/i,
|
|
288251
|
+
/^ma/i,
|
|
288252
|
+
/^juin/i,
|
|
288253
|
+
/^juil/i,
|
|
288254
|
+
/^ao/i,
|
|
288255
|
+
/^s/i,
|
|
288256
|
+
/^o/i,
|
|
288257
|
+
/^n/i,
|
|
288258
|
+
/^d/i,
|
|
288259
|
+
],
|
|
288260
|
+
};
|
|
288261
|
+
|
|
288262
|
+
const matchDayPatterns$1 = {
|
|
288263
|
+
narrow: /^[lmjvsd]/i,
|
|
288264
|
+
short: /^(di|lu|ma|me|je|ve|sa)/i,
|
|
288265
|
+
abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
|
|
288266
|
+
wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i,
|
|
288267
|
+
};
|
|
288268
|
+
const parseDayPatterns$1 = {
|
|
288269
|
+
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
|
|
288270
|
+
any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i],
|
|
288271
|
+
};
|
|
288272
|
+
|
|
288273
|
+
const matchDayPeriodPatterns$1 = {
|
|
288274
|
+
narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
|
|
288275
|
+
any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i,
|
|
288276
|
+
};
|
|
288277
|
+
const parseDayPeriodPatterns$1 = {
|
|
288278
|
+
any: {
|
|
288279
|
+
am: /^a/i,
|
|
288280
|
+
pm: /^p/i,
|
|
288281
|
+
midnight: /^min/i,
|
|
288282
|
+
noon: /^mid/i,
|
|
288283
|
+
morning: /mat/i,
|
|
288284
|
+
afternoon: /ap/i,
|
|
288285
|
+
evening: /soir/i,
|
|
288286
|
+
night: /nuit/i,
|
|
288287
|
+
},
|
|
288288
|
+
};
|
|
288289
|
+
|
|
288290
|
+
const match$1 = {
|
|
288291
|
+
ordinalNumber: buildMatchPatternFn({
|
|
288292
|
+
matchPattern: matchOrdinalNumberPattern$1,
|
|
288293
|
+
parsePattern: parseOrdinalNumberPattern$1,
|
|
288294
|
+
valueCallback: (value) => parseInt(value),
|
|
288295
|
+
}),
|
|
288296
|
+
|
|
288297
|
+
era: buildMatchFn({
|
|
288298
|
+
matchPatterns: matchEraPatterns$1,
|
|
288299
|
+
defaultMatchWidth: "wide",
|
|
288300
|
+
parsePatterns: parseEraPatterns$1,
|
|
288301
|
+
defaultParseWidth: "any",
|
|
288302
|
+
}),
|
|
288303
|
+
|
|
288304
|
+
quarter: buildMatchFn({
|
|
288305
|
+
matchPatterns: matchQuarterPatterns$1,
|
|
288306
|
+
defaultMatchWidth: "wide",
|
|
288307
|
+
parsePatterns: parseQuarterPatterns$1,
|
|
288308
|
+
defaultParseWidth: "any",
|
|
288309
|
+
valueCallback: (index) => index + 1,
|
|
288310
|
+
}),
|
|
288311
|
+
|
|
288312
|
+
month: buildMatchFn({
|
|
288313
|
+
matchPatterns: matchMonthPatterns$1,
|
|
288314
|
+
defaultMatchWidth: "wide",
|
|
288315
|
+
parsePatterns: parseMonthPatterns$1,
|
|
288316
|
+
defaultParseWidth: "any",
|
|
288317
|
+
}),
|
|
288318
|
+
|
|
288319
|
+
day: buildMatchFn({
|
|
288320
|
+
matchPatterns: matchDayPatterns$1,
|
|
288321
|
+
defaultMatchWidth: "wide",
|
|
288322
|
+
parsePatterns: parseDayPatterns$1,
|
|
288323
|
+
defaultParseWidth: "any",
|
|
288324
|
+
}),
|
|
288325
|
+
|
|
288326
|
+
dayPeriod: buildMatchFn({
|
|
288327
|
+
matchPatterns: matchDayPeriodPatterns$1,
|
|
288328
|
+
defaultMatchWidth: "any",
|
|
288329
|
+
parsePatterns: parseDayPeriodPatterns$1,
|
|
288330
|
+
defaultParseWidth: "any",
|
|
288331
|
+
}),
|
|
288332
|
+
};
|
|
288333
|
+
|
|
288334
|
+
/**
|
|
288335
|
+
* @category Locales
|
|
288336
|
+
* @summary French locale.
|
|
288337
|
+
* @language French
|
|
288338
|
+
* @iso-639-2 fra
|
|
288339
|
+
* @author Jean Dupouy [@izeau](https://github.com/izeau)
|
|
288340
|
+
* @author François B [@fbonzon](https://github.com/fbonzon)
|
|
288341
|
+
*/
|
|
288342
|
+
const fr = {
|
|
288343
|
+
code: "fr",
|
|
288344
|
+
formatDistance: formatDistance$1,
|
|
288345
|
+
formatLong: formatLong$1,
|
|
288346
|
+
formatRelative: formatRelative$1,
|
|
288347
|
+
localize: localize$1,
|
|
288348
|
+
match: match$1,
|
|
288349
|
+
options: {
|
|
288350
|
+
weekStartsOn: 1 /* Monday */,
|
|
288351
|
+
firstWeekContainsDate: 4,
|
|
288352
|
+
},
|
|
288353
|
+
};
|
|
288354
|
+
|
|
288355
|
+
const formatDistanceLocale = {
|
|
288356
|
+
lessThanXSeconds: {
|
|
288357
|
+
one: "不到 1 秒",
|
|
288358
|
+
other: "不到 {{count}} 秒",
|
|
288359
|
+
},
|
|
288360
|
+
|
|
288361
|
+
xSeconds: {
|
|
288362
|
+
one: "1 秒",
|
|
288363
|
+
other: "{{count}} 秒",
|
|
288364
|
+
},
|
|
288365
|
+
|
|
288366
|
+
halfAMinute: "半分钟",
|
|
288367
|
+
|
|
288368
|
+
lessThanXMinutes: {
|
|
288369
|
+
one: "不到 1 分钟",
|
|
288370
|
+
other: "不到 {{count}} 分钟",
|
|
288371
|
+
},
|
|
288372
|
+
|
|
288373
|
+
xMinutes: {
|
|
288374
|
+
one: "1 分钟",
|
|
288375
|
+
other: "{{count}} 分钟",
|
|
288376
|
+
},
|
|
288377
|
+
|
|
288378
|
+
xHours: {
|
|
288379
|
+
one: "1 小时",
|
|
288380
|
+
other: "{{count}} 小时",
|
|
288381
|
+
},
|
|
288382
|
+
|
|
288383
|
+
aboutXHours: {
|
|
288384
|
+
one: "大约 1 小时",
|
|
288385
|
+
other: "大约 {{count}} 小时",
|
|
288386
|
+
},
|
|
288387
|
+
|
|
288388
|
+
xDays: {
|
|
288389
|
+
one: "1 天",
|
|
288390
|
+
other: "{{count}} 天",
|
|
288391
|
+
},
|
|
288392
|
+
|
|
288393
|
+
aboutXWeeks: {
|
|
288394
|
+
one: "大约 1 个星期",
|
|
288395
|
+
other: "大约 {{count}} 个星期",
|
|
288396
|
+
},
|
|
288397
|
+
|
|
288398
|
+
xWeeks: {
|
|
288399
|
+
one: "1 个星期",
|
|
288400
|
+
other: "{{count}} 个星期",
|
|
288401
|
+
},
|
|
288402
|
+
|
|
288403
|
+
aboutXMonths: {
|
|
288404
|
+
one: "大约 1 个月",
|
|
288405
|
+
other: "大约 {{count}} 个月",
|
|
288406
|
+
},
|
|
288407
|
+
|
|
288408
|
+
xMonths: {
|
|
288409
|
+
one: "1 个月",
|
|
288410
|
+
other: "{{count}} 个月",
|
|
288411
|
+
},
|
|
288412
|
+
|
|
288413
|
+
aboutXYears: {
|
|
288414
|
+
one: "大约 1 年",
|
|
288415
|
+
other: "大约 {{count}} 年",
|
|
288416
|
+
},
|
|
288417
|
+
|
|
288418
|
+
xYears: {
|
|
288419
|
+
one: "1 年",
|
|
288420
|
+
other: "{{count}} 年",
|
|
288421
|
+
},
|
|
288422
|
+
|
|
288423
|
+
overXYears: {
|
|
288424
|
+
one: "超过 1 年",
|
|
288425
|
+
other: "超过 {{count}} 年",
|
|
288426
|
+
},
|
|
288427
|
+
|
|
288428
|
+
almostXYears: {
|
|
288429
|
+
one: "将近 1 年",
|
|
288430
|
+
other: "将近 {{count}} 年",
|
|
288431
|
+
},
|
|
288432
|
+
};
|
|
288433
|
+
|
|
288434
|
+
const formatDistance = (token, count, options) => {
|
|
288435
|
+
let result;
|
|
288436
|
+
|
|
288437
|
+
const tokenValue = formatDistanceLocale[token];
|
|
288438
|
+
if (typeof tokenValue === "string") {
|
|
288439
|
+
result = tokenValue;
|
|
288440
|
+
} else if (count === 1) {
|
|
288441
|
+
result = tokenValue.one;
|
|
288442
|
+
} else {
|
|
288443
|
+
result = tokenValue.other.replace("{{count}}", String(count));
|
|
288444
|
+
}
|
|
288445
|
+
|
|
288446
|
+
if (options?.addSuffix) {
|
|
288447
|
+
if (options.comparison && options.comparison > 0) {
|
|
288448
|
+
return result + "内";
|
|
288449
|
+
} else {
|
|
288450
|
+
return result + "前";
|
|
288451
|
+
}
|
|
288452
|
+
}
|
|
288453
|
+
|
|
288454
|
+
return result;
|
|
288455
|
+
};
|
|
288456
|
+
|
|
288457
|
+
const dateFormats = {
|
|
288458
|
+
full: "y'年'M'月'd'日' EEEE",
|
|
288459
|
+
long: "y'年'M'月'd'日'",
|
|
288460
|
+
medium: "yyyy-MM-dd",
|
|
288461
|
+
short: "yy-MM-dd",
|
|
288462
|
+
};
|
|
288463
|
+
|
|
288464
|
+
const timeFormats = {
|
|
288465
|
+
full: "zzzz a h:mm:ss",
|
|
288466
|
+
long: "z a h:mm:ss",
|
|
288467
|
+
medium: "a h:mm:ss",
|
|
288468
|
+
short: "a h:mm",
|
|
288469
|
+
};
|
|
288470
|
+
|
|
288471
|
+
const dateTimeFormats = {
|
|
288472
|
+
full: "{{date}} {{time}}",
|
|
288473
|
+
long: "{{date}} {{time}}",
|
|
288474
|
+
medium: "{{date}} {{time}}",
|
|
288475
|
+
short: "{{date}} {{time}}",
|
|
288476
|
+
};
|
|
288477
|
+
|
|
288478
|
+
const formatLong = {
|
|
288479
|
+
date: buildFormatLongFn({
|
|
288480
|
+
formats: dateFormats,
|
|
288481
|
+
defaultWidth: "full",
|
|
288482
|
+
}),
|
|
288483
|
+
|
|
288484
|
+
time: buildFormatLongFn({
|
|
288485
|
+
formats: timeFormats,
|
|
288486
|
+
defaultWidth: "full",
|
|
288487
|
+
}),
|
|
288488
|
+
|
|
288489
|
+
dateTime: buildFormatLongFn({
|
|
288490
|
+
formats: dateTimeFormats,
|
|
288491
|
+
defaultWidth: "full",
|
|
288492
|
+
}),
|
|
288493
|
+
};
|
|
288494
|
+
|
|
288495
|
+
function checkWeek(date, baseDate, options) {
|
|
288496
|
+
const baseFormat = "eeee p";
|
|
288497
|
+
|
|
288498
|
+
if (isSameWeek(date, baseDate, options)) {
|
|
288499
|
+
return baseFormat; // in same week
|
|
288500
|
+
} else if (date.getTime() > baseDate.getTime()) {
|
|
288501
|
+
return "'下个'" + baseFormat; // in next week
|
|
288502
|
+
}
|
|
288503
|
+
return "'上个'" + baseFormat; // in last week
|
|
288504
|
+
}
|
|
288505
|
+
|
|
288506
|
+
const formatRelativeLocale = {
|
|
288507
|
+
lastWeek: checkWeek, // days before yesterday, maybe in this week or last week
|
|
288508
|
+
yesterday: "'昨天' p",
|
|
288509
|
+
today: "'今天' p",
|
|
288510
|
+
tomorrow: "'明天' p",
|
|
288511
|
+
nextWeek: checkWeek, // days after tomorrow, maybe in this week or next week
|
|
288512
|
+
other: "PP p",
|
|
288513
|
+
};
|
|
288514
|
+
|
|
288515
|
+
const formatRelative = (token, date, baseDate, options) => {
|
|
288516
|
+
const format = formatRelativeLocale[token];
|
|
288517
|
+
|
|
288518
|
+
if (typeof format === "function") {
|
|
288519
|
+
return format(date, baseDate, options);
|
|
288520
|
+
}
|
|
288521
|
+
|
|
288522
|
+
return format;
|
|
288523
|
+
};
|
|
288524
|
+
|
|
288525
|
+
const eraValues = {
|
|
288526
|
+
narrow: ["前", "公元"],
|
|
288527
|
+
abbreviated: ["前", "公元"],
|
|
288528
|
+
wide: ["公元前", "公元"],
|
|
288529
|
+
};
|
|
288530
|
+
|
|
288531
|
+
const quarterValues = {
|
|
288532
|
+
narrow: ["1", "2", "3", "4"],
|
|
288533
|
+
abbreviated: ["第一季", "第二季", "第三季", "第四季"],
|
|
288534
|
+
wide: ["第一季度", "第二季度", "第三季度", "第四季度"],
|
|
288535
|
+
};
|
|
288536
|
+
|
|
288537
|
+
const monthValues = {
|
|
288538
|
+
narrow: [
|
|
288539
|
+
"一",
|
|
288540
|
+
"二",
|
|
288541
|
+
"三",
|
|
288542
|
+
"四",
|
|
288543
|
+
"五",
|
|
288544
|
+
"六",
|
|
288545
|
+
"七",
|
|
288546
|
+
"八",
|
|
288547
|
+
"九",
|
|
288548
|
+
"十",
|
|
288549
|
+
"十一",
|
|
288550
|
+
"十二",
|
|
288551
|
+
],
|
|
288552
|
+
|
|
288553
|
+
abbreviated: [
|
|
288554
|
+
"1月",
|
|
288555
|
+
"2月",
|
|
288556
|
+
"3月",
|
|
288557
|
+
"4月",
|
|
288558
|
+
"5月",
|
|
288559
|
+
"6月",
|
|
288560
|
+
"7月",
|
|
288561
|
+
"8月",
|
|
288562
|
+
"9月",
|
|
288563
|
+
"10月",
|
|
288564
|
+
"11月",
|
|
288565
|
+
"12月",
|
|
288566
|
+
],
|
|
288567
|
+
|
|
288568
|
+
wide: [
|
|
288569
|
+
"一月",
|
|
288570
|
+
"二月",
|
|
288571
|
+
"三月",
|
|
288572
|
+
"四月",
|
|
288573
|
+
"五月",
|
|
288574
|
+
"六月",
|
|
288575
|
+
"七月",
|
|
288576
|
+
"八月",
|
|
288577
|
+
"九月",
|
|
288578
|
+
"十月",
|
|
288579
|
+
"十一月",
|
|
288580
|
+
"十二月",
|
|
288581
|
+
],
|
|
288582
|
+
};
|
|
288583
|
+
|
|
288584
|
+
const dayValues = {
|
|
288585
|
+
narrow: ["日", "一", "二", "三", "四", "五", "六"],
|
|
288586
|
+
short: ["日", "一", "二", "三", "四", "五", "六"],
|
|
288587
|
+
abbreviated: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
|
288588
|
+
|
|
288589
|
+
wide: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
|
|
288590
|
+
};
|
|
288591
|
+
|
|
288592
|
+
const dayPeriodValues = {
|
|
288593
|
+
narrow: {
|
|
288594
|
+
am: "上",
|
|
288595
|
+
pm: "下",
|
|
288596
|
+
midnight: "凌晨",
|
|
288597
|
+
noon: "午",
|
|
288598
|
+
morning: "早",
|
|
288599
|
+
afternoon: "下午",
|
|
288600
|
+
evening: "晚",
|
|
288601
|
+
night: "夜",
|
|
288602
|
+
},
|
|
288603
|
+
abbreviated: {
|
|
288604
|
+
am: "上午",
|
|
288605
|
+
pm: "下午",
|
|
288606
|
+
midnight: "凌晨",
|
|
288607
|
+
noon: "中午",
|
|
288608
|
+
morning: "早晨",
|
|
288609
|
+
afternoon: "中午",
|
|
288610
|
+
evening: "晚上",
|
|
288611
|
+
night: "夜间",
|
|
288612
|
+
},
|
|
288613
|
+
wide: {
|
|
288614
|
+
am: "上午",
|
|
288615
|
+
pm: "下午",
|
|
288616
|
+
midnight: "凌晨",
|
|
288617
|
+
noon: "中午",
|
|
288618
|
+
morning: "早晨",
|
|
288619
|
+
afternoon: "中午",
|
|
288620
|
+
evening: "晚上",
|
|
288621
|
+
night: "夜间",
|
|
288622
|
+
},
|
|
288623
|
+
};
|
|
288624
|
+
|
|
288625
|
+
const formattingDayPeriodValues = {
|
|
288626
|
+
narrow: {
|
|
288627
|
+
am: "上",
|
|
288628
|
+
pm: "下",
|
|
288629
|
+
midnight: "凌晨",
|
|
288630
|
+
noon: "午",
|
|
288631
|
+
morning: "早",
|
|
288632
|
+
afternoon: "下午",
|
|
288633
|
+
evening: "晚",
|
|
288634
|
+
night: "夜",
|
|
288635
|
+
},
|
|
288636
|
+
abbreviated: {
|
|
288637
|
+
am: "上午",
|
|
288638
|
+
pm: "下午",
|
|
288639
|
+
midnight: "凌晨",
|
|
288640
|
+
noon: "中午",
|
|
288641
|
+
morning: "早晨",
|
|
288642
|
+
afternoon: "中午",
|
|
288643
|
+
evening: "晚上",
|
|
288644
|
+
night: "夜间",
|
|
288645
|
+
},
|
|
288646
|
+
wide: {
|
|
288647
|
+
am: "上午",
|
|
288648
|
+
pm: "下午",
|
|
288649
|
+
midnight: "凌晨",
|
|
288650
|
+
noon: "中午",
|
|
288651
|
+
morning: "早晨",
|
|
288652
|
+
afternoon: "中午",
|
|
288653
|
+
evening: "晚上",
|
|
288654
|
+
night: "夜间",
|
|
288655
|
+
},
|
|
288656
|
+
};
|
|
288657
|
+
|
|
288658
|
+
const ordinalNumber = (dirtyNumber, options) => {
|
|
288659
|
+
const number = Number(dirtyNumber);
|
|
288660
|
+
|
|
288661
|
+
switch (options?.unit) {
|
|
288662
|
+
case "date":
|
|
288663
|
+
return number.toString() + "日";
|
|
288664
|
+
case "hour":
|
|
288665
|
+
return number.toString() + "时";
|
|
288666
|
+
case "minute":
|
|
288667
|
+
return number.toString() + "分";
|
|
288668
|
+
case "second":
|
|
288669
|
+
return number.toString() + "秒";
|
|
288670
|
+
default:
|
|
288671
|
+
return "第 " + number.toString();
|
|
288672
|
+
}
|
|
288673
|
+
};
|
|
288674
|
+
|
|
288675
|
+
const localize = {
|
|
288676
|
+
ordinalNumber,
|
|
288677
|
+
|
|
288678
|
+
era: buildLocalizeFn({
|
|
288679
|
+
values: eraValues,
|
|
288680
|
+
defaultWidth: "wide",
|
|
288681
|
+
}),
|
|
288682
|
+
|
|
288683
|
+
quarter: buildLocalizeFn({
|
|
288684
|
+
values: quarterValues,
|
|
288685
|
+
defaultWidth: "wide",
|
|
288686
|
+
argumentCallback: (quarter) => quarter - 1,
|
|
288687
|
+
}),
|
|
288688
|
+
|
|
288689
|
+
month: buildLocalizeFn({
|
|
288690
|
+
values: monthValues,
|
|
288691
|
+
defaultWidth: "wide",
|
|
288692
|
+
}),
|
|
288693
|
+
|
|
288694
|
+
day: buildLocalizeFn({
|
|
288695
|
+
values: dayValues,
|
|
288696
|
+
defaultWidth: "wide",
|
|
288697
|
+
}),
|
|
288698
|
+
|
|
288699
|
+
dayPeriod: buildLocalizeFn({
|
|
288700
|
+
values: dayPeriodValues,
|
|
288701
|
+
defaultWidth: "wide",
|
|
288702
|
+
formattingValues: formattingDayPeriodValues,
|
|
288703
|
+
defaultFormattingWidth: "wide",
|
|
288704
|
+
}),
|
|
288705
|
+
};
|
|
288706
|
+
|
|
288707
|
+
const matchOrdinalNumberPattern = /^(第\s*)?\d+(日|时|分|秒)?/i;
|
|
288708
|
+
const parseOrdinalNumberPattern = /\d+/i;
|
|
288709
|
+
|
|
288710
|
+
const matchEraPatterns = {
|
|
288711
|
+
narrow: /^(前)/i,
|
|
288712
|
+
abbreviated: /^(前)/i,
|
|
288713
|
+
wide: /^(公元前|公元)/i,
|
|
288714
|
+
};
|
|
288715
|
+
const parseEraPatterns = {
|
|
288716
|
+
any: [/^(前)/i, /^(公元)/i],
|
|
288717
|
+
};
|
|
288718
|
+
|
|
288719
|
+
const matchQuarterPatterns = {
|
|
288720
|
+
narrow: /^[1234]/i,
|
|
288721
|
+
abbreviated: /^第[一二三四]刻/i,
|
|
288722
|
+
wide: /^第[一二三四]刻钟/i,
|
|
288723
|
+
};
|
|
288724
|
+
const parseQuarterPatterns = {
|
|
288725
|
+
any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i],
|
|
288726
|
+
};
|
|
288727
|
+
|
|
288728
|
+
const matchMonthPatterns = {
|
|
288729
|
+
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
|
|
288730
|
+
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
|
|
288731
|
+
wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i,
|
|
288732
|
+
};
|
|
288733
|
+
const parseMonthPatterns = {
|
|
288734
|
+
narrow: [
|
|
288735
|
+
/^一/i,
|
|
288736
|
+
/^二/i,
|
|
288737
|
+
/^三/i,
|
|
288738
|
+
/^四/i,
|
|
288739
|
+
/^五/i,
|
|
288740
|
+
/^六/i,
|
|
288741
|
+
/^七/i,
|
|
288742
|
+
/^八/i,
|
|
288743
|
+
/^九/i,
|
|
288744
|
+
/^十(?!(一|二))/i,
|
|
288745
|
+
/^十一/i,
|
|
288746
|
+
/^十二/i,
|
|
288747
|
+
],
|
|
288748
|
+
|
|
288749
|
+
any: [
|
|
288750
|
+
/^一|1/i,
|
|
288751
|
+
/^二|2/i,
|
|
288752
|
+
/^三|3/i,
|
|
288753
|
+
/^四|4/i,
|
|
288754
|
+
/^五|5/i,
|
|
288755
|
+
/^六|6/i,
|
|
288756
|
+
/^七|7/i,
|
|
288757
|
+
/^八|8/i,
|
|
288758
|
+
/^九|9/i,
|
|
288759
|
+
/^十(?!(一|二))|10/i,
|
|
288760
|
+
/^十一|11/i,
|
|
288761
|
+
/^十二|12/i,
|
|
288762
|
+
],
|
|
288763
|
+
};
|
|
288764
|
+
|
|
288765
|
+
const matchDayPatterns = {
|
|
288766
|
+
narrow: /^[一二三四五六日]/i,
|
|
288767
|
+
short: /^[一二三四五六日]/i,
|
|
288768
|
+
abbreviated: /^周[一二三四五六日]/i,
|
|
288769
|
+
wide: /^星期[一二三四五六日]/i,
|
|
288770
|
+
};
|
|
288771
|
+
const parseDayPatterns = {
|
|
288772
|
+
any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i],
|
|
288773
|
+
};
|
|
288774
|
+
|
|
288775
|
+
const matchDayPeriodPatterns = {
|
|
288776
|
+
any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i,
|
|
288777
|
+
};
|
|
288778
|
+
const parseDayPeriodPatterns = {
|
|
288779
|
+
any: {
|
|
288780
|
+
am: /^上午?/i,
|
|
288781
|
+
pm: /^下午?/i,
|
|
288782
|
+
midnight: /^午夜/i,
|
|
288783
|
+
noon: /^[中正]午/i,
|
|
288784
|
+
morning: /^早上/i,
|
|
288785
|
+
afternoon: /^下午/i,
|
|
288786
|
+
evening: /^晚上?/i,
|
|
288787
|
+
night: /^凌晨/i,
|
|
288788
|
+
},
|
|
288789
|
+
};
|
|
288790
|
+
|
|
288791
|
+
const match = {
|
|
288792
|
+
ordinalNumber: buildMatchPatternFn({
|
|
288793
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
288794
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
288795
|
+
valueCallback: (value) => parseInt(value, 10),
|
|
288796
|
+
}),
|
|
288797
|
+
|
|
288798
|
+
era: buildMatchFn({
|
|
288799
|
+
matchPatterns: matchEraPatterns,
|
|
288800
|
+
defaultMatchWidth: "wide",
|
|
288801
|
+
parsePatterns: parseEraPatterns,
|
|
288802
|
+
defaultParseWidth: "any",
|
|
288803
|
+
}),
|
|
288804
|
+
|
|
288805
|
+
quarter: buildMatchFn({
|
|
288806
|
+
matchPatterns: matchQuarterPatterns,
|
|
288807
|
+
defaultMatchWidth: "wide",
|
|
288808
|
+
parsePatterns: parseQuarterPatterns,
|
|
288809
|
+
defaultParseWidth: "any",
|
|
288810
|
+
valueCallback: (index) => index + 1,
|
|
288811
|
+
}),
|
|
288812
|
+
|
|
288813
|
+
month: buildMatchFn({
|
|
288814
|
+
matchPatterns: matchMonthPatterns,
|
|
288815
|
+
defaultMatchWidth: "wide",
|
|
288816
|
+
parsePatterns: parseMonthPatterns,
|
|
288817
|
+
defaultParseWidth: "any",
|
|
288818
|
+
}),
|
|
288819
|
+
|
|
288820
|
+
day: buildMatchFn({
|
|
288821
|
+
matchPatterns: matchDayPatterns,
|
|
288822
|
+
defaultMatchWidth: "wide",
|
|
288823
|
+
parsePatterns: parseDayPatterns,
|
|
288824
|
+
defaultParseWidth: "any",
|
|
288825
|
+
}),
|
|
288826
|
+
|
|
288827
|
+
dayPeriod: buildMatchFn({
|
|
288828
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
288829
|
+
defaultMatchWidth: "any",
|
|
288830
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
288831
|
+
defaultParseWidth: "any",
|
|
288832
|
+
}),
|
|
288833
|
+
};
|
|
288834
|
+
|
|
288835
|
+
/**
|
|
288836
|
+
* @category Locales
|
|
288837
|
+
* @summary Chinese Simplified locale.
|
|
288838
|
+
* @language Chinese Simplified
|
|
288839
|
+
* @iso-639-2 zho
|
|
288840
|
+
* @author Changyu Geng [@KingMario](https://github.com/KingMario)
|
|
288841
|
+
* @author Song Shuoyun [@fnlctrl](https://github.com/fnlctrl)
|
|
288842
|
+
* @author sabrinaM [@sabrinamiao](https://github.com/sabrinamiao)
|
|
288843
|
+
* @author Carney Wu [@cubicwork](https://github.com/cubicwork)
|
|
288844
|
+
* @author Terrence Lam [@skyuplam](https://github.com/skyuplam)
|
|
288845
|
+
*/
|
|
288846
|
+
const zhCN = {
|
|
288847
|
+
code: "zh-CN",
|
|
288848
|
+
formatDistance: formatDistance,
|
|
288849
|
+
formatLong: formatLong,
|
|
288850
|
+
formatRelative: formatRelative,
|
|
288851
|
+
localize: localize,
|
|
288852
|
+
match: match,
|
|
288853
|
+
options: {
|
|
288854
|
+
weekStartsOn: 1 /* Monday */,
|
|
288855
|
+
firstWeekContainsDate: 4,
|
|
288856
|
+
},
|
|
288857
|
+
};
|
|
288858
|
+
|
|
288859
|
+
const DATE_FNS_LOCALES = { fr, es, zh: zhCN };
|
|
288860
|
+
/** The date-fns locale for the active language; undefined keeps date-fns' English default. */
|
|
288861
|
+
function useDateFnsLocale() {
|
|
288862
|
+
return DATE_FNS_LOCALES[useWebContainersLocale()];
|
|
288863
|
+
}
|
|
288864
|
+
|
|
287076
288865
|
const EditMemoryModal$1 = dynamic(() => Promise.resolve().then(function () { return editMemoryModal; }).then((module) => ({
|
|
287077
288866
|
default: module.EditMemoryModal,
|
|
287078
288867
|
})), { ssr: false });
|
|
@@ -287088,11 +288877,12 @@ const BulkDeleteMemoryModal$1 = dynamic(() => Promise.resolve().then(function ()
|
|
|
287088
288877
|
const ManageCategoriesModal$1 = dynamic(() => Promise.resolve().then(function () { return manageCategoriesModal; }).then((module) => ({
|
|
287089
288878
|
default: module.ManageCategoriesModal,
|
|
287090
288879
|
})), { ssr: false });
|
|
287091
|
-
const PAGE_SIZE$
|
|
288880
|
+
const PAGE_SIZE$9 = 20;
|
|
287092
288881
|
const SNAPSHOT_PAGE_SIZE = 1000;
|
|
287093
288882
|
function ManageMemories({ tenantKey, username, mentorId }) {
|
|
287094
288883
|
var _a, _b, _c, _d, _e;
|
|
287095
288884
|
const t = useT();
|
|
288885
|
+
const dateFnsLocale = useDateFnsLocale();
|
|
287096
288886
|
const [selectedLearner, setSelectedLearner] = useState('');
|
|
287097
288887
|
const [dateRange, setDateRange] = useState(undefined);
|
|
287098
288888
|
const [selectedCategorySlug, setSelectedCategorySlug] = useState('all');
|
|
@@ -287103,7 +288893,7 @@ function ManageMemories({ tenantKey, username, mentorId }) {
|
|
|
287103
288893
|
setPage(1);
|
|
287104
288894
|
}, [selectedLearner, dateRange, selectedCategorySlug]);
|
|
287105
288895
|
const listParams = useMemo(() => {
|
|
287106
|
-
const params = { page, page_size: PAGE_SIZE$
|
|
288896
|
+
const params = { page, page_size: PAGE_SIZE$9 };
|
|
287107
288897
|
if (selectedLearner)
|
|
287108
288898
|
params.email = selectedLearner;
|
|
287109
288899
|
if (selectedCategorySlug !== 'all')
|
|
@@ -287122,7 +288912,7 @@ function ManageMemories({ tenantKey, username, mentorId }) {
|
|
|
287122
288912
|
}, {
|
|
287123
288913
|
skip: !tenantKey || !username || !mentorId,
|
|
287124
288914
|
});
|
|
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$
|
|
288915
|
+
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
288916
|
const { data: adminCategories } = useGetMemoryCategoriesAdminQuery({
|
|
287127
288917
|
org: tenantKey,
|
|
287128
288918
|
mentorId,
|
|
@@ -287335,21 +289125,22 @@ function ManageMemories({ tenantKey, username, mentorId }) {
|
|
|
287335
289125
|
setSelectedLearner(learner.email);
|
|
287336
289126
|
}, 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
289127
|
? `${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
|
|
289128
|
+
: 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
289129
|
? 'text-[#38A1E5]'
|
|
287340
289130
|
: '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
289131
|
width: `${overflowSelected.name.length * 0.55}em`,
|
|
287342
289132
|
} }))] }) }), 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
289133
|
setSelectedCategorySlug(category.slug);
|
|
287344
289134
|
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) => {
|
|
289135
|
+
}, 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
289136
|
const timeAgo = memory.createdAt
|
|
287347
289137
|
? formatDistanceToNow(new Date(memory.createdAt), {
|
|
287348
289138
|
addSuffix: true,
|
|
289139
|
+
locale: dateFnsLocale,
|
|
287349
289140
|
})
|
|
287350
289141
|
: '';
|
|
287351
289142
|
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("
|
|
289143
|
+
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
289144
|
})) }), 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
289145
|
}
|
|
287355
289146
|
|
|
@@ -287364,7 +289155,7 @@ function AgentMemoriesModal({ isOpen, onClose, tenantKey, username, agent, }) {
|
|
|
287364
289155
|
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
289156
|
}
|
|
287366
289157
|
|
|
287367
|
-
const PAGE_SIZE$
|
|
289158
|
+
const PAGE_SIZE$8 = 10;
|
|
287368
289159
|
/**
|
|
287369
289160
|
* Agents table filtered by the same agent autocomplete the Billing tab's
|
|
287370
289161
|
* Agent Limits section uses. Opening a row shows that agent's memories in a
|
|
@@ -287397,12 +289188,12 @@ function AgentMemoriesSection({ tenantKey, username }) {
|
|
|
287397
289188
|
const { data, isLoading, isFetching, error } = useGetMentorsQuery({
|
|
287398
289189
|
org: tenantKey,
|
|
287399
289190
|
username,
|
|
287400
|
-
limit: PAGE_SIZE$
|
|
287401
|
-
offset: (page - 1) * PAGE_SIZE$
|
|
289191
|
+
limit: PAGE_SIZE$8,
|
|
289192
|
+
offset: (page - 1) * PAGE_SIZE$8,
|
|
287402
289193
|
...(agentFilter ? { uniqueId: agentFilter.value } : {}),
|
|
287403
289194
|
});
|
|
287404
289195
|
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$
|
|
289196
|
+
const totalPages = (data === null || data === void 0 ? void 0 : data.count) ? Math.ceil(data.count / PAGE_SIZE$8) : 0;
|
|
287406
289197
|
const isForbidden = !!error && error.status === 403;
|
|
287407
289198
|
return (jsxs("div", { "data-testid": "memory-admin-agent-section", children: [jsx("div", { className: "mb-6 max-w-sm", children: jsx(SearchSelect, { labels: {
|
|
287408
289199
|
// No field label — the users tab's search carries none either.
|
|
@@ -292726,7 +294517,7 @@ const AutoResizeTextarea = ({ allowEmptySubmit = false, value, onChange, onSubmi
|
|
|
292726
294517
|
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
294518
|
};
|
|
292728
294519
|
|
|
292729
|
-
const PAGE_SIZE$
|
|
294520
|
+
const PAGE_SIZE$7 = 10;
|
|
292730
294521
|
const MemoryMenu = ({ onClose, mentorId, tenantKey, username }) => {
|
|
292731
294522
|
const t = useT();
|
|
292732
294523
|
const [page, setPage] = useState(1);
|
|
@@ -292744,7 +294535,7 @@ const MemoryMenu = ({ onClose, mentorId, tenantKey, username }) => {
|
|
|
292744
294535
|
mentorId,
|
|
292745
294536
|
params: {
|
|
292746
294537
|
page,
|
|
292747
|
-
page_size: PAGE_SIZE$
|
|
294538
|
+
page_size: PAGE_SIZE$7,
|
|
292748
294539
|
my_memory: true,
|
|
292749
294540
|
},
|
|
292750
294541
|
}, {
|
|
@@ -297355,7 +299146,7 @@ function DeleteItemConfirm({ isOpen, onClose, tenantKey, username, datasetName,
|
|
|
297355
299146
|
: t('benchmarksDeleteItemConfirm.delete') })] })] }) }));
|
|
297356
299147
|
}
|
|
297357
299148
|
|
|
297358
|
-
const PAGE_SIZE$
|
|
299149
|
+
const PAGE_SIZE$6 = 10;
|
|
297359
299150
|
function BenchmarkItemsModal({ isOpen, onClose, tenantKey, username, datasetName }) {
|
|
297360
299151
|
var _a;
|
|
297361
299152
|
const t = useT();
|
|
@@ -297367,17 +299158,17 @@ function BenchmarkItemsModal({ isOpen, onClose, tenantKey, username, datasetName
|
|
|
297367
299158
|
userId: username,
|
|
297368
299159
|
datasetName,
|
|
297369
299160
|
page,
|
|
297370
|
-
limit: PAGE_SIZE$
|
|
299161
|
+
limit: PAGE_SIZE$6,
|
|
297371
299162
|
});
|
|
297372
299163
|
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$
|
|
299164
|
+
const totalPages = evalTotalPages(data === null || data === void 0 ? void 0 : data.count, PAGE_SIZE$6);
|
|
297374
299165
|
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
299166
|
var _a;
|
|
297376
299167
|
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
299168
|
}), 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
299169
|
}
|
|
297379
299170
|
|
|
297380
|
-
const PAGE_SIZE$
|
|
299171
|
+
const PAGE_SIZE$5 = 10;
|
|
297381
299172
|
function BenchmarksTab({ tenantKey, username, }) {
|
|
297382
299173
|
var _a;
|
|
297383
299174
|
const t = useT();
|
|
@@ -297389,13 +299180,13 @@ function BenchmarksTab({ tenantKey, username, }) {
|
|
|
297389
299180
|
org: tenantKey,
|
|
297390
299181
|
userId: username,
|
|
297391
299182
|
page,
|
|
297392
|
-
limit: PAGE_SIZE$
|
|
299183
|
+
limit: PAGE_SIZE$5,
|
|
297393
299184
|
});
|
|
297394
299185
|
const benchmarks = (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : [];
|
|
297395
299186
|
const filtered = searchQuery.trim()
|
|
297396
299187
|
? benchmarks.filter((benchmark) => benchmark.name.toLowerCase().includes(searchQuery.toLowerCase()))
|
|
297397
299188
|
: benchmarks;
|
|
297398
|
-
const totalPages = evalTotalPages(data === null || data === void 0 ? void 0 : data.count, PAGE_SIZE$
|
|
299189
|
+
const totalPages = evalTotalPages(data === null || data === void 0 ? void 0 : data.count, PAGE_SIZE$5);
|
|
297399
299190
|
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
299191
|
? formatDistanceToNow(new Date(benchmark.created_at), {
|
|
297401
299192
|
addSuffix: true,
|
|
@@ -304184,19 +305975,266 @@ function useToggleTools({ activeMentorId, tenantKey, username, tools = [] }) {
|
|
|
304184
305975
|
};
|
|
304185
305976
|
}
|
|
304186
305977
|
|
|
305978
|
+
const DESCRIPTION_ID = 'shared-memory-delete-description';
|
|
305979
|
+
function SharedMemoryDeleteModal({ open, isDeleting, labels, onOpenChange, onConfirm, onCancel, }) {
|
|
305980
|
+
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 })] })] }) }));
|
|
305981
|
+
}
|
|
305982
|
+
|
|
305983
|
+
function asErrorLike(error) {
|
|
305984
|
+
return typeof error === 'object' && error !== null ? error : undefined;
|
|
305985
|
+
}
|
|
305986
|
+
// RTK also reports non-HTTP failures here as strings ('FETCH_ERROR',
|
|
305987
|
+
// 'TIMEOUT_ERROR', ...) — those become NaN and fall through to `unknown`.
|
|
305988
|
+
function toStatusCode(status) {
|
|
305989
|
+
if (typeof status === 'number')
|
|
305990
|
+
return status;
|
|
305991
|
+
if (typeof status === 'string')
|
|
305992
|
+
return Number(status);
|
|
305993
|
+
return undefined;
|
|
305994
|
+
}
|
|
305995
|
+
function fieldOf(data, key) {
|
|
305996
|
+
return typeof data === 'object' && data !== null
|
|
305997
|
+
? data[key]
|
|
305998
|
+
: undefined;
|
|
305999
|
+
}
|
|
306000
|
+
function firstMessage(value) {
|
|
306001
|
+
const candidate = Array.isArray(value) ? value[0] : value;
|
|
306002
|
+
return typeof candidate === 'string' && candidate.trim() !== '' ? candidate : undefined;
|
|
306003
|
+
}
|
|
306004
|
+
// DRF's min-length sentence is English in every locale and the form has its
|
|
306005
|
+
// own translated label for that rule; any other message is passed through
|
|
306006
|
+
// because the form has no words for it.
|
|
306007
|
+
const MIN_LENGTH_RULE = /\bat least \d+ characters\b/i;
|
|
306008
|
+
function validationDetail(data) {
|
|
306009
|
+
var _a, _b, _c;
|
|
306010
|
+
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'));
|
|
306011
|
+
return message !== undefined && MIN_LENGTH_RULE.test(message) ? undefined : message;
|
|
306012
|
+
}
|
|
306013
|
+
function withDetail(kind, detail) {
|
|
306014
|
+
return detail === undefined ? { kind } : { kind, detail };
|
|
306015
|
+
}
|
|
306016
|
+
function classifySharedMemoryError(error) {
|
|
306017
|
+
const candidate = asErrorLike(error);
|
|
306018
|
+
const status = toStatusCode(candidate === null || candidate === void 0 ? void 0 : candidate.status);
|
|
306019
|
+
switch (status) {
|
|
306020
|
+
case 409:
|
|
306021
|
+
return { kind: 'duplicate' };
|
|
306022
|
+
case 400:
|
|
306023
|
+
return withDetail('validation', validationDetail(candidate === null || candidate === void 0 ? void 0 : candidate.data));
|
|
306024
|
+
case 403:
|
|
306025
|
+
return withDetail('forbidden', firstMessage(fieldOf(candidate === null || candidate === void 0 ? void 0 : candidate.data, 'error')));
|
|
306026
|
+
default:
|
|
306027
|
+
return { kind: 'unknown' };
|
|
306028
|
+
}
|
|
306029
|
+
}
|
|
306030
|
+
|
|
306031
|
+
const SHARED_MEMORY_MIN_LENGTH = 10;
|
|
306032
|
+
const CONTENT_ID = 'shared-memory-content';
|
|
306033
|
+
const FIELD_ERROR_ID = 'shared-memory-field-error';
|
|
306034
|
+
function SharedMemoryModal({ open, mode, initialContent, isSaving, fieldError, labels, onOpenChange, onContentChange, onSave, onCancel, }) {
|
|
306035
|
+
const [content, setContent] = React__default.useState(initialContent);
|
|
306036
|
+
const [applied, setApplied] = React__default.useState({ open, initialContent });
|
|
306037
|
+
// Reset during render rather than in an effect: an effect runs after the
|
|
306038
|
+
// first paint, so a reopened dialog would flash the previous session's text.
|
|
306039
|
+
if (applied.open !== open || applied.initialContent !== initialContent) {
|
|
306040
|
+
setApplied({ open, initialContent });
|
|
306041
|
+
if (open)
|
|
306042
|
+
setContent(initialContent);
|
|
306043
|
+
}
|
|
306044
|
+
const trimmed = content.trim();
|
|
306045
|
+
const tooShort = trimmed.length < SHARED_MEMORY_MIN_LENGTH;
|
|
306046
|
+
const handleChange = (event) => {
|
|
306047
|
+
setContent(event.target.value);
|
|
306048
|
+
onContentChange === null || onContentChange === void 0 ? void 0 : onContentChange(event.target.value);
|
|
306049
|
+
};
|
|
306050
|
+
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
|
|
306051
|
+
? labels.charCountMinimum(trimmed.length)
|
|
306052
|
+
: 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 })] })] })] }) }));
|
|
306053
|
+
}
|
|
306054
|
+
|
|
306055
|
+
const PAGE_SIZE$4 = 20;
|
|
306056
|
+
function timeAgo(iso, locale) {
|
|
306057
|
+
const date = new Date(iso);
|
|
306058
|
+
return Number.isNaN(date.getTime()) ? '' : formatDistanceToNow(date, { addSuffix: true, locale });
|
|
306059
|
+
}
|
|
306060
|
+
function SharedMemorySection({ tenantKey, mentorId, labels, canWrite, }) {
|
|
306061
|
+
var _a, _b, _c;
|
|
306062
|
+
const [page, setPage] = React__default.useState(1);
|
|
306063
|
+
const [editor, setEditor] = React__default.useState(null);
|
|
306064
|
+
const [fieldError, setFieldError] = React__default.useState(null);
|
|
306065
|
+
const [entryToDelete, setEntryToDelete] = React__default.useState(null);
|
|
306066
|
+
const [writeDenied, setWriteDenied] = React__default.useState(false);
|
|
306067
|
+
const dateFnsLocale = useDateFnsLocale();
|
|
306068
|
+
const { data, currentData, error, isLoading, isFetching } = useGetSharedMemoriesQuery({ org: tenantKey, mentorId, params: { page, page_size: PAGE_SIZE$4 } }, { skip: !tenantKey || !mentorId });
|
|
306069
|
+
const [createSharedMemory, { isLoading: isCreating }] = useCreateSharedMemoryMutation();
|
|
306070
|
+
const [updateSharedMemory, { isLoading: isUpdating }] = useUpdateSharedMemoryMutation();
|
|
306071
|
+
const [deleteSharedMemory, { isLoading: isDeleting }] = useDeleteSharedMemoryMutation();
|
|
306072
|
+
// RTK keeps the previous page in `data` while the next one loads; only
|
|
306073
|
+
// `currentData` belongs to the page being shown, so the stale page is never
|
|
306074
|
+
// listed (or acted on) in between. `count` stays on the last known value so
|
|
306075
|
+
// the pagination does not vanish during the fetch.
|
|
306076
|
+
const entries = (_a = currentData === null || currentData === void 0 ? void 0 : currentData.results) !== null && _a !== void 0 ? _a : [];
|
|
306077
|
+
const count = (_b = data === null || data === void 0 ? void 0 : data.count) !== null && _b !== void 0 ? _b : 0;
|
|
306078
|
+
const totalPages = Math.max(1, Math.ceil(count / PAGE_SIZE$4));
|
|
306079
|
+
const showLoading = isLoading || (isFetching && !currentData);
|
|
306080
|
+
const isListForbidden = !!error && classifySharedMemoryError(error).kind === 'forbidden';
|
|
306081
|
+
const canEdit = canWrite && !writeDenied && !isListForbidden;
|
|
306082
|
+
const closeEditor = () => {
|
|
306083
|
+
setEditor(null);
|
|
306084
|
+
setFieldError(null);
|
|
306085
|
+
};
|
|
306086
|
+
const openEditor = (next) => {
|
|
306087
|
+
setFieldError(null);
|
|
306088
|
+
setEditor(next);
|
|
306089
|
+
};
|
|
306090
|
+
const denyWrites = () => {
|
|
306091
|
+
toast.error(labels.errors.forbidden);
|
|
306092
|
+
closeEditor();
|
|
306093
|
+
setEntryToDelete(null);
|
|
306094
|
+
setWriteDenied(true);
|
|
306095
|
+
};
|
|
306096
|
+
const handleSave = async (content) => {
|
|
306097
|
+
if (!editor)
|
|
306098
|
+
return;
|
|
306099
|
+
try {
|
|
306100
|
+
if (editor.mode === 'edit') {
|
|
306101
|
+
await updateSharedMemory({
|
|
306102
|
+
org: tenantKey,
|
|
306103
|
+
mentorId,
|
|
306104
|
+
memoryId: editor.entry.id,
|
|
306105
|
+
content,
|
|
306106
|
+
}).unwrap();
|
|
306107
|
+
toast.success(labels.toasts.updated);
|
|
306108
|
+
}
|
|
306109
|
+
else {
|
|
306110
|
+
await createSharedMemory({ org: tenantKey, mentorId, content }).unwrap();
|
|
306111
|
+
toast.success(labels.toasts.created);
|
|
306112
|
+
}
|
|
306113
|
+
closeEditor();
|
|
306114
|
+
}
|
|
306115
|
+
catch (saveError) {
|
|
306116
|
+
const { kind, detail } = classifySharedMemoryError(saveError);
|
|
306117
|
+
if (kind === 'duplicate') {
|
|
306118
|
+
setFieldError(labels.errors.duplicate);
|
|
306119
|
+
}
|
|
306120
|
+
else if (kind === 'validation') {
|
|
306121
|
+
setFieldError(detail !== null && detail !== void 0 ? detail : labels.errors.tooShort);
|
|
306122
|
+
}
|
|
306123
|
+
else if (kind === 'forbidden') {
|
|
306124
|
+
denyWrites();
|
|
306125
|
+
}
|
|
306126
|
+
else {
|
|
306127
|
+
toast.error(labels.toasts.saveError);
|
|
306128
|
+
}
|
|
306129
|
+
}
|
|
306130
|
+
};
|
|
306131
|
+
const handleDelete = async () => {
|
|
306132
|
+
if (!entryToDelete)
|
|
306133
|
+
return;
|
|
306134
|
+
// Step back before the request: the delete's cache invalidation refetches
|
|
306135
|
+
// whichever page is subscribed, and the emptied page no longer exists.
|
|
306136
|
+
const nextPage = entries.length === 1 && page > 1 ? page - 1 : page;
|
|
306137
|
+
setPage(nextPage);
|
|
306138
|
+
try {
|
|
306139
|
+
await deleteSharedMemory({ org: tenantKey, mentorId, memoryId: entryToDelete.id }).unwrap();
|
|
306140
|
+
setEntryToDelete(null);
|
|
306141
|
+
toast.success(labels.toasts.deleted);
|
|
306142
|
+
}
|
|
306143
|
+
catch (deleteError) {
|
|
306144
|
+
setPage(page);
|
|
306145
|
+
if (classifySharedMemoryError(deleteError).kind === 'forbidden') {
|
|
306146
|
+
denyWrites();
|
|
306147
|
+
}
|
|
306148
|
+
else {
|
|
306149
|
+
toast.error(labels.toasts.deleteError);
|
|
306150
|
+
}
|
|
306151
|
+
}
|
|
306152
|
+
};
|
|
306153
|
+
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) => {
|
|
306154
|
+
const author = entry.created_by_full_name || entry.created_by || labels.unknownAuthor;
|
|
306155
|
+
const added = timeAgo(entry.created_at, dateFnsLocale);
|
|
306156
|
+
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));
|
|
306157
|
+
}) })), 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) => {
|
|
306158
|
+
if (!open)
|
|
306159
|
+
closeEditor();
|
|
306160
|
+
}, onContentChange: () => setFieldError(null), onSave: handleSave, onCancel: closeEditor }), jsx(SharedMemoryDeleteModal, { open: entryToDelete !== null, isDeleting: isDeleting, labels: labels.deleteModal, onOpenChange: (open) => {
|
|
306161
|
+
if (!open)
|
|
306162
|
+
setEntryToDelete(null);
|
|
306163
|
+
}, onConfirm: handleDelete, onCancel: () => setEntryToDelete(null) })] }));
|
|
306164
|
+
}
|
|
306165
|
+
|
|
304187
306166
|
const AGENT_MEMORY_TAB_LABELS = {
|
|
304188
306167
|
header: {
|
|
304189
306168
|
title: 'Memory',
|
|
304190
306169
|
description: 'Configure memory settings for your agent.',
|
|
304191
306170
|
},
|
|
304192
306171
|
toggle: {
|
|
304193
|
-
label: '
|
|
304194
|
-
description:
|
|
306172
|
+
label: 'Long-term Memory',
|
|
306173
|
+
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.",
|
|
306174
|
+
offHint: 'Turn it on to let this agent remember details across conversations.',
|
|
306175
|
+
},
|
|
306176
|
+
subTabs: {
|
|
306177
|
+
ariaLabel: 'Memory sections',
|
|
306178
|
+
personal: 'Personal Memories',
|
|
306179
|
+
shared: 'Shared Memory',
|
|
306180
|
+
},
|
|
306181
|
+
sharedMemory: {
|
|
306182
|
+
title: 'Shared Memory',
|
|
306183
|
+
description: 'Facts, rules, and background this agent should always keep in mind. Every person who chats with this agent gets these memories.',
|
|
306184
|
+
gatingHint: 'Shared memories reach chats only while Long-term Memory is on for this agent and the person chatting has memory turned on.',
|
|
306185
|
+
addButton: 'Add Shared Memory',
|
|
306186
|
+
addButtonShort: 'Add',
|
|
306187
|
+
listAriaLabel: 'Shared memories',
|
|
306188
|
+
actionsAria: 'Shared memory actions',
|
|
306189
|
+
edit: 'Edit',
|
|
306190
|
+
delete: 'Delete',
|
|
306191
|
+
loading: 'Loading shared memories...',
|
|
306192
|
+
loadError: "Couldn't load this agent's shared memories. Please try again.",
|
|
306193
|
+
unknownAuthor: 'Unknown',
|
|
306194
|
+
addedBy: (name) => `Added by ${name}`,
|
|
306195
|
+
empty: {
|
|
306196
|
+
title: 'No Shared Memories Yet',
|
|
306197
|
+
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.',
|
|
306198
|
+
},
|
|
306199
|
+
denied: {
|
|
306200
|
+
title: 'No Access to Shared Memory',
|
|
306201
|
+
description: "You don't have permission to view this agent's shared memories. Ask an administrator for access.",
|
|
306202
|
+
},
|
|
306203
|
+
modal: {
|
|
306204
|
+
addTitle: 'Add Shared Memory',
|
|
306205
|
+
editTitle: 'Edit Shared Memory',
|
|
306206
|
+
contentLabel: 'Memory',
|
|
306207
|
+
placeholder: 'Write what this agent should always keep in mind...',
|
|
306208
|
+
charCountMinimum: (count) => `${count}/10 characters minimum`,
|
|
306209
|
+
charCount: (count) => `${count} characters`,
|
|
306210
|
+
save: 'Save',
|
|
306211
|
+
saving: 'Saving...',
|
|
306212
|
+
cancel: 'Cancel',
|
|
306213
|
+
},
|
|
306214
|
+
deleteModal: {
|
|
306215
|
+
title: 'Delete Shared Memory',
|
|
306216
|
+
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.',
|
|
306217
|
+
delete: 'Delete',
|
|
306218
|
+
deleting: 'Deleting...',
|
|
306219
|
+
cancel: 'Cancel',
|
|
306220
|
+
},
|
|
306221
|
+
errors: {
|
|
306222
|
+
duplicate: 'This shared memory already exists.',
|
|
306223
|
+
tooShort: 'A shared memory must be at least 10 characters.',
|
|
306224
|
+
forbidden: "You don't have permission to change this agent's shared memories.",
|
|
306225
|
+
},
|
|
306226
|
+
toasts: {
|
|
306227
|
+
created: 'Shared memory added',
|
|
306228
|
+
updated: 'Shared memory updated',
|
|
306229
|
+
deleted: 'Shared memory deleted',
|
|
306230
|
+
saveError: "Couldn't save shared memory",
|
|
306231
|
+
deleteError: "Couldn't delete shared memory",
|
|
306232
|
+
},
|
|
304195
306233
|
},
|
|
304196
306234
|
toasts: {
|
|
304197
|
-
enableSuccess: 'Memory
|
|
304198
|
-
disableSuccess: 'Memory
|
|
304199
|
-
toggleError: '
|
|
306235
|
+
enableSuccess: 'Memory turned on',
|
|
306236
|
+
disableSuccess: 'Memory turned off',
|
|
306237
|
+
toggleError: "Couldn't update memory setting",
|
|
304200
306238
|
},
|
|
304201
306239
|
};
|
|
304202
306240
|
function buildMemoryTabLabels(t) {
|
|
@@ -304208,6 +306246,65 @@ function buildMemoryTabLabels(t) {
|
|
|
304208
306246
|
toggle: {
|
|
304209
306247
|
label: t('memoryTabLabels.toggle.label'),
|
|
304210
306248
|
description: t('memoryTabLabels.toggle.description'),
|
|
306249
|
+
offHint: t('memoryTabLabels.toggle.offHint'),
|
|
306250
|
+
},
|
|
306251
|
+
subTabs: {
|
|
306252
|
+
ariaLabel: t('memoryTabLabels.subTabs.ariaLabel'),
|
|
306253
|
+
personal: t('memoryTabLabels.subTabs.personal'),
|
|
306254
|
+
shared: t('memoryTabLabels.subTabs.shared'),
|
|
306255
|
+
},
|
|
306256
|
+
sharedMemory: {
|
|
306257
|
+
title: t('memoryTabLabels.sharedMemory.title'),
|
|
306258
|
+
description: t('memoryTabLabels.sharedMemory.description'),
|
|
306259
|
+
gatingHint: t('memoryTabLabels.sharedMemory.gatingHint'),
|
|
306260
|
+
addButton: t('memoryTabLabels.sharedMemory.addButton'),
|
|
306261
|
+
addButtonShort: t('memoryTabLabels.sharedMemory.addButtonShort'),
|
|
306262
|
+
listAriaLabel: t('memoryTabLabels.sharedMemory.listAriaLabel'),
|
|
306263
|
+
actionsAria: t('memoryTabLabels.sharedMemory.actionsAria'),
|
|
306264
|
+
edit: t('memoryTabLabels.sharedMemory.edit'),
|
|
306265
|
+
delete: t('memoryTabLabels.sharedMemory.delete'),
|
|
306266
|
+
loading: t('memoryTabLabels.sharedMemory.loading'),
|
|
306267
|
+
loadError: t('memoryTabLabels.sharedMemory.loadError'),
|
|
306268
|
+
unknownAuthor: t('memoryTabLabels.sharedMemory.unknownAuthor'),
|
|
306269
|
+
addedBy: (name) => t('memoryTabLabels.sharedMemory.addedBy', { name }),
|
|
306270
|
+
empty: {
|
|
306271
|
+
title: t('memoryTabLabels.sharedMemory.empty.title'),
|
|
306272
|
+
description: t('memoryTabLabels.sharedMemory.empty.description'),
|
|
306273
|
+
},
|
|
306274
|
+
denied: {
|
|
306275
|
+
title: t('memoryTabLabels.sharedMemory.denied.title'),
|
|
306276
|
+
description: t('memoryTabLabels.sharedMemory.denied.description'),
|
|
306277
|
+
},
|
|
306278
|
+
modal: {
|
|
306279
|
+
addTitle: t('memoryTabLabels.sharedMemory.modal.addTitle'),
|
|
306280
|
+
editTitle: t('memoryTabLabels.sharedMemory.modal.editTitle'),
|
|
306281
|
+
contentLabel: t('memoryTabLabels.sharedMemory.modal.contentLabel'),
|
|
306282
|
+
placeholder: t('memoryTabLabels.sharedMemory.modal.placeholder'),
|
|
306283
|
+
charCountMinimum: (count) => t('memoryTabLabels.sharedMemory.modal.charCountMinimum', { count }),
|
|
306284
|
+
charCount: (count) => t('memoryTabLabels.sharedMemory.modal.charCount', { count }),
|
|
306285
|
+
save: t('memoryTabLabels.sharedMemory.modal.save'),
|
|
306286
|
+
saving: t('memoryTabLabels.sharedMemory.modal.saving'),
|
|
306287
|
+
cancel: t('memoryTabLabels.sharedMemory.modal.cancel'),
|
|
306288
|
+
},
|
|
306289
|
+
deleteModal: {
|
|
306290
|
+
title: t('memoryTabLabels.sharedMemory.deleteModal.title'),
|
|
306291
|
+
description: t('memoryTabLabels.sharedMemory.deleteModal.description'),
|
|
306292
|
+
delete: t('memoryTabLabels.sharedMemory.deleteModal.delete'),
|
|
306293
|
+
deleting: t('memoryTabLabels.sharedMemory.deleteModal.deleting'),
|
|
306294
|
+
cancel: t('memoryTabLabels.sharedMemory.deleteModal.cancel'),
|
|
306295
|
+
},
|
|
306296
|
+
errors: {
|
|
306297
|
+
duplicate: t('memoryTabLabels.sharedMemory.errors.duplicate'),
|
|
306298
|
+
tooShort: t('memoryTabLabels.sharedMemory.errors.tooShort'),
|
|
306299
|
+
forbidden: t('memoryTabLabels.sharedMemory.errors.forbidden'),
|
|
306300
|
+
},
|
|
306301
|
+
toasts: {
|
|
306302
|
+
created: t('memoryTabLabels.sharedMemory.toasts.created'),
|
|
306303
|
+
updated: t('memoryTabLabels.sharedMemory.toasts.updated'),
|
|
306304
|
+
deleted: t('memoryTabLabels.sharedMemory.toasts.deleted'),
|
|
306305
|
+
saveError: t('memoryTabLabels.sharedMemory.toasts.saveError'),
|
|
306306
|
+
deleteError: t('memoryTabLabels.sharedMemory.toasts.deleteError'),
|
|
306307
|
+
},
|
|
304211
306308
|
},
|
|
304212
306309
|
toasts: {
|
|
304213
306310
|
enableSuccess: t('memoryTabLabels.toasts.enableSuccess'),
|
|
@@ -304223,11 +306320,86 @@ function resolveMemoryTabLabels(override, t) {
|
|
|
304223
306320
|
return deepMerge(base, override);
|
|
304224
306321
|
}
|
|
304225
306322
|
|
|
304226
|
-
function
|
|
304227
|
-
const
|
|
306323
|
+
function useMemoryCapability({ tenantKey, mentorId, username, labels, enableRBAC = false, rbacPermissions = {}, }) {
|
|
306324
|
+
const identityReady = Boolean(tenantKey && mentorId && username);
|
|
306325
|
+
const { data: mentorSettings, isLoading } = useGetMentorSettingsQuery({
|
|
306326
|
+
mentor: mentorId,
|
|
306327
|
+
org: tenantKey,
|
|
306328
|
+
// @ts-expect-error userId is not in the typed args but the API accepts it
|
|
306329
|
+
userId: username,
|
|
306330
|
+
}, { skip: !identityReady });
|
|
306331
|
+
const serverEnabled = (mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.enable_memory_component) === true;
|
|
306332
|
+
// Optimistic local mirror of the flag so the switch responds instantly;
|
|
306333
|
+
// rolled back if the settings PATCH fails.
|
|
306334
|
+
const [enabled, setEnabled] = React__default.useState(serverEnabled);
|
|
306335
|
+
React__default.useEffect(() => {
|
|
306336
|
+
setEnabled(serverEnabled);
|
|
306337
|
+
}, [serverEnabled]);
|
|
306338
|
+
const [editMentor, { isLoading: isToggling }] = useEditMentorMutation();
|
|
306339
|
+
// The permission-check endpoint does not expose the shared-memory (AgentMemory) actions,
|
|
306340
|
+
// so the mentor's own `write` action stands in for them: Limited Editor has
|
|
306341
|
+
// it, Limited Viewer does not. Like the grader tab, it is only enforced when
|
|
306342
|
+
// the tree actually contains the mentor entry; otherwise everything stays
|
|
306343
|
+
// writable and the server's 403s remain the source of truth. While the
|
|
306344
|
+
// settings load the mentor id the tree is keyed by is unknown, so writes are
|
|
306345
|
+
// withheld rather than briefly granted to everyone.
|
|
306346
|
+
const mentorDbId = mentorSettings === null || mentorSettings === void 0 ? void 0 : mentorSettings.mentor_id;
|
|
306347
|
+
const mentorEntry = rbacPermissions[`/mentors/${mentorDbId}/`];
|
|
306348
|
+
const canWrite = !isLoading &&
|
|
306349
|
+
(!mentorEntry ||
|
|
306350
|
+
checkRbacPermission(rbacPermissions, `/mentors/${mentorDbId}/#write`, enableRBAC));
|
|
306351
|
+
const toggle = async (checked) => {
|
|
306352
|
+
setEnabled(checked); // optimistic
|
|
306353
|
+
const formData = { enable_memory_component: checked };
|
|
306354
|
+
try {
|
|
306355
|
+
await editMentor({
|
|
306356
|
+
mentor: mentorId,
|
|
306357
|
+
org: tenantKey,
|
|
306358
|
+
formData,
|
|
306359
|
+
// @ts-expect-error userId is not in the typed args but the API accepts it
|
|
306360
|
+
userId: username,
|
|
306361
|
+
}).unwrap();
|
|
306362
|
+
toast.success(checked ? labels.toasts.enableSuccess : labels.toasts.disableSuccess);
|
|
306363
|
+
}
|
|
306364
|
+
catch (error) {
|
|
306365
|
+
setEnabled(!checked); // roll back
|
|
306366
|
+
console.error('[AgentMemoryTab] toggle memory error', error);
|
|
306367
|
+
toast.error(labels.toasts.toggleError);
|
|
306368
|
+
}
|
|
306369
|
+
};
|
|
306370
|
+
return { enabled, isToggling, toggle, mentorDbId, canWrite, isLoading };
|
|
306371
|
+
}
|
|
306372
|
+
|
|
306373
|
+
const MEMORY_SUB_TABS = {
|
|
306374
|
+
personal: 'personal',
|
|
306375
|
+
shared: 'shared',
|
|
306376
|
+
};
|
|
306377
|
+
/**
|
|
306378
|
+
* Standalone top-level tab for the agent's memory: the in-tab toggle flips
|
|
306379
|
+
* `enable_memory_component` on the agent, and the gated content splits into
|
|
306380
|
+
* two sub-tabs — Personal Memories (what the agent remembered per person) and
|
|
306381
|
+
* Shared Memory (memories every chat gets). Both sit under the same gate
|
|
306382
|
+
* because the backend injects neither into chats while that flag is off.
|
|
306383
|
+
*/
|
|
306384
|
+
function AgentMemoryTab({ labels: labelsOverride, tenantKey: tenantKeyProp, mentorId: mentorIdProp, username: usernameProp, enableRBAC: enableRBACProp, rbacPermissions: rbacPermissionsProp, }) {
|
|
306385
|
+
var _a, _b, _c, _d, _e;
|
|
306386
|
+
const ctx = useAgentSettingsOptional();
|
|
306387
|
+
const tenantKey = (_a = tenantKeyProp !== null && tenantKeyProp !== void 0 ? tenantKeyProp : ctx === null || ctx === void 0 ? void 0 : ctx.tenantKey) !== null && _a !== void 0 ? _a : '';
|
|
306388
|
+
const mentorId = (_b = mentorIdProp !== null && mentorIdProp !== void 0 ? mentorIdProp : ctx === null || ctx === void 0 ? void 0 : ctx.mentorId) !== null && _b !== void 0 ? _b : '';
|
|
306389
|
+
const username = (_c = usernameProp !== null && usernameProp !== void 0 ? usernameProp : ctx === null || ctx === void 0 ? void 0 : ctx.username) !== null && _c !== void 0 ? _c : '';
|
|
306390
|
+
const enableRBAC = (_d = enableRBACProp !== null && enableRBACProp !== void 0 ? enableRBACProp : ctx === null || ctx === void 0 ? void 0 : ctx.enableRBAC) !== null && _d !== void 0 ? _d : false;
|
|
306391
|
+
const rbacPermissions = (_e = rbacPermissionsProp !== null && rbacPermissionsProp !== void 0 ? rbacPermissionsProp : ctx === null || ctx === void 0 ? void 0 : ctx.rbacPermissions) !== null && _e !== void 0 ? _e : {};
|
|
304228
306392
|
const t = useT();
|
|
304229
306393
|
const labels = React__default.useMemo(() => resolveMemoryTabLabels(labelsOverride, t), [labelsOverride, t]);
|
|
304230
|
-
|
|
306394
|
+
const { enabled, isToggling, toggle, canWrite, isLoading } = useMemoryCapability({
|
|
306395
|
+
tenantKey,
|
|
306396
|
+
mentorId,
|
|
306397
|
+
username,
|
|
306398
|
+
labels,
|
|
306399
|
+
enableRBAC,
|
|
306400
|
+
rbacPermissions,
|
|
306401
|
+
});
|
|
306402
|
+
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
306403
|
}
|
|
304232
306404
|
|
|
304233
306405
|
/**
|
|
@@ -311673,6 +313845,9 @@ const getUrl = (settings, tenant, mentorIframeUrl, extraBodyClasses = '') => {
|
|
|
311673
313845
|
if (settings.mode === 'advanced') {
|
|
311674
313846
|
url += `&chat=advanced`;
|
|
311675
313847
|
}
|
|
313848
|
+
if (settings.allow_mentor_selection) {
|
|
313849
|
+
url += `&allow-mentor-selection=true`;
|
|
313850
|
+
}
|
|
311676
313851
|
return url;
|
|
311677
313852
|
};
|
|
311678
313853
|
const getEmbedCode = async (tenant, settings, redirectToken, urls, useCustomFloatingBubble, customFloatingBubbleConfig) => {
|
|
@@ -312085,6 +314260,7 @@ const defaultEmbedFormValues = {
|
|
|
312085
314260
|
const useEmbedTab = (urls) => {
|
|
312086
314261
|
var _a, _b, _c, _d, _e, _f;
|
|
312087
314262
|
const [embedCode, setEmbedCode] = useState('');
|
|
314263
|
+
const [allowMentorSelection, setAllowMentorSelection] = useState(false);
|
|
312088
314264
|
const { tenantKey, mentorId, username } = useAgentSettings();
|
|
312089
314265
|
const { data: mentorPublicSettings } = useGetMentorPublicSettingsQuery({
|
|
312090
314266
|
mentor: mentorId,
|
|
@@ -312220,7 +314396,7 @@ const useEmbedTab = (urls) => {
|
|
|
312220
314396
|
}
|
|
312221
314397
|
const embed = await getEmbedCode(tenantKey,
|
|
312222
314398
|
// @ts-expect-error - value is not typed correctly
|
|
312223
|
-
value, (_a = syncResult.redirectToken) !== null && _a !== void 0 ? _a : '', urls, value.icon_selection === 'custom', customFloatingBubbleConfig);
|
|
314399
|
+
{ ...value, allow_mentor_selection: allowMentorSelection }, (_a = syncResult.redirectToken) !== null && _a !== void 0 ? _a : '', urls, value.icon_selection === 'custom', customFloatingBubbleConfig);
|
|
312224
314400
|
setEmbedCode(embed);
|
|
312225
314401
|
},
|
|
312226
314402
|
});
|
|
@@ -312251,6 +314427,8 @@ const useEmbedTab = (urls) => {
|
|
|
312251
314427
|
};
|
|
312252
314428
|
const [focusEditCustomFloatingBubble, setFocusEditCustomFloatingBubble] = useState(false);
|
|
312253
314429
|
return {
|
|
314430
|
+
allowMentorSelection,
|
|
314431
|
+
setAllowMentorSelection,
|
|
312254
314432
|
createTokenHandler,
|
|
312255
314433
|
form,
|
|
312256
314434
|
createTokenError,
|
|
@@ -312330,6 +314508,10 @@ const AGENT_EMBED_TAB_LABELS = {
|
|
|
312330
314508
|
label: 'Show Voice Record',
|
|
312331
314509
|
tooltip: 'Show Voice Recording Options in Chat Interface',
|
|
312332
314510
|
},
|
|
314511
|
+
allowMentorSelection: {
|
|
314512
|
+
label: 'Allow Agent Selection',
|
|
314513
|
+
tooltip: 'Let signed-in visitors open Explore from the embed and switch to another agent.',
|
|
314514
|
+
},
|
|
312333
314515
|
shareableLink: {
|
|
312334
314516
|
label: 'Shareable Link',
|
|
312335
314517
|
tooltip: 'Generate a link users can use to chat with this agent anonymously',
|
|
@@ -312413,6 +314595,10 @@ function buildEmbedTabLabels(t) {
|
|
|
312413
314595
|
label: t('embedTabLabels.fields.showVoiceRecord.label'),
|
|
312414
314596
|
tooltip: t('embedTabLabels.fields.showVoiceRecord.tooltip'),
|
|
312415
314597
|
},
|
|
314598
|
+
allowMentorSelection: {
|
|
314599
|
+
label: t('embedTabLabels.fields.allowMentorSelection.label'),
|
|
314600
|
+
tooltip: t('embedTabLabels.fields.allowMentorSelection.tooltip'),
|
|
314601
|
+
},
|
|
312416
314602
|
shareableLink: {
|
|
312417
314603
|
label: t('embedTabLabels.fields.shareableLink.label'),
|
|
312418
314604
|
tooltip: t('embedTabLabels.fields.shareableLink.tooltip'),
|
|
@@ -312549,7 +314735,7 @@ function AgentEmbedTab({ labels: labelsProp, urls, CopyCodeBlock, visibilityOpti
|
|
|
312549
314735
|
useEffect(() => {
|
|
312550
314736
|
setShareableToken(shareableTokenData);
|
|
312551
314737
|
}, [shareableTokenData]);
|
|
312552
|
-
const { form, createTokenHandler, createTokenError, setCreateTokenError, isCreateTokenLoading, redirectTokenData, embedCode, setEmbedCode, customFloatingBubbleConfig, handleFloatingBubbleImageError, focusEditCustomFloatingBubble, setFocusEditCustomFloatingBubble, updateConfig, updateMultipleConfig, syncEmbedSettings, } = useEmbedTab(urls);
|
|
314738
|
+
const { allowMentorSelection, setAllowMentorSelection, form, createTokenHandler, createTokenError, setCreateTokenError, isCreateTokenLoading, redirectTokenData, embedCode, setEmbedCode, customFloatingBubbleConfig, handleFloatingBubbleImageError, focusEditCustomFloatingBubble, setFocusEditCustomFloatingBubble, updateConfig, updateMultipleConfig, syncEmbedSettings, } = useEmbedTab(urls);
|
|
312553
314739
|
const { data: mentorSettings, isLoading: isLoadingSettings } = useGetMentorSettingsQuery(
|
|
312554
314740
|
// @ts-expect-error userId is not part of useGetMentorSettingsQuery Query definition
|
|
312555
314741
|
{ mentor: mentorId, org: tenantKey, userId: username !== null && username !== void 0 ? username : '' }, { skip: !username || !mentorId || !tenantKey });
|
|
@@ -312816,7 +315002,9 @@ function AgentEmbedTab({ labels: labelsProp, urls, CopyCodeBlock, visibilityOpti
|
|
|
312816
315002
|
? t('tabsEmbedTab.showVoiceCallEnabled')
|
|
312817
315003
|
: t('tabsEmbedTab.showVoiceCallDisabled') })] })) }), jsx(form.Field, { name: "embed_show_voice_record", children: (field) => (jsxs("div", { className: "flex items-center justify-between", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: labels.fields.showVoiceRecord.label }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { "aria-label": t('tabsEmbedTab.moreInfoShowVoiceRecord'), children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "ibl-tooltip-content", children: jsx("p", { children: labels.fields.showVoiceRecord.tooltip }) })] }) })] }), jsx(CustomSwitch, { checked: field.state.value, onCheckedChange: (checked) => field.handleChange(checked), disabled: form.state.isSubmitting, "aria-label": field.state.value
|
|
312818
315004
|
? t('tabsEmbedTab.showVoiceRecordEnabled')
|
|
312819
|
-
: t('tabsEmbedTab.showVoiceRecordDisabled') })] })) }),
|
|
315005
|
+
: t('tabsEmbedTab.showVoiceRecordDisabled') })] })) }), jsxs("div", { className: "flex items-center justify-between", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: labels.fields.allowMentorSelection.label }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { "aria-label": t('tabsEmbedTab.moreInfoAllowMentorSelection'), children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "ibl-tooltip-content", children: jsx("p", { children: labels.fields.allowMentorSelection.tooltip }) })] }) })] }), jsx(CustomSwitch, { "data-testid": "embed-allow-mentor-selection-switch", checked: allowMentorSelection, onCheckedChange: setAllowMentorSelection, disabled: form.state.isSubmitting, "aria-label": allowMentorSelection
|
|
315006
|
+
? t('tabsEmbedTab.allowMentorSelectionEnabled')
|
|
315007
|
+
: t('tabsEmbedTab.allowMentorSelectionDisabled') })] }), jsx("hr", { className: "my-4 border-t border-gray-200" }), jsx(form.Field, { name: "generateShareableLink", children: (field) => (jsxs("div", { className: "flex items-center justify-between", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm font-medium text-[#646464]", children: labels.fields.shareableLink.label }), jsx(TooltipProvider, { children: jsxs(Tooltip$1, { children: [jsx(TooltipTrigger, { "aria-label": t('tabsEmbedTab.moreInfoShareableLink'), children: jsx(Info$3, { className: "h-4 w-4 text-gray-400" }) }), jsx(TooltipContent, { className: "ibl-tooltip-content", children: jsx("p", { children: labels.fields.shareableLink.tooltip }) })] }) })] }), isLoadingShareableLink ? (jsx(Spinner, {})) : (jsxs("div", { className: "flex", children: [jsx(RefreshCw, { onClick: handleRegenerateToken, className: "mr-2 cursor-pointer text-[#646464]" }), jsx(CustomSwitch, { checked: shareableToken && shareableToken.enabled, onCheckedChange: (checked) => handleShareableTokenToggle(checked), "aria-label": field.state.value
|
|
312820
315008
|
? t('tabsEmbedTab.shareableLinkEnabled')
|
|
312821
315009
|
: t('tabsEmbedTab.shareableLinkDisabled') })] }))] })) }), jsx("div", { children: shareableToken && (jsx("div", { className: "mb-4 w-full lg:w-[500px]", children: jsx(CopyCodeBlock, { code: `${window.location.origin}?mentor=${mentorId}&tenant=${tenantKey}&token=${shareableToken.token}` }) })) })] }), jsx("div", { className: "h-[75vh] overflow-hidden rounded-lg border bg-gray-50", children: jsx(form.Subscribe, { selector: (formState) => [formState.values.mode], children: ([mode]) => (jsx("iframe", { id: "embed-mentor-preview", title: "embed-mentor-preview", src: `${window.location.origin}${urls.getMentorPageUrl ? urls.getMentorPageUrl(tenantKey, mentorId) : `/platform/${tenantKey}/${mentorId}`}`, style: {
|
|
312822
315010
|
height: '100%',
|
|
@@ -322254,5 +324442,5 @@ var disclaimerModal = /*#__PURE__*/Object.freeze({
|
|
|
322254
324442
|
DisclaimerModal: DisclaimerModal
|
|
322255
324443
|
});
|
|
322256
324444
|
|
|
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 };
|
|
324445
|
+
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
324446
|
//# sourceMappingURL=index.esm.js.map
|