@iblai/iblai-js 2.3.14 → 2.3.15

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.
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { useRef, useEffect, useState, useCallback, useLayoutEffect, forwardRef, createElement as createElement$1, createContext, useContext, useMemo, useReducer, useImperativeHandle, isValidElement, Children, PureComponent, cloneElement, Component, useId as useId$2, useDebugValue, lazy, Suspense } from 'react';
3
3
  import { useDispatch, useSelector } from 'react-redux';
4
- import { selectSessionId, selectActiveChatMessages, useCachedSessionId, chatActions, LOCAL_STORAGE_KEYS, TimeTracker, getInitials, useTenantMetadata, useCurrentTenant, selectRbacPermissions, isPureWatcher, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, getTimeAgo, REQUIRED_ACTIONS_FOR_GROUPS, getVisibleAnalyticsTabs, formatRelativeTime as formatRelativeTime$2, ANONYMOUS_USERNAME, combineCSVData, WATCHER_HIDDEN_REPORTS, redirectToAuthSpaJoinTenant, redirectToAuthSpa, getAuthSpaJoinUrl, useOS, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, chatInputSliceActions, removeFile, WithFormPermissions, MENTOR_VISIBILITY } from '@iblai/web-utils';
4
+ import { selectSessionId, selectActiveChatMessages, useCachedSessionId, chatActions, LOCAL_STORAGE_KEYS, TimeTracker, getInitials, useTenantMetadata, useCurrentTenant, selectRbacPermissions, isPureWatcher, WithPermissions, canWriteField, useStripeUpgrade, openExternalUrl, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, getTimeAgo, REQUIRED_ACTIONS_FOR_GROUPS, getVisibleAnalyticsTabs, formatRelativeTime as formatRelativeTime$2, ANONYMOUS_USERNAME, combineCSVData, WATCHER_HIDDEN_REPORTS, canViewPlatformAuditLogs, redirectToAuthSpaJoinTenant, redirectToAuthSpa, getAuthSpaJoinUrl, useOS, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, TOOLS, hasRemoteAiConfig, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, chatInputSliceActions, removeFile, WithFormPermissions, MENTOR_VISIBILITY } from '@iblai/web-utils';
5
5
  import * as dataLayer from '@iblai/data-layer';
6
- import { useCreateSessionIdMutation, useTimeTrackingMutation, useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, 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, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useGetLlmsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useUpdateTenantMetadataMutation, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetNotificationsCountQuery, useLazyGetNotificationsQuery, useMarkAllAsReadMutation, useCreateNotificationPreviewMutation, useSendNotificationMutation, useGetMentorsQuery, useUpdateTemplateMutation, useGetTemplateDetailsQuery, useGetTemplatesQuery, useLazyGetTemplateDetailsQuery, useToggleTemplateMutation, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetTranscriptsConversationHeadlineQuery, useGetAverageRatingQuery, useGetFinancialStatsQuery, useGetDetailedFinancialStatsQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetReportDetailQuery, useLazyGetDownloadReportFromURLQuery, useGetMentorPublicSettingsQuery, useGetReportsQuery, useCreateReportMutation, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useGetMentorMemoriesListQuery, useGetMentorMemoriesQuery, useGetMemoryCategoriesAdminQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useCreateOrUpdateUserReportedSkillMutation, useCreateOrUpdateUserDesiredSkillMutation, useLazyGetPathwayListQuery, useLazyGetUserAssignedPathwaysQuery, useLazyGetUserEnrolledPathwaysQuery, useLazyGetPathwayCompletionQuery, useLazyGetProgramListQuery, useLazyGetProgramCompletionQuery, useLazyGetUserEnrolledProgramsQuery, useLazyGetAssignedProgramsQuery, useLazyGetUserSkillsPointsQuery, useLazyGetUserReportedSkillsQuery, useLazyGetUserDesiredSkillsQuery, useLazyGetUserCatalogPathwaysQuery, useLazyGetPerLearnerInfoQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useLazyGetPersonnalizedSearchQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetClawMentorConfigQuery, useGetClawInstancesQuery, useGetAgentConfigQuery, useUpdateClawMentorConfigMutation, useCreateClawMentorConfigMutation, useDeleteClawMentorConfigMutation, usePushClawConfigMutation, useCreateClawInstanceMutation, useDeleteClawInstanceMutation, useUpdateAgentConfigMutation, useHealthCheckClawInstanceMutation, useTestConnectivityClawInstanceMutation, useUpdateClawInstanceMutation, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetAgentSkillsQuery, useGetMentorSkillAssignmentsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, resolveEffectiveAgentSkills, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetApplicationStatusQuery, useListOwnApplicationsQuery, useGetApplicationFormQuery, useWithdrawApplicationMutation, useRenewApplicationMutation, useCreateApplicationDraftMutation, useSubmitApplicationMutation, useUpdateApplicationMutation, useUploadApplicationAttachmentMutation, useDeleteApplicationAttachmentMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
6
+ import { useCreateSessionIdMutation, useTimeTrackingMutation, useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useGetLearnerDetailsQuery, useGetUserEnrolledCoursesQuery, useGetUserEnrolledProgramsQuery, useGetUserCatalogPathwaysQuery, useGetUsersAsAssertionsQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useGetAllMentorMemoriesQuery, useDeleteGlobalMemoryMutation, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, 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, useDeleteApiKeyMutation, useGetApiKeyQuery, useGetApiKeyFieldPermissionsQuery, useUpdateApiKeyMutation, useGetApiKeysQuery, unwrapApiTokenList, useCreateApiKeyMutation, useCreateLLMCredentialMutation, useGetCredentialsSchemaQuery, useGetMaskedLLMCredentialsQuery, useGetLlmsQuery, useDeleteIntegrationCredentialMutation, useDeleteCredentialMutation, useCreateIntegrationCredentialMutation, useGetIntegrationCredentialsSchemaQuery, useGetMaskedIntegrationCredentialsQuery, useGetAccountBillingInfoQuery, useUpdateAutoRechargeInfoMutation, useTriggerAutoRechargeMutation, useCreateStripeCustomerPortalMutation, useSetPlatformConfigurationsMutation, useGetPlatformConfigurationsQuery, useUpdatePlatformMembershipMutation, useGetPlatformMembershipQuery, useGetCustomDomainsQuery, useCreateCustomDomainMutation, useDeleteCustomDomainMutation, useGetStudentMentorCreationStatusQuery, useSetStudentMentorCreationStatusMutation, coreApiSlice, recommendationPromptTypeEnum, useGetRecommendedPromptsListQuery, useCreateRecommendedPromptMutation, useUpdateRecommendedPromptMutation, useDeleteRecommendedPromptMutation, useLazyGetPublicPlatformImageAssetFileUrlQuery, useUpdateTenantMetadataMutation, useCreatePlatformImageAssetMutation, useGetProviderConfigQuery, useCreateProviderConfigMutation, useDeleteProviderConfigMutation, useGetExternalMappingQuery, useGetCredentialsListQuery, useCreateExternalMappingMutation, useDeleteExternalMappingMutation, useGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useGetNotificationsCountQuery, useLazyGetNotificationsQuery, useMarkAllAsReadMutation, useCreateNotificationPreviewMutation, useSendNotificationMutation, useGetMentorsQuery, useUpdateTemplateMutation, useGetTemplateDetailsQuery, useGetTemplatesQuery, useLazyGetTemplateDetailsQuery, useToggleTemplateMutation, useGetTopicsStatsQuery, useGetUsersStatsQuery, useGetSessionStatsQuery, useGetTopicsDetailsStatsQuery, useGetAccessTimeHeatmapQuery, useGetUserDetailsStatsQuery, useGetTranscriptsConversationHeadlineQuery, useGetAverageRatingQuery, useGetFinancialStatsQuery, useGetDetailedFinancialStatsQuery, useGetTranscriptsMessagesDetailsQuery, useGetTranscriptsMessagesQuery, useGetReportDetailQuery, useLazyGetDownloadReportFromURLQuery, useGetMentorPublicSettingsQuery, useGetReportsQuery, useCreateReportMutation, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useGetPlatformAuditLogsQuery, PLATFORM_AUDIT_EVENT_TYPES, PLATFORM_AUDIT_ACTION_CODES, useGetMentorMemoriesListQuery, useGetMentorMemoriesQuery, useGetMemoryCategoriesAdminQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useCreateOrUpdateUserReportedSkillMutation, useCreateOrUpdateUserDesiredSkillMutation, useLazyGetPathwayListQuery, useLazyGetUserAssignedPathwaysQuery, useLazyGetUserEnrolledPathwaysQuery, useLazyGetPathwayCompletionQuery, useLazyGetProgramListQuery, useLazyGetProgramCompletionQuery, useLazyGetUserEnrolledProgramsQuery, useLazyGetAssignedProgramsQuery, useLazyGetUserSkillsPointsQuery, useLazyGetUserReportedSkillsQuery, useLazyGetUserDesiredSkillsQuery, useLazyGetUserCatalogPathwaysQuery, useLazyGetPerLearnerInfoQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useLazyGetPersonnalizedSearchQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useGetClawMentorConfigQuery, useGetClawInstancesQuery, useGetAgentConfigQuery, useUpdateClawMentorConfigMutation, useCreateClawMentorConfigMutation, useDeleteClawMentorConfigMutation, usePushClawConfigMutation, useCreateClawInstanceMutation, useDeleteClawInstanceMutation, useUpdateAgentConfigMutation, useHealthCheckClawInstanceMutation, useTestConnectivityClawInstanceMutation, useUpdateClawInstanceMutation, useGetAgentSkillResourcesQuery, useCreateAgentSkillResourceMutation, useUpdateAgentSkillResourceMutation, useUploadAgentSkillResourceAssetMutation, useDeleteAgentSkillResourceMutation, useGetAgentSkillsQuery, useGetMentorSkillAssignmentsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, resolveEffectiveAgentSkills, filterSlashSkills, useGetMentorSkillAssignmentsInfiniteQuery, MENTOR_SKILL_ASSIGNMENTS_PAGE_SIZE, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetApplicationStatusQuery, useListOwnApplicationsQuery, useGetApplicationFormQuery, useWithdrawApplicationMutation, useRenewApplicationMutation, useCreateApplicationDraftMutation, useSubmitApplicationMutation, useUpdateApplicationMutation, useUploadApplicationAttachmentMutation, useDeleteApplicationAttachmentMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
7
7
  import { toast } from 'sonner';
8
8
  import { jsx, Fragment as Fragment$1, jsxs } from 'react/jsx-runtime';
9
9
  import * as ReactDOM from 'react-dom';
@@ -45577,7 +45577,7 @@ var isArray$f = function isArray(arr) {
45577
45577
  return toStr.call(arr) === '[object Array]';
45578
45578
  };
45579
45579
 
45580
- var isPlainObject$4 = function isPlainObject(obj) {
45580
+ var isPlainObject$5 = function isPlainObject(obj) {
45581
45581
  if (!obj || toStr.call(obj) !== '[object Object]') {
45582
45582
  return false;
45583
45583
  }
@@ -45656,12 +45656,12 @@ var extend$3 = function extend() {
45656
45656
  // Prevent never-ending loop
45657
45657
  if (target !== copy) {
45658
45658
  // Recurse if we're merging plain objects or arrays
45659
- if (deep && copy && (isPlainObject$4(copy) || (copyIsArray = isArray$f(copy)))) {
45659
+ if (deep && copy && (isPlainObject$5(copy) || (copyIsArray = isArray$f(copy)))) {
45660
45660
  if (copyIsArray) {
45661
45661
  copyIsArray = false;
45662
45662
  clone = src && isArray$f(src) ? src : [];
45663
45663
  } else {
45664
- clone = src && isPlainObject$4(src) ? src : {};
45664
+ clone = src && isPlainObject$5(src) ? src : {};
45665
45665
  }
45666
45666
 
45667
45667
  // Never move original objects, clone them
@@ -45682,7 +45682,7 @@ var extend$3 = function extend() {
45682
45682
 
45683
45683
  var extend$2 = /*@__PURE__*/getDefaultExportFromCjs(extend$3);
45684
45684
 
45685
- function isPlainObject$3(value) {
45685
+ function isPlainObject$4(value) {
45686
45686
  if (typeof value !== 'object' || value === null) {
45687
45687
  return false;
45688
45688
  }
@@ -46753,7 +46753,7 @@ class Processor extends CallableInstance {
46753
46753
  else if (parameters.length > 0) {
46754
46754
  let [primary, ...rest] = parameters;
46755
46755
  const currentPrimary = attachers[entryIndex][1];
46756
- if (isPlainObject$3(currentPrimary) && isPlainObject$3(primary)) {
46756
+ if (isPlainObject$4(currentPrimary) && isPlainObject$4(primary)) {
46757
46757
  primary = extend$2(true, currentPrimary, primary);
46758
46758
  }
46759
46759
 
@@ -46845,7 +46845,7 @@ function assertUnfrozen(name, frozen) {
46845
46845
  function assertNode(node) {
46846
46846
  // `isPlainObj` unfortunately uses `any` instead of `unknown`.
46847
46847
  // type-coverage:ignore-next-line
46848
- if (!isPlainObject$3(node) || typeof node.type !== 'string') {
46848
+ if (!isPlainObject$4(node) || typeof node.type !== 'string') {
46849
46849
  throw new TypeError('Expected node, got `' + node + '`')
46850
46850
  // Fine.
46851
46851
  }
@@ -60562,6 +60562,10 @@ var analyticsAccessTimeHeatmap$3 = {
60562
60562
  tooltipActiveUsers: "{count} active users"
60563
60563
  };
60564
60564
  var analyticsAnalyticsAuditLogStats$3 = {
60565
+ scopeAgent: "Agent",
60566
+ scopePlatform: "Platform",
60567
+ scopeAgentHint: "Configuration changes for this agent.",
60568
+ scopePlatformHint: "Platform-wide changes and security events.",
60565
60569
  noPermission: "You do not have permission to view audit logs.",
60566
60570
  searchForUser: "Search for User",
60567
60571
  searchUserPlaceholder: "Search user...",
@@ -65712,9 +65716,9 @@ var profileApplicationsTab$3 = {
65712
65716
  linkCopied: "Copied",
65713
65717
  formsHeading: "Application forms",
65714
65718
  formsDescription: "Every application form of this platform. One form is the default applicants land on.",
65715
- blockedUsers: "Blocked users",
65719
+ blockedUsers: "Blocked Users",
65716
65720
  blockedUsersDescription: "Families barred from reapplying. Unblocking lets them apply again.",
65717
- allSubmissions: "All submissions ({count})",
65721
+ allSubmissions: "All Submissions ({count})",
65718
65722
  newForm: "New form",
65719
65723
  postApproval_enrolled: "Enrolled",
65720
65724
  postApproval_enrollment_in_progress: "Enrollment in progress",
@@ -65732,7 +65736,7 @@ var profileApplicationsTab$3 = {
65732
65736
  noForms: "No application forms yet. Create one to turn on applications.",
65733
65737
  backToForms: "Back to forms",
65734
65738
  submissionsFor: "Submissions — {form}",
65735
- allSubmissionsHeading: "All submissions",
65739
+ allSubmissionsHeading: "All Submissions",
65736
65740
  candidateFilterPlaceholder: "Student filter, e.g. grade=6",
65737
65741
  sortLabel: "Sort",
65738
65742
  sortNewest: "Newest first",
@@ -66065,6 +66069,81 @@ var graderTabLabels$3 = {
66065
66069
  overrideButtonAria: "Override grade for {email}"
66066
66070
  }
66067
66071
  };
66072
+ var analyticsAnalyticsPlatformAuditLog$3 = {
66073
+ eventTypeLabel: "Event type",
66074
+ allEventTypes: "All Event Types",
66075
+ actionLabel: "Action",
66076
+ allActions: "All Actions",
66077
+ actorUsernameLabel: "Actor username",
66078
+ actorUsernamePlaceholder: "Filter by username",
66079
+ actorEmailLabel: "Actor email",
66080
+ actorEmailPlaceholder: "Filter by email",
66081
+ pickDateRange: "Pick a Date Range",
66082
+ clearFilters: "Clear filters",
66083
+ narrowSuggestion: "{count} entries match. Narrow the date range to review them without paging through everything.",
66084
+ colTimestamp: "TIMESTAMP ({timezone})",
66085
+ colEvent: "EVENT / ACTION",
66086
+ colActor: "ACTOR",
66087
+ colResource: "RESOURCE",
66088
+ colIpAddress: "IP ADDRESS",
66089
+ colDetails: "Details",
66090
+ kindModelChange: "Model change",
66091
+ kindEvent: "Security event",
66092
+ viewDetails: "View",
66093
+ notAvailable: "—",
66094
+ loadError: "An error occurred while loading audit logs.",
66095
+ noEntries: "No audit log entries have been recorded for this platform yet.",
66096
+ noFilteredEntries: "No audit log entries match these filters.",
66097
+ forbiddenTitle: "You do not have permission to view platform audit logs.",
66098
+ forbiddenBody: "Ask a platform administrator to grant you audit log access.",
66099
+ resultSummary: "Showing {shown} of {total} entries."
66100
+ };
66101
+ var analyticsPlatformAuditLogDetailSheet$3 = {
66102
+ title: "Audit entry",
66103
+ description: "Read-only detail for this audit log entry.",
66104
+ timestamp: "Timestamp",
66105
+ event: "Event",
66106
+ action: "Action",
66107
+ actor: "Actor",
66108
+ resource: "Resource",
66109
+ ipAddress: "IP address",
66110
+ entryId: "Entry ID",
66111
+ changesHeading: "Changes",
66112
+ metadataHeading: "Metadata",
66113
+ noMetadata: "This event carries no metadata.",
66114
+ notAvailable: "—"
66115
+ };
66116
+ var analyticsAuditLogJsonView$3 = {
66117
+ "null": "null",
66118
+ empty: "(empty)",
66119
+ emptyString: "(empty string)",
66120
+ emptyList: "(empty list)",
66121
+ emptyObject: "(empty object)",
66122
+ truncated: "(nested too deeply to display)",
66123
+ itemCount: "{count, plural, one {# item} other {# items}}",
66124
+ keyCount: "{count, plural, one {# key} other {# keys}}",
66125
+ noPayload: "No additional data recorded.",
66126
+ noChanges: "No field changes recorded.",
66127
+ fieldColumn: "Field",
66128
+ beforeColumn: "Before",
66129
+ afterColumn: "After"
66130
+ };
66131
+ var analyticsUsePlatformAuditLabels$3 = {
66132
+ eventTypeLogin: "Login",
66133
+ eventTypeLogout: "Logout",
66134
+ eventTypeLoginFailed: "Failed login",
66135
+ eventTypePasswordChange: "Password change",
66136
+ eventTypeExport: "Export",
66137
+ eventTypeDownloadFile: "File download",
66138
+ eventTypeApiCall: "API call",
66139
+ eventTypeViewStudentRecord: "Student record viewed",
66140
+ eventTypeChangeGrade: "Grade change",
66141
+ eventTypeAdminAction: "Admin action",
66142
+ actionCreate: "Create",
66143
+ actionUpdate: "Update",
66144
+ actionDelete: "Delete",
66145
+ actionAccess: "Access"
66146
+ };
66068
66147
  var en = {
66069
66148
  accessTabAddAccess: accessTabAddAccess$3,
66070
66149
  accessTabLabels: accessTabLabels$3,
@@ -66322,7 +66401,11 @@ var en = {
66322
66401
  applyApplyWizard: applyApplyWizard$3,
66323
66402
  profileApplicationsTab: profileApplicationsTab$3,
66324
66403
  profileApplicationsQuestionsEditor: profileApplicationsQuestionsEditor$3,
66325
- graderTabLabels: graderTabLabels$3
66404
+ graderTabLabels: graderTabLabels$3,
66405
+ analyticsAnalyticsPlatformAuditLog: analyticsAnalyticsPlatformAuditLog$3,
66406
+ analyticsPlatformAuditLogDetailSheet: analyticsPlatformAuditLogDetailSheet$3,
66407
+ analyticsAuditLogJsonView: analyticsAuditLogJsonView$3,
66408
+ analyticsUsePlatformAuditLabels: analyticsUsePlatformAuditLabels$3
66326
66409
  };
66327
66410
 
66328
66411
  var accessTabAddAccess$2 = {
@@ -66943,6 +67026,10 @@ var analyticsAccessTimeHeatmap$2 = {
66943
67026
  tooltipActiveUsers: "{count} utilisateurs actifs"
66944
67027
  };
66945
67028
  var analyticsAnalyticsAuditLogStats$2 = {
67029
+ scopeAgent: "Agent",
67030
+ scopePlatform: "Plateforme",
67031
+ scopeAgentHint: "Modifications de configuration de cet agent.",
67032
+ scopePlatformHint: "Modifications et événements de sécurité de la plateforme.",
66946
67033
  noPermission: "Vous n'avez pas la permission de consulter les journaux d'audit.",
66947
67034
  searchForUser: "Rechercher un utilisateur",
66948
67035
  searchUserPlaceholder: "Rechercher un utilisateur...",
@@ -72446,6 +72533,81 @@ var skillsTabLabels$2 = {
72446
72533
  notBaseAgent: "Les compétences ne sont disponibles que pour les agents de base.",
72447
72534
  loading: "Chargement..."
72448
72535
  };
72536
+ var analyticsAnalyticsPlatformAuditLog$2 = {
72537
+ eventTypeLabel: "Type d'événement",
72538
+ allEventTypes: "Tous les types d'événement",
72539
+ actionLabel: "Action",
72540
+ allActions: "Toutes les actions",
72541
+ actorUsernameLabel: "Nom d'utilisateur de l'auteur",
72542
+ actorUsernamePlaceholder: "Filtrer par nom d'utilisateur",
72543
+ actorEmailLabel: "E-mail de l'auteur",
72544
+ actorEmailPlaceholder: "Filtrer par e-mail",
72545
+ pickDateRange: "Choisir une période",
72546
+ clearFilters: "Effacer les filtres",
72547
+ narrowSuggestion: "{count} entrées correspondent. Restreignez la période pour les consulter sans parcourir toutes les pages.",
72548
+ colTimestamp: "HORODATAGE ({timezone})",
72549
+ colEvent: "ÉVÉNEMENT / ACTION",
72550
+ colActor: "AUTEUR",
72551
+ colResource: "RESSOURCE",
72552
+ colIpAddress: "ADRESSE IP",
72553
+ colDetails: "Détails",
72554
+ kindModelChange: "Modification de modèle",
72555
+ kindEvent: "Événement de sécurité",
72556
+ viewDetails: "Voir",
72557
+ notAvailable: "—",
72558
+ loadError: "Une erreur s'est produite lors du chargement des journaux d'audit.",
72559
+ noEntries: "Aucune entrée d'audit n'a encore été enregistrée pour cette plateforme.",
72560
+ noFilteredEntries: "Aucune entrée d'audit ne correspond à ces filtres.",
72561
+ forbiddenTitle: "Vous n'avez pas l'autorisation de consulter les journaux d'audit de la plateforme.",
72562
+ forbiddenBody: "Demandez à un administrateur de la plateforme de vous accorder l'accès aux journaux d'audit.",
72563
+ resultSummary: "Affichage de {shown} entrées sur {total}."
72564
+ };
72565
+ var analyticsPlatformAuditLogDetailSheet$2 = {
72566
+ title: "Entrée d'audit",
72567
+ description: "Détail en lecture seule de cette entrée d'audit.",
72568
+ timestamp: "Horodatage",
72569
+ event: "Événement",
72570
+ action: "Action",
72571
+ actor: "Auteur",
72572
+ resource: "Ressource",
72573
+ ipAddress: "Adresse IP",
72574
+ entryId: "ID de l'entrée",
72575
+ changesHeading: "Modifications",
72576
+ metadataHeading: "Métadonnées",
72577
+ noMetadata: "Cet événement ne contient aucune métadonnée.",
72578
+ notAvailable: "—"
72579
+ };
72580
+ var analyticsAuditLogJsonView$2 = {
72581
+ "null": "null",
72582
+ empty: "(vide)",
72583
+ emptyString: "(chaîne vide)",
72584
+ emptyList: "(liste vide)",
72585
+ emptyObject: "(objet vide)",
72586
+ truncated: "(trop imbriqué pour être affiché)",
72587
+ itemCount: "{count, plural, one {# élément} other {# éléments}}",
72588
+ keyCount: "{count, plural, one {# clé} other {# clés}}",
72589
+ noPayload: "Aucune donnée supplémentaire enregistrée.",
72590
+ noChanges: "Aucune modification de champ enregistrée.",
72591
+ fieldColumn: "Champ",
72592
+ beforeColumn: "Avant",
72593
+ afterColumn: "Après"
72594
+ };
72595
+ var analyticsUsePlatformAuditLabels$2 = {
72596
+ eventTypeLogin: "Connexion",
72597
+ eventTypeLogout: "Déconnexion",
72598
+ eventTypeLoginFailed: "Échec de connexion",
72599
+ eventTypePasswordChange: "Changement de mot de passe",
72600
+ eventTypeExport: "Exportation",
72601
+ eventTypeDownloadFile: "Téléchargement de fichier",
72602
+ eventTypeApiCall: "Appel d'API",
72603
+ eventTypeViewStudentRecord: "Dossier étudiant consulté",
72604
+ eventTypeChangeGrade: "Modification de note",
72605
+ eventTypeAdminAction: "Action d'administration",
72606
+ actionCreate: "Créer",
72607
+ actionUpdate: "Mettre à jour",
72608
+ actionDelete: "Supprimer",
72609
+ actionAccess: "Accéder"
72610
+ };
72449
72611
  var fr = {
72450
72612
  accessTabAddAccess: accessTabAddAccess$2,
72451
72613
  accessTabLabels: accessTabLabels$2,
@@ -72703,7 +72865,11 @@ var fr = {
72703
72865
  profileApplicationsTab: profileApplicationsTab$2,
72704
72866
  profileApplicationsQuestionsEditor: profileApplicationsQuestionsEditor$2,
72705
72867
  slashSkillPicker: slashSkillPicker$2,
72706
- skillsTabLabels: skillsTabLabels$2
72868
+ skillsTabLabels: skillsTabLabels$2,
72869
+ analyticsAnalyticsPlatformAuditLog: analyticsAnalyticsPlatformAuditLog$2,
72870
+ analyticsPlatformAuditLogDetailSheet: analyticsPlatformAuditLogDetailSheet$2,
72871
+ analyticsAuditLogJsonView: analyticsAuditLogJsonView$2,
72872
+ analyticsUsePlatformAuditLabels: analyticsUsePlatformAuditLabels$2
72707
72873
  };
72708
72874
 
72709
72875
  var accessTabAddAccess$1 = {
@@ -73324,6 +73490,10 @@ var analyticsAccessTimeHeatmap$1 = {
73324
73490
  tooltipActiveUsers: "{count} usuarios activos"
73325
73491
  };
73326
73492
  var analyticsAnalyticsAuditLogStats$1 = {
73493
+ scopeAgent: "Agente",
73494
+ scopePlatform: "Plataforma",
73495
+ scopeAgentHint: "Cambios de configuración de este agente.",
73496
+ scopePlatformHint: "Cambios y eventos de seguridad de toda la plataforma.",
73327
73497
  noPermission: "No tienes permiso para ver los registros de auditoría.",
73328
73498
  searchForUser: "Buscar usuario",
73329
73499
  searchUserPlaceholder: "Buscar usuario...",
@@ -78827,6 +78997,81 @@ var skillsTabLabels$1 = {
78827
78997
  notBaseAgent: "Las habilidades solo están disponibles para los agentes base.",
78828
78998
  loading: "Cargando..."
78829
78999
  };
79000
+ var analyticsAnalyticsPlatformAuditLog$1 = {
79001
+ eventTypeLabel: "Tipo de evento",
79002
+ allEventTypes: "Todos los tipos de evento",
79003
+ actionLabel: "Acción",
79004
+ allActions: "Todas las acciones",
79005
+ actorUsernameLabel: "Nombre de usuario del actor",
79006
+ actorUsernamePlaceholder: "Filtrar por nombre de usuario",
79007
+ actorEmailLabel: "Correo del actor",
79008
+ actorEmailPlaceholder: "Filtrar por correo",
79009
+ pickDateRange: "Elige un rango de fechas",
79010
+ clearFilters: "Borrar filtros",
79011
+ narrowSuggestion: "{count} registros coinciden. Acota el rango de fechas para revisarlos sin recorrer todas las páginas.",
79012
+ colTimestamp: "FECHA Y HORA ({timezone})",
79013
+ colEvent: "EVENTO / ACCIÓN",
79014
+ colActor: "ACTOR",
79015
+ colResource: "RECURSO",
79016
+ colIpAddress: "DIRECCIÓN IP",
79017
+ colDetails: "Detalles",
79018
+ kindModelChange: "Cambio de modelo",
79019
+ kindEvent: "Evento de seguridad",
79020
+ viewDetails: "Ver",
79021
+ notAvailable: "—",
79022
+ loadError: "Se produjo un error al cargar los registros de auditoría.",
79023
+ noEntries: "Todavía no se han registrado entradas de auditoría para esta plataforma.",
79024
+ noFilteredEntries: "Ninguna entrada de auditoría coincide con estos filtros.",
79025
+ forbiddenTitle: "No tienes permiso para ver los registros de auditoría de la plataforma.",
79026
+ forbiddenBody: "Pide a un administrador de la plataforma que te dé acceso a los registros de auditoría.",
79027
+ resultSummary: "Mostrando {shown} de {total} entradas."
79028
+ };
79029
+ var analyticsPlatformAuditLogDetailSheet$1 = {
79030
+ title: "Entrada de auditoría",
79031
+ description: "Detalle de solo lectura de esta entrada de auditoría.",
79032
+ timestamp: "Fecha y hora",
79033
+ event: "Evento",
79034
+ action: "Acción",
79035
+ actor: "Actor",
79036
+ resource: "Recurso",
79037
+ ipAddress: "Dirección IP",
79038
+ entryId: "ID de entrada",
79039
+ changesHeading: "Cambios",
79040
+ metadataHeading: "Metadatos",
79041
+ noMetadata: "Este evento no incluye metadatos.",
79042
+ notAvailable: "—"
79043
+ };
79044
+ var analyticsAuditLogJsonView$1 = {
79045
+ "null": "null",
79046
+ empty: "(vacío)",
79047
+ emptyString: "(cadena vacía)",
79048
+ emptyList: "(lista vacía)",
79049
+ emptyObject: "(objeto vacío)",
79050
+ truncated: "(demasiado anidado para mostrarlo)",
79051
+ itemCount: "{count, plural, one {# elemento} other {# elementos}}",
79052
+ keyCount: "{count, plural, one {# clave} other {# claves}}",
79053
+ noPayload: "No se registraron datos adicionales.",
79054
+ noChanges: "No se registraron cambios de campos.",
79055
+ fieldColumn: "Campo",
79056
+ beforeColumn: "Antes",
79057
+ afterColumn: "Después"
79058
+ };
79059
+ var analyticsUsePlatformAuditLabels$1 = {
79060
+ eventTypeLogin: "Inicio de sesión",
79061
+ eventTypeLogout: "Cierre de sesión",
79062
+ eventTypeLoginFailed: "Inicio de sesión fallido",
79063
+ eventTypePasswordChange: "Cambio de contraseña",
79064
+ eventTypeExport: "Exportación",
79065
+ eventTypeDownloadFile: "Descarga de archivo",
79066
+ eventTypeApiCall: "Llamada a la API",
79067
+ eventTypeViewStudentRecord: "Expediente de estudiante consultado",
79068
+ eventTypeChangeGrade: "Cambio de calificación",
79069
+ eventTypeAdminAction: "Acción de administrador",
79070
+ actionCreate: "Crear",
79071
+ actionUpdate: "Actualizar",
79072
+ actionDelete: "Eliminar",
79073
+ actionAccess: "Acceder"
79074
+ };
78830
79075
  var es = {
78831
79076
  accessTabAddAccess: accessTabAddAccess$1,
78832
79077
  accessTabLabels: accessTabLabels$1,
@@ -79084,7 +79329,11 @@ var es = {
79084
79329
  profileApplicationsTab: profileApplicationsTab$1,
79085
79330
  profileApplicationsQuestionsEditor: profileApplicationsQuestionsEditor$1,
79086
79331
  slashSkillPicker: slashSkillPicker$1,
79087
- skillsTabLabels: skillsTabLabels$1
79332
+ skillsTabLabels: skillsTabLabels$1,
79333
+ analyticsAnalyticsPlatformAuditLog: analyticsAnalyticsPlatformAuditLog$1,
79334
+ analyticsPlatformAuditLogDetailSheet: analyticsPlatformAuditLogDetailSheet$1,
79335
+ analyticsAuditLogJsonView: analyticsAuditLogJsonView$1,
79336
+ analyticsUsePlatformAuditLabels: analyticsUsePlatformAuditLabels$1
79088
79337
  };
79089
79338
 
79090
79339
  var accessTabAddAccess = {
@@ -79705,6 +79954,10 @@ var analyticsAccessTimeHeatmap = {
79705
79954
  tooltipActiveUsers: "{count} 位活跃用户"
79706
79955
  };
79707
79956
  var analyticsAnalyticsAuditLogStats = {
79957
+ scopeAgent: "智能体",
79958
+ scopePlatform: "平台",
79959
+ scopeAgentHint: "此智能体的配置变更。",
79960
+ scopePlatformHint: "全平台的变更与安全事件。",
79708
79961
  noPermission: "您没有查看审计日志的权限。",
79709
79962
  searchForUser: "搜索用户",
79710
79963
  searchUserPlaceholder: "搜索用户...",
@@ -85208,6 +85461,81 @@ var skillsTabLabels = {
85208
85461
  notBaseAgent: "技能仅适用于基础智能体。",
85209
85462
  loading: "加载中..."
85210
85463
  };
85464
+ var analyticsAnalyticsPlatformAuditLog = {
85465
+ eventTypeLabel: "事件类型",
85466
+ allEventTypes: "所有事件类型",
85467
+ actionLabel: "操作",
85468
+ allActions: "所有操作",
85469
+ actorUsernameLabel: "操作者用户名",
85470
+ actorUsernamePlaceholder: "按用户名筛选",
85471
+ actorEmailLabel: "操作者邮箱",
85472
+ actorEmailPlaceholder: "按邮箱筛选",
85473
+ pickDateRange: "选择日期范围",
85474
+ clearFilters: "清除筛选",
85475
+ narrowSuggestion: "共有 {count} 条记录匹配。缩小日期范围可避免逐页翻阅。",
85476
+ colTimestamp: "时间 ({timezone})",
85477
+ colEvent: "事件 / 操作",
85478
+ colActor: "操作者",
85479
+ colResource: "资源",
85480
+ colIpAddress: "IP 地址",
85481
+ colDetails: "详情",
85482
+ kindModelChange: "数据变更",
85483
+ kindEvent: "安全事件",
85484
+ viewDetails: "查看",
85485
+ notAvailable: "—",
85486
+ loadError: "加载审计日志时出错。",
85487
+ noEntries: "该平台尚未记录任何审计日志。",
85488
+ noFilteredEntries: "没有符合这些筛选条件的审计日志。",
85489
+ forbiddenTitle: "您没有查看平台审计日志的权限。",
85490
+ forbiddenBody: "请联系平台管理员为您开通审计日志访问权限。",
85491
+ resultSummary: "显示 {total} 条中的 {shown} 条。"
85492
+ };
85493
+ var analyticsPlatformAuditLogDetailSheet = {
85494
+ title: "审计记录",
85495
+ description: "该审计日志记录的只读详情。",
85496
+ timestamp: "时间",
85497
+ event: "事件",
85498
+ action: "操作",
85499
+ actor: "操作者",
85500
+ resource: "资源",
85501
+ ipAddress: "IP 地址",
85502
+ entryId: "记录 ID",
85503
+ changesHeading: "变更内容",
85504
+ metadataHeading: "元数据",
85505
+ noMetadata: "该事件没有元数据。",
85506
+ notAvailable: "—"
85507
+ };
85508
+ var analyticsAuditLogJsonView = {
85509
+ "null": "null",
85510
+ empty: "(空)",
85511
+ emptyString: "(空字符串)",
85512
+ emptyList: "(空列表)",
85513
+ emptyObject: "(空对象)",
85514
+ truncated: "(嵌套层级过深,无法显示)",
85515
+ itemCount: "{count} 项",
85516
+ keyCount: "{count} 个键",
85517
+ noPayload: "没有记录额外数据。",
85518
+ noChanges: "没有记录字段变更。",
85519
+ fieldColumn: "字段",
85520
+ beforeColumn: "变更前",
85521
+ afterColumn: "变更后"
85522
+ };
85523
+ var analyticsUsePlatformAuditLabels = {
85524
+ eventTypeLogin: "登录",
85525
+ eventTypeLogout: "登出",
85526
+ eventTypeLoginFailed: "登录失败",
85527
+ eventTypePasswordChange: "修改密码",
85528
+ eventTypeExport: "导出",
85529
+ eventTypeDownloadFile: "文件下载",
85530
+ eventTypeApiCall: "API 调用",
85531
+ eventTypeViewStudentRecord: "查看学生记录",
85532
+ eventTypeChangeGrade: "成绩变更",
85533
+ eventTypeAdminAction: "管理员操作",
85534
+ actionCreate: "创建",
85535
+ actionUpdate: "更新",
85536
+ actionDelete: "删除",
85537
+ actionAccess: "访问"
85538
+ };
85211
85539
  var zh = {
85212
85540
  accessTabAddAccess: accessTabAddAccess,
85213
85541
  accessTabLabels: accessTabLabels,
@@ -85465,7 +85793,11 @@ var zh = {
85465
85793
  profileApplicationsTab: profileApplicationsTab,
85466
85794
  profileApplicationsQuestionsEditor: profileApplicationsQuestionsEditor,
85467
85795
  slashSkillPicker: slashSkillPicker,
85468
- skillsTabLabels: skillsTabLabels
85796
+ skillsTabLabels: skillsTabLabels,
85797
+ analyticsAnalyticsPlatformAuditLog: analyticsAnalyticsPlatformAuditLog,
85798
+ analyticsPlatformAuditLogDetailSheet: analyticsPlatformAuditLogDetailSheet,
85799
+ analyticsAuditLogJsonView: analyticsAuditLogJsonView,
85800
+ analyticsUsePlatformAuditLabels: analyticsUsePlatformAuditLabels
85469
85801
  };
85470
85802
 
85471
85803
  /**
@@ -134083,7 +134415,7 @@ var objectCtorString = funcToString.call(Object);
134083
134415
  * _.isPlainObject(Object.create(null));
134084
134416
  * // => true
134085
134417
  */
134086
- function isPlainObject$2(value) {
134418
+ function isPlainObject$3(value) {
134087
134419
  if (!isObjectLike$1(value) || baseGetTag$1(value) != objectTag) {
134088
134420
  return false;
134089
134421
  }
@@ -134096,9 +134428,9 @@ function isPlainObject$2(value) {
134096
134428
  funcToString.call(Ctor) == objectCtorString;
134097
134429
  }
134098
134430
 
134099
- var isPlainObject_1 = isPlainObject$2;
134431
+ var isPlainObject_1 = isPlainObject$3;
134100
134432
 
134101
- var isPlainObject$1 = /*@__PURE__*/getDefaultExportFromCjs(isPlainObject_1);
134433
+ var isPlainObject$2 = /*@__PURE__*/getDefaultExportFromCjs(isPlainObject_1);
134102
134434
 
134103
134435
  var baseGetTag = _baseGetTag,
134104
134436
  isObjectLike = isObjectLike_1;
@@ -134315,7 +134647,7 @@ function Shape(_ref2) {
134315
134647
  shape = /*#__PURE__*/cloneElement(option, _objectSpread$h(_objectSpread$h({}, props), getPropsFromShapeOption(option)));
134316
134648
  } else if (isFunction$3(option)) {
134317
134649
  shape = option(props);
134318
- } else if (isPlainObject$1(option) && !isBoolean(option)) {
134650
+ } else if (isPlainObject$2(option) && !isBoolean(option)) {
134319
134651
  var nextProps = propTransformer(option, props);
134320
134652
  shape = /*#__PURE__*/React__default.createElement(ShapeSelector, {
134321
134653
  shapeType: shapeType,
@@ -142031,11 +142363,11 @@ function EnrolledUserProgressModal({ open, onOpenChange, username, userName, ema
142031
142363
  ];
142032
142364
  const currentGradePct = fractionToPct((_f = (_e = item === null || item === void 0 ? void 0 : item.edx_progress) === null || _e === void 0 ? void 0 : _e.course_grade) === null || _f === void 0 ? void 0 : _f.percent);
142033
142365
  const passingPct = getPassingPct((_h = (_g = item === null || item === void 0 ? void 0 : item.edx_progress) === null || _g === void 0 ? void 0 : _g.grading_policy) === null || _h === void 0 ? void 0 : _h.grade_range);
142034
- return (jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: jsxs(DialogContent, { className: "max-w-2xl max-h-[85vh] overflow-y-auto", "aria-label": "Enrolled user progress", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: userName || username || 'Learner progress' }), jsxs(DialogDescription, { children: [email ? `${email} · ` : '', resolvedName || (isProgram ? 'Program progress' : 'Course progress')] })] }), loading ? (jsx("div", { className: "flex items-center justify-center py-12", children: jsx("div", { className: "text-sm text-gray-500", children: "Loading..." }) })) : !item ? (jsx(EmptyStats, { title: "No progress data available" })) : (jsxs("div", { className: "space-y-6", children: [jsxs("div", { className: "relative mx-auto", style: { width: 220, height: 220 }, children: [jsx(ResponsiveContainer, { width: "100%", height: "100%", children: jsx(PieChart, { children: jsxs(Pie, { data: pieData, dataKey: "value", cx: "50%", cy: "50%", innerRadius: 75, outerRadius: 100, startAngle: 90, endAngle: -270, stroke: "none", isAnimationActive: false, children: [jsx(Cell, { fill: COMPLETED_COLOR }), jsx(Cell, { fill: REMAINING_COLOR })] }) }) }), jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center pointer-events-none", children: [jsxs("span", { className: "text-3xl font-bold text-gray-700", children: [percentage, "%"] }), jsx("span", { className: "text-sm text-gray-500", children: "completed" })] })] }), jsxs("div", { className: "divide-y divide-[oklch(0.922_0_0)]", children: [jsx(DetailRow, { label: "Status", children: jsx("span", { className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${((_j = item.completion) === null || _j === void 0 ? void 0 : _j.passed)
142366
+ return (jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: jsxs(DialogContent, { className: "max-w-2xl max-h-[85vh] overflow-y-auto", "aria-label": "Enrolled user progress", children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: userName || username || 'Learner progress' }), jsxs(DialogDescription, { children: [email ? `${email} · ` : '', resolvedName || (isProgram ? 'Program progress' : 'Course progress')] })] }), loading ? (jsx("div", { className: "flex items-center justify-center py-12", children: jsx("div", { className: "text-sm text-gray-500", children: "Loading..." }) })) : !item ? (jsx(EmptyStats, { title: "No progress data available" })) : (jsxs("div", { className: "space-y-6", children: [jsxs("div", { className: "relative mx-auto", style: { width: 220, height: 220 }, children: [jsx(ResponsiveContainer, { width: "100%", height: "100%", children: jsx(PieChart, { children: jsxs(Pie, { data: pieData, dataKey: "value", cx: "50%", cy: "50%", innerRadius: 75, outerRadius: 100, startAngle: 90, endAngle: -270, stroke: "none", isAnimationActive: false, children: [jsx(Cell, { fill: COMPLETED_COLOR }), jsx(Cell, { fill: REMAINING_COLOR })] }) }) }), jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center pointer-events-none", children: [jsxs("span", { className: "text-3xl font-bold text-gray-700", children: [percentage, "%"] }), jsx("span", { className: "text-sm text-gray-500", children: "completed" })] })] }), jsxs("div", { className: "divide-y divide-[oklch(0.922_0_0)]", children: [jsx(DetailRow$1, { label: "Status", children: jsx("span", { className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${((_j = item.completion) === null || _j === void 0 ? void 0 : _j.passed)
142035
142367
  ? 'bg-green-50 text-green-700'
142036
- : 'bg-gray-100 text-gray-600'}`, children: ((_k = item.completion) === null || _k === void 0 ? void 0 : _k.passed) ? 'Passed' : 'Not passed' }) }), jsx(DetailRow, { label: "Passed on", children: formatDate$2((_l = item.completion) === null || _l === void 0 ? void 0 : _l.passed_date) }), jsx(DetailRow, { label: "Time spent", children: item.time_spent || '—' }), jsx(DetailRow, { label: "Enrollment date", children: formatDate$2((_o = (_m = item.enrollment) === null || _m === void 0 ? void 0 : _m.started) !== null && _o !== void 0 ? _o : (_p = item.enrollment) === null || _p === void 0 ? void 0 : _p.created) })] }), ((_s = (_r = (_q = item.edx_progress) === null || _q === void 0 ? void 0 : _q.grading_policy) === null || _r === void 0 ? void 0 : _r.assignment_policies) === null || _s === void 0 ? void 0 : _s.length) ? (jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "rounded-lg border p-4", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("h4", { className: "text-sm font-semibold text-gray-900", children: "Grades" }), jsx("p", { className: "text-xs text-gray-500", children: "This represents the weighted grade against the grade needed to pass this course." }), jsx(GradeBar, { currentPct: currentGradePct, passingPct: passingPct })] }), jsxs("div", { className: "flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 px-4 py-3", children: [jsx(TriangleAlert, { className: "mt-0.5 h-4 w-4 shrink-0 text-amber-600" }), jsxs("span", { className: "text-sm font-medium text-gray-800", children: ["A weighted grade of ", passingPct, "% is required to pass in this course"] })] }), jsxs("div", { className: "rounded-lg border p-4 space-y-3", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("h4", { className: "text-sm font-semibold text-gray-900", children: "Grade summary" }), jsx("div", { className: "overflow-x-auto", children: jsxs("table", { className: "w-full border-collapse text-sm", children: [jsx("thead", { children: jsxs("tr", { className: "bg-amber-50 text-[11px] uppercase tracking-wide text-gray-600", children: [jsx("th", { className: "px-3 py-2 text-left font-medium", children: "Assignment type" }), jsx("th", { className: "px-3 py-2 text-right font-medium", children: "Weight" }), jsx("th", { className: "px-3 py-2 text-right font-medium", children: "Grade" }), jsx("th", { className: "px-3 py-2 text-right font-medium", children: "Weighted grade" })] }) }), jsxs("tbody", { children: [gradeSummary === null || gradeSummary === void 0 ? void 0 : gradeSummary.rows.map((row, index) => (jsxs("tr", { className: index % 2 === 0 ? '' : 'bg-gray-50', children: [jsxs("td", { className: "px-3 py-2 text-gray-800", children: [row.type, row.footnote ? (jsx("sup", { className: "ml-0.5 text-amber-500", children: row.footnote })) : null] }), jsxs("td", { className: "px-3 py-2 text-right text-gray-700", children: [row.weightPct, "%"] }), jsxs("td", { className: "px-3 py-2 text-right text-gray-700", children: [row.gradePct, "%"] }), jsxs("td", { className: "px-3 py-2 text-right font-semibold text-amber-600", children: [row.weightedGradePct, "%"] })] }, row.type))), jsxs("tr", { className: "border-l-2 border-amber-400 bg-amber-50", children: [jsx("td", { className: "px-3 py-2 font-medium text-gray-800", colSpan: 3, children: "Current weighted grade summary" }), jsxs("td", { className: "px-3 py-2 text-right font-bold text-amber-600", children: [currentGradePct, "%"] })] })] })] }) }), gradeSummary && gradeSummary.footnotes.length > 0 ? (jsx("div", { className: "space-y-1", children: gradeSummary.footnotes.map((note, index) => (jsxs("p", { className: "text-xs text-gray-500", children: [jsx("sup", { className: "text-amber-500", children: index + 1 }), " ", note] }, note))) })) : null] })] })) : null] }))] }) }));
142368
+ : 'bg-gray-100 text-gray-600'}`, children: ((_k = item.completion) === null || _k === void 0 ? void 0 : _k.passed) ? 'Passed' : 'Not passed' }) }), jsx(DetailRow$1, { label: "Passed on", children: formatDate$2((_l = item.completion) === null || _l === void 0 ? void 0 : _l.passed_date) }), jsx(DetailRow$1, { label: "Time spent", children: item.time_spent || '—' }), jsx(DetailRow$1, { label: "Enrollment date", children: formatDate$2((_o = (_m = item.enrollment) === null || _m === void 0 ? void 0 : _m.started) !== null && _o !== void 0 ? _o : (_p = item.enrollment) === null || _p === void 0 ? void 0 : _p.created) })] }), ((_s = (_r = (_q = item.edx_progress) === null || _q === void 0 ? void 0 : _q.grading_policy) === null || _r === void 0 ? void 0 : _r.assignment_policies) === null || _s === void 0 ? void 0 : _s.length) ? (jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "rounded-lg border p-4", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("h4", { className: "text-sm font-semibold text-gray-900", children: "Grades" }), jsx("p", { className: "text-xs text-gray-500", children: "This represents the weighted grade against the grade needed to pass this course." }), jsx(GradeBar, { currentPct: currentGradePct, passingPct: passingPct })] }), jsxs("div", { className: "flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 px-4 py-3", children: [jsx(TriangleAlert, { className: "mt-0.5 h-4 w-4 shrink-0 text-amber-600" }), jsxs("span", { className: "text-sm font-medium text-gray-800", children: ["A weighted grade of ", passingPct, "% is required to pass in this course"] })] }), jsxs("div", { className: "rounded-lg border p-4 space-y-3", style: { borderColor: 'oklch(.922 0 0)' }, children: [jsx("h4", { className: "text-sm font-semibold text-gray-900", children: "Grade summary" }), jsx("div", { className: "overflow-x-auto", children: jsxs("table", { className: "w-full border-collapse text-sm", children: [jsx("thead", { children: jsxs("tr", { className: "bg-amber-50 text-[11px] uppercase tracking-wide text-gray-600", children: [jsx("th", { className: "px-3 py-2 text-left font-medium", children: "Assignment type" }), jsx("th", { className: "px-3 py-2 text-right font-medium", children: "Weight" }), jsx("th", { className: "px-3 py-2 text-right font-medium", children: "Grade" }), jsx("th", { className: "px-3 py-2 text-right font-medium", children: "Weighted grade" })] }) }), jsxs("tbody", { children: [gradeSummary === null || gradeSummary === void 0 ? void 0 : gradeSummary.rows.map((row, index) => (jsxs("tr", { className: index % 2 === 0 ? '' : 'bg-gray-50', children: [jsxs("td", { className: "px-3 py-2 text-gray-800", children: [row.type, row.footnote ? (jsx("sup", { className: "ml-0.5 text-amber-500", children: row.footnote })) : null] }), jsxs("td", { className: "px-3 py-2 text-right text-gray-700", children: [row.weightPct, "%"] }), jsxs("td", { className: "px-3 py-2 text-right text-gray-700", children: [row.gradePct, "%"] }), jsxs("td", { className: "px-3 py-2 text-right font-semibold text-amber-600", children: [row.weightedGradePct, "%"] })] }, row.type))), jsxs("tr", { className: "border-l-2 border-amber-400 bg-amber-50", children: [jsx("td", { className: "px-3 py-2 font-medium text-gray-800", colSpan: 3, children: "Current weighted grade summary" }), jsxs("td", { className: "px-3 py-2 text-right font-bold text-amber-600", children: [currentGradePct, "%"] })] })] })] }) }), gradeSummary && gradeSummary.footnotes.length > 0 ? (jsx("div", { className: "space-y-1", children: gradeSummary.footnotes.map((note, index) => (jsxs("p", { className: "text-xs text-gray-500", children: [jsx("sup", { className: "text-amber-500", children: index + 1 }), " ", note] }, note))) })) : null] })] })) : null] }))] }) }));
142037
142369
  }
142038
- function DetailRow({ label, children }) {
142370
+ function DetailRow$1({ label, children }) {
142039
142371
  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 })] }));
142040
142372
  }
142041
142373
 
@@ -173070,7 +173402,7 @@ function inputRulesPlugin(props) {
173070
173402
  function getType(value) {
173071
173403
  return Object.prototype.toString.call(value).slice(8, -1);
173072
173404
  }
173073
- function isPlainObject(value) {
173405
+ function isPlainObject$1(value) {
173074
173406
  if (getType(value) !== "Object") {
173075
173407
  return false;
173076
173408
  }
@@ -173080,9 +173412,9 @@ function isPlainObject(value) {
173080
173412
  // src/utilities/mergeDeep.ts
173081
173413
  function mergeDeep(target, source) {
173082
173414
  const output = { ...target };
173083
- if (isPlainObject(target) && isPlainObject(source)) {
173415
+ if (isPlainObject$1(target) && isPlainObject$1(source)) {
173084
173416
  Object.keys(source).forEach((key) => {
173085
- if (isPlainObject(source[key]) && isPlainObject(target[key])) {
173417
+ if (isPlainObject$1(source[key]) && isPlainObject$1(target[key])) {
173086
173418
  output[key] = mergeDeep(target[key], source[key]);
173087
173419
  } else {
173088
173420
  output[key] = source[key];
@@ -185980,7 +186312,7 @@ const toTimeString = (value) => {
185980
186312
  return date.toISOString().slice(11, 16);
185981
186313
  };
185982
186314
  const DEFAULT_TIMEZONE = 'UTC';
185983
- const isValidTimeZone = (value) => {
186315
+ const isValidTimeZone$1 = (value) => {
185984
186316
  if (!value) {
185985
186317
  return false;
185986
186318
  }
@@ -185994,12 +186326,12 @@ const isValidTimeZone = (value) => {
185994
186326
  };
185995
186327
  const resolveTimezone = (...candidates) => {
185996
186328
  for (const candidate of candidates) {
185997
- if (isValidTimeZone(candidate)) {
186329
+ if (isValidTimeZone$1(candidate)) {
185998
186330
  return candidate;
185999
186331
  }
186000
186332
  }
186001
186333
  const localTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
186002
- if (isValidTimeZone(localTimeZone)) {
186334
+ if (isValidTimeZone$1(localTimeZone)) {
186003
186335
  return localTimeZone;
186004
186336
  }
186005
186337
  return DEFAULT_TIMEZONE;
@@ -187364,7 +187696,7 @@ const ChartLoading = ({ title = 'Loading...' }) => {
187364
187696
  };
187365
187697
 
187366
187698
  // Utility function to format date to YYYY-MM-DD
187367
- const formatDateToYYYYMMDD$6 = (date) => {
187699
+ const formatDateToYYYYMMDD$7 = (date) => {
187368
187700
  if (!date)
187369
187701
  return undefined;
187370
187702
  return date.toISOString().split('T')[0];
@@ -187414,8 +187746,8 @@ const useOverview = ({ tenantKey, mentorId, usergroupIds, }) => {
187414
187746
  metric: 'active_users',
187415
187747
  platform_key: tenantKey,
187416
187748
  ...(usersStatsDateFilter.activeFilter === 'custom' && {
187417
- start_date: formatDateToYYYYMMDD$6((_g = usersStatsDateFilter.dateRange) === null || _g === void 0 ? void 0 : _g.startDate),
187418
- end_date: formatDateToYYYYMMDD$6((_h = usersStatsDateFilter.dateRange) === null || _h === void 0 ? void 0 : _h.endDate),
187749
+ start_date: formatDateToYYYYMMDD$7((_g = usersStatsDateFilter.dateRange) === null || _g === void 0 ? void 0 : _g.startDate),
187750
+ end_date: formatDateToYYYYMMDD$7((_h = usersStatsDateFilter.dateRange) === null || _h === void 0 ? void 0 : _h.endDate),
187419
187751
  }),
187420
187752
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187421
187753
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187424,8 +187756,8 @@ const useOverview = ({ tenantKey, mentorId, usergroupIds, }) => {
187424
187756
  date_filter: sessionStatsDateFilter.activeFilter || FILTER_30D,
187425
187757
  platform_key: tenantKey,
187426
187758
  ...(sessionStatsDateFilter.activeFilter === 'custom' && {
187427
- start_date: formatDateToYYYYMMDD$6((_j = sessionStatsDateFilter.dateRange) === null || _j === void 0 ? void 0 : _j.startDate),
187428
- end_date: formatDateToYYYYMMDD$6((_k = sessionStatsDateFilter.dateRange) === null || _k === void 0 ? void 0 : _k.endDate),
187759
+ start_date: formatDateToYYYYMMDD$7((_j = sessionStatsDateFilter.dateRange) === null || _j === void 0 ? void 0 : _j.startDate),
187760
+ end_date: formatDateToYYYYMMDD$7((_k = sessionStatsDateFilter.dateRange) === null || _k === void 0 ? void 0 : _k.endDate),
187429
187761
  }),
187430
187762
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187431
187763
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187434,8 +187766,8 @@ const useOverview = ({ tenantKey, mentorId, usergroupIds, }) => {
187434
187766
  date_filter: topicsDetailsStatsDateFilter.activeFilter || FILTER_30D,
187435
187767
  platform_key: tenantKey,
187436
187768
  ...(topicsDetailsStatsDateFilter.activeFilter === 'custom' && {
187437
- start_date: formatDateToYYYYMMDD$6((_l = topicsDetailsStatsDateFilter.dateRange) === null || _l === void 0 ? void 0 : _l.startDate),
187438
- end_date: formatDateToYYYYMMDD$6((_m = topicsDetailsStatsDateFilter.dateRange) === null || _m === void 0 ? void 0 : _m.endDate),
187769
+ start_date: formatDateToYYYYMMDD$7((_l = topicsDetailsStatsDateFilter.dateRange) === null || _l === void 0 ? void 0 : _l.startDate),
187770
+ end_date: formatDateToYYYYMMDD$7((_m = topicsDetailsStatsDateFilter.dateRange) === null || _m === void 0 ? void 0 : _m.endDate),
187439
187771
  }),
187440
187772
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187441
187773
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187625,12 +187957,12 @@ function AnalyticsLayout({ children, currentPath, basePath, onTabChange, tabs =
187625
187957
  return;
187626
187958
  onTabChange(tabValue);
187627
187959
  };
187628
- return (jsxs("div", { className: "flex flex-col flex-1 min-h-0 h-full overflow-hidden overscroll-none bg-[#f5f7fb]", children: [jsx("div", { className: "p-6 pb-0", children: jsx("div", { className: "flex items-center justify-between mb-6", children: jsxs("div", { className: "flex items-center justify-between w-full overflow-x-auto", children: [jsx(Tabs, { className: "mb-6 bg-[#f5f7fb]", value: activeTab, children: jsx(TabsList, { className: "bg-[#f5f7fb]", children: tabs
187960
+ return (jsxs("div", { className: "flex flex-col flex-1 min-h-0 h-full overflow-hidden overscroll-none bg-[#f5f7fb]", children: [jsx("div", { className: "p-6 pb-0 pt-4 xs:pt-0", children: jsx("div", { className: "flex items-center justify-between mb-4 xs:mb-2", children: jsxs("div", { className: "flex items-center justify-between w-full overflow-x-auto", children: [jsx(Tabs, { className: "bg-[#f5f7fb]", value: activeTab, children: jsx(TabsList, { className: "bg-[#f5f7fb]", children: tabs
187629
187961
  .filter((tab) => !excludeTabs.includes(tab.value) && canAccessTab(tab.value))
187630
187962
  .map((tab) => {
187631
187963
  const isActive = activeTab === tab.value;
187632
187964
  return (jsx(TabsTrigger, { value: tab.value, className: cn(className, isActive && activeTabClassName), onClick: () => handleTabClick(tab.value), children: tab.label }, tab.value));
187633
- }) }) }), jsxs("div", { className: "flex items-center gap-4", children: [beforeDataReports, canAccessTab('reports') && (jsx(Tabs, { className: "mb-6 bg-[#f5f7fb]", value: activeTab, children: jsx(TabsList, { className: "bg-[#f5f7fb]", children: jsx(TabsTrigger, { value: "reports", className: cn(className, activeTab === 'reports' && activeTabClassName), onClick: () => handleTabClick('reports'), children: "Data Reports" }) }) }))] })] }) }) }), jsx("div", { className: "flex-1 overflow-auto overscroll-contain scrollbar-none px-6 pb-6 pt-0", children: isActiveTabAllowed ? children : null })] }));
187965
+ }) }) }), jsxs("div", { className: "flex items-center gap-4", children: [beforeDataReports, canAccessTab('reports') && (jsx(Tabs, { className: "bg-[#f5f7fb]", value: activeTab, children: jsx(TabsList, { className: "bg-[#f5f7fb]", children: jsx(TabsTrigger, { value: "reports", className: cn(className, activeTab === 'reports' && activeTabClassName), onClick: () => handleTabClick('reports'), children: "Data Reports" }) }) }))] })] }) }) }), jsx("div", { className: "flex-1 overflow-auto overscroll-contain scrollbar-none px-6 pb-6 pt-0", children: isActiveTabAllowed ? children : null })] }));
187634
187966
  }
187635
187967
 
187636
187968
  const accessTimeData = [
@@ -187698,7 +188030,7 @@ function AccessTimeHeatmap({ accessTimeData, loading, }) {
187698
188030
  }
187699
188031
 
187700
188032
  // Utility function to format date to YYYY-MM-DD
187701
- const formatDateToYYYYMMDD$5 = (date) => {
188033
+ const formatDateToYYYYMMDD$6 = (date) => {
187702
188034
  if (!date)
187703
188035
  return undefined;
187704
188036
  return date.toISOString().split('T')[0];
@@ -187738,8 +188070,8 @@ const useUsers = ({ tenantKey, mentorId, usergroupIds, }) => {
187738
188070
  metric: 'active_users',
187739
188071
  platform_key: tenantKey,
187740
188072
  ...(activeUsersStatsDateFilter.activeFilter === 'custom' && {
187741
- start_date: formatDateToYYYYMMDD$5((_a = activeUsersStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
187742
- end_date: formatDateToYYYYMMDD$5((_b = activeUsersStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
188073
+ start_date: formatDateToYYYYMMDD$6((_a = activeUsersStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
188074
+ end_date: formatDateToYYYYMMDD$6((_b = activeUsersStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
187743
188075
  }),
187744
188076
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187745
188077
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187748,8 +188080,8 @@ const useUsers = ({ tenantKey, mentorId, usergroupIds, }) => {
187748
188080
  date_filter: accessTimeHeatmapDateFilter.activeFilter || FILTER_30D,
187749
188081
  platform_key: tenantKey,
187750
188082
  ...(accessTimeHeatmapDateFilter.activeFilter === 'custom' && {
187751
- start_date: formatDateToYYYYMMDD$5((_c = accessTimeHeatmapDateFilter.dateRange) === null || _c === void 0 ? void 0 : _c.startDate),
187752
- end_date: formatDateToYYYYMMDD$5((_d = accessTimeHeatmapDateFilter.dateRange) === null || _d === void 0 ? void 0 : _d.endDate),
188083
+ start_date: formatDateToYYYYMMDD$6((_c = accessTimeHeatmapDateFilter.dateRange) === null || _c === void 0 ? void 0 : _c.startDate),
188084
+ end_date: formatDateToYYYYMMDD$6((_d = accessTimeHeatmapDateFilter.dateRange) === null || _d === void 0 ? void 0 : _d.endDate),
187753
188085
  }),
187754
188086
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187755
188087
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187758,8 +188090,8 @@ const useUsers = ({ tenantKey, mentorId, usergroupIds, }) => {
187758
188090
  date_filter: userDetailsStatsDateFilter.activeFilter || FILTER_30D,
187759
188091
  platform_key: tenantKey,
187760
188092
  ...(userDetailsStatsDateFilter.activeFilter === 'custom' && {
187761
- start_date: formatDateToYYYYMMDD$5((_e = userDetailsStatsDateFilter.dateRange) === null || _e === void 0 ? void 0 : _e.startDate),
187762
- end_date: formatDateToYYYYMMDD$5((_f = userDetailsStatsDateFilter.dateRange) === null || _f === void 0 ? void 0 : _f.endDate),
188093
+ start_date: formatDateToYYYYMMDD$6((_e = userDetailsStatsDateFilter.dateRange) === null || _e === void 0 ? void 0 : _e.startDate),
188094
+ end_date: formatDateToYYYYMMDD$6((_f = userDetailsStatsDateFilter.dateRange) === null || _f === void 0 ? void 0 : _f.endDate),
187763
188095
  }),
187764
188096
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187765
188097
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -187882,7 +188214,7 @@ function AnalyticsUsersStats({ tenantKey, mentorId, selectedMentorId, usergroupI
187882
188214
  }
187883
188215
 
187884
188216
  // Utility function to format date to YYYY-MM-DD
187885
- const formatDateToYYYYMMDD$4 = (date) => {
188217
+ const formatDateToYYYYMMDD$5 = (date) => {
187886
188218
  if (!date)
187887
188219
  return undefined;
187888
188220
  return date.toISOString().split('T')[0];
@@ -187900,8 +188232,8 @@ const useTopics = ({ tenantKey, mentorId, usergroupIds, }) => {
187900
188232
  metric: 'conversations',
187901
188233
  date_filter: conversationsStatsDateFilter.activeFilter || FILTER_30D,
187902
188234
  ...(conversationsStatsDateFilter.activeFilter === 'custom' && {
187903
- start_date: formatDateToYYYYMMDD$4((_a = conversationsStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
187904
- end_date: formatDateToYYYYMMDD$4((_b = conversationsStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
188235
+ start_date: formatDateToYYYYMMDD$5((_a = conversationsStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
188236
+ end_date: formatDateToYYYYMMDD$5((_b = conversationsStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
187905
188237
  }),
187906
188238
  });
187907
188239
  const { data: topicsStats, isLoading: isLoadingTopicsStats } = useGetTopicsStatsQuery({
@@ -187919,8 +188251,8 @@ const useTopics = ({ tenantKey, mentorId, usergroupIds, }) => {
187919
188251
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187920
188252
  date_filter: averageRatingDateFilter.activeFilter || FILTER_30D,
187921
188253
  ...(averageRatingDateFilter.activeFilter === 'custom' && {
187922
- start_date: formatDateToYYYYMMDD$4((_c = averageRatingDateFilter.dateRange) === null || _c === void 0 ? void 0 : _c.startDate),
187923
- end_date: formatDateToYYYYMMDD$4((_d = averageRatingDateFilter.dateRange) === null || _d === void 0 ? void 0 : _d.endDate),
188254
+ start_date: formatDateToYYYYMMDD$5((_c = averageRatingDateFilter.dateRange) === null || _c === void 0 ? void 0 : _c.startDate),
188255
+ end_date: formatDateToYYYYMMDD$5((_d = averageRatingDateFilter.dateRange) === null || _d === void 0 ? void 0 : _d.endDate),
187924
188256
  }),
187925
188257
  });
187926
188258
  const [topicsDetailsDateFilter, setTopicsDetailsDateFilter] = useState({
@@ -187931,8 +188263,8 @@ const useTopics = ({ tenantKey, mentorId, usergroupIds, }) => {
187931
188263
  date_filter: topicsDetailsDateFilter.activeFilter || FILTER_30D,
187932
188264
  platform_key: tenantKey,
187933
188265
  ...(topicsDetailsDateFilter.activeFilter === 'custom' && {
187934
- start_date: formatDateToYYYYMMDD$4((_e = topicsDetailsDateFilter.dateRange) === null || _e === void 0 ? void 0 : _e.startDate),
187935
- end_date: formatDateToYYYYMMDD$4((_f = topicsDetailsDateFilter.dateRange) === null || _f === void 0 ? void 0 : _f.endDate),
188266
+ start_date: formatDateToYYYYMMDD$5((_e = topicsDetailsDateFilter.dateRange) === null || _e === void 0 ? void 0 : _e.startDate),
188267
+ end_date: formatDateToYYYYMMDD$5((_f = topicsDetailsDateFilter.dateRange) === null || _f === void 0 ? void 0 : _f.endDate),
187936
188268
  }),
187937
188269
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
187938
188270
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -188006,7 +188338,7 @@ function AnalyticsTopicsStats({ tenantKey, mentorId, selectedMentorId, usergroup
188006
188338
  }
188007
188339
 
188008
188340
  // Utility function to format date to YYYY-MM-DD
188009
- const formatDateToYYYYMMDD$3 = (date) => {
188341
+ const formatDateToYYYYMMDD$4 = (date) => {
188010
188342
  if (!date)
188011
188343
  return undefined;
188012
188344
  return date.toISOString().split('T')[0];
@@ -188064,8 +188396,8 @@ const useFinancial = ({ tenantKey, mentorId, usergroupIds, }) => {
188064
188396
  date_filter: detailedCostPerDayFilters.activeFilter || FILTER_30D,
188065
188397
  platform_key: tenantKey,
188066
188398
  ...(detailedCostPerDayFilters.activeFilter === 'custom' && {
188067
- start_date: formatDateToYYYYMMDD$3((_a = detailedCostPerDayFilters.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
188068
- end_date: formatDateToYYYYMMDD$3((_b = detailedCostPerDayFilters.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
188399
+ start_date: formatDateToYYYYMMDD$4((_a = detailedCostPerDayFilters.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
188400
+ end_date: formatDateToYYYYMMDD$4((_b = detailedCostPerDayFilters.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
188069
188401
  }),
188070
188402
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
188071
188403
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -188075,8 +188407,8 @@ const useFinancial = ({ tenantKey, mentorId, usergroupIds, }) => {
188075
188407
  date_filter: detailedCostPerProviderFilters.activeFilter || FILTER_30D,
188076
188408
  platform_key: tenantKey,
188077
188409
  ...(detailedCostPerProviderFilters.activeFilter === 'custom' && {
188078
- start_date: formatDateToYYYYMMDD$3((_c = detailedCostPerProviderFilters.dateRange) === null || _c === void 0 ? void 0 : _c.startDate),
188079
- end_date: formatDateToYYYYMMDD$3((_d = detailedCostPerProviderFilters.dateRange) === null || _d === void 0 ? void 0 : _d.endDate),
188410
+ start_date: formatDateToYYYYMMDD$4((_c = detailedCostPerProviderFilters.dateRange) === null || _c === void 0 ? void 0 : _c.startDate),
188411
+ end_date: formatDateToYYYYMMDD$4((_d = detailedCostPerProviderFilters.dateRange) === null || _d === void 0 ? void 0 : _d.endDate),
188080
188412
  }),
188081
188413
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
188082
188414
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -188087,8 +188419,8 @@ const useFinancial = ({ tenantKey, mentorId, usergroupIds, }) => {
188087
188419
  date_filter: detailedCostPerUserFilters.activeFilter || FILTER_30D,
188088
188420
  platform_key: tenantKey,
188089
188421
  ...(detailedCostPerUserFilters.activeFilter === 'custom' && {
188090
- start_date: formatDateToYYYYMMDD$3((_e = detailedCostPerUserFilters.dateRange) === null || _e === void 0 ? void 0 : _e.startDate),
188091
- end_date: formatDateToYYYYMMDD$3((_f = detailedCostPerUserFilters.dateRange) === null || _f === void 0 ? void 0 : _f.endDate),
188422
+ start_date: formatDateToYYYYMMDD$4((_e = detailedCostPerUserFilters.dateRange) === null || _e === void 0 ? void 0 : _e.startDate),
188423
+ end_date: formatDateToYYYYMMDD$4((_f = detailedCostPerUserFilters.dateRange) === null || _f === void 0 ? void 0 : _f.endDate),
188092
188424
  }),
188093
188425
  page: costPerUserPage,
188094
188426
  limit: costPerUserLimit,
@@ -188102,8 +188434,8 @@ const useFinancial = ({ tenantKey, mentorId, usergroupIds, }) => {
188102
188434
  date_filter: detailedLLMCostFilters.activeFilter || FILTER_30D,
188103
188435
  platform_key: tenantKey,
188104
188436
  ...(detailedLLMCostFilters.activeFilter === 'custom' && {
188105
- start_date: formatDateToYYYYMMDD$3((_g = detailedLLMCostFilters.dateRange) === null || _g === void 0 ? void 0 : _g.startDate),
188106
- end_date: formatDateToYYYYMMDD$3((_h = detailedLLMCostFilters.dateRange) === null || _h === void 0 ? void 0 : _h.endDate),
188437
+ start_date: formatDateToYYYYMMDD$4((_g = detailedLLMCostFilters.dateRange) === null || _g === void 0 ? void 0 : _g.startDate),
188438
+ end_date: formatDateToYYYYMMDD$4((_h = detailedLLMCostFilters.dateRange) === null || _h === void 0 ? void 0 : _h.endDate),
188107
188439
  }),
188108
188440
  ...(mentorId ? { mentor_unique_id: mentorId } : {}),
188109
188441
  ...((usergroupIds === null || usergroupIds === void 0 ? void 0 : usergroupIds.length) ? { usergroup_ids: usergroupIds } : {}),
@@ -223986,7 +224318,7 @@ function ReportRangeDayButton({ day, modifiers, className, ...props }) {
223986
224318
  }
223987
224319
 
223988
224320
  // Utility function to format date to YYYY-MM-DD
223989
- const formatDateToYYYYMMDD$2 = (date) => {
224321
+ const formatDateToYYYYMMDD$3 = (date) => {
223990
224322
  if (!date)
223991
224323
  return undefined;
223992
224324
  return date.toISOString().split('T')[0];
@@ -224047,8 +224379,8 @@ const useCourses = ({ tenantKey, mentorId, courseId, }) => {
224047
224379
  return ({
224048
224380
  metric: 'course',
224049
224381
  date_filter: enrollmentStatsDateFilter.activeFilter,
224050
- start_date: formatDateToYYYYMMDD$2((_a = enrollmentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224051
- end_date: formatDateToYYYYMMDD$2((_b = enrollmentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224382
+ start_date: formatDateToYYYYMMDD$3((_a = enrollmentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224383
+ end_date: formatDateToYYYYMMDD$3((_b = enrollmentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224052
224384
  include_overtime: true,
224053
224385
  platform_key: tenantKey,
224054
224386
  mentor_unique_id: mentorId,
@@ -224072,8 +224404,8 @@ const useCourses = ({ tenantKey, mentorId, courseId, }) => {
224072
224404
  content_id: courseId,
224073
224405
  metric: 'course',
224074
224406
  date_filter: timeSpentStatsDateFilter.activeFilter,
224075
- start_date: formatDateToYYYYMMDD$2((_a = timeSpentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224076
- end_date: formatDateToYYYYMMDD$2((_b = timeSpentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224407
+ start_date: formatDateToYYYYMMDD$3((_a = timeSpentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224408
+ end_date: formatDateToYYYYMMDD$3((_b = timeSpentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224077
224409
  include_overtime: true,
224078
224410
  platform_key: tenantKey,
224079
224411
  mentor_unique_id: mentorId,
@@ -224343,7 +224675,7 @@ function AnalyticsCourseDetail({ tenantKey, mentorId, selectedMentorId, courseId
224343
224675
  }
224344
224676
 
224345
224677
  // Utility function to format date to YYYY-MM-DD
224346
- const formatDateToYYYYMMDD$1 = (date) => {
224678
+ const formatDateToYYYYMMDD$2 = (date) => {
224347
224679
  if (!date)
224348
224680
  return undefined;
224349
224681
  return date.toISOString().split('T')[0];
@@ -224404,8 +224736,8 @@ const usePrograms = ({ tenantKey, mentorId, programId, }) => {
224404
224736
  return ({
224405
224737
  metric: 'program',
224406
224738
  date_filter: enrollmentStatsDateFilter.activeFilter,
224407
- start_date: formatDateToYYYYMMDD$1((_a = enrollmentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224408
- end_date: formatDateToYYYYMMDD$1((_b = enrollmentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224739
+ start_date: formatDateToYYYYMMDD$2((_a = enrollmentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224740
+ end_date: formatDateToYYYYMMDD$2((_b = enrollmentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224409
224741
  include_overtime: true,
224410
224742
  platform_key: tenantKey,
224411
224743
  mentor_unique_id: mentorId,
@@ -224429,8 +224761,8 @@ const usePrograms = ({ tenantKey, mentorId, programId, }) => {
224429
224761
  content_id: programId,
224430
224762
  metric: 'program',
224431
224763
  date_filter: timeSpentStatsDateFilter.activeFilter,
224432
- start_date: formatDateToYYYYMMDD$1((_a = timeSpentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224433
- end_date: formatDateToYYYYMMDD$1((_b = timeSpentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224764
+ start_date: formatDateToYYYYMMDD$2((_a = timeSpentStatsDateFilter.dateRange) === null || _a === void 0 ? void 0 : _a.startDate),
224765
+ end_date: formatDateToYYYYMMDD$2((_b = timeSpentStatsDateFilter.dateRange) === null || _b === void 0 ? void 0 : _b.endDate),
224434
224766
  include_overtime: true,
224435
224767
  platform_key: tenantKey,
224436
224768
  mentor_unique_id: mentorId,
@@ -224917,7 +225249,7 @@ function AnalyticsMonetizationStats({ tenantKey }) {
224917
225249
  setPaywallPage(paywallsData.previous_page), children: t('analyticsAnalyticsMonetizationStats.previous') }), jsx("span", { className: "text-xs text-gray-500", children: t('analyticsAnalyticsMonetizationStats.pageLabel', { page: paywallPage }) }), jsx(Button$1, { variant: "outline", size: "sm", className: "h-8 text-xs", disabled: paywallsData.next_page === null, onClick: () => paywallsData.next_page !== null && setPaywallPage(paywallsData.next_page), children: t('analyticsAnalyticsMonetizationStats.next') })] })] }))] }) })] }));
224918
225250
  }
224919
225251
 
224920
- const formatDateToYYYYMMDD = (date) => {
225252
+ const formatDateToYYYYMMDD$1 = (date) => {
224921
225253
  if (!date)
224922
225254
  return undefined;
224923
225255
  return date.toISOString().split('T')[0];
@@ -224947,8 +225279,8 @@ const useAuditLog = ({ tenantKey, userId, mentorId, }) => {
224947
225279
  ...(mentorId ? { mentor: mentorId } : {}),
224948
225280
  ...(actionFilter !== undefined ? { action: actionFilter } : {}),
224949
225281
  ...(actorFilter ? { actor_email: actorFilter } : {}),
224950
- ...((dateRange === null || dateRange === void 0 ? void 0 : dateRange.from) ? { from_date: formatDateToYYYYMMDD(dateRange.from) } : {}),
224951
- ...((dateRange === null || dateRange === void 0 ? void 0 : dateRange.to) ? { to_date: formatDateToYYYYMMDD(dateRange.to) } : {}),
225282
+ ...((dateRange === null || dateRange === void 0 ? void 0 : dateRange.from) ? { from_date: formatDateToYYYYMMDD$1(dateRange.from) } : {}),
225283
+ ...((dateRange === null || dateRange === void 0 ? void 0 : dateRange.to) ? { to_date: formatDateToYYYYMMDD$1(dateRange.to) } : {}),
224952
225284
  };
224953
225285
  const { data, isLoading, error, isFetching } = useGetAuditLogsQuery({
224954
225286
  org: tenantKey,
@@ -224984,6 +225316,467 @@ const useAuditLog = ({ tenantKey, userId, mentorId, }) => {
224984
225316
  };
224985
225317
  };
224986
225318
 
225319
+ function Sheet({ ...props }) {
225320
+ return jsx(DialogPrimitive.Root, { "data-slot": "sheet", ...props });
225321
+ }
225322
+ function SheetPortal({ ...props }) {
225323
+ return jsx(DialogPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
225324
+ }
225325
+ function SheetOverlay({ className, ...props }) {
225326
+ return (jsx(DialogPrimitive.Overlay, { "data-slot": "sheet-overlay", className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50', className), ...props }));
225327
+ }
225328
+ function SheetContent({ className, children, side = 'right', ...props }) {
225329
+ const t = useT();
225330
+ return (jsxs(SheetPortal, { children: [jsx(SheetOverlay, {}), jsxs(DialogPrimitive.Content, { "data-slot": "sheet-content", className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500', side === 'right' &&
225331
+ 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm', side === 'left' &&
225332
+ 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm', side === 'top' &&
225333
+ 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b', side === 'bottom' &&
225334
+ 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t', className), ...props, children: [children, jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [jsx(X$1, { className: "size-4" }), jsx("span", { className: "sr-only", children: t('uiSheet.close') })] })] })] }));
225335
+ }
225336
+ function SheetHeader({ className, ...props }) {
225337
+ return (jsx("div", { "data-slot": "sheet-header", className: cn('flex flex-col gap-1.5 p-4', className), ...props }));
225338
+ }
225339
+ function SheetTitle({ className, ...props }) {
225340
+ return (jsx(DialogPrimitive.Title, { "data-slot": "sheet-title", className: cn('text-foreground font-semibold', className), ...props }));
225341
+ }
225342
+ function SheetDescription({ className, ...props }) {
225343
+ return (jsx(DialogPrimitive.Description, { "data-slot": "sheet-description", className: cn('text-muted-foreground text-sm', className), ...props }));
225344
+ }
225345
+
225346
+ /**
225347
+ * Generic renderer for the free-form JSON the audit trail carries in
225348
+ * `changes` (CRUD entries) and `metadata` (manual events). Neither field has a
225349
+ * guaranteed shape, so nothing here assumes flat key/value pairs: objects and
225350
+ * arrays nest recursively, unknown keys render as-is, and non-JSON values fall
225351
+ * back to their string form rather than throwing.
225352
+ */
225353
+ /** Levels expanded on first render; deeper nodes start collapsed. */
225354
+ const AUTO_EXPAND_DEPTH = 2;
225355
+ /**
225356
+ * Hard stop for pathological payloads. JSON can't be cyclic, but a deeply
225357
+ * nested blob would still render thousands of rows and lock the tab.
225358
+ */
225359
+ const MAX_DEPTH = 20;
225360
+ function isPlainObject(value) {
225361
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
225362
+ }
225363
+ function isBranch(value) {
225364
+ return Array.isArray(value) || isPlainObject(value);
225365
+ }
225366
+ /** Renders a leaf value with a type-appropriate style. */
225367
+ function JsonLeaf({ value }) {
225368
+ const t = useT();
225369
+ if (value === null) {
225370
+ return (jsx("span", { className: "font-mono text-xs text-gray-400", children: t('analyticsAuditLogJsonView.null') }));
225371
+ }
225372
+ if (value === undefined) {
225373
+ return (jsx("span", { className: "font-mono text-xs text-gray-400", children: t('analyticsAuditLogJsonView.empty') }));
225374
+ }
225375
+ if (typeof value === 'boolean') {
225376
+ return jsx("span", { className: "font-mono text-xs text-purple-700", children: String(value) });
225377
+ }
225378
+ if (typeof value === 'number') {
225379
+ return jsx("span", { className: "font-mono text-xs text-blue-700", children: String(value) });
225380
+ }
225381
+ if (typeof value === 'string') {
225382
+ if (value === '') {
225383
+ return (jsx("span", { className: "font-mono text-xs text-gray-400", children: t('analyticsAuditLogJsonView.emptyString') }));
225384
+ }
225385
+ return (jsx("span", { className: "font-mono text-xs break-all whitespace-pre-wrap text-gray-800", children: value }));
225386
+ }
225387
+ // Functions, symbols and bigints can't come out of `JSON.parse`, but the
225388
+ // renderer is public API — degrade instead of crashing.
225389
+ return jsx("span", { className: "font-mono text-xs break-all text-gray-800", children: String(value) });
225390
+ }
225391
+ function JsonBranch({ label, value, depth }) {
225392
+ const t = useT();
225393
+ const [isOpen, setIsOpen] = useState(depth < AUTO_EXPAND_DEPTH);
225394
+ const entries = Array.isArray(value)
225395
+ ? value.map((item, index) => [String(index), item])
225396
+ : Object.entries(value);
225397
+ const summary = Array.isArray(value)
225398
+ ? t('analyticsAuditLogJsonView.itemCount', { count: entries.length })
225399
+ : t('analyticsAuditLogJsonView.keyCount', { count: entries.length });
225400
+ if (entries.length === 0) {
225401
+ return (jsxs("div", { className: "flex flex-wrap items-baseline gap-2 py-1", children: [jsx("span", { className: "font-mono text-xs font-medium text-gray-600", children: label }), jsx("span", { className: "font-mono text-xs text-gray-400", children: Array.isArray(value)
225402
+ ? t('analyticsAuditLogJsonView.emptyList')
225403
+ : t('analyticsAuditLogJsonView.emptyObject') })] }));
225404
+ }
225405
+ return (jsxs("div", { className: "py-0.5", children: [jsxs("button", { type: "button", onClick: () => setIsOpen((open) => !open), "aria-expanded": isOpen, className: "flex items-center gap-1 rounded text-left hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500", children: [isOpen ? (jsx(ChevronDown, { className: "h-3.5 w-3.5 shrink-0 text-gray-400", "aria-hidden": "true" })) : (jsx(ChevronRight, { className: "h-3.5 w-3.5 shrink-0 text-gray-400", "aria-hidden": "true" })), jsx("span", { className: "font-mono text-xs font-medium text-gray-600", children: label }), jsx("span", { className: "font-mono text-[11px] text-gray-400", children: summary })] }), isOpen && (jsx("div", { className: "ml-2 border-l border-gray-200 pl-3", children: entries.map(([childKey, childValue]) => (jsx(JsonNode, { label: childKey, value: childValue, depth: depth + 1 }, childKey))) }))] }));
225406
+ }
225407
+ function JsonNode({ label, value, depth }) {
225408
+ const t = useT();
225409
+ if (depth >= MAX_DEPTH) {
225410
+ return (jsxs("div", { className: "flex flex-wrap items-baseline gap-2 py-1", children: [jsx("span", { className: "font-mono text-xs font-medium text-gray-600", children: label }), jsx("span", { className: "font-mono text-xs text-gray-400", children: t('analyticsAuditLogJsonView.truncated') })] }));
225411
+ }
225412
+ if (isBranch(value)) {
225413
+ return jsx(JsonBranch, { label: label, value: value, depth: depth });
225414
+ }
225415
+ return (jsxs("div", { className: "flex flex-wrap items-baseline gap-2 py-1", children: [jsx("span", { className: "font-mono text-xs font-medium text-gray-600", children: label }), jsx(JsonLeaf, { value: value })] }));
225416
+ }
225417
+ function AuditLogJsonView({ value, className, emptyLabel }) {
225418
+ const t = useT();
225419
+ const isEmpty = value === null ||
225420
+ value === undefined ||
225421
+ (isPlainObject(value) && Object.keys(value).length === 0) ||
225422
+ (Array.isArray(value) && value.length === 0);
225423
+ if (isEmpty) {
225424
+ return (jsx("p", { className: cn('text-sm text-gray-500', className), children: emptyLabel !== null && emptyLabel !== void 0 ? emptyLabel : t('analyticsAuditLogJsonView.noPayload') }));
225425
+ }
225426
+ // A bare scalar payload still deserves to render rather than be dropped.
225427
+ if (!isBranch(value)) {
225428
+ return (jsx("div", { className: cn('rounded-md border border-gray-200 bg-gray-50 p-3', className), children: jsx(JsonLeaf, { value: value }) }));
225429
+ }
225430
+ const entries = Array.isArray(value)
225431
+ ? value.map((item, index) => [String(index), item])
225432
+ : Object.entries(value);
225433
+ return (jsx("div", { className: cn('rounded-md border border-gray-200 bg-gray-50 p-3', className), children: entries.map(([key, childValue]) => (jsx(JsonNode, { label: key, value: childValue, depth: 0 }, key))) }));
225434
+ }
225435
+ /**
225436
+ * `changes` usually arrives as `{ field: [old, new] }`, which reads far better
225437
+ * as a before/after table than as a JSON tree. Fields that don't match the
225438
+ * tuple shape (nested objects, single values, longer arrays) fall through to
225439
+ * the generic renderer, so a schema drift degrades instead of breaking.
225440
+ */
225441
+ function AuditLogChangesView({ changes }) {
225442
+ const t = useT();
225443
+ if (!isPlainObject(changes) || Object.keys(changes).length === 0) {
225444
+ return (jsx(AuditLogJsonView, { value: changes, emptyLabel: t('analyticsAuditLogJsonView.noChanges') }));
225445
+ }
225446
+ const entries = Object.entries(changes);
225447
+ const tupleEntries = entries.filter(([, change]) => Array.isArray(change) && change.length === 2 && !change.some(isBranch));
225448
+ const otherEntries = entries.filter(([key]) => !tupleEntries.some(([k]) => k === key));
225449
+ return (jsxs("div", { className: "space-y-3", children: [tupleEntries.length > 0 && (jsx("div", { className: "overflow-hidden rounded-md border border-gray-200", children: jsxs("table", { className: "w-full table-fixed border-collapse text-left text-xs", children: [jsx("thead", { children: jsxs("tr", { className: "bg-gray-50 text-gray-500", children: [jsx("th", { className: "w-1/3 p-2 font-medium", children: t('analyticsAuditLogJsonView.fieldColumn') }), jsx("th", { className: "w-1/3 p-2 font-medium", children: t('analyticsAuditLogJsonView.beforeColumn') }), jsx("th", { className: "w-1/3 p-2 font-medium", children: t('analyticsAuditLogJsonView.afterColumn') })] }) }), jsx("tbody", { children: tupleEntries.map(([field, change]) => {
225450
+ const [before, after] = change;
225451
+ return (jsxs("tr", { className: "border-t border-gray-200 align-top", children: [jsx("td", { className: "p-2 font-mono break-all text-gray-700", children: field }), jsx("td", { className: "p-2", children: jsx(JsonLeaf, { value: before }) }), jsx("td", { className: "p-2", children: jsx(JsonLeaf, { value: after }) })] }, field));
225452
+ }) })] }) })), otherEntries.length > 0 && jsx(AuditLogJsonView, { value: Object.fromEntries(otherEntries) })] }));
225453
+ }
225454
+
225455
+ /**
225456
+ * Formatting helpers shared by the platform-scoped audit trail views.
225457
+ *
225458
+ * Timestamps are rendered through `Intl.DateTimeFormat` with an explicit
225459
+ * `timeZone` rather than the browser default, so an admin reviewing a trail
225460
+ * reads the times in the platform's zone wherever they happen to be sitting.
225461
+ */
225462
+ const UTC = 'UTC';
225463
+ /** `Intl` throws on an unknown zone, so probe before trusting a value. */
225464
+ function isValidTimeZone(value) {
225465
+ if (!value)
225466
+ return false;
225467
+ try {
225468
+ new Intl.DateTimeFormat(undefined, { timeZone: value });
225469
+ return true;
225470
+ }
225471
+ catch (_a) {
225472
+ return false;
225473
+ }
225474
+ }
225475
+ /**
225476
+ * Picks the zone to render in: the platform's configured zone when the host
225477
+ * supplies one, then the viewer's own zone, and UTC as the last resort so the
225478
+ * column is never ambiguous.
225479
+ */
225480
+ function resolveAuditTimeZone(preferred) {
225481
+ if (isValidTimeZone(preferred))
225482
+ return preferred;
225483
+ try {
225484
+ const local = Intl.DateTimeFormat().resolvedOptions().timeZone;
225485
+ if (isValidTimeZone(local))
225486
+ return local;
225487
+ }
225488
+ catch (_a) {
225489
+ /* fall through to UTC */
225490
+ }
225491
+ return UTC;
225492
+ }
225493
+ /** e.g. `Jan 15, 2024, 10:30 AM`. Returns the raw input if it can't be parsed. */
225494
+ function formatAuditTimestamp(timestamp, timeZone) {
225495
+ const date = new Date(timestamp);
225496
+ if (Number.isNaN(date.getTime()))
225497
+ return timestamp;
225498
+ try {
225499
+ return new Intl.DateTimeFormat(undefined, {
225500
+ timeZone,
225501
+ year: 'numeric',
225502
+ month: 'short',
225503
+ day: '2-digit',
225504
+ hour: 'numeric',
225505
+ minute: '2-digit',
225506
+ second: '2-digit',
225507
+ }).format(date);
225508
+ }
225509
+ catch (_a) {
225510
+ return date.toISOString();
225511
+ }
225512
+ }
225513
+ /** Short zone name (`EST`, `GMT+1`) used to label the timestamp column. */
225514
+ function formatTimeZoneLabel(timeZone) {
225515
+ var _a, _b;
225516
+ try {
225517
+ const parts = new Intl.DateTimeFormat('en-US', {
225518
+ timeZone,
225519
+ timeZoneName: 'short',
225520
+ }).formatToParts(new Date());
225521
+ return (_b = (_a = parts.find((part) => part.type === 'timeZoneName')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : timeZone;
225522
+ }
225523
+ catch (_c) {
225524
+ return timeZone;
225525
+ }
225526
+ }
225527
+ /**
225528
+ * Humanizes the snake_case identifiers the backend sends for `event_type` and
225529
+ * `resource_type`. Unknown values still render readably instead of raw, which
225530
+ * matters because the manual event list grows server-side.
225531
+ */
225532
+ function humanizeAuditToken(token) {
225533
+ const words = token
225534
+ .replace(/([a-z0-9])([A-Z])/g, '$1_$2')
225535
+ .toLowerCase()
225536
+ .split(/[^a-z0-9]+/)
225537
+ .filter(Boolean);
225538
+ if (words.length === 0)
225539
+ return token;
225540
+ const [first, ...rest] = words;
225541
+ return [first.charAt(0).toUpperCase() + first.slice(1), ...rest].join(' ');
225542
+ }
225543
+
225544
+ function usePlatformAuditLabels() {
225545
+ const t = useT();
225546
+ const eventTypeLabels = {
225547
+ login: t('analyticsUsePlatformAuditLabels.eventTypeLogin'),
225548
+ logout: t('analyticsUsePlatformAuditLabels.eventTypeLogout'),
225549
+ login_failed: t('analyticsUsePlatformAuditLabels.eventTypeLoginFailed'),
225550
+ password_change: t('analyticsUsePlatformAuditLabels.eventTypePasswordChange'),
225551
+ export: t('analyticsUsePlatformAuditLabels.eventTypeExport'),
225552
+ download_file: t('analyticsUsePlatformAuditLabels.eventTypeDownloadFile'),
225553
+ api_call: t('analyticsUsePlatformAuditLabels.eventTypeApiCall'),
225554
+ view_student_record: t('analyticsUsePlatformAuditLabels.eventTypeViewStudentRecord'),
225555
+ change_grade: t('analyticsUsePlatformAuditLabels.eventTypeChangeGrade'),
225556
+ admin_action: t('analyticsUsePlatformAuditLabels.eventTypeAdminAction'),
225557
+ };
225558
+ const actionLabels = {
225559
+ create: t('analyticsUsePlatformAuditLabels.actionCreate'),
225560
+ update: t('analyticsUsePlatformAuditLabels.actionUpdate'),
225561
+ delete: t('analyticsUsePlatformAuditLabels.actionDelete'),
225562
+ access: t('analyticsUsePlatformAuditLabels.actionAccess'),
225563
+ };
225564
+ return {
225565
+ eventTypeLabel: (eventType) => { var _a; return (_a = eventTypeLabels[eventType]) !== null && _a !== void 0 ? _a : humanizeAuditToken(eventType); },
225566
+ actionLabel: (action) => { var _a; return (_a = actionLabels[action]) !== null && _a !== void 0 ? _a : humanizeAuditToken(action); },
225567
+ };
225568
+ }
225569
+
225570
+ function DetailRow({ label, value }) {
225571
+ return (jsxs("div", { className: "grid grid-cols-[minmax(0,7rem)_1fr] gap-3 py-2", children: [jsx("dt", { className: "text-xs font-medium tracking-wide text-gray-500 uppercase", children: label }), jsx("dd", { className: "text-sm break-words text-gray-800", children: value })] }));
225572
+ }
225573
+ /**
225574
+ * Read-only detail view for a single audit entry. Which payload it shows is
225575
+ * decided by the `event_type === null` branch: CRUD entries get the field-level
225576
+ * `changes` diff, manual events get their `metadata`.
225577
+ */
225578
+ function PlatformAuditLogDetailSheet({ entry, open, onOpenChange, timeZone, }) {
225579
+ const t = useT();
225580
+ const { eventTypeLabel, actionLabel } = usePlatformAuditLabels();
225581
+ const isCrudEntry = entry ? entry.event_type === null : false;
225582
+ const placeholder = t('analyticsPlatformAuditLogDetailSheet.notAvailable');
225583
+ return (jsx(Sheet, { open: open, onOpenChange: onOpenChange, children: jsxs(SheetContent, { side: "right", className: "w-full overflow-y-auto sm:max-w-xl", "data-testid": "platform-audit-detail", children: [jsxs(SheetHeader, { children: [jsx(SheetTitle, { children: t('analyticsPlatformAuditLogDetailSheet.title') }), jsx(SheetDescription, { children: t('analyticsPlatformAuditLogDetailSheet.description') })] }), entry && (jsxs("div", { className: "space-y-6 px-4 pb-6", children: [jsxs("dl", { className: "divide-y divide-gray-100", children: [jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.timestamp'), value: formatAuditTimestamp(entry.timestamp, timeZone) }), jsx(DetailRow, { label: isCrudEntry
225584
+ ? t('analyticsPlatformAuditLogDetailSheet.action')
225585
+ : t('analyticsPlatformAuditLogDetailSheet.event'), value: isCrudEntry ? actionLabel(entry.action) : eventTypeLabel(String(entry.event_type)) }), !isCrudEntry && (jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.action'), value: actionLabel(entry.action) })), jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.actor'), value: entry.actor_username || entry.actor_email ? (jsxs("span", { className: "flex flex-col", children: [entry.actor_username && jsx("span", { children: entry.actor_username }), entry.actor_email && (jsx("span", { className: "text-xs text-gray-500", children: entry.actor_email }))] })) : (placeholder) }), isCrudEntry && (jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.resource'), value: entry.resource_type || entry.resource_repr ? (jsxs("span", { className: "flex flex-col", children: [entry.resource_repr && jsx("span", { children: entry.resource_repr }), jsx("span", { className: "text-xs text-gray-500", children: [
225586
+ entry.resource_type ? humanizeAuditToken(entry.resource_type) : null,
225587
+ entry.resource_id ? `#${entry.resource_id}` : null,
225588
+ ]
225589
+ .filter(Boolean)
225590
+ .join(' ') })] })) : (placeholder) })), jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.ipAddress'), value: entry.remote_addr || placeholder }), jsx(DetailRow, { label: t('analyticsPlatformAuditLogDetailSheet.entryId'), value: String(entry.id) })] }), jsxs("div", { className: "space-y-2", children: [jsx("h3", { className: "text-sm font-semibold text-gray-800", children: isCrudEntry
225591
+ ? t('analyticsPlatformAuditLogDetailSheet.changesHeading')
225592
+ : t('analyticsPlatformAuditLogDetailSheet.metadataHeading') }), isCrudEntry ? (jsx(AuditLogChangesView, { changes: entry.changes })) : (jsx(AuditLogJsonView, { value: entry.metadata, emptyLabel: t('analyticsPlatformAuditLogDetailSheet.noMetadata') }))] })] }))] }) }));
225593
+ }
225594
+
225595
+ /** Rows per request. Kept well under the backend's 1000 cap. */
225596
+ const PLATFORM_AUDIT_PAGE_SIZE = 25;
225597
+ /**
225598
+ * Above this many matching entries, deep paging stops being practical (the
225599
+ * endpoint only offers limit/offset). The UI uses this to nudge the user
225600
+ * toward narrowing by date instead of walking thousands of pages.
225601
+ */
225602
+ const PLATFORM_AUDIT_DEEP_PAGING_THRESHOLD = 1000;
225603
+ const TEXT_FILTER_DEBOUNCE_MS = 400;
225604
+ const EMPTY_FILTERS = {
225605
+ eventType: '',
225606
+ action: undefined,
225607
+ actorUsername: '',
225608
+ actorEmail: '',
225609
+ dateRange: undefined,
225610
+ };
225611
+ /**
225612
+ * `from_date`/`to_date` are whole-day bounds, so the local calendar day the
225613
+ * user picked is what we send — `toISOString()` would shift the date backwards
225614
+ * for anyone west of UTC.
225615
+ */
225616
+ const formatDateToYYYYMMDD = (date) => {
225617
+ if (!date)
225618
+ return undefined;
225619
+ const year = date.getFullYear();
225620
+ const month = String(date.getMonth() + 1).padStart(2, '0');
225621
+ const day = String(date.getDate()).padStart(2, '0');
225622
+ return `${year}-${month}-${day}`;
225623
+ };
225624
+ /**
225625
+ * Server-side paging + filtering over the platform-scoped audit trail.
225626
+ *
225627
+ * Every page change is a fresh request (`limit`/`offset`); nothing is sliced
225628
+ * client-side. Any filter change resets the offset to 0, so a user who filters
225629
+ * while on page 12 can't land past the end of the new result set.
225630
+ */
225631
+ const usePlatformAuditLog = ({ platformKey, limit = PLATFORM_AUDIT_PAGE_SIZE, skip = false, }) => {
225632
+ var _a, _b, _c, _d, _e;
225633
+ const [page, setPage] = useState(1);
225634
+ const [filters, setFilters] = useState(EMPTY_FILTERS);
225635
+ // Typing in the username/email boxes shouldn't fire a request per keystroke,
225636
+ // but the inputs still have to stay responsive — so the committed value the
225637
+ // query reads lags behind the value the inputs render.
225638
+ const [debouncedText, setDebouncedText] = useState({ actorUsername: '', actorEmail: '' });
225639
+ useEffect(() => {
225640
+ const timer = setTimeout(() => {
225641
+ setDebouncedText({
225642
+ actorUsername: filters.actorUsername.trim(),
225643
+ actorEmail: filters.actorEmail.trim(),
225644
+ });
225645
+ }, TEXT_FILTER_DEBOUNCE_MS);
225646
+ return () => clearTimeout(timer);
225647
+ }, [filters.actorUsername, filters.actorEmail]);
225648
+ const params = useMemo(() => {
225649
+ var _a, _b;
225650
+ return ({
225651
+ limit,
225652
+ offset: (page - 1) * limit,
225653
+ ...(filters.eventType ? { event_type: filters.eventType } : {}),
225654
+ ...(filters.action !== undefined ? { action: filters.action } : {}),
225655
+ ...(debouncedText.actorUsername ? { actor_username: debouncedText.actorUsername } : {}),
225656
+ ...(debouncedText.actorEmail ? { actor_email: debouncedText.actorEmail } : {}),
225657
+ ...(((_a = filters.dateRange) === null || _a === void 0 ? void 0 : _a.from)
225658
+ ? { from_date: formatDateToYYYYMMDD(filters.dateRange.from) }
225659
+ : {}),
225660
+ ...(((_b = filters.dateRange) === null || _b === void 0 ? void 0 : _b.to) ? { to_date: formatDateToYYYYMMDD(filters.dateRange.to) } : {}),
225661
+ });
225662
+ }, [
225663
+ limit,
225664
+ page,
225665
+ filters.eventType,
225666
+ filters.action,
225667
+ (_a = filters.dateRange) === null || _a === void 0 ? void 0 : _a.from,
225668
+ (_b = filters.dateRange) === null || _b === void 0 ? void 0 : _b.to,
225669
+ debouncedText.actorUsername,
225670
+ debouncedText.actorEmail,
225671
+ ]);
225672
+ const { data, isLoading, isFetching, error } = useGetPlatformAuditLogsQuery({ platformKey, params }, { skip: skip || !platformKey });
225673
+ // The debounced values settle one tick after the raw ones, so resetting the
225674
+ // page inside `setFilter` alone would leave a window where the in-flight
225675
+ // request still carries the old offset. Watching the committed text closes it.
225676
+ const isFirstDebounceRef = useRef(true);
225677
+ useEffect(() => {
225678
+ if (isFirstDebounceRef.current) {
225679
+ isFirstDebounceRef.current = false;
225680
+ return;
225681
+ }
225682
+ setPage(1);
225683
+ }, [debouncedText.actorUsername, debouncedText.actorEmail]);
225684
+ const setFilter = (key, value) => {
225685
+ setFilters((current) => ({ ...current, [key]: value }));
225686
+ setPage(1);
225687
+ };
225688
+ const clearFilters = () => {
225689
+ setFilters(EMPTY_FILTERS);
225690
+ setPage(1);
225691
+ };
225692
+ const totalCount = (_c = data === null || data === void 0 ? void 0 : data.count) !== null && _c !== void 0 ? _c : 0;
225693
+ const totalPages = data ? Math.ceil(totalCount / limit) : 0;
225694
+ const hasActiveFilters = Boolean(filters.eventType) ||
225695
+ filters.action !== undefined ||
225696
+ Boolean(filters.actorUsername) ||
225697
+ Boolean(filters.actorEmail) ||
225698
+ Boolean(((_d = filters.dateRange) === null || _d === void 0 ? void 0 : _d.from) || ((_e = filters.dateRange) === null || _e === void 0 ? void 0 : _e.to));
225699
+ const isForbidden = Boolean(error && 'status' in error && error.status === 403);
225700
+ return {
225701
+ data,
225702
+ isLoading,
225703
+ isFetching,
225704
+ error,
225705
+ isForbidden,
225706
+ page,
225707
+ setPage,
225708
+ limit,
225709
+ totalPages,
225710
+ totalCount,
225711
+ shouldSuggestNarrowing: totalCount > PLATFORM_AUDIT_DEEP_PAGING_THRESHOLD,
225712
+ filters,
225713
+ setFilter,
225714
+ clearFilters,
225715
+ hasActiveFilters,
225716
+ };
225717
+ };
225718
+
225719
+ const ALL_OPTION_VALUE = 'all';
225720
+ const ACTION_OPTION_VALUES = ['create', 'update', 'delete', 'access'];
225721
+ /** Reverse lookup so the select can show the code currently applied. */
225722
+ function actionValueForCode(code) {
225723
+ var _a;
225724
+ if (code === undefined)
225725
+ return ALL_OPTION_VALUE;
225726
+ return ((_a = ACTION_OPTION_VALUES.find((value) => PLATFORM_AUDIT_ACTION_CODES[value] === code)) !== null && _a !== void 0 ? _a : ALL_OPTION_VALUE);
225727
+ }
225728
+ const SKELETON_ROW_KEYS = ['a', 'b', 'c', 'd', 'e'];
225729
+ /** CRUD entries have no `event_type`; that's the branch the whole UI keys off. */
225730
+ function isCrudEntry(entry) {
225731
+ return entry.event_type === null;
225732
+ }
225733
+ function formatActor(entry, placeholder) {
225734
+ if (!entry.actor_username && !entry.actor_email)
225735
+ return null;
225736
+ return (jsxs("span", { className: "flex flex-col", children: [jsx("span", { className: "font-medium text-gray-700", children: entry.actor_username || placeholder }), entry.actor_email && jsx("span", { className: "text-xs text-gray-500", children: entry.actor_email })] }));
225737
+ }
225738
+ function AnalyticsPlatformAuditLog({ platformKey, timezone, }) {
225739
+ var _a, _b, _c;
225740
+ const t = useT();
225741
+ const [selectedEntry, setSelectedEntry] = useState(null);
225742
+ const timeZone = resolveAuditTimeZone(timezone);
225743
+ const timeZoneLabel = formatTimeZoneLabel(timeZone);
225744
+ const placeholder = t('analyticsAnalyticsPlatformAuditLog.notAvailable');
225745
+ const { eventTypeLabel, actionLabel } = usePlatformAuditLabels();
225746
+ const { data, isLoading, isFetching, error, isForbidden, page, setPage, totalPages, totalCount, shouldSuggestNarrowing, filters, setFilter, clearFilters, hasActiveFilters, } = usePlatformAuditLog({ platformKey });
225747
+ // A 403 means the account is signed in but lacks `Ibl.Core/AuditLogs/list` —
225748
+ // a permissions answer, not a failure, so it replaces the whole view rather
225749
+ // than showing an error next to unusable filters.
225750
+ if (isForbidden) {
225751
+ return (jsx(Card, { className: "rounded-lg border border-gray-100 bg-white shadow-sm", children: jsxs(CardContent, { className: "p-8 text-center", children: [jsx("p", { className: "font-medium text-gray-700", children: t('analyticsAnalyticsPlatformAuditLog.forbiddenTitle') }), jsx("p", { className: "mt-1 text-sm text-gray-500", children: t('analyticsAnalyticsPlatformAuditLog.forbiddenBody') })] }) }));
225752
+ }
225753
+ const results = (_a = data === null || data === void 0 ? void 0 : data.results) !== null && _a !== void 0 ? _a : [];
225754
+ const hasError = Boolean(error);
225755
+ return (jsxs("div", { className: "space-y-6", children: [jsxs("div", { className: "rounded-lg border border-[oklch(0.922_0_0)] bg-white p-4", children: [jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-5", children: [jsxs(Select$1, { value: filters.eventType || ALL_OPTION_VALUE, onValueChange: (value) => setFilter('eventType', value === ALL_OPTION_VALUE ? '' : value), children: [jsx(SelectTrigger, { className: "h-9 w-full bg-white font-normal", "aria-label": t('analyticsAnalyticsPlatformAuditLog.eventTypeLabel'), children: jsx(SelectValue, { placeholder: t('analyticsAnalyticsPlatformAuditLog.allEventTypes') }) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: ALL_OPTION_VALUE, children: t('analyticsAnalyticsPlatformAuditLog.allEventTypes') }), PLATFORM_AUDIT_EVENT_TYPES.map((eventType) => (jsx(SelectItem, { value: eventType, children: eventTypeLabel(eventType) }, eventType)))] })] }), jsxs(Select$1, { value: actionValueForCode(filters.action), onValueChange: (value) => setFilter('action', value === ALL_OPTION_VALUE
225756
+ ? undefined
225757
+ : PLATFORM_AUDIT_ACTION_CODES[value]), children: [jsx(SelectTrigger, { className: "h-9 w-full bg-white font-normal", "aria-label": t('analyticsAnalyticsPlatformAuditLog.actionLabel'), children: jsx(SelectValue, { placeholder: t('analyticsAnalyticsPlatformAuditLog.allActions') }) }), jsxs(SelectContent, { children: [jsx(SelectItem, { value: ALL_OPTION_VALUE, children: t('analyticsAnalyticsPlatformAuditLog.allActions') }), ACTION_OPTION_VALUES.map((value) => (jsx(SelectItem, { value: value, children: actionLabel(value) }, value)))] })] }), jsx(Input, { className: "h-9 bg-white", value: filters.actorUsername, onChange: (event) => setFilter('actorUsername', event.target.value), placeholder: t('analyticsAnalyticsPlatformAuditLog.actorUsernamePlaceholder'), "aria-label": t('analyticsAnalyticsPlatformAuditLog.actorUsernameLabel') }), jsx(Input, { className: "h-9 bg-white", type: "email", value: filters.actorEmail, onChange: (event) => setFilter('actorEmail', event.target.value), placeholder: t('analyticsAnalyticsPlatformAuditLog.actorEmailPlaceholder'), "aria-label": t('analyticsAnalyticsPlatformAuditLog.actorEmailLabel') }), jsxs(Popover, { modal: true, children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", className: "h-9 w-full justify-start gap-2 bg-white font-normal whitespace-nowrap", children: [jsx(Calendar$1, { className: "h-4 w-4" }), ((_b = filters.dateRange) === null || _b === void 0 ? void 0 : _b.from) && ((_c = filters.dateRange) === null || _c === void 0 ? void 0 : _c.to)
225758
+ ? `${format$1(filters.dateRange.from, 'MMM dd')} - ${format$1(filters.dateRange.to, 'MMM dd')}`
225759
+ : t('analyticsAnalyticsPlatformAuditLog.pickDateRange')] }) }), jsx(PopoverContent, { "data-iblai-dialog-interaction-layer": true, className: "z-[60] w-auto p-0", align: "start", children: jsx(Calendar, { mode: "range", selected: filters.dateRange, onSelect: (range) => setFilter('dateRange', range ? { from: range.from, to: range.to } : undefined), numberOfMonths: 2 }) })] })] }), hasActiveFilters && (jsx("div", { className: "mt-3 flex justify-end", children: jsxs(Button$1, { variant: "ghost", size: "sm", onClick: clearFilters, className: "h-8 text-gray-600", children: [jsx(X$1, { className: "mr-1 h-3.5 w-3.5" }), t('analyticsAnalyticsPlatformAuditLog.clearFilters')] }) }))] }), shouldSuggestNarrowing && !hasError && (jsxs("div", { className: "flex items-start gap-2 rounded-lg border border-blue-100 bg-blue-50 p-3 text-sm text-blue-900", children: [jsx(Info$3, { className: "mt-0.5 h-4 w-4 shrink-0", "aria-hidden": "true" }), jsx("p", { children: t('analyticsAnalyticsPlatformAuditLog.narrowSuggestion', { count: totalCount }) })] })), jsx("div", { className: "overflow-hidden rounded-md border border-[oklch(0.922_0_0)] bg-white", children: jsx("div", { className: "overflow-x-auto", children: jsx("div", { className: "inline-block min-w-full align-middle", children: isLoading ? (jsx("div", { className: "space-y-3 p-4", "data-testid": "platform-audit-skeleton", children: SKELETON_ROW_KEYS.map((key) => (jsx(Skeleton, { className: "h-10 w-full" }, key))) })) : hasError ? (jsx("div", { className: "py-8 text-center text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.loadError') })) : results.length === 0 ? (jsx("div", { className: "h-[120px]", children: jsx(EmptyStats, { title: hasActiveFilters
225760
+ ? t('analyticsAnalyticsPlatformAuditLog.noFilteredEntries')
225761
+ : t('analyticsAnalyticsPlatformAuditLog.noEntries') }) })) : (jsxs(Table, { className: "min-w-full", children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "bg-muted/50 border-b border-[oklch(0.922_0_0)]", children: [jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colTimestamp', {
225762
+ timezone: timeZoneLabel,
225763
+ }) }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colEvent') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colActor') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colResource') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsPlatformAuditLog.colIpAddress') }), jsx(TableHead, { className: "p-3 text-right text-sm whitespace-nowrap text-[#646464]", children: jsx("span", { className: "sr-only", children: t('analyticsAnalyticsPlatformAuditLog.colDetails') }) })] }) }), jsx(TableBody, { children: results.map((entry) => {
225764
+ const crud = isCrudEntry(entry);
225765
+ const actor = formatActor(entry, placeholder);
225766
+ return (jsxs(TableRow, { className: "border-b border-[oklch(0.922_0_0)] last:border-0", children: [jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: formatAuditTimestamp(entry.timestamp, timeZone) }), jsx(TableCell, { className: "p-3 text-[#646464]", children: jsxs("span", { className: "flex flex-col", children: [jsx("span", { className: "font-medium text-gray-700", children: crud
225767
+ ? actionLabel(entry.action)
225768
+ : eventTypeLabel(String(entry.event_type)) }), jsx("span", { className: "text-xs text-gray-500", children: crud
225769
+ ? t('analyticsAnalyticsPlatformAuditLog.kindModelChange')
225770
+ : t('analyticsAnalyticsPlatformAuditLog.kindEvent') })] }) }), jsx(TableCell, { className: "p-3 text-[#646464]", children: actor !== null && actor !== void 0 ? actor : placeholder }), jsx(TableCell, { className: "min-w-[200px] p-3 text-[#646464]", children: entry.resource_repr || entry.resource_type ? (jsxs("span", { className: "flex flex-col", children: [jsx("span", { children: entry.resource_repr || placeholder }), entry.resource_type && (jsx("span", { className: "text-xs text-gray-500", children: humanizeAuditToken(entry.resource_type) }))] })) : (placeholder) }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: entry.remote_addr || placeholder }), jsx(TableCell, { className: "p-3 text-right whitespace-nowrap", children: jsx(Button$1, { variant: "ghost", size: "sm", className: "h-8 text-blue-600", onClick: () => setSelectedEntry(entry), children: t('analyticsAnalyticsPlatformAuditLog.viewDetails') }) })] }, entry.id));
225771
+ }) })] })) }) }) }), !hasError && results.length > 0 && (jsx("p", { className: "text-xs text-gray-500", children: t('analyticsAnalyticsPlatformAuditLog.resultSummary', {
225772
+ shown: results.length,
225773
+ total: totalCount,
225774
+ }) })), jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isFetching }), jsx(PlatformAuditLogDetailSheet, { entry: selectedEntry, open: selectedEntry !== null, onOpenChange: (open) => {
225775
+ if (!open)
225776
+ setSelectedEntry(null);
225777
+ }, timeZone: timeZone })] }));
225778
+ }
225779
+
224987
225780
  const ACTION_LABELS = {
224988
225781
  create: 'Created',
224989
225782
  update: 'Updated',
@@ -225131,7 +225924,8 @@ function summarizeChanges(entry) {
225131
225924
  }
225132
225925
  return `${action} ${target}`;
225133
225926
  }
225134
- function AnalyticsAuditLogStats({ tenantKey, mentorId, userId, selectedMentorId, }) {
225927
+ /** The per-agent change log — the original audit view, unchanged. */
225928
+ function AgentAuditLogView({ tenantKey, mentorId, userId, selectedMentorId, }) {
225135
225929
  var _a;
225136
225930
  const t = useT();
225137
225931
  const currentMentorId = selectedMentorId || mentorId;
@@ -225171,6 +225965,22 @@ function AnalyticsAuditLogStats({ tenantKey, mentorId, userId, selectedMentorId,
225171
225965
  setPage(1);
225172
225966
  }, children: [jsx(SelectTrigger, { className: "w-full font-normal bg-white h-9", children: jsx(SelectValue, { placeholder: t('analyticsAnalyticsAuditLogStats.allActions') }) }), jsx(SelectContent, { children: ACTION_FILTER_OPTIONS.map((opt) => (jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value))) })] }) })] }) }), jsx("div", { className: "overflow-hidden rounded-md border border-[oklch(0.922_0_0)] bg-white", children: jsx("div", { className: "overflow-x-auto", children: jsx("div", { className: "inline-block min-w-full align-middle", children: isLoading ? (jsx("div", { className: "flex items-center justify-center w-full py-10", children: jsx("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-blue-600 border-t-transparent" }) })) : error && !is403 ? (jsx("div", { className: "py-8 text-center text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.loadError') })) : !((_a = data === null || data === void 0 ? void 0 : data.results) === null || _a === void 0 ? void 0 : _a.length) ? (jsx("div", { className: "h-[120px]", children: jsx(EmptyStats, { title: t('analyticsAnalyticsAuditLogStats.noEntries') }) })) : (jsxs(Table, { className: "min-w-full", children: [jsx(TableHeader, { children: jsxs(TableRow, { className: "bg-muted/50 border-b border-[oklch(0.922_0_0)]", children: [jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.colUser') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.colAction') }), jsx(TableHead, { className: "p-3 text-left text-sm whitespace-nowrap text-[#646464]", children: t('analyticsAnalyticsAuditLogStats.colTime') })] }) }), jsx(TableBody, { children: data.results.map((entry) => (jsxs(TableRow, { className: "border-b border-[oklch(0.922_0_0)] last:border-0", children: [jsx(TableCell, { className: "p-3 font-medium whitespace-nowrap text-[#646464]", children: entry.actor_email }), jsx(TableCell, { className: "min-w-[250px] p-3 text-[#646464]", children: summarizeChanges(entry) }), jsx(TableCell, { className: "p-3 whitespace-nowrap text-[#646464]", children: formatDistanceToNow(new Date(entry.timestamp), { addSuffix: true }) })] }, entry.id))) })] })) }) }) }), jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isLoading })] }));
225173
225967
  }
225968
+ function AnalyticsAuditLogStats({ tenantKey, mentorId, userId, selectedMentorId, defaultScope = 'agent', timezone, canViewPlatformAudit, }) {
225969
+ const t = useT();
225970
+ const { currentTenant } = useCurrentTenant();
225971
+ const rbacPermissions = useSelector(selectRbacPermissions);
225972
+ // Mirrors how the backend gates the endpoint (RBAC action, or platform admin
225973
+ // on non-RBAC deployments). Hiding the toggle is UX/defense-in-depth only —
225974
+ // the API answers 403 on its own regardless of what renders here.
225975
+ const canSeePlatformScope = canViewPlatformAudit !== null && canViewPlatformAudit !== void 0 ? canViewPlatformAudit : canViewPlatformAuditLogs(rbacPermissions, currentTenant);
225976
+ const [scope, setScope] = useState(defaultScope === 'platform' && !canSeePlatformScope ? 'agent' : defaultScope);
225977
+ // A user who loses the permission mid-session (tenant switch, role change)
225978
+ // must not be left staring at a trail they can no longer read.
225979
+ const activeScope = scope === 'platform' && !canSeePlatformScope ? 'agent' : scope;
225980
+ return (jsxs("div", { className: "space-y-4", children: [canSeePlatformScope && (jsxs("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between", children: [jsx(Tabs, { value: activeScope, className: "w-full sm:w-auto", children: jsxs(TabsList, { className: "h-auto gap-2 sm:grid sm:h-[35px] sm:w-fit sm:grid-cols-2 sm:gap-0", children: [jsx(TabsTrigger, { value: "agent", className: activeScope === 'agent' ? 'w-full' : undefined, onClick: () => setScope('agent'), children: t('analyticsAnalyticsAuditLogStats.scopeAgent') }), jsx(TabsTrigger, { value: "platform", className: activeScope === 'platform' ? 'w-full' : undefined, onClick: () => setScope('platform'), children: t('analyticsAnalyticsAuditLogStats.scopePlatform') })] }) }), jsx("p", { className: "hidden text-xs text-gray-500 sm:block", children: activeScope === 'agent'
225981
+ ? t('analyticsAnalyticsAuditLogStats.scopeAgentHint')
225982
+ : t('analyticsAnalyticsAuditLogStats.scopePlatformHint') })] })), activeScope === 'platform' ? (jsx(AnalyticsPlatformAuditLog, { platformKey: tenantKey, timezone: timezone })) : (jsx(AgentAuditLogView, { tenantKey: tenantKey, mentorId: mentorId, userId: userId, selectedMentorId: selectedMentorId }))] }));
225983
+ }
225174
225984
 
225175
225985
  /**
225176
225986
  * Core agent search hook — thin wrapper around `useGetAiSearchMentorsQuery`.
@@ -228289,30 +229099,6 @@ const CourseOutline = () => {
228289
229099
  : 'text-gray-600 hover:bg-gray-50'}`, children: [jsx("div", { className: "mr-2 flex-shrink-0", children: jsx(CompletionIcon, { node: sublesson }) }), jsx("span", { children: sublesson.display_name })] }, sublesson.id))) }))] }, lesson.id))) }))] }, module.id)))) }));
228290
229100
  };
228291
229101
 
228292
- function Sheet({ ...props }) {
228293
- return jsx(DialogPrimitive.Root, { "data-slot": "sheet", ...props });
228294
- }
228295
- function SheetPortal({ ...props }) {
228296
- return jsx(DialogPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
228297
- }
228298
- function SheetOverlay({ className, ...props }) {
228299
- return (jsx(DialogPrimitive.Overlay, { "data-slot": "sheet-overlay", className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50', className), ...props }));
228300
- }
228301
- function SheetContent({ className, children, side = 'right', ...props }) {
228302
- const t = useT();
228303
- return (jsxs(SheetPortal, { children: [jsx(SheetOverlay, {}), jsxs(DialogPrimitive.Content, { "data-slot": "sheet-content", className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500', side === 'right' &&
228304
- 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm', side === 'left' &&
228305
- 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm', side === 'top' &&
228306
- 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b', side === 'bottom' &&
228307
- 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t', className), ...props, children: [children, jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [jsx(X$1, { className: "size-4" }), jsx("span", { className: "sr-only", children: t('uiSheet.close') })] })] })] }));
228308
- }
228309
- function SheetHeader({ className, ...props }) {
228310
- return (jsx("div", { "data-slot": "sheet-header", className: cn('flex flex-col gap-1.5 p-4', className), ...props }));
228311
- }
228312
- function SheetTitle({ className, ...props }) {
228313
- return (jsx(DialogPrimitive.Title, { "data-slot": "sheet-title", className: cn('text-foreground font-semibold', className), ...props }));
228314
- }
228315
-
228316
229102
  /**
228317
229103
  * Mobile drawer wrapping `<CourseOutline />` in a `Sheet` for responsive
228318
229104
  * course navigation. Ported from skillsai's `course-outline-drawer.tsx`.
@@ -236517,5 +237303,5 @@ var trainOrDeleteModal = /*#__PURE__*/Object.freeze({
236517
237303
  TrainOrDeleteModal: TrainOrDeleteModal
236518
237304
  });
236519
237305
 
236520
- export { ACCESS_COURSE_LABEL, ALL_CATEGORIES, AccessTimeHeatmap, AccessiblePaginate, AddMentorToProjectModal, AddSkillDialog, Admin, AdvancedTab, AgentConfigPrompts, AgentSkills, AlertsTab, AnalyticsAuditLogStats, AnalyticsCourseDetail, AnalyticsCourses, AnalyticsFinancialStats, AnalyticsLayout, AnalyticsMemoryStats, AnalyticsMonetizationStats, AnalyticsOverview, AnalyticsProgramDetail, AnalyticsPrograms, AnalyticsReportDownload, AnalyticsReports, AnalyticsSettingsProvider, AnalyticsTopicsStats, AnalyticsTranscriptsStats, AnalyticsUsersStats, AppleRestrictionModal, ApplyWizard, BUY_NOW_LABEL, BillingTab, CATALOGS, CREATE_AGENT_LABELS, CUA_DRIVER_REPO_URL, CUA_DRIVER_TAURI_COMMANDS, CUA_DRIVER_TAURI_EVENTS, CardInfoIcon, CategorizedDropdownMenu, ChartCardWrapper, ChartFiltersProvider, ChartLoading, ChatContext, ChatPrivacyToggle, ChatProvider, CompanyDialog, ConnectorManagementDialog, CopyButtonIcon, CourseAccessGuard, CourseCardSkeleton, CourseContentLoading, CourseOutline, CourseOutlineContext, CourseOutlineDrawer, CreateAgentForm, CreateAgentModal, CreateProjectModal, CreateWorkflowModal, CredentialBox, CredentialMiniBoxSkeleton, CredentialsList, CreditBalance, CustomDateRangePicker, CustomTooltip, DEFAULT_COWORK_REQUIRED_SIZE_GB, DEFAULT_LOCALE, DefaultEmptyBox, DeleteProjectModal, DeleteWorkflowModal, DiscoverContentCard, DiscoverFacetsFilter, DiscoverFilterDrawer, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENROLL_NOW_COURSE_STARTING_SOON_LABEL, ENROLL_NOW_LABEL, EditAlertDialog, EducationBox, EducationDialog, EducationTab, EdxIframeContext, EmptyStats, ExperienceBox, ExperienceDialog, ExperienceTab, FacetFilterContext, Footer, GradebookTab, GroupsFilterDropdown, INVITATION_ONLY_LABEL, InstitutionDialog, IntegrationsTab, InviteUserContent, InviteUserDialog, InvitedUsersDialog, LOCAL_MODELS, Loader, LocalLLMTab, LocalModelsContent, LoginButton, MACOS_PERMISSIONS_COMMANDS, MEMORY_PAGE_SIZE, Markdown, MinimumMentorAlert, MonetizationTab, NotificationDisplay, NotificationDropdown, ONBOARDING_SECTORS, OnboardingShell, OnboardingWizard, PaywallModal, PlacementExam, PlacementExamsDropdown, PlatformNavbar, PlatformNavbarSearch, Profile, ProfileTimeChart, ProgressDots, ProjectActionButtons, ProjectFilesModal, ProjectInstructionsModal, ProjectLandingPage, ProjectMentorsList, ProjectsPage, REQUEST_ACCESS_COURSE_STARTING_SOON_LABEL, REQUEST_ACCESS_LABEL, RenameProjectModal, ResumeBox, ResumeTab, RichTextEditor, SUPPORTED_LOCALES, SandboxConfig, SearchableMultiSelect, SendNotificationDialog, SignupButton, SkeletonActivityStatBox, SkeletonAddSkillsLoading, SkeletonCreatePathwaySearchList, SkeletonDiscoverFilterBox, SkeletonEducationBox, SkeletonMultiplier, SkeletonPathwayBox, SkeletonProfileInfoCard, SkeletonSkillBox, SkillBox, SkillDetailModal, SkillLeaderboardChart, SkillsBox, SkillsList, SlashSkillPicker, Spinner, StatCard, StepHeader, TAURI_COMMANDS, TAURI_EVENTS, TenantSwitcher, TimeFilter, TimeTrackingProvider, TimedExam, ToolDialogs, TopBanner, UpgradePackageModal, UserAvatar, Version, WebContainersI18nProvider, WorkflowSidebar, addBookmarksTab, availablePlacementExams, findLastResumeBlock, findSequentialParent, flattenVerticalBlocks, getCatalog, getFirstAvailableUnit, getLocalLLMModel, getLocalLLMToolSupport, getNextUnitIframe, getOrg, getParentBlockById, getParentsInfosFromSublessonId, getPreviousUnitIframe, getRandomCourseImage, getSectorById, getTenant, getUnitToIframe, getUserId, getUserName, inBrowserPrint, inIframe, initialCuaDriverInstallState, initialModelDownloadState, isCoworkEnabled, isLocalLLMEnabled, isPlatformNavbarCreditBalanceVisible, isSlashCommandToken, isTauriApp, isValidLocale, components as markdownComponents, modelSupportsCowork, onboardingPrimaryButtonClass, onboardingSecondaryButtonClass, resolveCreateAgentLabels, sanitizeCss, setCoworkEnabled, setLocalLLMEnabled, setLocalLLMModel, setLocalLLMToolSupport, smallestCoworkModel, useAnalyticsSettings, useAuditLog, useCatalogSearch, useChartFilters, useChatPrivacy, useChatState, useCourseDetail, useCourseMetadata, useCourses, useCuaDriver, useDiscover, useEdxIframe, useFinancial, useIframeMessageHandler, useLocalStorage, useMemory, useModelDownload, useMonetization, useOverview, useProfileActivityStats, useProfileCredentials, useProfilePathways, useProfilePrograms, useProfileSkills, useProfileTimeSpent, usePrograms, useReports, useSlashSkillPicker, useSlashSkills, useT, useTauri, useTimeTracking, useTopics, useTranscripts, useUserCourses, useUserMetadata, useUsers, useWebContainersI18n, useWebContainersLocale };
237306
+ export { ACCESS_COURSE_LABEL, ALL_CATEGORIES, AccessTimeHeatmap, AccessiblePaginate, AddMentorToProjectModal, AddSkillDialog, Admin, AdvancedTab, AgentConfigPrompts, AgentSkills, AlertsTab, AnalyticsAuditLogStats, AnalyticsCourseDetail, AnalyticsCourses, AnalyticsFinancialStats, AnalyticsLayout, AnalyticsMemoryStats, AnalyticsMonetizationStats, AnalyticsOverview, AnalyticsPlatformAuditLog, AnalyticsProgramDetail, AnalyticsPrograms, AnalyticsReportDownload, AnalyticsReports, AnalyticsSettingsProvider, AnalyticsTopicsStats, AnalyticsTranscriptsStats, AnalyticsUsersStats, AppleRestrictionModal, ApplyWizard, AuditLogChangesView, AuditLogJsonView, BUY_NOW_LABEL, BillingTab, CATALOGS, CREATE_AGENT_LABELS, CUA_DRIVER_REPO_URL, CUA_DRIVER_TAURI_COMMANDS, CUA_DRIVER_TAURI_EVENTS, CardInfoIcon, CategorizedDropdownMenu, ChartCardWrapper, ChartFiltersProvider, ChartLoading, ChatContext, ChatPrivacyToggle, ChatProvider, CompanyDialog, ConnectorManagementDialog, CopyButtonIcon, CourseAccessGuard, CourseCardSkeleton, CourseContentLoading, CourseOutline, CourseOutlineContext, CourseOutlineDrawer, CreateAgentForm, CreateAgentModal, CreateProjectModal, CreateWorkflowModal, CredentialBox, CredentialMiniBoxSkeleton, CredentialsList, CreditBalance, CustomDateRangePicker, CustomTooltip, DEFAULT_COWORK_REQUIRED_SIZE_GB, DEFAULT_LOCALE, DefaultEmptyBox, DeleteProjectModal, DeleteWorkflowModal, DiscoverContentCard, DiscoverFacetsFilter, DiscoverFilterDrawer, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ENROLL_NOW_COURSE_STARTING_SOON_LABEL, ENROLL_NOW_LABEL, EditAlertDialog, EducationBox, EducationDialog, EducationTab, EdxIframeContext, EmptyStats, ExperienceBox, ExperienceDialog, ExperienceTab, FacetFilterContext, Footer, GradebookTab, GroupsFilterDropdown, INVITATION_ONLY_LABEL, InstitutionDialog, IntegrationsTab, InviteUserContent, InviteUserDialog, InvitedUsersDialog, LOCAL_MODELS, Loader, LocalLLMTab, LocalModelsContent, LoginButton, MACOS_PERMISSIONS_COMMANDS, MEMORY_PAGE_SIZE, Markdown, MinimumMentorAlert, MonetizationTab, NotificationDisplay, NotificationDropdown, ONBOARDING_SECTORS, OnboardingShell, OnboardingWizard, PLATFORM_AUDIT_DEEP_PAGING_THRESHOLD, PLATFORM_AUDIT_PAGE_SIZE, PaywallModal, PlacementExam, PlacementExamsDropdown, PlatformAuditLogDetailSheet, PlatformNavbar, PlatformNavbarSearch, Profile, ProfileTimeChart, ProgressDots, ProjectActionButtons, ProjectFilesModal, ProjectInstructionsModal, ProjectLandingPage, ProjectMentorsList, ProjectsPage, REQUEST_ACCESS_COURSE_STARTING_SOON_LABEL, REQUEST_ACCESS_LABEL, RenameProjectModal, ResumeBox, ResumeTab, RichTextEditor, SUPPORTED_LOCALES, SandboxConfig, SearchableMultiSelect, SendNotificationDialog, SignupButton, SkeletonActivityStatBox, SkeletonAddSkillsLoading, SkeletonCreatePathwaySearchList, SkeletonDiscoverFilterBox, SkeletonEducationBox, SkeletonMultiplier, SkeletonPathwayBox, SkeletonProfileInfoCard, SkeletonSkillBox, SkillBox, SkillDetailModal, SkillLeaderboardChart, SkillsBox, SkillsList, SlashSkillPicker, Spinner, StatCard, StepHeader, TAURI_COMMANDS, TAURI_EVENTS, TenantSwitcher, TimeFilter, TimeTrackingProvider, TimedExam, ToolDialogs, TopBanner, UpgradePackageModal, UserAvatar, Version, WebContainersI18nProvider, WorkflowSidebar, addBookmarksTab, availablePlacementExams, findLastResumeBlock, findSequentialParent, flattenVerticalBlocks, formatAuditTimestamp, formatTimeZoneLabel, getCatalog, getFirstAvailableUnit, getLocalLLMModel, getLocalLLMToolSupport, getNextUnitIframe, getOrg, getParentBlockById, getParentsInfosFromSublessonId, getPreviousUnitIframe, getRandomCourseImage, getSectorById, getTenant, getUnitToIframe, getUserId, getUserName, humanizeAuditToken, inBrowserPrint, inIframe, initialCuaDriverInstallState, initialModelDownloadState, isCoworkEnabled, isLocalLLMEnabled, isPlatformNavbarCreditBalanceVisible, isSlashCommandToken, isTauriApp, isValidLocale, isValidTimeZone, components as markdownComponents, modelSupportsCowork, onboardingPrimaryButtonClass, onboardingSecondaryButtonClass, resolveAuditTimeZone, resolveCreateAgentLabels, sanitizeCss, setCoworkEnabled, setLocalLLMEnabled, setLocalLLMModel, setLocalLLMToolSupport, smallestCoworkModel, useAnalyticsSettings, useAuditLog, useCatalogSearch, useChartFilters, useChatPrivacy, useChatState, useCourseDetail, useCourseMetadata, useCourses, useCuaDriver, useDiscover, useEdxIframe, useFinancial, useIframeMessageHandler, useLocalStorage, useMemory, useModelDownload, useMonetization, useOverview, usePlatformAuditLabels, usePlatformAuditLog, useProfileActivityStats, useProfileCredentials, useProfilePathways, useProfilePrograms, useProfileSkills, useProfileTimeSpent, usePrograms, useReports, useSlashSkillPicker, useSlashSkills, useT, useTauri, useTimeTracking, useTopics, useTranscripts, useUserCourses, useUserMetadata, useUsers, useWebContainersI18n, useWebContainersLocale };
236521
237307
  //# sourceMappingURL=index.esm.js.map