@flamingo-stack/openframe-frontend-core 0.0.459 → 0.0.460-snapshot.20260721124036

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.
Files changed (92) hide show
  1. package/dist/{chunk-6XYHSDCL.cjs → chunk-2T5MXXTK.cjs} +31 -31
  2. package/dist/{chunk-6XYHSDCL.cjs.map → chunk-2T5MXXTK.cjs.map} +1 -1
  3. package/dist/{chunk-O5E7ZWHK.cjs → chunk-3H5XD5UD.cjs} +7 -7
  4. package/dist/{chunk-O5E7ZWHK.cjs.map → chunk-3H5XD5UD.cjs.map} +1 -1
  5. package/dist/{chunk-AS5B343N.js → chunk-4TKGFC7I.js} +2 -2
  6. package/dist/{chunk-DMU3BSPR.cjs → chunk-5D3UPZIM.cjs} +59 -59
  7. package/dist/{chunk-DMU3BSPR.cjs.map → chunk-5D3UPZIM.cjs.map} +1 -1
  8. package/dist/{chunk-XVHNAMAL.cjs → chunk-6IA5TD7O.cjs} +15 -15
  9. package/dist/{chunk-XVHNAMAL.cjs.map → chunk-6IA5TD7O.cjs.map} +1 -1
  10. package/dist/{chunk-MRKRE54X.js → chunk-7NUTHK3A.js} +4 -4
  11. package/dist/{chunk-WVC627C7.cjs → chunk-BFEMQ2XC.cjs} +26 -26
  12. package/dist/{chunk-WVC627C7.cjs.map → chunk-BFEMQ2XC.cjs.map} +1 -1
  13. package/dist/{chunk-GSKLTMIY.js → chunk-CDARBFPL.js} +2 -2
  14. package/dist/{chunk-JGSBLQLE.js → chunk-EXSLPPEY.js} +4 -4
  15. package/dist/{chunk-X5TAAOE7.cjs → chunk-FQKLIGV3.cjs} +62 -62
  16. package/dist/{chunk-X5TAAOE7.cjs.map → chunk-FQKLIGV3.cjs.map} +1 -1
  17. package/dist/{chunk-JWXOZRZ6.js → chunk-FYIX7RTZ.js} +4 -4
  18. package/dist/{chunk-CBNHSXTR.js → chunk-HHKLSJ5Y.js} +2 -2
  19. package/dist/{chunk-A2RF7ZG6.cjs → chunk-HWJWRQGV.cjs} +5 -5
  20. package/dist/{chunk-A2RF7ZG6.cjs.map → chunk-HWJWRQGV.cjs.map} +1 -1
  21. package/dist/{chunk-KW33TBQX.js → chunk-IQU6ZIZR.js} +2 -2
  22. package/dist/{chunk-TP5MVWQ2.js → chunk-KUVFE5WC.js} +665 -625
  23. package/dist/chunk-KUVFE5WC.js.map +1 -0
  24. package/dist/{chunk-IG4QVZSP.cjs → chunk-NFILBHXY.cjs} +9 -9
  25. package/dist/{chunk-IG4QVZSP.cjs.map → chunk-NFILBHXY.cjs.map} +1 -1
  26. package/dist/{chunk-EFGFAVOI.js → chunk-PLJSN3SR.js} +4 -4
  27. package/dist/{chunk-T2EBDVMZ.cjs → chunk-QLLXI554.cjs} +26 -26
  28. package/dist/{chunk-T2EBDVMZ.cjs.map → chunk-QLLXI554.cjs.map} +1 -1
  29. package/dist/{chunk-LDVQIOS7.js → chunk-RTLYVFFQ.js} +2 -2
  30. package/dist/{chunk-RTQ57HC5.js → chunk-S2KZZVJF.js} +2 -2
  31. package/dist/{chunk-YFPZLP63.cjs → chunk-TFVBIOSB.cjs} +771 -731
  32. package/dist/chunk-TFVBIOSB.cjs.map +1 -0
  33. package/dist/{chunk-OFPHMNRL.cjs → chunk-UNGRKZ65.cjs} +11 -11
  34. package/dist/{chunk-OFPHMNRL.cjs.map → chunk-UNGRKZ65.cjs.map} +1 -1
  35. package/dist/{chunk-OJ5ROJSS.cjs → chunk-WHXYDEAM.cjs} +37 -37
  36. package/dist/{chunk-OJ5ROJSS.cjs.map → chunk-WHXYDEAM.cjs.map} +1 -1
  37. package/dist/{chunk-Q74TSDZY.js → chunk-ZYHO7WAW.js} +2 -2
  38. package/dist/components/case-studies/index.cjs +8 -8
  39. package/dist/components/case-studies/index.js +2 -2
  40. package/dist/components/chat/guide-welcome.d.ts +5 -1
  41. package/dist/components/chat/guide-welcome.d.ts.map +1 -1
  42. package/dist/components/chat/index.cjs +2 -2
  43. package/dist/components/chat/index.js +1 -1
  44. package/dist/components/chat/mingo-welcome.d.ts +5 -1
  45. package/dist/components/chat/mingo-welcome.d.ts.map +1 -1
  46. package/dist/components/chat/quick-action-wall.d.ts +16 -6
  47. package/dist/components/chat/quick-action-wall.d.ts.map +1 -1
  48. package/dist/components/contact/index.cjs +3 -3
  49. package/dist/components/contact/index.js +2 -2
  50. package/dist/components/docs/index.cjs +5 -5
  51. package/dist/components/docs/index.js +4 -4
  52. package/dist/components/embeds/index.cjs +3 -3
  53. package/dist/components/embeds/index.js +2 -2
  54. package/dist/components/faq/index.cjs +3 -3
  55. package/dist/components/faq/index.js +2 -2
  56. package/dist/components/features/index.cjs +2 -2
  57. package/dist/components/features/index.js +1 -1
  58. package/dist/components/help-center-pages/index.cjs +20 -20
  59. package/dist/components/help-center-pages/index.js +11 -11
  60. package/dist/components/index.cjs +129 -129
  61. package/dist/components/index.js +9 -9
  62. package/dist/components/navigation/index.cjs +2 -2
  63. package/dist/components/navigation/index.js +1 -1
  64. package/dist/components/onboarding-guides/index.cjs +5 -5
  65. package/dist/components/onboarding-guides/index.js +4 -4
  66. package/dist/components/related-content/index.cjs +3 -3
  67. package/dist/components/related-content/index.js +2 -2
  68. package/dist/components/tickets/index.cjs +5 -5
  69. package/dist/components/tickets/index.js +4 -4
  70. package/dist/components/ui/index.cjs +2 -2
  71. package/dist/components/ui/index.js +1 -1
  72. package/dist/index.cjs +2 -2
  73. package/dist/index.js +1 -1
  74. package/package.json +1 -1
  75. package/src/components/chat/embeddable-chat.tsx +6 -0
  76. package/src/components/chat/guide-welcome.tsx +6 -0
  77. package/src/components/chat/mingo-welcome.tsx +6 -0
  78. package/src/components/chat/quick-action-wall.tsx +99 -11
  79. package/src/stories/QuickActionWall.stories.tsx +89 -0
  80. package/dist/chunk-TP5MVWQ2.js.map +0 -1
  81. package/dist/chunk-YFPZLP63.cjs.map +0 -1
  82. /package/dist/{chunk-AS5B343N.js.map → chunk-4TKGFC7I.js.map} +0 -0
  83. /package/dist/{chunk-MRKRE54X.js.map → chunk-7NUTHK3A.js.map} +0 -0
  84. /package/dist/{chunk-GSKLTMIY.js.map → chunk-CDARBFPL.js.map} +0 -0
  85. /package/dist/{chunk-JGSBLQLE.js.map → chunk-EXSLPPEY.js.map} +0 -0
  86. /package/dist/{chunk-JWXOZRZ6.js.map → chunk-FYIX7RTZ.js.map} +0 -0
  87. /package/dist/{chunk-CBNHSXTR.js.map → chunk-HHKLSJ5Y.js.map} +0 -0
  88. /package/dist/{chunk-KW33TBQX.js.map → chunk-IQU6ZIZR.js.map} +0 -0
  89. /package/dist/{chunk-EFGFAVOI.js.map → chunk-PLJSN3SR.js.map} +0 -0
  90. /package/dist/{chunk-LDVQIOS7.js.map → chunk-RTLYVFFQ.js.map} +0 -0
  91. /package/dist/{chunk-RTQ57HC5.js.map → chunk-S2KZZVJF.js.map} +0 -0
  92. /package/dist/{chunk-Q74TSDZY.js.map → chunk-ZYHO7WAW.js.map} +0 -0
@@ -7056,6 +7056,10 @@ function interleave(a, b) {
7056
7056
  return out;
7057
7057
  }
7058
7058
  var DEFAULT_MIN_CHIPS_PER_ROW = 14;
7059
+ var MIN_CHIP_PX = 72;
7060
+ var ADAPTIVE_PAD_MARGIN = 2;
7061
+ var MIN_ADAPTIVE_PAD = 4;
7062
+ var AGENT_MAX_ROWS = 2;
7059
7063
  function QuickActionWall({
7060
7064
  chips,
7061
7065
  theme,
@@ -7073,13 +7077,26 @@ function QuickActionWall({
7073
7077
  copyGap,
7074
7078
  minChips,
7075
7079
  rows,
7080
+ agentSlug,
7076
7081
  loading = false,
7077
7082
  skeletonCount = 24,
7078
7083
  className,
7079
7084
  contentClassName,
7080
7085
  sync
7081
7086
  }) {
7082
- const padTarget = minChips ?? (rows ? rows * DEFAULT_MIN_CHIPS_PER_ROW : void 0);
7087
+ const brickRef = React13.useRef(null);
7088
+ const [brickWidth, setBrickWidth] = React13.useState(0);
7089
+ React13.useEffect(() => {
7090
+ const el = brickRef.current;
7091
+ if (!el || typeof ResizeObserver === "undefined") return;
7092
+ const ro = new ResizeObserver((entries) => {
7093
+ const w = entries[0]?.contentRect.width ?? 0;
7094
+ if (w > 0) setBrickWidth(w);
7095
+ });
7096
+ ro.observe(el);
7097
+ return () => ro.disconnect();
7098
+ }, []);
7099
+ const padTarget = rows ? void 0 : minChips;
7083
7100
  const track = React13.useMemo(() => {
7084
7101
  if (!padTarget || chips.length === 0 || chips.length >= padTarget) return chips;
7085
7102
  const repeats = Math.ceil(padTarget / chips.length);
@@ -7110,9 +7127,26 @@ function QuickActionWall({
7110
7127
  const renderChips = () => loading ? renderSkeletons(skeletonCount) : renderChipNodes(track);
7111
7128
  const gap = copyGap ?? "var(--spacing-system-xsf)";
7112
7129
  if (rows && rows > 0) {
7113
- const rowLists = Array.from({ length: rows }, (_, r) => track.filter((_2, i) => i % rows === r));
7114
- const skelPerRow = Math.ceil(skeletonCount / rows);
7115
- return /* @__PURE__ */ jsxs29("div", { className: cn("relative flex flex-col overflow-hidden", className), style: { gap }, children: [
7130
+ const agentCapped = agentSlug === "fae" || agentSlug === "mingo";
7131
+ const rowCap = agentCapped ? Math.min(rows, AGENT_MAX_ROWS) : rows;
7132
+ const dataRows = agentCapped ? Math.min(Math.max(1, Math.ceil(chips.length / DEFAULT_MIN_CHIPS_PER_ROW)), rowCap) : rows;
7133
+ const stackRows = loading ? rowCap : dataRows;
7134
+ const adaptivePerRow = brickWidth > 0 ? Math.min(
7135
+ Math.max(Math.ceil(brickWidth / MIN_CHIP_PX) + ADAPTIVE_PAD_MARGIN, MIN_ADAPTIVE_PAD),
7136
+ DEFAULT_MIN_CHIPS_PER_ROW
7137
+ ) : DEFAULT_MIN_CHIPS_PER_ROW;
7138
+ const perRowTarget = minChips ? Math.ceil(minChips / stackRows) : adaptivePerRow;
7139
+ const rowLists = Array.from({ length: stackRows }, (_, r) => {
7140
+ const base = chips.filter((_2, i) => i % stackRows === r);
7141
+ if (base.length === 0 || base.length >= perRowTarget) return base;
7142
+ const repeats = Math.ceil(perRowTarget / base.length);
7143
+ return Array.from(
7144
+ { length: repeats },
7145
+ (_2, rep) => rep === 0 ? base : base.map((chip) => ({ ...chip, id: `${chip.id}__r${rep}` }))
7146
+ ).flat();
7147
+ });
7148
+ const skelPerRow = Math.ceil(skeletonCount / stackRows);
7149
+ return /* @__PURE__ */ jsxs29("div", { ref: brickRef, className: cn("relative flex flex-col overflow-hidden", className), style: { gap }, children: [
7116
7150
  rowLists.map((list, r) => /* @__PURE__ */ jsx35(
7117
7151
  MarqueeWall,
7118
7152
  {
@@ -7785,6 +7819,7 @@ function MingoWelcome({
7785
7819
  loadError = false,
7786
7820
  onRetry,
7787
7821
  onStartGuideChat,
7822
+ agentSlug = "mingo",
7788
7823
  className
7789
7824
  }) {
7790
7825
  const heading = title ?? "Hey, I'm Mingo";
@@ -7903,6 +7938,7 @@ function MingoWelcome({
7903
7938
  onHoverStart: () => onQuickActionHover?.(action),
7904
7939
  onHoverEnd: () => onQuickActionHoverEnd?.()
7905
7940
  })),
7941
+ agentSlug,
7906
7942
  rows: 4,
7907
7943
  pauseOnHover: true,
7908
7944
  dragScroll: true,
@@ -7934,6 +7970,7 @@ function GuideWelcome({
7934
7970
  onQuickAction,
7935
7971
  onQuickActionHover,
7936
7972
  onQuickActionHoverEnd,
7973
+ agentSlug,
7937
7974
  children,
7938
7975
  className
7939
7976
  }) {
@@ -8005,6 +8042,7 @@ function GuideWelcome({
8005
8042
  QuickActionWall,
8006
8043
  {
8007
8044
  chips: chipItems,
8045
+ agentSlug,
8008
8046
  rows: 4,
8009
8047
  pauseOnHover: true,
8010
8048
  dragScroll: true,
@@ -8187,7 +8225,7 @@ import * as React24 from "react";
8187
8225
 
8188
8226
  // src/components/ui/modal-v2.tsx
8189
8227
  import * as React23 from "react";
8190
- import { useEffect as useEffect11, useState as useState17 } from "react";
8228
+ import { useEffect as useEffect12, useState as useState18 } from "react";
8191
8229
  import { usePreventScroll } from "@react-aria/overlays";
8192
8230
  init_cn();
8193
8231
  import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
@@ -8195,8 +8233,8 @@ var ANIMATION_DURATION = 200;
8195
8233
  var ModalContext = React23.createContext({});
8196
8234
  var Modal = React23.forwardRef(
8197
8235
  ({ isOpen, onClose, children, className }, ref) => {
8198
- const [isMounted, setIsMounted] = useState17(isOpen);
8199
- useEffect11(() => {
8236
+ const [isMounted, setIsMounted] = useState18(isOpen);
8237
+ useEffect12(() => {
8200
8238
  if (isOpen) {
8201
8239
  setIsMounted(true);
8202
8240
  return;
@@ -8205,7 +8243,7 @@ var Modal = React23.forwardRef(
8205
8243
  return () => clearTimeout(timeout);
8206
8244
  }, [isOpen]);
8207
8245
  usePreventScroll({ isDisabled: !isOpen });
8208
- useEffect11(() => {
8246
+ useEffect12(() => {
8209
8247
  const handleKeyDown = (event) => {
8210
8248
  if (event.key === "Escape") {
8211
8249
  onClose();
@@ -8745,7 +8783,7 @@ function ChatPanelHeader({
8745
8783
  import * as React29 from "react";
8746
8784
 
8747
8785
  // src/components/chat/chat-attachment-bar.tsx
8748
- import { useEffect as useEffect14, useRef as useRef13, useState as useState20 } from "react";
8786
+ import { useEffect as useEffect15, useRef as useRef14, useState as useState21 } from "react";
8749
8787
  init_button2();
8750
8788
  init_cn();
8751
8789
 
@@ -8823,7 +8861,7 @@ function ChatAttachmentAddButton({
8823
8861
  disabled = false,
8824
8862
  size: size2 = "default"
8825
8863
  }) {
8826
- const fileInputRef = useRef13(null);
8864
+ const fileInputRef = useRef14(null);
8827
8865
  const compact = size2 === "compact";
8828
8866
  const boxClass = compact ? "h-6 w-6" : "h-7 w-7";
8829
8867
  if (!attachmentsEnabled) {
@@ -8962,8 +9000,8 @@ function extLabel(fileName) {
8962
9000
  return fileName.slice(dot + 1, dot + 4).toLowerCase();
8963
9001
  }
8964
9002
  function useObjectUrl(file) {
8965
- const [url, setUrl] = useState20(null);
8966
- useEffect14(() => {
9003
+ const [url, setUrl] = useState21(null);
9004
+ useEffect15(() => {
8967
9005
  if (!file) {
8968
9006
  setUrl(null);
8969
9007
  return;
@@ -9368,7 +9406,7 @@ function ChatArchivePage(props) {
9368
9406
  // src/components/chat/chat-sidebar.tsx
9369
9407
  init_cn();
9370
9408
  init_button2();
9371
- import { forwardRef as forwardRef20, useRef as useRef14, useEffect as useEffect15 } from "react";
9409
+ import { forwardRef as forwardRef20, useRef as useRef15, useEffect as useEffect16 } from "react";
9372
9410
 
9373
9411
  // src/components/chat/chat-sidebar-skeleton.tsx
9374
9412
  init_cn();
@@ -9484,13 +9522,13 @@ DialogListItem.displayName = "DialogListItem";
9484
9522
  var ChatSidebar = forwardRef20(
9485
9523
  ({ className, onNewChat, onDialogSelect, dialogs = [], activeDialogId, isLoading, isCreatingDialog, children, hasNextPage, isFetchingNextPage, onLoadMore, ...props }, ref) => {
9486
9524
  const showEmptyState = dialogs.length === 0 && !children;
9487
- const scrollContainerRef = useRef14(null);
9488
- const loadMoreRef = useRef14(null);
9489
- const onLoadMoreRef = useRef14(onLoadMore);
9525
+ const scrollContainerRef = useRef15(null);
9526
+ const loadMoreRef = useRef15(null);
9527
+ const onLoadMoreRef = useRef15(onLoadMore);
9490
9528
  onLoadMoreRef.current = onLoadMore;
9491
- const isFetchingRef = useRef14(isFetchingNextPage);
9529
+ const isFetchingRef = useRef15(isFetchingNextPage);
9492
9530
  isFetchingRef.current = isFetchingNextPage;
9493
- useEffect15(() => {
9531
+ useEffect16(() => {
9494
9532
  const scrollContainer = scrollContainerRef.current;
9495
9533
  const loadMoreElement = loadMoreRef.current;
9496
9534
  if (!scrollContainer || !loadMoreElement || !hasNextPage) return;
@@ -9940,7 +9978,7 @@ function BlogImagePlaceholder({
9940
9978
  }
9941
9979
 
9942
9980
  // src/components/chat/entity-cards/entity-portrait-card.tsx
9943
- import { useEffect as useEffect16, useState as useState22 } from "react";
9981
+ import { useEffect as useEffect17, useState as useState23 } from "react";
9944
9982
 
9945
9983
  // src/components/ui/card.tsx
9946
9984
  init_cn();
@@ -10101,9 +10139,9 @@ function StatusBadge({
10101
10139
  }
10102
10140
 
10103
10141
  // src/components/chat/entity-cards/use-cover-image-fallback.ts
10104
- import { useCallback as useCallback12, useState as useState21 } from "react";
10142
+ import { useCallback as useCallback12, useState as useState22 } from "react";
10105
10143
  function useCoverImageFallback(imageUrl, placeholderUrl) {
10106
- const [failed, setFailed] = useState21(() => /* @__PURE__ */ new Set());
10144
+ const [failed, setFailed] = useState22(() => /* @__PURE__ */ new Set());
10107
10145
  const src = imageUrl && !failed.has(imageUrl) ? imageUrl : placeholderUrl && !failed.has(placeholderUrl) ? placeholderUrl : null;
10108
10146
  const onError = useCallback12(() => {
10109
10147
  if (!src) return;
@@ -10134,8 +10172,8 @@ function EntityPortraitCard({
10134
10172
  className
10135
10173
  }) {
10136
10174
  const { src, onError: onMediaError } = useCoverImageFallback(imageUrl, placeholderUrl);
10137
- const [isWide, setIsWide] = useState22(null);
10138
- useEffect16(() => {
10175
+ const [isWide, setIsWide] = useState23(null);
10176
+ useEffect17(() => {
10139
10177
  setIsWide(null);
10140
10178
  }, [src]);
10141
10179
  const onMediaLoad = (e) => {
@@ -10223,7 +10261,7 @@ function EntityPortraitCard({
10223
10261
  }
10224
10262
 
10225
10263
  // src/components/chat/entity-cards/admin-content-card.tsx
10226
- import { useState as useState23, useEffect as useEffect17 } from "react";
10264
+ import { useState as useState24, useEffect as useEffect18 } from "react";
10227
10265
  init_cn();
10228
10266
 
10229
10267
  // src/components/features/platform-badge.tsx
@@ -10448,11 +10486,11 @@ function AdminContentCard({
10448
10486
  actions,
10449
10487
  className
10450
10488
  }) {
10451
- const [imageError, setImageError] = useState23(false);
10452
- const [imageLoaded, setImageLoaded] = useState23(false);
10489
+ const [imageError, setImageError] = useState24(false);
10490
+ const [imageLoaded, setImageLoaded] = useState24(false);
10453
10491
  const displayUrl = imageUrl && !imageError ? imageUrl : placeholderUrl;
10454
10492
  const imageBgColor = useImageEdgeColor(displayUrl || null, "transparent");
10455
- useEffect17(() => {
10493
+ useEffect18(() => {
10456
10494
  setImageLoaded(false);
10457
10495
  }, [displayUrl]);
10458
10496
  return /* @__PURE__ */ jsxs55("article", { className: cn(
@@ -10623,7 +10661,7 @@ var TabsContent = React34.forwardRef(({ className, ...props }, ref) => /* @__PUR
10623
10661
  TabsContent.displayName = TabsPrimitive.Content.displayName;
10624
10662
 
10625
10663
  // src/components/features/video.tsx
10626
- import { useCallback as useCallback13, useEffect as useEffect19, useMemo as useMemo15, useRef as useRef15, useState as useState24 } from "react";
10664
+ import { useCallback as useCallback13, useEffect as useEffect20, useMemo as useMemo15, useRef as useRef16, useState as useState25 } from "react";
10627
10665
  import MuxPlayer from "@mux/mux-player-react";
10628
10666
 
10629
10667
  // src/components/features/video-center-badge.tsx
@@ -10670,7 +10708,7 @@ function fetchPriorityProp(priority) {
10670
10708
  }
10671
10709
 
10672
10710
  // src/components/features/use-video-warmup.ts
10673
- import { useEffect as useEffect18 } from "react";
10711
+ import { useEffect as useEffect19 } from "react";
10674
10712
  import ReactDOM from "react-dom";
10675
10713
 
10676
10714
  // src/components/features/mux-origins.ts
@@ -10722,7 +10760,7 @@ function useVideoWarmup({
10722
10760
  const resolvedOrigin = supabaseStorageOrigin ?? runtime?.endpoints.supabaseStorageOrigin;
10723
10761
  useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
10724
10762
  const { ref, isNear } = useNearViewport(nearMargin);
10725
- useEffect18(() => {
10763
+ useEffect19(() => {
10726
10764
  if (!isNear || !videoUrl || !resolvedOrigin) return;
10727
10765
  if (saveDataEnabled()) return;
10728
10766
  let videoOrigin;
@@ -10939,9 +10977,9 @@ function FilePlayer({
10939
10977
  className
10940
10978
  }) {
10941
10979
  const effectivePreload = preload ?? (saveDataEnabled() ? "none" : "metadata");
10942
- const [hoverMutedFallback, setHoverMutedFallback] = useState24(false);
10943
- const hoverPlayerRef = useRef15(null);
10944
- const perfListenerRef = useRef15(null);
10980
+ const [hoverMutedFallback, setHoverMutedFallback] = useState25(false);
10981
+ const hoverPlayerRef = useRef16(null);
10982
+ const perfListenerRef = useRef16(null);
10945
10983
  const clearPerfListener = useCallback13(() => {
10946
10984
  if (perfListenerRef.current) {
10947
10985
  try {
@@ -10951,17 +10989,17 @@ function FilePlayer({
10951
10989
  perfListenerRef.current = null;
10952
10990
  }
10953
10991
  }, []);
10954
- useEffect19(() => clearPerfListener, [clearPerfListener]);
10955
- const hoverActiveRef = useRef15(false);
10956
- const hoverGenerationRef = useRef15(0);
10957
- const activationWaiterRef = useRef15(null);
10992
+ useEffect20(() => clearPerfListener, [clearPerfListener]);
10993
+ const hoverActiveRef = useRef16(false);
10994
+ const hoverGenerationRef = useRef16(0);
10995
+ const activationWaiterRef = useRef16(null);
10958
10996
  const clearActivationWaiter = useCallback13(() => {
10959
10997
  if (activationWaiterRef.current) {
10960
10998
  activationWaiters.delete(activationWaiterRef.current);
10961
10999
  activationWaiterRef.current = null;
10962
11000
  }
10963
11001
  }, []);
10964
- useEffect19(() => clearActivationWaiter, [clearActivationWaiter]);
11002
+ useEffect20(() => clearActivationWaiter, [clearActivationWaiter]);
10965
11003
  const startHoverPlayback = useCallback13(() => {
10966
11004
  hoverActiveRef.current = true;
10967
11005
  const generation = ++hoverGenerationRef.current;
@@ -11045,7 +11083,7 @@ function FilePlayer({
11045
11083
  setHoverMutedFallback(false);
11046
11084
  }, []);
11047
11085
  const hoverControlled = typeof playWhenHovered === "boolean";
11048
- useEffect19(() => {
11086
+ useEffect20(() => {
11049
11087
  if (!hoverControlled) return;
11050
11088
  if (playWhenHovered) startHoverPlayback();
11051
11089
  else stopHoverPlayback();
@@ -11146,8 +11184,8 @@ function YouTubeFacadeInner({
11146
11184
  className,
11147
11185
  minimalControls
11148
11186
  }) {
11149
- const [activated, setActivated] = useState24(false);
11150
- const iframeRef = useRef15(null);
11187
+ const [activated, setActivated] = useState25(false);
11188
+ const iframeRef = useRef16(null);
11151
11189
  const embedUrl = useMemo15(() => {
11152
11190
  const params = new URLSearchParams({
11153
11191
  autoplay: "1",
@@ -11168,15 +11206,15 @@ function YouTubeFacadeInner({
11168
11206
  }
11169
11207
  return `${YT_NOCOOKIE_ORIGIN}/embed/${videoId}?${params.toString()}`;
11170
11208
  }, [videoId, minimalControls]);
11171
- const [posterTier, setPosterTier] = useState24(0);
11172
- useEffect19(() => {
11209
+ const [posterTier, setPosterTier] = useState25(0);
11210
+ useEffect20(() => {
11173
11211
  setPosterTier(0);
11174
11212
  }, [videoId]);
11175
11213
  const posterQuality = YT_POSTER_TIERS[posterTier];
11176
11214
  const posterJpg = `https://i.ytimg.com/vi/${videoId}/${posterQuality}.jpg`;
11177
11215
  const posterWebp = `https://i.ytimg.com/vi_webp/${videoId}/${posterQuality}.webp`;
11178
11216
  const handlePosterError = () => setPosterTier((tier) => Math.min(tier + 1, YT_POSTER_TIERS.length - 1));
11179
- useEffect19(() => {
11217
+ useEffect20(() => {
11180
11218
  if (!activated) return;
11181
11219
  const iframe = iframeRef.current;
11182
11220
  if (!iframe) return;
@@ -11267,7 +11305,7 @@ function YouTubeFacadeInner({
11267
11305
 
11268
11306
  // src/components/features/video-bites-strip.tsx
11269
11307
  init_cn();
11270
- import { useMemo as useMemo17, useRef as useRef17, useState as useState26, useEffect as useEffect21 } from "react";
11308
+ import { useMemo as useMemo17, useRef as useRef18, useState as useState27, useEffect as useEffect22 } from "react";
11271
11309
 
11272
11310
  // src/components/features/video-ratio-tabs.tsx
11273
11311
  import { Fragment as Fragment18, jsx as jsx76, jsxs as jsxs58 } from "react/jsx-runtime";
@@ -11365,7 +11403,7 @@ function sortBitesByCreatedAtDesc(a, b) {
11365
11403
 
11366
11404
  // src/components/features/cards-strip.tsx
11367
11405
  init_cn();
11368
- import React37, { useCallback as useCallback14, useEffect as useEffect20, useMemo as useMemo16, useRef as useRef16, useState as useState25 } from "react";
11406
+ import React37, { useCallback as useCallback14, useEffect as useEffect21, useMemo as useMemo16, useRef as useRef17, useState as useState26 } from "react";
11369
11407
  init_button2();
11370
11408
 
11371
11409
  // src/components/layout/page-heading.tsx
@@ -11452,7 +11490,7 @@ function CardsStrip(props) {
11452
11490
  const items = childrenMode ? childItems : props.items;
11453
11491
  const cardWidthDesktop = childrenMode ? props.cardWidthDesktop ?? 400 : 0;
11454
11492
  const cardWidthMobile = childrenMode ? props.cardWidthMobile ?? 320 : 0;
11455
- useEffect20(() => {
11493
+ useEffect21(() => {
11456
11494
  if (process.env.NODE_ENV === "production" || !childrenMode) return;
11457
11495
  const only = childItems.length === 1 ? childItems[0] : null;
11458
11496
  if (React37.isValidElement(only) && only.type === React37.Fragment) {
@@ -11467,13 +11505,13 @@ function CardsStrip(props) {
11467
11505
  }
11468
11506
  return React37.isValidElement(item) && item.key != null ? String(item.key) : String(index);
11469
11507
  };
11470
- const wrapperRef = useRef16(null);
11471
- const scrollerRef = useRef16(null);
11472
- const trackRef = useRef16(null);
11473
- const [reducedMotion, setReducedMotion] = useState25(false);
11474
- const [isTouch, setIsTouch] = useState25(false);
11475
- const [isMobile, setIsMobile] = useState25(false);
11476
- useEffect20(() => {
11508
+ const wrapperRef = useRef17(null);
11509
+ const scrollerRef = useRef17(null);
11510
+ const trackRef = useRef17(null);
11511
+ const [reducedMotion, setReducedMotion] = useState26(false);
11512
+ const [isTouch, setIsTouch] = useState26(false);
11513
+ const [isMobile, setIsMobile] = useState26(false);
11514
+ useEffect21(() => {
11477
11515
  const subs = [];
11478
11516
  const watch = (query, set) => {
11479
11517
  const mq = window.matchMedia(query);
@@ -11487,9 +11525,9 @@ function CardsStrip(props) {
11487
11525
  watch("(max-width: 767px)", setIsMobile);
11488
11526
  return () => subs.forEach((fn) => fn());
11489
11527
  }, []);
11490
- const [overflows, setOverflows] = useState25(false);
11491
- const [marqueeEligible, setMarqueeEligible] = useState25(false);
11492
- const singleCopyWidthRef = useRef16(0);
11528
+ const [overflows, setOverflows] = useState26(false);
11529
+ const [marqueeEligible, setMarqueeEligible] = useState26(false);
11530
+ const singleCopyWidthRef = useRef17(0);
11493
11531
  const marqueeActive = autoScroll && !reducedMotion && marqueeEligible && items.length > 0;
11494
11532
  const measure = useCallback14(() => {
11495
11533
  const scroller = scrollerRef.current;
@@ -11501,7 +11539,7 @@ function CardsStrip(props) {
11501
11539
  setOverflows(singleCopy > scroller.clientWidth + 1);
11502
11540
  setMarqueeEligible(singleCopy > scroller.clientWidth + TRACK_GAP_PX);
11503
11541
  }, []);
11504
- useEffect20(() => {
11542
+ useEffect21(() => {
11505
11543
  measure();
11506
11544
  const scroller = scrollerRef.current;
11507
11545
  const track = trackRef.current;
@@ -11511,10 +11549,10 @@ function CardsStrip(props) {
11511
11549
  ro.observe(track);
11512
11550
  return () => ro.disconnect();
11513
11551
  }, [measure, items.length, marqueeActive, isMobile]);
11514
- const chevronSuppressUntilRef = useRef16(0);
11515
- const userScrollSuppressUntilRef = useRef16(0);
11516
- const [nearViewport, setNearViewport] = useState25(true);
11517
- useEffect20(() => {
11552
+ const chevronSuppressUntilRef = useRef17(0);
11553
+ const userScrollSuppressUntilRef = useRef17(0);
11554
+ const [nearViewport, setNearViewport] = useState26(true);
11555
+ useEffect21(() => {
11518
11556
  const el = wrapperRef.current;
11519
11557
  if (!el || typeof IntersectionObserver === "undefined") return;
11520
11558
  const io = new IntersectionObserver(
@@ -11524,8 +11562,8 @@ function CardsStrip(props) {
11524
11562
  io.observe(el);
11525
11563
  return () => io.disconnect();
11526
11564
  }, []);
11527
- const [activeKey, setActiveKey] = useState25(null);
11528
- const activeKeyRef = useRef16(null);
11565
+ const [activeKey, setActiveKey] = useState26(null);
11566
+ const activeKeyRef = useRef17(null);
11529
11567
  const activate = useCallback14((key) => {
11530
11568
  activeKeyRef.current = key;
11531
11569
  setActiveKey(key);
@@ -11534,8 +11572,8 @@ function CardsStrip(props) {
11534
11572
  if (activeKeyRef.current === key) activeKeyRef.current = null;
11535
11573
  setActiveKey((current) => current === key ? null : current);
11536
11574
  }, []);
11537
- const hoverPointerRef = useRef16({ x: 0, y: 0, inside: false });
11538
- const lastHoverSyncScrollRef = useRef16(-1);
11575
+ const hoverPointerRef = useRef17({ x: 0, y: 0, inside: false });
11576
+ const lastHoverSyncScrollRef = useRef17(-1);
11539
11577
  const syncHoverToPointer = useCallback14(() => {
11540
11578
  const p = hoverPointerRef.current;
11541
11579
  if (!p.inside) return;
@@ -11596,11 +11634,11 @@ function CardsStrip(props) {
11596
11634
  readBack: () => scrollerRef.current?.scrollLeft ?? 0,
11597
11635
  onAfterFrame: syncHoverIfScrolled
11598
11636
  });
11599
- const [mountedIdx, setMountedIdx] = useState25(() => /* @__PURE__ */ new Set());
11600
- const cardObserverRef = useRef16(null);
11601
- const cardElIdxRef = useRef16(/* @__PURE__ */ new Map());
11602
- const cardElNearRef = useRef16(/* @__PURE__ */ new Map());
11603
- useEffect20(() => {
11637
+ const [mountedIdx, setMountedIdx] = useState26(() => /* @__PURE__ */ new Set());
11638
+ const cardObserverRef = useRef17(null);
11639
+ const cardElIdxRef = useRef17(/* @__PURE__ */ new Map());
11640
+ const cardElNearRef = useRef17(/* @__PURE__ */ new Map());
11641
+ useEffect21(() => {
11604
11642
  if (typeof IntersectionObserver === "undefined") return;
11605
11643
  const io = new IntersectionObserver((entries) => {
11606
11644
  for (const e of entries) cardElNearRef.current.set(e.target, e.isIntersecting);
@@ -11628,7 +11666,7 @@ function CardsStrip(props) {
11628
11666
  cardObserverRef.current = null;
11629
11667
  };
11630
11668
  }, []);
11631
- const cardRefFnsRef = useRef16(/* @__PURE__ */ new Map());
11669
+ const cardRefFnsRef = useRef17(/* @__PURE__ */ new Map());
11632
11670
  const getCardRef = useCallback14((idx) => {
11633
11671
  let fn = cardRefFnsRef.current.get(idx);
11634
11672
  if (!fn) {
@@ -11668,7 +11706,7 @@ function CardsStrip(props) {
11668
11706
  const onPointerDownIntent = useCallback14((e) => {
11669
11707
  if (e.pointerType === "touch") onUserScrollIntent();
11670
11708
  }, [onUserScrollIntent]);
11671
- const marqueeActiveRef = useRef16(false);
11709
+ const marqueeActiveRef = useRef17(false);
11672
11710
  marqueeActiveRef.current = marqueeActive;
11673
11711
  const onSeamWarp = useCallback14(() => {
11674
11712
  const scroller = scrollerRef.current;
@@ -11906,14 +11944,14 @@ function VideoBiteCard({
11906
11944
  const key = cardKey ?? `${bite.url}__${index}`;
11907
11945
  const previewUrl = toMuxPreviewUrl(bite.url);
11908
11946
  const controlled = active !== void 0;
11909
- const [selfActive, setSelfActive] = useState26(false);
11947
+ const [selfActive, setSelfActive] = useState27(false);
11910
11948
  const isActive = controlled ? !!active : selfActive;
11911
11949
  const activate = () => controlled ? onActivate?.(key) : setSelfActive(true);
11912
11950
  const deactivate = () => controlled ? onDeactivate?.(key) : setSelfActive(false);
11913
11951
  const gateControlled = playerMounted !== void 0;
11914
- const rootElRef = useRef17(null);
11915
- const [isNear, setIsNear] = useState26(false);
11916
- useEffect21(() => {
11952
+ const rootElRef = useRef18(null);
11953
+ const [isNear, setIsNear] = useState27(false);
11954
+ useEffect22(() => {
11917
11955
  if (gateControlled) return;
11918
11956
  const el = rootElRef.current;
11919
11957
  if (!el || typeof IntersectionObserver === "undefined") return;
@@ -13749,7 +13787,7 @@ function OnboardingGuideCard({
13749
13787
  }
13750
13788
 
13751
13789
  // src/components/chat/entity-cards/roadmap-card.tsx
13752
- import { useState as useState105 } from "react";
13790
+ import { useState as useState106 } from "react";
13753
13791
  import { ThumbsUp, ThumbsDown } from "lucide-react";
13754
13792
 
13755
13793
  // src/components/chat/entity-cards/roadmap-vote-button.tsx
@@ -13790,7 +13828,7 @@ function RoadmapVoteButton({
13790
13828
  init_button();
13791
13829
 
13792
13830
  // src/components/ui/image-gallery-modal.tsx
13793
- import { useState as useState104, useEffect as useEffect77 } from "react";
13831
+ import { useState as useState105, useEffect as useEffect78 } from "react";
13794
13832
 
13795
13833
  // src/components/ui/allowed-domains-input.tsx
13796
13834
  init_cn();
@@ -13951,11 +13989,11 @@ AllowedDomainsInput.displayName = "AllowedDomainsInput";
13951
13989
  // src/components/ui/autocomplete.tsx
13952
13990
  import {
13953
13991
  forwardRef as forwardRef26,
13954
- useEffect as useEffect22,
13992
+ useEffect as useEffect23,
13955
13993
  useImperativeHandle as useImperativeHandle3,
13956
13994
  useMemo as useMemo19,
13957
- useRef as useRef19,
13958
- useState as useState28
13995
+ useRef as useRef20,
13996
+ useState as useState29
13959
13997
  } from "react";
13960
13998
  import * as PopoverPrimitive from "@radix-ui/react-popover";
13961
13999
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
@@ -14053,7 +14091,7 @@ function AutocompleteInner(props, ref) {
14053
14091
  const limitTagsProp = multiple ? props.limitTags ?? "auto" : "auto";
14054
14092
  const getLimitTagsText = multiple ? props.getLimitTagsText ?? ((more) => `+${more}`) : ((more) => `+${more}`);
14055
14093
  const valueArray = multiple ? props.value : props.value != null ? [props.value] : [];
14056
- const [internalInputValue, setInternalInputValue] = useState28("");
14094
+ const [internalInputValue, setInternalInputValue] = useState29("");
14057
14095
  const isInputControlled = inputValueProp !== void 0;
14058
14096
  const inputValue = isInputControlled ? inputValueProp : internalInputValue;
14059
14097
  const updateInputValue = (value, reason) => {
@@ -14062,10 +14100,10 @@ function AutocompleteInner(props, ref) {
14062
14100
  }
14063
14101
  onInputChange?.(value, reason);
14064
14102
  };
14065
- const [isOpen, setIsOpen] = useState28(false);
14066
- const [highlightedIndex, setHighlightedIndex] = useState28(-1);
14067
- const containerRef = useRef19(null);
14068
- const hiddenTagsPopupRef = useRef19(null);
14103
+ const [isOpen, setIsOpen] = useState29(false);
14104
+ const [highlightedIndex, setHighlightedIndex] = useState29(-1);
14105
+ const containerRef = useRef20(null);
14106
+ const hiddenTagsPopupRef = useRef20(null);
14069
14107
  const isInvalid = invalid || !!error;
14070
14108
  useImperativeHandle3(ref, () => containerRef.current);
14071
14109
  const selectedOptions = useMemo19(() => {
@@ -14082,9 +14120,9 @@ function AutocompleteInner(props, ref) {
14082
14120
  const visibleTags = multiple ? selectedOptions.slice(0, visibleCount) : [];
14083
14121
  const hiddenTags = multiple ? selectedOptions.slice(visibleCount) : [];
14084
14122
  const hiddenTagsCount = multiple ? selectedOptions.length - visibleCount : 0;
14085
- const [showHiddenTags, setShowHiddenTags] = useState28(false);
14086
- const hiddenTagsRef = useRef19(null);
14087
- useEffect22(() => {
14123
+ const [showHiddenTags, setShowHiddenTags] = useState29(false);
14124
+ const hiddenTagsRef = useRef20(null);
14125
+ useEffect23(() => {
14088
14126
  if (!showHiddenTags) return;
14089
14127
  const handleClick = (e) => {
14090
14128
  const target = e.target;
@@ -14136,7 +14174,7 @@ function AutocompleteInner(props, ref) {
14136
14174
  setIsOpen(false);
14137
14175
  onCreateOption?.(trimmed);
14138
14176
  };
14139
- useEffect22(() => {
14177
+ useEffect23(() => {
14140
14178
  setHighlightedIndex(-1);
14141
14179
  }, [filteredOptions.length]);
14142
14180
  const handleInputChange = (e) => {
@@ -15695,7 +15733,7 @@ function DateFilterMenu({
15695
15733
 
15696
15734
  // src/components/ui/duration-input.tsx
15697
15735
  init_cn();
15698
- import { Fragment as Fragment27, useEffect as useEffect24, useRef as useRef20, useState as useState30 } from "react";
15736
+ import { Fragment as Fragment27, useEffect as useEffect25, useRef as useRef21, useState as useState31 } from "react";
15699
15737
  import { jsx as jsx100, jsxs as jsxs78 } from "react/jsx-runtime";
15700
15738
  var SEGMENT_META = [
15701
15739
  { label: "Hours", placeholder: "HH", max: 99 },
@@ -15709,9 +15747,9 @@ var split = (value) => {
15709
15747
  return [parts[0] || "00", parts[1] || "00", parts[2] || "00"];
15710
15748
  };
15711
15749
  function DurationInput({ value, onChange, invalid, className }) {
15712
- const [segments, setSegments] = useState30(() => split(value));
15713
- const refs = [useRef20(null), useRef20(null), useRef20(null)];
15714
- useEffect24(() => {
15750
+ const [segments, setSegments] = useState31(() => split(value));
15751
+ const refs = [useRef21(null), useRef21(null), useRef21(null)];
15752
+ useEffect25(() => {
15715
15753
  setSegments((prev) => compose(prev) === value ? prev : split(value));
15716
15754
  }, [value]);
15717
15755
  const focusSegment = (i) => {
@@ -15828,7 +15866,7 @@ init_cn();
15828
15866
  import React47 from "react";
15829
15867
 
15830
15868
  // src/components/ui/progress-bar.tsx
15831
- import { useEffect as useEffect25, useRef as useRef21, useState as useState31 } from "react";
15869
+ import { useEffect as useEffect26, useRef as useRef22, useState as useState32 } from "react";
15832
15870
  import { jsx as jsx102 } from "react/jsx-runtime";
15833
15871
  var ProgressBar = ({
15834
15872
  progress,
@@ -15844,9 +15882,9 @@ var ProgressBar = ({
15844
15882
  const isMdUp = useMdUp() ?? true;
15845
15883
  const effectiveSegmentWidth = isMdUp ? segmentWidth : mobileSegmentWidth;
15846
15884
  const effectiveHeight = isMdUp ? height : mobileHeight;
15847
- const containerRef = useRef21(null);
15848
- const [segmentCount, setSegmentCount] = useState31(0);
15849
- useEffect25(() => {
15885
+ const containerRef = useRef22(null);
15886
+ const [segmentCount, setSegmentCount] = useState32(0);
15887
+ useEffect26(() => {
15850
15888
  if (!containerRef.current) return;
15851
15889
  const resizeObserver = new ResizeObserver(() => {
15852
15890
  if (containerRef.current) {
@@ -17779,13 +17817,13 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
17779
17817
  // src/components/ui/modal.tsx
17780
17818
  init_cn();
17781
17819
  import * as React62 from "react";
17782
- import { useEffect as useEffect30 } from "react";
17820
+ import { useEffect as useEffect31 } from "react";
17783
17821
  import { usePreventScroll as usePreventScroll2 } from "@react-aria/overlays";
17784
17822
  import { jsx as jsx122, jsxs as jsxs96 } from "react/jsx-runtime";
17785
17823
  var Modal2 = React62.forwardRef(
17786
17824
  ({ isOpen, onClose, children, className }, ref) => {
17787
17825
  usePreventScroll2({ isDisabled: !isOpen });
17788
- useEffect30(() => {
17826
+ useEffect31(() => {
17789
17827
  const handleKeyDown = (event) => {
17790
17828
  if (event.key === "Escape") {
17791
17829
  onClose();
@@ -18828,7 +18866,7 @@ function TabContent({
18828
18866
  // src/components/ui/tab-navigation.tsx
18829
18867
  init_next_navigation();
18830
18868
  init_cn();
18831
- import { useState as useState39, useEffect as useEffect32, useMemo as useMemo23, useRef as useRef24, useCallback as useCallback19 } from "react";
18869
+ import { useState as useState40, useEffect as useEffect33, useMemo as useMemo23, useRef as useRef25, useCallback as useCallback19 } from "react";
18832
18870
  import { Fragment as Fragment29, jsx as jsx132, jsxs as jsxs104 } from "react/jsx-runtime";
18833
18871
  function TabNavigation({
18834
18872
  activeTab: controlledActiveTab,
@@ -18859,9 +18897,9 @@ function TabNavigation({
18859
18897
  }
18860
18898
  return defaultTab || tabs[0]?.id || "";
18861
18899
  };
18862
- const [internalActiveTab, setInternalActiveTab] = useState39(getInitialTab);
18900
+ const [internalActiveTab, setInternalActiveTab] = useState40(getInitialTab);
18863
18901
  const activeTab = isUrlSyncEnabled ? internalActiveTab : controlledActiveTab || "";
18864
- useEffect32(() => {
18902
+ useEffect33(() => {
18865
18903
  if (!isUrlSyncEnabled) return;
18866
18904
  const fromUrl = searchParams?.get(paramName) || "";
18867
18905
  const nextTab = validTabIds.has(fromUrl) ? fromUrl : defaultTab || tabs[0]?.id || "";
@@ -18881,18 +18919,18 @@ function TabNavigation({
18881
18919
  controlledOnTabChange?.(tabId);
18882
18920
  }
18883
18921
  };
18884
- const scrollRef = useRef24(null);
18885
- const activeTabRef = useRef24(null);
18886
- const isFirstActiveScrollRef = useRef24(true);
18887
- const [canScrollLeft, setCanScrollLeft] = useState39(false);
18888
- const [canScrollRight, setCanScrollRight] = useState39(false);
18922
+ const scrollRef = useRef25(null);
18923
+ const activeTabRef = useRef25(null);
18924
+ const isFirstActiveScrollRef = useRef25(true);
18925
+ const [canScrollLeft, setCanScrollLeft] = useState40(false);
18926
+ const [canScrollRight, setCanScrollRight] = useState40(false);
18889
18927
  const updateScrollShadows = useCallback19(() => {
18890
18928
  const el = scrollRef.current;
18891
18929
  if (!el) return;
18892
18930
  setCanScrollLeft(el.scrollLeft > 0);
18893
18931
  setCanScrollRight(el.scrollLeft + el.clientWidth < el.scrollWidth - 1);
18894
18932
  }, []);
18895
- useEffect32(() => {
18933
+ useEffect33(() => {
18896
18934
  const el = scrollRef.current;
18897
18935
  if (!el) return;
18898
18936
  updateScrollShadows();
@@ -18916,7 +18954,7 @@ function TabNavigation({
18916
18954
  ro.disconnect();
18917
18955
  };
18918
18956
  }, [updateScrollShadows]);
18919
- useEffect32(() => {
18957
+ useEffect33(() => {
18920
18958
  const el = scrollRef.current;
18921
18959
  const active = activeTabRef.current;
18922
18960
  if (!el || !active) return;
@@ -19071,7 +19109,7 @@ function AIGeneratedBadge({ className }) {
19071
19109
  }
19072
19110
 
19073
19111
  // src/components/ui/fade-preview.tsx
19074
- import { useState as useState40, useRef as useRef25, useEffect as useEffect33 } from "react";
19112
+ import { useState as useState41, useRef as useRef26, useEffect as useEffect34 } from "react";
19075
19113
  import { ChevronDown as ChevronDown4 } from "lucide-react";
19076
19114
  import { Fragment as Fragment30, jsx as jsx135, jsxs as jsxs106 } from "react/jsx-runtime";
19077
19115
  function FadePreview({
@@ -19080,9 +19118,9 @@ function FadePreview({
19080
19118
  resetKey,
19081
19119
  children
19082
19120
  }) {
19083
- const [expanded, setExpanded] = useState40(false);
19084
- const contentRef = useRef25(null);
19085
- useEffect33(() => {
19121
+ const [expanded, setExpanded] = useState41(false);
19122
+ const contentRef = useRef26(null);
19123
+ useEffect34(() => {
19086
19124
  setExpanded(false);
19087
19125
  }, [resetKey]);
19088
19126
  const needsFade = hiddenCount > 0;
@@ -19147,11 +19185,11 @@ var Progress = React73.forwardRef(({ className, value, indicatorClassName, ...pr
19147
19185
  Progress.displayName = ProgressPrimitive.Root.displayName;
19148
19186
 
19149
19187
  // src/components/ui/release-changelog-section.tsx
19150
- import { useState as useState50 } from "react";
19188
+ import { useState as useState51 } from "react";
19151
19189
  import { ChevronDown as ChevronDown5 } from "lucide-react";
19152
19190
 
19153
19191
  // src/components/ui/rich-markdown-renderer.tsx
19154
- import { useEffect as useEffect40, useState as useState49, useRef as useRef30, useMemo as useMemo26, useCallback as useCallback22 } from "react";
19192
+ import { useEffect as useEffect41, useState as useState50, useRef as useRef31, useMemo as useMemo26, useCallback as useCallback22 } from "react";
19155
19193
  import ReactMarkdown2 from "react-markdown";
19156
19194
  import remarkGfm2 from "remark-gfm";
19157
19195
  import remarkBreaks2 from "remark-breaks";
@@ -19159,7 +19197,7 @@ import rehypeHighlight2 from "rehype-highlight";
19159
19197
  import rehypeRaw2 from "rehype-raw";
19160
19198
 
19161
19199
  // src/components/embeds/reddit-embed-client.tsx
19162
- import { useState as useState42, useEffect as useEffect35, useRef as useRef27 } from "react";
19200
+ import { useState as useState43, useEffect as useEffect36, useRef as useRef28 } from "react";
19163
19201
 
19164
19202
  // src/utils/social-embed-cache.ts
19165
19203
  var cachingRequests = /* @__PURE__ */ new Map();
@@ -19441,7 +19479,7 @@ var socialCache = SocialEmbedCache.getInstance();
19441
19479
 
19442
19480
  // src/components/media-carousel.tsx
19443
19481
  init_cn();
19444
- import { useState as useState41, useRef as useRef26, useEffect as useEffect34, memo as memo4, useCallback as useCallback20 } from "react";
19482
+ import { useState as useState42, useRef as useRef27, useEffect as useEffect35, memo as memo4, useCallback as useCallback20 } from "react";
19445
19483
  init_button2();
19446
19484
  import { Fragment as Fragment31, jsx as jsx137, jsxs as jsxs107 } from "react/jsx-runtime";
19447
19485
  var ChevronLeftIcon = () => /* @__PURE__ */ jsx137("svg", { width: "24", height: "24", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx137("polyline", { points: "15,18 9,12 15,6" }) });
@@ -19456,17 +19494,17 @@ var MediaCarousel = memo4(function MediaCarousel2({
19456
19494
  transformImageSrc,
19457
19495
  reserveDotRow = false
19458
19496
  }) {
19459
- const [currentIndex, setCurrentIndex] = useState41(0);
19460
- const [touchStart, setTouchStart] = useState41(null);
19461
- const [touchEnd, setTouchEnd] = useState41(null);
19462
- const [brokenResourceUrls, setBrokenResourceUrls] = useState41({});
19463
- const [loadedImageSrc, setLoadedImageSrc] = useState41(null);
19464
- const carouselRef = useRef26(null);
19497
+ const [currentIndex, setCurrentIndex] = useState42(0);
19498
+ const [touchStart, setTouchStart] = useState42(null);
19499
+ const [touchEnd, setTouchEnd] = useState42(null);
19500
+ const [brokenResourceUrls, setBrokenResourceUrls] = useState42({});
19501
+ const [loadedImageSrc, setLoadedImageSrc] = useState42(null);
19502
+ const carouselRef = useRef27(null);
19465
19503
  const onImageError = useCallback20((originalUrl) => {
19466
19504
  const key = originalUrl.trim() || "__missing_src__";
19467
19505
  setBrokenResourceUrls((b) => b[key] ? b : { ...b, [key]: true });
19468
19506
  }, []);
19469
- useEffect34(() => {
19507
+ useEffect35(() => {
19470
19508
  if (currentIndex >= media.length && media.length > 0) {
19471
19509
  setCurrentIndex(media.length - 1);
19472
19510
  }
@@ -19783,11 +19821,11 @@ var RedditProfilePic = ({ username }) => {
19783
19821
  };
19784
19822
  function RedditEmbedClient({ url, maxWidth = 700 }) {
19785
19823
  const { redditProxyUrl } = useRichMarkdownRuntime();
19786
- const [redditData, setRedditData] = useState42(null);
19787
- const [loading, setLoading] = useState42(true);
19788
- const [error, setError] = useState42(null);
19789
- const initializationDone = useRef27(false);
19790
- useEffect35(() => {
19824
+ const [redditData, setRedditData] = useState43(null);
19825
+ const [loading, setLoading] = useState43(true);
19826
+ const [error, setError] = useState43(null);
19827
+ const initializationDone = useRef28(false);
19828
+ useEffect36(() => {
19791
19829
  if (initializationDone.current) return;
19792
19830
  initializationDone.current = true;
19793
19831
  const jsonUrl = url.endsWith(".json") ? url : `${url.replace(/\/$/, "")}.json`;
@@ -20093,7 +20131,7 @@ function RedditEmbedClient({ url, maxWidth = 700 }) {
20093
20131
  }
20094
20132
 
20095
20133
  // src/components/embeds/twitter-embed-client.tsx
20096
- import { useState as useState43, useEffect as useEffect36, useRef as useRef28 } from "react";
20134
+ import { useState as useState44, useEffect as useEffect37, useRef as useRef29 } from "react";
20097
20135
  import { jsx as jsx141, jsxs as jsxs109 } from "react/jsx-runtime";
20098
20136
  var MessageCircleIcon2 = () => /* @__PURE__ */ jsx141("svg", { width: "16", height: "16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx141("path", { d: "M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z" }) });
20099
20137
  var ExternalLinkIcon3 = () => /* @__PURE__ */ jsxs109("svg", { width: "16", height: "16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
@@ -20119,13 +20157,13 @@ var UserIcon4 = () => /* @__PURE__ */ jsxs109("svg", { width: "12", height: "12"
20119
20157
  var XIcon = () => /* @__PURE__ */ jsx141(XLogo, { className: "w-5 h-5", color: "currentColor" });
20120
20158
  function TwitterEmbedClient({ url, tweetId, maxWidth = 700 }) {
20121
20159
  const { twitterProxyUrl } = useRichMarkdownRuntime();
20122
- const [tweetData, setTweetData] = useState43(null);
20123
- const [loading, setLoading] = useState43(true);
20124
- const [error, setError] = useState43(null);
20125
- const initializationDone = useRef28(false);
20160
+ const [tweetData, setTweetData] = useState44(null);
20161
+ const [loading, setLoading] = useState44(true);
20162
+ const [error, setError] = useState44(null);
20163
+ const initializationDone = useRef29(false);
20126
20164
  const extractedTweetId = tweetId || url.match(/status\/(\d+)/)?.[1];
20127
20165
  const tweetUrl = url.includes("twitter.com") || url.includes("x.com") ? url : `https://twitter.com/twitter/status/${extractedTweetId}`;
20128
- useEffect36(() => {
20166
+ useEffect37(() => {
20129
20167
  if (initializationDone.current) return;
20130
20168
  initializationDone.current = true;
20131
20169
  if (!extractedTweetId) {
@@ -20290,7 +20328,7 @@ function TwitterEmbedClient({ url, tweetId, maxWidth = 700 }) {
20290
20328
  }
20291
20329
 
20292
20330
  // src/components/embeds/linkedin-embed-client.tsx
20293
- import { useMemo as useMemo25, useState as useState44 } from "react";
20331
+ import { useMemo as useMemo25, useState as useState45 } from "react";
20294
20332
  import { ExternalLink as ExternalLink2 } from "lucide-react";
20295
20333
  import { jsx as jsx142, jsxs as jsxs110 } from "react/jsx-runtime";
20296
20334
  function toLinkedInEmbedUrl(url) {
@@ -20306,7 +20344,7 @@ function toLinkedInEmbedUrl(url) {
20306
20344
  }
20307
20345
  function LinkedInEmbedClient({ url, height = 600 }) {
20308
20346
  const embedUrl = useMemo25(() => toLinkedInEmbedUrl(url), [url]);
20309
- const [loaded, setLoaded] = useState44(false);
20347
+ const [loaded, setLoaded] = useState45(false);
20310
20348
  if (!embedUrl) {
20311
20349
  return /* @__PURE__ */ jsx142(LinkedInContainer, { children: /* @__PURE__ */ jsxs110("div", { className: "p-6", children: [
20312
20350
  /* @__PURE__ */ jsxs110("div", { className: "flex items-center space-x-3 text-ods-text-secondary mb-4", children: [
@@ -20373,7 +20411,7 @@ function LinkedInEmbedClient({ url, height = 600 }) {
20373
20411
  }
20374
20412
 
20375
20413
  // src/components/embeds/og-link-preview.tsx
20376
- import { useState as useState45, useEffect as useEffect37, Component as Component2 } from "react";
20414
+ import { useState as useState46, useEffect as useEffect38, Component as Component2 } from "react";
20377
20415
  import { jsx as jsx143, jsxs as jsxs111 } from "react/jsx-runtime";
20378
20416
  var OGLinkErrorBoundary = class extends Component2 {
20379
20417
  constructor(props) {
@@ -20418,12 +20456,12 @@ var OGLinkPreview = ({
20418
20456
  variant = "default",
20419
20457
  enablePlaceholder = true
20420
20458
  }) => {
20421
- const [ogData, setOgData] = useState45(null);
20422
- const [loading, setLoading] = useState45(true);
20423
- const [error, setError] = useState45(false);
20424
- const [imageError, setImageError] = useState45(false);
20425
- const [originalImageError, setOriginalImageError] = useState45(false);
20426
- const [fallbackImageError, setFallbackImageError] = useState45(false);
20459
+ const [ogData, setOgData] = useState46(null);
20460
+ const [loading, setLoading] = useState46(true);
20461
+ const [error, setError] = useState46(false);
20462
+ const [imageError, setImageError] = useState46(false);
20463
+ const [originalImageError, setOriginalImageError] = useState46(false);
20464
+ const [fallbackImageError, setFallbackImageError] = useState46(false);
20427
20465
  let isValidUrl = true;
20428
20466
  let isLocalhost = false;
20429
20467
  try {
@@ -20438,7 +20476,7 @@ var OGLinkPreview = ({
20438
20476
  } catch {
20439
20477
  isValidUrl = false;
20440
20478
  }
20441
- useEffect37(() => {
20479
+ useEffect38(() => {
20442
20480
  if (!isValidUrl || isLocalhost) return;
20443
20481
  const fetchOGData = async () => {
20444
20482
  try {
@@ -20694,7 +20732,7 @@ var OGLinkPreview = ({
20694
20732
  };
20695
20733
 
20696
20734
  // src/components/embeds/figma-embed.tsx
20697
- import { useState as useState47 } from "react";
20735
+ import { useState as useState48 } from "react";
20698
20736
  import { ExternalLink as ExternalLink3, Play as Play3, LayoutGrid } from "lucide-react";
20699
20737
 
20700
20738
  // src/utils/embed-url-converters.ts
@@ -20748,7 +20786,7 @@ function toFigmaOriginalUrl(url) {
20748
20786
  }
20749
20787
 
20750
20788
  // src/components/embeds/embed-iframe.tsx
20751
- import { useState as useState46, useCallback as useCallback21, useRef as useRef29, useEffect as useEffect38 } from "react";
20789
+ import { useState as useState47, useCallback as useCallback21, useRef as useRef30, useEffect as useEffect39 } from "react";
20752
20790
  import { Fragment as Fragment32, jsx as jsx144, jsxs as jsxs112 } from "react/jsx-runtime";
20753
20791
  function EmbedLoadingSkeleton({ height }) {
20754
20792
  return /* @__PURE__ */ jsx144(
@@ -20769,13 +20807,13 @@ function EmbedIframe({
20769
20807
  loading,
20770
20808
  allowFullScreen
20771
20809
  }) {
20772
- const [isLoaded, setIsLoaded] = useState46(false);
20773
- const iframeRef = useRef29(null);
20810
+ const [isLoaded, setIsLoaded] = useState47(false);
20811
+ const iframeRef = useRef30(null);
20774
20812
  const handleLoad = useCallback21(() => setIsLoaded(true), []);
20775
- useEffect38(() => {
20813
+ useEffect39(() => {
20776
20814
  setIsLoaded(false);
20777
20815
  }, [src]);
20778
- useEffect38(() => {
20816
+ useEffect39(() => {
20779
20817
  const iframe = iframeRef.current;
20780
20818
  return () => {
20781
20819
  if (iframe) {
@@ -20854,7 +20892,7 @@ function SlidesViewToggle({
20854
20892
  );
20855
20893
  }
20856
20894
  function FigmaEmbed({ url, title, height, loading = "lazy" }) {
20857
- const [view, setView] = useState47("present");
20895
+ const [view, setView] = useState48("present");
20858
20896
  const isSlides = url ? isFigmaSlidesUrl(url) : false;
20859
20897
  const embedSrc = url ? toFigmaEmbedUrl(url, { slidesView: view }) : null;
20860
20898
  const originalUrl = (() => {
@@ -20911,14 +20949,14 @@ function FigmaEmbed({ url, title, height, loading = "lazy" }) {
20911
20949
  }
20912
20950
 
20913
20951
  // src/components/embeds/markdown-image.tsx
20914
- import { useEffect as useEffect39, useState as useState48 } from "react";
20952
+ import { useEffect as useEffect40, useState as useState49 } from "react";
20915
20953
  import { jsx as jsx146 } from "react/jsx-runtime";
20916
20954
  var MAX_H_REM = 32;
20917
20955
  var DISPLAY_W = 768;
20918
20956
  function MarkdownImage({ src, alt }) {
20919
20957
  const { transformImageSrc } = useRichMarkdownRuntime();
20920
- const [ratio, setRatio] = useState48(null);
20921
- useEffect39(() => {
20958
+ const [ratio, setRatio] = useState49(null);
20959
+ useEffect40(() => {
20922
20960
  let cancelled = false;
20923
20961
  setRatio(null);
20924
20962
  const probeSrc = transformImageSrc(src, { width: 48, resize: "contain", quality: 20 }) ?? src;
@@ -21033,15 +21071,15 @@ var mermaidStyles2 = `
21033
21071
  }
21034
21072
  `;
21035
21073
  var MermaidDiagram2 = ({ chart }) => {
21036
- const [svg, setSvg] = useState49("");
21037
- const [error, setError] = useState49("");
21038
- const [isLoading, setIsLoading] = useState49(true);
21039
- const [mounted, setMounted] = useState49(false);
21040
- useEffect40(() => {
21074
+ const [svg, setSvg] = useState50("");
21075
+ const [error, setError] = useState50("");
21076
+ const [isLoading, setIsLoading] = useState50(true);
21077
+ const [mounted, setMounted] = useState50(false);
21078
+ useEffect41(() => {
21041
21079
  setMounted(true);
21042
21080
  }, []);
21043
21081
  const isDarkMode = true;
21044
- useEffect40(() => {
21082
+ useEffect41(() => {
21045
21083
  const renderMermaid = async () => {
21046
21084
  try {
21047
21085
  setIsLoading(true);
@@ -21380,7 +21418,7 @@ var RichMarkdownInner = ({
21380
21418
  resolveLinkEndpointUrl,
21381
21419
  demoteMarkdownH1ToH2
21382
21420
  }) => {
21383
- const idCountsRef = useRef30({});
21421
+ const idCountsRef = useRef31({});
21384
21422
  const { ogScraperUrl } = useRichMarkdownRuntime();
21385
21423
  const { ogApiBaseUrl, ogEndpointPath } = useMemo26(() => {
21386
21424
  try {
@@ -21807,7 +21845,7 @@ function ReleaseChangelogSection({
21807
21845
  icon,
21808
21846
  MarkdownRenderer = RichMarkdownRenderer
21809
21847
  }) {
21810
- const [collapsed, setCollapsed] = useState50(collapsible ? defaultCollapsed : false);
21848
+ const [collapsed, setCollapsed] = useState51(collapsible ? defaultCollapsed : false);
21811
21849
  if (!entries || entries.length === 0) return null;
21812
21850
  const inPreviewMode = previewFirst && !collapsible;
21813
21851
  const showEntries = !collapsible || !collapsed;
@@ -22003,7 +22041,7 @@ function StatusIndicator({ status, label, href }) {
22003
22041
  }
22004
22042
 
22005
22043
  // src/components/ui/hover-dropdown.tsx
22006
- import { useState as useState51, useRef as useRef31, useCallback as useCallback23 } from "react";
22044
+ import { useState as useState52, useRef as useRef32, useCallback as useCallback23 } from "react";
22007
22045
  import { Fragment as Fragment34, jsx as jsx152, jsxs as jsxs119 } from "react/jsx-runtime";
22008
22046
  function DefaultAnchor({
22009
22047
  href,
@@ -22020,9 +22058,9 @@ function HoverDropdown({
22020
22058
  className,
22021
22059
  renderAnchor
22022
22060
  }) {
22023
- const [open, setOpen] = useState51(false);
22024
- const timeoutRef = useRef31(void 0);
22025
- const containerRef = useRef31(null);
22061
+ const [open, setOpen] = useState52(false);
22062
+ const timeoutRef = useRef32(void 0);
22063
+ const containerRef = useRef32(null);
22026
22064
  const show = useCallback23(() => {
22027
22065
  clearTimeout(timeoutRef.current);
22028
22066
  setOpen(true);
@@ -22130,11 +22168,11 @@ function HoverDropdown({
22130
22168
 
22131
22169
  // src/components/layout/list-page-layout.tsx
22132
22170
  init_cn();
22133
- import { useEffect as useEffect42, useState as useState53 } from "react";
22171
+ import { useEffect as useEffect43, useState as useState54 } from "react";
22134
22172
 
22135
22173
  // src/components/ui/filter-modal.tsx
22136
22174
  init_cn();
22137
- import { useEffect as useEffect41, useState as useState52 } from "react";
22175
+ import { useEffect as useEffect42, useState as useState53 } from "react";
22138
22176
  init_button2();
22139
22177
 
22140
22178
  // src/components/ui/filter-checkbox-item.tsx
@@ -22331,15 +22369,15 @@ function FilterModal({
22331
22369
  emptyStateTitle = "No filters available",
22332
22370
  emptyStateDescription = "There are no filter options to display at the moment"
22333
22371
  }) {
22334
- const [selectedFilters, setSelectedFilters] = useState52(() => {
22372
+ const [selectedFilters, setSelectedFilters] = useState53(() => {
22335
22373
  return { ...currentFilters };
22336
22374
  });
22337
- const [pendingTags, setPendingTags] = useState52(selectedTags ?? []);
22375
+ const [pendingTags, setPendingTags] = useState53(selectedTags ?? []);
22338
22376
  const dateDefaultSort = dateFilter?.defaultSort ?? "desc";
22339
- const [draftDateSort, setDraftDateSort] = useState52(dateFilter?.sort ?? dateDefaultSort);
22340
- const [draftDateRange, setDraftDateRange] = useState52(dateFilter?.range);
22377
+ const [draftDateSort, setDraftDateSort] = useState53(dateFilter?.sort ?? dateDefaultSort);
22378
+ const [draftDateRange, setDraftDateRange] = useState53(dateFilter?.range);
22341
22379
  const { scrollRef, fadeTop, fadeBottom, update: updateFade } = useScrollFade();
22342
- useEffect41(() => {
22380
+ useEffect42(() => {
22343
22381
  if (isOpen) {
22344
22382
  setSelectedFilters({ ...currentFilters });
22345
22383
  setPendingTags(selectedTags ?? []);
@@ -22942,13 +22980,13 @@ function ListPageLayout({
22942
22980
  mobileFilterTitle,
22943
22981
  stickyHeader = false
22944
22982
  }) {
22945
- const [mobileFilterOpen, setMobileFilterOpen] = useState53(false);
22946
- const [localSearchValue, setLocalSearchValue] = useState53(searchValue);
22983
+ const [mobileFilterOpen, setMobileFilterOpen] = useState54(false);
22984
+ const [localSearchValue, setLocalSearchValue] = useState54(searchValue);
22947
22985
  const debouncedSearchValue = useDebounce(localSearchValue, 500);
22948
- useEffect42(() => {
22986
+ useEffect43(() => {
22949
22987
  setLocalSearchValue(searchValue);
22950
22988
  }, [searchValue]);
22951
- useEffect42(() => {
22989
+ useEffect43(() => {
22952
22990
  if (debouncedSearchValue !== searchValue) {
22953
22991
  onSearch(debouncedSearchValue);
22954
22992
  }
@@ -25863,7 +25901,7 @@ function FeatureList({
25863
25901
 
25864
25902
  // src/components/ui/truncate-text.tsx
25865
25903
  init_cn();
25866
- import { useEffect as useEffect43, useRef as useRef33, useState as useState55 } from "react";
25904
+ import { useEffect as useEffect44, useRef as useRef34, useState as useState56 } from "react";
25867
25905
  import { jsx as jsx182 } from "react/jsx-runtime";
25868
25906
  var VARIANT_CLASS = {
25869
25907
  h1: "text-h1",
@@ -25894,10 +25932,10 @@ function TruncateText({
25894
25932
  tone = "primary",
25895
25933
  mono = false
25896
25934
  }) {
25897
- const ref = useRef33(null);
25898
- const [isTruncated, setIsTruncated] = useState55(false);
25935
+ const ref = useRef34(null);
25936
+ const [isTruncated, setIsTruncated] = useState56(false);
25899
25937
  const isMultiLine = lines > 1;
25900
- useEffect43(() => {
25938
+ useEffect44(() => {
25901
25939
  const el = ref.current;
25902
25940
  if (!el) return;
25903
25941
  const check = () => {
@@ -26297,14 +26335,14 @@ function OrganizationCard({
26297
26335
 
26298
26336
  // src/components/ui/service-card.tsx
26299
26337
  init_cn();
26300
- import { useMemo as useMemo39, useState as useState91 } from "react";
26338
+ import { useMemo as useMemo39, useState as useState92 } from "react";
26301
26339
  import { ExternalLink as ExternalLink7 } from "lucide-react";
26302
26340
 
26303
26341
  // src/components/providers/dynamic-theme-provider.tsx
26304
26342
  import { createContext as createContext5, useContext as useContext5 } from "react";
26305
26343
 
26306
26344
  // src/hooks/use-dynamic-theming.ts
26307
- import { useState as useState56, useEffect as useEffect44 } from "react";
26345
+ import { useState as useState57, useEffect as useEffect45 } from "react";
26308
26346
  var defaultTheme = {
26309
26347
  primaryColor: "#FFC008",
26310
26348
  secondaryColor: "#161616",
@@ -26313,9 +26351,9 @@ var defaultTheme = {
26313
26351
  textColor: "#161616"
26314
26352
  };
26315
26353
  function useDynamicTheming() {
26316
- const [theme, setTheme] = useState56(defaultTheme);
26317
- const [isDark, setIsDark] = useState56(false);
26318
- useEffect44(() => {
26354
+ const [theme, setTheme] = useState57(defaultTheme);
26355
+ const [isDark, setIsDark] = useState57(false);
26356
+ useEffect45(() => {
26319
26357
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
26320
26358
  setIsDark(mediaQuery.matches);
26321
26359
  const handleChange = (e) => {
@@ -26403,7 +26441,7 @@ function useThemeToggle() {
26403
26441
  }
26404
26442
 
26405
26443
  // src/components/features/array-entry-manager.tsx
26406
- import { useState as useState58, useEffect as useEffect46 } from "react";
26444
+ import { useState as useState59, useEffect as useEffect47 } from "react";
26407
26445
  import { Trash2, Plus as Plus2, Save, Loader2 as Loader22 } from "lucide-react";
26408
26446
  import { jsx as jsx190, jsxs as jsxs148 } from "react/jsx-runtime";
26409
26447
  function ArrayEntryManager({
@@ -26422,14 +26460,14 @@ function ArrayEntryManager({
26422
26460
  renderLabel,
26423
26461
  isSaving = false
26424
26462
  }) {
26425
- const [draftItems, setDraftItems] = useState58(items);
26426
- const [isDirty, setIsDirty] = useState58(false);
26427
- useEffect46(() => {
26463
+ const [draftItems, setDraftItems] = useState59(items);
26464
+ const [isDirty, setIsDirty] = useState59(false);
26465
+ useEffect47(() => {
26428
26466
  if (!isDirty && !isSaving) {
26429
26467
  setDraftItems(items);
26430
26468
  }
26431
26469
  }, [items, isDirty, isSaving]);
26432
- useEffect46(() => {
26470
+ useEffect47(() => {
26433
26471
  if (onDirtyChange) {
26434
26472
  onDirtyChange(isDirty);
26435
26473
  }
@@ -27555,7 +27593,7 @@ function SsoAuthShell({ children, className }) {
27555
27593
 
27556
27594
  // src/components/features/provider-button.tsx
27557
27595
  init_button2();
27558
- import { useState as useState60 } from "react";
27596
+ import { useState as useState61 } from "react";
27559
27597
  import { jsx as jsx206 } from "react/jsx-runtime";
27560
27598
  var PROVIDER_CONFIG = {
27561
27599
  microsoft: {
@@ -27576,7 +27614,7 @@ var PROVIDER_CONFIG = {
27576
27614
  }
27577
27615
  };
27578
27616
  function ProviderButton({ provider, onClick, disabled = false, loading = false }) {
27579
- const [internalLoading, setInternalLoading] = useState60(false);
27617
+ const [internalLoading, setInternalLoading] = useState61(false);
27580
27618
  const config = PROVIDER_CONFIG[provider];
27581
27619
  const IconComponent = config.icon;
27582
27620
  const isLoading = loading || internalLoading;
@@ -27660,7 +27698,7 @@ function AuthProvidersList({
27660
27698
 
27661
27699
  // src/components/features/changelog-manager.tsx
27662
27700
  import { Trash2 as Trash22, Plus as Plus3, ChevronDown as ChevronDown7, ChevronUp as ChevronUp3, Eye as Eye3, EyeOff } from "lucide-react";
27663
- import { useState as useState61, useEffect as useEffect47 } from "react";
27701
+ import { useState as useState62, useEffect as useEffect48 } from "react";
27664
27702
  import { jsx as jsx208, jsxs as jsxs162 } from "react/jsx-runtime";
27665
27703
  function ChangelogManager({
27666
27704
  title,
@@ -27670,8 +27708,8 @@ function ChangelogManager({
27670
27708
  expandAll = false,
27671
27709
  showVisibilityToggle = false
27672
27710
  }) {
27673
- const [expandedIndices, setExpandedIndices] = useState61(/* @__PURE__ */ new Set());
27674
- useEffect47(() => {
27711
+ const [expandedIndices, setExpandedIndices] = useState62(/* @__PURE__ */ new Set());
27712
+ useEffect48(() => {
27675
27713
  if (expandAll && entries.length > 0) {
27676
27714
  setExpandedIndices(new Set(entries.map((_, i) => i)));
27677
27715
  }
@@ -28014,7 +28052,7 @@ var ErrorBoundary = class extends Component3 {
28014
28052
 
28015
28053
  // src/components/features/figma-prototype-viewer.tsx
28016
28054
  init_cn();
28017
- import { useState as useState62, useRef as useRef34, useEffect as useEffect48, useCallback as useCallback25, useMemo as useMemo29 } from "react";
28055
+ import { useState as useState63, useRef as useRef35, useEffect as useEffect49, useCallback as useCallback25, useMemo as useMemo29 } from "react";
28018
28056
 
28019
28057
  // src/components/features/section-selector.tsx
28020
28058
  init_cn();
@@ -28383,27 +28421,27 @@ var FigmaPrototypeViewer = ({
28383
28421
  }) => {
28384
28422
  const clientId = process.env.NEXT_PUBLIC_FIGMA_CLIENT_ID || "UTQPwZHR9OZp68TTGPFFi5";
28385
28423
  const showDebugPanel = process.env.NEXT_PUBLIC_FIGMA_DEBUG === "true";
28386
- const iframeRef = useRef34(null);
28387
- const containerRef = useRef34(null);
28388
- const navTimerRef = useRef34(null);
28389
- const touchTimerRef = useRef34(null);
28390
- const [screenWidth, setScreenWidth] = useState62(
28424
+ const iframeRef = useRef35(null);
28425
+ const containerRef = useRef35(null);
28426
+ const navTimerRef = useRef35(null);
28427
+ const touchTimerRef = useRef35(null);
28428
+ const [screenWidth, setScreenWidth] = useState63(
28391
28429
  typeof window !== "undefined" ? window.innerWidth : DESKTOP_BREAKPOINT
28392
28430
  );
28393
- const [isTouchDevice, setIsTouchDevice] = useState62(() => {
28431
+ const [isTouchDevice, setIsTouchDevice] = useState63(() => {
28394
28432
  if (typeof window === "undefined") return false;
28395
28433
  return "ontouchstart" in window;
28396
28434
  });
28397
- const [iframeState, setIframeState] = useState62("INITIAL");
28398
- const [iframeKey, setIframeKey] = useState62(0);
28399
- const [isInitialized, setIsInitialized] = useState62(false);
28400
- const [currentNodeId, setCurrentNodeId] = useState62(null);
28401
- const [internalActiveSection, setInternalActiveSection] = useState62(
28435
+ const [iframeState, setIframeState] = useState63("INITIAL");
28436
+ const [iframeKey, setIframeKey] = useState63(0);
28437
+ const [isInitialized, setIsInitialized] = useState63(false);
28438
+ const [currentNodeId, setCurrentNodeId] = useState63(null);
28439
+ const [internalActiveSection, setInternalActiveSection] = useState63(
28402
28440
  config.defaultSectionId || config.sections[0]?.id || ""
28403
28441
  );
28404
28442
  const activeSection = externalActiveSection || internalActiveSection;
28405
- const [isNavigating, setIsNavigating] = useState62(false);
28406
- const [containerDimensions, setContainerDimensions] = useState62({ width: 1200, height: 800 });
28443
+ const [isNavigating, setIsNavigating] = useState63(false);
28444
+ const [containerDimensions, setContainerDimensions] = useState63({ width: 1200, height: 800 });
28407
28445
  const viewMode = useMemo29(
28408
28446
  () => getViewMode(screenWidth, isTouchDevice),
28409
28447
  [screenWidth, isTouchDevice]
@@ -28452,7 +28490,7 @@ var FigmaPrototypeViewer = ({
28452
28490
  embedUrl,
28453
28491
  iframeKey
28454
28492
  ]);
28455
- useEffect48(() => {
28493
+ useEffect49(() => {
28456
28494
  const handleResize = () => {
28457
28495
  const newWidth = window.innerWidth;
28458
28496
  setScreenWidth(newWidth);
@@ -28465,8 +28503,8 @@ var FigmaPrototypeViewer = ({
28465
28503
  window.addEventListener("resize", handleResize);
28466
28504
  return () => window.removeEventListener("resize", handleResize);
28467
28505
  }, []);
28468
- const [lastViewMode, setLastViewMode] = useState62(viewMode);
28469
- useEffect48(() => {
28506
+ const [lastViewMode, setLastViewMode] = useState63(viewMode);
28507
+ useEffect49(() => {
28470
28508
  if (lastViewMode !== viewMode && iframeState === "READY") {
28471
28509
  console.log("[ViewMode Change]", lastViewMode, "\u2192", viewMode);
28472
28510
  setIframeState("RELOADING");
@@ -28474,7 +28512,7 @@ var FigmaPrototypeViewer = ({
28474
28512
  }
28475
28513
  setLastViewMode(viewMode);
28476
28514
  }, [viewMode, lastViewMode, iframeState]);
28477
- useEffect48(() => {
28515
+ useEffect49(() => {
28478
28516
  const handleVisibilityChange = () => {
28479
28517
  if (document.visibilityState === "visible" && iframeState === "READY") {
28480
28518
  console.log("[Sleep Recovery] Reloading iframe after sleep");
@@ -28485,7 +28523,7 @@ var FigmaPrototypeViewer = ({
28485
28523
  document.addEventListener("visibilitychange", handleVisibilityChange);
28486
28524
  return () => document.removeEventListener("visibilitychange", handleVisibilityChange);
28487
28525
  }, [iframeState]);
28488
- useEffect48(() => {
28526
+ useEffect49(() => {
28489
28527
  const handleMessage = (event) => {
28490
28528
  if (event.origin !== "https://www.figma.com") return;
28491
28529
  const validEvents = ["INITIAL_LOAD", "NEW_STATE", "PRESENTED_NODE_CHANGED"];
@@ -28569,12 +28607,12 @@ var FigmaPrototypeViewer = ({
28569
28607
  }
28570
28608
  }, 500);
28571
28609
  }, []);
28572
- useEffect48(() => {
28610
+ useEffect49(() => {
28573
28611
  if (externalActiveSection && externalActiveSection !== activeSection && isInitialized) {
28574
28612
  navigateToSection(externalActiveSection);
28575
28613
  }
28576
28614
  }, [externalActiveSection, activeSection, isInitialized, navigateToSection]);
28577
- useEffect48(() => {
28615
+ useEffect49(() => {
28578
28616
  return () => {
28579
28617
  if (navTimerRef.current) clearTimeout(navTimerRef.current);
28580
28618
  if (touchTimerRef.current) clearTimeout(touchTimerRef.current);
@@ -28677,7 +28715,7 @@ var FigmaPrototypeViewer = ({
28677
28715
 
28678
28716
  // src/components/features/filters-dropdown.tsx
28679
28717
  init_cn();
28680
- import { useEffect as useEffect49, useRef as useRef35, useState as useState63 } from "react";
28718
+ import { useEffect as useEffect50, useRef as useRef36, useState as useState64 } from "react";
28681
28719
  import { jsx as jsx215, jsxs as jsxs168 } from "react/jsx-runtime";
28682
28720
  var FilterCheckbox = ({ checked, disabled = false, className }) => {
28683
28721
  return /* @__PURE__ */ jsx215(
@@ -28709,15 +28747,15 @@ var FiltersDropdown = ({
28709
28747
  placement = "bottom-start",
28710
28748
  responsive = true
28711
28749
  }) => {
28712
- const [isOpen, setIsOpen] = useState63(false);
28713
- const [shouldRender, setShouldRender] = useState63(false);
28714
- const [isVisible, setIsVisible] = useState63(false);
28715
- const [isMobile, setIsMobile] = useState63(false);
28716
- const [actualPlacement, setActualPlacement] = useState63(placement);
28717
- const dropdownRef = useRef35(null);
28718
- const triggerRef = useRef35(null);
28719
- const containerRef = useRef35(null);
28720
- useEffect49(() => {
28750
+ const [isOpen, setIsOpen] = useState64(false);
28751
+ const [shouldRender, setShouldRender] = useState64(false);
28752
+ const [isVisible, setIsVisible] = useState64(false);
28753
+ const [isMobile, setIsMobile] = useState64(false);
28754
+ const [actualPlacement, setActualPlacement] = useState64(placement);
28755
+ const dropdownRef = useRef36(null);
28756
+ const triggerRef = useRef36(null);
28757
+ const containerRef = useRef36(null);
28758
+ useEffect50(() => {
28721
28759
  if (isOpen) {
28722
28760
  setShouldRender(true);
28723
28761
  let id2 = 0;
@@ -28733,7 +28771,7 @@ var FiltersDropdown = ({
28733
28771
  const t = setTimeout(() => setShouldRender(false), ANIMATION_MS);
28734
28772
  return () => clearTimeout(t);
28735
28773
  }, [isOpen]);
28736
- useEffect49(() => {
28774
+ useEffect50(() => {
28737
28775
  if (!responsive) {
28738
28776
  setIsMobile(false);
28739
28777
  return;
@@ -28745,7 +28783,7 @@ var FiltersDropdown = ({
28745
28783
  window.addEventListener("resize", checkMobile);
28746
28784
  return () => window.removeEventListener("resize", checkMobile);
28747
28785
  }, [responsive]);
28748
- useEffect49(() => {
28786
+ useEffect50(() => {
28749
28787
  if (!isOpen || isMobile || !triggerRef.current) return;
28750
28788
  const calculateOptimalPlacement = () => {
28751
28789
  const trigger = triggerRef.current;
@@ -28771,7 +28809,7 @@ var FiltersDropdown = ({
28771
28809
  window.addEventListener("resize", calculateOptimalPlacement);
28772
28810
  return () => window.removeEventListener("resize", calculateOptimalPlacement);
28773
28811
  }, [isOpen, isMobile, placement]);
28774
- const [selectedFilters, setSelectedFilters] = useState63(() => {
28812
+ const [selectedFilters, setSelectedFilters] = useState64(() => {
28775
28813
  if (currentFilters) {
28776
28814
  return { ...currentFilters };
28777
28815
  }
@@ -28782,12 +28820,12 @@ var FiltersDropdown = ({
28782
28820
  return initial;
28783
28821
  });
28784
28822
  const currentFiltersStr = currentFilters ? JSON.stringify(currentFilters) : "";
28785
- useEffect49(() => {
28823
+ useEffect50(() => {
28786
28824
  if (currentFilters) {
28787
28825
  setSelectedFilters({ ...currentFilters });
28788
28826
  }
28789
28827
  }, [currentFiltersStr]);
28790
- useEffect49(() => {
28828
+ useEffect50(() => {
28791
28829
  const handleClickOutside = (event) => {
28792
28830
  if (containerRef.current && !containerRef.current.contains(event.target)) {
28793
28831
  setIsOpen(false);
@@ -28804,7 +28842,7 @@ var FiltersDropdown = ({
28804
28842
  };
28805
28843
  }
28806
28844
  }, [isOpen, placement]);
28807
- useEffect49(() => {
28845
+ useEffect50(() => {
28808
28846
  const handleEscape = (e) => {
28809
28847
  if (e.key === "Escape" && isOpen) {
28810
28848
  setIsOpen(false);
@@ -28991,7 +29029,7 @@ var FiltersDropdown = ({
28991
29029
  ] });
28992
29030
  };
28993
29031
  var useFiltersDropdown = (initialSections) => {
28994
- const [appliedFilters, setAppliedFilters] = useState63(() => {
29032
+ const [appliedFilters, setAppliedFilters] = useState64(() => {
28995
29033
  const initial = {};
28996
29034
  initialSections.forEach((section) => {
28997
29035
  if (section.defaultSelected) {
@@ -29070,13 +29108,13 @@ function KnowledgeBaseLinksManager({
29070
29108
  }
29071
29109
 
29072
29110
  // src/components/features/loading-provider.tsx
29073
- import { createContext as createContext6, useContext as useContext6, useState as useState64, useEffect as useEffect50 } from "react";
29111
+ import { createContext as createContext6, useContext as useContext6, useState as useState65, useEffect as useEffect51 } from "react";
29074
29112
  import { jsx as jsx218, jsxs as jsxs169 } from "react/jsx-runtime";
29075
29113
  var LoadingContext = createContext6(void 0);
29076
29114
  function LoadingProvider({ children }) {
29077
- const [isLoading, setIsLoading] = useState64(false);
29078
- const [progress, setProgress] = useState64(0);
29079
- useEffect50(() => {
29115
+ const [isLoading, setIsLoading] = useState65(false);
29116
+ const [progress, setProgress] = useState65(0);
29117
+ useEffect51(() => {
29080
29118
  let interval;
29081
29119
  if (isLoading) {
29082
29120
  setProgress(10);
@@ -29121,7 +29159,7 @@ function useLoading() {
29121
29159
  }
29122
29160
 
29123
29161
  // src/components/features/media-gallery-manager.tsx
29124
- import { useState as useState65, useRef as useRef36, useCallback as useCallback26 } from "react";
29162
+ import { useState as useState66, useRef as useRef37, useCallback as useCallback26 } from "react";
29125
29163
  import {
29126
29164
  Upload,
29127
29165
  Image as ImageIcon2,
@@ -29141,9 +29179,9 @@ function MediaGalleryManager({
29141
29179
  modalTitle = "Media Gallery",
29142
29180
  className = ""
29143
29181
  }) {
29144
- const fileInputRef = useRef36(null);
29145
- const [deletingIndex, setDeletingIndex] = useState65(null);
29146
- const [draggedIndex, setDraggedIndex] = useState65(null);
29182
+ const fileInputRef = useRef37(null);
29183
+ const [deletingIndex, setDeletingIndex] = useState66(null);
29184
+ const [draggedIndex, setDraggedIndex] = useState66(null);
29147
29185
  const handleFileSelect = useCallback26(async (event) => {
29148
29186
  const file = event.target.files?.[0];
29149
29187
  if (!file) return;
@@ -29349,7 +29387,7 @@ function OSTypeBadgeGroup({
29349
29387
  }
29350
29388
 
29351
29389
  // src/components/features/parallax-image-showcase.tsx
29352
- import { useEffect as useEffect51, useState as useState66, useRef as useRef37 } from "react";
29390
+ import { useEffect as useEffect52, useState as useState67, useRef as useRef38 } from "react";
29353
29391
  import { motion, useScroll, useTransform, useMotionValue, useSpring } from "framer-motion";
29354
29392
  import { jsx as jsx222, jsxs as jsxs172 } from "react/jsx-runtime";
29355
29393
  var ParallaxImageShowcase = ({
@@ -29367,9 +29405,9 @@ var ParallaxImageShowcase = ({
29367
29405
  const springConfig = { stiffness: 100, damping: 30 };
29368
29406
  const mouseXSpring = useSpring(mouseX, springConfig);
29369
29407
  const mouseYSpring = useSpring(mouseY, springConfig);
29370
- const [componentRect, setComponentRect] = useState66(null);
29371
- const componentRef = useRef37(null);
29372
- useEffect51(() => {
29408
+ const [componentRect, setComponentRect] = useState67(null);
29409
+ const componentRef = useRef38(null);
29410
+ useEffect52(() => {
29373
29411
  const updateRect = () => {
29374
29412
  if (componentRef.current) {
29375
29413
  setComponentRect(componentRef.current.getBoundingClientRect());
@@ -29383,7 +29421,7 @@ var ParallaxImageShowcase = ({
29383
29421
  window.removeEventListener("scroll", updateRect);
29384
29422
  };
29385
29423
  }, []);
29386
- useEffect51(() => {
29424
+ useEffect52(() => {
29387
29425
  const handleGlobalMouseMove = (e) => {
29388
29426
  if (!componentRect) return;
29389
29427
  const centerX = componentRect.left + componentRect.width / 2;
@@ -29908,7 +29946,7 @@ function PushButtonSelector({
29908
29946
  }
29909
29947
 
29910
29948
  // src/components/features/release-media-manager.tsx
29911
- import { useState as useState67, useRef as useRef38 } from "react";
29949
+ import { useState as useState68, useRef as useRef39 } from "react";
29912
29950
  import { Trash2 as Trash24, Plus as Plus5, Image as ImageIcon3, Video as VideoIcon2, Upload as Upload2, Loader2 as Loader24, GripVertical as GripVertical2 } from "lucide-react";
29913
29951
  import { jsx as jsx226, jsxs as jsxs176 } from "react/jsx-runtime";
29914
29952
  function ReleaseMediaManager({
@@ -29917,8 +29955,8 @@ function ReleaseMediaManager({
29917
29955
  onUpload,
29918
29956
  className = ""
29919
29957
  }) {
29920
- const fileInputRef = useRef38(null);
29921
- const [uploadingIndex, setUploadingIndex] = useState67(null);
29958
+ const fileInputRef = useRef39(null);
29959
+ const [uploadingIndex, setUploadingIndex] = useState68(null);
29922
29960
  const handleFileSelect = async (event) => {
29923
29961
  const file = event.target.files?.[0];
29924
29962
  if (!file) return;
@@ -30176,7 +30214,7 @@ var SelectButton = React96.forwardRef(
30176
30214
  SelectButton.displayName = "SelectButton";
30177
30215
 
30178
30216
  // src/components/features/seo-editor-preview.tsx
30179
- import { useState as useState68 } from "react";
30217
+ import { useState as useState69 } from "react";
30180
30218
  import { Globe as Globe3, ExternalLink as ExternalLink6, Upload as Upload3, X as X6, Loader2 as Loader25 } from "lucide-react";
30181
30219
  import { Fragment as Fragment43, jsx as jsx228, jsxs as jsxs178 } from "react/jsx-runtime";
30182
30220
  function SEOEditorPreview({
@@ -30199,9 +30237,9 @@ function SEOEditorPreview({
30199
30237
  disabled = false,
30200
30238
  className = ""
30201
30239
  }) {
30202
- const [imageError, setImageError] = useState68(false);
30203
- const [isUploading, setIsUploading] = useState68(false);
30204
- const [fileInputRef, setFileInputRef] = useState68(null);
30240
+ const [imageError, setImageError] = useState69(false);
30241
+ const [isUploading, setIsUploading] = useState69(false);
30242
+ const [fileInputRef, setFileInputRef] = useState69(null);
30205
30243
  const seoTitleLength = (seoTitle || "").length;
30206
30244
  const seoTitleTooLong = seoTitleLength > SEO_TITLE_MAX_LENGTH;
30207
30245
  const seoDescriptionLength = (seoDescription || "").length;
@@ -30697,7 +30735,7 @@ function StatusFilterComponent({
30697
30735
  }
30698
30736
 
30699
30737
  // src/components/features/tags-selector.tsx
30700
- import { useState as useState69 } from "react";
30738
+ import { useState as useState70 } from "react";
30701
30739
  import { Search as Search2, X as X7, Plus as Plus6, Loader2 as Loader26 } from "lucide-react";
30702
30740
  import { jsx as jsx232, jsxs as jsxs181 } from "react/jsx-runtime";
30703
30741
  function TagsSelector({
@@ -30711,9 +30749,9 @@ function TagsSelector({
30711
30749
  disabled = false,
30712
30750
  allowCreate = true
30713
30751
  }) {
30714
- const [searchQuery, setSearchQuery] = useState69("");
30715
- const [showDropdown, setShowDropdown] = useState69(false);
30716
- const [isCreating, setIsCreating] = useState69(false);
30752
+ const [searchQuery, setSearchQuery] = useState70("");
30753
+ const [showDropdown, setShowDropdown] = useState70(false);
30754
+ const [isCreating, setIsCreating] = useState70(false);
30717
30755
  const handleTagAdd = (tagId) => {
30718
30756
  if (!selectedTagIds.includes(tagId) && selectedTagIds.length < maxTags) {
30719
30757
  onTagsChange([...selectedTagIds, tagId]);
@@ -30927,7 +30965,7 @@ function getCaptionsUrl(entityType, entityId, srtContent) {
30927
30965
  }
30928
30966
 
30929
30967
  // src/components/features/video-source-selector.tsx
30930
- import { useState as useState70, useCallback as useCallback27 } from "react";
30968
+ import { useState as useState71, useCallback as useCallback27 } from "react";
30931
30969
  import { Upload as Upload4, X as X8, Video as VideoIcon3 } from "lucide-react";
30932
30970
  init_button2();
30933
30971
  import { jsx as jsx235, jsxs as jsxs183 } from "react/jsx-runtime";
@@ -30953,10 +30991,10 @@ function VideoSourceSelector({
30953
30991
  showTitle = true,
30954
30992
  className = ""
30955
30993
  }) {
30956
- const [isUploading, setIsUploading] = useState70(false);
30957
- const [uploadProgress, setUploadProgress] = useState70(0);
30958
- const [uploadMessage, setUploadMessage] = useState70("");
30959
- const [uploadError, setUploadError] = useState70(null);
30994
+ const [isUploading, setIsUploading] = useState71(false);
30995
+ const [uploadProgress, setUploadProgress] = useState71(0);
30996
+ const [uploadMessage, setUploadMessage] = useState71("");
30997
+ const [uploadError, setUploadError] = useState71(null);
30960
30998
  const handleUploadClick = useCallback27(() => {
30961
30999
  const input = document.createElement("input");
30962
31000
  input.type = "file";
@@ -31296,7 +31334,7 @@ function TranscriptSummaryEditor({
31296
31334
  }
31297
31335
 
31298
31336
  // src/components/features/highlight-video-section.tsx
31299
- import { useState as useState71 } from "react";
31337
+ import { useState as useState72 } from "react";
31300
31338
  import { Sparkles as Sparkles4, Upload as Upload5 } from "lucide-react";
31301
31339
  init_button2();
31302
31340
 
@@ -31595,7 +31633,7 @@ function HighlightVideoSection({
31595
31633
  disabled = false,
31596
31634
  className = ""
31597
31635
  }) {
31598
- const [uploadError, setUploadError] = useState71(null);
31636
+ const [uploadError, setUploadError] = useState72(null);
31599
31637
  const handleUploadClick = () => {
31600
31638
  const input = document.createElement("input");
31601
31639
  input.type = "file";
@@ -32426,7 +32464,7 @@ function ViewToggle({
32426
32464
 
32427
32465
  // src/components/features/policy-configuration-panel.tsx
32428
32466
  init_cn();
32429
- import { useEffect as useEffect52, useState as useState72 } from "react";
32467
+ import { useEffect as useEffect53, useState as useState73 } from "react";
32430
32468
  import { ChevronDown as ChevronDown8, Shield as Shield2 } from "lucide-react";
32431
32469
  init_button2();
32432
32470
  import { Fragment as Fragment44, jsx as jsx253, jsxs as jsxs197 } from "react/jsx-runtime";
@@ -32602,9 +32640,9 @@ var PolicyConfigurationPanel = ({
32602
32640
  onCategoryPermissionChange,
32603
32641
  className
32604
32642
  }) => {
32605
- const [expandedIds, setExpandedIds] = useState72(/* @__PURE__ */ new Set());
32606
- const [bulkLevels, setBulkLevels] = useState72({});
32607
- useEffect52(() => {
32643
+ const [expandedIds, setExpandedIds] = useState73(/* @__PURE__ */ new Set());
32644
+ const [bulkLevels, setBulkLevels] = useState73({});
32645
+ useEffect53(() => {
32608
32646
  setBulkLevels({});
32609
32647
  }, [editMode]);
32610
32648
  const handleToggle = (categoryId) => {
@@ -32644,7 +32682,7 @@ PolicyConfigurationPanel.displayName = "PolicyConfigurationPanel";
32644
32682
  init_button2();
32645
32683
 
32646
32684
  // src/components/ui/phone-input.tsx
32647
- import { useCallback as useCallback28, useEffect as useEffect53, useMemo as useMemo30, useRef as useRef39, useState as useState73 } from "react";
32685
+ import { useCallback as useCallback28, useEffect as useEffect54, useMemo as useMemo30, useRef as useRef40, useState as useState74 } from "react";
32648
32686
  import { jsx as jsx254, jsxs as jsxs198 } from "react/jsx-runtime";
32649
32687
  function PhoneInput({
32650
32688
  value,
@@ -32661,8 +32699,8 @@ function PhoneInput({
32661
32699
  () => [...priority, ...others].find((c) => c.code === countryCode),
32662
32700
  [countryCode, priority, others]
32663
32701
  );
32664
- const [isInvalid, setIsInvalid] = useState73(false);
32665
- const debounceRef = useRef39(null);
32702
+ const [isInvalid, setIsInvalid] = useState74(false);
32703
+ const debounceRef = useRef40(null);
32666
32704
  const digitCount = useCallback28((val) => val.replace(/[^0-9]/g, "").length, []);
32667
32705
  const runValidation = useCallback28((phone) => {
32668
32706
  if (!phone || digitCount(phone) === 0) {
@@ -32678,7 +32716,7 @@ function PhoneInput({
32678
32716
  if (debounceRef.current) clearTimeout(debounceRef.current);
32679
32717
  debounceRef.current = setTimeout(() => runValidation(phone), 300);
32680
32718
  }, [runValidation]);
32681
- useEffect53(() => {
32719
+ useEffect54(() => {
32682
32720
  return () => {
32683
32721
  if (debounceRef.current) clearTimeout(debounceRef.current);
32684
32722
  };
@@ -32745,7 +32783,7 @@ function CountryOption({ country }) {
32745
32783
  // src/components/features/waitlist-form.tsx
32746
32784
  init_cn();
32747
32785
  import { getCountries as getCountries2 } from "libphonenumber-js";
32748
- import { useEffect as useEffect54, useState as useState74 } from "react";
32786
+ import { useEffect as useEffect55, useState as useState75 } from "react";
32749
32787
  import { Fragment as Fragment45, jsx as jsx255, jsxs as jsxs199 } from "react/jsx-runtime";
32750
32788
  function WaitlistForm({
32751
32789
  id = "waitlist-form",
@@ -32765,22 +32803,22 @@ function WaitlistForm({
32765
32803
  privacyPolicyUrl,
32766
32804
  consentText = "I agree to receive recurring automated text messages at the phone number provided. Msg & data rates may apply. Msg frequency varies. Reply HELP for help and STOP to cancel."
32767
32805
  }) {
32768
- const [email, setEmail] = useState74(defaultEmail);
32769
- const [phone, setPhone] = useState74(defaultPhone);
32770
- const [countryCode, setCountryCode] = useState74("US");
32806
+ const [email, setEmail] = useState75(defaultEmail);
32807
+ const [phone, setPhone] = useState75(defaultPhone);
32808
+ const [countryCode, setCountryCode] = useState75("US");
32771
32809
  const { toast } = useToast();
32772
32810
  const { honeypotInputProps, getSignals, resetSignals } = useHumanitySignals();
32773
- const [smsConsent, setSmsConsent] = useState74(false);
32774
- const [isClient, setIsClient] = useState74(false);
32775
- const [isPhoneInvalid, setIsPhoneInvalid] = useState74(false);
32776
- const [showConsentError, setShowConsentError] = useState74(false);
32811
+ const [smsConsent, setSmsConsent] = useState75(false);
32812
+ const [isClient, setIsClient] = useState75(false);
32813
+ const [isPhoneInvalid, setIsPhoneInvalid] = useState75(false);
32814
+ const [showConsentError, setShowConsentError] = useState75(false);
32777
32815
  const isMailDomainGeneric = hasGenericEmailDomain(email);
32778
- useEffect54(() => {
32816
+ useEffect55(() => {
32779
32817
  if (defaultEmail) {
32780
32818
  setEmail(defaultEmail);
32781
32819
  }
32782
32820
  }, [defaultEmail]);
32783
- useEffect54(() => {
32821
+ useEffect55(() => {
32784
32822
  setIsClient(true);
32785
32823
  if (!geoApiUrl) return;
32786
32824
  const supportedCountries = new Set(getCountries2());
@@ -33168,7 +33206,7 @@ function useOptionalNotifications() {
33168
33206
  }
33169
33207
 
33170
33208
  // src/components/features/notifications/notification-drawer.tsx
33171
- import { useEffect as useEffect58, useRef as useRef42 } from "react";
33209
+ import { useEffect as useEffect59, useRef as useRef43 } from "react";
33172
33210
 
33173
33211
  // src/components/navigation/app-layout-context.ts
33174
33212
  import { createContext as createContext8, useContext as useContext8 } from "react";
@@ -33663,7 +33701,7 @@ init_button2();
33663
33701
  init_cn();
33664
33702
 
33665
33703
  // src/components/features/notifications/notification-tile.tsx
33666
- import { useMemo as useMemo32, useEffect as useEffect57, useState as useState77 } from "react";
33704
+ import { useMemo as useMemo32, useEffect as useEffect58, useState as useState78 } from "react";
33667
33705
  init_cn();
33668
33706
  import { jsx as jsx258, jsxs as jsxs201 } from "react/jsx-runtime";
33669
33707
  var variantBySeverity = {
@@ -33704,14 +33742,14 @@ function NotificationTile({
33704
33742
  settled
33705
33743
  } = notification;
33706
33744
  const accentVariant = (severity ? variantBySeverity[severity] : void 0) ?? variant;
33707
- const [failedImageUrl, setFailedImageUrl] = useState77(null);
33745
+ const [failedImageUrl, setFailedImageUrl] = useState78(null);
33708
33746
  const image = imageUrl && imageUrl !== failedImageUrl ? imageUrl : void 0;
33709
33747
  const createdAtDate = new Date(createdAt);
33710
33748
  const createdAtIso = Number.isNaN(createdAtDate.getTime()) ? null : createdAtDate.toISOString();
33711
33749
  const initialElapsed = useMemo32(() => Date.now() - createdAt, [createdAt]);
33712
33750
  const isLive = !read && !settled && initialElapsed < liveDurationMs;
33713
33751
  const counting = isLive && !paused;
33714
- useEffect57(() => {
33752
+ useEffect58(() => {
33715
33753
  if (!counting) return;
33716
33754
  const remaining = Math.max(0, liveDurationMs - initialElapsed);
33717
33755
  const timer = window.setTimeout(() => {
@@ -33936,11 +33974,11 @@ function DrawerScrollList({
33936
33974
  loadMoreRootMargin,
33937
33975
  renderTile
33938
33976
  }) {
33939
- const scrollRef = useRef42(null);
33940
- const sentinelRef = useRef42(null);
33941
- const loadMoreRef = useRef42(loadMore);
33977
+ const scrollRef = useRef43(null);
33978
+ const sentinelRef = useRef43(null);
33979
+ const loadMoreRef = useRef43(loadMore);
33942
33980
  loadMoreRef.current = loadMore;
33943
- useEffect58(() => {
33981
+ useEffect59(() => {
33944
33982
  if (!loadMore || !hasMore || isLoadingMore) return;
33945
33983
  const sentinel = sentinelRef.current;
33946
33984
  const root = scrollRef.current;
@@ -34160,7 +34198,7 @@ function NotificationPopups({
34160
34198
 
34161
34199
  // src/components/features/notifications/approval-request-notification-tile.tsx
34162
34200
  init_button2();
34163
- import { useMemo as useMemo33, useState as useState78 } from "react";
34201
+ import { useMemo as useMemo33, useState as useState79 } from "react";
34164
34202
 
34165
34203
  // src/components/chat/types/chat.types.ts
34166
34204
  var CHAT_TYPE = {
@@ -34376,10 +34414,10 @@ function ApprovalRequestNotificationTile({
34376
34414
  defaultExpanded = false,
34377
34415
  className
34378
34416
  }) {
34379
- const [expanded, setExpanded] = useState78(defaultExpanded);
34380
- const [pinned, setPinned] = useState78(defaultExpanded);
34381
- const [processing, setProcessing] = useState78(false);
34382
- const [localStatus, setLocalStatus] = useState78(null);
34417
+ const [expanded, setExpanded] = useState79(defaultExpanded);
34418
+ const [pinned, setPinned] = useState79(defaultExpanded);
34419
+ const [processing, setProcessing] = useState79(false);
34420
+ const [localStatus, setLocalStatus] = useState79(null);
34383
34421
  const approval = getApprovalMeta(notification);
34384
34422
  const resolvedStatus = resolutionToStatus(approval?.resolution);
34385
34423
  const status = resolvedStatus !== "pending" ? resolvedStatus : localStatus ?? "pending";
@@ -34480,12 +34518,12 @@ function useOptionalTimeTracker() {
34480
34518
 
34481
34519
  // src/components/features/time-tracker/time-tracker-panel.tsx
34482
34520
  init_cn();
34483
- import { useEffect as useEffect60, useState as useState81 } from "react";
34521
+ import { useEffect as useEffect61, useState as useState82 } from "react";
34484
34522
  init_button();
34485
34523
  init_split_button();
34486
34524
 
34487
34525
  // src/components/features/time-tracker/use-tracker-clock.ts
34488
- import { useEffect as useEffect59, useState as useState80 } from "react";
34526
+ import { useEffect as useEffect60, useState as useState81 } from "react";
34489
34527
  function formatElapsed(totalMs) {
34490
34528
  const totalSeconds = Math.max(0, Math.floor(totalMs / 1e3));
34491
34529
  const hours = Math.floor(totalSeconds / 3600);
@@ -34495,8 +34533,8 @@ function formatElapsed(totalMs) {
34495
34533
  return `${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;
34496
34534
  }
34497
34535
  function useTrackerClock({ status, runningSince, accumulatedMs = 0 }) {
34498
- const [now, setNow] = useState80(() => Date.now());
34499
- useEffect59(() => {
34536
+ const [now, setNow] = useState81(() => Date.now());
34537
+ useEffect60(() => {
34500
34538
  if (status !== "tracking") return;
34501
34539
  setNow(Date.now());
34502
34540
  const id = setInterval(() => setNow(Date.now()), 1e3);
@@ -34551,12 +34589,12 @@ function TimeTrackerPanel({
34551
34589
  className
34552
34590
  }) {
34553
34591
  const elapsedLabel = useTrackerClock({ status, runningSince, accumulatedMs });
34554
- const [showValidationError, setShowValidationError] = useState81(false);
34592
+ const [showValidationError, setShowValidationError] = useState82(false);
34555
34593
  const isRunning = status === "tracking";
34556
34594
  const isActive = status !== "ready";
34557
34595
  const hasContent = selectedTicketId != null || notes.trim() !== "";
34558
34596
  const showFieldError = isActive && showValidationError && !hasContent;
34559
- useEffect60(() => {
34597
+ useEffect61(() => {
34560
34598
  if (status === "ready") setShowValidationError(false);
34561
34599
  }, [status]);
34562
34600
  const handleSubmit = () => {
@@ -34807,7 +34845,7 @@ function LastEntryRow({ entry, onClick }) {
34807
34845
  // src/components/features/time-tracker/time-tracker-header-button.tsx
34808
34846
  init_cn();
34809
34847
  import * as PopoverPrimitive5 from "@radix-ui/react-popover";
34810
- import { useEffect as useEffect61, useRef as useRef43 } from "react";
34848
+ import { useEffect as useEffect62, useRef as useRef44 } from "react";
34811
34849
 
34812
34850
  // src/components/navigation/header-button.tsx
34813
34851
  init_cn();
@@ -34846,11 +34884,11 @@ function TimeTrackerHeaderButton({ className, disabled }) {
34846
34884
  const layoutContainer = useAppLayoutDrawerContainer();
34847
34885
  const coordination = useAppLayoutDrawerCoordination();
34848
34886
  const isOpen = ctx?.isOpen ?? false;
34849
- const isOpenRef = useRef43(isOpen);
34887
+ const isOpenRef = useRef44(isOpen);
34850
34888
  isOpenRef.current = isOpen;
34851
- const closeRef = useRef43(ctx?.close);
34889
+ const closeRef = useRef44(ctx?.close);
34852
34890
  closeRef.current = ctx?.close;
34853
- const selfHandleRef = useRef43(null);
34891
+ const selfHandleRef = useRef44(null);
34854
34892
  if (!selfHandleRef.current) {
34855
34893
  selfHandleRef.current = {
34856
34894
  close: () => {
@@ -34858,10 +34896,10 @@ function TimeTrackerHeaderButton({ className, disabled }) {
34858
34896
  }
34859
34897
  };
34860
34898
  }
34861
- useEffect61(() => {
34899
+ useEffect62(() => {
34862
34900
  if (isOpen) coordination?.notifyDrawerDidOpen(selfHandleRef.current ?? void 0);
34863
34901
  }, [isOpen, coordination]);
34864
- useEffect61(() => {
34902
+ useEffect62(() => {
34865
34903
  if (!selfHandleRef.current) return;
34866
34904
  return coordination?.registerDrawer(selfHandleRef.current);
34867
34905
  }, [coordination]);
@@ -35478,13 +35516,13 @@ function EmptyState2() {
35478
35516
  }
35479
35517
 
35480
35518
  // src/components/features/board/use-board-collapse.ts
35481
- import { useCallback as useCallback33, useState as useState83 } from "react";
35519
+ import { useCallback as useCallback33, useState as useState84 } from "react";
35482
35520
  function useBoardCollapse(storageKey) {
35483
35521
  const [persisted, setPersisted] = useLocalStorage(
35484
35522
  storageKey ?? "__board_collapse_unused__",
35485
35523
  {}
35486
35524
  );
35487
- const [memory, setMemory] = useState83({});
35525
+ const [memory, setMemory] = useState84({});
35488
35526
  const collapsed = storageKey ? persisted : memory;
35489
35527
  const setMap = storageKey ? setPersisted : setMemory;
35490
35528
  const toggle = useCallback33(
@@ -35875,18 +35913,18 @@ function SortableRow({
35875
35913
 
35876
35914
  // src/components/navigation/header.tsx
35877
35915
  init_next_link();
35878
- import React110, { useEffect as useEffect64, useRef as useRef47, useState as useState85 } from "react";
35916
+ import React110, { useEffect as useEffect65, useRef as useRef48, useState as useState86 } from "react";
35879
35917
  init_button2();
35880
35918
 
35881
35919
  // src/components/navigation/mobile-nav-panel.tsx
35882
- import { useRef as useRef46 } from "react";
35920
+ import { useRef as useRef47 } from "react";
35883
35921
  import { usePreventScroll as usePreventScroll3 } from "@react-aria/overlays";
35884
35922
  init_button2();
35885
35923
  import { X as X10 } from "lucide-react";
35886
35924
  import { Fragment as Fragment52, jsx as jsx273, jsxs as jsxs212 } from "react/jsx-runtime";
35887
35925
  var MOBILE_NAV_PANEL_ID = "mobile-nav-panel";
35888
35926
  function MobileNavPanel({ isOpen, config }) {
35889
- const panelRef = useRef46(null);
35927
+ const panelRef = useRef47(null);
35890
35928
  usePreventScroll3({ isDisabled: !isOpen });
35891
35929
  useFocusTrap(panelRef, isOpen, { onEscape: config.onClose });
35892
35930
  const headerHeight = useHeaderHeight(64, { enabled: isOpen });
@@ -36044,12 +36082,12 @@ function MingoAiButton({ source, icon, label = "Mingo AI", className, onClick, .
36044
36082
  // src/components/navigation/header.tsx
36045
36083
  import { Fragment as Fragment53, jsx as jsx275, jsxs as jsxs214 } from "react/jsx-runtime";
36046
36084
  function Header2({ config, platform }) {
36047
- const [show, setShow] = useState85(true);
36048
- const [lastScrollY, setLastScrollY] = useState85(0);
36049
- const [openDropdowns, setOpenDropdowns] = useState85({});
36050
- const dropdownRefs = useRef47({});
36051
- const triggerRefs = useRef47({});
36052
- useEffect64(() => {
36085
+ const [show, setShow] = useState86(true);
36086
+ const [lastScrollY, setLastScrollY] = useState86(0);
36087
+ const [openDropdowns, setOpenDropdowns] = useState86({});
36088
+ const dropdownRefs = useRef48({});
36089
+ const triggerRefs = useRef48({});
36090
+ useEffect65(() => {
36053
36091
  const handleClickOutside = (event) => {
36054
36092
  const target = event.target;
36055
36093
  if (!target) return;
@@ -36078,14 +36116,14 @@ function Header2({ config, platform }) {
36078
36116
  document.removeEventListener("keydown", handleEscapeKey);
36079
36117
  };
36080
36118
  }, [openDropdowns]);
36081
- useEffect64(() => {
36119
+ useEffect65(() => {
36082
36120
  return () => {
36083
36121
  setOpenDropdowns({});
36084
36122
  dropdownRefs.current = {};
36085
36123
  triggerRefs.current = {};
36086
36124
  };
36087
36125
  }, []);
36088
- useEffect64(() => {
36126
+ useEffect65(() => {
36089
36127
  if (!config.autoHide) {
36090
36128
  setShow(true);
36091
36129
  return;
@@ -36326,7 +36364,7 @@ function Header2({ config, platform }) {
36326
36364
  }
36327
36365
 
36328
36366
  // src/components/navigation/client-only-header.tsx
36329
- import { useState as useState86, useEffect as useEffect65 } from "react";
36367
+ import { useState as useState87, useEffect as useEffect66 } from "react";
36330
36368
 
36331
36369
  // src/components/navigation/header-skeleton.tsx
36332
36370
  import { jsx as jsx276, jsxs as jsxs215 } from "react/jsx-runtime";
@@ -36374,8 +36412,8 @@ function HeaderSkeleton({ config }) {
36374
36412
  // src/components/navigation/client-only-header.tsx
36375
36413
  import { jsx as jsx277 } from "react/jsx-runtime";
36376
36414
  function ClientOnlyHeader({ config, skeleton }) {
36377
- const [isClient, setIsClient] = useState86(false);
36378
- useEffect65(() => {
36415
+ const [isClient, setIsClient] = useState87(false);
36416
+ useEffect66(() => {
36379
36417
  setIsClient(true);
36380
36418
  }, []);
36381
36419
  if (!isClient) {
@@ -36385,20 +36423,20 @@ function ClientOnlyHeader({ config, skeleton }) {
36385
36423
  }
36386
36424
 
36387
36425
  // src/components/navigation/sliding-sidebar.tsx
36388
- import { useState as useState87, useEffect as useEffect66, useRef as useRef48 } from "react";
36426
+ import { useState as useState88, useEffect as useEffect67, useRef as useRef49 } from "react";
36389
36427
  import { motion as motion2, AnimatePresence, useReducedMotion } from "framer-motion";
36390
36428
  import { usePreventScroll as usePreventScroll4 } from "@react-aria/overlays";
36391
36429
  init_button2();
36392
36430
  import { Fragment as Fragment54, jsx as jsx278, jsxs as jsxs216 } from "react/jsx-runtime";
36393
36431
  function SlidingSidebar({ config }) {
36394
- const [expandedItems, setExpandedItems] = useState87(/* @__PURE__ */ new Set());
36395
- const [mounted, setMounted] = useState87(false);
36432
+ const [expandedItems, setExpandedItems] = useState88(/* @__PURE__ */ new Set());
36433
+ const [mounted, setMounted] = useState88(false);
36396
36434
  const headerHeight = useHeaderHeight();
36397
- const asideRef = useRef48(null);
36435
+ const asideRef = useRef49(null);
36398
36436
  const prefersReducedMotion2 = useReducedMotion();
36399
36437
  usePreventScroll4({ isDisabled: !config.isOpen });
36400
36438
  useFocusTrap(asideRef, config.isOpen, { onEscape: config.onClose, contain: false });
36401
- useEffect66(() => {
36439
+ useEffect67(() => {
36402
36440
  setMounted(true);
36403
36441
  }, []);
36404
36442
  const toggleExpanded = (itemId) => {
@@ -36566,7 +36604,7 @@ function SlidingSidebar({ config }) {
36566
36604
  }
36567
36605
 
36568
36606
  // src/components/navigation/sticky-section-nav.tsx
36569
- import { useEffect as useEffect67, useState as useState88, useCallback as useCallback35, useRef as useRef49 } from "react";
36607
+ import { useEffect as useEffect68, useState as useState89, useCallback as useCallback35, useRef as useRef50 } from "react";
36570
36608
  import { jsx as jsx279, jsxs as jsxs217 } from "react/jsx-runtime";
36571
36609
  function StickySectionNav({
36572
36610
  sections,
@@ -36627,8 +36665,8 @@ function StickySectionNav({
36627
36665
  ] });
36628
36666
  }
36629
36667
  function useSectionNavigation(sections, options) {
36630
- const [activeSection, setActiveSection] = useState88(sections[0]?.id || "");
36631
- const isScrollingFromClick = useRef49(false);
36668
+ const [activeSection, setActiveSection] = useState89(sections[0]?.id || "");
36669
+ const isScrollingFromClick = useRef50(false);
36632
36670
  const { offset: offset2 = 100 } = options || {};
36633
36671
  const handleSectionClick = useCallback35((sectionId) => {
36634
36672
  const targetElement = document.getElementById(sectionId);
@@ -36640,14 +36678,14 @@ function useSectionNavigation(sections, options) {
36640
36678
  isScrollingFromClick.current = false;
36641
36679
  }, 500);
36642
36680
  }, [offset2]);
36643
- useEffect67(() => {
36681
+ useEffect68(() => {
36644
36682
  sections.forEach((section) => {
36645
36683
  if (section.ref.current && !section.ref.current.id) {
36646
36684
  section.ref.current.id = section.id;
36647
36685
  }
36648
36686
  });
36649
36687
  }, [sections]);
36650
- useEffect67(() => {
36688
+ useEffect68(() => {
36651
36689
  const handleScroll = () => {
36652
36690
  if (isScrollingFromClick.current) return;
36653
36691
  const scrollPosition = window.scrollY + offset2 + 50;
@@ -36680,7 +36718,7 @@ function useSectionNavigation(sections, options) {
36680
36718
  }
36681
36719
 
36682
36720
  // src/components/navigation/navigation-sidebar.tsx
36683
- import { useCallback as useCallback36, useEffect as useEffect68, useLayoutEffect as useLayoutEffect7, useMemo as useMemo37, useState as useState89 } from "react";
36721
+ import { useCallback as useCallback36, useEffect as useEffect69, useLayoutEffect as useLayoutEffect7, useMemo as useMemo37, useState as useState90 } from "react";
36684
36722
 
36685
36723
  // src/components/navigation/navigation-sidebar-header.tsx
36686
36724
  import { jsx as jsx280, jsxs as jsxs218 } from "react/jsx-runtime";
@@ -36828,12 +36866,12 @@ function NavigationSidebar({ config, disabled = false }) {
36828
36866
  STORAGE_KEY,
36829
36867
  config.minimized ?? false
36830
36868
  );
36831
- const [tabletMinimized, setTabletMinimized] = useState89(true);
36832
- useEffect68(() => {
36869
+ const [tabletMinimized, setTabletMinimized] = useState90(true);
36870
+ useEffect69(() => {
36833
36871
  if (isTablet) setTabletMinimized(true);
36834
36872
  }, [isTablet]);
36835
36873
  const minimized = isTablet ? tabletMinimized : desktopMinimized;
36836
- const [transitionsEnabled, setTransitionsEnabled] = useState89(false);
36874
+ const [transitionsEnabled, setTransitionsEnabled] = useState90(false);
36837
36875
  const isOverlayOpen = isTablet && !minimized;
36838
36876
  const showLabel = !minimized;
36839
36877
  const handleToggle = useCallback36(() => {
@@ -36847,7 +36885,7 @@ function NavigationSidebar({ config, disabled = false }) {
36847
36885
  const closeOverlay = useCallback36(() => {
36848
36886
  setTabletMinimized(true);
36849
36887
  }, []);
36850
- useEffect68(() => {
36888
+ useEffect69(() => {
36851
36889
  if (!isOverlayOpen) return;
36852
36890
  const handleKeyDown = (e) => {
36853
36891
  if (e.key === "Escape") closeOverlay();
@@ -37328,10 +37366,10 @@ function NotificationsHeaderButton({
37328
37366
  }
37329
37367
 
37330
37368
  // src/components/navigation/app-layout.tsx
37331
- import { Suspense as Suspense2, useCallback as useCallback38, useMemo as useMemo38, useRef as useRef51, useState as useState90 } from "react";
37369
+ import { Suspense as Suspense2, useCallback as useCallback38, useMemo as useMemo38, useRef as useRef52, useState as useState91 } from "react";
37332
37370
 
37333
37371
  // src/components/navigation/mobile-burger-menu.tsx
37334
- import React115, { useCallback as useCallback37, useRef as useRef50 } from "react";
37372
+ import React115, { useCallback as useCallback37, useRef as useRef51 } from "react";
37335
37373
  import { usePreventScroll as usePreventScroll5 } from "@react-aria/overlays";
37336
37374
  import { Fragment as Fragment56, jsx as jsx288, jsxs as jsxs226 } from "react/jsx-runtime";
37337
37375
  var HEADER_HEIGHT = 48;
@@ -37345,7 +37383,7 @@ var MobileBurgerMenu = React115.memo(function MobileBurgerMenu2({
37345
37383
  onLogout,
37346
37384
  disabled = false
37347
37385
  }) {
37348
- const panelRef = useRef50(null);
37386
+ const panelRef = useRef51(null);
37349
37387
  usePreventScroll5({ isDisabled: !isOpen });
37350
37388
  useFocusTrap(panelRef, isOpen, { onEscape: onClose });
37351
37389
  const handleItemClick = useCallback37((item) => {
@@ -37528,11 +37566,11 @@ function AppLayout({
37528
37566
  drawer,
37529
37567
  topBar
37530
37568
  }) {
37531
- const [mobileMenuOpen, setMobileMenuOpen] = useState90(false);
37532
- const [drawerContainer, setDrawerContainer] = useState90(null);
37533
- const mobileMenuOpenRef = useRef51(mobileMenuOpen);
37569
+ const [mobileMenuOpen, setMobileMenuOpen] = useState91(false);
37570
+ const [drawerContainer, setDrawerContainer] = useState91(null);
37571
+ const mobileMenuOpenRef = useRef52(mobileMenuOpen);
37534
37572
  mobileMenuOpenRef.current = mobileMenuOpen;
37535
- const drawerHandlesRef = useRef51(/* @__PURE__ */ new Set());
37573
+ const drawerHandlesRef = useRef52(/* @__PURE__ */ new Set());
37536
37574
  const handleToggleMobileMenu = useCallback38(() => {
37537
37575
  const opening = !mobileMenuOpenRef.current;
37538
37576
  if (opening) {
@@ -38159,7 +38197,7 @@ ScriptArguments.displayName = "ScriptArguments";
38159
38197
 
38160
38198
  // src/components/shared/onboarding/onboarding-walkthrough.tsx
38161
38199
  init_button2();
38162
- import React117, { useRef as useRef52, useCallback as useCallback39 } from "react";
38200
+ import React117, { useRef as useRef53, useCallback as useCallback39 } from "react";
38163
38201
 
38164
38202
  // src/components/shared/onboarding/onboarding-step-card.tsx
38165
38203
  import React116 from "react";
@@ -38283,10 +38321,10 @@ function OnboardingWalkthrough({
38283
38321
  allStepsComplete,
38284
38322
  markMultipleComplete
38285
38323
  } = useOnboardingState(storageKey);
38286
- const hasAutoMarkedRef = useRef52(false);
38287
- const autoMarkingInProgressRef = useRef52(false);
38288
- const lastCompletionStatusRef = useRef52(null);
38289
- const actionInProgressRef = useRef52(/* @__PURE__ */ new Set());
38324
+ const hasAutoMarkedRef = useRef53(false);
38325
+ const autoMarkingInProgressRef = useRef53(false);
38326
+ const lastCompletionStatusRef = useRef53(null);
38327
+ const actionInProgressRef = useRef53(/* @__PURE__ */ new Set());
38290
38328
  React117.useEffect(() => {
38291
38329
  if (isLoadingCompletion) {
38292
38330
  hasAutoMarkedRef.current = false;
@@ -38625,7 +38663,7 @@ function ServiceCard({ title, subtitle, icon, tag, rows, className }) {
38625
38663
  ] });
38626
38664
  }
38627
38665
  function ServiceCardRowItem({ row }) {
38628
- const [revealed, setRevealed] = useState91(false);
38666
+ const [revealed, setRevealed] = useState92(false);
38629
38667
  const { copy, copied } = useCopyToClipboard();
38630
38668
  const actions = useMemo39(() => ({ copy: true, open: !!row.href, reveal: !!row.isSecret, ...row.actions }), [row]);
38631
38669
  const displayValue = row.isSecret ? /* @__PURE__ */ jsx302(MaskedValue, { value: row.value, isRevealed: revealed }) : /* @__PURE__ */ jsx302("span", { children: row.value });
@@ -38974,7 +39012,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx307(ContentLoader, { ...props, va
38974
39012
 
38975
39013
  // src/components/ui/table/table.tsx
38976
39014
  init_cn();
38977
- import { useEffect as useEffect70, useRef as useRef54 } from "react";
39015
+ import { useEffect as useEffect71, useRef as useRef55 } from "react";
38978
39016
  init_pagination();
38979
39017
  init_button2();
38980
39018
 
@@ -39585,10 +39623,10 @@ function TableRow({
39585
39623
  }
39586
39624
 
39587
39625
  // src/components/ui/table/use-table-motion.ts
39588
- import { useEffect as useEffect69, useState as useState92 } from "react";
39626
+ import { useEffect as useEffect70, useState as useState93 } from "react";
39589
39627
  function useTableMotion(enabled) {
39590
- const [runtime, setRuntime] = useState92(null);
39591
- useEffect69(() => {
39628
+ const [runtime, setRuntime] = useState93(null);
39629
+ useEffect70(() => {
39592
39630
  if (!enabled || runtime) return;
39593
39631
  let active = true;
39594
39632
  import("framer-motion").then((m) => {
@@ -39734,10 +39772,10 @@ function Table({
39734
39772
  };
39735
39773
  const allSelected = selectedRows.length > 0 && selectedRows.length === data.length;
39736
39774
  const someSelected = selectedRows.length > 0 && selectedRows.length < data.length;
39737
- const sentinelRef = useRef54(null);
39738
- const onLoadMoreRef = useRef54(infiniteScroll?.onLoadMore);
39775
+ const sentinelRef = useRef55(null);
39776
+ const onLoadMoreRef = useRef55(infiniteScroll?.onLoadMore);
39739
39777
  onLoadMoreRef.current = infiniteScroll?.onLoadMore;
39740
- useEffect70(() => {
39778
+ useEffect71(() => {
39741
39779
  if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
39742
39780
  const sentinel = sentinelRef.current;
39743
39781
  if (!sentinel) return;
@@ -39955,7 +39993,7 @@ import { useMemo as useMemo40 } from "react";
39955
39993
 
39956
39994
  // src/components/ui/query-report-table/query-report-table-header.tsx
39957
39995
  init_cn();
39958
- import { useRef as useRef55, useState as useState93, useCallback as useCallback40 } from "react";
39996
+ import { useRef as useRef56, useState as useState94, useCallback as useCallback40 } from "react";
39959
39997
  import { jsx as jsx319, jsxs as jsxs252 } from "react/jsx-runtime";
39960
39998
  function QueryReportTableHeader({
39961
39999
  columns,
@@ -39984,8 +40022,8 @@ function QueryReportTableHeader({
39984
40022
  );
39985
40023
  }
39986
40024
  function TruncatedHeaderCell({ value, width }) {
39987
- const textRef = useRef55(null);
39988
- const [isTruncated, setIsTruncated] = useState93(false);
40025
+ const textRef = useRef56(null);
40026
+ const [isTruncated, setIsTruncated] = useState94(false);
39989
40027
  const checkTruncation = useCallback40(() => {
39990
40028
  const el = textRef.current;
39991
40029
  if (el) {
@@ -40014,7 +40052,7 @@ function TruncatedHeaderCell({ value, width }) {
40014
40052
 
40015
40053
  // src/components/ui/query-report-table/query-report-table-row.tsx
40016
40054
  init_cn();
40017
- import { useRef as useRef56, useState as useState94, useCallback as useCallback41 } from "react";
40055
+ import { useRef as useRef57, useState as useState95, useCallback as useCallback41 } from "react";
40018
40056
  import { jsx as jsx320, jsxs as jsxs253 } from "react/jsx-runtime";
40019
40057
  function QueryReportTableRow({
40020
40058
  row,
@@ -40060,8 +40098,8 @@ function QueryReportTableRow({
40060
40098
  );
40061
40099
  }
40062
40100
  function TruncatedCell({ value, className }) {
40063
- const textRef = useRef56(null);
40064
- const [isTruncated, setIsTruncated] = useState94(false);
40101
+ const textRef = useRef57(null);
40102
+ const [isTruncated, setIsTruncated] = useState95(false);
40065
40103
  const checkTruncation = useCallback41(() => {
40066
40104
  const el = textRef.current;
40067
40105
  if (el) {
@@ -40562,7 +40600,7 @@ function DataTableEmpty({ className, ...props }) {
40562
40600
  // src/components/ui/data-table/data-table-row.tsx
40563
40601
  init_next_link();
40564
40602
  init_cn();
40565
- import { memo as memo5, useCallback as useCallback43, useRef as useRef57 } from "react";
40603
+ import { memo as memo5, useCallback as useCallback43, useRef as useRef58 } from "react";
40566
40604
  import { flexRender as flexRender2 } from "@tanstack/react-table";
40567
40605
 
40568
40606
  // src/components/ui/data-table/data-table-skeleton.tsx
@@ -40647,7 +40685,7 @@ function DataTableRowImpl({
40647
40685
  const hasSubRow = subRow != null && subRow !== false;
40648
40686
  const isLinkMode = Boolean(href) && !onClick;
40649
40687
  const isWholeCardLink = isLinkMode && !hasSubRow;
40650
- const containerRef = useRef57(null);
40688
+ const containerRef = useRef58(null);
40651
40689
  const handleClick = useCallback43(
40652
40690
  (e) => {
40653
40691
  const target = e.target;
@@ -40815,7 +40853,7 @@ function DataTableBody({
40815
40853
  }
40816
40854
 
40817
40855
  // src/components/ui/data-table/data-table-infinite-footer.tsx
40818
- import { useEffect as useEffect71, useRef as useRef58 } from "react";
40856
+ import { useEffect as useEffect72, useRef as useRef59 } from "react";
40819
40857
  import { Fragment as Fragment64, jsx as jsx330, jsxs as jsxs261 } from "react/jsx-runtime";
40820
40858
  function DataTableInfiniteFooter({
40821
40859
  hasNextPage,
@@ -40824,10 +40862,10 @@ function DataTableInfiniteFooter({
40824
40862
  skeletonRows = 3,
40825
40863
  rootMargin = "200px"
40826
40864
  }) {
40827
- const sentinelRef = useRef58(null);
40828
- const onLoadMoreRef = useRef58(onLoadMore);
40865
+ const sentinelRef = useRef59(null);
40866
+ const onLoadMoreRef = useRef59(onLoadMore);
40829
40867
  onLoadMoreRef.current = onLoadMore;
40830
- useEffect71(() => {
40868
+ useEffect72(() => {
40831
40869
  if (!hasNextPage || isFetchingNextPage) return;
40832
40870
  const sentinel = sentinelRef.current;
40833
40871
  if (!sentinel) return;
@@ -41461,9 +41499,9 @@ function FilterList({
41461
41499
 
41462
41500
  // src/components/ui/tag-search-input.tsx
41463
41501
  import {
41464
- useEffect as useEffect73,
41465
- useRef as useRef60,
41466
- useState as useState96
41502
+ useEffect as useEffect74,
41503
+ useRef as useRef61,
41504
+ useState as useState97
41467
41505
  } from "react";
41468
41506
  init_cn();
41469
41507
  import { jsx as jsx334, jsxs as jsxs265 } from "react/jsx-runtime";
@@ -41497,11 +41535,11 @@ function TagSearchInput({
41497
41535
  limitTags,
41498
41536
  placeholder: currentPlaceholder
41499
41537
  });
41500
- const wrapperRef = useRef60(null);
41501
- const hiddenTagsRef = useRef60(null);
41502
- const hiddenTagsPopupRef = useRef60(null);
41503
- const [showHiddenTags, setShowHiddenTags] = useState96(false);
41504
- useEffect73(() => {
41538
+ const wrapperRef = useRef61(null);
41539
+ const hiddenTagsRef = useRef61(null);
41540
+ const hiddenTagsPopupRef = useRef61(null);
41541
+ const [showHiddenTags, setShowHiddenTags] = useState97(false);
41542
+ useEffect74(() => {
41505
41543
  if (!showHiddenTags) return;
41506
41544
  const handleClick = (e) => {
41507
41545
  const target = e.target;
@@ -41656,7 +41694,7 @@ function TagSearchInput({
41656
41694
  }
41657
41695
 
41658
41696
  // src/components/ui/markdown-editor.tsx
41659
- import { useRef as useRef61, useCallback as useCallback44, useState as useState97, useEffect as useEffect74 } from "react";
41697
+ import { useRef as useRef62, useCallback as useCallback44, useState as useState98, useEffect as useEffect75 } from "react";
41660
41698
  init_cn();
41661
41699
  import { Loader2 as Loader28, Upload as Upload8 } from "lucide-react";
41662
41700
  import { jsx as jsx335, jsxs as jsxs266 } from "react/jsx-runtime";
@@ -41687,7 +41725,7 @@ body .w-md-editor .w-md-editor-bar::after { content: '' !important; display: blo
41687
41725
  body .w-md-editor .w-md-editor-bar:hover::after { border-color: var(--color-text-secondary) !important; }
41688
41726
  `;
41689
41727
  function MarkdownEditorStyles() {
41690
- useEffect74(() => {
41728
+ useEffect75(() => {
41691
41729
  if (document.getElementById(MARKDOWN_EDITOR_STYLE_ID)) return;
41692
41730
  const style = document.createElement("style");
41693
41731
  style.id = MARKDOWN_EDITOR_STYLE_ID;
@@ -41711,11 +41749,11 @@ function MarkdownEditor({
41711
41749
  onFileUploaded,
41712
41750
  renderPreview
41713
41751
  }) {
41714
- const fileInputRef = useRef61(null);
41715
- const [isUploading, setIsUploading] = useState97(false);
41716
- const [uploadProgress, setUploadProgress] = useState97("");
41717
- const [defaultExtraCommands, setDefaultExtraCommands] = useState97([]);
41718
- useEffect74(() => {
41752
+ const fileInputRef = useRef62(null);
41753
+ const [isUploading, setIsUploading] = useState98(false);
41754
+ const [uploadProgress, setUploadProgress] = useState98("");
41755
+ const [defaultExtraCommands, setDefaultExtraCommands] = useState98([]);
41756
+ useEffect75(() => {
41719
41757
  import("@uiw/react-md-editor").then((mod) => {
41720
41758
  if (mod.commands?.getExtraCommands) {
41721
41759
  setDefaultExtraCommands(mod.commands.getExtraCommands());
@@ -41804,11 +41842,11 @@ function MarkdownEditor({
41804
41842
  }
41805
41843
  } : null;
41806
41844
  const extraCommands = uploadCommand ? [...defaultExtraCommands, uploadCommand] : defaultExtraCommands;
41807
- const wrapperRef = useRef61(null);
41808
- const isDraggingRef = useRef61(false);
41809
- const mouseYRef = useRef61(0);
41810
- const rafRef = useRef61(0);
41811
- const scrollParentRef = useRef61(window);
41845
+ const wrapperRef = useRef62(null);
41846
+ const isDraggingRef = useRef62(false);
41847
+ const mouseYRef = useRef62(0);
41848
+ const rafRef = useRef62(0);
41849
+ const scrollParentRef = useRef62(window);
41812
41850
  const EDGE_ZONE = 60;
41813
41851
  const MAX_SCROLL_SPEED = 15;
41814
41852
  const findScrollParent = useCallback44((el) => {
@@ -41838,7 +41876,7 @@ function MarkdownEditor({
41838
41876
  }
41839
41877
  rafRef.current = requestAnimationFrame(scrollLoop);
41840
41878
  }, []);
41841
- useEffect74(() => {
41879
+ useEffect75(() => {
41842
41880
  const wrapper = wrapperRef.current;
41843
41881
  if (!wrapper) return;
41844
41882
  const onMouseMove = (e) => {
@@ -43320,8 +43358,8 @@ function ImageGalleryModal({
43320
43358
  onClose,
43321
43359
  initialIndex = 0
43322
43360
  }) {
43323
- const [selectedImageIndex, setSelectedImageIndex] = useState104(initialIndex);
43324
- useEffect77(() => {
43361
+ const [selectedImageIndex, setSelectedImageIndex] = useState105(initialIndex);
43362
+ useEffect78(() => {
43325
43363
  if (isOpen) {
43326
43364
  setSelectedImageIndex(initialIndex);
43327
43365
  }
@@ -43336,7 +43374,7 @@ function ImageGalleryModal({
43336
43374
  setSelectedImageIndex(selectedImageIndex + 1);
43337
43375
  }
43338
43376
  };
43339
- useEffect77(() => {
43377
+ useEffect78(() => {
43340
43378
  const handleKeyPress = (event) => {
43341
43379
  if (!isOpen) return;
43342
43380
  switch (event.key) {
@@ -43539,7 +43577,7 @@ function RoadmapCard({
43539
43577
  onVote,
43540
43578
  isVoting = false
43541
43579
  }) {
43542
- const [showScreenshots, setShowScreenshots] = useState105(false);
43580
+ const [showScreenshots, setShowScreenshots] = useState106(false);
43543
43581
  const logoUrl = item.icon && item.icon.startsWith("http") ? item.icon : null;
43544
43582
  const iconSrc = logoUrl ? getProxiedImageUrl(logoUrl, { directHttps: true }) || logoUrl : null;
43545
43583
  if (size2 === "sm") {
@@ -44175,7 +44213,7 @@ function DataRoomDocCardSkeleton({ className }) {
44175
44213
  }
44176
44214
 
44177
44215
  // src/components/chat/entity-cards/program-card.tsx
44178
- import { useState as useState106 } from "react";
44216
+ import { useState as useState107 } from "react";
44179
44217
 
44180
44218
  // node_modules/date-fns/toDate.mjs
44181
44219
  function toDate2(argument) {
@@ -45812,8 +45850,8 @@ function getHosts(hosts) {
45812
45850
  return [];
45813
45851
  }
45814
45852
  function MediaGallery({ images, title }) {
45815
- const [selectedImageIndex, setSelectedImageIndex] = useState106(null);
45816
- const [isModalOpen, setIsModalOpen] = useState106(false);
45853
+ const [selectedImageIndex, setSelectedImageIndex] = useState107(null);
45854
+ const [isModalOpen, setIsModalOpen] = useState107(false);
45817
45855
  const openImageModal = (index, event) => {
45818
45856
  if (event) event.stopPropagation();
45819
45857
  setSelectedImageIndex(index);
@@ -47411,7 +47449,7 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
47411
47449
  }
47412
47450
 
47413
47451
  // src/components/chat/hooks/use-chunk-catchup.ts
47414
- import { useCallback as useCallback46, useRef as useRef65 } from "react";
47452
+ import { useCallback as useCallback46, useRef as useRef66 } from "react";
47415
47453
  function makeSeqKey(messageType, chunkType, sequenceId) {
47416
47454
  return `${messageType}:${chunkType}:${sequenceId}`;
47417
47455
  }
@@ -47433,22 +47471,22 @@ function useChunkCatchup({
47433
47471
  chatTypes = [CHAT_TYPE.CLIENT],
47434
47472
  fetchChunks
47435
47473
  }) {
47436
- const processedSequenceKeys = useRef65(/* @__PURE__ */ new Set());
47437
- const lastSequenceId = useRef65(null);
47438
- const lastSequenceIdByType = useRef65(/* @__PURE__ */ new Map());
47439
- const fetchingInProgress = useRef65(false);
47440
- const lastFetchParams = useRef65(null);
47441
- const pendingCatchupRef = useRef65(null);
47442
- const chunkBuffer = useRef65([]);
47443
- const bufferUntilInitialCatchupComplete = useRef65(false);
47444
- const hasCompletedInitialCatchup = useRef65(false);
47445
- const dialogIdRef = useRef65(dialogId);
47474
+ const processedSequenceKeys = useRef66(/* @__PURE__ */ new Set());
47475
+ const lastSequenceId = useRef66(null);
47476
+ const lastSequenceIdByType = useRef66(/* @__PURE__ */ new Map());
47477
+ const fetchingInProgress = useRef66(false);
47478
+ const lastFetchParams = useRef66(null);
47479
+ const pendingCatchupRef = useRef66(null);
47480
+ const chunkBuffer = useRef66([]);
47481
+ const bufferUntilInitialCatchupComplete = useRef66(false);
47482
+ const hasCompletedInitialCatchup = useRef66(false);
47483
+ const dialogIdRef = useRef66(dialogId);
47446
47484
  dialogIdRef.current = dialogId;
47447
- const chatTypesRef = useRef65(chatTypes);
47485
+ const chatTypesRef = useRef66(chatTypes);
47448
47486
  chatTypesRef.current = chatTypes;
47449
- const fetchChunksRef = useRef65(fetchChunks);
47487
+ const fetchChunksRef = useRef66(fetchChunks);
47450
47488
  fetchChunksRef.current = fetchChunks;
47451
- const onChunkReceivedRef = useRef65(onChunkReceived);
47489
+ const onChunkReceivedRef = useRef66(onChunkReceived);
47452
47490
  onChunkReceivedRef.current = onChunkReceived;
47453
47491
  const processChunk = useCallback46((chunk, messageType, forceProcess = false) => {
47454
47492
  if (bufferUntilInitialCatchupComplete.current && !forceProcess) {
@@ -47645,7 +47683,7 @@ function useChunkCatchup({
47645
47683
  }
47646
47684
  }
47647
47685
  }, [flushBufferedRealtimeChunks]);
47648
- const catchUpChunksRef = useRef65(null);
47686
+ const catchUpChunksRef = useRef66(null);
47649
47687
  catchUpChunksRef.current = catchUpChunks;
47650
47688
  const resetChunkTracking = useCallback46(() => {
47651
47689
  processedSequenceKeys.current.clear();
@@ -47689,20 +47727,20 @@ function useChunkCatchup({
47689
47727
  }
47690
47728
 
47691
47729
  // src/components/chat/hooks/use-scripted-stream.ts
47692
- import { useEffect as useEffect78, useState as useState107 } from "react";
47730
+ import { useEffect as useEffect79, useState as useState108 } from "react";
47693
47731
  var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
47694
47732
  function prefersReducedMotion() {
47695
47733
  return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
47696
47734
  }
47697
47735
  function useScriptedStream(frames, resetKey, enabled = true) {
47698
- const [index, setIndex] = useState107(0);
47699
- const [reducedMotion, setReducedMotion] = useState107(false);
47700
- const [prevKey, setPrevKey] = useState107(resetKey);
47736
+ const [index, setIndex] = useState108(0);
47737
+ const [reducedMotion, setReducedMotion] = useState108(false);
47738
+ const [prevKey, setPrevKey] = useState108(resetKey);
47701
47739
  if (resetKey !== prevKey) {
47702
47740
  setPrevKey(resetKey);
47703
47741
  setIndex(0);
47704
47742
  }
47705
- useEffect78(() => {
47743
+ useEffect79(() => {
47706
47744
  setReducedMotion(prefersReducedMotion());
47707
47745
  const mq = window.matchMedia?.("(prefers-reduced-motion: reduce)");
47708
47746
  if (!mq) return;
@@ -47712,7 +47750,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
47712
47750
  }, []);
47713
47751
  const playing = enabled && !reducedMotion && frames.length > 0;
47714
47752
  const lastIndex = Math.max(0, frames.length - 1);
47715
- useEffect78(() => {
47753
+ useEffect79(() => {
47716
47754
  if (!playing || index >= lastIndex) return;
47717
47755
  const current = frames[Math.min(index, lastIndex)] ?? EMPTY_FRAME;
47718
47756
  const t = setTimeout(() => setIndex((i) => Math.min(i + 1, lastIndex)), current.delayMs);
@@ -47724,7 +47762,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
47724
47762
  }
47725
47763
 
47726
47764
  // src/components/chat/hooks/use-jetstream-dialog-subscription.ts
47727
- import { useEffect as useEffect79, useRef as useRef66, useState as useState108 } from "react";
47765
+ import { useEffect as useEffect80, useRef as useRef67, useState as useState109 } from "react";
47728
47766
  var DEFAULT_INACTIVE_THRESHOLD_MS = 5 * 6e4;
47729
47767
  var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
47730
47768
  function useJetStreamDialogSubscription({
@@ -47743,57 +47781,57 @@ function useJetStreamDialogSubscription({
47743
47781
  reconnectionBackoff,
47744
47782
  inactiveThresholdMs
47745
47783
  }) {
47746
- const [isConnected, setIsConnected] = useState108(false);
47747
- const [isSubscribed, setIsSubscribed] = useState108(false);
47748
- const [reconnectionCount, setReconnectionCount] = useState108(0);
47749
- const [currentStreamSeq, setCurrentStreamSeq] = useState108(null);
47750
- const clientRef = useRef66(null);
47751
- const subscriptionRef = useRef66(null);
47752
- const highestStreamSeqRef = useRef66(null);
47753
- const onEventRef = useRef66(onEvent);
47754
- useEffect79(() => {
47784
+ const [isConnected, setIsConnected] = useState109(false);
47785
+ const [isSubscribed, setIsSubscribed] = useState109(false);
47786
+ const [reconnectionCount, setReconnectionCount] = useState109(0);
47787
+ const [currentStreamSeq, setCurrentStreamSeq] = useState109(null);
47788
+ const clientRef = useRef67(null);
47789
+ const subscriptionRef = useRef67(null);
47790
+ const highestStreamSeqRef = useRef67(null);
47791
+ const onEventRef = useRef67(onEvent);
47792
+ useEffect80(() => {
47755
47793
  onEventRef.current = onEvent;
47756
47794
  }, [onEvent]);
47757
- const onConnectRef = useRef66(onConnect);
47758
- useEffect79(() => {
47795
+ const onConnectRef = useRef67(onConnect);
47796
+ useEffect80(() => {
47759
47797
  onConnectRef.current = onConnect;
47760
47798
  }, [onConnect]);
47761
- const onDisconnectRef = useRef66(onDisconnect);
47762
- useEffect79(() => {
47799
+ const onDisconnectRef = useRef67(onDisconnect);
47800
+ useEffect80(() => {
47763
47801
  onDisconnectRef.current = onDisconnect;
47764
47802
  }, [onDisconnect]);
47765
- const onSubscribedRef = useRef66(onSubscribed);
47766
- useEffect79(() => {
47803
+ const onSubscribedRef = useRef67(onSubscribed);
47804
+ useEffect80(() => {
47767
47805
  onSubscribedRef.current = onSubscribed;
47768
47806
  }, [onSubscribed]);
47769
- const onBeforeReconnectRef = useRef66(onBeforeReconnect);
47770
- useEffect79(() => {
47807
+ const onBeforeReconnectRef = useRef67(onBeforeReconnect);
47808
+ useEffect80(() => {
47771
47809
  onBeforeReconnectRef.current = onBeforeReconnect;
47772
47810
  }, [onBeforeReconnect]);
47773
- const getNatsWsUrlRef = useRef66(getNatsWsUrl);
47774
- useEffect79(() => {
47811
+ const getNatsWsUrlRef = useRef67(getNatsWsUrl);
47812
+ useEffect80(() => {
47775
47813
  getNatsWsUrlRef.current = getNatsWsUrl;
47776
47814
  }, [getNatsWsUrl]);
47777
- const reconnectionBackoffRef = useRef66(reconnectionBackoff);
47778
- useEffect79(() => {
47815
+ const reconnectionBackoffRef = useRef67(reconnectionBackoff);
47816
+ useEffect80(() => {
47779
47817
  reconnectionBackoffRef.current = reconnectionBackoff;
47780
47818
  }, [reconnectionBackoff]);
47781
- const optStartSeqRef = useRef66(optStartSeq);
47782
- useEffect79(() => {
47819
+ const optStartSeqRef = useRef67(optStartSeq);
47820
+ useEffect80(() => {
47783
47821
  optStartSeqRef.current = optStartSeq;
47784
47822
  }, [optStartSeq]);
47785
- const inactiveThresholdRef = useRef66(inactiveThresholdMs);
47786
- useEffect79(() => {
47823
+ const inactiveThresholdRef = useRef67(inactiveThresholdMs);
47824
+ useEffect80(() => {
47787
47825
  inactiveThresholdRef.current = inactiveThresholdMs;
47788
47826
  }, [inactiveThresholdMs]);
47789
- const hadConnectionBeforeRef = useRef66(false);
47790
- const clientConfigRef = useRef66(clientConfig);
47791
- useEffect79(() => {
47827
+ const hadConnectionBeforeRef = useRef67(false);
47828
+ const clientConfigRef = useRef67(clientConfig);
47829
+ useEffect80(() => {
47792
47830
  clientConfigRef.current = clientConfig;
47793
47831
  }, [clientConfig]);
47794
- const currentWsUrlRef = useRef66("");
47832
+ const currentWsUrlRef = useRef67("");
47795
47833
  const wsUrl = getNatsWsUrl();
47796
- useEffect79(() => {
47834
+ useEffect80(() => {
47797
47835
  if (!enabled || !wsUrl) {
47798
47836
  if (currentWsUrlRef.current && clientRef.current) {
47799
47837
  releaseClient(currentWsUrlRef.current);
@@ -47874,11 +47912,11 @@ function useJetStreamDialogSubscription({
47874
47912
  }
47875
47913
  };
47876
47914
  }, [enabled, wsUrl]);
47877
- useEffect79(() => {
47915
+ useEffect80(() => {
47878
47916
  highestStreamSeqRef.current = null;
47879
47917
  setCurrentStreamSeq(null);
47880
47918
  }, [dialogId]);
47881
- useEffect79(() => {
47919
+ useEffect80(() => {
47882
47920
  if (!enabled || !dialogId || !isConnected) {
47883
47921
  if (subscriptionRef.current) {
47884
47922
  try {
@@ -47965,7 +48003,7 @@ function useJetStreamDialogSubscription({
47965
48003
  }
47966
48004
 
47967
48005
  // src/components/chat/hooks/use-nats-dialog-subscription.ts
47968
- import { useEffect as useEffect80, useRef as useRef67, useState as useState109 } from "react";
48006
+ import { useEffect as useEffect81, useRef as useRef68, useState as useState110 } from "react";
47969
48007
  function useNatsDialogSubscription({
47970
48008
  enabled,
47971
48009
  dialogId,
@@ -47979,47 +48017,47 @@ function useNatsDialogSubscription({
47979
48017
  clientConfig = {},
47980
48018
  reconnectionBackoff
47981
48019
  }) {
47982
- const [isConnected, setIsConnected] = useState109(false);
47983
- const [isSubscribed, setIsSubscribed] = useState109(false);
47984
- const [reconnectionCount, setReconnectionCount] = useState109(0);
47985
- const clientRef = useRef67(null);
47986
- const subscriptionRefs = useRef67(/* @__PURE__ */ new Map());
47987
- const onEventRef = useRef67(onEvent);
47988
- useEffect80(() => {
48020
+ const [isConnected, setIsConnected] = useState110(false);
48021
+ const [isSubscribed, setIsSubscribed] = useState110(false);
48022
+ const [reconnectionCount, setReconnectionCount] = useState110(0);
48023
+ const clientRef = useRef68(null);
48024
+ const subscriptionRefs = useRef68(/* @__PURE__ */ new Map());
48025
+ const onEventRef = useRef68(onEvent);
48026
+ useEffect81(() => {
47989
48027
  onEventRef.current = onEvent;
47990
48028
  }, [onEvent]);
47991
- const onConnectRef = useRef67(onConnect);
47992
- useEffect80(() => {
48029
+ const onConnectRef = useRef68(onConnect);
48030
+ useEffect81(() => {
47993
48031
  onConnectRef.current = onConnect;
47994
48032
  }, [onConnect]);
47995
- const onDisconnectRef = useRef67(onDisconnect);
47996
- useEffect80(() => {
48033
+ const onDisconnectRef = useRef68(onDisconnect);
48034
+ useEffect81(() => {
47997
48035
  onDisconnectRef.current = onDisconnect;
47998
48036
  }, [onDisconnect]);
47999
- const onSubscribedRef = useRef67(onSubscribed);
48000
- useEffect80(() => {
48037
+ const onSubscribedRef = useRef68(onSubscribed);
48038
+ useEffect81(() => {
48001
48039
  onSubscribedRef.current = onSubscribed;
48002
48040
  }, [onSubscribed]);
48003
- const onBeforeReconnectRef = useRef67(onBeforeReconnect);
48004
- useEffect80(() => {
48041
+ const onBeforeReconnectRef = useRef68(onBeforeReconnect);
48042
+ useEffect81(() => {
48005
48043
  onBeforeReconnectRef.current = onBeforeReconnect;
48006
48044
  }, [onBeforeReconnect]);
48007
- const hadConnectionBeforeRef = useRef67(false);
48008
- const getNatsWsUrlRef = useRef67(getNatsWsUrl);
48009
- useEffect80(() => {
48045
+ const hadConnectionBeforeRef = useRef68(false);
48046
+ const getNatsWsUrlRef = useRef68(getNatsWsUrl);
48047
+ useEffect81(() => {
48010
48048
  getNatsWsUrlRef.current = getNatsWsUrl;
48011
48049
  }, [getNatsWsUrl]);
48012
- const reconnectionBackoffRef = useRef67(reconnectionBackoff);
48013
- useEffect80(() => {
48050
+ const reconnectionBackoffRef = useRef68(reconnectionBackoff);
48051
+ useEffect81(() => {
48014
48052
  reconnectionBackoffRef.current = reconnectionBackoff;
48015
48053
  }, [reconnectionBackoff]);
48016
- const clientConfigRef = useRef67(clientConfig);
48017
- useEffect80(() => {
48054
+ const clientConfigRef = useRef68(clientConfig);
48055
+ useEffect81(() => {
48018
48056
  clientConfigRef.current = clientConfig;
48019
48057
  }, [clientConfig]);
48020
- const currentWsUrlRef = useRef67("");
48058
+ const currentWsUrlRef = useRef68("");
48021
48059
  const wsUrl = getNatsWsUrl();
48022
- useEffect80(() => {
48060
+ useEffect81(() => {
48023
48061
  if (!enabled || !wsUrl) {
48024
48062
  if (currentWsUrlRef.current && clientRef.current) {
48025
48063
  releaseClient(currentWsUrlRef.current);
@@ -48101,16 +48139,16 @@ function useNatsDialogSubscription({
48101
48139
  };
48102
48140
  }, [enabled, wsUrl]);
48103
48141
  const topicsKey = topics.join(",");
48104
- const topicsRef = useRef67(topics);
48142
+ const topicsRef = useRef68(topics);
48105
48143
  topicsRef.current = topics;
48106
- const lastSubscribedDialogIdRef = useRef67(null);
48107
- const isConnectedRef = useRef67(isConnected);
48108
- useEffect80(() => {
48144
+ const lastSubscribedDialogIdRef = useRef68(null);
48145
+ const isConnectedRef = useRef68(isConnected);
48146
+ useEffect81(() => {
48109
48147
  isConnectedRef.current = isConnected;
48110
48148
  }, [isConnected]);
48111
- const currentDialogIdRef = useRef67(null);
48112
- const abortControllerRef = useRef67(null);
48113
- useEffect80(() => {
48149
+ const currentDialogIdRef = useRef68(null);
48150
+ const abortControllerRef = useRef68(null);
48151
+ useEffect81(() => {
48114
48152
  currentDialogIdRef.current = dialogId;
48115
48153
  if (!enabled || !dialogId) {
48116
48154
  if (subscriptionRefs.current.size > 0) {
@@ -48191,7 +48229,7 @@ function useNatsDialogSubscription({
48191
48229
  abortControllerRef.current = null;
48192
48230
  };
48193
48231
  }, [enabled, dialogId, topicsKey]);
48194
- useEffect80(() => {
48232
+ useEffect81(() => {
48195
48233
  if (!enabled || !currentDialogIdRef.current || !isConnected) {
48196
48234
  return;
48197
48235
  }
@@ -48241,7 +48279,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
48241
48279
  }
48242
48280
 
48243
48281
  // src/components/chat/hooks/use-realtime-chunk-processor.ts
48244
- import { useCallback as useCallback47, useRef as useRef68, useEffect as useEffect81 } from "react";
48282
+ import { useCallback as useCallback47, useRef as useRef69, useEffect as useEffect82 } from "react";
48245
48283
 
48246
48284
  // src/components/chat/utils/chunk-parser.ts
48247
48285
  function normalizeToolCalls(raw) {
@@ -48896,14 +48934,14 @@ function useRealtimeChunkProcessor(options) {
48896
48934
  batchApprovalsEnabled = true,
48897
48935
  isDirectMode = false
48898
48936
  } = options;
48899
- const accumulatorRef = useRef68(
48937
+ const accumulatorRef = useRef69(
48900
48938
  createMessageSegmentAccumulator({
48901
48939
  onApprove: callbacks.onApprove,
48902
48940
  onReject: callbacks.onReject
48903
48941
  })
48904
48942
  );
48905
- const hasInitializedWithData = useRef68(false);
48906
- useEffect81(() => {
48943
+ const hasInitializedWithData = useRef69(false);
48944
+ useEffect82(() => {
48907
48945
  if (initialState && !hasInitializedWithData.current) {
48908
48946
  accumulatorRef.current.initializeWithState(initialState);
48909
48947
  if (initialState.escalatedApprovals) {
@@ -48916,15 +48954,15 @@ function useRealtimeChunkProcessor(options) {
48916
48954
  hasInitializedWithData.current = true;
48917
48955
  }
48918
48956
  }, [initialState, callbacks]);
48919
- const isInStreamRef = useRef68(false);
48920
- const hasEverStreamedRef = useRef68(false);
48921
- const directModeFlagRef = useRef68(isDirectMode);
48922
- const sawDirectMessageRef = useRef68(false);
48923
- const directTeardownFiredRef = useRef68(false);
48924
- useEffect81(() => {
48957
+ const isInStreamRef = useRef69(false);
48958
+ const hasEverStreamedRef = useRef69(false);
48959
+ const directModeFlagRef = useRef69(isDirectMode);
48960
+ const sawDirectMessageRef = useRef69(false);
48961
+ const directTeardownFiredRef = useRef69(false);
48962
+ useEffect82(() => {
48925
48963
  directModeFlagRef.current = isDirectMode;
48926
48964
  }, [isDirectMode]);
48927
- const pendingEscalatedRef = useRef68(/* @__PURE__ */ new Map());
48965
+ const pendingEscalatedRef = useRef69(/* @__PURE__ */ new Map());
48928
48966
  const processChunk = useCallback47(
48929
48967
  (chunk) => {
48930
48968
  const action = parseChunkToAction(chunk);
@@ -49200,7 +49238,7 @@ function useRealtimeChunkProcessor(options) {
49200
49238
  }
49201
49239
 
49202
49240
  // src/components/chat/hooks/use-slash-commands.ts
49203
- import { useEffect as useEffect82, useState as useState110 } from "react";
49241
+ import { useEffect as useEffect83, useState as useState111 } from "react";
49204
49242
  import { useQuery as useQuery2 } from "@tanstack/react-query";
49205
49243
  async function fetchSlashCommands(prefix, signal, commandsUrl) {
49206
49244
  try {
@@ -49217,9 +49255,9 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
49217
49255
  }
49218
49256
  }
49219
49257
  function useSlashCommands(prefix, commandsUrl) {
49220
- const [commands, setCommands] = useState110([]);
49221
- const [loading, setLoading] = useState110(false);
49222
- useEffect82(() => {
49258
+ const [commands, setCommands] = useState111([]);
49259
+ const [loading, setLoading] = useState111(false);
49260
+ useEffect83(() => {
49223
49261
  if (prefix == null) {
49224
49262
  setCommands([]);
49225
49263
  return;
@@ -49325,7 +49363,7 @@ function useEmptyStateConfig(emptyStateUrl, options) {
49325
49363
  }
49326
49364
 
49327
49365
  // src/components/chat/hooks/use-chat-attachments.ts
49328
- import { useCallback as useCallback48, useMemo as useMemo44, useRef as useRef69, useState as useState111 } from "react";
49366
+ import { useCallback as useCallback48, useMemo as useMemo44, useRef as useRef70, useState as useState112 } from "react";
49329
49367
  import { fileTypeFromBlob } from "file-type";
49330
49368
  var CHAT_ATTACHMENTS_BUCKET = "chat-attachments";
49331
49369
  var CHAT_ATTACHMENTS_FOLDER = "chat";
@@ -49401,8 +49439,8 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
49401
49439
  function useChatAttachments() {
49402
49440
  const runtime = useRequiredChatRuntime();
49403
49441
  const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
49404
- const [attachments, setAttachments] = useState111([]);
49405
- const controllersRef = useRef69(/* @__PURE__ */ new Map());
49442
+ const [attachments, setAttachments] = useState112([]);
49443
+ const controllersRef = useRef70(/* @__PURE__ */ new Map());
49406
49444
  const updateOne = useCallback48((id, patch) => {
49407
49445
  setAttachments((prev) => prev.map((a) => a.id === id ? { ...a, ...patch } : a));
49408
49446
  }, []);
@@ -49491,7 +49529,7 @@ function useChatAttachments() {
49491
49529
  },
49492
49530
  [uploadUrlEndpoint, updateOne]
49493
49531
  );
49494
- const attachmentsRef = useRef69([]);
49532
+ const attachmentsRef = useRef70([]);
49495
49533
  attachmentsRef.current = attachments;
49496
49534
  const addFiles = useCallback48(
49497
49535
  (files) => {
@@ -49568,16 +49606,16 @@ function useChatAttachments() {
49568
49606
  }
49569
49607
 
49570
49608
  // src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
49571
- import { useCallback as useCallback49, useEffect as useEffect83, useRef as useRef70, useState as useState112 } from "react";
49609
+ import { useCallback as useCallback49, useEffect as useEffect84, useRef as useRef71, useState as useState113 } from "react";
49572
49610
  import { jsx as jsx359 } from "react/jsx-runtime";
49573
49611
  var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
49574
49612
  function useChatAttachmentImageGallery() {
49575
49613
  const runtime = useRequiredChatRuntime();
49576
49614
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
49577
- const panelRef = useRef70(null);
49578
- const [state, setState] = useState112(CLOSED);
49615
+ const panelRef = useRef71(null);
49616
+ const [state, setState] = useState113(CLOSED);
49579
49617
  const handleClose = useCallback49(() => setState(CLOSED), []);
49580
- useEffect83(() => {
49618
+ useEffect84(() => {
49581
49619
  const root = panelRef.current;
49582
49620
  if (!root) return;
49583
49621
  const onClick = (ev) => {
@@ -49623,7 +49661,7 @@ function absolutize(prefix) {
49623
49661
  }
49624
49662
 
49625
49663
  // src/components/chat/hooks/use-chat-identity.ts
49626
- import { createContext as createContext12, createElement as createElement2, useContext as useContext12, useEffect as useEffect84, useState as useState113 } from "react";
49664
+ import { createContext as createContext12, createElement as createElement2, useContext as useContext12, useEffect as useEffect85, useState as useState114 } from "react";
49627
49665
  var ANON_DEFAULTS = {
49628
49666
  authTier: "anon",
49629
49667
  source: null,
@@ -49634,9 +49672,9 @@ function useResolveChatIdentity(enabled) {
49634
49672
  const runtime = useRequiredChatRuntime();
49635
49673
  const url = runtime.endpoints.identityUrl;
49636
49674
  const proxyEmail = getEmbedProxyAuth()?.email ?? null;
49637
- const [data, setData] = useState113(ANON_DEFAULTS);
49638
- const [isLoading, setIsLoading] = useState113(enabled);
49639
- useEffect84(() => {
49675
+ const [data, setData] = useState114(ANON_DEFAULTS);
49676
+ const [isLoading, setIsLoading] = useState114(enabled);
49677
+ useEffect85(() => {
49640
49678
  if (!enabled) return;
49641
49679
  let cancelled = false;
49642
49680
  const ctrl = new AbortController();
@@ -49678,11 +49716,11 @@ function useChatIdentity() {
49678
49716
  }
49679
49717
 
49680
49718
  // src/components/chat/hooks/use-close-on-navigation.ts
49681
- import { useEffect as useEffect85, useRef as useRef71 } from "react";
49719
+ import { useEffect as useEffect86, useRef as useRef72 } from "react";
49682
49720
  function useCloseOnNavigation(close, pathname) {
49683
- const prevPathnameRef = useRef71(null);
49684
- const initializedRef = useRef71(false);
49685
- useEffect85(() => {
49721
+ const prevPathnameRef = useRef72(null);
49722
+ const initializedRef = useRef72(false);
49723
+ useEffect86(() => {
49686
49724
  if (!initializedRef.current) {
49687
49725
  initializedRef.current = true;
49688
49726
  prevPathnameRef.current = pathname;
@@ -49696,14 +49734,14 @@ function useCloseOnNavigation(close, pathname) {
49696
49734
  }
49697
49735
 
49698
49736
  // src/components/chat/hooks/use-chat.ts
49699
- import { useState as useState115, useCallback as useCallback51, useEffect as useEffect86, useRef as useRef73 } from "react";
49737
+ import { useState as useState116, useCallback as useCallback51, useEffect as useEffect87, useRef as useRef74 } from "react";
49700
49738
 
49701
49739
  // src/components/chat/hooks/use-sse.ts
49702
- import { useState as useState114, useCallback as useCallback50, useRef as useRef72 } from "react";
49740
+ import { useState as useState115, useCallback as useCallback50, useRef as useRef73 } from "react";
49703
49741
  function useSSE({ useMock = true, debugMode = false, streamFn } = {}) {
49704
- const [isStreaming, setIsStreaming] = useState114(false);
49705
- const [error, setError] = useState114(null);
49706
- const abortControllerRef = useRef72(null);
49742
+ const [isStreaming, setIsStreaming] = useState115(false);
49743
+ const [error, setError] = useState115(null);
49744
+ const abortControllerRef = useRef73(null);
49707
49745
  const fallbackStream = useCallback50(async function* () {
49708
49746
  throw new Error(
49709
49747
  "[useSSE] No streamFn provided and `useMock: true` is no longer wired into the lib. Supply a `streamFn` (see `createDocStreamFn` in use-embedded-chat) or migrate the mock to your host code."
@@ -49769,12 +49807,12 @@ function useChat({
49769
49807
  initialMessages,
49770
49808
  onMessagesChange
49771
49809
  } = {}) {
49772
- const [messages, setMessages] = useState115(() => initialMessages ?? []);
49773
- const [isTyping, setIsTyping] = useState115(false);
49774
- const currentAssistantSegmentsRef = useRef73([]);
49775
- const onMessagesChangeRef = useRef73(onMessagesChange);
49810
+ const [messages, setMessages] = useState116(() => initialMessages ?? []);
49811
+ const [isTyping, setIsTyping] = useState116(false);
49812
+ const currentAssistantSegmentsRef = useRef74([]);
49813
+ const onMessagesChangeRef = useRef74(onMessagesChange);
49776
49814
  onMessagesChangeRef.current = onMessagesChange;
49777
- useEffect86(() => {
49815
+ useEffect87(() => {
49778
49816
  onMessagesChangeRef.current?.(messages);
49779
49817
  }, [messages]);
49780
49818
  const {
@@ -50063,7 +50101,7 @@ function useChat({
50063
50101
  }
50064
50102
 
50065
50103
  // src/components/chat/hooks/use-sse-chat-adapter.ts
50066
- import { useState as useState116, useEffect as useEffect87, useCallback as useCallback52, useMemo as useMemo45, useRef as useRef74 } from "react";
50104
+ import { useState as useState117, useEffect as useEffect88, useCallback as useCallback52, useMemo as useMemo45, useRef as useRef75 } from "react";
50067
50105
  function createEmptyTurnMeta() {
50068
50106
  return {
50069
50107
  provider: null,
@@ -50384,22 +50422,22 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
50384
50422
  const runtime = useRequiredChatRuntime();
50385
50423
  const source = runtime.source || DEFAULT_CHAT_SOURCE;
50386
50424
  const tableIdForDocumentType = options?.tableIdForDocumentType ?? defaultTableIdForDocumentType;
50387
- const persistedRef = useRef74(null);
50425
+ const persistedRef = useRef75(null);
50388
50426
  if (persistedRef.current === null) {
50389
50427
  pruneStaleChatStorage(source);
50390
50428
  persistedRef.current = loadPersistedChat(source) || { messages: [], sources: [], sendCount: 0 };
50391
50429
  }
50392
- const sourcesMapRef = useRef74(
50430
+ const sourcesMapRef = useRef75(
50393
50431
  new Map(persistedRef.current.sources)
50394
50432
  );
50395
- const refsMapRef = useRef74(
50433
+ const refsMapRef = useRef75(
50396
50434
  new Map(persistedRef.current.refs ?? [])
50397
50435
  );
50398
- const metaMapRef = useRef74(/* @__PURE__ */ new Map());
50399
- const messagesRef = useRef74(persistedRef.current.messages);
50400
- const sendCountRef = useRef74(persistedRef.current.sendCount);
50401
- const [streamingPhase, setStreamingPhase] = useState116("idle");
50402
- const [metaTick, setMetaTick] = useState116(0);
50436
+ const metaMapRef = useRef75(/* @__PURE__ */ new Map());
50437
+ const messagesRef = useRef75(persistedRef.current.messages);
50438
+ const sendCountRef = useRef75(persistedRef.current.sendCount);
50439
+ const [streamingPhase, setStreamingPhase] = useState117("idle");
50440
+ const [metaTick, setMetaTick] = useState117(0);
50403
50441
  const bumpMetaTick = useCallback52(() => setMetaTick((t) => t + 1), []);
50404
50442
  const streamFn = useMemo45(
50405
50443
  () => createDocStreamFn(
@@ -50587,7 +50625,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
50587
50625
  }
50588
50626
  }
50589
50627
  }, [chatClearMessages, source, bumpMetaTick]);
50590
- useEffect87(() => {
50628
+ useEffect88(() => {
50591
50629
  if (!isTyping && !isStreaming && streamingPhase !== "idle") {
50592
50630
  setStreamingPhase("idle");
50593
50631
  }
@@ -50669,10 +50707,10 @@ var noopRejectRequest = async (_id, _reason) => {
50669
50707
  // src/components/chat/hooks/use-nats-chat-adapter.ts
50670
50708
  import {
50671
50709
  useCallback as useCallback53,
50672
- useEffect as useEffect88,
50710
+ useEffect as useEffect89,
50673
50711
  useMemo as useMemo46,
50674
- useRef as useRef75,
50675
- useState as useState117
50712
+ useRef as useRef76,
50713
+ useState as useState118
50676
50714
  } from "react";
50677
50715
 
50678
50716
  // src/components/chat/utils/process-historical-messages.ts
@@ -51369,32 +51407,32 @@ function useNatsChatAdapter(config, options = {}) {
51369
51407
  modelLabel = null
51370
51408
  } = config;
51371
51409
  const isManagedMode = fetchDialogs !== void 0;
51372
- const [internalDialogId, setInternalDialogId] = useState117(null);
51410
+ const [internalDialogId, setInternalDialogId] = useState118(null);
51373
51411
  const dialogId = isManagedMode ? internalDialogId : controlledDialogId !== void 0 ? controlledDialogId : null;
51374
- const currentDialogIdRef = useRef75(dialogId);
51412
+ const currentDialogIdRef = useRef76(dialogId);
51375
51413
  currentDialogIdRef.current = dialogId;
51376
- const [messages, setMessages] = useState117([]);
51377
- const [streamingPhase, setStreamingPhase] = useState117("idle");
51378
- const streamingPhaseRef = useRef75(streamingPhase);
51414
+ const [messages, setMessages] = useState118([]);
51415
+ const [streamingPhase, setStreamingPhase] = useState118("idle");
51416
+ const streamingPhaseRef = useRef76(streamingPhase);
51379
51417
  streamingPhaseRef.current = streamingPhase;
51380
- const suppressAgentBusyRef = useRef75(0);
51381
- const adoptTrailingAssistantRef = useRef75(false);
51382
- const hasConnectedOnceRef = useRef75(false);
51383
- const seenParticipantSeqsRef = useRef75(/* @__PURE__ */ new Set());
51384
- const pendingEchoTextsRef = useRef75([]);
51385
- const [approvalStatuses, setApprovalStatuses] = useState117({});
51386
- const [dialogs, setDialogs] = useState117([]);
51387
- const [dialogsNextCursor, setDialogsNextCursor] = useState117(null);
51388
- const [isDialogsLoading, setIsDialogsLoading] = useState117(false);
51389
- const [dialogsError, setDialogsError] = useState117(false);
51390
- const [isCreatingDialog, setIsCreatingDialog] = useState117(false);
51391
- const [messagesNextCursor, setMessagesNextCursor] = useState117(null);
51392
- const [isMessagesLoading, setIsMessagesLoading] = useState117(false);
51393
- const [dialogTokenUsage, setDialogTokenUsage] = useState117(
51418
+ const suppressAgentBusyRef = useRef76(0);
51419
+ const adoptTrailingAssistantRef = useRef76(false);
51420
+ const hasConnectedOnceRef = useRef76(false);
51421
+ const seenParticipantSeqsRef = useRef76(/* @__PURE__ */ new Set());
51422
+ const pendingEchoTextsRef = useRef76([]);
51423
+ const [approvalStatuses, setApprovalStatuses] = useState118({});
51424
+ const [dialogs, setDialogs] = useState118([]);
51425
+ const [dialogsNextCursor, setDialogsNextCursor] = useState118(null);
51426
+ const [isDialogsLoading, setIsDialogsLoading] = useState118(false);
51427
+ const [dialogsError, setDialogsError] = useState118(false);
51428
+ const [isCreatingDialog, setIsCreatingDialog] = useState118(false);
51429
+ const [messagesNextCursor, setMessagesNextCursor] = useState118(null);
51430
+ const [isMessagesLoading, setIsMessagesLoading] = useState118(false);
51431
+ const [dialogTokenUsage, setDialogTokenUsage] = useState118(
51394
51432
  null
51395
51433
  );
51396
- const [liveModel, setLiveModel] = useState117(null);
51397
- const [connectionState, setConnectionState] = useState117("connecting");
51434
+ const [liveModel, setLiveModel] = useState118(null);
51435
+ const [connectionState, setConnectionState] = useState118("connecting");
51398
51436
  const handleApprove = useCallback53(
51399
51437
  async (requestId) => {
51400
51438
  if (!approveRequestCallback) return;
@@ -51434,9 +51472,9 @@ function useNatsChatAdapter(config, options = {}) {
51434
51472
  },
51435
51473
  [rejectRequestCallback]
51436
51474
  );
51437
- const handleApproveRef = useRef75(handleApprove);
51475
+ const handleApproveRef = useRef76(handleApprove);
51438
51476
  handleApproveRef.current = handleApprove;
51439
- const handleRejectRef = useRef75(handleReject);
51477
+ const handleRejectRef = useRef76(handleReject);
51440
51478
  handleRejectRef.current = handleReject;
51441
51479
  const accumApprove = useCallback53((requestId) => {
51442
51480
  if (!requestId) return;
@@ -51446,7 +51484,7 @@ function useNatsChatAdapter(config, options = {}) {
51446
51484
  if (!requestId) return;
51447
51485
  return handleRejectRef.current(requestId);
51448
51486
  }, []);
51449
- const callbacksRef = useRef75({
51487
+ const callbacksRef = useRef76({
51450
51488
  onSegmentsUpdate: (segments, meta) => {
51451
51489
  if (meta?.append && meta.isCompacting) {
51452
51490
  setMessages((prev) => upsertTrailingCompaction(prev, segments));
@@ -51664,7 +51702,7 @@ function useNatsChatAdapter(config, options = {}) {
51664
51702
  onChunkReceived: (chunk) => processChunk(chunk),
51665
51703
  fetchChunks
51666
51704
  });
51667
- const historyLoadSeqRef = useRef75(0);
51705
+ const historyLoadSeqRef = useRef76(0);
51668
51706
  const loadDialogHistory = useCallback53(
51669
51707
  async (id, cursor) => {
51670
51708
  if (!fetchDialogMessages) return;
@@ -51723,8 +51761,8 @@ function useNatsChatAdapter(config, options = {}) {
51723
51761
  isBufferingActive
51724
51762
  ]
51725
51763
  );
51726
- const prevDialogIdRef = useRef75(void 0);
51727
- useEffect88(() => {
51764
+ const prevDialogIdRef = useRef76(void 0);
51765
+ useEffect89(() => {
51728
51766
  if (prevDialogIdRef.current === dialogId) return;
51729
51767
  prevDialogIdRef.current = dialogId;
51730
51768
  historyLoadSeqRef.current += 1;
@@ -51741,7 +51779,7 @@ function useNatsChatAdapter(config, options = {}) {
51741
51779
  if (!active || !dialogId) return;
51742
51780
  void loadDialogHistory(dialogId);
51743
51781
  }, [active, dialogId, loadDialogHistory, resetAccumulator]);
51744
- useEffect88(() => {
51782
+ useEffect89(() => {
51745
51783
  if (!active || !dialogId) return;
51746
51784
  suppressAgentBusyRef.current += 1;
51747
51785
  resetChunkTracking();
@@ -51793,14 +51831,14 @@ function useNatsChatAdapter(config, options = {}) {
51793
51831
  })();
51794
51832
  }
51795
51833
  });
51796
- useEffect88(() => {
51834
+ useEffect89(() => {
51797
51835
  if (!active || !dialogId) {
51798
51836
  setConnectionState("connected");
51799
51837
  return;
51800
51838
  }
51801
51839
  setConnectionState("connecting");
51802
51840
  }, [active, dialogId]);
51803
- const initialDialogsLoadedRef = useRef75(false);
51841
+ const initialDialogsLoadedRef = useRef76(false);
51804
51842
  const loadDialogsPage = useCallback53(
51805
51843
  async (cursor) => {
51806
51844
  if (!fetchDialogs) return;
@@ -51832,7 +51870,7 @@ function useNatsChatAdapter(config, options = {}) {
51832
51870
  const reloadDialogs = useCallback53(() => {
51833
51871
  void loadDialogsPage();
51834
51872
  }, [loadDialogsPage]);
51835
- useEffect88(() => {
51873
+ useEffect89(() => {
51836
51874
  if (!fetchDialogs) return;
51837
51875
  if (!active) return;
51838
51876
  if (initialDialogsLoadedRef.current) return;
@@ -52075,7 +52113,7 @@ function useNatsChatAdapter(config, options = {}) {
52075
52113
  }
52076
52114
 
52077
52115
  // src/components/chat/hooks/use-unified-chat.ts
52078
- import { useCallback as useCallback54, useMemo as useMemo47, useRef as useRef76 } from "react";
52116
+ import { useCallback as useCallback54, useMemo as useMemo47, useRef as useRef77 } from "react";
52079
52117
  var EMPTY_SSE_OPTIONS = {};
52080
52118
  function createDisabledNatsConfig() {
52081
52119
  return {
@@ -52090,7 +52128,7 @@ function createDisabledNatsConfig() {
52090
52128
  }
52091
52129
  function useUnifiedChat(options) {
52092
52130
  const { modes, activeMode, mingoStateOverride } = options;
52093
- const disabledNatsRef = useRef76(null);
52131
+ const disabledNatsRef = useRef77(null);
52094
52132
  if (disabledNatsRef.current === null) {
52095
52133
  disabledNatsRef.current = createDisabledNatsConfig();
52096
52134
  }
@@ -52104,7 +52142,7 @@ function useUnifiedChat(options) {
52104
52142
  { active: natsActive }
52105
52143
  );
52106
52144
  const activeState = activeMode === "guide" ? sseState : mingoStateOverride ?? natsState;
52107
- const activeStateRef = useRef76(activeState);
52145
+ const activeStateRef = useRef77(activeState);
52108
52146
  activeStateRef.current = activeState;
52109
52147
  const stopMessage = useCallback54(() => activeStateRef.current.stopMessage(), []);
52110
52148
  const clearMessages = useCallback54(
@@ -52459,7 +52497,7 @@ function buildStreamFrames(messages) {
52459
52497
 
52460
52498
  // src/components/chat/embeddable-chat.tsx
52461
52499
  init_cn();
52462
- import { useCallback as useCallback56, useEffect as useEffect89, useMemo as useMemo49, useRef as useRef78, useState as useState119 } from "react";
52500
+ import { useCallback as useCallback56, useEffect as useEffect90, useMemo as useMemo49, useRef as useRef79, useState as useState120 } from "react";
52463
52501
  import * as DialogPrimitive4 from "@radix-ui/react-dialog";
52464
52502
  import { usePreventScroll as usePreventScroll6 } from "@react-aria/overlays";
52465
52503
  import { isIOS } from "@react-aria/utils";
@@ -52540,7 +52578,7 @@ init_button2();
52540
52578
  import { FileText as FileText8, MessageSquare as MessageSquare3 } from "lucide-react";
52541
52579
 
52542
52580
  // src/components/chat/hooks/use-chat-dialog-manager.ts
52543
- import { useCallback as useCallback55, useMemo as useMemo48, useRef as useRef77, useState as useState118 } from "react";
52581
+ import { useCallback as useCallback55, useMemo as useMemo48, useRef as useRef78, useState as useState119 } from "react";
52544
52582
  function useChatDialogManager({
52545
52583
  dialogs,
52546
52584
  activeDialogId,
@@ -52551,8 +52589,8 @@ function useChatDialogManager({
52551
52589
  fetchArchivedDialogs,
52552
52590
  unarchiveDialog
52553
52591
  }) {
52554
- const [renameTarget, setRenameTarget] = useState118(null);
52555
- const [archiveTarget, setArchiveTarget] = useState118(null);
52592
+ const [renameTarget, setRenameTarget] = useState119(null);
52593
+ const [archiveTarget, setArchiveTarget] = useState119(null);
52556
52594
  const handleConfirmRename = useCallback55(
52557
52595
  (name) => {
52558
52596
  if (renameTarget) void renameDialog(renameTarget.id, name);
@@ -52575,12 +52613,12 @@ function useChatDialogManager({
52575
52613
  }
52576
52614
  setArchiveTarget(null);
52577
52615
  }, [archiveTarget, archiveDialog, activeDialogId, clearMessages]);
52578
- const [archiveOpen, setArchiveOpen] = useState118(false);
52579
- const [archivedDialogs, setArchivedDialogs] = useState118([]);
52580
- const [archivedCursor, setArchivedCursor] = useState118(null);
52581
- const [archivedLoading, setArchivedLoading] = useState118(false);
52582
- const [archivedPending, setArchivedPending] = useState118(false);
52583
- const archivedRequestIdRef = useRef77(0);
52616
+ const [archiveOpen, setArchiveOpen] = useState119(false);
52617
+ const [archivedDialogs, setArchivedDialogs] = useState119([]);
52618
+ const [archivedCursor, setArchivedCursor] = useState119(null);
52619
+ const [archivedLoading, setArchivedLoading] = useState119(false);
52620
+ const [archivedPending, setArchivedPending] = useState119(false);
52621
+ const archivedRequestIdRef = useRef78(0);
52584
52622
  const loadArchivedPage = useCallback55(
52585
52623
  async (cursor) => {
52586
52624
  if (!fetchArchivedDialogs) return;
@@ -52621,10 +52659,10 @@ function useChatDialogManager({
52621
52659
  void loadArchivedPage();
52622
52660
  }, [loadArchivedPage]);
52623
52661
  const closeArchive = useCallback55(() => setArchiveOpen(false), []);
52624
- const [viewingArchivedId, setViewingArchivedId] = useState118(
52662
+ const [viewingArchivedId, setViewingArchivedId] = useState119(
52625
52663
  null
52626
52664
  );
52627
- const [openingDialogId, setOpeningDialogId] = useState118(null);
52665
+ const [openingDialogId, setOpeningDialogId] = useState119(null);
52628
52666
  const handleSelectDialog = useCallback55(
52629
52667
  (id) => {
52630
52668
  setViewingArchivedId(null);
@@ -52643,7 +52681,7 @@ function useChatDialogManager({
52643
52681
  },
52644
52682
  [selectDialog]
52645
52683
  );
52646
- const [restoreTarget, setRestoreTarget] = useState118(null);
52684
+ const [restoreTarget, setRestoreTarget] = useState119(null);
52647
52685
  const handleConfirmRestore = useCallback55(async () => {
52648
52686
  if (restoreTarget) {
52649
52687
  try {
@@ -52736,9 +52774,9 @@ var SPLIT_MIN_WIDTH = HISTORY_RAIL_WIDTH + CHAT_BLOCK_MIN_WIDTH;
52736
52774
  var RAIL_COLLAPSED_STORAGE_KEY = "mingo-chat-history-collapsed";
52737
52775
  var RAIL_ANIM_MS = 320;
52738
52776
  function useRailPresence(open) {
52739
- const [mounted, setMounted] = useState119(open);
52740
- const [active, setActive] = useState119(false);
52741
- useEffect89(() => {
52777
+ const [mounted, setMounted] = useState120(open);
52778
+ const [active, setActive] = useState120(false);
52779
+ useEffect90(() => {
52742
52780
  if (open) {
52743
52781
  setMounted(true);
52744
52782
  let raf2 = 0;
@@ -52956,7 +52994,7 @@ function SourceChips({
52956
52994
  onClose,
52957
52995
  onDiscuss
52958
52996
  }) {
52959
- const [expanded, setExpanded] = useState119(false);
52997
+ const [expanded, setExpanded] = useState120(false);
52960
52998
  if (cited.length === 0) {
52961
52999
  const fallback = uncited.slice(0, FALLBACK_TOP_RETRIEVED);
52962
53000
  if (fallback.length === 0) return null;
@@ -53063,7 +53101,7 @@ function EmbeddableChatInner({
53063
53101
  const commandsUrl = runtime.endpoints.commandsUrl;
53064
53102
  const { attachmentsEnabled, user: identityUser } = useChatIdentity();
53065
53103
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
53066
- useEffect89(() => {
53104
+ useEffect90(() => {
53067
53105
  if (process.env.NODE_ENV !== "production") {
53068
53106
  const hasOpen = open !== void 0;
53069
53107
  const hasHandler = onOpenChange !== void 0;
@@ -53079,13 +53117,13 @@ function EmbeddableChatInner({
53079
53117
  defaultProp: defaultOpen ?? false,
53080
53118
  onChange: onOpenChange
53081
53119
  });
53082
- const [autoFocusInput] = useState119(() => {
53120
+ const [autoFocusInput] = useState120(() => {
53083
53121
  if (typeof window === "undefined") return false;
53084
53122
  return !window.matchMedia("(pointer: coarse)").matches;
53085
53123
  });
53086
53124
  usePreventScroll6({ isDisabled: !isOpen || shellLess });
53087
- const navigatingAwayRef = useRef78(false);
53088
- useEffect89(() => {
53125
+ const navigatingAwayRef = useRef79(false);
53126
+ useEffect90(() => {
53089
53127
  if (!isOpen) return;
53090
53128
  if (shellLess) return;
53091
53129
  if (typeof window === "undefined") return;
@@ -53111,8 +53149,8 @@ function EmbeddableChatInner({
53111
53149
  window.scrollTo(0, scrollY);
53112
53150
  };
53113
53151
  }, [isOpen, shellLess]);
53114
- const chatInputRef = useRef78(null);
53115
- const [quickActionPreview, setQuickActionPreview] = useState119(null);
53152
+ const chatInputRef = useRef79(null);
53153
+ const [quickActionPreview, setQuickActionPreview] = useState120(null);
53116
53154
  const slashCommandsProp = useMemo49(
53117
53155
  () => ({
53118
53156
  fetchCommands: (prefix, signal) => fetchSlashCommands(prefix, signal, commandsUrl),
@@ -53155,7 +53193,7 @@ function EmbeddableChatInner({
53155
53193
  }, [mingoState, mingoDialogCapabilities, effectiveModes]);
53156
53194
  const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
53157
53195
  const initialActiveMode = controlledActiveMode ?? defaultActiveMode ?? (effectiveModes.guide ? "guide" : "mingo");
53158
- const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState119(initialActiveMode);
53196
+ const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState120(initialActiveMode);
53159
53197
  const activeMode = controlledActiveMode ?? uncontrolledActiveMode;
53160
53198
  const handleActiveModeChange = useCallback56(
53161
53199
  (next) => {
@@ -53215,8 +53253,8 @@ function EmbeddableChatInner({
53215
53253
  hasMoreMessages,
53216
53254
  loadMoreMessages
53217
53255
  } = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
53218
- const guidePromptSentRef = useRef78(false);
53219
- useEffect89(() => {
53256
+ const guidePromptSentRef = useRef79(false);
53257
+ useEffect90(() => {
53220
53258
  if (!guidePendingPrompt) {
53221
53259
  guidePromptSentRef.current = false;
53222
53260
  return;
@@ -53237,15 +53275,15 @@ function EmbeddableChatInner({
53237
53275
  const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
53238
53276
  const contextMaxItems = contextPicker?.maxItems ?? 10;
53239
53277
  const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
53240
- const [contextItems, setContextItems] = useState119([]);
53241
- const [contextPickerOpen, setContextPickerOpen] = useState119(false);
53242
- const [mentionQuery, setMentionQuery] = useState119(null);
53243
- const mentionActiveRef = useRef78(false);
53244
- useEffect89(() => {
53278
+ const [contextItems, setContextItems] = useState120([]);
53279
+ const [contextPickerOpen, setContextPickerOpen] = useState120(false);
53280
+ const [mentionQuery, setMentionQuery] = useState120(null);
53281
+ const mentionActiveRef = useRef79(false);
53282
+ useEffect90(() => {
53245
53283
  mentionActiveRef.current = mentionQuery !== null;
53246
53284
  }, [mentionQuery]);
53247
- const mentionKeysRef = useRef78(/* @__PURE__ */ new Set());
53248
- useEffect89(() => {
53285
+ const mentionKeysRef = useRef79(/* @__PURE__ */ new Set());
53286
+ useEffect90(() => {
53249
53287
  setContextItems([]);
53250
53288
  setMentionQuery(null);
53251
53289
  mentionKeysRef.current.clear();
@@ -53341,7 +53379,7 @@ function EmbeddableChatInner({
53341
53379
  () => effectiveAssistantIcon ? /* @__PURE__ */ jsx362(EntityIcon, { icon: effectiveAssistantIcon, size: 24 }) : /* @__PURE__ */ jsx362(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
53342
53380
  [effectiveAssistantIcon]
53343
53381
  );
53344
- const timestampCacheRef = useRef78(/* @__PURE__ */ new Map());
53382
+ const timestampCacheRef = useRef79(/* @__PURE__ */ new Map());
53345
53383
  const guideUserName = activeMode === "guide" ? [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || identityUser?.name?.trim() || void 0 : void 0;
53346
53384
  const guideUserAvatar = activeMode === "guide" ? identityUser?.avatarUrl?.trim() || void 0 : void 0;
53347
53385
  const messages = useMemo49(() => {
@@ -53468,7 +53506,7 @@ function EmbeddableChatInner({
53468
53506
  });
53469
53507
  const handleOpen = useCallback56(() => setIsOpen(true), [setIsOpen]);
53470
53508
  useCloseOnNavigation(handleNavigationClose, null);
53471
- useEffect89(() => {
53509
+ useEffect90(() => {
53472
53510
  const handler = (e) => {
53473
53511
  const detail = e.detail;
53474
53512
  if (!detail || detail.source !== source) return;
@@ -53478,7 +53516,7 @@ function EmbeddableChatInner({
53478
53516
  window.addEventListener("ask-ai:open-with-ref", handler);
53479
53517
  return () => window.removeEventListener("ask-ai:open-with-ref", handler);
53480
53518
  }, [source, discussRef, setIsOpen]);
53481
- useEffect89(() => {
53519
+ useEffect90(() => {
53482
53520
  const handler = (e) => {
53483
53521
  const detail = e.detail;
53484
53522
  if (!detail || detail.source !== source) return;
@@ -53495,7 +53533,7 @@ function EmbeddableChatInner({
53495
53533
  const contentViewKey = hasConversation ? "conversation" : activeMode;
53496
53534
  const isGuideEmpty = !hasConversation && activeMode === "guide";
53497
53535
  const isQuickActionEmpty = !hasConversation && (activeMode === "guide" || activeMode === "mingo");
53498
- useEffect89(() => {
53536
+ useEffect90(() => {
53499
53537
  if (!isQuickActionEmpty) setQuickActionPreview(null);
53500
53538
  }, [isQuickActionEmpty]);
53501
53539
  const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
@@ -53537,10 +53575,10 @@ function EmbeddableChatInner({
53537
53575
  const uncited = sources.filter((s) => !seenOrder.has(s.index));
53538
53576
  return { cited, uncited };
53539
53577
  }, [lastAssistantMsg, chatLoading]);
53540
- const [portalHost, setPortalHost] = useState119(null);
53541
- const [panelWidth, setPanelWidth] = useState119(0);
53542
- const panelMeasureRef = useRef78(null);
53543
- useEffect89(() => {
53578
+ const [portalHost, setPortalHost] = useState120(null);
53579
+ const [panelWidth, setPanelWidth] = useState120(0);
53580
+ const panelMeasureRef = useRef79(null);
53581
+ useEffect90(() => {
53544
53582
  const el = panelMeasureRef.current;
53545
53583
  if (!el || typeof ResizeObserver === "undefined") return;
53546
53584
  const ro = new ResizeObserver((entries) => {
@@ -53551,8 +53589,8 @@ function EmbeddableChatInner({
53551
53589
  setPanelWidth(el.clientWidth);
53552
53590
  return () => ro.disconnect();
53553
53591
  }, []);
53554
- const [railCollapsed, setRailCollapsed] = useState119(false);
53555
- useEffect89(() => {
53592
+ const [railCollapsed, setRailCollapsed] = useState120(false);
53593
+ useEffect90(() => {
53556
53594
  try {
53557
53595
  if (window.localStorage.getItem(RAIL_COLLAPSED_STORAGE_KEY) === "1")
53558
53596
  setRailCollapsed(true);
@@ -53569,15 +53607,15 @@ function EmbeddableChatInner({
53569
53607
  return next;
53570
53608
  });
53571
53609
  }, []);
53572
- const [railSearchOpen, setRailSearchOpen] = useState119(false);
53610
+ const [railSearchOpen, setRailSearchOpen] = useState120(false);
53573
53611
  const splitEligible = activeMode === "mingo";
53574
53612
  const canSplit = panelWidth >= SPLIT_MIN_WIDTH;
53575
53613
  const wideMingo = splitEligible && canSplit && !previewMode;
53576
53614
  const splitActive = wideMingo && !railCollapsed;
53577
53615
  const railPresence = useRailPresence(splitActive);
53578
53616
  const showWideHeader = wideMingo || railPresence.mounted;
53579
- const [composeOpen, setComposeOpen] = useState119(false);
53580
- useEffect89(() => {
53617
+ const [composeOpen, setComposeOpen] = useState120(false);
53618
+ useEffect90(() => {
53581
53619
  if (hasConversation) setComposeOpen(false);
53582
53620
  }, [hasConversation]);
53583
53621
  const isMingoMode = activeMode === "mingo";
@@ -53911,7 +53949,8 @@ function EmbeddableChatInner({
53911
53949
  ...mingoWelcome,
53912
53950
  hasExistingChats: false,
53913
53951
  onQuickActionHover: (action) => setQuickActionPreview(action.prompt ?? action.label),
53914
- onQuickActionHoverEnd: () => setQuickActionPreview(null)
53952
+ onQuickActionHoverEnd: () => setQuickActionPreview(null),
53953
+ agentSlug: activeAgentSlug ?? "mingo"
53915
53954
  }
53916
53955
  )
53917
53956
  ) : (
@@ -53933,6 +53972,7 @@ function EmbeddableChatInner({
53933
53972
  },
53934
53973
  onQuickActionHover: (action) => setQuickActionPreview(action.prompt ?? action.label),
53935
53974
  onQuickActionHoverEnd: () => setQuickActionPreview(null),
53975
+ agentSlug: activeAgentSlug,
53936
53976
  children: (chipCommands.length > 0 || !commandsLoaded) && /* @__PURE__ */ jsxs288("div", { className: "shrink-0 overflow-hidden rounded-md border border-ods-border", children: [
53937
53977
  !commandsLoaded && chipCommands.length === 0 && SKELETON_ROW_VARIANTS.map((variant, i) => /* @__PURE__ */ jsx362(
53938
53978
  MingoOnboardingCardSkeleton,
@@ -55095,4 +55135,4 @@ export {
55095
55135
  LogsList,
55096
55136
  assets
55097
55137
  };
55098
- //# sourceMappingURL=chunk-TP5MVWQ2.js.map
55138
+ //# sourceMappingURL=chunk-KUVFE5WC.js.map