@iblai/iblai-js 1.20.1 → 1.20.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,11 +3,11 @@ import React__default, { useRef, useEffect, useState, useCallback, useLayoutEffe
3
3
  import { useDispatch, useSelector } from 'react-redux';
4
4
  import { selectSessionId, selectActiveChatMessages, useCachedSessionId, chatActions, LOCAL_STORAGE_KEYS, TimeTracker, getInitials, useTenantMetadata, WithPermissions, useStripeUpgrade, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, getTimeAgo, REQUIRED_ACTIONS_FOR_GROUPS, formatRelativeTime as formatRelativeTime$2, ANONYMOUS_USERNAME, combineCSVData, redirectToAuthSpaJoinTenant, redirectToAuthSpa, getAuthSpaJoinUrl, useOS, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, TOOLS, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, selectRbacPermissions, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, removeFile, chatInputSliceActions, WithFormPermissions, MENTOR_VISIBILITY } from '@iblai/web-utils';
5
5
  import { useGetTenantChatPrivacyConfigQuery, useGetChatPrivacyEffectiveQuery, useCreateSessionIdMutation, useUpdateSessionDisableChathistoryMutation, chatPrivacyApiSlice, 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, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useDeleteGlobalMemoryMutation, ChatPrivacyModeEnum, useGetUserChatPrivacySettingsQuery, useUpdateUserChatPrivacySettingsMutation, CHAT_PRIVACY_MODES, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useDeleteApiKeyMutation, useGetApiKeysQuery, 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, useUpdateTenantChatPrivacyConfigMutation, useGetCustomMentorsQuery, 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, useGetReportsQuery, useCreateReportMutation, useGetMentorPublicSettingsQuery, useGetContentAnalyticsQuery, useGetContentAnalyticsDetailsQuery, useGetRevenueQuery, useListSubscribersQuery, useGetAuditLogsQuery, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetUserEnrolledCoursesQuery, useLazyGetUserAssignedCoursesQuery, useLazyGetUserCredentialsQuery, useLazyGetOverTimeActivityQuery, useLazyGetCatalogSearchQuery, useGetUserEarnedSkillsQuery, useGetUserReportedSkillsQuery, useGetUserDesiredSkillsQuery, 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, useGetAgentSkillsQuery, useGetMentorSkillAssignmentsQuery, useCreateMentorSkillAssignmentMutation, useUpdateMentorSkillAssignmentMutation, useDeleteMentorSkillAssignmentMutation, useCreateAgentSkillMutation, useUpdateAgentSkillMutation, useDeleteAgentSkillMutation, useCreateCheckoutMutation, useGetUserProjectsQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useGetPublicMentorsQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useGetMentorCategoriesQuery, useCreateMentorMutation, useUpdateUserPlatformMetadataMutation, useGetPromptCategoriesQuery, useCreatePromptMutation, useDeletePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation } from '@iblai/data-layer';
6
- import { toast, Toaster as Toaster$1 } from 'sonner';
6
+ import { toast } from 'sonner';
7
7
  import { jsx, Fragment as Fragment$1, jsxs } from 'react/jsx-runtime';
8
8
  import * as ReactDOM from 'react-dom';
9
9
  import ReactDOM__default from 'react-dom';
10
- import { z as z$1 } from 'zod';
10
+ import { z } from 'zod';
11
11
  import * as DialogPrimitive from '@radix-ui/react-dialog';
12
12
  import { createDialogScope } from '@radix-ui/react-dialog';
13
13
  import { NotificationSourceTypeEnum, StateEnum, MentorVisibilityEnum, PromptVisibilityEnum } from '@iblai/iblai-api';
@@ -60048,8 +60048,8 @@ function useForm(opts) {
60048
60048
  const FACEBOOK_URL_PREFIX = 'https://facebook.com/';
60049
60049
  const X_URL_PREFIX = 'https://x.com/';
60050
60050
  const LINKEDIN_URL_PREFIX = 'https://linkedin.com/in/';
60051
- const socialFormSchema = z$1.object({
60052
- facebook: z$1.string().refine((val) => {
60051
+ const socialFormSchema = z.object({
60052
+ facebook: z.string().refine((val) => {
60053
60053
  if (!val || val === '')
60054
60054
  return true;
60055
60055
  // Extract username from full URL and validate
@@ -60058,7 +60058,7 @@ const socialFormSchema = z$1.object({
60058
60058
  }, {
60059
60059
  message: 'Username can only contain letters, numbers, hyphens, and periods',
60060
60060
  }),
60061
- linkedIn: z$1.string().refine((val) => {
60061
+ linkedIn: z.string().refine((val) => {
60062
60062
  if (!val || val === '')
60063
60063
  return true;
60064
60064
  // Extract username from full URL and validate
@@ -60067,7 +60067,7 @@ const socialFormSchema = z$1.object({
60067
60067
  }, {
60068
60068
  message: 'Username must be at least 5 characters long and can only contain letters, numbers, and periods.',
60069
60069
  }),
60070
- x: z$1.string().refine((val) => {
60070
+ x: z.string().refine((val) => {
60071
60071
  if (!val || val === '')
60072
60072
  return true;
60073
60073
  // Extract username from full URL and validate
@@ -60294,20 +60294,6 @@ const useProfile = (username) => {
60294
60294
  };
60295
60295
  };
60296
60296
 
60297
- var M=(e,i,s,u,m,a,l,h)=>{let d=document.documentElement,w=["light","dark"];function p(n){(Array.isArray(e)?e:[e]).forEach(y=>{let k=y==="class",S=k&&a?m.map(f=>a[f]||f):m;k?(d.classList.remove(...S),d.classList.add(a&&a[n]?a[n]:n)):d.setAttribute(y,n);}),R(n);}function R(n){h&&w.includes(n)&&(d.style.colorScheme=n);}function c(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(u)p(u);else try{let n=localStorage.getItem(i)||s,y=l&&n==="system"?c():n;p(y);}catch(n){}};var x$1=React.createContext(void 0),U$1={setTheme:e=>{},themes:[]},z=()=>{var e;return (e=React.useContext(x$1))!=null?e:U$1};React.memo(({forcedTheme:e,storageKey:i,attribute:s,enableSystem:u,enableColorScheme:m,defaultTheme:a,value:l,themes:h,nonce:d,scriptProps:w})=>{let p=JSON.stringify([s,i,a,e,h,l,u,m]).slice(1,-1);return React.createElement("script",{...w,suppressHydrationWarning:true,nonce:typeof window=="undefined"?d:"",dangerouslySetInnerHTML:{__html:`(${M.toString()})(${p})`}})});
60298
-
60299
- const Toaster = ({ ...props }) => {
60300
- const { theme = "system" } = z();
60301
- return (jsx(Toaster$1, { theme: theme, className: "toaster group", toastOptions: {
60302
- classNames: {
60303
- toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
60304
- description: "group-[.toast]:text-muted-foreground",
60305
- actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
60306
- cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
60307
- },
60308
- }, ...props }));
60309
- };
60310
-
60311
60297
  const Dialog = DialogPrimitive.Root;
60312
60298
  const DialogTrigger = DialogPrimitive.Trigger;
60313
60299
  const DialogPortal = DialogPrimitive.Portal;
@@ -60376,7 +60362,7 @@ const Security = ({ email, onAccountDeleted, }) => {
60376
60362
  setDeleting(false);
60377
60363
  }
60378
60364
  };
60379
- return (jsxs(Fragment$1, { children: [jsxs("div", { className: "border border-gray-200 rounded-lg p-6", children: [jsxs("div", { className: "max-w-md mx-auto text-center py-12", children: [jsx("div", { className: "text-gray-400 dark:text-gray-500 mb-6", children: jsx(Shield, { className: "h-20 w-20 mx-auto" }) }), jsx("h4", { className: "text-xl font-semibold text-gray-900 dark:text-gray-100 mb-4", children: "Security Settings" }), jsx("p", { className: "text-gray-600 dark:text-gray-400 mb-8", children: "Click to reset your password." }), jsx(Button$1, { className: "w-full bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", onClick: handleResetPasswordLink, disabled: processing, children: processing ? 'Sending Password Reset Link...' : 'Send Password Reset Link' })] }), jsx("div", { className: "flex justify-end", children: jsx("button", { type: "button", className: "text-sm text-gray-400 hover:text-[#2563EB] hover:underline transition-colors", onClick: () => setIsConfirmOpen(true), children: "Delete account" }) })] }), jsx(Dialog, { open: isConfirmOpen, onOpenChange: setIsConfirmOpen, children: jsxs(DialogContent, { children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: "Are you sure?" }), jsx(DialogDescription, { children: "This will permanently delete your account and all associated data. This action cannot be undone. You will be logged out upon successful deletion." })] }), jsxs(DialogFooter, { children: [jsx(Button$1, { variant: "outline", onClick: () => setIsConfirmOpen(false), disabled: deleting, children: "Cancel" }), jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", onClick: handleDeleteAccount, disabled: deleting, children: deleting ? 'Deleting...' : 'Yes, Delete My Account' })] })] }) }), jsx(Toaster, {})] }));
60365
+ return (jsxs(Fragment$1, { children: [jsxs("div", { className: "border border-gray-200 rounded-lg p-6", children: [jsxs("div", { className: "max-w-md mx-auto text-center py-12", children: [jsx("div", { className: "text-gray-400 dark:text-gray-500 mb-6", children: jsx(Shield, { className: "h-20 w-20 mx-auto" }) }), jsx("h4", { className: "text-xl font-semibold text-gray-900 dark:text-gray-100 mb-4", children: "Security Settings" }), jsx("p", { className: "text-gray-600 dark:text-gray-400 mb-8", children: "Click to reset your password." }), jsx(Button$1, { className: "w-full bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", onClick: handleResetPasswordLink, disabled: processing, children: processing ? 'Sending Password Reset Link...' : 'Send Password Reset Link' })] }), jsx("div", { className: "flex justify-end", children: jsx("button", { type: "button", className: "text-sm text-gray-400 hover:text-[#2563EB] hover:underline transition-colors", onClick: () => setIsConfirmOpen(true), children: "Delete account" }) })] }), jsx(Dialog, { open: isConfirmOpen, onOpenChange: setIsConfirmOpen, children: jsxs(DialogContent, { children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: "Are you sure?" }), jsx(DialogDescription, { children: "This will permanently delete your account and all associated data. This action cannot be undone. You will be logged out upon successful deletion." })] }), jsxs(DialogFooter, { children: [jsx(Button$1, { variant: "outline", onClick: () => setIsConfirmOpen(false), disabled: deleting, children: "Cancel" }), jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", onClick: handleDeleteAccount, disabled: deleting, children: deleting ? 'Deleting...' : 'Yes, Delete My Account' })] })] }) })] }));
60380
60366
  };
60381
60367
 
60382
60368
  function Skeleton({ className, ...props }) {
@@ -94672,12 +94658,12 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
94672
94658
  !modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn('data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70', defaultClassNames.day, className), ...props }));
94673
94659
  }
94674
94660
 
94675
- const createApiFormSchema = z$1.object({
94676
- name: z$1
94661
+ const createApiFormSchema = z.object({
94662
+ name: z
94677
94663
  .string()
94678
94664
  .min(1, 'API Key name is required')
94679
94665
  .regex(/^[a-zA-Z0-9_-]+$/, 'can only contain letters, numbers, and hyphens'),
94680
- expiration_date: z$1.date().nullable(),
94666
+ expiration_date: z.date().nullable(),
94681
94667
  });
94682
94668
  const createApiFormDefaultValues = {
94683
94669
  name: '',
@@ -94749,14 +94735,14 @@ function CreateApiModal({ isOpen, onClose, tenantKey, username }) {
94749
94735
  // Dynamic schema based on selected provider
94750
94736
  const createDynamicSchema$1 = (schemaFields) => {
94751
94737
  const schemaObj = {
94752
- provider: z$1.string().min(1, 'Provider is required'),
94738
+ provider: z.string().min(1, 'Provider is required'),
94753
94739
  };
94754
94740
  schemaFields.forEach((field) => {
94755
- schemaObj[field] = z$1
94741
+ schemaObj[field] = z
94756
94742
  .string()
94757
94743
  .min(1, `${field.replace(/_/g, ' ').replace(/\b\w/g, (l) => l.toUpperCase())} is required`);
94758
94744
  });
94759
- return z$1.object(schemaObj);
94745
+ return z.object(schemaObj);
94760
94746
  };
94761
94747
  const createExternalProviderFormDefaultValues = {
94762
94748
  provider: '',
@@ -95074,14 +95060,14 @@ function IntegrationLLMsTab({ tenantKey }) {
95074
95060
  // Dynamic schema based on selected provider
95075
95061
  const createDynamicSchema = (schemaFields) => {
95076
95062
  const schemaObj = {
95077
- provider: z$1.string().min(1, 'Provider is required'),
95063
+ provider: z.string().min(1, 'Provider is required'),
95078
95064
  };
95079
95065
  schemaFields.forEach((field) => {
95080
- schemaObj[field.name] = z$1
95066
+ schemaObj[field.name] = z
95081
95067
  .string()
95082
95068
  .min(1, `${field.name.replace(/_/g, ' ').replace(/\b\w/g, (l) => l.toUpperCase())} is required`);
95083
95069
  });
95084
- return z$1.object(schemaObj);
95070
+ return z.object(schemaObj);
95085
95071
  };
95086
95072
  const createDataSourceFormDefaultValues = {
95087
95073
  provider: '',
@@ -197316,32 +197302,16 @@ function SignupButton({ authUrl, tenantKey, redirectTo, label = 'Sign Up', onCli
197316
197302
  }
197317
197303
  SignupButton.displayName = 'SignupButton';
197318
197304
 
197319
- function OverlayModal({ open, onClose, title, description, className, children, }) {
197320
- const [mounted, setMounted] = useState(false);
197321
- const [dialogPanel, setDialogPanel] = useState(null);
197322
- useEffect(() => {
197323
- setMounted(true);
197324
- }, []);
197325
- const handleOpenChange = (nextOpen) => {
197326
- if (!nextOpen)
197327
- onClose();
197328
- };
197329
- if (!mounted || typeof document === 'undefined') {
197330
- return null;
197331
- }
197332
- // Nested Radix Dialog on document.body: viewport-fixed overlay + its own scroll lock,
197333
- // independent of any parent modal. Requires the app to resolve the same
197334
- // `@radix-ui/react-dialog` instance as this package (peer dependency + Rollup external).
197335
- return (jsx(DialogPrimitive.Root, { open: open, onOpenChange: handleOpenChange, modal: true, children: jsxs(DialogPrimitive.Portal, { container: document.body, children: [jsx(DialogPrimitive.Overlay, { "data-iblai-dialog-interaction-layer": true, className: cn('pointer-events-auto fixed inset-0 z-[100] bg-black/60', 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0') }), jsx(DialogPrimitive.Content, { ref: setDialogPanel, "data-iblai-dialog-interaction-layer": true, ...(!description ? { 'aria-describedby': undefined } : {}), className: cn('pointer-events-auto fixed left-[50%] top-[50%] z-[100] grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200', 'max-h-[min(90dvh,calc(100dvh-2rem))] max-w-[calc(100vw-2rem)] overflow-y-auto overscroll-contain rounded-lg p-6 sm:rounded-lg', 'pt-[max(1.5rem,env(safe-area-inset-top))] pb-[max(1.5rem,env(safe-area-inset-bottom))]', 'pl-[max(1.5rem,env(safe-area-inset-left))] pr-[max(1.5rem,env(safe-area-inset-right))]', 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]', 'focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', className), children: jsxs(FloatingPortalContainerContext.Provider, { value: dialogPanel, children: [jsx(DialogPrimitive.Close, { type: "button", className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", "aria-label": "Close", children: jsx(X$1, { className: "h-4 w-4" }) }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "flex flex-col space-y-1.5 pr-8 text-center sm:text-left", children: [jsx(DialogPrimitive.Title, { className: "text-lg font-semibold leading-none tracking-tight", children: title }), description ? (jsx(DialogPrimitive.Description, { className: "text-sm text-muted-foreground", children: description })) : null] }), children] })] }) })] }) }));
197336
- }
197337
-
197338
- // ── Helpers ──────────────────────────────────────────────────────────────────
197305
+ /**
197306
+ * Returns the canonical logo path and display name for an LLM provider.
197307
+ * `logo` is a static-root path (e.g. `/llm-amazon-provider.png`); the package
197308
+ * ships the canonical assets under `@iblai/web-containers/public/` — copy them
197309
+ * into your app's static-root (`public/` for Next.js) so the paths resolve.
197310
+ */
197339
197311
  function getLLMProviderDetails(llmProvider, llmName) {
197340
197312
  switch (llmProvider) {
197341
197313
  case 'groq':
197342
197314
  return { logo: '/llm-groq-provider.png', name: 'Groq' };
197343
- case 'IBLChatNvidia':
197344
- return { logo: '/llm-nvidia-provider.webp', name: 'NVIDIA' };
197345
197315
  case 'azure_openai':
197346
197316
  return { logo: '/llm-microsoft-provider.png', name: 'Microsoft' };
197347
197317
  case 'openai':
@@ -197356,22 +197326,48 @@ function getLLMProviderDetails(llmProvider, llmName) {
197356
197326
  return { logo: '/llm-google-provider.svg', name: 'Google' };
197357
197327
  case 'llama':
197358
197328
  return { logo: '/llm-llama-provider.jpeg', name: 'Meta' };
197359
- case 'IBLChatAnthropic':
197360
- return { logo: '/llm-claude-provider.png', name: 'Anthropic' };
197361
197329
  case 'perplexity':
197362
197330
  return { logo: '/llm-perplexity-provider.webp', name: 'Perplexity' };
197363
197331
  case 'deepseek':
197364
197332
  return { logo: '/llm-deepseek-provider.png', name: 'DeepSeek' };
197365
197333
  case 'xai':
197366
197334
  return { logo: '/llm-xai-provider.jpg', name: 'xAI' };
197335
+ case 'IBLChatAnthropic':
197367
197336
  case 'anthropic':
197368
197337
  return { logo: '/llm-claude-provider.png', name: 'Anthropic' };
197338
+ case 'IBLChatNvidia':
197369
197339
  case 'nvidia':
197370
197340
  return { logo: '/llm-nvidia-provider.webp', name: 'NVIDIA' };
197341
+ case 'bedrock':
197342
+ case 'amazon-bedrock':
197343
+ case 'amazon_bedrock':
197344
+ case 'IBLChatBedrock':
197345
+ return { logo: '/llm-amazon-provider.png', name: 'Amazon' };
197371
197346
  default:
197372
197347
  return { logo: '/llm-generic-provider.png', name: llmProvider };
197373
197348
  }
197374
197349
  }
197350
+
197351
+ function OverlayModal({ open, onClose, title, description, className, children, }) {
197352
+ const [mounted, setMounted] = useState(false);
197353
+ const [dialogPanel, setDialogPanel] = useState(null);
197354
+ useEffect(() => {
197355
+ setMounted(true);
197356
+ }, []);
197357
+ const handleOpenChange = (nextOpen) => {
197358
+ if (!nextOpen)
197359
+ onClose();
197360
+ };
197361
+ if (!mounted || typeof document === 'undefined') {
197362
+ return null;
197363
+ }
197364
+ // Nested Radix Dialog on document.body: viewport-fixed overlay + its own scroll lock,
197365
+ // independent of any parent modal. Requires the app to resolve the same
197366
+ // `@radix-ui/react-dialog` instance as this package (peer dependency + Rollup external).
197367
+ return (jsx(DialogPrimitive.Root, { open: open, onOpenChange: handleOpenChange, modal: true, children: jsxs(DialogPrimitive.Portal, { container: document.body, children: [jsx(DialogPrimitive.Overlay, { "data-iblai-dialog-interaction-layer": true, className: cn('pointer-events-auto fixed inset-0 z-[100] bg-black/60', 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0') }), jsx(DialogPrimitive.Content, { ref: setDialogPanel, "data-iblai-dialog-interaction-layer": true, ...(!description ? { 'aria-describedby': undefined } : {}), className: cn('pointer-events-auto fixed left-[50%] top-[50%] z-[100] grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg duration-200', 'max-h-[min(90dvh,calc(100dvh-2rem))] max-w-[calc(100vw-2rem)] overflow-y-auto overscroll-contain rounded-lg p-6 sm:rounded-lg', 'pt-[max(1.5rem,env(safe-area-inset-top))] pb-[max(1.5rem,env(safe-area-inset-bottom))]', 'pl-[max(1.5rem,env(safe-area-inset-left))] pr-[max(1.5rem,env(safe-area-inset-right))]', 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]', 'focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', className), children: jsxs(FloatingPortalContainerContext.Provider, { value: dialogPanel, children: [jsx(DialogPrimitive.Close, { type: "button", className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", "aria-label": "Close", children: jsx(X$1, { className: "h-4 w-4" }) }), jsxs("div", { className: "space-y-4", children: [jsxs("div", { className: "flex flex-col space-y-1.5 pr-8 text-center sm:text-left", children: [jsx(DialogPrimitive.Title, { className: "text-lg font-semibold leading-none tracking-tight", children: title }), description ? (jsx(DialogPrimitive.Description, { className: "text-sm text-muted-foreground", children: description })) : null] }), children] })] }) })] }) }));
197368
+ }
197369
+
197370
+ // ── Helpers ──────────────────────────────────────────────────────────────────
197375
197371
  const canSwitchLLm = (llm) => {
197376
197372
  if (llm === null || llm === void 0 ? void 0 : llm.has_credentials) {
197377
197373
  return true;
@@ -202950,13 +202946,13 @@ function AddPromptModal({ isOpen, onClose, mentorId, tenantKey }) {
202950
202946
  } }), jsx("div", { className: "flex justify-end", children: jsx(form.Subscribe, { selector: (state) => ({ isFormValue: state.canSubmit }), children: ({ isFormValue }) => (jsx(Button$1, { type: "submit", className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", disabled: isDisabled || !isFormValue, children: isCreatingPrompt ? 'Submitting...' : 'Submit' })) }) })] })] }) }), isModalOpen && FreeTrialDialog && (jsx(FreeTrialDialog, { isOpen: isModalOpen, onClose: closeModal }))] }));
202951
202947
  }
202952
202948
 
202953
- const systemPromptSchema = z$1.object({
202954
- prompt: z$1.string().min(1, 'Prompt is required'),
202949
+ const systemPromptSchema = z.object({
202950
+ prompt: z.string().min(1, 'Prompt is required'),
202955
202951
  });
202956
- const nonSystemPromptSchema = z$1.object({
202957
- category: z$1.string().min(1, 'Category is required'),
202958
- prompt: z$1.string().min(1, 'Prompt is required'),
202959
- promptVisibility: z$1.nativeEnum(PromptVisibilityEnum),
202952
+ const nonSystemPromptSchema = z.object({
202953
+ category: z.string().min(1, 'Category is required'),
202954
+ prompt: z.string().min(1, 'Prompt is required'),
202955
+ promptVisibility: z.nativeEnum(PromptVisibilityEnum),
202960
202956
  });
202961
202957
  function EditPromptModal({ isOpen, onClose, selectedPrompt, handleSave, isEditing, tenantKey, }) {
202962
202958
  var _a;
@@ -4,13 +4,13 @@ import React__default, { useState, useEffect, forwardRef, createElement as creat
4
4
  import { useGetUserMetadataQuery, useGetUserMetadataEdxQuery, useUpdateUserMetadataMutation, useUpdateUserMetadataEdxMutation, useUploadProfileImageMutation, useResetPasswordMutation, useSelfRetireMutation, useCreateUserInstitutionMutation, useGetUserInstitutionsQuery, useCreateUserEducationMutation, useUpdateUserEducationMutation, useDeleteUserEducationMutation, useGetUserEducationQuery, useCreateUserCompanyMutation, useGetUserCompaniesQuery, useCreateUserExperienceMutation, useUpdateUserExperienceMutation, useDeleteUserExperienceMutation, useGetUserExperienceQuery, useGetUserResumeQuery, useCreateUserResumeMutation, useGetMySubscriptionsQuery, useGetItemSubscriptionQuery, useCancelSubscriptionMutation, useCreateGlobalMemoryMutation, useGetMemsearchStatusQuery, useGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useDeleteGlobalMemoryMutation, ChatPrivacyModeEnum, useGetUserChatPrivacySettingsQuery, useUpdateUserChatPrivacySettingsMutation, CHAT_PRIVACY_MODES, useGetTenantChatPrivacyConfigQuery, useInviteUserMutation, usePlatformInvitationsQuery, useCreateCatalogInvitationCourseBulkMutation, useGetCatalogInvitationsCourseQuery, useLazyPlatformUsersQuery, useLazyPlatformUserGroupsQuery, useGetPersonnalizedSearchQuery, useCreateCatalogInvitationProgramBulkMutation, useGetCatalogInvitationsProgramQuery, useUpdateUserRoleMutation, useUpdateUserStatusMutation, useUpdatePlatformUserRoleWithPoliciesMutation, usePlatformUsersQuery, isPoliciesResponse, platformApiSlice, featureTags, useLazyGetRbacTeamsAccessListQuery, useCreateRbacTeamsAccessMutation, useGetRbacGroupsQuery, usePlatformUserGroupsQuery, useCreateRbacGroupMutation, useUpdateRbacGroupMutation, useDeleteRbacGroupMutation, useCreatePlatformUserGroupMutation, useUpdatePlatformUserGroupMutation, useDeletePlatformUserGroupMutation, useGetRbacGroupDetailsQuery, useGetPlatformUserGroupDetailsQuery, useGetRbacPermissionsMutation, useGetRbacRolesQuery, useCreateRbacRoleMutation, useUpdateRbacRoleMutation, useDeleteRbacRoleMutation, useGetRbacRoleDetailsQuery, useGetRbacActionsDefinitionQuery, useGetRbacPoliciesQuery, useCreateRbacPolicyMutation, useUpdateRbacPolicyMutation, useDeleteRbacPolicyMutation, useGetRbacPolicyDetailsQuery, useGetWatchedGroupsQuery, useCreateWatchedGroupMutation, useUpdateWatchedGroupMutation, useDeleteWatchedGroupMutation, useAddWatchedUserMutation, useRemoveWatchedUserMutation, useAddWatcherMutation, useUpdateWatcherMutation, useDeleteWatcherMutation, useGetWatchedUsersQuery, useGetWatchersQuery, WATCHER_NOTIFICATION_EVENTS, WATCHER_NOTIFICATION_EVENT_LABELS, useDeleteApiKeyMutation, useGetApiKeysQuery, 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, useUpdateTenantChatPrivacyConfigMutation, useGetCustomMentorsQuery, useGetStripeConnectStatusQuery, useStartStripeConnectOnboardingMutation, useLazyGetStripeConnectDashboardQuery, useGetAiSearchMentorsQuery, useListPaywallsQuery, useListPricesQuery, useCreatePriceMutation, useUpdatePriceMutation, useDeletePriceMutation, useGetPaywallConfigQuery, useEnablePaywallMutation, useUpdatePaywallMutation, useLazyGetCourseMetaDataQuery, useLazyGetCourseCompletionOutlinesQuery, useLazyGetCourseEligibilityQuery, useLazyGetEdxSSOTokenQuery, useCreateCourseEnrollmentMutation, useCreateStripeCheckoutSessionMutation, useLazyGetCourseProgressQuery, useLazyGetCourseCompletionQuery, useUpdateExamAttemptMutation, useStartExamMutation, useLazyGetExamInfoQuery, useUpdateUserProjectMutation, useGetTrainingDocumentsQuery, useGetVectorDocumentsQuery, useGetMentorMemoriesListQuery, useGetMemoryCategoriesAdminQuery, useDeleteMentorMemoryMutation, useUpdateMentorMemoryMutation, useCreateMentorMemoryMutation, useLazyGetConnectedServiceAuthUrlQuery, useGetMentorsQuery, useGetPublicMentorsQuery, useCreateUserProjectMutation, useDeleteUserProjectMutation, useGetUserProjectDetailsQuery, useEditTrainingDocumentMutation, useAddTrainingDocumentMutation, useLazyGetCredentialsQuery, useGetMentorSettingsQuery, useEditMentorMutation, useUploadLightLogoMutation, useUploadDarkLogoMutation, useUpdatePlatformInfoMutation, LOGO_ENDPOINTS, useGetUserProjectsQuery, useCreateSessionIdMutation, useGetMentorCategoriesQuery, useDeleteMentorMutation, useForkMentorMutation, useGetToolsQuery, useLazyGetMCPServersQuery, useOauthFindMutation, useLazyStartOAuthFlowQuery, useCreateMCPServerMutation, usePartialUpdateMCPServerMutation, useCreateMCPServerConnectionMutation, usePatchMCPServerConnectionMutation, useGetConnectedServicesQuery, useGetMCPServersQuery, useGetMCPServerConnectionsQuery, useUpdateMCPServerMutation, useDeleteMCPServerMutation, useEditMentorJsonMutation, useDisconnectServiceMutation, useGetPromptCategoriesQuery, PRIVACY_ACTIONS, PRIVACY_ENTITY_TYPES, useGetVoicesQuery, useGetVoiceQuery, useGetCallConfigurationsQuery, useCreateCallConfigurationMutation, useUpdateCallConfigurationMutation, useGetMentorPublicSettingsQuery, useGetChatHistoryFilterQuery, useGetChatHistoryQuery, useGetMentorSummariesQuery, useGetConversationMemoriesQuery, useCreatePromptMutation, useGetPromptsSearchQuery, useUpdatePromptMutation, useCreateRedirectTokenMutation, useGetShareableLinkQuery, useCreateShareableLinkMutation, useUpdateShareableLinkMutation, useCreateDisclaimerMutation, useUpdateDisclaimerMutation, useGetDisclaimersQuery, useUpdateRbacMentorAccessMutation, useGetRbacMentorAccessListQuery, useStarMentorMutation, useUnstarMentorMutation, useGetPersonnalizedMentorsQuery, useCreateCallCredentialsMutation, useGetGuidedPromptsQuery, useUpdateChatSessionSharedMutation, useUpdateMessageFeedbackMutation, useLazyGetPromptsSearchQuery, useLazyGetGuidedPromptsQuery, useGetPeriodicAgentsQuery, useGetPeriodicAgentLogsListQuery, useCreatePeriodicAgentMutation, useDeletePeriodicAgentMutation, useDeletePromptMutation, useDeleteTrainingDocumentMutation, useGetTrainingDocumentRetrainScheduleQuery, useCreateTrainingDocumentRetrainScheduleMutation, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useUpdateArtifactMutation, useLazyGetArtifactVersionQuery, useLazyListArtifactVersionsQuery, useSetCurrentVersionMutation, useListArtifactVersionsQuery, useLazyGetArtifactQuery, useLazyListArtifactsQuery, useEditSessionMutation } from '@iblai/data-layer';
5
5
  import { getInitials, useTenantMetadata, WithPermissions, useStripeUpgrade, CHAT_AREA_SIZE, isAlphaNumeric32, checkRbacPermission, selectNumberOfActiveChatMessages, useUsername, selectStreaming, isLoggedIn, TOOLS, isSafariBrowser, useShowAttachment, useShowVoiceCall, useShowVoiceRecorder, useMentorSettings, selectShowingSharedChat, selectRbacPermissions, useShowFreeTrialDialog, useEmbedMode, chatInputSliceSelectors, useResponsive, useAccessingPublicRoute, useVisitingTenant, useModelFileUploadCapabilities, useChatFileUpload, useVoiceChat, selectAttachedFiles, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, removeFile, chatInputSliceActions, chatActions, WithFormPermissions, useTenantContext, TimeTracker, advancedTabsProperties, defaultSessionIds, ANONYMOUS_USERNAME as ANONYMOUS_USERNAME$2, redirectToAuthSpaJoinTenant, selectActiveTab, useAxdToken, useWelcomeMessage, markdownToPlainText, useCachedSessionId, use402ErrorCheck, selectTokenEnabled, selectToken, useServiceWorker, useUserAgreement, useAdvancedChat, sendMessageToParentWebsite, useMentorTools, useFileDragDrop, eventBus, RemoteEvents, selectEnableChatActionsPopup, advancedTabs, isInIframe, getAuthSpaJoinUrl, addMessage, clearFiles, MENTOR_VISIBILITY } from '@iblai/web-utils';
6
6
  import { useDispatch, useSelector } from 'react-redux';
7
- import { toast, Toaster as Toaster$1 } from 'sonner';
7
+ import { toast } from 'sonner';
8
8
  import { useSearchParams, useParams, usePathname } from 'next/navigation';
9
9
  import Image$4 from 'next/image';
10
10
  import Link$2 from 'next/link';
11
11
  import * as ReactDOM from 'react-dom';
12
12
  import ReactDOM__default from 'react-dom';
13
- import { z as z$3 } from 'zod';
13
+ import { z as z$2 } from 'zod';
14
14
  import * as DialogPrimitive from '@radix-ui/react-dialog';
15
15
  import { createDialogScope } from '@radix-ui/react-dialog';
16
16
  import { MentorVisibilityEnum, TransportEnum, PromptVisibilityEnum } from '@iblai/iblai-api';
@@ -86893,7 +86893,7 @@ const __iconNode$5 = [
86893
86893
  ];
86894
86894
  const X$2 = createLucideIcon("x", __iconNode$5);
86895
86895
 
86896
- var x$3 = /*#__PURE__*/Object.freeze({
86896
+ var x$2 = /*#__PURE__*/Object.freeze({
86897
86897
  __proto__: null,
86898
86898
  __iconNode: __iconNode$5,
86899
86899
  default: X$2
@@ -98149,8 +98149,8 @@ function useForm(opts) {
98149
98149
  const FACEBOOK_URL_PREFIX = 'https://facebook.com/';
98150
98150
  const X_URL_PREFIX = 'https://x.com/';
98151
98151
  const LINKEDIN_URL_PREFIX = 'https://linkedin.com/in/';
98152
- const socialFormSchema = z$3.object({
98153
- facebook: z$3.string().refine((val) => {
98152
+ const socialFormSchema = z$2.object({
98153
+ facebook: z$2.string().refine((val) => {
98154
98154
  if (!val || val === '')
98155
98155
  return true;
98156
98156
  // Extract username from full URL and validate
@@ -98159,7 +98159,7 @@ const socialFormSchema = z$3.object({
98159
98159
  }, {
98160
98160
  message: 'Username can only contain letters, numbers, hyphens, and periods',
98161
98161
  }),
98162
- linkedIn: z$3.string().refine((val) => {
98162
+ linkedIn: z$2.string().refine((val) => {
98163
98163
  if (!val || val === '')
98164
98164
  return true;
98165
98165
  // Extract username from full URL and validate
@@ -98168,7 +98168,7 @@ const socialFormSchema = z$3.object({
98168
98168
  }, {
98169
98169
  message: 'Username must be at least 5 characters long and can only contain letters, numbers, and periods.',
98170
98170
  }),
98171
- x: z$3.string().refine((val) => {
98171
+ x: z$2.string().refine((val) => {
98172
98172
  if (!val || val === '')
98173
98173
  return true;
98174
98174
  // Extract username from full URL and validate
@@ -98395,20 +98395,6 @@ const useProfile = (username) => {
98395
98395
  };
98396
98396
  };
98397
98397
 
98398
- var M$1=(e,i,s,u,m,a,l,h)=>{let d=document.documentElement,w=["light","dark"];function p(n){(Array.isArray(e)?e:[e]).forEach(y=>{let k=y==="class",S=k&&a?m.map(f=>a[f]||f):m;k?(d.classList.remove(...S),d.classList.add(a&&a[n]?a[n]:n)):d.setAttribute(y,n);}),R(n);}function R(n){h&&w.includes(n)&&(d.style.colorScheme=n);}function c(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(u)p(u);else try{let n=localStorage.getItem(i)||s,y=l&&n==="system"?c():n;p(y);}catch(n){}};var x$2=React.createContext(void 0),U$3={setTheme:e=>{},themes:[]},z$2=()=>{var e;return (e=React.useContext(x$2))!=null?e:U$3};React.memo(({forcedTheme:e,storageKey:i,attribute:s,enableSystem:u,enableColorScheme:m,defaultTheme:a,value:l,themes:h,nonce:d,scriptProps:w})=>{let p=JSON.stringify([s,i,a,e,h,l,u,m]).slice(1,-1);return React.createElement("script",{...w,suppressHydrationWarning:true,nonce:typeof window=="undefined"?d:"",dangerouslySetInnerHTML:{__html:`(${M$1.toString()})(${p})`}})});
98399
-
98400
- const Toaster = ({ ...props }) => {
98401
- const { theme = "system" } = z$2();
98402
- return (jsx(Toaster$1, { theme: theme, className: "toaster group", toastOptions: {
98403
- classNames: {
98404
- toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
98405
- description: "group-[.toast]:text-muted-foreground",
98406
- actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
98407
- cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
98408
- },
98409
- }, ...props }));
98410
- };
98411
-
98412
98398
  const Dialog = DialogPrimitive.Root;
98413
98399
  const DialogTrigger = DialogPrimitive.Trigger;
98414
98400
  const DialogPortal = DialogPrimitive.Portal;
@@ -98477,7 +98463,7 @@ const Security = ({ email, onAccountDeleted, }) => {
98477
98463
  setDeleting(false);
98478
98464
  }
98479
98465
  };
98480
- return (jsxs(Fragment$1, { children: [jsxs("div", { className: "border border-gray-200 rounded-lg p-6", children: [jsxs("div", { className: "max-w-md mx-auto text-center py-12", children: [jsx("div", { className: "text-gray-400 dark:text-gray-500 mb-6", children: jsx(Shield, { className: "h-20 w-20 mx-auto" }) }), jsx("h4", { className: "text-xl font-semibold text-gray-900 dark:text-gray-100 mb-4", children: "Security Settings" }), jsx("p", { className: "text-gray-600 dark:text-gray-400 mb-8", children: "Click to reset your password." }), jsx(Button$1, { className: "w-full bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", onClick: handleResetPasswordLink, disabled: processing, children: processing ? 'Sending Password Reset Link...' : 'Send Password Reset Link' })] }), jsx("div", { className: "flex justify-end", children: jsx("button", { type: "button", className: "text-sm text-gray-400 hover:text-[#2563EB] hover:underline transition-colors", onClick: () => setIsConfirmOpen(true), children: "Delete account" }) })] }), jsx(Dialog, { open: isConfirmOpen, onOpenChange: setIsConfirmOpen, children: jsxs(DialogContent, { children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: "Are you sure?" }), jsx(DialogDescription, { children: "This will permanently delete your account and all associated data. This action cannot be undone. You will be logged out upon successful deletion." })] }), jsxs(DialogFooter, { children: [jsx(Button$1, { variant: "outline", onClick: () => setIsConfirmOpen(false), disabled: deleting, children: "Cancel" }), jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", onClick: handleDeleteAccount, disabled: deleting, children: deleting ? 'Deleting...' : 'Yes, Delete My Account' })] })] }) }), jsx(Toaster, {})] }));
98466
+ return (jsxs(Fragment$1, { children: [jsxs("div", { className: "border border-gray-200 rounded-lg p-6", children: [jsxs("div", { className: "max-w-md mx-auto text-center py-12", children: [jsx("div", { className: "text-gray-400 dark:text-gray-500 mb-6", children: jsx(Shield, { className: "h-20 w-20 mx-auto" }) }), jsx("h4", { className: "text-xl font-semibold text-gray-900 dark:text-gray-100 mb-4", children: "Security Settings" }), jsx("p", { className: "text-gray-600 dark:text-gray-400 mb-8", children: "Click to reset your password." }), jsx(Button$1, { className: "w-full bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", onClick: handleResetPasswordLink, disabled: processing, children: processing ? 'Sending Password Reset Link...' : 'Send Password Reset Link' })] }), jsx("div", { className: "flex justify-end", children: jsx("button", { type: "button", className: "text-sm text-gray-400 hover:text-[#2563EB] hover:underline transition-colors", onClick: () => setIsConfirmOpen(true), children: "Delete account" }) })] }), jsx(Dialog, { open: isConfirmOpen, onOpenChange: setIsConfirmOpen, children: jsxs(DialogContent, { children: [jsxs(DialogHeader, { children: [jsx(DialogTitle, { children: "Are you sure?" }), jsx(DialogDescription, { children: "This will permanently delete your account and all associated data. This action cannot be undone. You will be logged out upon successful deletion." })] }), jsxs(DialogFooter, { children: [jsx(Button$1, { variant: "outline", onClick: () => setIsConfirmOpen(false), disabled: deleting, children: "Cancel" }), jsx(Button$1, { className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] hover:opacity-90 text-white", onClick: handleDeleteAccount, disabled: deleting, children: deleting ? 'Deleting...' : 'Yes, Delete My Account' })] })] }) })] }));
98481
98467
  };
98482
98468
 
98483
98469
  var md5 = {exports: {}};
@@ -132437,12 +132423,12 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
132437
132423
  !modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn('data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70', defaultClassNames.day, className), ...props }));
132438
132424
  }
132439
132425
 
132440
- const createApiFormSchema = z$3.object({
132441
- name: z$3
132426
+ const createApiFormSchema = z$2.object({
132427
+ name: z$2
132442
132428
  .string()
132443
132429
  .min(1, 'API Key name is required')
132444
132430
  .regex(/^[a-zA-Z0-9_-]+$/, 'can only contain letters, numbers, and hyphens'),
132445
- expiration_date: z$3.date().nullable(),
132431
+ expiration_date: z$2.date().nullable(),
132446
132432
  });
132447
132433
  const createApiFormDefaultValues$1 = {
132448
132434
  name: '',
@@ -132514,14 +132500,14 @@ function CreateApiModal$1({ isOpen, onClose, tenantKey, username }) {
132514
132500
  // Dynamic schema based on selected provider
132515
132501
  const createDynamicSchema$1 = (schemaFields) => {
132516
132502
  const schemaObj = {
132517
- provider: z$3.string().min(1, 'Provider is required'),
132503
+ provider: z$2.string().min(1, 'Provider is required'),
132518
132504
  };
132519
132505
  schemaFields.forEach((field) => {
132520
- schemaObj[field] = z$3
132506
+ schemaObj[field] = z$2
132521
132507
  .string()
132522
132508
  .min(1, `${field.replace(/_/g, ' ').replace(/\b\w/g, (l) => l.toUpperCase())} is required`);
132523
132509
  });
132524
- return z$3.object(schemaObj);
132510
+ return z$2.object(schemaObj);
132525
132511
  };
132526
132512
  const createExternalProviderFormDefaultValues = {
132527
132513
  provider: '',
@@ -132839,14 +132825,14 @@ function IntegrationLLMsTab({ tenantKey }) {
132839
132825
  // Dynamic schema based on selected provider
132840
132826
  const createDynamicSchema = (schemaFields) => {
132841
132827
  const schemaObj = {
132842
- provider: z$3.string().min(1, 'Provider is required'),
132828
+ provider: z$2.string().min(1, 'Provider is required'),
132843
132829
  };
132844
132830
  schemaFields.forEach((field) => {
132845
- schemaObj[field.name] = z$3
132831
+ schemaObj[field.name] = z$2
132846
132832
  .string()
132847
132833
  .min(1, `${field.name.replace(/_/g, ' ').replace(/\b\w/g, (l) => l.toUpperCase())} is required`);
132848
132834
  });
132849
- return z$3.object(schemaObj);
132835
+ return z$2.object(schemaObj);
132850
132836
  };
132851
132837
  const createDataSourceFormDefaultValues = {
132852
132838
  provider: '',
@@ -202455,6 +202441,52 @@ var reactPaginate = {exports: {}};
202455
202441
 
202456
202442
  } (reactPaginate));
202457
202443
 
202444
+ /**
202445
+ * Returns the canonical logo path and display name for an LLM provider.
202446
+ * `logo` is a static-root path (e.g. `/llm-amazon-provider.png`); the package
202447
+ * ships the canonical assets under `@iblai/web-containers/public/` — copy them
202448
+ * into your app's static-root (`public/` for Next.js) so the paths resolve.
202449
+ */
202450
+ function getLLMProviderDetails(llmProvider, llmName) {
202451
+ switch (llmProvider) {
202452
+ case 'groq':
202453
+ return { logo: '/llm-groq-provider.png', name: 'Groq' };
202454
+ case 'azure_openai':
202455
+ return { logo: '/llm-microsoft-provider.png', name: 'Microsoft' };
202456
+ case 'openai':
202457
+ if (llmName)
202458
+ return { logo: '/llm-openai-provider.jpg', name: 'OpenAI' };
202459
+ return { logo: '/llm-openai-provider-2.svg', name: 'OpenAI' };
202460
+ case 'mistral':
202461
+ return { logo: '/llm-mistral-provider.jpeg', name: 'Mistral' };
202462
+ case 'google':
202463
+ if (llmName)
202464
+ return { logo: '/llm-gemini-provider.png', name: 'Google' };
202465
+ return { logo: '/llm-google-provider.svg', name: 'Google' };
202466
+ case 'llama':
202467
+ return { logo: '/llm-llama-provider.jpeg', name: 'Meta' };
202468
+ case 'perplexity':
202469
+ return { logo: '/llm-perplexity-provider.webp', name: 'Perplexity' };
202470
+ case 'deepseek':
202471
+ return { logo: '/llm-deepseek-provider.png', name: 'DeepSeek' };
202472
+ case 'xai':
202473
+ return { logo: '/llm-xai-provider.jpg', name: 'xAI' };
202474
+ case 'IBLChatAnthropic':
202475
+ case 'anthropic':
202476
+ return { logo: '/llm-claude-provider.png', name: 'Anthropic' };
202477
+ case 'IBLChatNvidia':
202478
+ case 'nvidia':
202479
+ return { logo: '/llm-nvidia-provider.webp', name: 'NVIDIA' };
202480
+ case 'bedrock':
202481
+ case 'amazon-bedrock':
202482
+ case 'amazon_bedrock':
202483
+ case 'IBLChatBedrock':
202484
+ return { logo: '/llm-amazon-provider.png', name: 'Amazon' };
202485
+ default:
202486
+ return { logo: '/llm-generic-provider.png', name: llmProvider };
202487
+ }
202488
+ }
202489
+
202458
202490
  lazy(() => Promise.resolve().then(function () { return createProjectModal; }).then((mod) => ({
202459
202491
  default: mod.CreateProjectModal,
202460
202492
  })));
@@ -209035,7 +209067,7 @@ const dynamicIconImports = {
209035
209067
  "worm": () => Promise.resolve().then(function () { return worm; }),
209036
209068
  "wrap-text": () => Promise.resolve().then(function () { return wrapText; }),
209037
209069
  "wrench": () => Promise.resolve().then(function () { return wrench; }),
209038
- "x": () => Promise.resolve().then(function () { return x$3; }),
209070
+ "x": () => Promise.resolve().then(function () { return x$2; }),
209039
209071
  "youtube": () => Promise.resolve().then(function () { return youtube; }),
209040
209072
  "zap-off": () => Promise.resolve().then(function () { return zapOff; }),
209041
209073
  "zap": () => Promise.resolve().then(function () { return zap; }),
@@ -211050,52 +211082,6 @@ function AgentLLMTab({ showConfigurationHeader = true, getLLMProviderDetails, la
211050
211082
  }, llms: (llmProviders !== null && llmProviders !== void 0 ? llmProviders : []), getLLMProviderDetails: getLLMProviderDetails, labels: labels.providerModal }))] }) })] }));
211051
211083
  }
211052
211084
 
211053
- /**
211054
- * Returns the canonical logo path and display name for an LLM provider.
211055
- * `logo` is a static-root path (e.g. `/llm-amazon-provider.png`); the package
211056
- * ships the canonical assets under `@iblai/web-containers/public/` — copy them
211057
- * into your app's static-root (`public/` for Next.js) so the paths resolve.
211058
- */
211059
- function getLLMProviderDetails(llmProvider, llmName) {
211060
- switch (llmProvider) {
211061
- case 'groq':
211062
- return { logo: '/llm-groq-provider.png', name: 'Groq' };
211063
- case 'azure_openai':
211064
- return { logo: '/llm-microsoft-provider.png', name: 'Microsoft' };
211065
- case 'openai':
211066
- if (llmName)
211067
- return { logo: '/llm-openai-provider.jpg', name: 'OpenAI' };
211068
- return { logo: '/llm-openai-provider-2.svg', name: 'OpenAI' };
211069
- case 'mistral':
211070
- return { logo: '/llm-mistral-provider.jpeg', name: 'Mistral' };
211071
- case 'google':
211072
- if (llmName)
211073
- return { logo: '/llm-gemini-provider.png', name: 'Google' };
211074
- return { logo: '/llm-google-provider.svg', name: 'Google' };
211075
- case 'llama':
211076
- return { logo: '/llm-llama-provider.jpeg', name: 'Meta' };
211077
- case 'perplexity':
211078
- return { logo: '/llm-perplexity-provider.webp', name: 'Perplexity' };
211079
- case 'deepseek':
211080
- return { logo: '/llm-deepseek-provider.png', name: 'DeepSeek' };
211081
- case 'xai':
211082
- return { logo: '/llm-xai-provider.jpg', name: 'xAI' };
211083
- case 'IBLChatAnthropic':
211084
- case 'anthropic':
211085
- return { logo: '/llm-claude-provider.png', name: 'Anthropic' };
211086
- case 'IBLChatNvidia':
211087
- case 'nvidia':
211088
- return { logo: '/llm-nvidia-provider.webp', name: 'NVIDIA' };
211089
- case 'bedrock':
211090
- case 'amazon-bedrock':
211091
- case 'amazon_bedrock':
211092
- case 'IBLChatBedrock':
211093
- return { logo: '/llm-amazon-provider.png', name: 'Amazon' };
211094
- default:
211095
- return { logo: '/llm-generic-provider.png', name: llmProvider };
211096
- }
211097
- }
211098
-
211099
211085
  function useTools({ labels }) {
211100
211086
  var _a, _b;
211101
211087
  const { tenantKey, mentorId, username } = useAgentSettings();
@@ -213153,13 +213139,13 @@ function CopyButton({ text, disabled = false }) {
213153
213139
  return (jsxs(Button$1, { variant: "outline", size: "sm", className: "h-8 flex-1 py-5", disabled: disabled, onClick: () => copy(text), "aria-label": status === 'success' ? 'Text copied to clipboard' : 'Copy text to clipboard', children: [jsx(Copy, { className: "mr-2 h-4 w-4" }), status === 'success' ? 'Copied' : 'Copy'] }));
213154
213140
  }
213155
213141
 
213156
- const systemPromptSchema$1 = z$3.object({
213157
- prompt: z$3.string().min(1, 'Prompt is required'),
213142
+ const systemPromptSchema$1 = z$2.object({
213143
+ prompt: z$2.string().min(1, 'Prompt is required'),
213158
213144
  });
213159
- const nonSystemPromptSchema$1 = z$3.object({
213160
- category: z$3.string().min(1, 'Category is required'),
213161
- prompt: z$3.string().min(1, 'Prompt is required'),
213162
- promptVisibility: z$3.nativeEnum(PromptVisibilityEnum),
213145
+ const nonSystemPromptSchema$1 = z$2.object({
213146
+ category: z$2.string().min(1, 'Category is required'),
213147
+ prompt: z$2.string().min(1, 'Prompt is required'),
213148
+ promptVisibility: z$2.nativeEnum(PromptVisibilityEnum),
213163
213149
  });
213164
213150
  function EditPromptModal$1({ isOpen, onClose, selectedPrompt, handleSave, isEditing }) {
213165
213151
  var _a;
@@ -214464,12 +214450,12 @@ function daysFromCurrentDate(targetDate) {
214464
214450
  function CreateApiModal({ isOpen, onClose, tenantKey, username, executeGatedAction, labels, apiKeyModalLabels, }) {
214465
214451
  const [apiKey, setApiKey] = React__default.useState(null);
214466
214452
  const [createApiKey, { isLoading }] = useCreateApiKeyMutation();
214467
- const createApiFormSchema = React__default.useMemo(() => z$3.object({
214468
- name: z$3
214453
+ const createApiFormSchema = React__default.useMemo(() => z$2.object({
214454
+ name: z$2
214469
214455
  .string()
214470
214456
  .min(1, labels.nameRequired)
214471
214457
  .regex(/^[a-zA-Z0-9_-]+$/, labels.nameInvalid),
214472
- expiration_date: z$3.date().nullable(),
214458
+ expiration_date: z$2.date().nullable(),
214473
214459
  }), [labels.nameRequired, labels.nameInvalid]);
214474
214460
  const form = useForm({
214475
214461
  defaultValues: createApiFormDefaultValues,
@@ -215709,7 +215695,7 @@ const useEmbedTab = (urls) => {
215709
215695
  const value = form.state.values;
215710
215696
  // Validate website URL if not anonymous
215711
215697
  if (!value.allow_anonymous &&
215712
- (!value.website_url || !z$3.string().url().safeParse(value.website_url).success)) {
215698
+ (!value.website_url || !z$2.string().url().safeParse(value.website_url).success)) {
215713
215699
  setCreateTokenError('Please specify a valid Website URL');
215714
215700
  return { success: false };
215715
215701
  }
@@ -215795,7 +215781,7 @@ const useEmbedTab = (urls) => {
215795
215781
  const createTokenHandler = async () => {
215796
215782
  var _a, _b, _c;
215797
215783
  const websiteUrl = form.getFieldValue('website_url');
215798
- if (!websiteUrl || !z$3.string().url().safeParse(websiteUrl).success) {
215784
+ if (!websiteUrl || !z$2.string().url().safeParse(websiteUrl).success) {
215799
215785
  setCreateTokenError('A valid url is required!');
215800
215786
  return;
215801
215787
  }
@@ -223235,13 +223221,13 @@ function AddPromptModal({ isOpen, onClose, mentorId, tenantKey }) {
223235
223221
  } }), jsx("div", { className: "flex justify-end", children: jsx(form.Subscribe, { selector: (state) => ({ isFormValue: state.canSubmit }), children: ({ isFormValue }) => (jsx(Button$1, { type: "submit", className: "bg-gradient-to-r from-[#2563EB] to-[#93C5FD] text-white hover:opacity-90", disabled: isDisabled || !isFormValue, children: isCreatingPrompt ? 'Submitting...' : 'Submit' })) }) })] })] }) }), isModalOpen && FreeTrialDialog && (jsx(FreeTrialDialog, { isOpen: isModalOpen, onClose: closeModal }))] }));
223236
223222
  }
223237
223223
 
223238
- const systemPromptSchema = z$3.object({
223239
- prompt: z$3.string().min(1, 'Prompt is required'),
223224
+ const systemPromptSchema = z$2.object({
223225
+ prompt: z$2.string().min(1, 'Prompt is required'),
223240
223226
  });
223241
- const nonSystemPromptSchema = z$3.object({
223242
- category: z$3.string().min(1, 'Category is required'),
223243
- prompt: z$3.string().min(1, 'Prompt is required'),
223244
- promptVisibility: z$3.nativeEnum(PromptVisibilityEnum),
223227
+ const nonSystemPromptSchema = z$2.object({
223228
+ category: z$2.string().min(1, 'Category is required'),
223229
+ prompt: z$2.string().min(1, 'Prompt is required'),
223230
+ promptVisibility: z$2.nativeEnum(PromptVisibilityEnum),
223245
223231
  });
223246
223232
  function EditPromptModal({ isOpen, onClose, selectedPrompt, handleSave, isEditing, tenantKey, }) {
223247
223233
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/iblai-js",
3
- "version": "1.20.1",
3
+ "version": "1.20.3",
4
4
  "description": "Unified JavaScript SDK for IBL.ai — re-exports data-layer, web-containers, and web-utils under a single package",
5
5
  "type": "module",
6
6
  "engines": {
@@ -66,10 +66,10 @@
66
66
  "axios": "1.13.6",
67
67
  "dotenv": "16.6.1",
68
68
  "winston": "3.19.0",
69
- "@iblai/data-layer": "1.8.3",
70
- "@iblai/web-containers": "1.10.1",
71
- "@iblai/web-utils": "1.11.2",
72
- "@iblai/mcp": "1.7.2"
69
+ "@iblai/data-layer": "1.8.4",
70
+ "@iblai/mcp": "1.7.2",
71
+ "@iblai/web-containers": "1.10.3",
72
+ "@iblai/web-utils": "1.11.2"
73
73
  },
74
74
  "peerDependencies": {
75
75
  "@radix-ui/react-dialog": "^1.1.7",