@flamingo-stack/openframe-frontend-core 0.0.460 → 0.0.461

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 (84) hide show
  1. package/dist/{chunk-2KRAHL2J.cjs → chunk-2T5MXXTK.cjs} +31 -31
  2. package/dist/{chunk-2KRAHL2J.cjs.map → chunk-2T5MXXTK.cjs.map} +1 -1
  3. package/dist/{chunk-7VNAK2TM.cjs → chunk-3H5XD5UD.cjs} +7 -7
  4. package/dist/{chunk-7VNAK2TM.cjs.map → chunk-3H5XD5UD.cjs.map} +1 -1
  5. package/dist/{chunk-OMY4PRE3.js → chunk-4TKGFC7I.js} +2 -2
  6. package/dist/{chunk-IMG46R5G.cjs → chunk-5D3UPZIM.cjs} +59 -59
  7. package/dist/{chunk-IMG46R5G.cjs.map → chunk-5D3UPZIM.cjs.map} +1 -1
  8. package/dist/{chunk-GTJJ4Y7Z.cjs → chunk-6IA5TD7O.cjs} +15 -15
  9. package/dist/{chunk-GTJJ4Y7Z.cjs.map → chunk-6IA5TD7O.cjs.map} +1 -1
  10. package/dist/{chunk-BOPT23N4.js → chunk-7NUTHK3A.js} +4 -4
  11. package/dist/{chunk-32N6U2Z2.cjs → chunk-BFEMQ2XC.cjs} +26 -26
  12. package/dist/{chunk-32N6U2Z2.cjs.map → chunk-BFEMQ2XC.cjs.map} +1 -1
  13. package/dist/{chunk-ITCV37Q2.js → chunk-CDARBFPL.js} +2 -2
  14. package/dist/{chunk-5AUOHZWP.js → chunk-EXSLPPEY.js} +4 -4
  15. package/dist/{chunk-KJOM3JWD.cjs → chunk-FQKLIGV3.cjs} +62 -62
  16. package/dist/{chunk-KJOM3JWD.cjs.map → chunk-FQKLIGV3.cjs.map} +1 -1
  17. package/dist/{chunk-YWMHHI3V.js → chunk-FYIX7RTZ.js} +4 -4
  18. package/dist/{chunk-6R3NA5WS.js → chunk-HHKLSJ5Y.js} +2 -2
  19. package/dist/{chunk-NZNF7RCQ.cjs → chunk-HWJWRQGV.cjs} +5 -5
  20. package/dist/{chunk-NZNF7RCQ.cjs.map → chunk-HWJWRQGV.cjs.map} +1 -1
  21. package/dist/{chunk-3SFYW3J7.js → chunk-IQU6ZIZR.js} +2 -2
  22. package/dist/{chunk-XFH7PMGS.js → chunk-KUVFE5WC.js} +641 -622
  23. package/dist/chunk-KUVFE5WC.js.map +1 -0
  24. package/dist/{chunk-KG6VKWRF.cjs → chunk-NFILBHXY.cjs} +9 -9
  25. package/dist/{chunk-KG6VKWRF.cjs.map → chunk-NFILBHXY.cjs.map} +1 -1
  26. package/dist/{chunk-722A62GL.js → chunk-PLJSN3SR.js} +4 -4
  27. package/dist/{chunk-MK5PLTDE.cjs → chunk-QLLXI554.cjs} +26 -26
  28. package/dist/{chunk-MK5PLTDE.cjs.map → chunk-QLLXI554.cjs.map} +1 -1
  29. package/dist/{chunk-AQNZOW6H.js → chunk-RTLYVFFQ.js} +2 -2
  30. package/dist/{chunk-NWHCBXRQ.js → chunk-S2KZZVJF.js} +2 -2
  31. package/dist/{chunk-HFTBMWAO.cjs → chunk-TFVBIOSB.cjs} +747 -728
  32. package/dist/chunk-TFVBIOSB.cjs.map +1 -0
  33. package/dist/{chunk-ZODNSYZC.cjs → chunk-UNGRKZ65.cjs} +11 -11
  34. package/dist/{chunk-ZODNSYZC.cjs.map → chunk-UNGRKZ65.cjs.map} +1 -1
  35. package/dist/{chunk-6NACOLUM.cjs → chunk-WHXYDEAM.cjs} +37 -37
  36. package/dist/{chunk-6NACOLUM.cjs.map → chunk-WHXYDEAM.cjs.map} +1 -1
  37. package/dist/{chunk-5IX4BNIY.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/index.cjs +2 -2
  41. package/dist/components/chat/index.js +1 -1
  42. package/dist/components/chat/quick-action-wall.d.ts.map +1 -1
  43. package/dist/components/contact/index.cjs +3 -3
  44. package/dist/components/contact/index.js +2 -2
  45. package/dist/components/docs/index.cjs +5 -5
  46. package/dist/components/docs/index.js +4 -4
  47. package/dist/components/embeds/index.cjs +3 -3
  48. package/dist/components/embeds/index.js +2 -2
  49. package/dist/components/faq/index.cjs +3 -3
  50. package/dist/components/faq/index.js +2 -2
  51. package/dist/components/features/index.cjs +2 -2
  52. package/dist/components/features/index.js +1 -1
  53. package/dist/components/help-center-pages/index.cjs +20 -20
  54. package/dist/components/help-center-pages/index.js +11 -11
  55. package/dist/components/index.cjs +129 -129
  56. package/dist/components/index.js +9 -9
  57. package/dist/components/navigation/index.cjs +2 -2
  58. package/dist/components/navigation/index.js +1 -1
  59. package/dist/components/onboarding-guides/index.cjs +5 -5
  60. package/dist/components/onboarding-guides/index.js +4 -4
  61. package/dist/components/related-content/index.cjs +3 -3
  62. package/dist/components/related-content/index.js +2 -2
  63. package/dist/components/tickets/index.cjs +5 -5
  64. package/dist/components/tickets/index.js +4 -4
  65. package/dist/components/ui/index.cjs +2 -2
  66. package/dist/components/ui/index.js +1 -1
  67. package/dist/index.cjs +2 -2
  68. package/dist/index.js +1 -1
  69. package/package.json +1 -1
  70. package/src/components/chat/quick-action-wall.tsx +49 -6
  71. package/src/stories/QuickActionWall.stories.tsx +24 -0
  72. package/dist/chunk-HFTBMWAO.cjs.map +0 -1
  73. package/dist/chunk-XFH7PMGS.js.map +0 -1
  74. /package/dist/{chunk-OMY4PRE3.js.map → chunk-4TKGFC7I.js.map} +0 -0
  75. /package/dist/{chunk-BOPT23N4.js.map → chunk-7NUTHK3A.js.map} +0 -0
  76. /package/dist/{chunk-ITCV37Q2.js.map → chunk-CDARBFPL.js.map} +0 -0
  77. /package/dist/{chunk-5AUOHZWP.js.map → chunk-EXSLPPEY.js.map} +0 -0
  78. /package/dist/{chunk-YWMHHI3V.js.map → chunk-FYIX7RTZ.js.map} +0 -0
  79. /package/dist/{chunk-6R3NA5WS.js.map → chunk-HHKLSJ5Y.js.map} +0 -0
  80. /package/dist/{chunk-3SFYW3J7.js.map → chunk-IQU6ZIZR.js.map} +0 -0
  81. /package/dist/{chunk-722A62GL.js.map → chunk-PLJSN3SR.js.map} +0 -0
  82. /package/dist/{chunk-AQNZOW6H.js.map → chunk-RTLYVFFQ.js.map} +0 -0
  83. /package/dist/{chunk-NWHCBXRQ.js.map → chunk-S2KZZVJF.js.map} +0 -0
  84. /package/dist/{chunk-5IX4BNIY.js.map → chunk-ZYHO7WAW.js.map} +0 -0
@@ -7056,6 +7056,9 @@ 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;
7059
7062
  var AGENT_MAX_ROWS = 2;
7060
7063
  function QuickActionWall({
7061
7064
  chips,
@@ -7081,6 +7084,18 @@ function QuickActionWall({
7081
7084
  contentClassName,
7082
7085
  sync
7083
7086
  }) {
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
+ }, []);
7084
7099
  const padTarget = rows ? void 0 : minChips;
7085
7100
  const track = React13.useMemo(() => {
7086
7101
  if (!padTarget || chips.length === 0 || chips.length >= padTarget) return chips;
@@ -7116,7 +7131,11 @@ function QuickActionWall({
7116
7131
  const rowCap = agentCapped ? Math.min(rows, AGENT_MAX_ROWS) : rows;
7117
7132
  const dataRows = agentCapped ? Math.min(Math.max(1, Math.ceil(chips.length / DEFAULT_MIN_CHIPS_PER_ROW)), rowCap) : rows;
7118
7133
  const stackRows = loading ? rowCap : dataRows;
7119
- const perRowTarget = minChips ? Math.ceil(minChips / stackRows) : DEFAULT_MIN_CHIPS_PER_ROW;
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;
7120
7139
  const rowLists = Array.from({ length: stackRows }, (_, r) => {
7121
7140
  const base = chips.filter((_2, i) => i % stackRows === r);
7122
7141
  if (base.length === 0 || base.length >= perRowTarget) return base;
@@ -7127,7 +7146,7 @@ function QuickActionWall({
7127
7146
  ).flat();
7128
7147
  });
7129
7148
  const skelPerRow = Math.ceil(skeletonCount / stackRows);
7130
- return /* @__PURE__ */ jsxs29("div", { className: cn("relative flex flex-col overflow-hidden", className), style: { gap }, children: [
7149
+ return /* @__PURE__ */ jsxs29("div", { ref: brickRef, className: cn("relative flex flex-col overflow-hidden", className), style: { gap }, children: [
7131
7150
  rowLists.map((list, r) => /* @__PURE__ */ jsx35(
7132
7151
  MarqueeWall,
7133
7152
  {
@@ -8206,7 +8225,7 @@ import * as React24 from "react";
8206
8225
 
8207
8226
  // src/components/ui/modal-v2.tsx
8208
8227
  import * as React23 from "react";
8209
- import { useEffect as useEffect11, useState as useState17 } from "react";
8228
+ import { useEffect as useEffect12, useState as useState18 } from "react";
8210
8229
  import { usePreventScroll } from "@react-aria/overlays";
8211
8230
  init_cn();
8212
8231
  import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
@@ -8214,8 +8233,8 @@ var ANIMATION_DURATION = 200;
8214
8233
  var ModalContext = React23.createContext({});
8215
8234
  var Modal = React23.forwardRef(
8216
8235
  ({ isOpen, onClose, children, className }, ref) => {
8217
- const [isMounted, setIsMounted] = useState17(isOpen);
8218
- useEffect11(() => {
8236
+ const [isMounted, setIsMounted] = useState18(isOpen);
8237
+ useEffect12(() => {
8219
8238
  if (isOpen) {
8220
8239
  setIsMounted(true);
8221
8240
  return;
@@ -8224,7 +8243,7 @@ var Modal = React23.forwardRef(
8224
8243
  return () => clearTimeout(timeout);
8225
8244
  }, [isOpen]);
8226
8245
  usePreventScroll({ isDisabled: !isOpen });
8227
- useEffect11(() => {
8246
+ useEffect12(() => {
8228
8247
  const handleKeyDown = (event) => {
8229
8248
  if (event.key === "Escape") {
8230
8249
  onClose();
@@ -8764,7 +8783,7 @@ function ChatPanelHeader({
8764
8783
  import * as React29 from "react";
8765
8784
 
8766
8785
  // src/components/chat/chat-attachment-bar.tsx
8767
- 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";
8768
8787
  init_button2();
8769
8788
  init_cn();
8770
8789
 
@@ -8842,7 +8861,7 @@ function ChatAttachmentAddButton({
8842
8861
  disabled = false,
8843
8862
  size: size2 = "default"
8844
8863
  }) {
8845
- const fileInputRef = useRef13(null);
8864
+ const fileInputRef = useRef14(null);
8846
8865
  const compact = size2 === "compact";
8847
8866
  const boxClass = compact ? "h-6 w-6" : "h-7 w-7";
8848
8867
  if (!attachmentsEnabled) {
@@ -8981,8 +9000,8 @@ function extLabel(fileName) {
8981
9000
  return fileName.slice(dot + 1, dot + 4).toLowerCase();
8982
9001
  }
8983
9002
  function useObjectUrl(file) {
8984
- const [url, setUrl] = useState20(null);
8985
- useEffect14(() => {
9003
+ const [url, setUrl] = useState21(null);
9004
+ useEffect15(() => {
8986
9005
  if (!file) {
8987
9006
  setUrl(null);
8988
9007
  return;
@@ -9387,7 +9406,7 @@ function ChatArchivePage(props) {
9387
9406
  // src/components/chat/chat-sidebar.tsx
9388
9407
  init_cn();
9389
9408
  init_button2();
9390
- 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";
9391
9410
 
9392
9411
  // src/components/chat/chat-sidebar-skeleton.tsx
9393
9412
  init_cn();
@@ -9503,13 +9522,13 @@ DialogListItem.displayName = "DialogListItem";
9503
9522
  var ChatSidebar = forwardRef20(
9504
9523
  ({ className, onNewChat, onDialogSelect, dialogs = [], activeDialogId, isLoading, isCreatingDialog, children, hasNextPage, isFetchingNextPage, onLoadMore, ...props }, ref) => {
9505
9524
  const showEmptyState = dialogs.length === 0 && !children;
9506
- const scrollContainerRef = useRef14(null);
9507
- const loadMoreRef = useRef14(null);
9508
- const onLoadMoreRef = useRef14(onLoadMore);
9525
+ const scrollContainerRef = useRef15(null);
9526
+ const loadMoreRef = useRef15(null);
9527
+ const onLoadMoreRef = useRef15(onLoadMore);
9509
9528
  onLoadMoreRef.current = onLoadMore;
9510
- const isFetchingRef = useRef14(isFetchingNextPage);
9529
+ const isFetchingRef = useRef15(isFetchingNextPage);
9511
9530
  isFetchingRef.current = isFetchingNextPage;
9512
- useEffect15(() => {
9531
+ useEffect16(() => {
9513
9532
  const scrollContainer = scrollContainerRef.current;
9514
9533
  const loadMoreElement = loadMoreRef.current;
9515
9534
  if (!scrollContainer || !loadMoreElement || !hasNextPage) return;
@@ -9959,7 +9978,7 @@ function BlogImagePlaceholder({
9959
9978
  }
9960
9979
 
9961
9980
  // src/components/chat/entity-cards/entity-portrait-card.tsx
9962
- import { useEffect as useEffect16, useState as useState22 } from "react";
9981
+ import { useEffect as useEffect17, useState as useState23 } from "react";
9963
9982
 
9964
9983
  // src/components/ui/card.tsx
9965
9984
  init_cn();
@@ -10120,9 +10139,9 @@ function StatusBadge({
10120
10139
  }
10121
10140
 
10122
10141
  // src/components/chat/entity-cards/use-cover-image-fallback.ts
10123
- import { useCallback as useCallback12, useState as useState21 } from "react";
10142
+ import { useCallback as useCallback12, useState as useState22 } from "react";
10124
10143
  function useCoverImageFallback(imageUrl, placeholderUrl) {
10125
- const [failed, setFailed] = useState21(() => /* @__PURE__ */ new Set());
10144
+ const [failed, setFailed] = useState22(() => /* @__PURE__ */ new Set());
10126
10145
  const src = imageUrl && !failed.has(imageUrl) ? imageUrl : placeholderUrl && !failed.has(placeholderUrl) ? placeholderUrl : null;
10127
10146
  const onError = useCallback12(() => {
10128
10147
  if (!src) return;
@@ -10153,8 +10172,8 @@ function EntityPortraitCard({
10153
10172
  className
10154
10173
  }) {
10155
10174
  const { src, onError: onMediaError } = useCoverImageFallback(imageUrl, placeholderUrl);
10156
- const [isWide, setIsWide] = useState22(null);
10157
- useEffect16(() => {
10175
+ const [isWide, setIsWide] = useState23(null);
10176
+ useEffect17(() => {
10158
10177
  setIsWide(null);
10159
10178
  }, [src]);
10160
10179
  const onMediaLoad = (e) => {
@@ -10242,7 +10261,7 @@ function EntityPortraitCard({
10242
10261
  }
10243
10262
 
10244
10263
  // src/components/chat/entity-cards/admin-content-card.tsx
10245
- import { useState as useState23, useEffect as useEffect17 } from "react";
10264
+ import { useState as useState24, useEffect as useEffect18 } from "react";
10246
10265
  init_cn();
10247
10266
 
10248
10267
  // src/components/features/platform-badge.tsx
@@ -10467,11 +10486,11 @@ function AdminContentCard({
10467
10486
  actions,
10468
10487
  className
10469
10488
  }) {
10470
- const [imageError, setImageError] = useState23(false);
10471
- const [imageLoaded, setImageLoaded] = useState23(false);
10489
+ const [imageError, setImageError] = useState24(false);
10490
+ const [imageLoaded, setImageLoaded] = useState24(false);
10472
10491
  const displayUrl = imageUrl && !imageError ? imageUrl : placeholderUrl;
10473
10492
  const imageBgColor = useImageEdgeColor(displayUrl || null, "transparent");
10474
- useEffect17(() => {
10493
+ useEffect18(() => {
10475
10494
  setImageLoaded(false);
10476
10495
  }, [displayUrl]);
10477
10496
  return /* @__PURE__ */ jsxs55("article", { className: cn(
@@ -10642,7 +10661,7 @@ var TabsContent = React34.forwardRef(({ className, ...props }, ref) => /* @__PUR
10642
10661
  TabsContent.displayName = TabsPrimitive.Content.displayName;
10643
10662
 
10644
10663
  // src/components/features/video.tsx
10645
- 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";
10646
10665
  import MuxPlayer from "@mux/mux-player-react";
10647
10666
 
10648
10667
  // src/components/features/video-center-badge.tsx
@@ -10689,7 +10708,7 @@ function fetchPriorityProp(priority) {
10689
10708
  }
10690
10709
 
10691
10710
  // src/components/features/use-video-warmup.ts
10692
- import { useEffect as useEffect18 } from "react";
10711
+ import { useEffect as useEffect19 } from "react";
10693
10712
  import ReactDOM from "react-dom";
10694
10713
 
10695
10714
  // src/components/features/mux-origins.ts
@@ -10741,7 +10760,7 @@ function useVideoWarmup({
10741
10760
  const resolvedOrigin = supabaseStorageOrigin ?? runtime?.endpoints.supabaseStorageOrigin;
10742
10761
  useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
10743
10762
  const { ref, isNear } = useNearViewport(nearMargin);
10744
- useEffect18(() => {
10763
+ useEffect19(() => {
10745
10764
  if (!isNear || !videoUrl || !resolvedOrigin) return;
10746
10765
  if (saveDataEnabled()) return;
10747
10766
  let videoOrigin;
@@ -10958,9 +10977,9 @@ function FilePlayer({
10958
10977
  className
10959
10978
  }) {
10960
10979
  const effectivePreload = preload ?? (saveDataEnabled() ? "none" : "metadata");
10961
- const [hoverMutedFallback, setHoverMutedFallback] = useState24(false);
10962
- const hoverPlayerRef = useRef15(null);
10963
- const perfListenerRef = useRef15(null);
10980
+ const [hoverMutedFallback, setHoverMutedFallback] = useState25(false);
10981
+ const hoverPlayerRef = useRef16(null);
10982
+ const perfListenerRef = useRef16(null);
10964
10983
  const clearPerfListener = useCallback13(() => {
10965
10984
  if (perfListenerRef.current) {
10966
10985
  try {
@@ -10970,17 +10989,17 @@ function FilePlayer({
10970
10989
  perfListenerRef.current = null;
10971
10990
  }
10972
10991
  }, []);
10973
- useEffect19(() => clearPerfListener, [clearPerfListener]);
10974
- const hoverActiveRef = useRef15(false);
10975
- const hoverGenerationRef = useRef15(0);
10976
- const activationWaiterRef = useRef15(null);
10992
+ useEffect20(() => clearPerfListener, [clearPerfListener]);
10993
+ const hoverActiveRef = useRef16(false);
10994
+ const hoverGenerationRef = useRef16(0);
10995
+ const activationWaiterRef = useRef16(null);
10977
10996
  const clearActivationWaiter = useCallback13(() => {
10978
10997
  if (activationWaiterRef.current) {
10979
10998
  activationWaiters.delete(activationWaiterRef.current);
10980
10999
  activationWaiterRef.current = null;
10981
11000
  }
10982
11001
  }, []);
10983
- useEffect19(() => clearActivationWaiter, [clearActivationWaiter]);
11002
+ useEffect20(() => clearActivationWaiter, [clearActivationWaiter]);
10984
11003
  const startHoverPlayback = useCallback13(() => {
10985
11004
  hoverActiveRef.current = true;
10986
11005
  const generation = ++hoverGenerationRef.current;
@@ -11064,7 +11083,7 @@ function FilePlayer({
11064
11083
  setHoverMutedFallback(false);
11065
11084
  }, []);
11066
11085
  const hoverControlled = typeof playWhenHovered === "boolean";
11067
- useEffect19(() => {
11086
+ useEffect20(() => {
11068
11087
  if (!hoverControlled) return;
11069
11088
  if (playWhenHovered) startHoverPlayback();
11070
11089
  else stopHoverPlayback();
@@ -11165,8 +11184,8 @@ function YouTubeFacadeInner({
11165
11184
  className,
11166
11185
  minimalControls
11167
11186
  }) {
11168
- const [activated, setActivated] = useState24(false);
11169
- const iframeRef = useRef15(null);
11187
+ const [activated, setActivated] = useState25(false);
11188
+ const iframeRef = useRef16(null);
11170
11189
  const embedUrl = useMemo15(() => {
11171
11190
  const params = new URLSearchParams({
11172
11191
  autoplay: "1",
@@ -11187,15 +11206,15 @@ function YouTubeFacadeInner({
11187
11206
  }
11188
11207
  return `${YT_NOCOOKIE_ORIGIN}/embed/${videoId}?${params.toString()}`;
11189
11208
  }, [videoId, minimalControls]);
11190
- const [posterTier, setPosterTier] = useState24(0);
11191
- useEffect19(() => {
11209
+ const [posterTier, setPosterTier] = useState25(0);
11210
+ useEffect20(() => {
11192
11211
  setPosterTier(0);
11193
11212
  }, [videoId]);
11194
11213
  const posterQuality = YT_POSTER_TIERS[posterTier];
11195
11214
  const posterJpg = `https://i.ytimg.com/vi/${videoId}/${posterQuality}.jpg`;
11196
11215
  const posterWebp = `https://i.ytimg.com/vi_webp/${videoId}/${posterQuality}.webp`;
11197
11216
  const handlePosterError = () => setPosterTier((tier) => Math.min(tier + 1, YT_POSTER_TIERS.length - 1));
11198
- useEffect19(() => {
11217
+ useEffect20(() => {
11199
11218
  if (!activated) return;
11200
11219
  const iframe = iframeRef.current;
11201
11220
  if (!iframe) return;
@@ -11286,7 +11305,7 @@ function YouTubeFacadeInner({
11286
11305
 
11287
11306
  // src/components/features/video-bites-strip.tsx
11288
11307
  init_cn();
11289
- 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";
11290
11309
 
11291
11310
  // src/components/features/video-ratio-tabs.tsx
11292
11311
  import { Fragment as Fragment18, jsx as jsx76, jsxs as jsxs58 } from "react/jsx-runtime";
@@ -11384,7 +11403,7 @@ function sortBitesByCreatedAtDesc(a, b) {
11384
11403
 
11385
11404
  // src/components/features/cards-strip.tsx
11386
11405
  init_cn();
11387
- 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";
11388
11407
  init_button2();
11389
11408
 
11390
11409
  // src/components/layout/page-heading.tsx
@@ -11471,7 +11490,7 @@ function CardsStrip(props) {
11471
11490
  const items = childrenMode ? childItems : props.items;
11472
11491
  const cardWidthDesktop = childrenMode ? props.cardWidthDesktop ?? 400 : 0;
11473
11492
  const cardWidthMobile = childrenMode ? props.cardWidthMobile ?? 320 : 0;
11474
- useEffect20(() => {
11493
+ useEffect21(() => {
11475
11494
  if (process.env.NODE_ENV === "production" || !childrenMode) return;
11476
11495
  const only = childItems.length === 1 ? childItems[0] : null;
11477
11496
  if (React37.isValidElement(only) && only.type === React37.Fragment) {
@@ -11486,13 +11505,13 @@ function CardsStrip(props) {
11486
11505
  }
11487
11506
  return React37.isValidElement(item) && item.key != null ? String(item.key) : String(index);
11488
11507
  };
11489
- const wrapperRef = useRef16(null);
11490
- const scrollerRef = useRef16(null);
11491
- const trackRef = useRef16(null);
11492
- const [reducedMotion, setReducedMotion] = useState25(false);
11493
- const [isTouch, setIsTouch] = useState25(false);
11494
- const [isMobile, setIsMobile] = useState25(false);
11495
- 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(() => {
11496
11515
  const subs = [];
11497
11516
  const watch = (query, set) => {
11498
11517
  const mq = window.matchMedia(query);
@@ -11506,9 +11525,9 @@ function CardsStrip(props) {
11506
11525
  watch("(max-width: 767px)", setIsMobile);
11507
11526
  return () => subs.forEach((fn) => fn());
11508
11527
  }, []);
11509
- const [overflows, setOverflows] = useState25(false);
11510
- const [marqueeEligible, setMarqueeEligible] = useState25(false);
11511
- const singleCopyWidthRef = useRef16(0);
11528
+ const [overflows, setOverflows] = useState26(false);
11529
+ const [marqueeEligible, setMarqueeEligible] = useState26(false);
11530
+ const singleCopyWidthRef = useRef17(0);
11512
11531
  const marqueeActive = autoScroll && !reducedMotion && marqueeEligible && items.length > 0;
11513
11532
  const measure = useCallback14(() => {
11514
11533
  const scroller = scrollerRef.current;
@@ -11520,7 +11539,7 @@ function CardsStrip(props) {
11520
11539
  setOverflows(singleCopy > scroller.clientWidth + 1);
11521
11540
  setMarqueeEligible(singleCopy > scroller.clientWidth + TRACK_GAP_PX);
11522
11541
  }, []);
11523
- useEffect20(() => {
11542
+ useEffect21(() => {
11524
11543
  measure();
11525
11544
  const scroller = scrollerRef.current;
11526
11545
  const track = trackRef.current;
@@ -11530,10 +11549,10 @@ function CardsStrip(props) {
11530
11549
  ro.observe(track);
11531
11550
  return () => ro.disconnect();
11532
11551
  }, [measure, items.length, marqueeActive, isMobile]);
11533
- const chevronSuppressUntilRef = useRef16(0);
11534
- const userScrollSuppressUntilRef = useRef16(0);
11535
- const [nearViewport, setNearViewport] = useState25(true);
11536
- useEffect20(() => {
11552
+ const chevronSuppressUntilRef = useRef17(0);
11553
+ const userScrollSuppressUntilRef = useRef17(0);
11554
+ const [nearViewport, setNearViewport] = useState26(true);
11555
+ useEffect21(() => {
11537
11556
  const el = wrapperRef.current;
11538
11557
  if (!el || typeof IntersectionObserver === "undefined") return;
11539
11558
  const io = new IntersectionObserver(
@@ -11543,8 +11562,8 @@ function CardsStrip(props) {
11543
11562
  io.observe(el);
11544
11563
  return () => io.disconnect();
11545
11564
  }, []);
11546
- const [activeKey, setActiveKey] = useState25(null);
11547
- const activeKeyRef = useRef16(null);
11565
+ const [activeKey, setActiveKey] = useState26(null);
11566
+ const activeKeyRef = useRef17(null);
11548
11567
  const activate = useCallback14((key) => {
11549
11568
  activeKeyRef.current = key;
11550
11569
  setActiveKey(key);
@@ -11553,8 +11572,8 @@ function CardsStrip(props) {
11553
11572
  if (activeKeyRef.current === key) activeKeyRef.current = null;
11554
11573
  setActiveKey((current) => current === key ? null : current);
11555
11574
  }, []);
11556
- const hoverPointerRef = useRef16({ x: 0, y: 0, inside: false });
11557
- const lastHoverSyncScrollRef = useRef16(-1);
11575
+ const hoverPointerRef = useRef17({ x: 0, y: 0, inside: false });
11576
+ const lastHoverSyncScrollRef = useRef17(-1);
11558
11577
  const syncHoverToPointer = useCallback14(() => {
11559
11578
  const p = hoverPointerRef.current;
11560
11579
  if (!p.inside) return;
@@ -11615,11 +11634,11 @@ function CardsStrip(props) {
11615
11634
  readBack: () => scrollerRef.current?.scrollLeft ?? 0,
11616
11635
  onAfterFrame: syncHoverIfScrolled
11617
11636
  });
11618
- const [mountedIdx, setMountedIdx] = useState25(() => /* @__PURE__ */ new Set());
11619
- const cardObserverRef = useRef16(null);
11620
- const cardElIdxRef = useRef16(/* @__PURE__ */ new Map());
11621
- const cardElNearRef = useRef16(/* @__PURE__ */ new Map());
11622
- 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(() => {
11623
11642
  if (typeof IntersectionObserver === "undefined") return;
11624
11643
  const io = new IntersectionObserver((entries) => {
11625
11644
  for (const e of entries) cardElNearRef.current.set(e.target, e.isIntersecting);
@@ -11647,7 +11666,7 @@ function CardsStrip(props) {
11647
11666
  cardObserverRef.current = null;
11648
11667
  };
11649
11668
  }, []);
11650
- const cardRefFnsRef = useRef16(/* @__PURE__ */ new Map());
11669
+ const cardRefFnsRef = useRef17(/* @__PURE__ */ new Map());
11651
11670
  const getCardRef = useCallback14((idx) => {
11652
11671
  let fn = cardRefFnsRef.current.get(idx);
11653
11672
  if (!fn) {
@@ -11687,7 +11706,7 @@ function CardsStrip(props) {
11687
11706
  const onPointerDownIntent = useCallback14((e) => {
11688
11707
  if (e.pointerType === "touch") onUserScrollIntent();
11689
11708
  }, [onUserScrollIntent]);
11690
- const marqueeActiveRef = useRef16(false);
11709
+ const marqueeActiveRef = useRef17(false);
11691
11710
  marqueeActiveRef.current = marqueeActive;
11692
11711
  const onSeamWarp = useCallback14(() => {
11693
11712
  const scroller = scrollerRef.current;
@@ -11925,14 +11944,14 @@ function VideoBiteCard({
11925
11944
  const key = cardKey ?? `${bite.url}__${index}`;
11926
11945
  const previewUrl = toMuxPreviewUrl(bite.url);
11927
11946
  const controlled = active !== void 0;
11928
- const [selfActive, setSelfActive] = useState26(false);
11947
+ const [selfActive, setSelfActive] = useState27(false);
11929
11948
  const isActive = controlled ? !!active : selfActive;
11930
11949
  const activate = () => controlled ? onActivate?.(key) : setSelfActive(true);
11931
11950
  const deactivate = () => controlled ? onDeactivate?.(key) : setSelfActive(false);
11932
11951
  const gateControlled = playerMounted !== void 0;
11933
- const rootElRef = useRef17(null);
11934
- const [isNear, setIsNear] = useState26(false);
11935
- useEffect21(() => {
11952
+ const rootElRef = useRef18(null);
11953
+ const [isNear, setIsNear] = useState27(false);
11954
+ useEffect22(() => {
11936
11955
  if (gateControlled) return;
11937
11956
  const el = rootElRef.current;
11938
11957
  if (!el || typeof IntersectionObserver === "undefined") return;
@@ -13768,7 +13787,7 @@ function OnboardingGuideCard({
13768
13787
  }
13769
13788
 
13770
13789
  // src/components/chat/entity-cards/roadmap-card.tsx
13771
- import { useState as useState105 } from "react";
13790
+ import { useState as useState106 } from "react";
13772
13791
  import { ThumbsUp, ThumbsDown } from "lucide-react";
13773
13792
 
13774
13793
  // src/components/chat/entity-cards/roadmap-vote-button.tsx
@@ -13809,7 +13828,7 @@ function RoadmapVoteButton({
13809
13828
  init_button();
13810
13829
 
13811
13830
  // src/components/ui/image-gallery-modal.tsx
13812
- import { useState as useState104, useEffect as useEffect77 } from "react";
13831
+ import { useState as useState105, useEffect as useEffect78 } from "react";
13813
13832
 
13814
13833
  // src/components/ui/allowed-domains-input.tsx
13815
13834
  init_cn();
@@ -13970,11 +13989,11 @@ AllowedDomainsInput.displayName = "AllowedDomainsInput";
13970
13989
  // src/components/ui/autocomplete.tsx
13971
13990
  import {
13972
13991
  forwardRef as forwardRef26,
13973
- useEffect as useEffect22,
13992
+ useEffect as useEffect23,
13974
13993
  useImperativeHandle as useImperativeHandle3,
13975
13994
  useMemo as useMemo19,
13976
- useRef as useRef19,
13977
- useState as useState28
13995
+ useRef as useRef20,
13996
+ useState as useState29
13978
13997
  } from "react";
13979
13998
  import * as PopoverPrimitive from "@radix-ui/react-popover";
13980
13999
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
@@ -14072,7 +14091,7 @@ function AutocompleteInner(props, ref) {
14072
14091
  const limitTagsProp = multiple ? props.limitTags ?? "auto" : "auto";
14073
14092
  const getLimitTagsText = multiple ? props.getLimitTagsText ?? ((more) => `+${more}`) : ((more) => `+${more}`);
14074
14093
  const valueArray = multiple ? props.value : props.value != null ? [props.value] : [];
14075
- const [internalInputValue, setInternalInputValue] = useState28("");
14094
+ const [internalInputValue, setInternalInputValue] = useState29("");
14076
14095
  const isInputControlled = inputValueProp !== void 0;
14077
14096
  const inputValue = isInputControlled ? inputValueProp : internalInputValue;
14078
14097
  const updateInputValue = (value, reason) => {
@@ -14081,10 +14100,10 @@ function AutocompleteInner(props, ref) {
14081
14100
  }
14082
14101
  onInputChange?.(value, reason);
14083
14102
  };
14084
- const [isOpen, setIsOpen] = useState28(false);
14085
- const [highlightedIndex, setHighlightedIndex] = useState28(-1);
14086
- const containerRef = useRef19(null);
14087
- 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);
14088
14107
  const isInvalid = invalid || !!error;
14089
14108
  useImperativeHandle3(ref, () => containerRef.current);
14090
14109
  const selectedOptions = useMemo19(() => {
@@ -14101,9 +14120,9 @@ function AutocompleteInner(props, ref) {
14101
14120
  const visibleTags = multiple ? selectedOptions.slice(0, visibleCount) : [];
14102
14121
  const hiddenTags = multiple ? selectedOptions.slice(visibleCount) : [];
14103
14122
  const hiddenTagsCount = multiple ? selectedOptions.length - visibleCount : 0;
14104
- const [showHiddenTags, setShowHiddenTags] = useState28(false);
14105
- const hiddenTagsRef = useRef19(null);
14106
- useEffect22(() => {
14123
+ const [showHiddenTags, setShowHiddenTags] = useState29(false);
14124
+ const hiddenTagsRef = useRef20(null);
14125
+ useEffect23(() => {
14107
14126
  if (!showHiddenTags) return;
14108
14127
  const handleClick = (e) => {
14109
14128
  const target = e.target;
@@ -14155,7 +14174,7 @@ function AutocompleteInner(props, ref) {
14155
14174
  setIsOpen(false);
14156
14175
  onCreateOption?.(trimmed);
14157
14176
  };
14158
- useEffect22(() => {
14177
+ useEffect23(() => {
14159
14178
  setHighlightedIndex(-1);
14160
14179
  }, [filteredOptions.length]);
14161
14180
  const handleInputChange = (e) => {
@@ -15714,7 +15733,7 @@ function DateFilterMenu({
15714
15733
 
15715
15734
  // src/components/ui/duration-input.tsx
15716
15735
  init_cn();
15717
- 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";
15718
15737
  import { jsx as jsx100, jsxs as jsxs78 } from "react/jsx-runtime";
15719
15738
  var SEGMENT_META = [
15720
15739
  { label: "Hours", placeholder: "HH", max: 99 },
@@ -15728,9 +15747,9 @@ var split = (value) => {
15728
15747
  return [parts[0] || "00", parts[1] || "00", parts[2] || "00"];
15729
15748
  };
15730
15749
  function DurationInput({ value, onChange, invalid, className }) {
15731
- const [segments, setSegments] = useState30(() => split(value));
15732
- const refs = [useRef20(null), useRef20(null), useRef20(null)];
15733
- useEffect24(() => {
15750
+ const [segments, setSegments] = useState31(() => split(value));
15751
+ const refs = [useRef21(null), useRef21(null), useRef21(null)];
15752
+ useEffect25(() => {
15734
15753
  setSegments((prev) => compose(prev) === value ? prev : split(value));
15735
15754
  }, [value]);
15736
15755
  const focusSegment = (i) => {
@@ -15847,7 +15866,7 @@ init_cn();
15847
15866
  import React47 from "react";
15848
15867
 
15849
15868
  // src/components/ui/progress-bar.tsx
15850
- 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";
15851
15870
  import { jsx as jsx102 } from "react/jsx-runtime";
15852
15871
  var ProgressBar = ({
15853
15872
  progress,
@@ -15863,9 +15882,9 @@ var ProgressBar = ({
15863
15882
  const isMdUp = useMdUp() ?? true;
15864
15883
  const effectiveSegmentWidth = isMdUp ? segmentWidth : mobileSegmentWidth;
15865
15884
  const effectiveHeight = isMdUp ? height : mobileHeight;
15866
- const containerRef = useRef21(null);
15867
- const [segmentCount, setSegmentCount] = useState31(0);
15868
- useEffect25(() => {
15885
+ const containerRef = useRef22(null);
15886
+ const [segmentCount, setSegmentCount] = useState32(0);
15887
+ useEffect26(() => {
15869
15888
  if (!containerRef.current) return;
15870
15889
  const resizeObserver = new ResizeObserver(() => {
15871
15890
  if (containerRef.current) {
@@ -17798,13 +17817,13 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
17798
17817
  // src/components/ui/modal.tsx
17799
17818
  init_cn();
17800
17819
  import * as React62 from "react";
17801
- import { useEffect as useEffect30 } from "react";
17820
+ import { useEffect as useEffect31 } from "react";
17802
17821
  import { usePreventScroll as usePreventScroll2 } from "@react-aria/overlays";
17803
17822
  import { jsx as jsx122, jsxs as jsxs96 } from "react/jsx-runtime";
17804
17823
  var Modal2 = React62.forwardRef(
17805
17824
  ({ isOpen, onClose, children, className }, ref) => {
17806
17825
  usePreventScroll2({ isDisabled: !isOpen });
17807
- useEffect30(() => {
17826
+ useEffect31(() => {
17808
17827
  const handleKeyDown = (event) => {
17809
17828
  if (event.key === "Escape") {
17810
17829
  onClose();
@@ -18847,7 +18866,7 @@ function TabContent({
18847
18866
  // src/components/ui/tab-navigation.tsx
18848
18867
  init_next_navigation();
18849
18868
  init_cn();
18850
- 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";
18851
18870
  import { Fragment as Fragment29, jsx as jsx132, jsxs as jsxs104 } from "react/jsx-runtime";
18852
18871
  function TabNavigation({
18853
18872
  activeTab: controlledActiveTab,
@@ -18878,9 +18897,9 @@ function TabNavigation({
18878
18897
  }
18879
18898
  return defaultTab || tabs[0]?.id || "";
18880
18899
  };
18881
- const [internalActiveTab, setInternalActiveTab] = useState39(getInitialTab);
18900
+ const [internalActiveTab, setInternalActiveTab] = useState40(getInitialTab);
18882
18901
  const activeTab = isUrlSyncEnabled ? internalActiveTab : controlledActiveTab || "";
18883
- useEffect32(() => {
18902
+ useEffect33(() => {
18884
18903
  if (!isUrlSyncEnabled) return;
18885
18904
  const fromUrl = searchParams?.get(paramName) || "";
18886
18905
  const nextTab = validTabIds.has(fromUrl) ? fromUrl : defaultTab || tabs[0]?.id || "";
@@ -18900,18 +18919,18 @@ function TabNavigation({
18900
18919
  controlledOnTabChange?.(tabId);
18901
18920
  }
18902
18921
  };
18903
- const scrollRef = useRef24(null);
18904
- const activeTabRef = useRef24(null);
18905
- const isFirstActiveScrollRef = useRef24(true);
18906
- const [canScrollLeft, setCanScrollLeft] = useState39(false);
18907
- 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);
18908
18927
  const updateScrollShadows = useCallback19(() => {
18909
18928
  const el = scrollRef.current;
18910
18929
  if (!el) return;
18911
18930
  setCanScrollLeft(el.scrollLeft > 0);
18912
18931
  setCanScrollRight(el.scrollLeft + el.clientWidth < el.scrollWidth - 1);
18913
18932
  }, []);
18914
- useEffect32(() => {
18933
+ useEffect33(() => {
18915
18934
  const el = scrollRef.current;
18916
18935
  if (!el) return;
18917
18936
  updateScrollShadows();
@@ -18935,7 +18954,7 @@ function TabNavigation({
18935
18954
  ro.disconnect();
18936
18955
  };
18937
18956
  }, [updateScrollShadows]);
18938
- useEffect32(() => {
18957
+ useEffect33(() => {
18939
18958
  const el = scrollRef.current;
18940
18959
  const active = activeTabRef.current;
18941
18960
  if (!el || !active) return;
@@ -19090,7 +19109,7 @@ function AIGeneratedBadge({ className }) {
19090
19109
  }
19091
19110
 
19092
19111
  // src/components/ui/fade-preview.tsx
19093
- 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";
19094
19113
  import { ChevronDown as ChevronDown4 } from "lucide-react";
19095
19114
  import { Fragment as Fragment30, jsx as jsx135, jsxs as jsxs106 } from "react/jsx-runtime";
19096
19115
  function FadePreview({
@@ -19099,9 +19118,9 @@ function FadePreview({
19099
19118
  resetKey,
19100
19119
  children
19101
19120
  }) {
19102
- const [expanded, setExpanded] = useState40(false);
19103
- const contentRef = useRef25(null);
19104
- useEffect33(() => {
19121
+ const [expanded, setExpanded] = useState41(false);
19122
+ const contentRef = useRef26(null);
19123
+ useEffect34(() => {
19105
19124
  setExpanded(false);
19106
19125
  }, [resetKey]);
19107
19126
  const needsFade = hiddenCount > 0;
@@ -19166,11 +19185,11 @@ var Progress = React73.forwardRef(({ className, value, indicatorClassName, ...pr
19166
19185
  Progress.displayName = ProgressPrimitive.Root.displayName;
19167
19186
 
19168
19187
  // src/components/ui/release-changelog-section.tsx
19169
- import { useState as useState50 } from "react";
19188
+ import { useState as useState51 } from "react";
19170
19189
  import { ChevronDown as ChevronDown5 } from "lucide-react";
19171
19190
 
19172
19191
  // src/components/ui/rich-markdown-renderer.tsx
19173
- 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";
19174
19193
  import ReactMarkdown2 from "react-markdown";
19175
19194
  import remarkGfm2 from "remark-gfm";
19176
19195
  import remarkBreaks2 from "remark-breaks";
@@ -19178,7 +19197,7 @@ import rehypeHighlight2 from "rehype-highlight";
19178
19197
  import rehypeRaw2 from "rehype-raw";
19179
19198
 
19180
19199
  // src/components/embeds/reddit-embed-client.tsx
19181
- 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";
19182
19201
 
19183
19202
  // src/utils/social-embed-cache.ts
19184
19203
  var cachingRequests = /* @__PURE__ */ new Map();
@@ -19460,7 +19479,7 @@ var socialCache = SocialEmbedCache.getInstance();
19460
19479
 
19461
19480
  // src/components/media-carousel.tsx
19462
19481
  init_cn();
19463
- 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";
19464
19483
  init_button2();
19465
19484
  import { Fragment as Fragment31, jsx as jsx137, jsxs as jsxs107 } from "react/jsx-runtime";
19466
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" }) });
@@ -19475,17 +19494,17 @@ var MediaCarousel = memo4(function MediaCarousel2({
19475
19494
  transformImageSrc,
19476
19495
  reserveDotRow = false
19477
19496
  }) {
19478
- const [currentIndex, setCurrentIndex] = useState41(0);
19479
- const [touchStart, setTouchStart] = useState41(null);
19480
- const [touchEnd, setTouchEnd] = useState41(null);
19481
- const [brokenResourceUrls, setBrokenResourceUrls] = useState41({});
19482
- const [loadedImageSrc, setLoadedImageSrc] = useState41(null);
19483
- 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);
19484
19503
  const onImageError = useCallback20((originalUrl) => {
19485
19504
  const key = originalUrl.trim() || "__missing_src__";
19486
19505
  setBrokenResourceUrls((b) => b[key] ? b : { ...b, [key]: true });
19487
19506
  }, []);
19488
- useEffect34(() => {
19507
+ useEffect35(() => {
19489
19508
  if (currentIndex >= media.length && media.length > 0) {
19490
19509
  setCurrentIndex(media.length - 1);
19491
19510
  }
@@ -19802,11 +19821,11 @@ var RedditProfilePic = ({ username }) => {
19802
19821
  };
19803
19822
  function RedditEmbedClient({ url, maxWidth = 700 }) {
19804
19823
  const { redditProxyUrl } = useRichMarkdownRuntime();
19805
- const [redditData, setRedditData] = useState42(null);
19806
- const [loading, setLoading] = useState42(true);
19807
- const [error, setError] = useState42(null);
19808
- const initializationDone = useRef27(false);
19809
- 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(() => {
19810
19829
  if (initializationDone.current) return;
19811
19830
  initializationDone.current = true;
19812
19831
  const jsonUrl = url.endsWith(".json") ? url : `${url.replace(/\/$/, "")}.json`;
@@ -20112,7 +20131,7 @@ function RedditEmbedClient({ url, maxWidth = 700 }) {
20112
20131
  }
20113
20132
 
20114
20133
  // src/components/embeds/twitter-embed-client.tsx
20115
- 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";
20116
20135
  import { jsx as jsx141, jsxs as jsxs109 } from "react/jsx-runtime";
20117
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" }) });
20118
20137
  var ExternalLinkIcon3 = () => /* @__PURE__ */ jsxs109("svg", { width: "16", height: "16", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: [
@@ -20138,13 +20157,13 @@ var UserIcon4 = () => /* @__PURE__ */ jsxs109("svg", { width: "12", height: "12"
20138
20157
  var XIcon = () => /* @__PURE__ */ jsx141(XLogo, { className: "w-5 h-5", color: "currentColor" });
20139
20158
  function TwitterEmbedClient({ url, tweetId, maxWidth = 700 }) {
20140
20159
  const { twitterProxyUrl } = useRichMarkdownRuntime();
20141
- const [tweetData, setTweetData] = useState43(null);
20142
- const [loading, setLoading] = useState43(true);
20143
- const [error, setError] = useState43(null);
20144
- 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);
20145
20164
  const extractedTweetId = tweetId || url.match(/status\/(\d+)/)?.[1];
20146
20165
  const tweetUrl = url.includes("twitter.com") || url.includes("x.com") ? url : `https://twitter.com/twitter/status/${extractedTweetId}`;
20147
- useEffect36(() => {
20166
+ useEffect37(() => {
20148
20167
  if (initializationDone.current) return;
20149
20168
  initializationDone.current = true;
20150
20169
  if (!extractedTweetId) {
@@ -20309,7 +20328,7 @@ function TwitterEmbedClient({ url, tweetId, maxWidth = 700 }) {
20309
20328
  }
20310
20329
 
20311
20330
  // src/components/embeds/linkedin-embed-client.tsx
20312
- import { useMemo as useMemo25, useState as useState44 } from "react";
20331
+ import { useMemo as useMemo25, useState as useState45 } from "react";
20313
20332
  import { ExternalLink as ExternalLink2 } from "lucide-react";
20314
20333
  import { jsx as jsx142, jsxs as jsxs110 } from "react/jsx-runtime";
20315
20334
  function toLinkedInEmbedUrl(url) {
@@ -20325,7 +20344,7 @@ function toLinkedInEmbedUrl(url) {
20325
20344
  }
20326
20345
  function LinkedInEmbedClient({ url, height = 600 }) {
20327
20346
  const embedUrl = useMemo25(() => toLinkedInEmbedUrl(url), [url]);
20328
- const [loaded, setLoaded] = useState44(false);
20347
+ const [loaded, setLoaded] = useState45(false);
20329
20348
  if (!embedUrl) {
20330
20349
  return /* @__PURE__ */ jsx142(LinkedInContainer, { children: /* @__PURE__ */ jsxs110("div", { className: "p-6", children: [
20331
20350
  /* @__PURE__ */ jsxs110("div", { className: "flex items-center space-x-3 text-ods-text-secondary mb-4", children: [
@@ -20392,7 +20411,7 @@ function LinkedInEmbedClient({ url, height = 600 }) {
20392
20411
  }
20393
20412
 
20394
20413
  // src/components/embeds/og-link-preview.tsx
20395
- 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";
20396
20415
  import { jsx as jsx143, jsxs as jsxs111 } from "react/jsx-runtime";
20397
20416
  var OGLinkErrorBoundary = class extends Component2 {
20398
20417
  constructor(props) {
@@ -20437,12 +20456,12 @@ var OGLinkPreview = ({
20437
20456
  variant = "default",
20438
20457
  enablePlaceholder = true
20439
20458
  }) => {
20440
- const [ogData, setOgData] = useState45(null);
20441
- const [loading, setLoading] = useState45(true);
20442
- const [error, setError] = useState45(false);
20443
- const [imageError, setImageError] = useState45(false);
20444
- const [originalImageError, setOriginalImageError] = useState45(false);
20445
- 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);
20446
20465
  let isValidUrl = true;
20447
20466
  let isLocalhost = false;
20448
20467
  try {
@@ -20457,7 +20476,7 @@ var OGLinkPreview = ({
20457
20476
  } catch {
20458
20477
  isValidUrl = false;
20459
20478
  }
20460
- useEffect37(() => {
20479
+ useEffect38(() => {
20461
20480
  if (!isValidUrl || isLocalhost) return;
20462
20481
  const fetchOGData = async () => {
20463
20482
  try {
@@ -20713,7 +20732,7 @@ var OGLinkPreview = ({
20713
20732
  };
20714
20733
 
20715
20734
  // src/components/embeds/figma-embed.tsx
20716
- import { useState as useState47 } from "react";
20735
+ import { useState as useState48 } from "react";
20717
20736
  import { ExternalLink as ExternalLink3, Play as Play3, LayoutGrid } from "lucide-react";
20718
20737
 
20719
20738
  // src/utils/embed-url-converters.ts
@@ -20767,7 +20786,7 @@ function toFigmaOriginalUrl(url) {
20767
20786
  }
20768
20787
 
20769
20788
  // src/components/embeds/embed-iframe.tsx
20770
- 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";
20771
20790
  import { Fragment as Fragment32, jsx as jsx144, jsxs as jsxs112 } from "react/jsx-runtime";
20772
20791
  function EmbedLoadingSkeleton({ height }) {
20773
20792
  return /* @__PURE__ */ jsx144(
@@ -20788,13 +20807,13 @@ function EmbedIframe({
20788
20807
  loading,
20789
20808
  allowFullScreen
20790
20809
  }) {
20791
- const [isLoaded, setIsLoaded] = useState46(false);
20792
- const iframeRef = useRef29(null);
20810
+ const [isLoaded, setIsLoaded] = useState47(false);
20811
+ const iframeRef = useRef30(null);
20793
20812
  const handleLoad = useCallback21(() => setIsLoaded(true), []);
20794
- useEffect38(() => {
20813
+ useEffect39(() => {
20795
20814
  setIsLoaded(false);
20796
20815
  }, [src]);
20797
- useEffect38(() => {
20816
+ useEffect39(() => {
20798
20817
  const iframe = iframeRef.current;
20799
20818
  return () => {
20800
20819
  if (iframe) {
@@ -20873,7 +20892,7 @@ function SlidesViewToggle({
20873
20892
  );
20874
20893
  }
20875
20894
  function FigmaEmbed({ url, title, height, loading = "lazy" }) {
20876
- const [view, setView] = useState47("present");
20895
+ const [view, setView] = useState48("present");
20877
20896
  const isSlides = url ? isFigmaSlidesUrl(url) : false;
20878
20897
  const embedSrc = url ? toFigmaEmbedUrl(url, { slidesView: view }) : null;
20879
20898
  const originalUrl = (() => {
@@ -20930,14 +20949,14 @@ function FigmaEmbed({ url, title, height, loading = "lazy" }) {
20930
20949
  }
20931
20950
 
20932
20951
  // src/components/embeds/markdown-image.tsx
20933
- import { useEffect as useEffect39, useState as useState48 } from "react";
20952
+ import { useEffect as useEffect40, useState as useState49 } from "react";
20934
20953
  import { jsx as jsx146 } from "react/jsx-runtime";
20935
20954
  var MAX_H_REM = 32;
20936
20955
  var DISPLAY_W = 768;
20937
20956
  function MarkdownImage({ src, alt }) {
20938
20957
  const { transformImageSrc } = useRichMarkdownRuntime();
20939
- const [ratio, setRatio] = useState48(null);
20940
- useEffect39(() => {
20958
+ const [ratio, setRatio] = useState49(null);
20959
+ useEffect40(() => {
20941
20960
  let cancelled = false;
20942
20961
  setRatio(null);
20943
20962
  const probeSrc = transformImageSrc(src, { width: 48, resize: "contain", quality: 20 }) ?? src;
@@ -21052,15 +21071,15 @@ var mermaidStyles2 = `
21052
21071
  }
21053
21072
  `;
21054
21073
  var MermaidDiagram2 = ({ chart }) => {
21055
- const [svg, setSvg] = useState49("");
21056
- const [error, setError] = useState49("");
21057
- const [isLoading, setIsLoading] = useState49(true);
21058
- const [mounted, setMounted] = useState49(false);
21059
- 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(() => {
21060
21079
  setMounted(true);
21061
21080
  }, []);
21062
21081
  const isDarkMode = true;
21063
- useEffect40(() => {
21082
+ useEffect41(() => {
21064
21083
  const renderMermaid = async () => {
21065
21084
  try {
21066
21085
  setIsLoading(true);
@@ -21399,7 +21418,7 @@ var RichMarkdownInner = ({
21399
21418
  resolveLinkEndpointUrl,
21400
21419
  demoteMarkdownH1ToH2
21401
21420
  }) => {
21402
- const idCountsRef = useRef30({});
21421
+ const idCountsRef = useRef31({});
21403
21422
  const { ogScraperUrl } = useRichMarkdownRuntime();
21404
21423
  const { ogApiBaseUrl, ogEndpointPath } = useMemo26(() => {
21405
21424
  try {
@@ -21826,7 +21845,7 @@ function ReleaseChangelogSection({
21826
21845
  icon,
21827
21846
  MarkdownRenderer = RichMarkdownRenderer
21828
21847
  }) {
21829
- const [collapsed, setCollapsed] = useState50(collapsible ? defaultCollapsed : false);
21848
+ const [collapsed, setCollapsed] = useState51(collapsible ? defaultCollapsed : false);
21830
21849
  if (!entries || entries.length === 0) return null;
21831
21850
  const inPreviewMode = previewFirst && !collapsible;
21832
21851
  const showEntries = !collapsible || !collapsed;
@@ -22022,7 +22041,7 @@ function StatusIndicator({ status, label, href }) {
22022
22041
  }
22023
22042
 
22024
22043
  // src/components/ui/hover-dropdown.tsx
22025
- 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";
22026
22045
  import { Fragment as Fragment34, jsx as jsx152, jsxs as jsxs119 } from "react/jsx-runtime";
22027
22046
  function DefaultAnchor({
22028
22047
  href,
@@ -22039,9 +22058,9 @@ function HoverDropdown({
22039
22058
  className,
22040
22059
  renderAnchor
22041
22060
  }) {
22042
- const [open, setOpen] = useState51(false);
22043
- const timeoutRef = useRef31(void 0);
22044
- const containerRef = useRef31(null);
22061
+ const [open, setOpen] = useState52(false);
22062
+ const timeoutRef = useRef32(void 0);
22063
+ const containerRef = useRef32(null);
22045
22064
  const show = useCallback23(() => {
22046
22065
  clearTimeout(timeoutRef.current);
22047
22066
  setOpen(true);
@@ -22149,11 +22168,11 @@ function HoverDropdown({
22149
22168
 
22150
22169
  // src/components/layout/list-page-layout.tsx
22151
22170
  init_cn();
22152
- import { useEffect as useEffect42, useState as useState53 } from "react";
22171
+ import { useEffect as useEffect43, useState as useState54 } from "react";
22153
22172
 
22154
22173
  // src/components/ui/filter-modal.tsx
22155
22174
  init_cn();
22156
- import { useEffect as useEffect41, useState as useState52 } from "react";
22175
+ import { useEffect as useEffect42, useState as useState53 } from "react";
22157
22176
  init_button2();
22158
22177
 
22159
22178
  // src/components/ui/filter-checkbox-item.tsx
@@ -22350,15 +22369,15 @@ function FilterModal({
22350
22369
  emptyStateTitle = "No filters available",
22351
22370
  emptyStateDescription = "There are no filter options to display at the moment"
22352
22371
  }) {
22353
- const [selectedFilters, setSelectedFilters] = useState52(() => {
22372
+ const [selectedFilters, setSelectedFilters] = useState53(() => {
22354
22373
  return { ...currentFilters };
22355
22374
  });
22356
- const [pendingTags, setPendingTags] = useState52(selectedTags ?? []);
22375
+ const [pendingTags, setPendingTags] = useState53(selectedTags ?? []);
22357
22376
  const dateDefaultSort = dateFilter?.defaultSort ?? "desc";
22358
- const [draftDateSort, setDraftDateSort] = useState52(dateFilter?.sort ?? dateDefaultSort);
22359
- const [draftDateRange, setDraftDateRange] = useState52(dateFilter?.range);
22377
+ const [draftDateSort, setDraftDateSort] = useState53(dateFilter?.sort ?? dateDefaultSort);
22378
+ const [draftDateRange, setDraftDateRange] = useState53(dateFilter?.range);
22360
22379
  const { scrollRef, fadeTop, fadeBottom, update: updateFade } = useScrollFade();
22361
- useEffect41(() => {
22380
+ useEffect42(() => {
22362
22381
  if (isOpen) {
22363
22382
  setSelectedFilters({ ...currentFilters });
22364
22383
  setPendingTags(selectedTags ?? []);
@@ -22961,13 +22980,13 @@ function ListPageLayout({
22961
22980
  mobileFilterTitle,
22962
22981
  stickyHeader = false
22963
22982
  }) {
22964
- const [mobileFilterOpen, setMobileFilterOpen] = useState53(false);
22965
- const [localSearchValue, setLocalSearchValue] = useState53(searchValue);
22983
+ const [mobileFilterOpen, setMobileFilterOpen] = useState54(false);
22984
+ const [localSearchValue, setLocalSearchValue] = useState54(searchValue);
22966
22985
  const debouncedSearchValue = useDebounce(localSearchValue, 500);
22967
- useEffect42(() => {
22986
+ useEffect43(() => {
22968
22987
  setLocalSearchValue(searchValue);
22969
22988
  }, [searchValue]);
22970
- useEffect42(() => {
22989
+ useEffect43(() => {
22971
22990
  if (debouncedSearchValue !== searchValue) {
22972
22991
  onSearch(debouncedSearchValue);
22973
22992
  }
@@ -25882,7 +25901,7 @@ function FeatureList({
25882
25901
 
25883
25902
  // src/components/ui/truncate-text.tsx
25884
25903
  init_cn();
25885
- 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";
25886
25905
  import { jsx as jsx182 } from "react/jsx-runtime";
25887
25906
  var VARIANT_CLASS = {
25888
25907
  h1: "text-h1",
@@ -25913,10 +25932,10 @@ function TruncateText({
25913
25932
  tone = "primary",
25914
25933
  mono = false
25915
25934
  }) {
25916
- const ref = useRef33(null);
25917
- const [isTruncated, setIsTruncated] = useState55(false);
25935
+ const ref = useRef34(null);
25936
+ const [isTruncated, setIsTruncated] = useState56(false);
25918
25937
  const isMultiLine = lines > 1;
25919
- useEffect43(() => {
25938
+ useEffect44(() => {
25920
25939
  const el = ref.current;
25921
25940
  if (!el) return;
25922
25941
  const check = () => {
@@ -26316,14 +26335,14 @@ function OrganizationCard({
26316
26335
 
26317
26336
  // src/components/ui/service-card.tsx
26318
26337
  init_cn();
26319
- import { useMemo as useMemo39, useState as useState91 } from "react";
26338
+ import { useMemo as useMemo39, useState as useState92 } from "react";
26320
26339
  import { ExternalLink as ExternalLink7 } from "lucide-react";
26321
26340
 
26322
26341
  // src/components/providers/dynamic-theme-provider.tsx
26323
26342
  import { createContext as createContext5, useContext as useContext5 } from "react";
26324
26343
 
26325
26344
  // src/hooks/use-dynamic-theming.ts
26326
- import { useState as useState56, useEffect as useEffect44 } from "react";
26345
+ import { useState as useState57, useEffect as useEffect45 } from "react";
26327
26346
  var defaultTheme = {
26328
26347
  primaryColor: "#FFC008",
26329
26348
  secondaryColor: "#161616",
@@ -26332,9 +26351,9 @@ var defaultTheme = {
26332
26351
  textColor: "#161616"
26333
26352
  };
26334
26353
  function useDynamicTheming() {
26335
- const [theme, setTheme] = useState56(defaultTheme);
26336
- const [isDark, setIsDark] = useState56(false);
26337
- useEffect44(() => {
26354
+ const [theme, setTheme] = useState57(defaultTheme);
26355
+ const [isDark, setIsDark] = useState57(false);
26356
+ useEffect45(() => {
26338
26357
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
26339
26358
  setIsDark(mediaQuery.matches);
26340
26359
  const handleChange = (e) => {
@@ -26422,7 +26441,7 @@ function useThemeToggle() {
26422
26441
  }
26423
26442
 
26424
26443
  // src/components/features/array-entry-manager.tsx
26425
- import { useState as useState58, useEffect as useEffect46 } from "react";
26444
+ import { useState as useState59, useEffect as useEffect47 } from "react";
26426
26445
  import { Trash2, Plus as Plus2, Save, Loader2 as Loader22 } from "lucide-react";
26427
26446
  import { jsx as jsx190, jsxs as jsxs148 } from "react/jsx-runtime";
26428
26447
  function ArrayEntryManager({
@@ -26441,14 +26460,14 @@ function ArrayEntryManager({
26441
26460
  renderLabel,
26442
26461
  isSaving = false
26443
26462
  }) {
26444
- const [draftItems, setDraftItems] = useState58(items);
26445
- const [isDirty, setIsDirty] = useState58(false);
26446
- useEffect46(() => {
26463
+ const [draftItems, setDraftItems] = useState59(items);
26464
+ const [isDirty, setIsDirty] = useState59(false);
26465
+ useEffect47(() => {
26447
26466
  if (!isDirty && !isSaving) {
26448
26467
  setDraftItems(items);
26449
26468
  }
26450
26469
  }, [items, isDirty, isSaving]);
26451
- useEffect46(() => {
26470
+ useEffect47(() => {
26452
26471
  if (onDirtyChange) {
26453
26472
  onDirtyChange(isDirty);
26454
26473
  }
@@ -27574,7 +27593,7 @@ function SsoAuthShell({ children, className }) {
27574
27593
 
27575
27594
  // src/components/features/provider-button.tsx
27576
27595
  init_button2();
27577
- import { useState as useState60 } from "react";
27596
+ import { useState as useState61 } from "react";
27578
27597
  import { jsx as jsx206 } from "react/jsx-runtime";
27579
27598
  var PROVIDER_CONFIG = {
27580
27599
  microsoft: {
@@ -27595,7 +27614,7 @@ var PROVIDER_CONFIG = {
27595
27614
  }
27596
27615
  };
27597
27616
  function ProviderButton({ provider, onClick, disabled = false, loading = false }) {
27598
- const [internalLoading, setInternalLoading] = useState60(false);
27617
+ const [internalLoading, setInternalLoading] = useState61(false);
27599
27618
  const config = PROVIDER_CONFIG[provider];
27600
27619
  const IconComponent = config.icon;
27601
27620
  const isLoading = loading || internalLoading;
@@ -27679,7 +27698,7 @@ function AuthProvidersList({
27679
27698
 
27680
27699
  // src/components/features/changelog-manager.tsx
27681
27700
  import { Trash2 as Trash22, Plus as Plus3, ChevronDown as ChevronDown7, ChevronUp as ChevronUp3, Eye as Eye3, EyeOff } from "lucide-react";
27682
- import { useState as useState61, useEffect as useEffect47 } from "react";
27701
+ import { useState as useState62, useEffect as useEffect48 } from "react";
27683
27702
  import { jsx as jsx208, jsxs as jsxs162 } from "react/jsx-runtime";
27684
27703
  function ChangelogManager({
27685
27704
  title,
@@ -27689,8 +27708,8 @@ function ChangelogManager({
27689
27708
  expandAll = false,
27690
27709
  showVisibilityToggle = false
27691
27710
  }) {
27692
- const [expandedIndices, setExpandedIndices] = useState61(/* @__PURE__ */ new Set());
27693
- useEffect47(() => {
27711
+ const [expandedIndices, setExpandedIndices] = useState62(/* @__PURE__ */ new Set());
27712
+ useEffect48(() => {
27694
27713
  if (expandAll && entries.length > 0) {
27695
27714
  setExpandedIndices(new Set(entries.map((_, i) => i)));
27696
27715
  }
@@ -28033,7 +28052,7 @@ var ErrorBoundary = class extends Component3 {
28033
28052
 
28034
28053
  // src/components/features/figma-prototype-viewer.tsx
28035
28054
  init_cn();
28036
- 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";
28037
28056
 
28038
28057
  // src/components/features/section-selector.tsx
28039
28058
  init_cn();
@@ -28402,27 +28421,27 @@ var FigmaPrototypeViewer = ({
28402
28421
  }) => {
28403
28422
  const clientId = process.env.NEXT_PUBLIC_FIGMA_CLIENT_ID || "UTQPwZHR9OZp68TTGPFFi5";
28404
28423
  const showDebugPanel = process.env.NEXT_PUBLIC_FIGMA_DEBUG === "true";
28405
- const iframeRef = useRef34(null);
28406
- const containerRef = useRef34(null);
28407
- const navTimerRef = useRef34(null);
28408
- const touchTimerRef = useRef34(null);
28409
- 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(
28410
28429
  typeof window !== "undefined" ? window.innerWidth : DESKTOP_BREAKPOINT
28411
28430
  );
28412
- const [isTouchDevice, setIsTouchDevice] = useState62(() => {
28431
+ const [isTouchDevice, setIsTouchDevice] = useState63(() => {
28413
28432
  if (typeof window === "undefined") return false;
28414
28433
  return "ontouchstart" in window;
28415
28434
  });
28416
- const [iframeState, setIframeState] = useState62("INITIAL");
28417
- const [iframeKey, setIframeKey] = useState62(0);
28418
- const [isInitialized, setIsInitialized] = useState62(false);
28419
- const [currentNodeId, setCurrentNodeId] = useState62(null);
28420
- 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(
28421
28440
  config.defaultSectionId || config.sections[0]?.id || ""
28422
28441
  );
28423
28442
  const activeSection = externalActiveSection || internalActiveSection;
28424
- const [isNavigating, setIsNavigating] = useState62(false);
28425
- const [containerDimensions, setContainerDimensions] = useState62({ width: 1200, height: 800 });
28443
+ const [isNavigating, setIsNavigating] = useState63(false);
28444
+ const [containerDimensions, setContainerDimensions] = useState63({ width: 1200, height: 800 });
28426
28445
  const viewMode = useMemo29(
28427
28446
  () => getViewMode(screenWidth, isTouchDevice),
28428
28447
  [screenWidth, isTouchDevice]
@@ -28471,7 +28490,7 @@ var FigmaPrototypeViewer = ({
28471
28490
  embedUrl,
28472
28491
  iframeKey
28473
28492
  ]);
28474
- useEffect48(() => {
28493
+ useEffect49(() => {
28475
28494
  const handleResize = () => {
28476
28495
  const newWidth = window.innerWidth;
28477
28496
  setScreenWidth(newWidth);
@@ -28484,8 +28503,8 @@ var FigmaPrototypeViewer = ({
28484
28503
  window.addEventListener("resize", handleResize);
28485
28504
  return () => window.removeEventListener("resize", handleResize);
28486
28505
  }, []);
28487
- const [lastViewMode, setLastViewMode] = useState62(viewMode);
28488
- useEffect48(() => {
28506
+ const [lastViewMode, setLastViewMode] = useState63(viewMode);
28507
+ useEffect49(() => {
28489
28508
  if (lastViewMode !== viewMode && iframeState === "READY") {
28490
28509
  console.log("[ViewMode Change]", lastViewMode, "\u2192", viewMode);
28491
28510
  setIframeState("RELOADING");
@@ -28493,7 +28512,7 @@ var FigmaPrototypeViewer = ({
28493
28512
  }
28494
28513
  setLastViewMode(viewMode);
28495
28514
  }, [viewMode, lastViewMode, iframeState]);
28496
- useEffect48(() => {
28515
+ useEffect49(() => {
28497
28516
  const handleVisibilityChange = () => {
28498
28517
  if (document.visibilityState === "visible" && iframeState === "READY") {
28499
28518
  console.log("[Sleep Recovery] Reloading iframe after sleep");
@@ -28504,7 +28523,7 @@ var FigmaPrototypeViewer = ({
28504
28523
  document.addEventListener("visibilitychange", handleVisibilityChange);
28505
28524
  return () => document.removeEventListener("visibilitychange", handleVisibilityChange);
28506
28525
  }, [iframeState]);
28507
- useEffect48(() => {
28526
+ useEffect49(() => {
28508
28527
  const handleMessage = (event) => {
28509
28528
  if (event.origin !== "https://www.figma.com") return;
28510
28529
  const validEvents = ["INITIAL_LOAD", "NEW_STATE", "PRESENTED_NODE_CHANGED"];
@@ -28588,12 +28607,12 @@ var FigmaPrototypeViewer = ({
28588
28607
  }
28589
28608
  }, 500);
28590
28609
  }, []);
28591
- useEffect48(() => {
28610
+ useEffect49(() => {
28592
28611
  if (externalActiveSection && externalActiveSection !== activeSection && isInitialized) {
28593
28612
  navigateToSection(externalActiveSection);
28594
28613
  }
28595
28614
  }, [externalActiveSection, activeSection, isInitialized, navigateToSection]);
28596
- useEffect48(() => {
28615
+ useEffect49(() => {
28597
28616
  return () => {
28598
28617
  if (navTimerRef.current) clearTimeout(navTimerRef.current);
28599
28618
  if (touchTimerRef.current) clearTimeout(touchTimerRef.current);
@@ -28696,7 +28715,7 @@ var FigmaPrototypeViewer = ({
28696
28715
 
28697
28716
  // src/components/features/filters-dropdown.tsx
28698
28717
  init_cn();
28699
- 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";
28700
28719
  import { jsx as jsx215, jsxs as jsxs168 } from "react/jsx-runtime";
28701
28720
  var FilterCheckbox = ({ checked, disabled = false, className }) => {
28702
28721
  return /* @__PURE__ */ jsx215(
@@ -28728,15 +28747,15 @@ var FiltersDropdown = ({
28728
28747
  placement = "bottom-start",
28729
28748
  responsive = true
28730
28749
  }) => {
28731
- const [isOpen, setIsOpen] = useState63(false);
28732
- const [shouldRender, setShouldRender] = useState63(false);
28733
- const [isVisible, setIsVisible] = useState63(false);
28734
- const [isMobile, setIsMobile] = useState63(false);
28735
- const [actualPlacement, setActualPlacement] = useState63(placement);
28736
- const dropdownRef = useRef35(null);
28737
- const triggerRef = useRef35(null);
28738
- const containerRef = useRef35(null);
28739
- 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(() => {
28740
28759
  if (isOpen) {
28741
28760
  setShouldRender(true);
28742
28761
  let id2 = 0;
@@ -28752,7 +28771,7 @@ var FiltersDropdown = ({
28752
28771
  const t = setTimeout(() => setShouldRender(false), ANIMATION_MS);
28753
28772
  return () => clearTimeout(t);
28754
28773
  }, [isOpen]);
28755
- useEffect49(() => {
28774
+ useEffect50(() => {
28756
28775
  if (!responsive) {
28757
28776
  setIsMobile(false);
28758
28777
  return;
@@ -28764,7 +28783,7 @@ var FiltersDropdown = ({
28764
28783
  window.addEventListener("resize", checkMobile);
28765
28784
  return () => window.removeEventListener("resize", checkMobile);
28766
28785
  }, [responsive]);
28767
- useEffect49(() => {
28786
+ useEffect50(() => {
28768
28787
  if (!isOpen || isMobile || !triggerRef.current) return;
28769
28788
  const calculateOptimalPlacement = () => {
28770
28789
  const trigger = triggerRef.current;
@@ -28790,7 +28809,7 @@ var FiltersDropdown = ({
28790
28809
  window.addEventListener("resize", calculateOptimalPlacement);
28791
28810
  return () => window.removeEventListener("resize", calculateOptimalPlacement);
28792
28811
  }, [isOpen, isMobile, placement]);
28793
- const [selectedFilters, setSelectedFilters] = useState63(() => {
28812
+ const [selectedFilters, setSelectedFilters] = useState64(() => {
28794
28813
  if (currentFilters) {
28795
28814
  return { ...currentFilters };
28796
28815
  }
@@ -28801,12 +28820,12 @@ var FiltersDropdown = ({
28801
28820
  return initial;
28802
28821
  });
28803
28822
  const currentFiltersStr = currentFilters ? JSON.stringify(currentFilters) : "";
28804
- useEffect49(() => {
28823
+ useEffect50(() => {
28805
28824
  if (currentFilters) {
28806
28825
  setSelectedFilters({ ...currentFilters });
28807
28826
  }
28808
28827
  }, [currentFiltersStr]);
28809
- useEffect49(() => {
28828
+ useEffect50(() => {
28810
28829
  const handleClickOutside = (event) => {
28811
28830
  if (containerRef.current && !containerRef.current.contains(event.target)) {
28812
28831
  setIsOpen(false);
@@ -28823,7 +28842,7 @@ var FiltersDropdown = ({
28823
28842
  };
28824
28843
  }
28825
28844
  }, [isOpen, placement]);
28826
- useEffect49(() => {
28845
+ useEffect50(() => {
28827
28846
  const handleEscape = (e) => {
28828
28847
  if (e.key === "Escape" && isOpen) {
28829
28848
  setIsOpen(false);
@@ -29010,7 +29029,7 @@ var FiltersDropdown = ({
29010
29029
  ] });
29011
29030
  };
29012
29031
  var useFiltersDropdown = (initialSections) => {
29013
- const [appliedFilters, setAppliedFilters] = useState63(() => {
29032
+ const [appliedFilters, setAppliedFilters] = useState64(() => {
29014
29033
  const initial = {};
29015
29034
  initialSections.forEach((section) => {
29016
29035
  if (section.defaultSelected) {
@@ -29089,13 +29108,13 @@ function KnowledgeBaseLinksManager({
29089
29108
  }
29090
29109
 
29091
29110
  // src/components/features/loading-provider.tsx
29092
- 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";
29093
29112
  import { jsx as jsx218, jsxs as jsxs169 } from "react/jsx-runtime";
29094
29113
  var LoadingContext = createContext6(void 0);
29095
29114
  function LoadingProvider({ children }) {
29096
- const [isLoading, setIsLoading] = useState64(false);
29097
- const [progress, setProgress] = useState64(0);
29098
- useEffect50(() => {
29115
+ const [isLoading, setIsLoading] = useState65(false);
29116
+ const [progress, setProgress] = useState65(0);
29117
+ useEffect51(() => {
29099
29118
  let interval;
29100
29119
  if (isLoading) {
29101
29120
  setProgress(10);
@@ -29140,7 +29159,7 @@ function useLoading() {
29140
29159
  }
29141
29160
 
29142
29161
  // src/components/features/media-gallery-manager.tsx
29143
- 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";
29144
29163
  import {
29145
29164
  Upload,
29146
29165
  Image as ImageIcon2,
@@ -29160,9 +29179,9 @@ function MediaGalleryManager({
29160
29179
  modalTitle = "Media Gallery",
29161
29180
  className = ""
29162
29181
  }) {
29163
- const fileInputRef = useRef36(null);
29164
- const [deletingIndex, setDeletingIndex] = useState65(null);
29165
- const [draggedIndex, setDraggedIndex] = useState65(null);
29182
+ const fileInputRef = useRef37(null);
29183
+ const [deletingIndex, setDeletingIndex] = useState66(null);
29184
+ const [draggedIndex, setDraggedIndex] = useState66(null);
29166
29185
  const handleFileSelect = useCallback26(async (event) => {
29167
29186
  const file = event.target.files?.[0];
29168
29187
  if (!file) return;
@@ -29368,7 +29387,7 @@ function OSTypeBadgeGroup({
29368
29387
  }
29369
29388
 
29370
29389
  // src/components/features/parallax-image-showcase.tsx
29371
- 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";
29372
29391
  import { motion, useScroll, useTransform, useMotionValue, useSpring } from "framer-motion";
29373
29392
  import { jsx as jsx222, jsxs as jsxs172 } from "react/jsx-runtime";
29374
29393
  var ParallaxImageShowcase = ({
@@ -29386,9 +29405,9 @@ var ParallaxImageShowcase = ({
29386
29405
  const springConfig = { stiffness: 100, damping: 30 };
29387
29406
  const mouseXSpring = useSpring(mouseX, springConfig);
29388
29407
  const mouseYSpring = useSpring(mouseY, springConfig);
29389
- const [componentRect, setComponentRect] = useState66(null);
29390
- const componentRef = useRef37(null);
29391
- useEffect51(() => {
29408
+ const [componentRect, setComponentRect] = useState67(null);
29409
+ const componentRef = useRef38(null);
29410
+ useEffect52(() => {
29392
29411
  const updateRect = () => {
29393
29412
  if (componentRef.current) {
29394
29413
  setComponentRect(componentRef.current.getBoundingClientRect());
@@ -29402,7 +29421,7 @@ var ParallaxImageShowcase = ({
29402
29421
  window.removeEventListener("scroll", updateRect);
29403
29422
  };
29404
29423
  }, []);
29405
- useEffect51(() => {
29424
+ useEffect52(() => {
29406
29425
  const handleGlobalMouseMove = (e) => {
29407
29426
  if (!componentRect) return;
29408
29427
  const centerX = componentRect.left + componentRect.width / 2;
@@ -29927,7 +29946,7 @@ function PushButtonSelector({
29927
29946
  }
29928
29947
 
29929
29948
  // src/components/features/release-media-manager.tsx
29930
- import { useState as useState67, useRef as useRef38 } from "react";
29949
+ import { useState as useState68, useRef as useRef39 } from "react";
29931
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";
29932
29951
  import { jsx as jsx226, jsxs as jsxs176 } from "react/jsx-runtime";
29933
29952
  function ReleaseMediaManager({
@@ -29936,8 +29955,8 @@ function ReleaseMediaManager({
29936
29955
  onUpload,
29937
29956
  className = ""
29938
29957
  }) {
29939
- const fileInputRef = useRef38(null);
29940
- const [uploadingIndex, setUploadingIndex] = useState67(null);
29958
+ const fileInputRef = useRef39(null);
29959
+ const [uploadingIndex, setUploadingIndex] = useState68(null);
29941
29960
  const handleFileSelect = async (event) => {
29942
29961
  const file = event.target.files?.[0];
29943
29962
  if (!file) return;
@@ -30195,7 +30214,7 @@ var SelectButton = React96.forwardRef(
30195
30214
  SelectButton.displayName = "SelectButton";
30196
30215
 
30197
30216
  // src/components/features/seo-editor-preview.tsx
30198
- import { useState as useState68 } from "react";
30217
+ import { useState as useState69 } from "react";
30199
30218
  import { Globe as Globe3, ExternalLink as ExternalLink6, Upload as Upload3, X as X6, Loader2 as Loader25 } from "lucide-react";
30200
30219
  import { Fragment as Fragment43, jsx as jsx228, jsxs as jsxs178 } from "react/jsx-runtime";
30201
30220
  function SEOEditorPreview({
@@ -30218,9 +30237,9 @@ function SEOEditorPreview({
30218
30237
  disabled = false,
30219
30238
  className = ""
30220
30239
  }) {
30221
- const [imageError, setImageError] = useState68(false);
30222
- const [isUploading, setIsUploading] = useState68(false);
30223
- const [fileInputRef, setFileInputRef] = useState68(null);
30240
+ const [imageError, setImageError] = useState69(false);
30241
+ const [isUploading, setIsUploading] = useState69(false);
30242
+ const [fileInputRef, setFileInputRef] = useState69(null);
30224
30243
  const seoTitleLength = (seoTitle || "").length;
30225
30244
  const seoTitleTooLong = seoTitleLength > SEO_TITLE_MAX_LENGTH;
30226
30245
  const seoDescriptionLength = (seoDescription || "").length;
@@ -30716,7 +30735,7 @@ function StatusFilterComponent({
30716
30735
  }
30717
30736
 
30718
30737
  // src/components/features/tags-selector.tsx
30719
- import { useState as useState69 } from "react";
30738
+ import { useState as useState70 } from "react";
30720
30739
  import { Search as Search2, X as X7, Plus as Plus6, Loader2 as Loader26 } from "lucide-react";
30721
30740
  import { jsx as jsx232, jsxs as jsxs181 } from "react/jsx-runtime";
30722
30741
  function TagsSelector({
@@ -30730,9 +30749,9 @@ function TagsSelector({
30730
30749
  disabled = false,
30731
30750
  allowCreate = true
30732
30751
  }) {
30733
- const [searchQuery, setSearchQuery] = useState69("");
30734
- const [showDropdown, setShowDropdown] = useState69(false);
30735
- const [isCreating, setIsCreating] = useState69(false);
30752
+ const [searchQuery, setSearchQuery] = useState70("");
30753
+ const [showDropdown, setShowDropdown] = useState70(false);
30754
+ const [isCreating, setIsCreating] = useState70(false);
30736
30755
  const handleTagAdd = (tagId) => {
30737
30756
  if (!selectedTagIds.includes(tagId) && selectedTagIds.length < maxTags) {
30738
30757
  onTagsChange([...selectedTagIds, tagId]);
@@ -30946,7 +30965,7 @@ function getCaptionsUrl(entityType, entityId, srtContent) {
30946
30965
  }
30947
30966
 
30948
30967
  // src/components/features/video-source-selector.tsx
30949
- import { useState as useState70, useCallback as useCallback27 } from "react";
30968
+ import { useState as useState71, useCallback as useCallback27 } from "react";
30950
30969
  import { Upload as Upload4, X as X8, Video as VideoIcon3 } from "lucide-react";
30951
30970
  init_button2();
30952
30971
  import { jsx as jsx235, jsxs as jsxs183 } from "react/jsx-runtime";
@@ -30972,10 +30991,10 @@ function VideoSourceSelector({
30972
30991
  showTitle = true,
30973
30992
  className = ""
30974
30993
  }) {
30975
- const [isUploading, setIsUploading] = useState70(false);
30976
- const [uploadProgress, setUploadProgress] = useState70(0);
30977
- const [uploadMessage, setUploadMessage] = useState70("");
30978
- 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);
30979
30998
  const handleUploadClick = useCallback27(() => {
30980
30999
  const input = document.createElement("input");
30981
31000
  input.type = "file";
@@ -31315,7 +31334,7 @@ function TranscriptSummaryEditor({
31315
31334
  }
31316
31335
 
31317
31336
  // src/components/features/highlight-video-section.tsx
31318
- import { useState as useState71 } from "react";
31337
+ import { useState as useState72 } from "react";
31319
31338
  import { Sparkles as Sparkles4, Upload as Upload5 } from "lucide-react";
31320
31339
  init_button2();
31321
31340
 
@@ -31614,7 +31633,7 @@ function HighlightVideoSection({
31614
31633
  disabled = false,
31615
31634
  className = ""
31616
31635
  }) {
31617
- const [uploadError, setUploadError] = useState71(null);
31636
+ const [uploadError, setUploadError] = useState72(null);
31618
31637
  const handleUploadClick = () => {
31619
31638
  const input = document.createElement("input");
31620
31639
  input.type = "file";
@@ -32445,7 +32464,7 @@ function ViewToggle({
32445
32464
 
32446
32465
  // src/components/features/policy-configuration-panel.tsx
32447
32466
  init_cn();
32448
- import { useEffect as useEffect52, useState as useState72 } from "react";
32467
+ import { useEffect as useEffect53, useState as useState73 } from "react";
32449
32468
  import { ChevronDown as ChevronDown8, Shield as Shield2 } from "lucide-react";
32450
32469
  init_button2();
32451
32470
  import { Fragment as Fragment44, jsx as jsx253, jsxs as jsxs197 } from "react/jsx-runtime";
@@ -32621,9 +32640,9 @@ var PolicyConfigurationPanel = ({
32621
32640
  onCategoryPermissionChange,
32622
32641
  className
32623
32642
  }) => {
32624
- const [expandedIds, setExpandedIds] = useState72(/* @__PURE__ */ new Set());
32625
- const [bulkLevels, setBulkLevels] = useState72({});
32626
- useEffect52(() => {
32643
+ const [expandedIds, setExpandedIds] = useState73(/* @__PURE__ */ new Set());
32644
+ const [bulkLevels, setBulkLevels] = useState73({});
32645
+ useEffect53(() => {
32627
32646
  setBulkLevels({});
32628
32647
  }, [editMode]);
32629
32648
  const handleToggle = (categoryId) => {
@@ -32663,7 +32682,7 @@ PolicyConfigurationPanel.displayName = "PolicyConfigurationPanel";
32663
32682
  init_button2();
32664
32683
 
32665
32684
  // src/components/ui/phone-input.tsx
32666
- 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";
32667
32686
  import { jsx as jsx254, jsxs as jsxs198 } from "react/jsx-runtime";
32668
32687
  function PhoneInput({
32669
32688
  value,
@@ -32680,8 +32699,8 @@ function PhoneInput({
32680
32699
  () => [...priority, ...others].find((c) => c.code === countryCode),
32681
32700
  [countryCode, priority, others]
32682
32701
  );
32683
- const [isInvalid, setIsInvalid] = useState73(false);
32684
- const debounceRef = useRef39(null);
32702
+ const [isInvalid, setIsInvalid] = useState74(false);
32703
+ const debounceRef = useRef40(null);
32685
32704
  const digitCount = useCallback28((val) => val.replace(/[^0-9]/g, "").length, []);
32686
32705
  const runValidation = useCallback28((phone) => {
32687
32706
  if (!phone || digitCount(phone) === 0) {
@@ -32697,7 +32716,7 @@ function PhoneInput({
32697
32716
  if (debounceRef.current) clearTimeout(debounceRef.current);
32698
32717
  debounceRef.current = setTimeout(() => runValidation(phone), 300);
32699
32718
  }, [runValidation]);
32700
- useEffect53(() => {
32719
+ useEffect54(() => {
32701
32720
  return () => {
32702
32721
  if (debounceRef.current) clearTimeout(debounceRef.current);
32703
32722
  };
@@ -32764,7 +32783,7 @@ function CountryOption({ country }) {
32764
32783
  // src/components/features/waitlist-form.tsx
32765
32784
  init_cn();
32766
32785
  import { getCountries as getCountries2 } from "libphonenumber-js";
32767
- import { useEffect as useEffect54, useState as useState74 } from "react";
32786
+ import { useEffect as useEffect55, useState as useState75 } from "react";
32768
32787
  import { Fragment as Fragment45, jsx as jsx255, jsxs as jsxs199 } from "react/jsx-runtime";
32769
32788
  function WaitlistForm({
32770
32789
  id = "waitlist-form",
@@ -32784,22 +32803,22 @@ function WaitlistForm({
32784
32803
  privacyPolicyUrl,
32785
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."
32786
32805
  }) {
32787
- const [email, setEmail] = useState74(defaultEmail);
32788
- const [phone, setPhone] = useState74(defaultPhone);
32789
- const [countryCode, setCountryCode] = useState74("US");
32806
+ const [email, setEmail] = useState75(defaultEmail);
32807
+ const [phone, setPhone] = useState75(defaultPhone);
32808
+ const [countryCode, setCountryCode] = useState75("US");
32790
32809
  const { toast } = useToast();
32791
32810
  const { honeypotInputProps, getSignals, resetSignals } = useHumanitySignals();
32792
- const [smsConsent, setSmsConsent] = useState74(false);
32793
- const [isClient, setIsClient] = useState74(false);
32794
- const [isPhoneInvalid, setIsPhoneInvalid] = useState74(false);
32795
- 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);
32796
32815
  const isMailDomainGeneric = hasGenericEmailDomain(email);
32797
- useEffect54(() => {
32816
+ useEffect55(() => {
32798
32817
  if (defaultEmail) {
32799
32818
  setEmail(defaultEmail);
32800
32819
  }
32801
32820
  }, [defaultEmail]);
32802
- useEffect54(() => {
32821
+ useEffect55(() => {
32803
32822
  setIsClient(true);
32804
32823
  if (!geoApiUrl) return;
32805
32824
  const supportedCountries = new Set(getCountries2());
@@ -33187,7 +33206,7 @@ function useOptionalNotifications() {
33187
33206
  }
33188
33207
 
33189
33208
  // src/components/features/notifications/notification-drawer.tsx
33190
- import { useEffect as useEffect58, useRef as useRef42 } from "react";
33209
+ import { useEffect as useEffect59, useRef as useRef43 } from "react";
33191
33210
 
33192
33211
  // src/components/navigation/app-layout-context.ts
33193
33212
  import { createContext as createContext8, useContext as useContext8 } from "react";
@@ -33682,7 +33701,7 @@ init_button2();
33682
33701
  init_cn();
33683
33702
 
33684
33703
  // src/components/features/notifications/notification-tile.tsx
33685
- 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";
33686
33705
  init_cn();
33687
33706
  import { jsx as jsx258, jsxs as jsxs201 } from "react/jsx-runtime";
33688
33707
  var variantBySeverity = {
@@ -33723,14 +33742,14 @@ function NotificationTile({
33723
33742
  settled
33724
33743
  } = notification;
33725
33744
  const accentVariant = (severity ? variantBySeverity[severity] : void 0) ?? variant;
33726
- const [failedImageUrl, setFailedImageUrl] = useState77(null);
33745
+ const [failedImageUrl, setFailedImageUrl] = useState78(null);
33727
33746
  const image = imageUrl && imageUrl !== failedImageUrl ? imageUrl : void 0;
33728
33747
  const createdAtDate = new Date(createdAt);
33729
33748
  const createdAtIso = Number.isNaN(createdAtDate.getTime()) ? null : createdAtDate.toISOString();
33730
33749
  const initialElapsed = useMemo32(() => Date.now() - createdAt, [createdAt]);
33731
33750
  const isLive = !read && !settled && initialElapsed < liveDurationMs;
33732
33751
  const counting = isLive && !paused;
33733
- useEffect57(() => {
33752
+ useEffect58(() => {
33734
33753
  if (!counting) return;
33735
33754
  const remaining = Math.max(0, liveDurationMs - initialElapsed);
33736
33755
  const timer = window.setTimeout(() => {
@@ -33955,11 +33974,11 @@ function DrawerScrollList({
33955
33974
  loadMoreRootMargin,
33956
33975
  renderTile
33957
33976
  }) {
33958
- const scrollRef = useRef42(null);
33959
- const sentinelRef = useRef42(null);
33960
- const loadMoreRef = useRef42(loadMore);
33977
+ const scrollRef = useRef43(null);
33978
+ const sentinelRef = useRef43(null);
33979
+ const loadMoreRef = useRef43(loadMore);
33961
33980
  loadMoreRef.current = loadMore;
33962
- useEffect58(() => {
33981
+ useEffect59(() => {
33963
33982
  if (!loadMore || !hasMore || isLoadingMore) return;
33964
33983
  const sentinel = sentinelRef.current;
33965
33984
  const root = scrollRef.current;
@@ -34179,7 +34198,7 @@ function NotificationPopups({
34179
34198
 
34180
34199
  // src/components/features/notifications/approval-request-notification-tile.tsx
34181
34200
  init_button2();
34182
- import { useMemo as useMemo33, useState as useState78 } from "react";
34201
+ import { useMemo as useMemo33, useState as useState79 } from "react";
34183
34202
 
34184
34203
  // src/components/chat/types/chat.types.ts
34185
34204
  var CHAT_TYPE = {
@@ -34395,10 +34414,10 @@ function ApprovalRequestNotificationTile({
34395
34414
  defaultExpanded = false,
34396
34415
  className
34397
34416
  }) {
34398
- const [expanded, setExpanded] = useState78(defaultExpanded);
34399
- const [pinned, setPinned] = useState78(defaultExpanded);
34400
- const [processing, setProcessing] = useState78(false);
34401
- 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);
34402
34421
  const approval = getApprovalMeta(notification);
34403
34422
  const resolvedStatus = resolutionToStatus(approval?.resolution);
34404
34423
  const status = resolvedStatus !== "pending" ? resolvedStatus : localStatus ?? "pending";
@@ -34499,12 +34518,12 @@ function useOptionalTimeTracker() {
34499
34518
 
34500
34519
  // src/components/features/time-tracker/time-tracker-panel.tsx
34501
34520
  init_cn();
34502
- import { useEffect as useEffect60, useState as useState81 } from "react";
34521
+ import { useEffect as useEffect61, useState as useState82 } from "react";
34503
34522
  init_button();
34504
34523
  init_split_button();
34505
34524
 
34506
34525
  // src/components/features/time-tracker/use-tracker-clock.ts
34507
- import { useEffect as useEffect59, useState as useState80 } from "react";
34526
+ import { useEffect as useEffect60, useState as useState81 } from "react";
34508
34527
  function formatElapsed(totalMs) {
34509
34528
  const totalSeconds = Math.max(0, Math.floor(totalMs / 1e3));
34510
34529
  const hours = Math.floor(totalSeconds / 3600);
@@ -34514,8 +34533,8 @@ function formatElapsed(totalMs) {
34514
34533
  return `${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;
34515
34534
  }
34516
34535
  function useTrackerClock({ status, runningSince, accumulatedMs = 0 }) {
34517
- const [now, setNow] = useState80(() => Date.now());
34518
- useEffect59(() => {
34536
+ const [now, setNow] = useState81(() => Date.now());
34537
+ useEffect60(() => {
34519
34538
  if (status !== "tracking") return;
34520
34539
  setNow(Date.now());
34521
34540
  const id = setInterval(() => setNow(Date.now()), 1e3);
@@ -34570,12 +34589,12 @@ function TimeTrackerPanel({
34570
34589
  className
34571
34590
  }) {
34572
34591
  const elapsedLabel = useTrackerClock({ status, runningSince, accumulatedMs });
34573
- const [showValidationError, setShowValidationError] = useState81(false);
34592
+ const [showValidationError, setShowValidationError] = useState82(false);
34574
34593
  const isRunning = status === "tracking";
34575
34594
  const isActive = status !== "ready";
34576
34595
  const hasContent = selectedTicketId != null || notes.trim() !== "";
34577
34596
  const showFieldError = isActive && showValidationError && !hasContent;
34578
- useEffect60(() => {
34597
+ useEffect61(() => {
34579
34598
  if (status === "ready") setShowValidationError(false);
34580
34599
  }, [status]);
34581
34600
  const handleSubmit = () => {
@@ -34826,7 +34845,7 @@ function LastEntryRow({ entry, onClick }) {
34826
34845
  // src/components/features/time-tracker/time-tracker-header-button.tsx
34827
34846
  init_cn();
34828
34847
  import * as PopoverPrimitive5 from "@radix-ui/react-popover";
34829
- import { useEffect as useEffect61, useRef as useRef43 } from "react";
34848
+ import { useEffect as useEffect62, useRef as useRef44 } from "react";
34830
34849
 
34831
34850
  // src/components/navigation/header-button.tsx
34832
34851
  init_cn();
@@ -34865,11 +34884,11 @@ function TimeTrackerHeaderButton({ className, disabled }) {
34865
34884
  const layoutContainer = useAppLayoutDrawerContainer();
34866
34885
  const coordination = useAppLayoutDrawerCoordination();
34867
34886
  const isOpen = ctx?.isOpen ?? false;
34868
- const isOpenRef = useRef43(isOpen);
34887
+ const isOpenRef = useRef44(isOpen);
34869
34888
  isOpenRef.current = isOpen;
34870
- const closeRef = useRef43(ctx?.close);
34889
+ const closeRef = useRef44(ctx?.close);
34871
34890
  closeRef.current = ctx?.close;
34872
- const selfHandleRef = useRef43(null);
34891
+ const selfHandleRef = useRef44(null);
34873
34892
  if (!selfHandleRef.current) {
34874
34893
  selfHandleRef.current = {
34875
34894
  close: () => {
@@ -34877,10 +34896,10 @@ function TimeTrackerHeaderButton({ className, disabled }) {
34877
34896
  }
34878
34897
  };
34879
34898
  }
34880
- useEffect61(() => {
34899
+ useEffect62(() => {
34881
34900
  if (isOpen) coordination?.notifyDrawerDidOpen(selfHandleRef.current ?? void 0);
34882
34901
  }, [isOpen, coordination]);
34883
- useEffect61(() => {
34902
+ useEffect62(() => {
34884
34903
  if (!selfHandleRef.current) return;
34885
34904
  return coordination?.registerDrawer(selfHandleRef.current);
34886
34905
  }, [coordination]);
@@ -35497,13 +35516,13 @@ function EmptyState2() {
35497
35516
  }
35498
35517
 
35499
35518
  // src/components/features/board/use-board-collapse.ts
35500
- import { useCallback as useCallback33, useState as useState83 } from "react";
35519
+ import { useCallback as useCallback33, useState as useState84 } from "react";
35501
35520
  function useBoardCollapse(storageKey) {
35502
35521
  const [persisted, setPersisted] = useLocalStorage(
35503
35522
  storageKey ?? "__board_collapse_unused__",
35504
35523
  {}
35505
35524
  );
35506
- const [memory, setMemory] = useState83({});
35525
+ const [memory, setMemory] = useState84({});
35507
35526
  const collapsed = storageKey ? persisted : memory;
35508
35527
  const setMap = storageKey ? setPersisted : setMemory;
35509
35528
  const toggle = useCallback33(
@@ -35894,18 +35913,18 @@ function SortableRow({
35894
35913
 
35895
35914
  // src/components/navigation/header.tsx
35896
35915
  init_next_link();
35897
- 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";
35898
35917
  init_button2();
35899
35918
 
35900
35919
  // src/components/navigation/mobile-nav-panel.tsx
35901
- import { useRef as useRef46 } from "react";
35920
+ import { useRef as useRef47 } from "react";
35902
35921
  import { usePreventScroll as usePreventScroll3 } from "@react-aria/overlays";
35903
35922
  init_button2();
35904
35923
  import { X as X10 } from "lucide-react";
35905
35924
  import { Fragment as Fragment52, jsx as jsx273, jsxs as jsxs212 } from "react/jsx-runtime";
35906
35925
  var MOBILE_NAV_PANEL_ID = "mobile-nav-panel";
35907
35926
  function MobileNavPanel({ isOpen, config }) {
35908
- const panelRef = useRef46(null);
35927
+ const panelRef = useRef47(null);
35909
35928
  usePreventScroll3({ isDisabled: !isOpen });
35910
35929
  useFocusTrap(panelRef, isOpen, { onEscape: config.onClose });
35911
35930
  const headerHeight = useHeaderHeight(64, { enabled: isOpen });
@@ -36063,12 +36082,12 @@ function MingoAiButton({ source, icon, label = "Mingo AI", className, onClick, .
36063
36082
  // src/components/navigation/header.tsx
36064
36083
  import { Fragment as Fragment53, jsx as jsx275, jsxs as jsxs214 } from "react/jsx-runtime";
36065
36084
  function Header2({ config, platform }) {
36066
- const [show, setShow] = useState85(true);
36067
- const [lastScrollY, setLastScrollY] = useState85(0);
36068
- const [openDropdowns, setOpenDropdowns] = useState85({});
36069
- const dropdownRefs = useRef47({});
36070
- const triggerRefs = useRef47({});
36071
- 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(() => {
36072
36091
  const handleClickOutside = (event) => {
36073
36092
  const target = event.target;
36074
36093
  if (!target) return;
@@ -36097,14 +36116,14 @@ function Header2({ config, platform }) {
36097
36116
  document.removeEventListener("keydown", handleEscapeKey);
36098
36117
  };
36099
36118
  }, [openDropdowns]);
36100
- useEffect64(() => {
36119
+ useEffect65(() => {
36101
36120
  return () => {
36102
36121
  setOpenDropdowns({});
36103
36122
  dropdownRefs.current = {};
36104
36123
  triggerRefs.current = {};
36105
36124
  };
36106
36125
  }, []);
36107
- useEffect64(() => {
36126
+ useEffect65(() => {
36108
36127
  if (!config.autoHide) {
36109
36128
  setShow(true);
36110
36129
  return;
@@ -36345,7 +36364,7 @@ function Header2({ config, platform }) {
36345
36364
  }
36346
36365
 
36347
36366
  // src/components/navigation/client-only-header.tsx
36348
- import { useState as useState86, useEffect as useEffect65 } from "react";
36367
+ import { useState as useState87, useEffect as useEffect66 } from "react";
36349
36368
 
36350
36369
  // src/components/navigation/header-skeleton.tsx
36351
36370
  import { jsx as jsx276, jsxs as jsxs215 } from "react/jsx-runtime";
@@ -36393,8 +36412,8 @@ function HeaderSkeleton({ config }) {
36393
36412
  // src/components/navigation/client-only-header.tsx
36394
36413
  import { jsx as jsx277 } from "react/jsx-runtime";
36395
36414
  function ClientOnlyHeader({ config, skeleton }) {
36396
- const [isClient, setIsClient] = useState86(false);
36397
- useEffect65(() => {
36415
+ const [isClient, setIsClient] = useState87(false);
36416
+ useEffect66(() => {
36398
36417
  setIsClient(true);
36399
36418
  }, []);
36400
36419
  if (!isClient) {
@@ -36404,20 +36423,20 @@ function ClientOnlyHeader({ config, skeleton }) {
36404
36423
  }
36405
36424
 
36406
36425
  // src/components/navigation/sliding-sidebar.tsx
36407
- 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";
36408
36427
  import { motion as motion2, AnimatePresence, useReducedMotion } from "framer-motion";
36409
36428
  import { usePreventScroll as usePreventScroll4 } from "@react-aria/overlays";
36410
36429
  init_button2();
36411
36430
  import { Fragment as Fragment54, jsx as jsx278, jsxs as jsxs216 } from "react/jsx-runtime";
36412
36431
  function SlidingSidebar({ config }) {
36413
- const [expandedItems, setExpandedItems] = useState87(/* @__PURE__ */ new Set());
36414
- const [mounted, setMounted] = useState87(false);
36432
+ const [expandedItems, setExpandedItems] = useState88(/* @__PURE__ */ new Set());
36433
+ const [mounted, setMounted] = useState88(false);
36415
36434
  const headerHeight = useHeaderHeight();
36416
- const asideRef = useRef48(null);
36435
+ const asideRef = useRef49(null);
36417
36436
  const prefersReducedMotion2 = useReducedMotion();
36418
36437
  usePreventScroll4({ isDisabled: !config.isOpen });
36419
36438
  useFocusTrap(asideRef, config.isOpen, { onEscape: config.onClose, contain: false });
36420
- useEffect66(() => {
36439
+ useEffect67(() => {
36421
36440
  setMounted(true);
36422
36441
  }, []);
36423
36442
  const toggleExpanded = (itemId) => {
@@ -36585,7 +36604,7 @@ function SlidingSidebar({ config }) {
36585
36604
  }
36586
36605
 
36587
36606
  // src/components/navigation/sticky-section-nav.tsx
36588
- 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";
36589
36608
  import { jsx as jsx279, jsxs as jsxs217 } from "react/jsx-runtime";
36590
36609
  function StickySectionNav({
36591
36610
  sections,
@@ -36646,8 +36665,8 @@ function StickySectionNav({
36646
36665
  ] });
36647
36666
  }
36648
36667
  function useSectionNavigation(sections, options) {
36649
- const [activeSection, setActiveSection] = useState88(sections[0]?.id || "");
36650
- const isScrollingFromClick = useRef49(false);
36668
+ const [activeSection, setActiveSection] = useState89(sections[0]?.id || "");
36669
+ const isScrollingFromClick = useRef50(false);
36651
36670
  const { offset: offset2 = 100 } = options || {};
36652
36671
  const handleSectionClick = useCallback35((sectionId) => {
36653
36672
  const targetElement = document.getElementById(sectionId);
@@ -36659,14 +36678,14 @@ function useSectionNavigation(sections, options) {
36659
36678
  isScrollingFromClick.current = false;
36660
36679
  }, 500);
36661
36680
  }, [offset2]);
36662
- useEffect67(() => {
36681
+ useEffect68(() => {
36663
36682
  sections.forEach((section) => {
36664
36683
  if (section.ref.current && !section.ref.current.id) {
36665
36684
  section.ref.current.id = section.id;
36666
36685
  }
36667
36686
  });
36668
36687
  }, [sections]);
36669
- useEffect67(() => {
36688
+ useEffect68(() => {
36670
36689
  const handleScroll = () => {
36671
36690
  if (isScrollingFromClick.current) return;
36672
36691
  const scrollPosition = window.scrollY + offset2 + 50;
@@ -36699,7 +36718,7 @@ function useSectionNavigation(sections, options) {
36699
36718
  }
36700
36719
 
36701
36720
  // src/components/navigation/navigation-sidebar.tsx
36702
- 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";
36703
36722
 
36704
36723
  // src/components/navigation/navigation-sidebar-header.tsx
36705
36724
  import { jsx as jsx280, jsxs as jsxs218 } from "react/jsx-runtime";
@@ -36847,12 +36866,12 @@ function NavigationSidebar({ config, disabled = false }) {
36847
36866
  STORAGE_KEY,
36848
36867
  config.minimized ?? false
36849
36868
  );
36850
- const [tabletMinimized, setTabletMinimized] = useState89(true);
36851
- useEffect68(() => {
36869
+ const [tabletMinimized, setTabletMinimized] = useState90(true);
36870
+ useEffect69(() => {
36852
36871
  if (isTablet) setTabletMinimized(true);
36853
36872
  }, [isTablet]);
36854
36873
  const minimized = isTablet ? tabletMinimized : desktopMinimized;
36855
- const [transitionsEnabled, setTransitionsEnabled] = useState89(false);
36874
+ const [transitionsEnabled, setTransitionsEnabled] = useState90(false);
36856
36875
  const isOverlayOpen = isTablet && !minimized;
36857
36876
  const showLabel = !minimized;
36858
36877
  const handleToggle = useCallback36(() => {
@@ -36866,7 +36885,7 @@ function NavigationSidebar({ config, disabled = false }) {
36866
36885
  const closeOverlay = useCallback36(() => {
36867
36886
  setTabletMinimized(true);
36868
36887
  }, []);
36869
- useEffect68(() => {
36888
+ useEffect69(() => {
36870
36889
  if (!isOverlayOpen) return;
36871
36890
  const handleKeyDown = (e) => {
36872
36891
  if (e.key === "Escape") closeOverlay();
@@ -37347,10 +37366,10 @@ function NotificationsHeaderButton({
37347
37366
  }
37348
37367
 
37349
37368
  // src/components/navigation/app-layout.tsx
37350
- 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";
37351
37370
 
37352
37371
  // src/components/navigation/mobile-burger-menu.tsx
37353
- import React115, { useCallback as useCallback37, useRef as useRef50 } from "react";
37372
+ import React115, { useCallback as useCallback37, useRef as useRef51 } from "react";
37354
37373
  import { usePreventScroll as usePreventScroll5 } from "@react-aria/overlays";
37355
37374
  import { Fragment as Fragment56, jsx as jsx288, jsxs as jsxs226 } from "react/jsx-runtime";
37356
37375
  var HEADER_HEIGHT = 48;
@@ -37364,7 +37383,7 @@ var MobileBurgerMenu = React115.memo(function MobileBurgerMenu2({
37364
37383
  onLogout,
37365
37384
  disabled = false
37366
37385
  }) {
37367
- const panelRef = useRef50(null);
37386
+ const panelRef = useRef51(null);
37368
37387
  usePreventScroll5({ isDisabled: !isOpen });
37369
37388
  useFocusTrap(panelRef, isOpen, { onEscape: onClose });
37370
37389
  const handleItemClick = useCallback37((item) => {
@@ -37547,11 +37566,11 @@ function AppLayout({
37547
37566
  drawer,
37548
37567
  topBar
37549
37568
  }) {
37550
- const [mobileMenuOpen, setMobileMenuOpen] = useState90(false);
37551
- const [drawerContainer, setDrawerContainer] = useState90(null);
37552
- const mobileMenuOpenRef = useRef51(mobileMenuOpen);
37569
+ const [mobileMenuOpen, setMobileMenuOpen] = useState91(false);
37570
+ const [drawerContainer, setDrawerContainer] = useState91(null);
37571
+ const mobileMenuOpenRef = useRef52(mobileMenuOpen);
37553
37572
  mobileMenuOpenRef.current = mobileMenuOpen;
37554
- const drawerHandlesRef = useRef51(/* @__PURE__ */ new Set());
37573
+ const drawerHandlesRef = useRef52(/* @__PURE__ */ new Set());
37555
37574
  const handleToggleMobileMenu = useCallback38(() => {
37556
37575
  const opening = !mobileMenuOpenRef.current;
37557
37576
  if (opening) {
@@ -38178,7 +38197,7 @@ ScriptArguments.displayName = "ScriptArguments";
38178
38197
 
38179
38198
  // src/components/shared/onboarding/onboarding-walkthrough.tsx
38180
38199
  init_button2();
38181
- import React117, { useRef as useRef52, useCallback as useCallback39 } from "react";
38200
+ import React117, { useRef as useRef53, useCallback as useCallback39 } from "react";
38182
38201
 
38183
38202
  // src/components/shared/onboarding/onboarding-step-card.tsx
38184
38203
  import React116 from "react";
@@ -38302,10 +38321,10 @@ function OnboardingWalkthrough({
38302
38321
  allStepsComplete,
38303
38322
  markMultipleComplete
38304
38323
  } = useOnboardingState(storageKey);
38305
- const hasAutoMarkedRef = useRef52(false);
38306
- const autoMarkingInProgressRef = useRef52(false);
38307
- const lastCompletionStatusRef = useRef52(null);
38308
- 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());
38309
38328
  React117.useEffect(() => {
38310
38329
  if (isLoadingCompletion) {
38311
38330
  hasAutoMarkedRef.current = false;
@@ -38644,7 +38663,7 @@ function ServiceCard({ title, subtitle, icon, tag, rows, className }) {
38644
38663
  ] });
38645
38664
  }
38646
38665
  function ServiceCardRowItem({ row }) {
38647
- const [revealed, setRevealed] = useState91(false);
38666
+ const [revealed, setRevealed] = useState92(false);
38648
38667
  const { copy, copied } = useCopyToClipboard();
38649
38668
  const actions = useMemo39(() => ({ copy: true, open: !!row.href, reveal: !!row.isSecret, ...row.actions }), [row]);
38650
38669
  const displayValue = row.isSecret ? /* @__PURE__ */ jsx302(MaskedValue, { value: row.value, isRevealed: revealed }) : /* @__PURE__ */ jsx302("span", { children: row.value });
@@ -38993,7 +39012,7 @@ var ListLoader = (props) => /* @__PURE__ */ jsx307(ContentLoader, { ...props, va
38993
39012
 
38994
39013
  // src/components/ui/table/table.tsx
38995
39014
  init_cn();
38996
- import { useEffect as useEffect70, useRef as useRef54 } from "react";
39015
+ import { useEffect as useEffect71, useRef as useRef55 } from "react";
38997
39016
  init_pagination();
38998
39017
  init_button2();
38999
39018
 
@@ -39604,10 +39623,10 @@ function TableRow({
39604
39623
  }
39605
39624
 
39606
39625
  // src/components/ui/table/use-table-motion.ts
39607
- import { useEffect as useEffect69, useState as useState92 } from "react";
39626
+ import { useEffect as useEffect70, useState as useState93 } from "react";
39608
39627
  function useTableMotion(enabled) {
39609
- const [runtime, setRuntime] = useState92(null);
39610
- useEffect69(() => {
39628
+ const [runtime, setRuntime] = useState93(null);
39629
+ useEffect70(() => {
39611
39630
  if (!enabled || runtime) return;
39612
39631
  let active = true;
39613
39632
  import("framer-motion").then((m) => {
@@ -39753,10 +39772,10 @@ function Table({
39753
39772
  };
39754
39773
  const allSelected = selectedRows.length > 0 && selectedRows.length === data.length;
39755
39774
  const someSelected = selectedRows.length > 0 && selectedRows.length < data.length;
39756
- const sentinelRef = useRef54(null);
39757
- const onLoadMoreRef = useRef54(infiniteScroll?.onLoadMore);
39775
+ const sentinelRef = useRef55(null);
39776
+ const onLoadMoreRef = useRef55(infiniteScroll?.onLoadMore);
39758
39777
  onLoadMoreRef.current = infiniteScroll?.onLoadMore;
39759
- useEffect70(() => {
39778
+ useEffect71(() => {
39760
39779
  if (!infiniteScroll?.hasNextPage || infiniteScroll.isFetchingNextPage) return;
39761
39780
  const sentinel = sentinelRef.current;
39762
39781
  if (!sentinel) return;
@@ -39974,7 +39993,7 @@ import { useMemo as useMemo40 } from "react";
39974
39993
 
39975
39994
  // src/components/ui/query-report-table/query-report-table-header.tsx
39976
39995
  init_cn();
39977
- 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";
39978
39997
  import { jsx as jsx319, jsxs as jsxs252 } from "react/jsx-runtime";
39979
39998
  function QueryReportTableHeader({
39980
39999
  columns,
@@ -40003,8 +40022,8 @@ function QueryReportTableHeader({
40003
40022
  );
40004
40023
  }
40005
40024
  function TruncatedHeaderCell({ value, width }) {
40006
- const textRef = useRef55(null);
40007
- const [isTruncated, setIsTruncated] = useState93(false);
40025
+ const textRef = useRef56(null);
40026
+ const [isTruncated, setIsTruncated] = useState94(false);
40008
40027
  const checkTruncation = useCallback40(() => {
40009
40028
  const el = textRef.current;
40010
40029
  if (el) {
@@ -40033,7 +40052,7 @@ function TruncatedHeaderCell({ value, width }) {
40033
40052
 
40034
40053
  // src/components/ui/query-report-table/query-report-table-row.tsx
40035
40054
  init_cn();
40036
- 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";
40037
40056
  import { jsx as jsx320, jsxs as jsxs253 } from "react/jsx-runtime";
40038
40057
  function QueryReportTableRow({
40039
40058
  row,
@@ -40079,8 +40098,8 @@ function QueryReportTableRow({
40079
40098
  );
40080
40099
  }
40081
40100
  function TruncatedCell({ value, className }) {
40082
- const textRef = useRef56(null);
40083
- const [isTruncated, setIsTruncated] = useState94(false);
40101
+ const textRef = useRef57(null);
40102
+ const [isTruncated, setIsTruncated] = useState95(false);
40084
40103
  const checkTruncation = useCallback41(() => {
40085
40104
  const el = textRef.current;
40086
40105
  if (el) {
@@ -40581,7 +40600,7 @@ function DataTableEmpty({ className, ...props }) {
40581
40600
  // src/components/ui/data-table/data-table-row.tsx
40582
40601
  init_next_link();
40583
40602
  init_cn();
40584
- 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";
40585
40604
  import { flexRender as flexRender2 } from "@tanstack/react-table";
40586
40605
 
40587
40606
  // src/components/ui/data-table/data-table-skeleton.tsx
@@ -40666,7 +40685,7 @@ function DataTableRowImpl({
40666
40685
  const hasSubRow = subRow != null && subRow !== false;
40667
40686
  const isLinkMode = Boolean(href) && !onClick;
40668
40687
  const isWholeCardLink = isLinkMode && !hasSubRow;
40669
- const containerRef = useRef57(null);
40688
+ const containerRef = useRef58(null);
40670
40689
  const handleClick = useCallback43(
40671
40690
  (e) => {
40672
40691
  const target = e.target;
@@ -40834,7 +40853,7 @@ function DataTableBody({
40834
40853
  }
40835
40854
 
40836
40855
  // src/components/ui/data-table/data-table-infinite-footer.tsx
40837
- import { useEffect as useEffect71, useRef as useRef58 } from "react";
40856
+ import { useEffect as useEffect72, useRef as useRef59 } from "react";
40838
40857
  import { Fragment as Fragment64, jsx as jsx330, jsxs as jsxs261 } from "react/jsx-runtime";
40839
40858
  function DataTableInfiniteFooter({
40840
40859
  hasNextPage,
@@ -40843,10 +40862,10 @@ function DataTableInfiniteFooter({
40843
40862
  skeletonRows = 3,
40844
40863
  rootMargin = "200px"
40845
40864
  }) {
40846
- const sentinelRef = useRef58(null);
40847
- const onLoadMoreRef = useRef58(onLoadMore);
40865
+ const sentinelRef = useRef59(null);
40866
+ const onLoadMoreRef = useRef59(onLoadMore);
40848
40867
  onLoadMoreRef.current = onLoadMore;
40849
- useEffect71(() => {
40868
+ useEffect72(() => {
40850
40869
  if (!hasNextPage || isFetchingNextPage) return;
40851
40870
  const sentinel = sentinelRef.current;
40852
40871
  if (!sentinel) return;
@@ -41480,9 +41499,9 @@ function FilterList({
41480
41499
 
41481
41500
  // src/components/ui/tag-search-input.tsx
41482
41501
  import {
41483
- useEffect as useEffect73,
41484
- useRef as useRef60,
41485
- useState as useState96
41502
+ useEffect as useEffect74,
41503
+ useRef as useRef61,
41504
+ useState as useState97
41486
41505
  } from "react";
41487
41506
  init_cn();
41488
41507
  import { jsx as jsx334, jsxs as jsxs265 } from "react/jsx-runtime";
@@ -41516,11 +41535,11 @@ function TagSearchInput({
41516
41535
  limitTags,
41517
41536
  placeholder: currentPlaceholder
41518
41537
  });
41519
- const wrapperRef = useRef60(null);
41520
- const hiddenTagsRef = useRef60(null);
41521
- const hiddenTagsPopupRef = useRef60(null);
41522
- const [showHiddenTags, setShowHiddenTags] = useState96(false);
41523
- useEffect73(() => {
41538
+ const wrapperRef = useRef61(null);
41539
+ const hiddenTagsRef = useRef61(null);
41540
+ const hiddenTagsPopupRef = useRef61(null);
41541
+ const [showHiddenTags, setShowHiddenTags] = useState97(false);
41542
+ useEffect74(() => {
41524
41543
  if (!showHiddenTags) return;
41525
41544
  const handleClick = (e) => {
41526
41545
  const target = e.target;
@@ -41675,7 +41694,7 @@ function TagSearchInput({
41675
41694
  }
41676
41695
 
41677
41696
  // src/components/ui/markdown-editor.tsx
41678
- 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";
41679
41698
  init_cn();
41680
41699
  import { Loader2 as Loader28, Upload as Upload8 } from "lucide-react";
41681
41700
  import { jsx as jsx335, jsxs as jsxs266 } from "react/jsx-runtime";
@@ -41706,7 +41725,7 @@ body .w-md-editor .w-md-editor-bar::after { content: '' !important; display: blo
41706
41725
  body .w-md-editor .w-md-editor-bar:hover::after { border-color: var(--color-text-secondary) !important; }
41707
41726
  `;
41708
41727
  function MarkdownEditorStyles() {
41709
- useEffect74(() => {
41728
+ useEffect75(() => {
41710
41729
  if (document.getElementById(MARKDOWN_EDITOR_STYLE_ID)) return;
41711
41730
  const style = document.createElement("style");
41712
41731
  style.id = MARKDOWN_EDITOR_STYLE_ID;
@@ -41730,11 +41749,11 @@ function MarkdownEditor({
41730
41749
  onFileUploaded,
41731
41750
  renderPreview
41732
41751
  }) {
41733
- const fileInputRef = useRef61(null);
41734
- const [isUploading, setIsUploading] = useState97(false);
41735
- const [uploadProgress, setUploadProgress] = useState97("");
41736
- const [defaultExtraCommands, setDefaultExtraCommands] = useState97([]);
41737
- useEffect74(() => {
41752
+ const fileInputRef = useRef62(null);
41753
+ const [isUploading, setIsUploading] = useState98(false);
41754
+ const [uploadProgress, setUploadProgress] = useState98("");
41755
+ const [defaultExtraCommands, setDefaultExtraCommands] = useState98([]);
41756
+ useEffect75(() => {
41738
41757
  import("@uiw/react-md-editor").then((mod) => {
41739
41758
  if (mod.commands?.getExtraCommands) {
41740
41759
  setDefaultExtraCommands(mod.commands.getExtraCommands());
@@ -41823,11 +41842,11 @@ function MarkdownEditor({
41823
41842
  }
41824
41843
  } : null;
41825
41844
  const extraCommands = uploadCommand ? [...defaultExtraCommands, uploadCommand] : defaultExtraCommands;
41826
- const wrapperRef = useRef61(null);
41827
- const isDraggingRef = useRef61(false);
41828
- const mouseYRef = useRef61(0);
41829
- const rafRef = useRef61(0);
41830
- 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);
41831
41850
  const EDGE_ZONE = 60;
41832
41851
  const MAX_SCROLL_SPEED = 15;
41833
41852
  const findScrollParent = useCallback44((el) => {
@@ -41857,7 +41876,7 @@ function MarkdownEditor({
41857
41876
  }
41858
41877
  rafRef.current = requestAnimationFrame(scrollLoop);
41859
41878
  }, []);
41860
- useEffect74(() => {
41879
+ useEffect75(() => {
41861
41880
  const wrapper = wrapperRef.current;
41862
41881
  if (!wrapper) return;
41863
41882
  const onMouseMove = (e) => {
@@ -43339,8 +43358,8 @@ function ImageGalleryModal({
43339
43358
  onClose,
43340
43359
  initialIndex = 0
43341
43360
  }) {
43342
- const [selectedImageIndex, setSelectedImageIndex] = useState104(initialIndex);
43343
- useEffect77(() => {
43361
+ const [selectedImageIndex, setSelectedImageIndex] = useState105(initialIndex);
43362
+ useEffect78(() => {
43344
43363
  if (isOpen) {
43345
43364
  setSelectedImageIndex(initialIndex);
43346
43365
  }
@@ -43355,7 +43374,7 @@ function ImageGalleryModal({
43355
43374
  setSelectedImageIndex(selectedImageIndex + 1);
43356
43375
  }
43357
43376
  };
43358
- useEffect77(() => {
43377
+ useEffect78(() => {
43359
43378
  const handleKeyPress = (event) => {
43360
43379
  if (!isOpen) return;
43361
43380
  switch (event.key) {
@@ -43558,7 +43577,7 @@ function RoadmapCard({
43558
43577
  onVote,
43559
43578
  isVoting = false
43560
43579
  }) {
43561
- const [showScreenshots, setShowScreenshots] = useState105(false);
43580
+ const [showScreenshots, setShowScreenshots] = useState106(false);
43562
43581
  const logoUrl = item.icon && item.icon.startsWith("http") ? item.icon : null;
43563
43582
  const iconSrc = logoUrl ? getProxiedImageUrl(logoUrl, { directHttps: true }) || logoUrl : null;
43564
43583
  if (size2 === "sm") {
@@ -44194,7 +44213,7 @@ function DataRoomDocCardSkeleton({ className }) {
44194
44213
  }
44195
44214
 
44196
44215
  // src/components/chat/entity-cards/program-card.tsx
44197
- import { useState as useState106 } from "react";
44216
+ import { useState as useState107 } from "react";
44198
44217
 
44199
44218
  // node_modules/date-fns/toDate.mjs
44200
44219
  function toDate2(argument) {
@@ -45831,8 +45850,8 @@ function getHosts(hosts) {
45831
45850
  return [];
45832
45851
  }
45833
45852
  function MediaGallery({ images, title }) {
45834
- const [selectedImageIndex, setSelectedImageIndex] = useState106(null);
45835
- const [isModalOpen, setIsModalOpen] = useState106(false);
45853
+ const [selectedImageIndex, setSelectedImageIndex] = useState107(null);
45854
+ const [isModalOpen, setIsModalOpen] = useState107(false);
45836
45855
  const openImageModal = (index, event) => {
45837
45856
  if (event) event.stopPropagation();
45838
45857
  setSelectedImageIndex(index);
@@ -47430,7 +47449,7 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
47430
47449
  }
47431
47450
 
47432
47451
  // src/components/chat/hooks/use-chunk-catchup.ts
47433
- import { useCallback as useCallback46, useRef as useRef65 } from "react";
47452
+ import { useCallback as useCallback46, useRef as useRef66 } from "react";
47434
47453
  function makeSeqKey(messageType, chunkType, sequenceId) {
47435
47454
  return `${messageType}:${chunkType}:${sequenceId}`;
47436
47455
  }
@@ -47452,22 +47471,22 @@ function useChunkCatchup({
47452
47471
  chatTypes = [CHAT_TYPE.CLIENT],
47453
47472
  fetchChunks
47454
47473
  }) {
47455
- const processedSequenceKeys = useRef65(/* @__PURE__ */ new Set());
47456
- const lastSequenceId = useRef65(null);
47457
- const lastSequenceIdByType = useRef65(/* @__PURE__ */ new Map());
47458
- const fetchingInProgress = useRef65(false);
47459
- const lastFetchParams = useRef65(null);
47460
- const pendingCatchupRef = useRef65(null);
47461
- const chunkBuffer = useRef65([]);
47462
- const bufferUntilInitialCatchupComplete = useRef65(false);
47463
- const hasCompletedInitialCatchup = useRef65(false);
47464
- 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);
47465
47484
  dialogIdRef.current = dialogId;
47466
- const chatTypesRef = useRef65(chatTypes);
47485
+ const chatTypesRef = useRef66(chatTypes);
47467
47486
  chatTypesRef.current = chatTypes;
47468
- const fetchChunksRef = useRef65(fetchChunks);
47487
+ const fetchChunksRef = useRef66(fetchChunks);
47469
47488
  fetchChunksRef.current = fetchChunks;
47470
- const onChunkReceivedRef = useRef65(onChunkReceived);
47489
+ const onChunkReceivedRef = useRef66(onChunkReceived);
47471
47490
  onChunkReceivedRef.current = onChunkReceived;
47472
47491
  const processChunk = useCallback46((chunk, messageType, forceProcess = false) => {
47473
47492
  if (bufferUntilInitialCatchupComplete.current && !forceProcess) {
@@ -47664,7 +47683,7 @@ function useChunkCatchup({
47664
47683
  }
47665
47684
  }
47666
47685
  }, [flushBufferedRealtimeChunks]);
47667
- const catchUpChunksRef = useRef65(null);
47686
+ const catchUpChunksRef = useRef66(null);
47668
47687
  catchUpChunksRef.current = catchUpChunks;
47669
47688
  const resetChunkTracking = useCallback46(() => {
47670
47689
  processedSequenceKeys.current.clear();
@@ -47708,20 +47727,20 @@ function useChunkCatchup({
47708
47727
  }
47709
47728
 
47710
47729
  // src/components/chat/hooks/use-scripted-stream.ts
47711
- import { useEffect as useEffect78, useState as useState107 } from "react";
47730
+ import { useEffect as useEffect79, useState as useState108 } from "react";
47712
47731
  var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
47713
47732
  function prefersReducedMotion() {
47714
47733
  return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true;
47715
47734
  }
47716
47735
  function useScriptedStream(frames, resetKey, enabled = true) {
47717
- const [index, setIndex] = useState107(0);
47718
- const [reducedMotion, setReducedMotion] = useState107(false);
47719
- const [prevKey, setPrevKey] = useState107(resetKey);
47736
+ const [index, setIndex] = useState108(0);
47737
+ const [reducedMotion, setReducedMotion] = useState108(false);
47738
+ const [prevKey, setPrevKey] = useState108(resetKey);
47720
47739
  if (resetKey !== prevKey) {
47721
47740
  setPrevKey(resetKey);
47722
47741
  setIndex(0);
47723
47742
  }
47724
- useEffect78(() => {
47743
+ useEffect79(() => {
47725
47744
  setReducedMotion(prefersReducedMotion());
47726
47745
  const mq = window.matchMedia?.("(prefers-reduced-motion: reduce)");
47727
47746
  if (!mq) return;
@@ -47731,7 +47750,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
47731
47750
  }, []);
47732
47751
  const playing = enabled && !reducedMotion && frames.length > 0;
47733
47752
  const lastIndex = Math.max(0, frames.length - 1);
47734
- useEffect78(() => {
47753
+ useEffect79(() => {
47735
47754
  if (!playing || index >= lastIndex) return;
47736
47755
  const current = frames[Math.min(index, lastIndex)] ?? EMPTY_FRAME;
47737
47756
  const t = setTimeout(() => setIndex((i) => Math.min(i + 1, lastIndex)), current.delayMs);
@@ -47743,7 +47762,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
47743
47762
  }
47744
47763
 
47745
47764
  // src/components/chat/hooks/use-jetstream-dialog-subscription.ts
47746
- 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";
47747
47766
  var DEFAULT_INACTIVE_THRESHOLD_MS = 5 * 6e4;
47748
47767
  var DEFAULT_STREAM_NAME = "CHAT_CHUNKS";
47749
47768
  function useJetStreamDialogSubscription({
@@ -47762,57 +47781,57 @@ function useJetStreamDialogSubscription({
47762
47781
  reconnectionBackoff,
47763
47782
  inactiveThresholdMs
47764
47783
  }) {
47765
- const [isConnected, setIsConnected] = useState108(false);
47766
- const [isSubscribed, setIsSubscribed] = useState108(false);
47767
- const [reconnectionCount, setReconnectionCount] = useState108(0);
47768
- const [currentStreamSeq, setCurrentStreamSeq] = useState108(null);
47769
- const clientRef = useRef66(null);
47770
- const subscriptionRef = useRef66(null);
47771
- const highestStreamSeqRef = useRef66(null);
47772
- const onEventRef = useRef66(onEvent);
47773
- 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(() => {
47774
47793
  onEventRef.current = onEvent;
47775
47794
  }, [onEvent]);
47776
- const onConnectRef = useRef66(onConnect);
47777
- useEffect79(() => {
47795
+ const onConnectRef = useRef67(onConnect);
47796
+ useEffect80(() => {
47778
47797
  onConnectRef.current = onConnect;
47779
47798
  }, [onConnect]);
47780
- const onDisconnectRef = useRef66(onDisconnect);
47781
- useEffect79(() => {
47799
+ const onDisconnectRef = useRef67(onDisconnect);
47800
+ useEffect80(() => {
47782
47801
  onDisconnectRef.current = onDisconnect;
47783
47802
  }, [onDisconnect]);
47784
- const onSubscribedRef = useRef66(onSubscribed);
47785
- useEffect79(() => {
47803
+ const onSubscribedRef = useRef67(onSubscribed);
47804
+ useEffect80(() => {
47786
47805
  onSubscribedRef.current = onSubscribed;
47787
47806
  }, [onSubscribed]);
47788
- const onBeforeReconnectRef = useRef66(onBeforeReconnect);
47789
- useEffect79(() => {
47807
+ const onBeforeReconnectRef = useRef67(onBeforeReconnect);
47808
+ useEffect80(() => {
47790
47809
  onBeforeReconnectRef.current = onBeforeReconnect;
47791
47810
  }, [onBeforeReconnect]);
47792
- const getNatsWsUrlRef = useRef66(getNatsWsUrl);
47793
- useEffect79(() => {
47811
+ const getNatsWsUrlRef = useRef67(getNatsWsUrl);
47812
+ useEffect80(() => {
47794
47813
  getNatsWsUrlRef.current = getNatsWsUrl;
47795
47814
  }, [getNatsWsUrl]);
47796
- const reconnectionBackoffRef = useRef66(reconnectionBackoff);
47797
- useEffect79(() => {
47815
+ const reconnectionBackoffRef = useRef67(reconnectionBackoff);
47816
+ useEffect80(() => {
47798
47817
  reconnectionBackoffRef.current = reconnectionBackoff;
47799
47818
  }, [reconnectionBackoff]);
47800
- const optStartSeqRef = useRef66(optStartSeq);
47801
- useEffect79(() => {
47819
+ const optStartSeqRef = useRef67(optStartSeq);
47820
+ useEffect80(() => {
47802
47821
  optStartSeqRef.current = optStartSeq;
47803
47822
  }, [optStartSeq]);
47804
- const inactiveThresholdRef = useRef66(inactiveThresholdMs);
47805
- useEffect79(() => {
47823
+ const inactiveThresholdRef = useRef67(inactiveThresholdMs);
47824
+ useEffect80(() => {
47806
47825
  inactiveThresholdRef.current = inactiveThresholdMs;
47807
47826
  }, [inactiveThresholdMs]);
47808
- const hadConnectionBeforeRef = useRef66(false);
47809
- const clientConfigRef = useRef66(clientConfig);
47810
- useEffect79(() => {
47827
+ const hadConnectionBeforeRef = useRef67(false);
47828
+ const clientConfigRef = useRef67(clientConfig);
47829
+ useEffect80(() => {
47811
47830
  clientConfigRef.current = clientConfig;
47812
47831
  }, [clientConfig]);
47813
- const currentWsUrlRef = useRef66("");
47832
+ const currentWsUrlRef = useRef67("");
47814
47833
  const wsUrl = getNatsWsUrl();
47815
- useEffect79(() => {
47834
+ useEffect80(() => {
47816
47835
  if (!enabled || !wsUrl) {
47817
47836
  if (currentWsUrlRef.current && clientRef.current) {
47818
47837
  releaseClient(currentWsUrlRef.current);
@@ -47893,11 +47912,11 @@ function useJetStreamDialogSubscription({
47893
47912
  }
47894
47913
  };
47895
47914
  }, [enabled, wsUrl]);
47896
- useEffect79(() => {
47915
+ useEffect80(() => {
47897
47916
  highestStreamSeqRef.current = null;
47898
47917
  setCurrentStreamSeq(null);
47899
47918
  }, [dialogId]);
47900
- useEffect79(() => {
47919
+ useEffect80(() => {
47901
47920
  if (!enabled || !dialogId || !isConnected) {
47902
47921
  if (subscriptionRef.current) {
47903
47922
  try {
@@ -47984,7 +48003,7 @@ function useJetStreamDialogSubscription({
47984
48003
  }
47985
48004
 
47986
48005
  // src/components/chat/hooks/use-nats-dialog-subscription.ts
47987
- 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";
47988
48007
  function useNatsDialogSubscription({
47989
48008
  enabled,
47990
48009
  dialogId,
@@ -47998,47 +48017,47 @@ function useNatsDialogSubscription({
47998
48017
  clientConfig = {},
47999
48018
  reconnectionBackoff
48000
48019
  }) {
48001
- const [isConnected, setIsConnected] = useState109(false);
48002
- const [isSubscribed, setIsSubscribed] = useState109(false);
48003
- const [reconnectionCount, setReconnectionCount] = useState109(0);
48004
- const clientRef = useRef67(null);
48005
- const subscriptionRefs = useRef67(/* @__PURE__ */ new Map());
48006
- const onEventRef = useRef67(onEvent);
48007
- 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(() => {
48008
48027
  onEventRef.current = onEvent;
48009
48028
  }, [onEvent]);
48010
- const onConnectRef = useRef67(onConnect);
48011
- useEffect80(() => {
48029
+ const onConnectRef = useRef68(onConnect);
48030
+ useEffect81(() => {
48012
48031
  onConnectRef.current = onConnect;
48013
48032
  }, [onConnect]);
48014
- const onDisconnectRef = useRef67(onDisconnect);
48015
- useEffect80(() => {
48033
+ const onDisconnectRef = useRef68(onDisconnect);
48034
+ useEffect81(() => {
48016
48035
  onDisconnectRef.current = onDisconnect;
48017
48036
  }, [onDisconnect]);
48018
- const onSubscribedRef = useRef67(onSubscribed);
48019
- useEffect80(() => {
48037
+ const onSubscribedRef = useRef68(onSubscribed);
48038
+ useEffect81(() => {
48020
48039
  onSubscribedRef.current = onSubscribed;
48021
48040
  }, [onSubscribed]);
48022
- const onBeforeReconnectRef = useRef67(onBeforeReconnect);
48023
- useEffect80(() => {
48041
+ const onBeforeReconnectRef = useRef68(onBeforeReconnect);
48042
+ useEffect81(() => {
48024
48043
  onBeforeReconnectRef.current = onBeforeReconnect;
48025
48044
  }, [onBeforeReconnect]);
48026
- const hadConnectionBeforeRef = useRef67(false);
48027
- const getNatsWsUrlRef = useRef67(getNatsWsUrl);
48028
- useEffect80(() => {
48045
+ const hadConnectionBeforeRef = useRef68(false);
48046
+ const getNatsWsUrlRef = useRef68(getNatsWsUrl);
48047
+ useEffect81(() => {
48029
48048
  getNatsWsUrlRef.current = getNatsWsUrl;
48030
48049
  }, [getNatsWsUrl]);
48031
- const reconnectionBackoffRef = useRef67(reconnectionBackoff);
48032
- useEffect80(() => {
48050
+ const reconnectionBackoffRef = useRef68(reconnectionBackoff);
48051
+ useEffect81(() => {
48033
48052
  reconnectionBackoffRef.current = reconnectionBackoff;
48034
48053
  }, [reconnectionBackoff]);
48035
- const clientConfigRef = useRef67(clientConfig);
48036
- useEffect80(() => {
48054
+ const clientConfigRef = useRef68(clientConfig);
48055
+ useEffect81(() => {
48037
48056
  clientConfigRef.current = clientConfig;
48038
48057
  }, [clientConfig]);
48039
- const currentWsUrlRef = useRef67("");
48058
+ const currentWsUrlRef = useRef68("");
48040
48059
  const wsUrl = getNatsWsUrl();
48041
- useEffect80(() => {
48060
+ useEffect81(() => {
48042
48061
  if (!enabled || !wsUrl) {
48043
48062
  if (currentWsUrlRef.current && clientRef.current) {
48044
48063
  releaseClient(currentWsUrlRef.current);
@@ -48120,16 +48139,16 @@ function useNatsDialogSubscription({
48120
48139
  };
48121
48140
  }, [enabled, wsUrl]);
48122
48141
  const topicsKey = topics.join(",");
48123
- const topicsRef = useRef67(topics);
48142
+ const topicsRef = useRef68(topics);
48124
48143
  topicsRef.current = topics;
48125
- const lastSubscribedDialogIdRef = useRef67(null);
48126
- const isConnectedRef = useRef67(isConnected);
48127
- useEffect80(() => {
48144
+ const lastSubscribedDialogIdRef = useRef68(null);
48145
+ const isConnectedRef = useRef68(isConnected);
48146
+ useEffect81(() => {
48128
48147
  isConnectedRef.current = isConnected;
48129
48148
  }, [isConnected]);
48130
- const currentDialogIdRef = useRef67(null);
48131
- const abortControllerRef = useRef67(null);
48132
- useEffect80(() => {
48149
+ const currentDialogIdRef = useRef68(null);
48150
+ const abortControllerRef = useRef68(null);
48151
+ useEffect81(() => {
48133
48152
  currentDialogIdRef.current = dialogId;
48134
48153
  if (!enabled || !dialogId) {
48135
48154
  if (subscriptionRefs.current.size > 0) {
@@ -48210,7 +48229,7 @@ function useNatsDialogSubscription({
48210
48229
  abortControllerRef.current = null;
48211
48230
  };
48212
48231
  }, [enabled, dialogId, topicsKey]);
48213
- useEffect80(() => {
48232
+ useEffect81(() => {
48214
48233
  if (!enabled || !currentDialogIdRef.current || !isConnected) {
48215
48234
  return;
48216
48235
  }
@@ -48260,7 +48279,7 @@ function buildNatsWsUrl(apiBaseUrl, options) {
48260
48279
  }
48261
48280
 
48262
48281
  // src/components/chat/hooks/use-realtime-chunk-processor.ts
48263
- 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";
48264
48283
 
48265
48284
  // src/components/chat/utils/chunk-parser.ts
48266
48285
  function normalizeToolCalls(raw) {
@@ -48915,14 +48934,14 @@ function useRealtimeChunkProcessor(options) {
48915
48934
  batchApprovalsEnabled = true,
48916
48935
  isDirectMode = false
48917
48936
  } = options;
48918
- const accumulatorRef = useRef68(
48937
+ const accumulatorRef = useRef69(
48919
48938
  createMessageSegmentAccumulator({
48920
48939
  onApprove: callbacks.onApprove,
48921
48940
  onReject: callbacks.onReject
48922
48941
  })
48923
48942
  );
48924
- const hasInitializedWithData = useRef68(false);
48925
- useEffect81(() => {
48943
+ const hasInitializedWithData = useRef69(false);
48944
+ useEffect82(() => {
48926
48945
  if (initialState && !hasInitializedWithData.current) {
48927
48946
  accumulatorRef.current.initializeWithState(initialState);
48928
48947
  if (initialState.escalatedApprovals) {
@@ -48935,15 +48954,15 @@ function useRealtimeChunkProcessor(options) {
48935
48954
  hasInitializedWithData.current = true;
48936
48955
  }
48937
48956
  }, [initialState, callbacks]);
48938
- const isInStreamRef = useRef68(false);
48939
- const hasEverStreamedRef = useRef68(false);
48940
- const directModeFlagRef = useRef68(isDirectMode);
48941
- const sawDirectMessageRef = useRef68(false);
48942
- const directTeardownFiredRef = useRef68(false);
48943
- 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(() => {
48944
48963
  directModeFlagRef.current = isDirectMode;
48945
48964
  }, [isDirectMode]);
48946
- const pendingEscalatedRef = useRef68(/* @__PURE__ */ new Map());
48965
+ const pendingEscalatedRef = useRef69(/* @__PURE__ */ new Map());
48947
48966
  const processChunk = useCallback47(
48948
48967
  (chunk) => {
48949
48968
  const action = parseChunkToAction(chunk);
@@ -49219,7 +49238,7 @@ function useRealtimeChunkProcessor(options) {
49219
49238
  }
49220
49239
 
49221
49240
  // src/components/chat/hooks/use-slash-commands.ts
49222
- import { useEffect as useEffect82, useState as useState110 } from "react";
49241
+ import { useEffect as useEffect83, useState as useState111 } from "react";
49223
49242
  import { useQuery as useQuery2 } from "@tanstack/react-query";
49224
49243
  async function fetchSlashCommands(prefix, signal, commandsUrl) {
49225
49244
  try {
@@ -49236,9 +49255,9 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
49236
49255
  }
49237
49256
  }
49238
49257
  function useSlashCommands(prefix, commandsUrl) {
49239
- const [commands, setCommands] = useState110([]);
49240
- const [loading, setLoading] = useState110(false);
49241
- useEffect82(() => {
49258
+ const [commands, setCommands] = useState111([]);
49259
+ const [loading, setLoading] = useState111(false);
49260
+ useEffect83(() => {
49242
49261
  if (prefix == null) {
49243
49262
  setCommands([]);
49244
49263
  return;
@@ -49344,7 +49363,7 @@ function useEmptyStateConfig(emptyStateUrl, options) {
49344
49363
  }
49345
49364
 
49346
49365
  // src/components/chat/hooks/use-chat-attachments.ts
49347
- 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";
49348
49367
  import { fileTypeFromBlob } from "file-type";
49349
49368
  var CHAT_ATTACHMENTS_BUCKET = "chat-attachments";
49350
49369
  var CHAT_ATTACHMENTS_FOLDER = "chat";
@@ -49420,8 +49439,8 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
49420
49439
  function useChatAttachments() {
49421
49440
  const runtime = useRequiredChatRuntime();
49422
49441
  const uploadUrlEndpoint = runtime.endpoints.attachmentUploadUrl;
49423
- const [attachments, setAttachments] = useState111([]);
49424
- const controllersRef = useRef69(/* @__PURE__ */ new Map());
49442
+ const [attachments, setAttachments] = useState112([]);
49443
+ const controllersRef = useRef70(/* @__PURE__ */ new Map());
49425
49444
  const updateOne = useCallback48((id, patch) => {
49426
49445
  setAttachments((prev) => prev.map((a) => a.id === id ? { ...a, ...patch } : a));
49427
49446
  }, []);
@@ -49510,7 +49529,7 @@ function useChatAttachments() {
49510
49529
  },
49511
49530
  [uploadUrlEndpoint, updateOne]
49512
49531
  );
49513
- const attachmentsRef = useRef69([]);
49532
+ const attachmentsRef = useRef70([]);
49514
49533
  attachmentsRef.current = attachments;
49515
49534
  const addFiles = useCallback48(
49516
49535
  (files) => {
@@ -49587,16 +49606,16 @@ function useChatAttachments() {
49587
49606
  }
49588
49607
 
49589
49608
  // src/components/chat/hooks/use-chat-attachment-image-gallery.tsx
49590
- 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";
49591
49610
  import { jsx as jsx359 } from "react/jsx-runtime";
49592
49611
  var CLOSED = { isOpen: false, images: [], initialIndex: 0 };
49593
49612
  function useChatAttachmentImageGallery() {
49594
49613
  const runtime = useRequiredChatRuntime();
49595
49614
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
49596
- const panelRef = useRef70(null);
49597
- const [state, setState] = useState112(CLOSED);
49615
+ const panelRef = useRef71(null);
49616
+ const [state, setState] = useState113(CLOSED);
49598
49617
  const handleClose = useCallback49(() => setState(CLOSED), []);
49599
- useEffect83(() => {
49618
+ useEffect84(() => {
49600
49619
  const root = panelRef.current;
49601
49620
  if (!root) return;
49602
49621
  const onClick = (ev) => {
@@ -49642,7 +49661,7 @@ function absolutize(prefix) {
49642
49661
  }
49643
49662
 
49644
49663
  // src/components/chat/hooks/use-chat-identity.ts
49645
- 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";
49646
49665
  var ANON_DEFAULTS = {
49647
49666
  authTier: "anon",
49648
49667
  source: null,
@@ -49653,9 +49672,9 @@ function useResolveChatIdentity(enabled) {
49653
49672
  const runtime = useRequiredChatRuntime();
49654
49673
  const url = runtime.endpoints.identityUrl;
49655
49674
  const proxyEmail = getEmbedProxyAuth()?.email ?? null;
49656
- const [data, setData] = useState113(ANON_DEFAULTS);
49657
- const [isLoading, setIsLoading] = useState113(enabled);
49658
- useEffect84(() => {
49675
+ const [data, setData] = useState114(ANON_DEFAULTS);
49676
+ const [isLoading, setIsLoading] = useState114(enabled);
49677
+ useEffect85(() => {
49659
49678
  if (!enabled) return;
49660
49679
  let cancelled = false;
49661
49680
  const ctrl = new AbortController();
@@ -49697,11 +49716,11 @@ function useChatIdentity() {
49697
49716
  }
49698
49717
 
49699
49718
  // src/components/chat/hooks/use-close-on-navigation.ts
49700
- import { useEffect as useEffect85, useRef as useRef71 } from "react";
49719
+ import { useEffect as useEffect86, useRef as useRef72 } from "react";
49701
49720
  function useCloseOnNavigation(close, pathname) {
49702
- const prevPathnameRef = useRef71(null);
49703
- const initializedRef = useRef71(false);
49704
- useEffect85(() => {
49721
+ const prevPathnameRef = useRef72(null);
49722
+ const initializedRef = useRef72(false);
49723
+ useEffect86(() => {
49705
49724
  if (!initializedRef.current) {
49706
49725
  initializedRef.current = true;
49707
49726
  prevPathnameRef.current = pathname;
@@ -49715,14 +49734,14 @@ function useCloseOnNavigation(close, pathname) {
49715
49734
  }
49716
49735
 
49717
49736
  // src/components/chat/hooks/use-chat.ts
49718
- 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";
49719
49738
 
49720
49739
  // src/components/chat/hooks/use-sse.ts
49721
- 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";
49722
49741
  function useSSE({ useMock = true, debugMode = false, streamFn } = {}) {
49723
- const [isStreaming, setIsStreaming] = useState114(false);
49724
- const [error, setError] = useState114(null);
49725
- const abortControllerRef = useRef72(null);
49742
+ const [isStreaming, setIsStreaming] = useState115(false);
49743
+ const [error, setError] = useState115(null);
49744
+ const abortControllerRef = useRef73(null);
49726
49745
  const fallbackStream = useCallback50(async function* () {
49727
49746
  throw new Error(
49728
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."
@@ -49788,12 +49807,12 @@ function useChat({
49788
49807
  initialMessages,
49789
49808
  onMessagesChange
49790
49809
  } = {}) {
49791
- const [messages, setMessages] = useState115(() => initialMessages ?? []);
49792
- const [isTyping, setIsTyping] = useState115(false);
49793
- const currentAssistantSegmentsRef = useRef73([]);
49794
- 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);
49795
49814
  onMessagesChangeRef.current = onMessagesChange;
49796
- useEffect86(() => {
49815
+ useEffect87(() => {
49797
49816
  onMessagesChangeRef.current?.(messages);
49798
49817
  }, [messages]);
49799
49818
  const {
@@ -50082,7 +50101,7 @@ function useChat({
50082
50101
  }
50083
50102
 
50084
50103
  // src/components/chat/hooks/use-sse-chat-adapter.ts
50085
- 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";
50086
50105
  function createEmptyTurnMeta() {
50087
50106
  return {
50088
50107
  provider: null,
@@ -50403,22 +50422,22 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
50403
50422
  const runtime = useRequiredChatRuntime();
50404
50423
  const source = runtime.source || DEFAULT_CHAT_SOURCE;
50405
50424
  const tableIdForDocumentType = options?.tableIdForDocumentType ?? defaultTableIdForDocumentType;
50406
- const persistedRef = useRef74(null);
50425
+ const persistedRef = useRef75(null);
50407
50426
  if (persistedRef.current === null) {
50408
50427
  pruneStaleChatStorage(source);
50409
50428
  persistedRef.current = loadPersistedChat(source) || { messages: [], sources: [], sendCount: 0 };
50410
50429
  }
50411
- const sourcesMapRef = useRef74(
50430
+ const sourcesMapRef = useRef75(
50412
50431
  new Map(persistedRef.current.sources)
50413
50432
  );
50414
- const refsMapRef = useRef74(
50433
+ const refsMapRef = useRef75(
50415
50434
  new Map(persistedRef.current.refs ?? [])
50416
50435
  );
50417
- const metaMapRef = useRef74(/* @__PURE__ */ new Map());
50418
- const messagesRef = useRef74(persistedRef.current.messages);
50419
- const sendCountRef = useRef74(persistedRef.current.sendCount);
50420
- const [streamingPhase, setStreamingPhase] = useState116("idle");
50421
- 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);
50422
50441
  const bumpMetaTick = useCallback52(() => setMetaTick((t) => t + 1), []);
50423
50442
  const streamFn = useMemo45(
50424
50443
  () => createDocStreamFn(
@@ -50606,7 +50625,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
50606
50625
  }
50607
50626
  }
50608
50627
  }, [chatClearMessages, source, bumpMetaTick]);
50609
- useEffect87(() => {
50628
+ useEffect88(() => {
50610
50629
  if (!isTyping && !isStreaming && streamingPhase !== "idle") {
50611
50630
  setStreamingPhase("idle");
50612
50631
  }
@@ -50688,10 +50707,10 @@ var noopRejectRequest = async (_id, _reason) => {
50688
50707
  // src/components/chat/hooks/use-nats-chat-adapter.ts
50689
50708
  import {
50690
50709
  useCallback as useCallback53,
50691
- useEffect as useEffect88,
50710
+ useEffect as useEffect89,
50692
50711
  useMemo as useMemo46,
50693
- useRef as useRef75,
50694
- useState as useState117
50712
+ useRef as useRef76,
50713
+ useState as useState118
50695
50714
  } from "react";
50696
50715
 
50697
50716
  // src/components/chat/utils/process-historical-messages.ts
@@ -51388,32 +51407,32 @@ function useNatsChatAdapter(config, options = {}) {
51388
51407
  modelLabel = null
51389
51408
  } = config;
51390
51409
  const isManagedMode = fetchDialogs !== void 0;
51391
- const [internalDialogId, setInternalDialogId] = useState117(null);
51410
+ const [internalDialogId, setInternalDialogId] = useState118(null);
51392
51411
  const dialogId = isManagedMode ? internalDialogId : controlledDialogId !== void 0 ? controlledDialogId : null;
51393
- const currentDialogIdRef = useRef75(dialogId);
51412
+ const currentDialogIdRef = useRef76(dialogId);
51394
51413
  currentDialogIdRef.current = dialogId;
51395
- const [messages, setMessages] = useState117([]);
51396
- const [streamingPhase, setStreamingPhase] = useState117("idle");
51397
- const streamingPhaseRef = useRef75(streamingPhase);
51414
+ const [messages, setMessages] = useState118([]);
51415
+ const [streamingPhase, setStreamingPhase] = useState118("idle");
51416
+ const streamingPhaseRef = useRef76(streamingPhase);
51398
51417
  streamingPhaseRef.current = streamingPhase;
51399
- const suppressAgentBusyRef = useRef75(0);
51400
- const adoptTrailingAssistantRef = useRef75(false);
51401
- const hasConnectedOnceRef = useRef75(false);
51402
- const seenParticipantSeqsRef = useRef75(/* @__PURE__ */ new Set());
51403
- const pendingEchoTextsRef = useRef75([]);
51404
- const [approvalStatuses, setApprovalStatuses] = useState117({});
51405
- const [dialogs, setDialogs] = useState117([]);
51406
- const [dialogsNextCursor, setDialogsNextCursor] = useState117(null);
51407
- const [isDialogsLoading, setIsDialogsLoading] = useState117(false);
51408
- const [dialogsError, setDialogsError] = useState117(false);
51409
- const [isCreatingDialog, setIsCreatingDialog] = useState117(false);
51410
- const [messagesNextCursor, setMessagesNextCursor] = useState117(null);
51411
- const [isMessagesLoading, setIsMessagesLoading] = useState117(false);
51412
- 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(
51413
51432
  null
51414
51433
  );
51415
- const [liveModel, setLiveModel] = useState117(null);
51416
- const [connectionState, setConnectionState] = useState117("connecting");
51434
+ const [liveModel, setLiveModel] = useState118(null);
51435
+ const [connectionState, setConnectionState] = useState118("connecting");
51417
51436
  const handleApprove = useCallback53(
51418
51437
  async (requestId) => {
51419
51438
  if (!approveRequestCallback) return;
@@ -51453,9 +51472,9 @@ function useNatsChatAdapter(config, options = {}) {
51453
51472
  },
51454
51473
  [rejectRequestCallback]
51455
51474
  );
51456
- const handleApproveRef = useRef75(handleApprove);
51475
+ const handleApproveRef = useRef76(handleApprove);
51457
51476
  handleApproveRef.current = handleApprove;
51458
- const handleRejectRef = useRef75(handleReject);
51477
+ const handleRejectRef = useRef76(handleReject);
51459
51478
  handleRejectRef.current = handleReject;
51460
51479
  const accumApprove = useCallback53((requestId) => {
51461
51480
  if (!requestId) return;
@@ -51465,7 +51484,7 @@ function useNatsChatAdapter(config, options = {}) {
51465
51484
  if (!requestId) return;
51466
51485
  return handleRejectRef.current(requestId);
51467
51486
  }, []);
51468
- const callbacksRef = useRef75({
51487
+ const callbacksRef = useRef76({
51469
51488
  onSegmentsUpdate: (segments, meta) => {
51470
51489
  if (meta?.append && meta.isCompacting) {
51471
51490
  setMessages((prev) => upsertTrailingCompaction(prev, segments));
@@ -51683,7 +51702,7 @@ function useNatsChatAdapter(config, options = {}) {
51683
51702
  onChunkReceived: (chunk) => processChunk(chunk),
51684
51703
  fetchChunks
51685
51704
  });
51686
- const historyLoadSeqRef = useRef75(0);
51705
+ const historyLoadSeqRef = useRef76(0);
51687
51706
  const loadDialogHistory = useCallback53(
51688
51707
  async (id, cursor) => {
51689
51708
  if (!fetchDialogMessages) return;
@@ -51742,8 +51761,8 @@ function useNatsChatAdapter(config, options = {}) {
51742
51761
  isBufferingActive
51743
51762
  ]
51744
51763
  );
51745
- const prevDialogIdRef = useRef75(void 0);
51746
- useEffect88(() => {
51764
+ const prevDialogIdRef = useRef76(void 0);
51765
+ useEffect89(() => {
51747
51766
  if (prevDialogIdRef.current === dialogId) return;
51748
51767
  prevDialogIdRef.current = dialogId;
51749
51768
  historyLoadSeqRef.current += 1;
@@ -51760,7 +51779,7 @@ function useNatsChatAdapter(config, options = {}) {
51760
51779
  if (!active || !dialogId) return;
51761
51780
  void loadDialogHistory(dialogId);
51762
51781
  }, [active, dialogId, loadDialogHistory, resetAccumulator]);
51763
- useEffect88(() => {
51782
+ useEffect89(() => {
51764
51783
  if (!active || !dialogId) return;
51765
51784
  suppressAgentBusyRef.current += 1;
51766
51785
  resetChunkTracking();
@@ -51812,14 +51831,14 @@ function useNatsChatAdapter(config, options = {}) {
51812
51831
  })();
51813
51832
  }
51814
51833
  });
51815
- useEffect88(() => {
51834
+ useEffect89(() => {
51816
51835
  if (!active || !dialogId) {
51817
51836
  setConnectionState("connected");
51818
51837
  return;
51819
51838
  }
51820
51839
  setConnectionState("connecting");
51821
51840
  }, [active, dialogId]);
51822
- const initialDialogsLoadedRef = useRef75(false);
51841
+ const initialDialogsLoadedRef = useRef76(false);
51823
51842
  const loadDialogsPage = useCallback53(
51824
51843
  async (cursor) => {
51825
51844
  if (!fetchDialogs) return;
@@ -51851,7 +51870,7 @@ function useNatsChatAdapter(config, options = {}) {
51851
51870
  const reloadDialogs = useCallback53(() => {
51852
51871
  void loadDialogsPage();
51853
51872
  }, [loadDialogsPage]);
51854
- useEffect88(() => {
51873
+ useEffect89(() => {
51855
51874
  if (!fetchDialogs) return;
51856
51875
  if (!active) return;
51857
51876
  if (initialDialogsLoadedRef.current) return;
@@ -52094,7 +52113,7 @@ function useNatsChatAdapter(config, options = {}) {
52094
52113
  }
52095
52114
 
52096
52115
  // src/components/chat/hooks/use-unified-chat.ts
52097
- 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";
52098
52117
  var EMPTY_SSE_OPTIONS = {};
52099
52118
  function createDisabledNatsConfig() {
52100
52119
  return {
@@ -52109,7 +52128,7 @@ function createDisabledNatsConfig() {
52109
52128
  }
52110
52129
  function useUnifiedChat(options) {
52111
52130
  const { modes, activeMode, mingoStateOverride } = options;
52112
- const disabledNatsRef = useRef76(null);
52131
+ const disabledNatsRef = useRef77(null);
52113
52132
  if (disabledNatsRef.current === null) {
52114
52133
  disabledNatsRef.current = createDisabledNatsConfig();
52115
52134
  }
@@ -52123,7 +52142,7 @@ function useUnifiedChat(options) {
52123
52142
  { active: natsActive }
52124
52143
  );
52125
52144
  const activeState = activeMode === "guide" ? sseState : mingoStateOverride ?? natsState;
52126
- const activeStateRef = useRef76(activeState);
52145
+ const activeStateRef = useRef77(activeState);
52127
52146
  activeStateRef.current = activeState;
52128
52147
  const stopMessage = useCallback54(() => activeStateRef.current.stopMessage(), []);
52129
52148
  const clearMessages = useCallback54(
@@ -52478,7 +52497,7 @@ function buildStreamFrames(messages) {
52478
52497
 
52479
52498
  // src/components/chat/embeddable-chat.tsx
52480
52499
  init_cn();
52481
- 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";
52482
52501
  import * as DialogPrimitive4 from "@radix-ui/react-dialog";
52483
52502
  import { usePreventScroll as usePreventScroll6 } from "@react-aria/overlays";
52484
52503
  import { isIOS } from "@react-aria/utils";
@@ -52559,7 +52578,7 @@ init_button2();
52559
52578
  import { FileText as FileText8, MessageSquare as MessageSquare3 } from "lucide-react";
52560
52579
 
52561
52580
  // src/components/chat/hooks/use-chat-dialog-manager.ts
52562
- 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";
52563
52582
  function useChatDialogManager({
52564
52583
  dialogs,
52565
52584
  activeDialogId,
@@ -52570,8 +52589,8 @@ function useChatDialogManager({
52570
52589
  fetchArchivedDialogs,
52571
52590
  unarchiveDialog
52572
52591
  }) {
52573
- const [renameTarget, setRenameTarget] = useState118(null);
52574
- const [archiveTarget, setArchiveTarget] = useState118(null);
52592
+ const [renameTarget, setRenameTarget] = useState119(null);
52593
+ const [archiveTarget, setArchiveTarget] = useState119(null);
52575
52594
  const handleConfirmRename = useCallback55(
52576
52595
  (name) => {
52577
52596
  if (renameTarget) void renameDialog(renameTarget.id, name);
@@ -52594,12 +52613,12 @@ function useChatDialogManager({
52594
52613
  }
52595
52614
  setArchiveTarget(null);
52596
52615
  }, [archiveTarget, archiveDialog, activeDialogId, clearMessages]);
52597
- const [archiveOpen, setArchiveOpen] = useState118(false);
52598
- const [archivedDialogs, setArchivedDialogs] = useState118([]);
52599
- const [archivedCursor, setArchivedCursor] = useState118(null);
52600
- const [archivedLoading, setArchivedLoading] = useState118(false);
52601
- const [archivedPending, setArchivedPending] = useState118(false);
52602
- 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);
52603
52622
  const loadArchivedPage = useCallback55(
52604
52623
  async (cursor) => {
52605
52624
  if (!fetchArchivedDialogs) return;
@@ -52640,10 +52659,10 @@ function useChatDialogManager({
52640
52659
  void loadArchivedPage();
52641
52660
  }, [loadArchivedPage]);
52642
52661
  const closeArchive = useCallback55(() => setArchiveOpen(false), []);
52643
- const [viewingArchivedId, setViewingArchivedId] = useState118(
52662
+ const [viewingArchivedId, setViewingArchivedId] = useState119(
52644
52663
  null
52645
52664
  );
52646
- const [openingDialogId, setOpeningDialogId] = useState118(null);
52665
+ const [openingDialogId, setOpeningDialogId] = useState119(null);
52647
52666
  const handleSelectDialog = useCallback55(
52648
52667
  (id) => {
52649
52668
  setViewingArchivedId(null);
@@ -52662,7 +52681,7 @@ function useChatDialogManager({
52662
52681
  },
52663
52682
  [selectDialog]
52664
52683
  );
52665
- const [restoreTarget, setRestoreTarget] = useState118(null);
52684
+ const [restoreTarget, setRestoreTarget] = useState119(null);
52666
52685
  const handleConfirmRestore = useCallback55(async () => {
52667
52686
  if (restoreTarget) {
52668
52687
  try {
@@ -52755,9 +52774,9 @@ var SPLIT_MIN_WIDTH = HISTORY_RAIL_WIDTH + CHAT_BLOCK_MIN_WIDTH;
52755
52774
  var RAIL_COLLAPSED_STORAGE_KEY = "mingo-chat-history-collapsed";
52756
52775
  var RAIL_ANIM_MS = 320;
52757
52776
  function useRailPresence(open) {
52758
- const [mounted, setMounted] = useState119(open);
52759
- const [active, setActive] = useState119(false);
52760
- useEffect89(() => {
52777
+ const [mounted, setMounted] = useState120(open);
52778
+ const [active, setActive] = useState120(false);
52779
+ useEffect90(() => {
52761
52780
  if (open) {
52762
52781
  setMounted(true);
52763
52782
  let raf2 = 0;
@@ -52975,7 +52994,7 @@ function SourceChips({
52975
52994
  onClose,
52976
52995
  onDiscuss
52977
52996
  }) {
52978
- const [expanded, setExpanded] = useState119(false);
52997
+ const [expanded, setExpanded] = useState120(false);
52979
52998
  if (cited.length === 0) {
52980
52999
  const fallback = uncited.slice(0, FALLBACK_TOP_RETRIEVED);
52981
53000
  if (fallback.length === 0) return null;
@@ -53082,7 +53101,7 @@ function EmbeddableChatInner({
53082
53101
  const commandsUrl = runtime.endpoints.commandsUrl;
53083
53102
  const { attachmentsEnabled, user: identityUser } = useChatIdentity();
53084
53103
  const viewUrlPrefix = runtime.endpoints.attachmentViewUrlPrefix;
53085
- useEffect89(() => {
53104
+ useEffect90(() => {
53086
53105
  if (process.env.NODE_ENV !== "production") {
53087
53106
  const hasOpen = open !== void 0;
53088
53107
  const hasHandler = onOpenChange !== void 0;
@@ -53098,13 +53117,13 @@ function EmbeddableChatInner({
53098
53117
  defaultProp: defaultOpen ?? false,
53099
53118
  onChange: onOpenChange
53100
53119
  });
53101
- const [autoFocusInput] = useState119(() => {
53120
+ const [autoFocusInput] = useState120(() => {
53102
53121
  if (typeof window === "undefined") return false;
53103
53122
  return !window.matchMedia("(pointer: coarse)").matches;
53104
53123
  });
53105
53124
  usePreventScroll6({ isDisabled: !isOpen || shellLess });
53106
- const navigatingAwayRef = useRef78(false);
53107
- useEffect89(() => {
53125
+ const navigatingAwayRef = useRef79(false);
53126
+ useEffect90(() => {
53108
53127
  if (!isOpen) return;
53109
53128
  if (shellLess) return;
53110
53129
  if (typeof window === "undefined") return;
@@ -53130,8 +53149,8 @@ function EmbeddableChatInner({
53130
53149
  window.scrollTo(0, scrollY);
53131
53150
  };
53132
53151
  }, [isOpen, shellLess]);
53133
- const chatInputRef = useRef78(null);
53134
- const [quickActionPreview, setQuickActionPreview] = useState119(null);
53152
+ const chatInputRef = useRef79(null);
53153
+ const [quickActionPreview, setQuickActionPreview] = useState120(null);
53135
53154
  const slashCommandsProp = useMemo49(
53136
53155
  () => ({
53137
53156
  fetchCommands: (prefix, signal) => fetchSlashCommands(prefix, signal, commandsUrl),
@@ -53174,7 +53193,7 @@ function EmbeddableChatInner({
53174
53193
  }, [mingoState, mingoDialogCapabilities, effectiveModes]);
53175
53194
  const hasMingoMode = !!effectiveModes.mingo || !!mingoState;
53176
53195
  const initialActiveMode = controlledActiveMode ?? defaultActiveMode ?? (effectiveModes.guide ? "guide" : "mingo");
53177
- const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState119(initialActiveMode);
53196
+ const [uncontrolledActiveMode, setUncontrolledActiveMode] = useState120(initialActiveMode);
53178
53197
  const activeMode = controlledActiveMode ?? uncontrolledActiveMode;
53179
53198
  const handleActiveModeChange = useCallback56(
53180
53199
  (next) => {
@@ -53234,8 +53253,8 @@ function EmbeddableChatInner({
53234
53253
  hasMoreMessages,
53235
53254
  loadMoreMessages
53236
53255
  } = useUnifiedChat({ modes: effectiveModes, activeMode, mingoStateOverride: mingoState });
53237
- const guidePromptSentRef = useRef78(false);
53238
- useEffect89(() => {
53256
+ const guidePromptSentRef = useRef79(false);
53257
+ useEffect90(() => {
53239
53258
  if (!guidePendingPrompt) {
53240
53259
  guidePromptSentRef.current = false;
53241
53260
  return;
@@ -53256,15 +53275,15 @@ function EmbeddableChatInner({
53256
53275
  const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
53257
53276
  const contextMaxItems = contextPicker?.maxItems ?? 10;
53258
53277
  const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
53259
- const [contextItems, setContextItems] = useState119([]);
53260
- const [contextPickerOpen, setContextPickerOpen] = useState119(false);
53261
- const [mentionQuery, setMentionQuery] = useState119(null);
53262
- const mentionActiveRef = useRef78(false);
53263
- 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(() => {
53264
53283
  mentionActiveRef.current = mentionQuery !== null;
53265
53284
  }, [mentionQuery]);
53266
- const mentionKeysRef = useRef78(/* @__PURE__ */ new Set());
53267
- useEffect89(() => {
53285
+ const mentionKeysRef = useRef79(/* @__PURE__ */ new Set());
53286
+ useEffect90(() => {
53268
53287
  setContextItems([]);
53269
53288
  setMentionQuery(null);
53270
53289
  mentionKeysRef.current.clear();
@@ -53360,7 +53379,7 @@ function EmbeddableChatInner({
53360
53379
  () => effectiveAssistantIcon ? /* @__PURE__ */ jsx362(EntityIcon, { icon: effectiveAssistantIcon, size: 24 }) : /* @__PURE__ */ jsx362(MingoIcon, { className: "h-6 w-6", cornerColor: "var(--ods-flamingo-cyan-base)" }),
53361
53380
  [effectiveAssistantIcon]
53362
53381
  );
53363
- const timestampCacheRef = useRef78(/* @__PURE__ */ new Map());
53382
+ const timestampCacheRef = useRef79(/* @__PURE__ */ new Map());
53364
53383
  const guideUserName = activeMode === "guide" ? [identityUser?.firstName, identityUser?.lastName].filter(Boolean).join(" ").trim() || identityUser?.name?.trim() || void 0 : void 0;
53365
53384
  const guideUserAvatar = activeMode === "guide" ? identityUser?.avatarUrl?.trim() || void 0 : void 0;
53366
53385
  const messages = useMemo49(() => {
@@ -53487,7 +53506,7 @@ function EmbeddableChatInner({
53487
53506
  });
53488
53507
  const handleOpen = useCallback56(() => setIsOpen(true), [setIsOpen]);
53489
53508
  useCloseOnNavigation(handleNavigationClose, null);
53490
- useEffect89(() => {
53509
+ useEffect90(() => {
53491
53510
  const handler = (e) => {
53492
53511
  const detail = e.detail;
53493
53512
  if (!detail || detail.source !== source) return;
@@ -53497,7 +53516,7 @@ function EmbeddableChatInner({
53497
53516
  window.addEventListener("ask-ai:open-with-ref", handler);
53498
53517
  return () => window.removeEventListener("ask-ai:open-with-ref", handler);
53499
53518
  }, [source, discussRef, setIsOpen]);
53500
- useEffect89(() => {
53519
+ useEffect90(() => {
53501
53520
  const handler = (e) => {
53502
53521
  const detail = e.detail;
53503
53522
  if (!detail || detail.source !== source) return;
@@ -53514,7 +53533,7 @@ function EmbeddableChatInner({
53514
53533
  const contentViewKey = hasConversation ? "conversation" : activeMode;
53515
53534
  const isGuideEmpty = !hasConversation && activeMode === "guide";
53516
53535
  const isQuickActionEmpty = !hasConversation && (activeMode === "guide" || activeMode === "mingo");
53517
- useEffect89(() => {
53536
+ useEffect90(() => {
53518
53537
  if (!isQuickActionEmpty) setQuickActionPreview(null);
53519
53538
  }, [isQuickActionEmpty]);
53520
53539
  const guideCanReturnToMingo = isGuideEmpty && hasMingoMode;
@@ -53556,10 +53575,10 @@ function EmbeddableChatInner({
53556
53575
  const uncited = sources.filter((s) => !seenOrder.has(s.index));
53557
53576
  return { cited, uncited };
53558
53577
  }, [lastAssistantMsg, chatLoading]);
53559
- const [portalHost, setPortalHost] = useState119(null);
53560
- const [panelWidth, setPanelWidth] = useState119(0);
53561
- const panelMeasureRef = useRef78(null);
53562
- useEffect89(() => {
53578
+ const [portalHost, setPortalHost] = useState120(null);
53579
+ const [panelWidth, setPanelWidth] = useState120(0);
53580
+ const panelMeasureRef = useRef79(null);
53581
+ useEffect90(() => {
53563
53582
  const el = panelMeasureRef.current;
53564
53583
  if (!el || typeof ResizeObserver === "undefined") return;
53565
53584
  const ro = new ResizeObserver((entries) => {
@@ -53570,8 +53589,8 @@ function EmbeddableChatInner({
53570
53589
  setPanelWidth(el.clientWidth);
53571
53590
  return () => ro.disconnect();
53572
53591
  }, []);
53573
- const [railCollapsed, setRailCollapsed] = useState119(false);
53574
- useEffect89(() => {
53592
+ const [railCollapsed, setRailCollapsed] = useState120(false);
53593
+ useEffect90(() => {
53575
53594
  try {
53576
53595
  if (window.localStorage.getItem(RAIL_COLLAPSED_STORAGE_KEY) === "1")
53577
53596
  setRailCollapsed(true);
@@ -53588,15 +53607,15 @@ function EmbeddableChatInner({
53588
53607
  return next;
53589
53608
  });
53590
53609
  }, []);
53591
- const [railSearchOpen, setRailSearchOpen] = useState119(false);
53610
+ const [railSearchOpen, setRailSearchOpen] = useState120(false);
53592
53611
  const splitEligible = activeMode === "mingo";
53593
53612
  const canSplit = panelWidth >= SPLIT_MIN_WIDTH;
53594
53613
  const wideMingo = splitEligible && canSplit && !previewMode;
53595
53614
  const splitActive = wideMingo && !railCollapsed;
53596
53615
  const railPresence = useRailPresence(splitActive);
53597
53616
  const showWideHeader = wideMingo || railPresence.mounted;
53598
- const [composeOpen, setComposeOpen] = useState119(false);
53599
- useEffect89(() => {
53617
+ const [composeOpen, setComposeOpen] = useState120(false);
53618
+ useEffect90(() => {
53600
53619
  if (hasConversation) setComposeOpen(false);
53601
53620
  }, [hasConversation]);
53602
53621
  const isMingoMode = activeMode === "mingo";
@@ -55116,4 +55135,4 @@ export {
55116
55135
  LogsList,
55117
55136
  assets
55118
55137
  };
55119
- //# sourceMappingURL=chunk-XFH7PMGS.js.map
55138
+ //# sourceMappingURL=chunk-KUVFE5WC.js.map