@frontera-sdk/chat-ui 1.53.14 → 1.53.16
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.
- package/dist/chat.js +132 -132
- package/dist/{chunk-2SX4XLQI.js → chunk-47UUMIS3.js} +1 -1
- package/dist/{chunk-67IW6PE4.js → chunk-D6YKQJ5V.js} +2 -2
- package/dist/{chunk-ZNCZ7QWY.js → chunk-FVSSLEFN.js} +806 -12
- package/dist/{chunk-F66BHU7S.js → chunk-N2PBTMEA.js} +1 -1
- package/dist/{chunk-OYDGSDQX.js → chunk-PNU2CDXK.js} +1 -1
- package/dist/{chunk-GCPPMKGT.js → chunk-UUZ3ANIK.js} +9 -2
- package/dist/header.js +3 -3
- package/dist/message.js +3 -3
- package/dist/new-session.js +2 -2
- package/dist/{pdf-deck-view-inner-B3GZ4OW5.js → pdf-deck-view-inner-3TG3EQ3B.js} +2 -2
- package/dist/{pdf-document-view-inner-WM23E6IG.js → pdf-document-view-inner-3EGB6RKB.js} +2 -2
- package/package.json +3 -3
package/dist/chat.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { offset, flip, autoUpdate, computePosition } from './chunk-I7SXWUAN.js';
|
|
3
3
|
import { isFullscreenHotkey, DeckNotesCard, deckOwnsArrowKeys } from './chunk-4FRTPVJT.js';
|
|
4
|
-
import { ArtifactSkeleton, resolveStageWidth, zoomPercent, DECK_ZOOM_LEVELS, LazyThumb } from './chunk-
|
|
5
|
-
import { NewSessionPrompt, keepCaretOnTap } from './chunk-
|
|
4
|
+
import { ArtifactSkeleton, resolveStageWidth, zoomPercent, DECK_ZOOM_LEVELS, LazyThumb } from './chunk-N2PBTMEA.js';
|
|
5
|
+
import { NewSessionPrompt, keepCaretOnTap } from './chunk-47UUMIS3.js';
|
|
6
6
|
import { PendingCards } from './chunk-SNLXL6Q5.js';
|
|
7
7
|
import { themeToStyle } from './chunk-6HYPVNVA.js';
|
|
8
8
|
import { useChatAgents } from './chunk-NDU6ERVT.js';
|
|
9
9
|
import { subjectOfChatToken, capabilitiesOfChatToken } from './chunk-CCVPZVFK.js';
|
|
10
10
|
import { useChatCredential } from './chunk-6BCUAPW3.js';
|
|
11
11
|
import './chunk-WDYCLC4F.js';
|
|
12
|
-
import { chatSidePanelSessionKey, Chart1Icon, useTemplatePreviewStore, useHasTemplatePreviewHost, useChatSidePanelStore, ChatHeader, ChatHeaderActions, useRightPane, getChatOverviewAgentStatus, useChatOverviewVisible, useConversationArtifacts, PENDING_CHART_TAB_PREFIX, CHART_TAB_PREFIX, AGENT_WORK_TAB_ID, AGENT_ROUTINES_TAB_ID, SOURCES_TAB_ID, TEMPLATE_TAB_ID, OutputsSection, ChainLink1Icon, ChatOverviewContent, COMPUTER_TAB_PREFIX, SourceRow, motion, MAX_CHAT_SIDE_PANEL_SESSIONS, DEFAULT_CHAT_SIDE_PANEL_SIZE, TableIcon } from './chunk-
|
|
13
|
-
import { dynamic, useChatStreamStore, useComposerStore, Message, Thinking, setPendingFiles, usePersonConfirmations, unshownPendingConfirmations, ConversationConfirmationCard, useLivePreviewUrl, ArrowRotateClockwiseIcon, useComputerFiles, useUploadComputerFile, CanvasWidget, isPlainTextLanguage, useUploadFile, COMPOSER_ID_MAIN, useContextWindowInfo, useIsCompacting, useQueuedMessages, VolumeFullIcon, WarningSignIcon, useComputer, csvTextToWorkbookJson, CSV_PREVIEW_MAX_ROWS, CopyButton, COMPOSER_ID_COPILOT, ModelIcon, modeToBrandRow, useBackDismiss, PdfViewer, brandLabel, Spinner } from './chunk-
|
|
14
|
-
import { Textarea, resolveChatHost, artifactFormatIcon, BookIcon, useAgentRoster, ShieldCheckIcon, useArtifactStore, useCanvasStore, useChatOverviewStore, setSdkConversationPath, setSdkDarkMode, AgentsProvider, PluginProvider, WorkspaceProvider, TooltipProvider, ChatHostProvider, getPersonConfirmation, isToolPart, getToolState, getToolName, getToolInput, sourceKind, extractDomain, CitationViewerContext, MarkdownRenderer, ConnectRunnerContext, usePathname, useChatSurfaceProvider, usePaneFocusStore, useAgentPanelStore, Tooltip, TooltipTrigger, TooltipContent, StudioDisplayIcon, WorldIcon, SlidesWideIcon, ArtifactActionsMenu, DotGrid1x3HorizontalTightIcon, ArrowsShowIcon, useKeyboardInset, ExclamationCircleIcon, getToolOutput, useArtifact, useUpdateArtifact, useArtifactFileObjectUrl, resolveArtifactIconFormat, useSourcesEnrichment, LoaderIcon, FileDownloadIcon, Label, Input, renderPluginBlock, useArtifactVersion, useChatCapabilities, useChatCapabilityEnabled, useChatOptInEnabled, useChatHost, useSessionPendingApprovals, tableToCsv, tableToXlsx, tableToMarkdown, DropdownMenu, DropdownMenuTrigger, StyledDropdownMenuContent, StyledDropdownMenuItem, useArtifactVersions, useClient, unwrapData, authFetch, getBearerHeadersForApi, EyeOpenIcon, EyeSlashIcon, useRestoreArtifactVersion, ZoomableImage, ChatImageLightbox, useDownloadArtifact, useArtifactFileBytes, useArtifactPreviewFileObjectUrl, useArtifactVersionPreviewFileObjectUrl, errorText, SpreadsheetIcon, FilePdfIcon, useOptionalWorkspaceContext, useAgentConnectionStatus, useArtifacts, useSession, useWorkspaceContext, useConversationDesktopStatus, isRequestHumanTool, appsKeys, unwrapDataDeep, useRouter, Images1Icon, ArrowUpIcon, VideoIcon, AudioIcon, useBrand, resolveBearerHeaders, subscribeSdkDarkMode, getSdkDarkMode, unwrap, useConnectRunner, useStartUserConnect, useUpsertGrant, useRevokeGrant, AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction, LayoutGrid1Icon, useCatalog, useInstalls, useWorkspaceSlug, buildTenantUrlAbsolute } from './chunk-
|
|
12
|
+
import { chatSidePanelSessionKey, Chart1Icon, useTemplatePreviewStore, useHasTemplatePreviewHost, useChatSidePanelStore, ChatHeader, ChatHeaderActions, useRightPane, getChatOverviewAgentStatus, useChatOverviewVisible, useConversationArtifacts, PENDING_CHART_TAB_PREFIX, CHART_TAB_PREFIX, AGENT_WORK_TAB_ID, AGENT_ROUTINES_TAB_ID, SOURCES_TAB_ID, TEMPLATE_TAB_ID, OutputsSection, ChainLink1Icon, ChatOverviewContent, COMPUTER_TAB_PREFIX, SourceRow, motion, MAX_CHAT_SIDE_PANEL_SESSIONS, DEFAULT_CHAT_SIDE_PANEL_SIZE, TableIcon } from './chunk-D6YKQJ5V.js';
|
|
13
|
+
import { dynamic, useChatStreamStore, useComposerStore, Message, Thinking, setPendingFiles, usePersonConfirmations, unshownPendingConfirmations, ConversationConfirmationCard, useLivePreviewUrl, ArrowRotateClockwiseIcon, useComputerFiles, useUploadComputerFile, CanvasWidget, isPlainTextLanguage, useUploadFile, COMPOSER_ID_MAIN, useContextWindowInfo, useIsCompacting, useQueuedMessages, VolumeFullIcon, WarningSignIcon, useComputer, csvTextToWorkbookJson, CSV_PREVIEW_MAX_ROWS, CopyButton, COMPOSER_ID_COPILOT, ModelIcon, modeToBrandRow, useBackDismiss, PdfViewer, brandLabel, Spinner } from './chunk-UUZ3ANIK.js';
|
|
14
|
+
import { Textarea, resolveChatHost, artifactFormatIcon, BookIcon, useAgentRoster, ShieldCheckIcon, useArtifactStore, useCanvasStore, useChatOverviewStore, setSdkConversationPath, setSdkDarkMode, AgentsProvider, PluginProvider, WorkspaceProvider, TooltipProvider, ChatHostProvider, getPersonConfirmation, isToolPart, getToolState, getToolName, getToolInput, sourceKind, extractDomain, CitationViewerContext, MarkdownRenderer, ConnectRunnerContext, usePathname, useChatSurfaceProvider, usePaneFocusStore, useAgentPanelStore, Tooltip, TooltipTrigger, TooltipContent, StudioDisplayIcon, WorldIcon, SlidesWideIcon, ArtifactActionsMenu, DotGrid1x3HorizontalTightIcon, ArrowsShowIcon, useKeyboardInset, ExclamationCircleIcon, getToolOutput, useArtifact, useUpdateArtifact, useArtifactFileObjectUrl, resolveArtifactIconFormat, useSourcesEnrichment, LoaderIcon, FileDownloadIcon, Label, Input, renderPluginBlock, useArtifactVersion, useChatCapabilities, useChatCapabilityEnabled, useChatOptInEnabled, useChatHost, useSessionPendingApprovals, tableToCsv, tableToXlsx, tableToMarkdown, DropdownMenu, DropdownMenuTrigger, StyledDropdownMenuContent, StyledDropdownMenuItem, useArtifactVersions, useClient, unwrapData, authFetch, getBearerHeadersForApi, EyeOpenIcon, EyeSlashIcon, useRestoreArtifactVersion, ZoomableImage, ChatImageLightbox, useDownloadArtifact, useArtifactFileBytes, useArtifactPreviewFileObjectUrl, useArtifactVersionPreviewFileObjectUrl, errorText, SpreadsheetIcon, FilePdfIcon, useOptionalWorkspaceContext, useAgentConnectionStatus, useArtifacts, useSession, useWorkspaceContext, useConversationDesktopStatus, isRequestHumanTool, appsKeys, unwrapDataDeep, useRouter, Images1Icon, ArrowUpIcon, VideoIcon, AudioIcon, useBrand, resolveBearerHeaders, subscribeSdkDarkMode, getSdkDarkMode, unwrap, useConnectRunner, useStartUserConnect, useUpsertGrant, useRevokeGrant, AlertDialog, AlertDialogContent, AlertDialogHeader, AlertDialogTitle, AlertDialogDescription, AlertDialogFooter, AlertDialogCancel, AlertDialogAction, LayoutGrid1Icon, useCatalog, useInstalls, useWorkspaceSlug, buildTenantUrlAbsolute } from './chunk-PNU2CDXK.js';
|
|
15
15
|
import { ChevronLeftIcon } from './chunk-CWAOLMFS.js';
|
|
16
16
|
import { Popover, PopoverTrigger, PopoverContent, Sheet, SheetContent, SheetHeader, SheetTitle, SheetDescription } from './chunk-RQSMCGBR.js';
|
|
17
|
-
import { MOBILE_BREAKPOINT, useIsMobile, I18nProvider, useTranslation } from './chunk-
|
|
17
|
+
import { MOBILE_BREAKPOINT, useIsMobile, I18nProvider, useTranslation } from './chunk-FVSSLEFN.js';
|
|
18
18
|
import './chunk-G4EXD5F3.js';
|
|
19
19
|
import { AppIcon, frontera_icon_default, PhotoIcon, Folder1Icon, FileTextIcon, describeToolRow, SquareArrowTopRightIcon, ClipboardIcon, getToolMeta, useStreamdownPlugins, AppIconFrame, MessageResponse } from './chunk-OBAC3B64.js';
|
|
20
20
|
import { Skeleton, Button, ScrollArea, ChevronDownMediumIcon, buttonVariants } from './chunk-UWKO24VT.js';
|
|
@@ -42397,7 +42397,7 @@ function SheetEditor({ content, onSave, readOnly = false }) {
|
|
|
42397
42397
|
);
|
|
42398
42398
|
}
|
|
42399
42399
|
var PdfDocumentViewInner = dynamic(
|
|
42400
|
-
() => import('./pdf-document-view-inner-
|
|
42400
|
+
() => import('./pdf-document-view-inner-3EGB6RKB.js'),
|
|
42401
42401
|
{
|
|
42402
42402
|
ssr: false,
|
|
42403
42403
|
loading: () => /* @__PURE__ */ jsx(ArtifactSkeleton, { format: "pdf" })
|
|
@@ -43216,7 +43216,7 @@ function HtmlDeckView({ content, inChat = false, versionSlot }) {
|
|
|
43216
43216
|
!present && inChat && /* @__PURE__ */ jsx(DeckEditPanel, { currentIndex: sel, currentHtml: slides[sel]?.html ?? "" })
|
|
43217
43217
|
] });
|
|
43218
43218
|
}
|
|
43219
|
-
var Inner = dynamic(() => import('./pdf-deck-view-inner-
|
|
43219
|
+
var Inner = dynamic(() => import('./pdf-deck-view-inner-3TG3EQ3B.js'), {
|
|
43220
43220
|
ssr: false,
|
|
43221
43221
|
loading: () => /* @__PURE__ */ jsx(ArtifactSkeleton, { format: "htmldeck" })
|
|
43222
43222
|
});
|
|
@@ -44100,135 +44100,11 @@ function constructFrom(date, value) {
|
|
|
44100
44100
|
return new Date(value);
|
|
44101
44101
|
}
|
|
44102
44102
|
|
|
44103
|
-
// ../../node_modules/date-fns/toDate.js
|
|
44104
|
-
function toDate(argument, context) {
|
|
44105
|
-
return constructFrom(argument, argument);
|
|
44106
|
-
}
|
|
44107
|
-
|
|
44108
|
-
// ../../node_modules/date-fns/_lib/defaultOptions.js
|
|
44109
|
-
var defaultOptions2 = {};
|
|
44110
|
-
function getDefaultOptions() {
|
|
44111
|
-
return defaultOptions2;
|
|
44112
|
-
}
|
|
44113
|
-
|
|
44114
|
-
// ../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
44115
|
-
function getTimezoneOffsetInMilliseconds(date) {
|
|
44116
|
-
const _date = toDate(date);
|
|
44117
|
-
const utcDate = new Date(
|
|
44118
|
-
Date.UTC(
|
|
44119
|
-
_date.getFullYear(),
|
|
44120
|
-
_date.getMonth(),
|
|
44121
|
-
_date.getDate(),
|
|
44122
|
-
_date.getHours(),
|
|
44123
|
-
_date.getMinutes(),
|
|
44124
|
-
_date.getSeconds(),
|
|
44125
|
-
_date.getMilliseconds()
|
|
44126
|
-
)
|
|
44127
|
-
);
|
|
44128
|
-
utcDate.setUTCFullYear(_date.getFullYear());
|
|
44129
|
-
return +date - +utcDate;
|
|
44130
|
-
}
|
|
44131
|
-
|
|
44132
|
-
// ../../node_modules/date-fns/_lib/normalizeDates.js
|
|
44133
|
-
function normalizeDates(context, ...dates) {
|
|
44134
|
-
const normalize4 = constructFrom.bind(
|
|
44135
|
-
null,
|
|
44136
|
-
context || dates.find((date) => typeof date === "object")
|
|
44137
|
-
);
|
|
44138
|
-
return dates.map(normalize4);
|
|
44139
|
-
}
|
|
44140
|
-
|
|
44141
|
-
// ../../node_modules/date-fns/compareAsc.js
|
|
44142
|
-
function compareAsc(dateLeft, dateRight) {
|
|
44143
|
-
const diff = +toDate(dateLeft) - +toDate(dateRight);
|
|
44144
|
-
if (diff < 0) return -1;
|
|
44145
|
-
else if (diff > 0) return 1;
|
|
44146
|
-
return diff;
|
|
44147
|
-
}
|
|
44148
|
-
|
|
44149
44103
|
// ../../node_modules/date-fns/constructNow.js
|
|
44150
44104
|
function constructNow(date) {
|
|
44151
44105
|
return constructFrom(date, Date.now());
|
|
44152
44106
|
}
|
|
44153
44107
|
|
|
44154
|
-
// ../../node_modules/date-fns/differenceInCalendarMonths.js
|
|
44155
|
-
function differenceInCalendarMonths(laterDate, earlierDate, options) {
|
|
44156
|
-
const [laterDate_, earlierDate_] = normalizeDates(
|
|
44157
|
-
options?.in,
|
|
44158
|
-
laterDate,
|
|
44159
|
-
earlierDate
|
|
44160
|
-
);
|
|
44161
|
-
const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();
|
|
44162
|
-
const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();
|
|
44163
|
-
return yearsDiff * 12 + monthsDiff;
|
|
44164
|
-
}
|
|
44165
|
-
|
|
44166
|
-
// ../../node_modules/date-fns/_lib/getRoundingMethod.js
|
|
44167
|
-
function getRoundingMethod(method) {
|
|
44168
|
-
return (number) => {
|
|
44169
|
-
const round = Math.trunc;
|
|
44170
|
-
const result = round(number);
|
|
44171
|
-
return result === 0 ? 0 : result;
|
|
44172
|
-
};
|
|
44173
|
-
}
|
|
44174
|
-
|
|
44175
|
-
// ../../node_modules/date-fns/differenceInMilliseconds.js
|
|
44176
|
-
function differenceInMilliseconds(laterDate, earlierDate) {
|
|
44177
|
-
return +toDate(laterDate) - +toDate(earlierDate);
|
|
44178
|
-
}
|
|
44179
|
-
|
|
44180
|
-
// ../../node_modules/date-fns/endOfDay.js
|
|
44181
|
-
function endOfDay(date, options) {
|
|
44182
|
-
const _date = toDate(date);
|
|
44183
|
-
_date.setHours(23, 59, 59, 999);
|
|
44184
|
-
return _date;
|
|
44185
|
-
}
|
|
44186
|
-
|
|
44187
|
-
// ../../node_modules/date-fns/endOfMonth.js
|
|
44188
|
-
function endOfMonth(date, options) {
|
|
44189
|
-
const _date = toDate(date);
|
|
44190
|
-
const month = _date.getMonth();
|
|
44191
|
-
_date.setFullYear(_date.getFullYear(), month + 1, 0);
|
|
44192
|
-
_date.setHours(23, 59, 59, 999);
|
|
44193
|
-
return _date;
|
|
44194
|
-
}
|
|
44195
|
-
|
|
44196
|
-
// ../../node_modules/date-fns/isLastDayOfMonth.js
|
|
44197
|
-
function isLastDayOfMonth(date, options) {
|
|
44198
|
-
const _date = toDate(date);
|
|
44199
|
-
return +endOfDay(_date) === +endOfMonth(_date);
|
|
44200
|
-
}
|
|
44201
|
-
|
|
44202
|
-
// ../../node_modules/date-fns/differenceInMonths.js
|
|
44203
|
-
function differenceInMonths(laterDate, earlierDate, options) {
|
|
44204
|
-
const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(
|
|
44205
|
-
options?.in,
|
|
44206
|
-
laterDate,
|
|
44207
|
-
laterDate,
|
|
44208
|
-
earlierDate
|
|
44209
|
-
);
|
|
44210
|
-
const sign = compareAsc(workingLaterDate, earlierDate_);
|
|
44211
|
-
const difference = Math.abs(
|
|
44212
|
-
differenceInCalendarMonths(workingLaterDate, earlierDate_)
|
|
44213
|
-
);
|
|
44214
|
-
if (difference < 1) return 0;
|
|
44215
|
-
if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)
|
|
44216
|
-
workingLaterDate.setDate(30);
|
|
44217
|
-
workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);
|
|
44218
|
-
let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;
|
|
44219
|
-
if (isLastDayOfMonth(laterDate_) && difference === 1 && compareAsc(laterDate_, earlierDate_) === 1) {
|
|
44220
|
-
isLastMonthNotFull = false;
|
|
44221
|
-
}
|
|
44222
|
-
const result = sign * (difference - +isLastMonthNotFull);
|
|
44223
|
-
return result === 0 ? 0 : result;
|
|
44224
|
-
}
|
|
44225
|
-
|
|
44226
|
-
// ../../node_modules/date-fns/differenceInSeconds.js
|
|
44227
|
-
function differenceInSeconds(laterDate, earlierDate, options) {
|
|
44228
|
-
const diff = differenceInMilliseconds(laterDate, earlierDate) / 1e3;
|
|
44229
|
-
return getRoundingMethod()(diff);
|
|
44230
|
-
}
|
|
44231
|
-
|
|
44232
44108
|
// ../../node_modules/date-fns/locale/en-US/_lib/formatDistance.js
|
|
44233
44109
|
var formatDistanceLocale = {
|
|
44234
44110
|
lessThanXSeconds: {
|
|
@@ -44738,6 +44614,130 @@ var enUS = {
|
|
|
44738
44614
|
}
|
|
44739
44615
|
};
|
|
44740
44616
|
|
|
44617
|
+
// ../../node_modules/date-fns/_lib/defaultOptions.js
|
|
44618
|
+
var defaultOptions2 = {};
|
|
44619
|
+
function getDefaultOptions() {
|
|
44620
|
+
return defaultOptions2;
|
|
44621
|
+
}
|
|
44622
|
+
|
|
44623
|
+
// ../../node_modules/date-fns/toDate.js
|
|
44624
|
+
function toDate(argument, context) {
|
|
44625
|
+
return constructFrom(argument, argument);
|
|
44626
|
+
}
|
|
44627
|
+
|
|
44628
|
+
// ../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
44629
|
+
function getTimezoneOffsetInMilliseconds(date) {
|
|
44630
|
+
const _date = toDate(date);
|
|
44631
|
+
const utcDate = new Date(
|
|
44632
|
+
Date.UTC(
|
|
44633
|
+
_date.getFullYear(),
|
|
44634
|
+
_date.getMonth(),
|
|
44635
|
+
_date.getDate(),
|
|
44636
|
+
_date.getHours(),
|
|
44637
|
+
_date.getMinutes(),
|
|
44638
|
+
_date.getSeconds(),
|
|
44639
|
+
_date.getMilliseconds()
|
|
44640
|
+
)
|
|
44641
|
+
);
|
|
44642
|
+
utcDate.setUTCFullYear(_date.getFullYear());
|
|
44643
|
+
return +date - +utcDate;
|
|
44644
|
+
}
|
|
44645
|
+
|
|
44646
|
+
// ../../node_modules/date-fns/_lib/normalizeDates.js
|
|
44647
|
+
function normalizeDates(context, ...dates) {
|
|
44648
|
+
const normalize4 = constructFrom.bind(
|
|
44649
|
+
null,
|
|
44650
|
+
context || dates.find((date) => typeof date === "object")
|
|
44651
|
+
);
|
|
44652
|
+
return dates.map(normalize4);
|
|
44653
|
+
}
|
|
44654
|
+
|
|
44655
|
+
// ../../node_modules/date-fns/compareAsc.js
|
|
44656
|
+
function compareAsc(dateLeft, dateRight) {
|
|
44657
|
+
const diff = +toDate(dateLeft) - +toDate(dateRight);
|
|
44658
|
+
if (diff < 0) return -1;
|
|
44659
|
+
else if (diff > 0) return 1;
|
|
44660
|
+
return diff;
|
|
44661
|
+
}
|
|
44662
|
+
|
|
44663
|
+
// ../../node_modules/date-fns/differenceInCalendarMonths.js
|
|
44664
|
+
function differenceInCalendarMonths(laterDate, earlierDate, options) {
|
|
44665
|
+
const [laterDate_, earlierDate_] = normalizeDates(
|
|
44666
|
+
options?.in,
|
|
44667
|
+
laterDate,
|
|
44668
|
+
earlierDate
|
|
44669
|
+
);
|
|
44670
|
+
const yearsDiff = laterDate_.getFullYear() - earlierDate_.getFullYear();
|
|
44671
|
+
const monthsDiff = laterDate_.getMonth() - earlierDate_.getMonth();
|
|
44672
|
+
return yearsDiff * 12 + monthsDiff;
|
|
44673
|
+
}
|
|
44674
|
+
|
|
44675
|
+
// ../../node_modules/date-fns/endOfDay.js
|
|
44676
|
+
function endOfDay(date, options) {
|
|
44677
|
+
const _date = toDate(date);
|
|
44678
|
+
_date.setHours(23, 59, 59, 999);
|
|
44679
|
+
return _date;
|
|
44680
|
+
}
|
|
44681
|
+
|
|
44682
|
+
// ../../node_modules/date-fns/endOfMonth.js
|
|
44683
|
+
function endOfMonth(date, options) {
|
|
44684
|
+
const _date = toDate(date);
|
|
44685
|
+
const month = _date.getMonth();
|
|
44686
|
+
_date.setFullYear(_date.getFullYear(), month + 1, 0);
|
|
44687
|
+
_date.setHours(23, 59, 59, 999);
|
|
44688
|
+
return _date;
|
|
44689
|
+
}
|
|
44690
|
+
|
|
44691
|
+
// ../../node_modules/date-fns/isLastDayOfMonth.js
|
|
44692
|
+
function isLastDayOfMonth(date, options) {
|
|
44693
|
+
const _date = toDate(date);
|
|
44694
|
+
return +endOfDay(_date) === +endOfMonth(_date);
|
|
44695
|
+
}
|
|
44696
|
+
|
|
44697
|
+
// ../../node_modules/date-fns/differenceInMonths.js
|
|
44698
|
+
function differenceInMonths(laterDate, earlierDate, options) {
|
|
44699
|
+
const [laterDate_, workingLaterDate, earlierDate_] = normalizeDates(
|
|
44700
|
+
options?.in,
|
|
44701
|
+
laterDate,
|
|
44702
|
+
laterDate,
|
|
44703
|
+
earlierDate
|
|
44704
|
+
);
|
|
44705
|
+
const sign = compareAsc(workingLaterDate, earlierDate_);
|
|
44706
|
+
const difference = Math.abs(
|
|
44707
|
+
differenceInCalendarMonths(workingLaterDate, earlierDate_)
|
|
44708
|
+
);
|
|
44709
|
+
if (difference < 1) return 0;
|
|
44710
|
+
if (workingLaterDate.getMonth() === 1 && workingLaterDate.getDate() > 27)
|
|
44711
|
+
workingLaterDate.setDate(30);
|
|
44712
|
+
workingLaterDate.setMonth(workingLaterDate.getMonth() - sign * difference);
|
|
44713
|
+
let isLastMonthNotFull = compareAsc(workingLaterDate, earlierDate_) === -sign;
|
|
44714
|
+
if (isLastDayOfMonth(laterDate_) && difference === 1 && compareAsc(laterDate_, earlierDate_) === 1) {
|
|
44715
|
+
isLastMonthNotFull = false;
|
|
44716
|
+
}
|
|
44717
|
+
const result = sign * (difference - +isLastMonthNotFull);
|
|
44718
|
+
return result === 0 ? 0 : result;
|
|
44719
|
+
}
|
|
44720
|
+
|
|
44721
|
+
// ../../node_modules/date-fns/_lib/getRoundingMethod.js
|
|
44722
|
+
function getRoundingMethod(method) {
|
|
44723
|
+
return (number) => {
|
|
44724
|
+
const round = Math.trunc;
|
|
44725
|
+
const result = round(number);
|
|
44726
|
+
return result === 0 ? 0 : result;
|
|
44727
|
+
};
|
|
44728
|
+
}
|
|
44729
|
+
|
|
44730
|
+
// ../../node_modules/date-fns/differenceInMilliseconds.js
|
|
44731
|
+
function differenceInMilliseconds(laterDate, earlierDate) {
|
|
44732
|
+
return +toDate(laterDate) - +toDate(earlierDate);
|
|
44733
|
+
}
|
|
44734
|
+
|
|
44735
|
+
// ../../node_modules/date-fns/differenceInSeconds.js
|
|
44736
|
+
function differenceInSeconds(laterDate, earlierDate, options) {
|
|
44737
|
+
const diff = differenceInMilliseconds(laterDate, earlierDate) / 1e3;
|
|
44738
|
+
return getRoundingMethod()(diff);
|
|
44739
|
+
}
|
|
44740
|
+
|
|
44741
44741
|
// ../../node_modules/date-fns/formatDistance.js
|
|
44742
44742
|
function formatDistance2(laterDate, earlierDate, options) {
|
|
44743
44743
|
const defaultOptions3 = getDefaultOptions();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { Sheet, SheetContent, SheetHeader, SheetTitle, Popover, PopoverTrigger, PopoverContent, MagnifyingGlassIcon } from './chunk-RQSMCGBR.js';
|
|
3
|
-
import { useIsMobile, useTranslation } from './chunk-
|
|
3
|
+
import { useIsMobile, useTranslation } from './chunk-FVSSLEFN.js';
|
|
4
4
|
import { CrossMediumIcon } from './chunk-37WYG6VG.js';
|
|
5
5
|
import { AgentAvatar } from './chunk-RCWVJD7G.js';
|
|
6
6
|
import { cn, Checkmark1Icon } from './chunk-LGVMMBL3.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { requestPaneFocus, useArtifacts, usePlugins, useCanvasStore, useArtifactStore, useChatOverviewStore, useSourcesEnrichment, sourceKind, useCitationViewer, resolveSourceDisplay, extractDomain, useCitedDocument, canvasId, StudioDisplayIcon, LayoutDashboardIcon, useAgentPanelStore, SourceFavicon, dedup, useArtifactFileObjectUrl, resolveArtifactIconFormat, artifactFormatIcon, avatarMotionForStream, AGENT_AVATAR_SIZE, getFileCategory, FileThumbnail, formatFileSize, usePathname, artifactFormatSubtitle, artifactCategory, Input, MobileScreenSheet, TooltipTrigger, Tooltip, useChatCapabilities, TooltipContent, processMessageParts, GridSpinner, PanelEdgeRing, ArtifactActionsMenu, DotGrid1x3HorizontalTightIcon, extractCitationsFromSteps, resolvePluginLanguage, getMessageDisplayTimestampValue } from './chunk-
|
|
2
|
+
import { requestPaneFocus, useArtifacts, usePlugins, useCanvasStore, useArtifactStore, useChatOverviewStore, useSourcesEnrichment, sourceKind, useCitationViewer, resolveSourceDisplay, extractDomain, useCitedDocument, canvasId, StudioDisplayIcon, LayoutDashboardIcon, useAgentPanelStore, SourceFavicon, dedup, useArtifactFileObjectUrl, resolveArtifactIconFormat, artifactFormatIcon, avatarMotionForStream, AGENT_AVATAR_SIZE, getFileCategory, FileThumbnail, formatFileSize, usePathname, artifactFormatSubtitle, artifactCategory, Input, MobileScreenSheet, TooltipTrigger, Tooltip, useChatCapabilities, TooltipContent, processMessageParts, GridSpinner, PanelEdgeRing, ArtifactActionsMenu, DotGrid1x3HorizontalTightIcon, extractCitationsFromSteps, resolvePluginLanguage, getMessageDisplayTimestampValue } from './chunk-PNU2CDXK.js';
|
|
3
3
|
import { MagnifyingGlassIcon, Popover, PopoverTrigger, PopoverContent, Sheet, SheetContent, SheetHeader, SheetTitle } from './chunk-RQSMCGBR.js';
|
|
4
|
-
import { useTranslation, useIsMobile } from './chunk-
|
|
4
|
+
import { useTranslation, useIsMobile } from './chunk-FVSSLEFN.js';
|
|
5
5
|
import { Collapsible, CollapsibleTrigger, CollapsibleContent, Shimmer, HoverCard, HoverCardTrigger, HoverCardContent } from './chunk-OBAC3B64.js';
|
|
6
6
|
import { ChevronDownMediumIcon, ScrollArea, Skeleton, Button } from './chunk-UWKO24VT.js';
|
|
7
7
|
import { Dialog, DialogContent, DialogHeader, DialogTitle, CrossMediumIcon } from './chunk-37WYG6VG.js';
|