@flamingo-stack/openframe-frontend-core 0.0.813 → 0.0.815

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 (80) hide show
  1. package/README.md +26 -5
  2. package/dist/build/export-map.json +1 -1
  3. package/dist/build/next-styles.cjs +170 -0
  4. package/dist/build/next-styles.d.ts +21 -0
  5. package/dist/build/style-sources.cjs +262 -0
  6. package/dist/build/style-sources.d.ts +12 -0
  7. package/dist/{chunk-OGHG6REG.cjs → chunk-3E4FIJAM.cjs} +9 -9
  8. package/dist/{chunk-G2AN67DP.cjs → chunk-3ELDGEM2.cjs} +53 -53
  9. package/dist/{chunk-FTGXZHLO.cjs → chunk-53JJLHJM.cjs} +7 -7
  10. package/dist/{chunk-GNGXHIBC.cjs → chunk-5TUR7O7H.cjs} +48 -48
  11. package/dist/{chunk-5M5JVVSL.cjs → chunk-633NTKO2.cjs} +6 -6
  12. package/dist/{chunk-5RBL7A2Y.cjs → chunk-7ERD34HQ.cjs} +539 -291
  13. package/dist/{chunk-GTOT4ZQV.cjs → chunk-7NYWHEQM.cjs} +2 -2
  14. package/dist/{chunk-PXR27MXW.cjs → chunk-EB7YAUER.cjs} +11 -11
  15. package/dist/{chunk-TOBROYSJ.cjs → chunk-EJCUAADF.cjs} +4 -4
  16. package/dist/{chunk-MBU45QUB.cjs → chunk-FUEK43FL.cjs} +109 -142
  17. package/dist/{chunk-JFA3VHXC.cjs → chunk-JH65CEO4.cjs} +19 -19
  18. package/dist/{chunk-2WD7XGWA.cjs → chunk-JOOZTRXQ.cjs} +4 -4
  19. package/dist/{chunk-MUH7X7ZA.cjs → chunk-L7W4455K.cjs} +3 -3
  20. package/dist/{chunk-XWCZSEW7.cjs → chunk-O6VWD2SB.cjs} +3 -3
  21. package/dist/{chunk-WKODIG3L.cjs → chunk-RYJJHSHV.cjs} +10 -10
  22. package/dist/{chunk-7BJ22OH2.cjs → chunk-SWBLTIN4.cjs} +32 -32
  23. package/dist/{chunk-5V3CNLCB.cjs → chunk-VDXI26G7.cjs} +22 -18
  24. package/dist/{chunk-EJQRX6S5.cjs → chunk-ZAWHRYJZ.cjs} +39 -39
  25. package/dist/{cloud-tenants-ODZVCP5X.cjs → cloud-tenants-SRTX2FZC.cjs} +4 -4
  26. package/dist/components/case-studies/index.cjs +16 -16
  27. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  28. package/dist/components/chat/chat-message-enhanced.js +8 -1
  29. package/dist/components/chat/embeddable-chat.d.ts +6 -0
  30. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  31. package/dist/components/chat/embeddable-chat.js +34 -2
  32. package/dist/components/chat/entity-cards/chat-card-disclosure.d.ts +93 -0
  33. package/dist/components/chat/entity-cards/chat-card-disclosure.d.ts.map +1 -0
  34. package/dist/components/chat/entity-cards/chat-card-disclosure.js +126 -0
  35. package/dist/components/chat/entity-cards/dispatch.d.ts +5 -0
  36. package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
  37. package/dist/components/chat/entity-cards/dispatch.js +82 -55
  38. package/dist/components/chat/entity-cards/index.d.ts +1 -0
  39. package/dist/components/chat/entity-cards/index.d.ts.map +1 -1
  40. package/dist/components/chat/entity-cards/index.js +14 -0
  41. package/dist/components/chat/index.cjs +19 -3
  42. package/dist/components/chat/index.d.ts +1 -0
  43. package/dist/components/chat/index.d.ts.map +1 -1
  44. package/dist/components/chat/index.js +7 -0
  45. package/dist/components/chat/inline-app-link-chip.d.ts +35 -0
  46. package/dist/components/chat/inline-app-link-chip.d.ts.map +1 -0
  47. package/dist/components/chat/inline-app-link-chip.js +37 -0
  48. package/dist/components/chat/source-action-button.d.ts +15 -1
  49. package/dist/components/chat/source-action-button.d.ts.map +1 -1
  50. package/dist/components/chat/source-action-button.js +40 -2
  51. package/dist/components/contact/index.cjs +5 -5
  52. package/dist/components/docs/index.cjs +8 -8
  53. package/dist/components/embeds/index.cjs +5 -5
  54. package/dist/components/faq/index.cjs +6 -6
  55. package/dist/components/features/index.cjs +4 -4
  56. package/dist/components/help-center-pages/index.cjs +61 -61
  57. package/dist/components/index.cjs +56 -40
  58. package/dist/components/meeting-scheduler/index.cjs +29 -29
  59. package/dist/components/navigation/index.cjs +7 -7
  60. package/dist/components/onboarding-guides/index.cjs +6 -6
  61. package/dist/components/product-demo/index.cjs +13 -13
  62. package/dist/components/tickets/index.cjs +9 -9
  63. package/dist/components/ui/index.cjs +22 -6
  64. package/dist/{devices-GWBR7MJD.cjs → devices-DL4YU64N.cjs} +5 -5
  65. package/dist/{embeddable-chat-4RLUXHDH.cjs → embeddable-chat-YRKMPFDY.cjs} +95 -62
  66. package/dist/index.cjs +26 -10
  67. package/dist/{knowledge-ZNRITHW5.cjs → knowledge-VQW5JL2Z.cjs} +5 -5
  68. package/dist/{logs-QN5H5JT6.cjs → logs-IY3WBLMW.cjs} +12 -12
  69. package/dist/{policies-SCUYEYGJ.cjs → policies-IXWTWMJO.cjs} +8 -8
  70. package/dist/{scripts-BP7UTAG5.cjs → scripts-D5CLO5EG.cjs} +9 -9
  71. package/dist/{software-update-O4BQJCJ4.cjs → software-update-ULNP6CKJ.cjs} +7 -7
  72. package/package.json +17 -2
  73. package/src/components/chat/chat-message-enhanced.tsx +24 -1
  74. package/src/components/chat/embeddable-chat.tsx +67 -1
  75. package/src/components/chat/entity-cards/chat-card-disclosure.tsx +233 -0
  76. package/src/components/chat/entity-cards/dispatch.tsx +104 -63
  77. package/src/components/chat/entity-cards/index.ts +9 -0
  78. package/src/components/chat/index.ts +7 -1
  79. package/src/components/chat/inline-app-link-chip.tsx +79 -0
  80. package/src/components/chat/source-action-button.tsx +53 -2
@@ -98,6 +98,9 @@ var _chunk37SGOMF5cjs = require('./chunk-37SGOMF5.cjs');
98
98
  var _chunkGZ6NU2C2cjs = require('./chunk-GZ6NU2C2.cjs');
99
99
 
100
100
 
101
+ var _chunk3JLYHTN6cjs = require('./chunk-3JLYHTN6.cjs');
102
+
103
+
101
104
  var _chunkEETTUAAFcjs = require('./chunk-EETTUAAF.cjs');
102
105
 
103
106
 
@@ -209,6 +212,9 @@ var _chunkSJOMW55Ccjs = require('./chunk-SJOMW55C.cjs');
209
212
  var _chunkM4KPLFFAcjs = require('./chunk-M4KPLFFA.cjs');
210
213
 
211
214
 
215
+ var _chunkRD4RFX3Kcjs = require('./chunk-RD4RFX3K.cjs');
216
+
217
+
212
218
  var _chunkKFICYKQQcjs = require('./chunk-KFICYKQQ.cjs');
213
219
 
214
220
 
@@ -393,6 +399,7 @@ var _chunk2XCORRJVcjs = require('./chunk-2XCORRJV.cjs');
393
399
 
394
400
 
395
401
 
402
+
396
403
  var _chunk3TOWCFIKcjs = require('./chunk-3TOWCFIK.cjs');
397
404
 
398
405
 
@@ -489,6 +496,37 @@ var TabsContent = _react.forwardRef.call(void 0, ({ className, ...props }, ref)
489
496
  ));
490
497
  TabsContent.displayName = TabsPrimitive.Content.displayName;
491
498
 
499
+ // src/components/ui/layout-hold.tsx
500
+
501
+ var ROUNDED_BAR = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='6'/%3E%3C/svg%3E")`;
502
+ var BAR_MASK = `${ROUNDED_BAR} center / 100% min(1em, calc(1lh - 6px)) no-repeat`;
503
+ var BAR_STYLE = { mask: BAR_MASK, WebkitMask: BAR_MASK };
504
+ function TextHold({ children, variant = "bar", className }) {
505
+ const bar = variant === "bar";
506
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
507
+ "span",
508
+ {
509
+ "aria-hidden": true,
510
+ className: _chunk63A4GZMBcjs.cn.call(void 0,
511
+ // `bar`: the words themselves, unseen, on the skeleton's surface. The span stays INLINE, so the
512
+ // browser paints one bar per line the words take, each exactly as wide as that line, and
513
+ // `box-decoration-clone` gives every line its own bar (and its own mask, `BAR_STYLE`). Pure CSS: it
514
+ // is drawn in the server's HTML, before any script runs (a loading state streamed by the server
515
+ // is often replaced before it hydrates).
516
+ bar ? _chunk63A4GZMBcjs.cn.call(void 0, _chunk3TOWCFIKcjs.SKELETON_SURFACE_CLASS, "rounded-md box-decoration-clone text-transparent") : "invisible",
517
+ // A hold is never selectable or clickable, whatever it wraps.
518
+ "pointer-events-none select-none",
519
+ className
520
+ ),
521
+ style: bar ? BAR_STYLE : void 0,
522
+ children
523
+ }
524
+ );
525
+ }
526
+ function LayoutHold({ children, className }) {
527
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { "aria-hidden": true, inert: true, className: _chunk63A4GZMBcjs.cn.call(void 0, "invisible", className), children });
528
+ }
529
+
492
530
  // src/utils/markdown-link.ts
493
531
  var AUTHORED_LINK_REL_TOKENS = ["nofollow", "ugc", "sponsored"];
494
532
  var NEW_TAB_REL = "noopener noreferrer";
@@ -4209,7 +4247,7 @@ function QuickActionChipFromData({
4209
4247
 
4210
4248
  function SuggestionsDisplay({ segment }) {
4211
4249
  const panel = useChatPanel();
4212
- const pick = _nullishCoalesce(segment.onPick, () => ( _optionalChain([panel, 'optionalAccess', _67 => _67.sendPrompt])));
4250
+ const pick2 = _nullishCoalesce(segment.onPick, () => ( _optionalChain([panel, 'optionalAccess', _67 => _67.sendPrompt])));
4213
4251
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col gap-[var(--spacing-system-sf)]", children: [
4214
4252
  segment.groups.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col gap-[var(--spacing-system-xs)]", children: [
4215
4253
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-h5", children: group.label }),
@@ -4219,7 +4257,7 @@ function SuggestionsDisplay({ segment }) {
4219
4257
  variant: "question",
4220
4258
  label: prompt.label,
4221
4259
  icon: prompt.icon,
4222
- onSelect: pick ? () => pick(_nullishCoalesce(prompt.prompt, () => ( prompt.label))) : void 0
4260
+ onSelect: pick2 ? () => pick2(_nullishCoalesce(prompt.prompt, () => ( prompt.label))) : void 0
4223
4261
  },
4224
4262
  prompt.label
4225
4263
  )) })
@@ -5036,6 +5074,36 @@ function BlockCard(_props) {
5036
5074
  return null;
5037
5075
  }
5038
5076
 
5077
+ // src/components/chat/inline-app-link-chip.tsx
5078
+
5079
+ var INLINE_CHIP_CLASS = "max-w-[16rem] align-middle [&_svg]:size-4 [&_svg]:text-ods-text-secondary hover:border-ods-border";
5080
+ function InlineChip({
5081
+ icon,
5082
+ label,
5083
+ className,
5084
+ loading
5085
+ }) {
5086
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5087
+ _chunkBOS7OIC4cjs.Tag,
5088
+ {
5089
+ as: "span",
5090
+ variant: "badge",
5091
+ icon,
5092
+ label,
5093
+ loading,
5094
+ className: _chunk63A4GZMBcjs.cn.call(void 0, INLINE_CHIP_CLASS, className)
5095
+ }
5096
+ );
5097
+ }
5098
+ function InlineAppLinkChip({
5099
+ href,
5100
+ children,
5101
+ anchor: Anchor
5102
+ }) {
5103
+ const chip = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InlineChip, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkRD4RFX3Kcjs.BrowserWindowIcon, {}), label: children, className: "hover:bg-ods-bg-hover" });
5104
+ return Anchor ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Anchor, { href, className: "no-underline", children: chip }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkV45KLJQPcjs.next_link_default, { href, className: "no-underline", children: chip });
5105
+ }
5106
+
5039
5107
  // src/components/chat/remark-card-links.ts
5040
5108
 
5041
5109
 
@@ -5447,6 +5515,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
5447
5515
  }, [renderingPlan]);
5448
5516
  const renderingPlanRef = _react.useRef.call(void 0, renderingPlan);
5449
5517
  renderingPlanRef.current = renderingPlan;
5518
+ const chatRuntime = _chunkUJ7AXHRZcjs.useChatRuntime.call(void 0, );
5450
5519
  const cardComponentOverrides = _react.useMemo.call(void 0, () => {
5451
5520
  if (!hasMarkerSupport && !hasMentionSupport) return void 0;
5452
5521
  return {
@@ -5477,13 +5546,16 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
5477
5546
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary opacity-60", children: cardId });
5478
5547
  }
5479
5548
  }
5549
+ if (typeof href === "string" && !href.startsWith("#") && chatRuntime && !_chunkY6MJMPHVcjs.computeIsNewTab.call(void 0, chatRuntime, href, null)) {
5550
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InlineAppLinkChip, { href, anchor: NavLinkAnchor, children });
5551
+ }
5480
5552
  if (typeof href === "string" && NavLinkAnchor && !href.startsWith("#")) {
5481
5553
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NavLinkAnchor, { href, className: linkClassName, ...rest, children });
5482
5554
  }
5483
5555
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkV45KLJQPcjs.next_link_default, { href, className: linkClassName, ...rest, children });
5484
5556
  }
5485
5557
  };
5486
- }, [hasMarkerSupport, hasMentionSupport, renderMention, NavLinkAnchor]);
5558
+ }, [hasMarkerSupport, hasMentionSupport, renderMention, NavLinkAnchor, chatRuntime]);
5487
5559
  const renderSegmentBody = (segIndex, text2, isStreaming) => {
5488
5560
  const parts = _optionalChain([renderingPlan, 'optionalAccess', _99 => _99.partsBySegment, 'access', _100 => _100.get, 'call', _101 => _101(segIndex)]);
5489
5561
  if (!parts || parts.length === 0) {
@@ -9927,6 +9999,7 @@ function NavLinkAnchorViaRuntime({
9927
9999
  // src/components/chat/source-action-button.tsx
9928
10000
 
9929
10001
 
10002
+ var CARD_FOOTER_ACTION_CLASS = "!h-auto !p-0 text-h6 font-normal text-ods-text-secondary opacity-60 hover:bg-transparent hover:opacity-100 hover:text-ods-text-primary";
9930
10003
  var DENSITY_STYLES = {
9931
10004
  inline: {
9932
10005
  size: "icon",
@@ -9938,7 +10011,7 @@ var DENSITY_STYLES = {
9938
10011
  size: "small",
9939
10012
  showLabel: true,
9940
10013
  iconSize: "!h-3 !w-3",
9941
- className: "!h-auto !p-0 text-h6 font-normal text-ods-text-secondary opacity-60 hover:bg-transparent hover:opacity-100 hover:text-ods-text-primary"
10014
+ className: CARD_FOOTER_ACTION_CLASS
9942
10015
  },
9943
10016
  "list-row": {
9944
10017
  size: "small",
@@ -9947,14 +10020,46 @@ var DENSITY_STYLES = {
9947
10020
  className: "!h-auto !px-1.5 !py-0.5 text-h6 font-normal text-ods-text-secondary opacity-60 hover:opacity-100 hover:text-ods-text-primary hover:bg-ods-accent/10"
9948
10021
  }
9949
10022
  };
10023
+ function FooterActionSkeleton({
10024
+ label,
10025
+ className,
10026
+ showLabel = true,
10027
+ size = "small"
10028
+ }) {
10029
+ const icon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunk63A4GZMBcjs.cn.call(void 0, _chunk3TOWCFIKcjs.SKELETON_SURFACE_CLASS, "inline-block h-3 w-3 rounded-sm") });
10030
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "aria-hidden": true, inert: true, className: "contents", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
10031
+ _chunkFCZAUK4Dcjs.Button,
10032
+ {
10033
+ variant: "transparent",
10034
+ size,
10035
+ tabIndex: -1,
10036
+ leftIcon: showLabel ? icon : void 0,
10037
+ className: _chunk63A4GZMBcjs.cn.call(void 0, className, "pointer-events-none"),
10038
+ children: showLabel ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TextHold, { children: label }) : icon
10039
+ }
10040
+ ) });
10041
+ }
9950
10042
  function SourceActionButton({
9951
10043
  chatRef,
9952
10044
  onDiscuss,
9953
10045
  density = "inline",
9954
10046
  className,
9955
- label = "Ask"
10047
+ label = "Ask",
10048
+ loading
9956
10049
  }) {
9957
10050
  if (!chatRef || !onDiscuss) return null;
10051
+ if (loading) {
10052
+ const s = DENSITY_STYLES[density];
10053
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
10054
+ FooterActionSkeleton,
10055
+ {
10056
+ label,
10057
+ size: s.size,
10058
+ showLabel: s.showLabel,
10059
+ className: `${s.className}${className ? ` ${className}` : ""}`
10060
+ }
10061
+ );
10062
+ }
9958
10063
  const isDisplay = label === "Display";
9959
10064
  const verbLabel = isDisplay ? `Display ${chatRef.title || "this item"}` : `Ask about ${chatRef.title || "this item"}`;
9960
10065
  const handle = (e) => {
@@ -11153,11 +11258,124 @@ function ChatVideoEntityCard({ chatRef }) {
11153
11258
  );
11154
11259
  }
11155
11260
 
11261
+ // src/components/chat/entity-cards/chat-card-disclosure.tsx
11262
+
11263
+
11264
+ var CHAT_CARD_DISCLOSURE = {
11265
+ VIDEO: "VIDEO"
11266
+ };
11267
+ function pick(...values) {
11268
+ for (const v of values) if (typeof v === "string" && v.length > 0) return v;
11269
+ return void 0;
11270
+ }
11271
+ function videoFromItem(item, chatRef) {
11272
+ const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess', _246 => _246.metadata]), () => ( {}));
11273
+ const out = {};
11274
+ const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess', _247 => _247.custom_video_url]), _optionalChain([item, 'optionalAccess', _248 => _248.main_video_url]));
11275
+ const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess', _249 => _249.youtube_url]), _optionalChain([item, 'optionalAccess', _250 => _250.testimonial_video_url]));
11276
+ const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess', _251 => _251.highlight_video_url]));
11277
+ const videoPoster = pick(
11278
+ m.videoPoster,
11279
+ _optionalChain([item, 'optionalAccess', _252 => _252.main_video_thumbnail]),
11280
+ _optionalChain([item, 'optionalAccess', _253 => _253.highlight_video_thumbnail]),
11281
+ _optionalChain([item, 'optionalAccess', _254 => _254.featured_image])
11282
+ );
11283
+ const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess', _255 => _255.highlight_video_thumbnail]));
11284
+ if (videoUrl) out.videoUrl = videoUrl;
11285
+ if (youtubeUrl) out.youtubeUrl = youtubeUrl;
11286
+ if (highlightVideoUrl) out.highlightVideoUrl = highlightVideoUrl;
11287
+ if (videoPoster) out.videoPoster = videoPoster;
11288
+ if (highlightVideoPoster) out.highlightVideoPoster = highlightVideoPoster;
11289
+ if (!out.videoUrl && !out.youtubeUrl && !out.highlightVideoUrl) return null;
11290
+ return { ...chatRef, metadata: { ..._nullishCoalesce(chatRef.metadata, () => ( {})), ...out } };
11291
+ }
11292
+ var CHAT_CARD_DISCLOSURES = {
11293
+ VIDEO: {
11294
+ label: "Watch video",
11295
+ openLabel: "Hide video",
11296
+ icon: _chunk3JLYHTN6cjs.PlayIcon,
11297
+ fromItem: videoFromItem,
11298
+ render: (chatRef) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatVideoEntityCard, { chatRef })
11299
+ }
11300
+ };
11301
+ function chatCardDisclosureOf(item, chatRef) {
11302
+ for (const kind of Object.values(CHAT_CARD_DISCLOSURE)) {
11303
+ const content = CHAT_CARD_DISCLOSURES[kind].fromItem(item, chatRef);
11304
+ if (content) return { kind, content };
11305
+ }
11306
+ return null;
11307
+ }
11308
+ function ChatCardDisclosureButton({
11309
+ kind,
11310
+ open = false,
11311
+ onToggle,
11312
+ title,
11313
+ loading
11314
+ }) {
11315
+ const spec = CHAT_CARD_DISCLOSURES[kind];
11316
+ if (loading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FooterActionSkeleton, { label: spec.label, className: CARD_FOOTER_ACTION_CLASS });
11317
+ const label = open ? spec.openLabel : spec.label;
11318
+ const Icon = spec.icon;
11319
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
11320
+ _chunkFCZAUK4Dcjs.Button,
11321
+ {
11322
+ variant: "transparent",
11323
+ size: "small",
11324
+ leftIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Icon, { className: "!h-3 !w-3" }),
11325
+ rightIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkOBQ5WUNGcjs.ExpandChevron, { expanded: open, className: "!h-3 !w-3" }),
11326
+ onClick: (e) => {
11327
+ e.preventDefault();
11328
+ e.stopPropagation();
11329
+ _optionalChain([onToggle, 'optionalCall', _256 => _256()]);
11330
+ },
11331
+ "aria-expanded": open,
11332
+ "aria-label": title ? `${label}: ${title}` : label,
11333
+ className: CARD_FOOTER_ACTION_CLASS,
11334
+ children: label
11335
+ }
11336
+ );
11337
+ }
11338
+ function DisclosurePanel({ open, children }) {
11339
+ const { innerRef, containerStyle } = _chunkOBQ5WUNGcjs.useCollapsible.call(void 0, { expanded: open });
11340
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: containerStyle, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: innerRef, children }) });
11341
+ }
11342
+ function useChatCardDisclosure(kind, chatRef, { reserve = false } = {}) {
11343
+ const [open, setOpen] = _react.useState.call(void 0, false);
11344
+ const [mounted, setMounted] = _react.useState.call(void 0, false);
11345
+ if (!chatRef) {
11346
+ return {
11347
+ action: reserve ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { "aria-hidden": true, inert: true, className: "invisible", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatCardDisclosureButton, { kind }) }) : null,
11348
+ panel: null
11349
+ };
11350
+ }
11351
+ const toggle = () => {
11352
+ if (!open) setMounted(true);
11353
+ setOpen((o) => !o);
11354
+ };
11355
+ return {
11356
+ action: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatCardDisclosureButton, { kind, open, onToggle: toggle, title: chatRef.title }),
11357
+ panel: mounted ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { "data-testid": "chat-card-disclosure-panel", onTransitionEnd: () => !open && setMounted(false), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DisclosurePanel, { open, children: CHAT_CARD_DISCLOSURES[kind].render(chatRef) }) }) : null
11358
+ };
11359
+ }
11360
+ function ChatCardDisclosureRow({
11361
+ kind,
11362
+ chatRef
11363
+ }) {
11364
+ const { action, panel } = useChatCardDisclosure(kind, chatRef);
11365
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid min-w-0 grid-cols-1 gap-3", children: [
11366
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 pl-0.5", children: [
11367
+ action,
11368
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 truncate text-ods-text-secondary text-h6", children: chatRef.title })
11369
+ ] }),
11370
+ panel
11371
+ ] });
11372
+ }
11373
+
11156
11374
  // src/components/chat/entity-cards/design-doc-card.tsx
11157
11375
 
11158
11376
  function designDocPeople(doc) {
11159
11377
  const people = [];
11160
- if (_optionalChain([doc, 'access', _246 => _246.author, 'optionalAccess', _247 => _247.full_name]))
11378
+ if (_optionalChain([doc, 'access', _257 => _257.author, 'optionalAccess', _258 => _258.full_name]))
11161
11379
  people.push({
11162
11380
  key: `dri-${_nullishCoalesce(doc.author.id, () => ( doc.author.full_name))}`,
11163
11381
  name: doc.author.full_name,
@@ -11170,7 +11388,7 @@ function designDocPeople(doc) {
11170
11388
  return people;
11171
11389
  }
11172
11390
  function designDocMetaLine(doc) {
11173
- return [_optionalChain([doc, 'access', _248 => _248.author, 'optionalAccess', _249 => _249.full_name]) ? `DRI ${doc.author.full_name}` : null, `updated ${_chunkGAR2IIU6cjs.formatDateShort.call(void 0, doc.updated_at)}`].filter(Boolean).join(" \xB7 ");
11391
+ return [_optionalChain([doc, 'access', _259 => _259.author, 'optionalAccess', _260 => _260.full_name]) ? `DRI ${doc.author.full_name}` : null, `updated ${_chunkGAR2IIU6cjs.formatDateShort.call(void 0, doc.updated_at)}`].filter(Boolean).join(" \xB7 ");
11174
11392
  }
11175
11393
  var DESIGN_DOC_CARD_BODY = "flex h-full flex-col gap-[var(--spacing-system-mf)] p-[var(--spacing-system-lf)]";
11176
11394
  var DESIGN_DOC_CARD_HEADER = "flex w-full items-center gap-[16px]";
@@ -11439,8 +11657,8 @@ function getVendorLogo(vendor) {
11439
11657
  if (vendor.logo) {
11440
11658
  return fixSupabaseStorageUrl(vendor.logo);
11441
11659
  }
11442
- const logoMedia = _optionalChain([vendor, 'access', _250 => _250.vendor_media, 'optionalAccess', _251 => _251.find, 'call', _252 => _252((m) => m.media_type === "logo")]);
11443
- if (_optionalChain([logoMedia, 'optionalAccess', _253 => _253.media_url])) {
11660
+ const logoMedia = _optionalChain([vendor, 'access', _261 => _261.vendor_media, 'optionalAccess', _262 => _262.find, 'call', _263 => _263((m) => m.media_type === "logo")]);
11661
+ if (_optionalChain([logoMedia, 'optionalAccess', _264 => _264.media_url])) {
11444
11662
  return fixSupabaseStorageUrl(logoMedia.media_url);
11445
11663
  }
11446
11664
  return null;
@@ -11688,7 +11906,7 @@ function pickFetchedCardHref({
11688
11906
  itemHref,
11689
11907
  allowComposed
11690
11908
  }) {
11691
- if (_optionalChain([composed, 'optionalAccess', _254 => _254.hostOverride])) {
11909
+ if (_optionalChain([composed, 'optionalAccess', _265 => _265.hostOverride])) {
11692
11910
  return { source: "hostOverride", href: composed.href, targetPlatform: composed.targetPlatform };
11693
11911
  }
11694
11912
  if (itemHref) return { source: "item", href: itemHref };
@@ -11750,7 +11968,7 @@ function resolveSourceRowCTA(row, ctx = {}) {
11750
11968
  if (row.path && shouldFallbackToPathNav(row) && !row.externalUrl) {
11751
11969
  const safePath = sanitizePath(row.path);
11752
11970
  if (safePath) {
11753
- const docTarget = row.documentType ? _optionalChain([ctx, 'access', _255 => _255.docPlatformTargets, 'optionalAccess', _256 => _256[row.documentType]]) : void 0;
11971
+ const docTarget = row.documentType ? _optionalChain([ctx, 'access', _266 => _266.docPlatformTargets, 'optionalAccess', _267 => _267[row.documentType]]) : void 0;
11754
11972
  if (docTarget) {
11755
11973
  const seg = docTarget.basePath.split("/").filter(Boolean).join("/");
11756
11974
  const base = `${getPlatformUrl(docTarget.platform)}${seg ? `/${seg}` : ""}/`;
@@ -11819,7 +12037,7 @@ function resolveCardDestination({
11819
12037
  composeContentUrl,
11820
12038
  resolveHref = (href) => href
11821
12039
  }) {
11822
- const refPath = typeof _optionalChain([chatRef, 'access', _257 => _257.metadata, 'optionalAccess', _258 => _258.path]) === "string" && chatRef.metadata.path ? chatRef.metadata.path : null;
12040
+ const refPath = typeof _optionalChain([chatRef, 'access', _268 => _268.metadata, 'optionalAccess', _269 => _269.path]) === "string" && chatRef.metadata.path ? chatRef.metadata.path : null;
11823
12041
  const path = _nullishCoalesce(refPath, () => ( (item ? readFetchedCardPath(item) : null)));
11824
12042
  const cta = resolveSourceRowCTA(
11825
12043
  {
@@ -11836,7 +12054,7 @@ function resolveCardDestination({
11836
12054
  const rowUrl = cta.href ? resolveHref(cta.href) : _nullishCoalesce(chatRef.url, () => ( null));
11837
12055
  const rowPlatform = _nullishCoalesce(_nullishCoalesce(cta.targetPlatform, () => ( chatRef.targetPlatform)), () => ( null));
11838
12056
  if (rowUrl) return { url: rowUrl, targetPlatform: rowPlatform, path, source: "row" };
11839
- if (_optionalChain([entry, 'optionalAccess', _259 => _259.contentRefType]) && item) {
12057
+ if (_optionalChain([entry, 'optionalAccess', _270 => _270.contentRefType]) && item) {
11840
12058
  const choice = pickFetchedCardHref({
11841
12059
  composed: resolveFetchedCardHref({
11842
12060
  contentRefType: entry.contentRefType,
@@ -11844,7 +12062,7 @@ function resolveCardDestination({
11844
12062
  item,
11845
12063
  composeContentUrl
11846
12064
  }),
11847
- itemHref: _nullishCoalesce(_optionalChain([entry, 'access', _260 => _260.fallbackHref, 'optionalCall', _261 => _261(item)]), () => ( null)),
12065
+ itemHref: _nullishCoalesce(_optionalChain([entry, 'access', _271 => _271.fallbackHref, 'optionalCall', _272 => _272(item)]), () => ( null)),
11848
12066
  allowComposed: !entry.noComposedHref
11849
12067
  });
11850
12068
  const url = choice ? _nullishCoalesce(_chunkY6MJMPHVcjs.safeHref.call(void 0, choice.href), () => ( null)) : null;
@@ -11938,8 +12156,8 @@ function cardMenuGroups(href, discuss, openDetails, externalLink) {
11938
12156
  if (href) {
11939
12157
  items.push({
11940
12158
  id: "open-details",
11941
- label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _262 => _262.label]), () => ( "Open Details")),
11942
- icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _263 => _263.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMLT7ASAcjs.EyeIcon, { size: 20 }))),
12159
+ label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _273 => _273.label]), () => ( "Open Details")),
12160
+ icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _274 => _274.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMLT7ASAcjs.EyeIcon, { size: 20 }))),
11943
12161
  // Main row → open the entity (same tab, soft Link nav).
11944
12162
  href,
11945
12163
  // Trailing 40px ↗ side-button → open in a new tab.
@@ -11994,30 +12212,6 @@ function decodeVideoMarkerId(id) {
11994
12212
  if (/^[A-Za-z0-9_-]{11}$/.test(id)) return { youtubeUrl: id };
11995
12213
  return null;
11996
12214
  }
11997
- function itemVideoMetadata(item) {
11998
- const pick = (...vals) => {
11999
- for (const v of vals) if (typeof v === "string" && v.length > 0) return v;
12000
- return void 0;
12001
- };
12002
- const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess', _264 => _264.metadata]), () => ( {}));
12003
- const out = {};
12004
- const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess', _265 => _265.custom_video_url]), _optionalChain([item, 'optionalAccess', _266 => _266.main_video_url]));
12005
- const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess', _267 => _267.youtube_url]), _optionalChain([item, 'optionalAccess', _268 => _268.testimonial_video_url]));
12006
- const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess', _269 => _269.highlight_video_url]));
12007
- const videoPoster = pick(
12008
- m.videoPoster,
12009
- _optionalChain([item, 'optionalAccess', _270 => _270.main_video_thumbnail]),
12010
- _optionalChain([item, 'optionalAccess', _271 => _271.highlight_video_thumbnail]),
12011
- _optionalChain([item, 'optionalAccess', _272 => _272.featured_image])
12012
- );
12013
- const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess', _273 => _273.highlight_video_thumbnail]));
12014
- if (videoUrl) out.videoUrl = videoUrl;
12015
- if (youtubeUrl) out.youtubeUrl = youtubeUrl;
12016
- if (highlightVideoUrl) out.highlightVideoUrl = highlightVideoUrl;
12017
- if (videoPoster) out.videoPoster = videoPoster;
12018
- if (highlightVideoPoster) out.highlightVideoPoster = highlightVideoPoster;
12019
- return out.videoUrl || out.youtubeUrl || out.highlightVideoUrl ? out : null;
12020
- }
12021
12215
  function CardLoadFailure({ label, id, detail }) {
12022
12216
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12023
12217
  MingoInfoCard,
@@ -12040,15 +12234,15 @@ function fetchedItemDisplayRef(item, chatRef) {
12040
12234
  }
12041
12235
  function fetchedFaqDisplayRef(item, chatRef) {
12042
12236
  const it = item;
12043
- const answer = typeof _optionalChain([it, 'optionalAccess', _274 => _274.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
12237
+ const answer = typeof _optionalChain([it, 'optionalAccess', _275 => _275.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
12044
12238
  return {
12045
12239
  type: "faq",
12046
12240
  id: chatRef.id,
12047
12241
  sourceRepo: chatRef.sourceRepo,
12048
- title: typeof _optionalChain([it, 'optionalAccess', _275 => _275.question]) === "string" && it.question ? it.question : chatRef.id,
12242
+ title: typeof _optionalChain([it, 'optionalAccess', _276 => _276.question]) === "string" && it.question ? it.question : chatRef.id,
12049
12243
  url: _nullishCoalesce(chatRef.url, () => ( null)),
12050
12244
  ...answer ? { preview: answer.length > 400 ? `${answer.slice(0, 397)}\u2026` : answer } : {},
12051
- metadata: typeof _optionalChain([it, 'optionalAccess', _276 => _276.section]) === "string" && it.section ? { section: it.section } : {}
12245
+ metadata: typeof _optionalChain([it, 'optionalAccess', _277 => _277.section]) === "string" && it.section ? { section: it.section } : {}
12052
12246
  };
12053
12247
  }
12054
12248
  function HubspotTicketChatCard({
@@ -12056,8 +12250,8 @@ function HubspotTicketChatCard({
12056
12250
  isNewTab,
12057
12251
  discuss
12058
12252
  }) {
12059
- const status = typeof _optionalChain([chatRef, 'access', _277 => _277.metadata, 'optionalAccess', _278 => _278.status]) === "string" ? chatRef.metadata.status : void 0;
12060
- const statusLabel = typeof _optionalChain([chatRef, 'access', _279 => _279.metadata, 'optionalAccess', _280 => _280.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
12253
+ const status = typeof _optionalChain([chatRef, 'access', _278 => _278.metadata, 'optionalAccess', _279 => _279.status]) === "string" ? chatRef.metadata.status : void 0;
12254
+ const statusLabel = typeof _optionalChain([chatRef, 'access', _280 => _280.metadata, 'optionalAccess', _281 => _281.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
12061
12255
  const statusText = _nullishCoalesce(statusLabel, () => ( formatStatusToken(status)));
12062
12256
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12063
12257
  MingoInfoCard,
@@ -12080,7 +12274,7 @@ function FaqChatCard({
12080
12274
  isNewTab,
12081
12275
  discuss
12082
12276
  }) {
12083
- const section = typeof _optionalChain([chatRef, 'access', _281 => _281.metadata, 'optionalAccess', _282 => _282.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
12277
+ const section = typeof _optionalChain([chatRef, 'access', _282 => _282.metadata, 'optionalAccess', _283 => _283.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
12084
12278
  const statusLabel = section && section.length > 0 ? section : "FAQ";
12085
12279
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12086
12280
  MingoInfoCard,
@@ -12100,7 +12294,7 @@ function SlackChatCard({
12100
12294
  isNewTab,
12101
12295
  discuss
12102
12296
  }) {
12103
- const channelName = typeof _optionalChain([chatRef, 'access', _283 => _283.metadata, 'optionalAccess', _284 => _284.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
12297
+ const channelName = typeof _optionalChain([chatRef, 'access', _284 => _284.metadata, 'optionalAccess', _285 => _285.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
12104
12298
  const channelPretty = channelName ? channelName.startsWith("#") ? channelName : `#${channelName}` : void 0;
12105
12299
  const title = channelPretty ? `${chatRef.title} \xB7 ${channelPretty}` : chatRef.title;
12106
12300
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -12143,7 +12337,7 @@ function TrustCenterChatCard({
12143
12337
  isNewTab,
12144
12338
  discuss
12145
12339
  }) {
12146
- const raw2 = _optionalChain([item, 'optionalAccess', _285 => _285.frameworks]);
12340
+ const raw2 = _optionalChain([item, 'optionalAccess', _286 => _286.frameworks]);
12147
12341
  const frameworks = Array.isArray(raw2) ? raw2 : [];
12148
12342
  const summary = _chunkGAR2IIU6cjs.trustFrameworksSummary.call(void 0, frameworks);
12149
12343
  const leadFramework = frameworks[0];
@@ -12192,7 +12386,7 @@ function GenericFinancialChatCard({
12192
12386
  isNewTab,
12193
12387
  discuss
12194
12388
  }) {
12195
- const subtitle = typeof _optionalChain([chatRef, 'access', _286 => _286.metadata, 'optionalAccess', _287 => _287.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
12389
+ const subtitle = typeof _optionalChain([chatRef, 'access', _287 => _287.metadata, 'optionalAccess', _288 => _288.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
12196
12390
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12197
12391
  MingoInfoCard,
12198
12392
  {
@@ -12217,6 +12411,8 @@ function ChatCardWithDiscuss({
12217
12411
  onDiscuss,
12218
12412
  onDisplay,
12219
12413
  displayAction,
12414
+ footerAction,
12415
+ loading,
12220
12416
  children
12221
12417
  }) {
12222
12418
  const { Icon: SourceIcon, label: sourceLabel } = resolveSourceIcon({
@@ -12229,16 +12425,19 @@ function ChatCardWithDiscuss({
12229
12425
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "mb-2 mt-1.5 block w-full", children: [
12230
12426
  cardBody,
12231
12427
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "mt-1 flex items-center justify-between gap-2 pl-0.5", children: [
12232
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12233
- SourceActionButton,
12234
- {
12235
- chatRef,
12236
- onDiscuss: useDisplay ? onDisplay : onDiscuss,
12237
- label: useDisplay ? "Display" : void 0,
12238
- density: "card"
12239
- }
12240
- ),
12241
- !onDiscuss && !useDisplay ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", {}) : null,
12428
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-3", children: [
12429
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12430
+ SourceActionButton,
12431
+ {
12432
+ chatRef,
12433
+ onDiscuss: useDisplay ? onDisplay : onDiscuss,
12434
+ label: useDisplay ? "Display" : void 0,
12435
+ density: "card",
12436
+ loading
12437
+ }
12438
+ ),
12439
+ footerAction
12440
+ ] }),
12242
12441
  idDisplay ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
12243
12442
  "span",
12244
12443
  {
@@ -12261,12 +12460,12 @@ function ProductReleaseChatCard({
12261
12460
  discuss
12262
12461
  }) {
12263
12462
  const releaseProps = buildProps(item);
12264
- const status = _optionalChain([item, 'optionalAccess', _288 => _288.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
12463
+ const status = _optionalChain([item, 'optionalAccess', _289 => _289.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
12265
12464
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12266
12465
  EntityMingoCard,
12267
12466
  {
12268
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _289 => _289.title]), () => ( "")),
12269
- description: _optionalChain([item, 'optionalAccess', _290 => _290.summary]) || releaseProps.formattedDate || void 0,
12467
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _290 => _290.title]), () => ( "")),
12468
+ description: _optionalChain([item, 'optionalAccess', _291 => _291.summary]) || releaseProps.formattedDate || void 0,
12270
12469
  cover: releaseProps.coverImage || void 0,
12271
12470
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX5LU4XQNcjs.Rocket02Icon, { size: 24 }),
12272
12471
  status,
@@ -12283,17 +12482,17 @@ function CampaignChatCard({
12283
12482
  isNewTab,
12284
12483
  discuss
12285
12484
  }) {
12286
- const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _291 => _291.goals])) ? item.goals.length : 0;
12485
+ const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _292 => _292.goals])) ? item.goals.length : 0;
12287
12486
  const meta = [
12288
- _optionalChain([item, 'optionalAccess', _292 => _292.start_date]) ? _chunkGAR2IIU6cjs.formatDateShort.call(void 0, item.start_date) : null,
12487
+ _optionalChain([item, 'optionalAccess', _293 => _293.start_date]) ? _chunkGAR2IIU6cjs.formatDateShort.call(void 0, item.start_date) : null,
12289
12488
  goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
12290
12489
  "Marketing campaign"
12291
12490
  ].filter(Boolean).join(" \xB7 ");
12292
12491
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12293
12492
  EntityMingoCard,
12294
12493
  {
12295
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _293 => _293.name]), () => ( "")),
12296
- description: meta || _optionalChain([item, 'optionalAccess', _294 => _294.description]) || void 0,
12494
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _294 => _294.name]), () => ( "")),
12495
+ description: meta || _optionalChain([item, 'optionalAccess', _295 => _295.description]) || void 0,
12297
12496
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6OCFDC2Qcjs.Megaphone01Icon, { size: 24 }),
12298
12497
  chatRef,
12299
12498
  isNewTab,
@@ -12348,14 +12547,14 @@ function BlogChatCard({
12348
12547
  hasEmbeddedVideo,
12349
12548
  discuss
12350
12549
  }) {
12351
- const category = Array.isArray(_optionalChain([item, 'optionalAccess', _295 => _295.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _296 => _296.categories, 'access', _297 => _297.find, 'call', _298 => _298((c) => _optionalChain([c, 'optionalAccess', _299 => _299.name])), 'optionalAccess', _300 => _300.name]), () => ( void 0)) : void 0;
12550
+ const category = Array.isArray(_optionalChain([item, 'optionalAccess', _296 => _296.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _297 => _297.categories, 'access', _298 => _298.find, 'call', _299 => _299((c) => _optionalChain([c, 'optionalAccess', _300 => _300.name])), 'optionalAccess', _301 => _301.name]), () => ( void 0)) : void 0;
12352
12551
  const status = hasEmbeddedVideo ? { label: "Video", variant: "primary" } : category ? { label: category, variant: "grey" } : void 0;
12353
12552
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12354
12553
  EntityMingoCard,
12355
12554
  {
12356
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _301 => _301.title]), () => ( "")),
12357
- description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _302 => _302.summary]), () => ( void 0)),
12358
- cover: entityCover(_optionalChain([item, 'optionalAccess', _303 => _303.featured_image]), ogPlaceholder),
12555
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _302 => _302.title]), () => ( "")),
12556
+ description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _303 => _303.summary]), () => ( void 0)),
12557
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _304 => _304.featured_image]), ogPlaceholder),
12359
12558
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEAPORE6cjs.NewspaperIcon, { size: 24 }),
12360
12559
  status,
12361
12560
  chatRef,
@@ -12372,13 +12571,13 @@ function CaseStudyChatCard({
12372
12571
  ogPlaceholder,
12373
12572
  discuss
12374
12573
  }) {
12375
- const meta = [_optionalChain([item, 'optionalAccess', _304 => _304.msp, 'optionalAccess', _305 => _305.name]), _optionalChain([item, 'optionalAccess', _306 => _306.user, 'optionalAccess', _307 => _307.full_name])].filter(Boolean).join(" \xB7 ");
12574
+ const meta = [_optionalChain([item, 'optionalAccess', _305 => _305.msp, 'optionalAccess', _306 => _306.name]), _optionalChain([item, 'optionalAccess', _307 => _307.user, 'optionalAccess', _308 => _308.full_name])].filter(Boolean).join(" \xB7 ");
12376
12575
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12377
12576
  EntityMingoCard,
12378
12577
  {
12379
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _308 => _308.title]), () => ( "")),
12380
- description: _optionalChain([item, 'optionalAccess', _309 => _309.summary]) || meta || void 0,
12381
- cover: entityCover(_optionalChain([item, 'optionalAccess', _310 => _310.featured_image]), ogPlaceholder),
12578
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _309 => _309.title]), () => ( "")),
12579
+ description: _optionalChain([item, 'optionalAccess', _310 => _310.summary]) || meta || void 0,
12580
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _311 => _311.featured_image]), ogPlaceholder),
12382
12581
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk44URXY24cjs.TrophyIcon, { size: 24 }),
12383
12582
  status: { label: "Case study", variant: "grey" },
12384
12583
  chatRef,
@@ -12395,13 +12594,13 @@ function CustomerInterviewChatCard({
12395
12594
  ogPlaceholder,
12396
12595
  discuss
12397
12596
  }) {
12398
- const meta = [_optionalChain([item, 'optionalAccess', _311 => _311.user, 'optionalAccess', _312 => _312.full_name]), _optionalChain([item, 'optionalAccess', _313 => _313.msp, 'optionalAccess', _314 => _314.name])].filter(Boolean).join(" \xB7 ");
12597
+ const meta = [_optionalChain([item, 'optionalAccess', _312 => _312.user, 'optionalAccess', _313 => _313.full_name]), _optionalChain([item, 'optionalAccess', _314 => _314.msp, 'optionalAccess', _315 => _315.name])].filter(Boolean).join(" \xB7 ");
12399
12598
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12400
12599
  EntityMingoCard,
12401
12600
  {
12402
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _315 => _315.title]), () => ( "")),
12403
- description: _optionalChain([item, 'optionalAccess', _316 => _316.video_summary]) || meta || void 0,
12404
- cover: entityCover(_optionalChain([item, 'optionalAccess', _317 => _317.featured_image]), ogPlaceholder),
12601
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _316 => _316.title]), () => ( "")),
12602
+ description: _optionalChain([item, 'optionalAccess', _317 => _317.video_summary]) || meta || void 0,
12603
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _318 => _318.featured_image]), ogPlaceholder),
12405
12604
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZL4LQNYXcjs.MicrophoneIcon, { size: 24 }),
12406
12605
  status: { label: "Interview", variant: "grey" },
12407
12606
  chatRef,
@@ -12418,12 +12617,12 @@ function DesignDocChatCard({
12418
12617
  discuss
12419
12618
  }) {
12420
12619
  const displayRef = fetchedItemDisplayRef(item, chatRef);
12421
- const doc = _optionalChain([item, 'optionalAccess', _318 => _318.doc]);
12620
+ const doc = _optionalChain([item, 'optionalAccess', _319 => _319.doc]);
12422
12621
  const readiness = doc ? DESIGN_DOC_READINESS_DISPLAY[designDocReadiness(doc.completion)] : null;
12423
12622
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12424
12623
  MingoInfoCard,
12425
12624
  {
12426
- title: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _319 => _319.title]), () => ( displayRef.title)),
12625
+ title: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _320 => _320.title]), () => ( displayRef.title)),
12427
12626
  description: doc ? [designDocMetaLine(doc), formatCompletionLabel(doc.completion)].join(" \xB7 ") : _nullishCoalesce(displayRef.preview, () => ( void 0)),
12428
12627
  icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU4USZF42cjs.FileContentIcon, { size: 24 }),
12429
12628
  status: readiness ? { label: readiness.label, variant: readiness.scheme === "success" ? "success" : "grey" } : { label: "Design doc", variant: "grey" },
@@ -12440,13 +12639,13 @@ function InvestorUpdateChatCard({
12440
12639
  ogPlaceholder,
12441
12640
  discuss
12442
12641
  }) {
12443
- const title = _optionalChain([item, 'optionalAccess', _320 => _320.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _321 => _321.update_number]), () => ( "?"))}`;
12642
+ const title = _optionalChain([item, 'optionalAccess', _321 => _321.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _322 => _322.update_number]), () => ( "?"))}`;
12444
12643
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12445
12644
  EntityMingoCard,
12446
12645
  {
12447
12646
  title,
12448
- description: _optionalChain([item, 'optionalAccess', _322 => _322.strategic_update]) || _optionalChain([item, 'optionalAccess', _323 => _323.content]) || _chunkGAR2IIU6cjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _324 => _324.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _325 => _325.period_end]), () => ( null))) || void 0,
12449
- cover: entityCover(_optionalChain([item, 'optionalAccess', _326 => _326.featured_image]), ogPlaceholder),
12647
+ description: _optionalChain([item, 'optionalAccess', _323 => _323.strategic_update]) || _optionalChain([item, 'optionalAccess', _324 => _324.content]) || _chunkGAR2IIU6cjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _325 => _325.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _326 => _326.period_end]), () => ( null))) || void 0,
12648
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _327 => _327.featured_image]), ogPlaceholder),
12450
12649
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk37SGOMF5cjs.PresentationLineIcon, { size: 24 }),
12451
12650
  status: { label: "Investor update", variant: "grey" },
12452
12651
  chatRef,
@@ -12463,12 +12662,12 @@ function OnboardingGuideChatCard({
12463
12662
  ogPlaceholder,
12464
12663
  discuss
12465
12664
  }) {
12466
- const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _327 => _327.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _328 => _328.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _329 => _329.og_image_url]), ogPlaceholder)));
12665
+ const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _328 => _328.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _329 => _329.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _330 => _330.og_image_url]), ogPlaceholder)));
12467
12666
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12468
12667
  EntityMingoCard,
12469
12668
  {
12470
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _330 => _330.title]), () => ( "")),
12471
- description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _331 => _331.summary]), () => ( _optionalChain([item, 'optionalAccess', _332 => _332.description]))), () => ( void 0)),
12669
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _331 => _331.title]), () => ( "")),
12670
+ description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _332 => _332.summary]), () => ( _optionalChain([item, 'optionalAccess', _333 => _333.description]))), () => ( void 0)),
12472
12671
  cover,
12473
12672
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZFJDLJSIcjs.CompassIcon, { size: 24 }),
12474
12673
  status: { label: "Guide", variant: "grey" },
@@ -12493,9 +12692,9 @@ function ProgramChatCard({
12493
12692
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12494
12693
  EntityMingoCard,
12495
12694
  {
12496
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _333 => _333.title]), () => ( "")),
12497
- description: meta || _optionalChain([item, 'optionalAccess', _334 => _334.description]) || void 0,
12498
- cover: entityCover(_optionalChain([item, 'optionalAccess', _335 => _335.cover_url]), ogPlaceholder),
12695
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _334 => _334.title]), () => ( "")),
12696
+ description: meta || _optionalChain([item, 'optionalAccess', _335 => _335.description]) || void 0,
12697
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _336 => _336.cover_url]), ogPlaceholder),
12499
12698
  fallbackIcon: icon,
12500
12699
  status: { label, variant: "grey" },
12501
12700
  chatRef,
@@ -12512,10 +12711,10 @@ function RoadmapChatCard({
12512
12711
  cardType,
12513
12712
  discuss
12514
12713
  }) {
12515
- const logoUrl = typeof _optionalChain([item, 'optionalAccess', _336 => _336.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
12516
- const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _337 => _337.customItemId]) != null;
12714
+ const logoUrl = typeof _optionalChain([item, 'optionalAccess', _337 => _337.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
12715
+ const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _338 => _338.customItemId]) != null;
12517
12716
  const defaultIcon = cardType === "delivery_item" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk3UIJR4PYcjs.TruckFastIcon, { size: 24 }) : cardType === "internal_task" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6DN5HKRWcjs.CheckSquareIcon, { size: 24 }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMQDSQKK2cjs.MapIcon, { size: 24 });
12518
- const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGAR2IIU6cjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _338 => _338.customItemId]), className: "size-6" }) : logoUrl ? (
12717
+ const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGAR2IIU6cjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _339 => _339.customItemId]), className: "size-6" }) : logoUrl ? (
12519
12718
  // Contained (not full-bleed) so the integration logo keeps its aspect
12520
12719
  // ratio inside the bordered icon box — matches RoadmapCard.
12521
12720
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -12536,10 +12735,10 @@ function RoadmapChatCard({
12536
12735
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12537
12736
  EntityMingoCard,
12538
12737
  {
12539
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _339 => _339.title]), () => ( "")),
12540
- description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _340 => _340.description]), () => ( void 0)),
12738
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _340 => _340.title]), () => ( "")),
12739
+ description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _341 => _341.description]), () => ( void 0)),
12541
12740
  fallbackIcon: icon,
12542
- status: statusPill(_optionalChain([item, 'optionalAccess', _341 => _341.status])),
12741
+ status: statusPill(_optionalChain([item, 'optionalAccess', _342 => _342.status])),
12543
12742
  chatRef,
12544
12743
  isNewTab,
12545
12744
  discuss,
@@ -12555,7 +12754,7 @@ function refHydratedEntry(docType, label, renderRef) {
12555
12754
  bareInline: true,
12556
12755
  contentRefType: docType,
12557
12756
  noComposedHref: true,
12558
- fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _342 => _342.url]), () => ( null)),
12757
+ fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _343 => _343.url]), () => ( null)),
12559
12758
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCard, { loading: true, title: "" }),
12560
12759
  render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts)
12561
12760
  };
@@ -12587,7 +12786,7 @@ function financialRegistryEntries() {
12587
12786
  );
12588
12787
  }
12589
12788
  function refText(ref, key) {
12590
- const value = _optionalChain([ref, 'optionalAccess', _343 => _343[key]]);
12789
+ const value = _optionalChain([ref, 'optionalAccess', _344 => _344[key]]);
12591
12790
  return typeof value === "string" && value.length > 0 ? value : null;
12592
12791
  }
12593
12792
  function VendorGlyph({ title, logoUrl }) {
@@ -12633,7 +12832,7 @@ var REF_GLYPH_CARD_CONFIGS = {
12633
12832
  // rate. A glyph card; it opens the pricing page.
12634
12833
  openframe_price: { label: "OpenFrame price" },
12635
12834
  // A vendor (product) of the OpenMSP directory. A glyph card; it opens the vendor's page there.
12636
- vendor: { label: "Vendor", icon: (ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, VendorGlyph, { title: _nullishCoalesce(_optionalChain([ref, 'optionalAccess', _344 => _344.title]), () => ( "")), logoUrl: refText(ref, "logo_url") }) }
12835
+ vendor: { label: "Vendor", icon: (ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, VendorGlyph, { title: _nullishCoalesce(_optionalChain([ref, 'optionalAccess', _345 => _345.title]), () => ( "")), logoUrl: refText(ref, "logo_url") }) }
12637
12836
  };
12638
12837
  function sourceGlyph(docType) {
12639
12838
  const { Icon } = resolveSourceIcon({ sourceRepo: defaultTableIdForDocumentType(docType), documentType: docType });
@@ -12652,8 +12851,8 @@ function refGlyphRegistryEntries() {
12652
12851
  title: displayRef.title,
12653
12852
  description: _nullishCoalesce(displayRef.preview, () => ( void 0)),
12654
12853
  cover: entityCover(
12655
- _optionalChain([displayRef, 'access', _345 => _345.metadata, 'optionalAccess', _346 => _346.videoPoster]),
12656
- _nullishCoalesce(_optionalChain([opts, 'access', _347 => _347.extras, 'optionalAccess', _348 => _348.buildOgPlaceholderUrl, 'optionalCall', _349 => _349(_nullishCoalesce(displayRef.title, () => ( "")))]), () => ( null))
12854
+ _optionalChain([displayRef, 'access', _346 => _346.metadata, 'optionalAccess', _347 => _347.videoPoster]),
12855
+ _nullishCoalesce(_optionalChain([opts, 'access', _348 => _348.extras, 'optionalAccess', _349 => _349.buildOgPlaceholderUrl, 'optionalCall', _350 => _350(_nullishCoalesce(displayRef.title, () => ( "")))]), () => ( null))
12657
12856
  ),
12658
12857
  fallbackIcon: glyph(displayRef),
12659
12858
  status: { label: cfg.label, variant: "grey" },
@@ -12668,9 +12867,9 @@ function refGlyphRegistryEntries() {
12668
12867
  }
12669
12868
  function fetchedEmployeeEntryDisplayRef(item, chatRef) {
12670
12869
  const it = item;
12671
- const title = typeof _optionalChain([it, 'optionalAccess', _350 => _350.title]) === "string" && it.title.trim().length > 0 ? it.title.trim() : chatRef.title;
12672
- const author = typeof _optionalChain([it, 'optionalAccess', _351 => _351.author, 'optionalAccess', _352 => _352.full_name]) === "string" ? it.author.full_name.trim() : "";
12673
- const summary = typeof _optionalChain([it, 'optionalAccess', _353 => _353.summary]) === "string" ? it.summary.trim() : "";
12870
+ const title = typeof _optionalChain([it, 'optionalAccess', _351 => _351.title]) === "string" && it.title.trim().length > 0 ? it.title.trim() : chatRef.title;
12871
+ const author = typeof _optionalChain([it, 'optionalAccess', _352 => _352.author, 'optionalAccess', _353 => _353.full_name]) === "string" ? it.author.full_name.trim() : "";
12872
+ const summary = typeof _optionalChain([it, 'optionalAccess', _354 => _354.summary]) === "string" ? it.summary.trim() : "";
12674
12873
  const preview = [author, summary].filter((x) => x.length > 0).join(" \xB7 ");
12675
12874
  return { ...chatRef, title, preview: preview.length > 0 ? preview : chatRef.preview };
12676
12875
  }
@@ -12703,8 +12902,18 @@ function githubRegistryEntries() {
12703
12902
  );
12704
12903
  }
12705
12904
  var PROGRAM_CARD_CONFIGS = {
12706
- podcast: { label: "Podcast episode", configKey: "podcast", contentRefType: "podcast" },
12707
- webinar: { label: "Webinar", configKey: "webinar", contentRefType: "webinar" },
12905
+ podcast: {
12906
+ label: "Podcast episode",
12907
+ configKey: "podcast",
12908
+ contentRefType: "podcast",
12909
+ disclosure: CHAT_CARD_DISCLOSURE.VIDEO
12910
+ },
12911
+ webinar: {
12912
+ label: "Webinar",
12913
+ configKey: "webinar",
12914
+ contentRefType: "webinar",
12915
+ disclosure: CHAT_CARD_DISCLOSURE.VIDEO
12916
+ },
12708
12917
  event: { label: "Event", configKey: "event", contentRefType: "event" }
12709
12918
  };
12710
12919
  function programRegistryEntries() {
@@ -12712,6 +12921,7 @@ function programRegistryEntries() {
12712
12921
  label: cfg.label,
12713
12922
  contentRefType: cfg.contentRefType,
12714
12923
  bareInline: true,
12924
+ disclosure: cfg.disclosure,
12715
12925
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGAR2IIU6cjs.ProgramCard, { loading: true, size: "sm" }),
12716
12926
  render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12717
12927
  ProgramChatCard,
@@ -12722,7 +12932,7 @@ function programRegistryEntries() {
12722
12932
  discuss: opts.discuss,
12723
12933
  configKey: cfg.configKey,
12724
12934
  label: cfg.configKey.charAt(0).toUpperCase() + cfg.configKey.slice(1),
12725
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _354 => _354.extras, 'optionalAccess', _355 => _355.buildOgPlaceholderUrl, 'optionalCall', _356 => _356(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _357 => _357.title]), () => ( "")))]), () => ( null))
12935
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _355 => _355.extras, 'optionalAccess', _356 => _356.buildOgPlaceholderUrl, 'optionalCall', _357 => _357(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _358 => _358.title]), () => ( "")))]), () => ( null))
12726
12936
  }
12727
12937
  )
12728
12938
  }));
@@ -12743,7 +12953,7 @@ var ROADMAP_CARD_CONFIGS = {
12743
12953
  // The card's destination IS the ClickUp deep link, derived from the
12744
12954
  // task id post-fetch (the refs frame used to carry it).
12745
12955
  noComposedHref: true,
12746
- fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _358 => _358.id]) != null ? clickupTaskUrl(String(item.id)) : null
12956
+ fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _359 => _359.id]) != null ? clickupTaskUrl(String(item.id)) : null
12747
12957
  }
12748
12958
  };
12749
12959
  function roadmapRegistryEntries() {
@@ -12785,8 +12995,8 @@ var CHAT_CARD_REGISTRY = {
12785
12995
  DeletedDataCard,
12786
12996
  {
12787
12997
  title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : null,
12788
- entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _359 => _359.metadata, 'optionalAccess', _360 => _360.entity_label]), () => ( null)),
12789
- recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _361 => _361.metadata, 'optionalAccess', _362 => _362.recovery_note]), () => ( null))
12998
+ entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _360 => _360.metadata, 'optionalAccess', _361 => _361.entity_label]), () => ( null)),
12999
+ recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _362 => _362.metadata, 'optionalAccess', _363 => _363.recovery_note]), () => ( null))
12790
13000
  }
12791
13001
  )
12792
13002
  },
@@ -12803,7 +13013,7 @@ var CHAT_CARD_REGISTRY = {
12803
13013
  bareInline: true,
12804
13014
  contentRefType: "faq",
12805
13015
  noComposedHref: true,
12806
- fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _363 => _363.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
13016
+ fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _364 => _364.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
12807
13017
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCard, { loading: true, title: "" }),
12808
13018
  render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FaqChatCard, { chatRef: fetchedFaqDisplayRef(item, chatRef), isNewTab: opts.isNewTab, discuss: opts.discuss })
12809
13019
  },
@@ -12850,12 +13060,13 @@ var CHAT_CARD_REGISTRY = {
12850
13060
  chatRef,
12851
13061
  isNewTab: opts.isNewTab,
12852
13062
  discuss: opts.discuss,
12853
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _364 => _364.extras, 'optionalAccess', _365 => _365.buildOgPlaceholderUrl, 'optionalCall', _366 => _366(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _367 => _367.title]), () => ( "")))]), () => ( null)),
12854
- hasEmbeddedVideo: _optionalChain([chatRef, 'access', _368 => _368.metadata, 'optionalAccess', _369 => _369.hasEmbeddedVideo]) === true
13063
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _365 => _365.extras, 'optionalAccess', _366 => _366.buildOgPlaceholderUrl, 'optionalCall', _367 => _367(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _368 => _368.title]), () => ( "")))]), () => ( null)),
13064
+ hasEmbeddedVideo: _optionalChain([chatRef, 'access', _369 => _369.metadata, 'optionalAccess', _370 => _370.hasEmbeddedVideo]) === true
12855
13065
  }
12856
13066
  )
12857
13067
  },
12858
13068
  case_study: {
13069
+ disclosure: CHAT_CARD_DISCLOSURE.VIDEO,
12859
13070
  label: "Case study",
12860
13071
  contentRefType: "case_study",
12861
13072
  bareInline: true,
@@ -12867,7 +13078,7 @@ var CHAT_CARD_REGISTRY = {
12867
13078
  chatRef,
12868
13079
  isNewTab: opts.isNewTab,
12869
13080
  discuss: opts.discuss,
12870
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _370 => _370.extras, 'optionalAccess', _371 => _371.buildOgPlaceholderUrl, 'optionalCall', _372 => _372(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _373 => _373.title]), () => ( "")))]), () => ( null))
13081
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _371 => _371.extras, 'optionalAccess', _372 => _372.buildOgPlaceholderUrl, 'optionalCall', _373 => _373(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _374 => _374.title]), () => ( "")))]), () => ( null))
12871
13082
  }
12872
13083
  )
12873
13084
  },
@@ -12876,11 +13087,12 @@ var CHAT_CARD_REGISTRY = {
12876
13087
  contentRefType: "design_doc",
12877
13088
  bareInline: true,
12878
13089
  noComposedHref: true,
12879
- fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _374 => _374.url]), () => ( null)),
13090
+ fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _375 => _375.url]), () => ( null)),
12880
13091
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCard, { loading: true, title: "" }),
12881
13092
  render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DesignDocChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
12882
13093
  },
12883
13094
  customer_interview: {
13095
+ disclosure: CHAT_CARD_DISCLOSURE.VIDEO,
12884
13096
  label: "Customer interview",
12885
13097
  contentRefType: "customer_interview",
12886
13098
  bareInline: true,
@@ -12892,17 +13104,18 @@ var CHAT_CARD_REGISTRY = {
12892
13104
  chatRef,
12893
13105
  isNewTab: opts.isNewTab,
12894
13106
  discuss: opts.discuss,
12895
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _375 => _375.extras, 'optionalAccess', _376 => _376.buildOgPlaceholderUrl, 'optionalCall', _377 => _377(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _378 => _378.title]), () => ( "")))]), () => ( null))
13107
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _376 => _376.extras, 'optionalAccess', _377 => _377.buildOgPlaceholderUrl, 'optionalCall', _378 => _378(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _379 => _379.title]), () => ( "")))]), () => ( null))
12896
13108
  }
12897
13109
  )
12898
13110
  },
12899
13111
  product_release: {
13112
+ disclosure: CHAT_CARD_DISCLOSURE.VIDEO,
12900
13113
  label: "Product release",
12901
13114
  contentRefType: "product_release",
12902
13115
  bareInline: true,
12903
13116
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGAR2IIU6cjs.ProductReleaseCard, { loading: true, size: "sm" }),
12904
13117
  render: (item, chatRef, opts) => {
12905
- const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _379 => _379.extras, 'optionalAccess', _380 => _380.buildProductReleaseCardProps]), () => ( _chunkGAR2IIU6cjs.defaultBuildProductReleaseCardProps));
13118
+ const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _380 => _380.extras, 'optionalAccess', _381 => _381.buildProductReleaseCardProps]), () => ( _chunkGAR2IIU6cjs.defaultBuildProductReleaseCardProps));
12906
13119
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12907
13120
  ProductReleaseChatCard,
12908
13121
  {
@@ -12917,6 +13130,7 @@ var CHAT_CARD_REGISTRY = {
12917
13130
  },
12918
13131
  ...programRegistryEntries(),
12919
13132
  investor_update: {
13133
+ disclosure: CHAT_CARD_DISCLOSURE.VIDEO,
12920
13134
  label: "Investor update",
12921
13135
  contentRefType: "investor_update",
12922
13136
  bareInline: true,
@@ -12928,11 +13142,12 @@ var CHAT_CARD_REGISTRY = {
12928
13142
  chatRef,
12929
13143
  isNewTab: opts.isNewTab,
12930
13144
  discuss: opts.discuss,
12931
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _381 => _381.extras, 'optionalAccess', _382 => _382.buildOgPlaceholderUrl, 'optionalCall', _383 => _383(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _384 => _384.title]), () => ( "")))]), () => ( null))
13145
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _382 => _382.extras, 'optionalAccess', _383 => _383.buildOgPlaceholderUrl, 'optionalCall', _384 => _384(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _385 => _385.title]), () => ( "")))]), () => ( null))
12932
13146
  }
12933
13147
  )
12934
13148
  },
12935
13149
  onboarding_guide: {
13150
+ disclosure: CHAT_CARD_DISCLOSURE.VIDEO,
12936
13151
  label: "Onboarding guide",
12937
13152
  contentRefType: "onboarding_guide",
12938
13153
  bareInline: true,
@@ -12946,7 +13161,7 @@ var CHAT_CARD_REGISTRY = {
12946
13161
  chatRef,
12947
13162
  isNewTab: opts.isNewTab,
12948
13163
  discuss: opts.discuss,
12949
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _385 => _385.extras, 'optionalAccess', _386 => _386.buildOgPlaceholderUrl, 'optionalCall', _387 => _387(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _388 => _388.title]), () => ( "")))]), () => ( null))
13164
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _386 => _386.extras, 'optionalAccess', _387 => _387.buildOgPlaceholderUrl, 'optionalCall', _388 => _388(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _389 => _389.title]), () => ( "")))]), () => ( null))
12950
13165
  }
12951
13166
  )
12952
13167
  },
@@ -12957,13 +13172,13 @@ var CHAT_CARD_REGISTRY = {
12957
13172
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCard, { loading: true, title: "" }),
12958
13173
  // No public viewer — synthesize the hub-internal admin URL post-fetch
12959
13174
  // so the wrapper + isNewTab computation see the actual destination.
12960
- fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _389 => _389.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
13175
+ fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _390 => _390.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
12961
13176
  render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
12962
13177
  },
12963
13178
  ...roadmapRegistryEntries()
12964
13179
  };
12965
13180
  function chatCardLabel(docType) {
12966
- return _optionalChain([CHAT_CARD_REGISTRY, 'access', _390 => _390[docType], 'optionalAccess', _391 => _391.label]);
13181
+ return _optionalChain([CHAT_CARD_REGISTRY, 'access', _391 => _391[docType], 'optionalAccess', _392 => _392.label]);
12967
13182
  }
12968
13183
  function ChatCardNavWrap({
12969
13184
  href,
@@ -12979,16 +13194,32 @@ function ChatCardNavWrap({
12979
13194
  if (!href) return;
12980
13195
  const targetEl = e.target;
12981
13196
  const host = e.currentTarget;
12982
- if (!_optionalChain([host, 'optionalAccess', _392 => _392.contains, 'call', _393 => _393(targetEl)])) return;
12983
- if (_optionalChain([targetEl, 'optionalAccess', _394 => _394.closest, 'optionalCall', _395 => _395("button")])) return;
12984
- if (!_optionalChain([targetEl, 'optionalAccess', _396 => _396.closest, 'optionalCall', _397 => _397("a")])) return;
13197
+ if (!_optionalChain([host, 'optionalAccess', _393 => _393.contains, 'call', _394 => _394(targetEl)])) return;
13198
+ if (_optionalChain([targetEl, 'optionalAccess', _395 => _395.closest, 'optionalCall', _396 => _396("button")])) return;
13199
+ if (!_optionalChain([targetEl, 'optionalAccess', _397 => _397.closest, 'optionalCall', _398 => _398("a")])) return;
12985
13200
  const handled = executeNavigation({ event: e, runtime, href, path, targetPlatform, fallbackNavigate: router.push });
12986
13201
  if (!handled) return;
12987
13202
  e.stopPropagation();
12988
- if (!isNewTab && _optionalChain([panel, 'optionalAccess', _398 => _398.closeChat])) panel.closeChat();
13203
+ if (!isNewTab && _optionalChain([panel, 'optionalAccess', _399 => _399.closeChat])) panel.closeChat();
12989
13204
  };
12990
13205
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "contents", onClickCapture, children });
12991
13206
  }
13207
+ function CardWithDisclosure({
13208
+ kind,
13209
+ content,
13210
+ card
13211
+ }) {
13212
+ const { action, panel } = useChatCardDisclosure(kind, content, { reserve: true });
13213
+ return (
13214
+ // Same 12px rhythm as the message renderer's block-sibling wrapper
13215
+ // (`my-3` in chat-message-enhanced) so card→player spacing matches
13216
+ // the spacing between any two hoisted blocks.
13217
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid min-w-0 grid-cols-1 gap-3", children: [
13218
+ card(action),
13219
+ panel
13220
+ ] })
13221
+ );
13222
+ }
12992
13223
  function ChatCardLoader({
12993
13224
  chatRef,
12994
13225
  onDiscuss,
@@ -13001,7 +13232,7 @@ function ChatCardLoader({
13001
13232
  const entry = CHAT_CARD_REGISTRY[chatRef.type];
13002
13233
  const fetchEntry = entry && entry.contentRefType ? entry : null;
13003
13234
  const { item, isLoading, isError, isFetched } = useChatCardItem(
13004
- _nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _399 => _399.contentRefType]), () => ( "")),
13235
+ _nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _400 => _400.contentRefType]), () => ( "")),
13005
13236
  fetchEntry ? chatRef.id : ""
13006
13237
  );
13007
13238
  if (!entry) return null;
@@ -13037,7 +13268,7 @@ function ChatCardLoader({
13037
13268
  isNewTab,
13038
13269
  discuss
13039
13270
  };
13040
- const path = typeof _optionalChain([finalChatRef, 'access', _400 => _400.metadata, 'optionalAccess', _401 => _401.path]) === "string" ? finalChatRef.metadata.path : null;
13271
+ const path = typeof _optionalChain([finalChatRef, 'access', _401 => _401.metadata, 'optionalAccess', _402 => _402.path]) === "string" ? finalChatRef.metadata.path : null;
13041
13272
  const navWrap = (children) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13042
13273
  ChatCardNavWrap,
13043
13274
  {
@@ -13048,20 +13279,31 @@ function ChatCardLoader({
13048
13279
  children
13049
13280
  }
13050
13281
  );
13051
- const finish = (node) => entry.bareInline ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: navWrap(node) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13282
+ const finish = (node, footerAction, loading) => entry.bareInline ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
13283
+ loading ? node : navWrap(node),
13284
+ footerAction ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "mt-1 flex items-center pl-0.5", children: footerAction }) : null
13285
+ ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13052
13286
  ChatCardWithDiscuss,
13053
13287
  {
13054
13288
  chatRef: finalChatRef,
13055
13289
  onDiscuss,
13056
13290
  onDisplay,
13057
13291
  displayAction: entry.displayAction,
13058
- children: navWrap(node)
13292
+ footerAction,
13293
+ loading,
13294
+ children: loading ? node : navWrap(node)
13059
13295
  }
13060
13296
  );
13061
13297
  if (!fetchEntry) {
13062
13298
  return finish(entry.render(void 0, finalChatRef, renderOpts));
13063
13299
  }
13064
- if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _402 => _402.skeleton, 'optionalCall', _403 => _403()]), () => ( null)) });
13300
+ if (isLoading) {
13301
+ return finish(
13302
+ _nullishCoalesce(_optionalChain([fetchEntry, 'access', _403 => _403.skeleton, 'optionalCall', _404 => _404()]), () => ( null)),
13303
+ entry.disclosure ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatCardDisclosureButton, { kind: entry.disclosure, loading: true }) : void 0,
13304
+ true
13305
+ );
13306
+ }
13065
13307
  if (!item) {
13066
13308
  if (isError) {
13067
13309
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Failed to load" });
@@ -13071,20 +13313,16 @@ function ChatCardLoader({
13071
13313
  }
13072
13314
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Not found" });
13073
13315
  }
13074
- const videoMeta = itemVideoMetadata(item);
13075
- if (videoMeta) {
13076
- const videoRef = {
13077
- ...finalChatRef,
13078
- metadata: { ..._nullishCoalesce(finalChatRef.metadata, () => ( {})), ...videoMeta }
13079
- };
13080
- return (
13081
- // Same 12px rhythm as the message renderer's block-sibling wrapper
13082
- // (`my-3` in chat-message-enhanced) so card→player spacing matches
13083
- // the spacing between any two hoisted blocks.
13084
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid min-w-0 grid-cols-1 gap-3", children: [
13085
- finish(entry.render(item, finalChatRef, renderOpts)),
13086
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatVideoEntityCard, { chatRef: videoRef })
13087
- ] })
13316
+ const kind = _nullishCoalesce(entry.disclosure, () => ( _optionalChain([chatCardDisclosureOf, 'call', _405 => _405(item, finalChatRef), 'optionalAccess', _406 => _406.kind])));
13317
+ if (kind) {
13318
+ const content = CHAT_CARD_DISCLOSURES[kind].fromItem(item, finalChatRef);
13319
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13320
+ CardWithDisclosure,
13321
+ {
13322
+ kind,
13323
+ content,
13324
+ card: (action) => finish(entry.render(item, finalChatRef, renderOpts), action)
13325
+ }
13088
13326
  );
13089
13327
  }
13090
13328
  return finish(entry.render(item, finalChatRef, renderOpts));
@@ -13112,7 +13350,7 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
13112
13350
  metadata: { ..._nullishCoalesce(chatRef.metadata, () => ( {})), ...decoded }
13113
13351
  };
13114
13352
  const externalUrl = chatRef.id.startsWith("mp4-") && decoded.videoUrl;
13115
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlockCard, { inline: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatInlineVideoPill, { chatRef: displayRef }), children: externalUrl && !_chunkGI3MMBP3cjs.isAppOriginUrl.call(void 0, externalUrl) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExternalMediaNotice, { url: externalUrl, kind: "video", label: displayRef.title }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatVideoEntityCard, { chatRef: displayRef }) });
13353
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlockCard, { inline: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatInlineVideoPill, { chatRef: displayRef }), children: externalUrl && !_chunkGI3MMBP3cjs.isAppOriginUrl.call(void 0, externalUrl) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ExternalMediaNotice, { url: externalUrl, kind: "video", label: displayRef.title }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatCardDisclosureRow, { kind: CHAT_CARD_DISCLOSURE.VIDEO, chatRef: displayRef }) });
13116
13354
  }
13117
13355
  return loader;
13118
13356
  }
@@ -13356,7 +13594,7 @@ function useChunkCatchup({
13356
13594
  if (catchupRun.current === run) {
13357
13595
  if (currentDialogId !== dialogIdRef.current) {
13358
13596
  catchupRun.current = null;
13359
- if (_optionalChain([pendingCatchupRef, 'access', _404 => _404.current, 'optionalAccess', _405 => _405.dialogId]) === currentDialogId) {
13597
+ if (_optionalChain([pendingCatchupRef, 'access', _407 => _407.current, 'optionalAccess', _408 => _408.dialogId]) === currentDialogId) {
13360
13598
  pendingCatchupRef.current = null;
13361
13599
  }
13362
13600
  } else {
@@ -13367,7 +13605,7 @@ function useChunkCatchup({
13367
13605
  if (pending.dialogId === currentDialogId) {
13368
13606
  rearmForQueuedCatchup();
13369
13607
  try {
13370
- await _optionalChain([catchUpChunksRef, 'access', _406 => _406.current, 'optionalCall', _407 => _407(pending.fromSequenceId)]);
13608
+ await _optionalChain([catchUpChunksRef, 'access', _409 => _409.current, 'optionalCall', _410 => _410(pending.fromSequenceId)]);
13371
13609
  } catch (rerunError) {
13372
13610
  console.error("Queued catch-up re-run failed:", rerunError);
13373
13611
  }
@@ -13518,20 +13756,20 @@ function useNatsDialogSubscription({
13518
13756
  const tearDownSubscriptions = () => {
13519
13757
  subscriptionRefs.current.forEach((sub) => {
13520
13758
  try {
13521
- _optionalChain([sub, 'optionalAccess', _408 => _408.unsubscribe, 'call', _409 => _409()]);
13759
+ _optionalChain([sub, 'optionalAccess', _411 => _411.unsubscribe, 'call', _412 => _412()]);
13522
13760
  } catch (e11) {
13523
13761
  }
13524
13762
  });
13525
13763
  subscriptionRefs.current.clear();
13526
13764
  lastSubscribedDialogIdRef.current = null;
13527
- _optionalChain([abortControllerRef, 'access', _410 => _410.current, 'optionalAccess', _411 => _411.abort, 'call', _412 => _412()]);
13765
+ _optionalChain([abortControllerRef, 'access', _413 => _413.current, 'optionalAccess', _414 => _414.abort, 'call', _415 => _415()]);
13528
13766
  abortControllerRef.current = null;
13529
13767
  };
13530
13768
  const isDisconnectStatus = (status) => status === "closed" || status === "disconnected";
13531
13769
  const lifecycle = _chunkQDB2JO55cjs.startConnectionLifecycle.call(void 0, {
13532
13770
  conn: sharedConn,
13533
13771
  wsUrl,
13534
- onBeforeReconnect: (ctx) => _optionalChain([onBeforeReconnectRef, 'access', _413 => _413.current, 'optionalCall', _414 => _414(ctx)]),
13772
+ onBeforeReconnect: (ctx) => _optionalChain([onBeforeReconnectRef, 'access', _416 => _416.current, 'optionalCall', _417 => _417(ctx)]),
13535
13773
  backoff: reconnectionBackoffRef.current,
13536
13774
  getFreshUrl: () => getNatsWsUrlRef.current(),
13537
13775
  shouldRetryOn: isDisconnectStatus,
@@ -13542,7 +13780,7 @@ function useNatsDialogSubscription({
13542
13780
  setReconnectionCount((c) => c + 1);
13543
13781
  }
13544
13782
  hadConnectionBeforeRef.current = true;
13545
- _optionalChain([onConnectRef, 'access', _415 => _415.current, 'optionalCall', _416 => _416()]);
13783
+ _optionalChain([onConnectRef, 'access', _418 => _418.current, 'optionalCall', _419 => _419()]);
13546
13784
  }
13547
13785
  if (status === "error") {
13548
13786
  console.warn("[NATS] protocol error:", evt.data);
@@ -13552,7 +13790,7 @@ function useNatsDialogSubscription({
13552
13790
  setIsConnected(false);
13553
13791
  setIsSubscribed(false);
13554
13792
  tearDownSubscriptions();
13555
- _optionalChain([onDisconnectRef, 'access', _417 => _417.current, 'optionalCall', _418 => _418()]);
13793
+ _optionalChain([onDisconnectRef, 'access', _420 => _420.current, 'optionalCall', _421 => _421()]);
13556
13794
  }
13557
13795
  }
13558
13796
  });
@@ -13583,13 +13821,13 @@ function useNatsDialogSubscription({
13583
13821
  setIsSubscribed(false);
13584
13822
  subscriptionRefs.current.forEach((sub) => {
13585
13823
  try {
13586
- _optionalChain([sub, 'optionalAccess', _419 => _419.unsubscribe, 'call', _420 => _420()]);
13824
+ _optionalChain([sub, 'optionalAccess', _422 => _422.unsubscribe, 'call', _423 => _423()]);
13587
13825
  } catch (e12) {
13588
13826
  }
13589
13827
  });
13590
13828
  subscriptionRefs.current.clear();
13591
13829
  lastSubscribedDialogIdRef.current = null;
13592
- _optionalChain([abortControllerRef, 'access', _421 => _421.current, 'optionalAccess', _422 => _422.abort, 'call', _423 => _423()]);
13830
+ _optionalChain([abortControllerRef, 'access', _424 => _424.current, 'optionalAccess', _425 => _425.abort, 'call', _426 => _426()]);
13593
13831
  abortControllerRef.current = null;
13594
13832
  }
13595
13833
  return void 0;
@@ -13601,12 +13839,12 @@ function useNatsDialogSubscription({
13601
13839
  if (subscriptionRefs.current.size > 0) {
13602
13840
  subscriptionRefs.current.forEach((sub) => {
13603
13841
  try {
13604
- _optionalChain([sub, 'optionalAccess', _424 => _424.unsubscribe, 'call', _425 => _425()]);
13842
+ _optionalChain([sub, 'optionalAccess', _427 => _427.unsubscribe, 'call', _428 => _428()]);
13605
13843
  } catch (e13) {
13606
13844
  }
13607
13845
  });
13608
13846
  subscriptionRefs.current.clear();
13609
- _optionalChain([abortControllerRef, 'access', _426 => _426.current, 'optionalAccess', _427 => _427.abort, 'call', _428 => _428()]);
13847
+ _optionalChain([abortControllerRef, 'access', _429 => _429.current, 'optionalAccess', _430 => _430.abort, 'call', _431 => _431()]);
13610
13848
  }
13611
13849
  abortControllerRef.current = new AbortController();
13612
13850
  const abort = abortControllerRef.current;
@@ -13636,7 +13874,7 @@ function useNatsDialogSubscription({
13636
13874
  });
13637
13875
  lastSubscribedDialogIdRef.current = dialogId;
13638
13876
  setIsSubscribed(true);
13639
- _optionalChain([onSubscribedRef, 'access', _429 => _429.current, 'optionalCall', _430 => _430()]);
13877
+ _optionalChain([onSubscribedRef, 'access', _432 => _432.current, 'optionalCall', _433 => _433()]);
13640
13878
  };
13641
13879
  if (isConnectedRef.current) {
13642
13880
  createSubscriptions();
@@ -13647,7 +13885,7 @@ function useNatsDialogSubscription({
13647
13885
  abort.abort();
13648
13886
  subscriptions.forEach((sub) => {
13649
13887
  try {
13650
- _optionalChain([sub, 'optionalAccess', _431 => _431.unsubscribe, 'call', _432 => _432()]);
13888
+ _optionalChain([sub, 'optionalAccess', _434 => _434.unsubscribe, 'call', _435 => _435()]);
13651
13889
  } catch (e15) {
13652
13890
  }
13653
13891
  });
@@ -13686,7 +13924,7 @@ function useNatsDialogSubscription({
13686
13924
  });
13687
13925
  lastSubscribedDialogIdRef.current = currentDialogId;
13688
13926
  setIsSubscribed(true);
13689
- _optionalChain([onSubscribedRef, 'access', _433 => _433.current, 'optionalCall', _434 => _434()]);
13927
+ _optionalChain([onSubscribedRef, 'access', _436 => _436.current, 'optionalCall', _437 => _437()]);
13690
13928
  } else if (subscriptionRefs.current.size > 0) {
13691
13929
  setIsSubscribed(true);
13692
13930
  }
@@ -13694,10 +13932,10 @@ function useNatsDialogSubscription({
13694
13932
  return { isConnected, isSubscribed, reconnectionCount };
13695
13933
  }
13696
13934
  function buildNatsWsUrl(apiBaseUrl, options) {
13697
- const path = _optionalChain([options, 'optionalAccess', _435 => _435.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
13935
+ const path = _optionalChain([options, 'optionalAccess', _438 => _438.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
13698
13936
  const u = new URL(path, apiBaseUrl);
13699
13937
  u.protocol = u.protocol === "https:" ? "wss:" : "ws:";
13700
- if (_optionalChain([options, 'optionalAccess', _436 => _436.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _437 => _437.token])) {
13938
+ if (_optionalChain([options, 'optionalAccess', _439 => _439.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _440 => _440.token])) {
13701
13939
  u.searchParams.set("authorization", options.token);
13702
13940
  }
13703
13941
  return u.toString();
@@ -13715,7 +13953,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
13715
13953
  const data = await res.json();
13716
13954
  return _nullishCoalesce(data.commands, () => ( []));
13717
13955
  } catch (err) {
13718
- if (_optionalChain([err, 'optionalAccess', _438 => _438.name]) === "AbortError") throw err;
13956
+ if (_optionalChain([err, 'optionalAccess', _441 => _441.name]) === "AbortError") throw err;
13719
13957
  console.warn("[chat] slash-commands fetch failed, showing none:", err);
13720
13958
  return [];
13721
13959
  }
@@ -13723,8 +13961,8 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
13723
13961
  var NO_COMMANDS = [];
13724
13962
  function useSlashCommands(prefix, commandsUrl) {
13725
13963
  const [answered, setAnswered] = _react.useState.call(void 0, null);
13726
- const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _439 => _439.prefix]) === prefix ? answered.commands : NO_COMMANDS;
13727
- const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _440 => _440.prefix]) !== prefix;
13964
+ const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _442 => _442.prefix]) === prefix ? answered.commands : NO_COMMANDS;
13965
+ const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _443 => _443.prefix]) !== prefix;
13728
13966
  _react.useEffect.call(void 0, () => {
13729
13967
  if (prefix == null) return void 0;
13730
13968
  let cancelled = false;
@@ -13734,7 +13972,7 @@ function useSlashCommands(prefix, commandsUrl) {
13734
13972
  const next = await fetchSlashCommands(prefix, ctrl.signal, commandsUrl);
13735
13973
  if (!cancelled) setAnswered({ prefix, commands: next });
13736
13974
  } catch (err) {
13737
- if (!cancelled && _optionalChain([err, 'optionalAccess', _441 => _441.name]) !== "AbortError") {
13975
+ if (!cancelled && _optionalChain([err, 'optionalAccess', _444 => _444.name]) !== "AbortError") {
13738
13976
  console.warn("[use-slash-commands] fetch failed:", err);
13739
13977
  setAnswered({ prefix, commands: NO_COMMANDS });
13740
13978
  }
@@ -13757,7 +13995,7 @@ function useSlashCommandRegistry(commandsUrl, options) {
13757
13995
  const query = _reactquery.useQuery.call(void 0, {
13758
13996
  queryKey: ["chat-slash-commands", commandsUrl],
13759
13997
  queryFn: ({ signal }) => fetchSlashCommands("", signal, commandsUrl),
13760
- enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _442 => _442.enabled]), () => ( true)),
13998
+ enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _445 => _445.enabled]), () => ( true)),
13761
13999
  staleTime: Infinity,
13762
14000
  gcTime: Infinity,
13763
14001
  // The commands registry is non-critical chrome — a failure degrades to an
@@ -13796,21 +14034,21 @@ async function fetchEmptyStateConfig(signal, emptyStateUrl) {
13796
14034
  }
13797
14035
  const data = await res.json();
13798
14036
  return {
13799
- name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _443 => _443.name]), () => ( null)),
13800
- icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _444 => _444.icon]), () => ( null)),
13801
- greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _445 => _445.greeting]), () => ( null)),
13802
- enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _446 => _446.enabledRagTableIds]), () => ( [])),
13803
- quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _447 => _447.quickActions]), () => ( [])),
13804
- suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _448 => _448.suggestedQueries]), () => ( []))
14037
+ name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _446 => _446.name]), () => ( null)),
14038
+ icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _447 => _447.icon]), () => ( null)),
14039
+ greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _448 => _448.greeting]), () => ( null)),
14040
+ enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _449 => _449.enabledRagTableIds]), () => ( [])),
14041
+ quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _450 => _450.quickActions]), () => ( [])),
14042
+ suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _451 => _451.suggestedQueries]), () => ( []))
13805
14043
  };
13806
14044
  } catch (err) {
13807
- if (_optionalChain([err, 'optionalAccess', _449 => _449.name]) === "AbortError") throw err;
14045
+ if (_optionalChain([err, 'optionalAccess', _452 => _452.name]) === "AbortError") throw err;
13808
14046
  console.warn("[chat] empty-state config fetch failed, using neutral defaults:", err);
13809
14047
  return EMPTY_STATE_FALLBACK;
13810
14048
  }
13811
14049
  }
13812
14050
  function useEmptyStateConfig(emptyStateUrl, options) {
13813
- const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _450 => _450.enabled]), () => ( true))) && !!emptyStateUrl;
14051
+ const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _453 => _453.enabled]), () => ( true))) && !!emptyStateUrl;
13814
14052
  const query = _reactquery.useQuery.call(void 0, {
13815
14053
  queryKey: ["chat-empty-state", emptyStateUrl],
13816
14054
  queryFn: ({ signal }) => fetchEmptyStateConfig(signal, emptyStateUrl),
@@ -13839,7 +14077,7 @@ var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
13839
14077
  var STORAGE_CACHE_CONTROL_IMMUTABLE = "public, max-age=31536000, immutable";
13840
14078
  function uploadWithProgress(url, file, token, onProgress, signal) {
13841
14079
  return new Promise((resolve, reject) => {
13842
- if (_optionalChain([signal, 'optionalAccess', _451 => _451.aborted])) {
14080
+ if (_optionalChain([signal, 'optionalAccess', _454 => _454.aborted])) {
13843
14081
  reject(new Error("Upload cancelled"));
13844
14082
  return;
13845
14083
  }
@@ -13881,7 +14119,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
13881
14119
  const handleSignalAbort = () => {
13882
14120
  xhr.abort();
13883
14121
  };
13884
- _optionalChain([signal, 'optionalAccess', _452 => _452.addEventListener, 'call', _453 => _453("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
14122
+ _optionalChain([signal, 'optionalAccess', _455 => _455.addEventListener, 'call', _456 => _456("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
13885
14123
  xhr.upload.addEventListener("progress", handleProgress, { signal: listeners.signal });
13886
14124
  xhr.addEventListener("load", handleLoad, { signal: listeners.signal });
13887
14125
  xhr.addEventListener("error", handleError, { signal: listeners.signal });
@@ -13925,10 +14163,10 @@ function useChatAttachments() {
13925
14163
  try {
13926
14164
  sniffed = await _filetype.fileTypeFromBlob.call(void 0, att.file);
13927
14165
  } catch (err) {
13928
- if (_optionalChain([ctrl, 'optionalAccess', _454 => _454.signal, 'access', _455 => _455.aborted])) return;
14166
+ if (_optionalChain([ctrl, 'optionalAccess', _457 => _457.signal, 'access', _458 => _458.aborted])) return;
13929
14167
  throw new Error(`Could not read file content: ${err instanceof Error ? err.message : String(err)}`);
13930
14168
  }
13931
- if (_optionalChain([ctrl, 'optionalAccess', _456 => _456.signal, 'access', _457 => _457.aborted])) return;
14169
+ if (_optionalChain([ctrl, 'optionalAccess', _459 => _459.signal, 'access', _460 => _460.aborted])) return;
13932
14170
  if (!sniffed) {
13933
14171
  throw new Error("Unrecognized file format");
13934
14172
  }
@@ -13942,7 +14180,7 @@ function useChatAttachments() {
13942
14180
  const urlResp = await _chunkGI3MMBP3cjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
13943
14181
  method: "POST",
13944
14182
  headers: { "Content-Type": "application/json" },
13945
- signal: _optionalChain([ctrl, 'optionalAccess', _458 => _458.signal]),
14183
+ signal: _optionalChain([ctrl, 'optionalAccess', _461 => _461.signal]),
13946
14184
  body: JSON.stringify({
13947
14185
  fileName: att.file.name,
13948
14186
  // Pass the SNIFFED MIME (not `file.type`, which can be a
@@ -13971,9 +14209,9 @@ function useChatAttachments() {
13971
14209
  (pct) => {
13972
14210
  updateOne(att.id, { progress: pct });
13973
14211
  },
13974
- _optionalChain([ctrl, 'optionalAccess', _459 => _459.signal])
14212
+ _optionalChain([ctrl, 'optionalAccess', _462 => _462.signal])
13975
14213
  );
13976
- if (_optionalChain([ctrl, 'optionalAccess', _460 => _460.signal, 'access', _461 => _461.aborted])) return;
14214
+ if (_optionalChain([ctrl, 'optionalAccess', _463 => _463.signal, 'access', _464 => _464.aborted])) return;
13977
14215
  updateOne(att.id, {
13978
14216
  status: "ready",
13979
14217
  progress: 100,
@@ -13981,7 +14219,7 @@ function useChatAttachments() {
13981
14219
  viewToken: mintData.viewToken
13982
14220
  });
13983
14221
  } catch (err) {
13984
- if (_optionalChain([ctrl, 'optionalAccess', _462 => _462.signal, 'access', _463 => _463.aborted])) return;
14222
+ if (_optionalChain([ctrl, 'optionalAccess', _465 => _465.signal, 'access', _466 => _466.aborted])) return;
13985
14223
  const message = err instanceof Error ? err.message : String(err);
13986
14224
  updateOne(att.id, { status: "error", progress: 0, errorMessage: message });
13987
14225
  } finally {
@@ -14130,11 +14368,11 @@ var ANON_DEFAULTS = {
14130
14368
  function useResolveChatIdentity(enabled) {
14131
14369
  const runtime = _chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, );
14132
14370
  const url = runtime.endpoints.identityUrl;
14133
- const proxyEmail = _nullishCoalesce(_optionalChain([_chunkGI3MMBP3cjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _464 => _464.email]), () => ( null));
14371
+ const proxyEmail = _nullishCoalesce(_optionalChain([_chunkGI3MMBP3cjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _467 => _467.email]), () => ( null));
14134
14372
  const requestKey = enabled ? `${url}\0${_nullishCoalesce(proxyEmail, () => ( ""))}` : null;
14135
14373
  const [resolved, setResolved] = _react.useState.call(void 0, null);
14136
- const data = _optionalChain([resolved, 'optionalAccess', _465 => _465.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
14137
- const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _466 => _466.key]) !== requestKey;
14374
+ const data = _optionalChain([resolved, 'optionalAccess', _468 => _468.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
14375
+ const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _469 => _469.key]) !== requestKey;
14138
14376
  _react.useEffect.call(void 0, () => {
14139
14377
  if (requestKey === null) return void 0;
14140
14378
  let cancelled = false;
@@ -14256,9 +14494,9 @@ function exchangeMessages({ id, at, content }, user, assistant, onPick) {
14256
14494
  role: "user",
14257
14495
  content: content.question,
14258
14496
  timestamp: new Date(at),
14259
- name: _optionalChain([user, 'optionalAccess', _467 => _467.name]),
14260
- avatar: _optionalChain([user, 'optionalAccess', _468 => _468.avatar]),
14261
- authorType: _optionalChain([user, 'optionalAccess', _469 => _469.authorType])
14497
+ name: _optionalChain([user, 'optionalAccess', _470 => _470.name]),
14498
+ avatar: _optionalChain([user, 'optionalAccess', _471 => _471.avatar]),
14499
+ authorType: _optionalChain([user, 'optionalAccess', _472 => _472.authorType])
14262
14500
  },
14263
14501
  {
14264
14502
  id: `${id}-answer`,
@@ -14269,10 +14507,10 @@ function exchangeMessages({ id, at, content }, user, assistant, onPick) {
14269
14507
  ],
14270
14508
  // A millisecond after the question, so the pair keeps its order.
14271
14509
  timestamp: new Date(at + 1),
14272
- name: _optionalChain([assistant, 'optionalAccess', _470 => _470.name]),
14273
- avatar: _optionalChain([assistant, 'optionalAccess', _471 => _471.avatar]),
14274
- authorType: _optionalChain([assistant, 'optionalAccess', _472 => _472.authorType]),
14275
- assistantType: _optionalChain([assistant, 'optionalAccess', _473 => _473.assistantType])
14510
+ name: _optionalChain([assistant, 'optionalAccess', _473 => _473.name]),
14511
+ avatar: _optionalChain([assistant, 'optionalAccess', _474 => _474.avatar]),
14512
+ authorType: _optionalChain([assistant, 'optionalAccess', _475 => _475.authorType]),
14513
+ assistantType: _optionalChain([assistant, 'optionalAccess', _476 => _476.assistantType])
14276
14514
  }
14277
14515
  ];
14278
14516
  }
@@ -14288,8 +14526,8 @@ function mergeByTime(thread, local) {
14288
14526
  const out = [];
14289
14527
  let next = 0;
14290
14528
  for (const message of thread) {
14291
- const at = _optionalChain([message, 'access', _474 => _474.timestamp, 'optionalAccess', _475 => _475.getTime, 'call', _476 => _476()]);
14292
- while (next < local.length && at !== void 0 && (_nullishCoalesce(_optionalChain([local, 'access', _477 => _477[next], 'access', _478 => _478.timestamp, 'optionalAccess', _479 => _479.getTime, 'call', _480 => _480()]), () => ( 0))) < at) {
14529
+ const at = _optionalChain([message, 'access', _477 => _477.timestamp, 'optionalAccess', _478 => _478.getTime, 'call', _479 => _479()]);
14530
+ while (next < local.length && at !== void 0 && (_nullishCoalesce(_optionalChain([local, 'access', _480 => _480[next], 'access', _481 => _481.timestamp, 'optionalAccess', _482 => _482.getTime, 'call', _483 => _483()]), () => ( 0))) < at) {
14293
14531
  out.push(local[next]);
14294
14532
  next += 1;
14295
14533
  }
@@ -14394,9 +14632,9 @@ function appendToTrailingAssistant(prev, segments) {
14394
14632
  for (const seg of segments) {
14395
14633
  const tail = merged[merged.length - 1];
14396
14634
  const key = upsertKey(seg);
14397
- if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _481 => _481.type]) === "text") {
14635
+ if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _484 => _484.type]) === "text") {
14398
14636
  merged[merged.length - 1] = { type: "text", text: tail.text + seg.text };
14399
- } else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _482 => _482.type]) === "thinking") {
14637
+ } else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _485 => _485.type]) === "thinking") {
14400
14638
  merged[merged.length - 1] = { type: "thinking", text: tail.text + seg.text };
14401
14639
  } else if (key) {
14402
14640
  let idx = merged.findIndex((m) => upsertKey(m) === key);
@@ -14437,7 +14675,7 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
14437
14675
  }
14438
14676
  if (s.type !== "approval_batch") return s;
14439
14677
  const isAnchor = s.data.approvalRequestId === requestId;
14440
- const hasRow = _optionalChain([s, 'access', _483 => _483.data, 'access', _484 => _484.toolCalls, 'optionalAccess', _485 => _485.some, 'call', _486 => _486((c) => c.toolExecutionRequestId === requestId)]);
14678
+ const hasRow = _optionalChain([s, 'access', _486 => _486.data, 'access', _487 => _487.toolCalls, 'optionalAccess', _488 => _488.some, 'call', _489 => _489((c) => c.toolExecutionRequestId === requestId)]);
14441
14679
  if (!isAnchor && !hasRow) return s;
14442
14680
  const nextResolvedBy = _nullishCoalesce(resolvedByName, () => ( s.resolvedByName));
14443
14681
  const nextExecutions = hasRow ? {
@@ -14459,8 +14697,8 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
14459
14697
  };
14460
14698
  }
14461
14699
  function nextBatchExecution(prevExec, toolData) {
14462
- if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _487 => _487.status]) === "done") return null;
14463
- return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _488 => _488.result]), success: _optionalChain([prevExec, 'optionalAccess', _489 => _489.success]) };
14700
+ if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _490 => _490.status]) === "done") return null;
14701
+ return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _491 => _491.result]), success: _optionalChain([prevExec, 'optionalAccess', _492 => _492.success]) };
14464
14702
  }
14465
14703
  function withBatchExecution(seg, execId, state) {
14466
14704
  return {
@@ -14477,11 +14715,11 @@ function projectBatchStatusToMessages(prev, anchorId, status) {
14477
14715
  }
14478
14716
  function projectBatchRowFailureToMessages(prev, rowRequestId) {
14479
14717
  return mapSegments(prev, (s) => {
14480
- if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _490 => _490.data, 'access', _491 => _491.toolCalls, 'optionalAccess', _492 => _492.some, 'call', _493 => _493((c) => c.toolExecutionRequestId === rowRequestId)])) {
14718
+ if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _493 => _493.data, 'access', _494 => _494.toolCalls, 'optionalAccess', _495 => _495.some, 'call', _496 => _496((c) => c.toolExecutionRequestId === rowRequestId)])) {
14481
14719
  return s;
14482
14720
  }
14483
- const existing = _optionalChain([s, 'access', _494 => _494.data, 'access', _495 => _495.executions, 'optionalAccess', _496 => _496[rowRequestId]]);
14484
- if (_optionalChain([existing, 'optionalAccess', _497 => _497.status]) === "done") return s;
14721
+ const existing = _optionalChain([s, 'access', _497 => _497.data, 'access', _498 => _498.executions, 'optionalAccess', _499 => _499[rowRequestId]]);
14722
+ if (_optionalChain([existing, 'optionalAccess', _500 => _500.status]) === "done") return s;
14485
14723
  return withBatchExecution(s, rowRequestId, { status: "done", success: false });
14486
14724
  });
14487
14725
  }
@@ -14517,7 +14755,7 @@ function mergeToolExecutionIfPresent(prev, segment) {
14517
14755
  for (let j = message.segments.length - 1; j >= 0; j--) {
14518
14756
  const seg = message.segments[j];
14519
14757
  if (execId && seg.type === "approval_batch" && seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId)) {
14520
- const prevExec = _optionalChain([seg, 'access', _498 => _498.data, 'access', _499 => _499.executions, 'optionalAccess', _500 => _500[execId]]);
14758
+ const prevExec = _optionalChain([seg, 'access', _501 => _501.data, 'access', _502 => _502.executions, 'optionalAccess', _503 => _503[execId]]);
14521
14759
  const nextExec = nextBatchExecution(prevExec, toolData);
14522
14760
  if (nextExec === null) return prev;
14523
14761
  if (sameExecutionState(prevExec, nextExec)) return prev;
@@ -14690,9 +14928,9 @@ var MessageSegmentAccumulator = class {
14690
14928
  type: "tool_execution",
14691
14929
  data: {
14692
14930
  ...toolData,
14693
- toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _501 => _501.data, 'access', _502 => _502.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _503 => _503.toolTitle]))),
14694
- toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _504 => _504.data, 'access', _505 => _505.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _506 => _506.toolExplanation]))),
14695
- parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _507 => _507.parameters])
14931
+ toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _504 => _504.data, 'access', _505 => _505.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _506 => _506.toolTitle]))),
14932
+ toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _507 => _507.data, 'access', _508 => _508.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _509 => _509.toolExplanation]))),
14933
+ parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _510 => _510.parameters])
14696
14934
  }
14697
14935
  };
14698
14936
  if (existingIndex !== -1) {
@@ -14716,7 +14954,7 @@ var MessageSegmentAccumulator = class {
14716
14954
  if (seg.type !== "approval_batch") return seg;
14717
14955
  const hasCall = seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId);
14718
14956
  if (!hasCall) return seg;
14719
- const prev = _optionalChain([seg, 'access', _508 => _508.data, 'access', _509 => _509.executions, 'optionalAccess', _510 => _510[execId]]);
14957
+ const prev = _optionalChain([seg, 'access', _511 => _511.data, 'access', _512 => _512.executions, 'optionalAccess', _513 => _513[execId]]);
14720
14958
  const next = nextBatchExecution(prev, toolData);
14721
14959
  matched = true;
14722
14960
  if (next === null) return seg;
@@ -14850,8 +15088,8 @@ var MessageSegmentAccumulator = class {
14850
15088
  requestId,
14851
15089
  {
14852
15090
  ...pendingApproval,
14853
- command: _optionalChain([pendingApproval, 'optionalAccess', _511 => _511.command]) || "",
14854
- approvalType: _optionalChain([pendingApproval, 'optionalAccess', _512 => _512.approvalType]) || approvalType
15091
+ command: _optionalChain([pendingApproval, 'optionalAccess', _514 => _514.command]) || "",
15092
+ approvalType: _optionalChain([pendingApproval, 'optionalAccess', _515 => _515.approvalType]) || approvalType
14855
15093
  },
14856
15094
  status
14857
15095
  );
@@ -14876,9 +15114,9 @@ var MessageSegmentAccumulator = class {
14876
15114
  type: "escalation_offer",
14877
15115
  // The resolved chunk carries no text/origin — a redelivered offer must
14878
15116
  // not blank the card the PENDING chunk already painted.
14879
- data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess', _513 => _513.data, 'access', _514 => _514.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _515 => _515.data, 'access', _516 => _516.origin]))) },
15117
+ data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess', _516 => _516.data, 'access', _517 => _517.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _518 => _518.data, 'access', _519 => _519.origin]))) },
14880
15118
  status,
14881
- resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _517 => _517.resolvedByName]))),
15119
+ resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _520 => _520.resolvedByName]))),
14882
15120
  onApprove: this.callbacks.onEscalationApprove,
14883
15121
  onReject: this.callbacks.onEscalationReject
14884
15122
  };
@@ -15282,7 +15520,7 @@ function youtubeVideoId(value) {
15282
15520
  const hostname = parsed.hostname.toLowerCase();
15283
15521
  const isYoutubeHost = hostname === "youtu.be" || hostname === "youtube.com" || hostname.endsWith(".youtube.com");
15284
15522
  if (!isYoutubeHost) return void 0;
15285
- const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access', _518 => _518.exec, 'call', _519 => _519(parsed.pathname), 'optionalAccess', _520 => _520[1]]);
15523
+ const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access', _521 => _521.exec, 'call', _522 => _522(parsed.pathname), 'optionalAccess', _523 => _523[1]]);
15286
15524
  const id = _nullishCoalesce(_nullishCoalesce(fromPath, () => ( parsed.searchParams.get("v"))), () => ( void 0));
15287
15525
  return id && YOUTUBE_ID.test(id) ? id : void 0;
15288
15526
  }
@@ -15401,11 +15639,11 @@ function cards(value, decodedSources) {
15401
15639
  {
15402
15640
  type,
15403
15641
  id,
15404
- title: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _521 => _521.name]), () => ( id)),
15405
- url: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _522 => _522.externalUrl]), () => ( null)),
15406
- ..._optionalChain([source, 'optionalAccess', _523 => _523.sourceRepo]) ? { sourceRepo: source.sourceRepo } : {},
15407
- ..._optionalChain([source, 'optionalAccess', _524 => _524.targetPlatform]) !== void 0 ? { targetPlatform: source.targetPlatform } : {},
15408
- ..._optionalChain([source, 'optionalAccess', _525 => _525.path]) ? { metadata: { path: source.path } } : {}
15642
+ title: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _524 => _524.name]), () => ( id)),
15643
+ url: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _525 => _525.externalUrl]), () => ( null)),
15644
+ ..._optionalChain([source, 'optionalAccess', _526 => _526.sourceRepo]) ? { sourceRepo: source.sourceRepo } : {},
15645
+ ..._optionalChain([source, 'optionalAccess', _527 => _527.targetPlatform]) !== void 0 ? { targetPlatform: source.targetPlatform } : {},
15646
+ ..._optionalChain([source, 'optionalAccess', _528 => _528.path]) ? { metadata: { path: source.path } } : {}
15409
15647
  }
15410
15648
  ];
15411
15649
  });
@@ -15441,11 +15679,11 @@ function attachmentsEvent(record) {
15441
15679
  }
15442
15680
  function mergeSourceMetadata(previous, event) {
15443
15681
  const byIndex = /* @__PURE__ */ new Map();
15444
- for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _526 => _526.sources]), () => ( [])), ..._nullishCoalesce(event.sources, () => ( []))]) {
15682
+ for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _529 => _529.sources]), () => ( [])), ..._nullishCoalesce(event.sources, () => ( []))]) {
15445
15683
  if (!byIndex.has(source.index)) byIndex.set(source.index, source);
15446
15684
  }
15447
15685
  const byIdentity = /* @__PURE__ */ new Map();
15448
- for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _527 => _527.refs]), () => ( [])), ..._nullishCoalesce(event.refs, () => ( []))]) {
15686
+ for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _530 => _530.refs]), () => ( [])), ..._nullishCoalesce(event.refs, () => ( []))]) {
15449
15687
  const identity = `${ref.type}:${ref.id}`;
15450
15688
  if (!byIdentity.has(identity)) byIdentity.set(identity, ref);
15451
15689
  }
@@ -15555,7 +15793,7 @@ function createChatStreamReducer(options = {}) {
15555
15793
  let stateCache = null;
15556
15794
  function invalidate() {
15557
15795
  stateCache = null;
15558
- _optionalChain([onChange, 'optionalCall', _528 => _528()]);
15796
+ _optionalChain([onChange, 'optionalCall', _531 => _531()]);
15559
15797
  }
15560
15798
  function getState() {
15561
15799
  if (!stateCache) {
@@ -15573,7 +15811,7 @@ function createChatStreamReducer(options = {}) {
15573
15811
  return stateCache;
15574
15812
  }
15575
15813
  function emit(name, ...args) {
15576
- _optionalChain([onEffect, 'optionalCall', _529 => _529({ name, args })]);
15814
+ _optionalChain([onEffect, 'optionalCall', _532 => _532({ name, args })]);
15577
15815
  }
15578
15816
  function setMessagesInternal(next) {
15579
15817
  if (next !== messages) {
@@ -15616,12 +15854,12 @@ function createChatStreamReducer(options = {}) {
15616
15854
  return stampTrailingAssistantSourceMetadata(stampTrailingAssistantSeq(next, seq));
15617
15855
  }
15618
15856
  function applySegmentsToState(segments, meta) {
15619
- const seq = _optionalChain([meta, 'optionalAccess', _530 => _530.streamSeq]);
15620
- if (_optionalChain([meta, 'optionalAccess', _531 => _531.append]) && meta.isCompacting) {
15857
+ const seq = _optionalChain([meta, 'optionalAccess', _533 => _533.streamSeq]);
15858
+ if (_optionalChain([meta, 'optionalAccess', _534 => _534.append]) && meta.isCompacting) {
15621
15859
  setMessagesInternal(commitTrailingAssistant(upsertTrailingCompaction(messages, segments), seq));
15622
15860
  return;
15623
15861
  }
15624
- if (_optionalChain([meta, 'optionalAccess', _532 => _532.append])) {
15862
+ if (_optionalChain([meta, 'optionalAccess', _535 => _535.append])) {
15625
15863
  setMessagesInternal(commitTrailingAssistant(appendToTrailingAssistant(messages, segments), seq));
15626
15864
  return;
15627
15865
  }
@@ -15633,7 +15871,7 @@ function createChatStreamReducer(options = {}) {
15633
15871
  adoptTrailingAssistant = false;
15634
15872
  const last = messages[messages.length - 1];
15635
15873
  if (!last || last.role !== "assistant" || adoptTail) return;
15636
- const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _533 => _533.segments, 'optionalAccess', _534 => _534.length]), () => ( 0))) > 0 || last.content !== "";
15874
+ const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _536 => _536.segments, 'optionalAccess', _537 => _537.length]), () => ( 0))) > 0 || last.content !== "";
15637
15875
  if (!hasContent) return;
15638
15876
  setMessagesInternal([...messages, { id: nextId("assistant"), role: "assistant", content: "", segments: [] }]);
15639
15877
  }
@@ -15852,13 +16090,13 @@ function createChatStreamReducer(options = {}) {
15852
16090
  const summary = required ? _chunkOBQ5WUNGcjs.getCommandText.call(void 0, required) : `Batch of ${toolCalls.length} tool calls`;
15853
16091
  pendingEscalated.set(requestId, {
15854
16092
  command: summary,
15855
- explanation: _optionalChain([required, 'optionalAccess', _535 => _535.toolExplanation]),
16093
+ explanation: _optionalChain([required, 'optionalAccess', _538 => _538.toolExplanation]),
15856
16094
  approvalType,
15857
16095
  toolCalls
15858
16096
  });
15859
16097
  emit("onEscalatedApproval", requestId, {
15860
16098
  command: summary,
15861
- explanation: _optionalChain([required, 'optionalAccess', _536 => _536.toolExplanation]),
16099
+ explanation: _optionalChain([required, 'optionalAccess', _539 => _539.toolExplanation]),
15862
16100
  approvalType
15863
16101
  });
15864
16102
  break;
@@ -16246,7 +16484,7 @@ function createChatStreamReducer(options = {}) {
16246
16484
  const resolveBatch = (status, confirm) => async () => {
16247
16485
  setMessagesInternal(projectBatchStatusToMessages(messages, anchorId, status));
16248
16486
  for (const id of ids) {
16249
- const ok = await _optionalChain([confirm, 'optionalCall', _537 => _537(id)]);
16487
+ const ok = await _optionalChain([confirm, 'optionalCall', _540 => _540(id)]);
16250
16488
  if (ok === false) {
16251
16489
  setMessagesInternal(projectBatchRowFailureToMessages(messages, id));
16252
16490
  }
@@ -16382,8 +16620,8 @@ function createChatStreamReducer(options = {}) {
16382
16620
  }
16383
16621
  }
16384
16622
  }
16385
- hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _538 => _538.resumed]), () => ( messages.length > 0)));
16386
- if (_optionalChain([extras, 'optionalAccess', _539 => _539.agentBusy])) agentBusyState();
16623
+ hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _541 => _541.resumed]), () => ( messages.length > 0)));
16624
+ if (_optionalChain([extras, 'optionalAccess', _542 => _542.agentBusy])) agentBusyState();
16387
16625
  invalidate();
16388
16626
  }
16389
16627
  return {
@@ -16470,7 +16708,7 @@ function createChatStreamReducer(options = {}) {
16470
16708
  },
16471
16709
  endSseTurn() {
16472
16710
  const last = messages[messages.length - 1];
16473
- if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _540 => _540.segments, 'optionalAccess', _541 => _541.length]), () => ( 0))) === 0 && last.content === "") {
16711
+ if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _543 => _543.segments, 'optionalAccess', _544 => _544.length]), () => ( 0))) === 0 && last.content === "") {
16474
16712
  messages = messages.slice(0, -1);
16475
16713
  }
16476
16714
  sseCurrentText = "";
@@ -16624,10 +16862,10 @@ function createChatDialogStore(options = {}) {
16624
16862
  if (onEvict) {
16625
16863
  const sep = key.indexOf(KEY_SEP);
16626
16864
  onEvict(key.slice(0, sep), key.slice(sep + 1), {
16627
- messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _542 => _542.state, 'access', _543 => _543.messages]), () => ( EMPTY_STATE.messages)),
16628
- approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _544 => _544.state, 'access', _545 => _545.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
16629
- lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _546 => _546.getLastAppliedSeq, 'call', _547 => _547()]), () => ( Number.NEGATIVE_INFINITY)),
16630
- pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _548 => _548.getPendingEchoes, 'call', _549 => _549()]), () => ( EMPTY_PENDING_ECHOES))
16865
+ messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _545 => _545.state, 'access', _546 => _546.messages]), () => ( EMPTY_STATE.messages)),
16866
+ approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _547 => _547.state, 'access', _548 => _548.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
16867
+ lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _549 => _549.getLastAppliedSeq, 'call', _550 => _550()]), () => ( Number.NEGATIVE_INFINITY)),
16868
+ pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _551 => _551.getPendingEchoes, 'call', _552 => _552()]), () => ( EMPTY_PENDING_ECHOES))
16631
16869
  });
16632
16870
  }
16633
16871
  }
@@ -16637,12 +16875,12 @@ function createChatDialogStore(options = {}) {
16637
16875
  const key = keyOf(dialogId, side);
16638
16876
  let reducer = reducers.get(key);
16639
16877
  if (!reducer) {
16640
- const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _550 => _550(dialogId, side)]), () => ( {}));
16878
+ const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _553 => _553(dialogId, side)]), () => ( {}));
16641
16879
  const userOnChange = base.onChange;
16642
16880
  reducer = createChatStreamReducer({
16643
16881
  ...base,
16644
16882
  onChange: () => {
16645
- _optionalChain([userOnChange, 'optionalCall', _551 => _551()]);
16883
+ _optionalChain([userOnChange, 'optionalCall', _554 => _554()]);
16646
16884
  notify();
16647
16885
  }
16648
16886
  });
@@ -16687,7 +16925,7 @@ function createChatDialogStore(options = {}) {
16687
16925
  };
16688
16926
  }
16689
16927
  function getSnapshot2(dialogId, side = DEFAULT_DIALOG_SIDE) {
16690
- return _nullishCoalesce(_optionalChain([reducers, 'access', _552 => _552.get, 'call', _553 => _553(keyOf(dialogId, side)), 'optionalAccess', _554 => _554.state]), () => ( EMPTY_STATE));
16928
+ return _nullishCoalesce(_optionalChain([reducers, 'access', _555 => _555.get, 'call', _556 => _556(keyOf(dialogId, side)), 'optionalAccess', _557 => _557.state]), () => ( EMPTY_STATE));
16691
16929
  }
16692
16930
  function getServerSnapshot2() {
16693
16931
  return EMPTY_STATE;
@@ -16776,7 +17014,7 @@ function createDeltaBatcher({
16776
17014
  pending = [];
16777
17015
  const key = pendingKey;
16778
17016
  for (const delta of batch) applyOne(delta, key);
16779
- _optionalChain([onFlushed, 'optionalCall', _555 => _555(batch.length)]);
17017
+ _optionalChain([onFlushed, 'optionalCall', _558 => _558(batch.length)]);
16780
17018
  }
16781
17019
  function schedule() {
16782
17020
  if (raf !== null || timer !== null) return;
@@ -16800,7 +17038,7 @@ function createDeltaBatcher({
16800
17038
  }
16801
17039
  if (!isDeltaEvent(event)) return false;
16802
17040
  const tail = pending[pending.length - 1];
16803
- const seqAdvances = _optionalChain([tail, 'optionalAccess', _556 => _556.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
17041
+ const seqAdvances = _optionalChain([tail, 'optionalAccess', _559 => _559.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
16804
17042
  if (tail && seqAdvances && tail.type === event.type && (tail.type !== "text-delta" || tail.leading === event.leading)) {
16805
17043
  pending[pending.length - 1] = {
16806
17044
  ...tail,
@@ -16832,7 +17070,7 @@ function useChatStreamReducer({
16832
17070
  side = DEFAULT_DIALOG_SIDE,
16833
17071
  createReducerOptions
16834
17072
  }) {
16835
- const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _557 => _557()]), () => ( {})));
17073
+ const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _560 => _560()]), () => ( {})));
16836
17074
  const getSnapshot2 = _react.useCallback.call(void 0, () => store.getSnapshot(dialogId, side), [store, dialogId, side]);
16837
17075
  const getServerSnapshot2 = _react.useCallback.call(void 0, () => store.getServerSnapshot(), [store]);
16838
17076
  const subscribe2 = _react.useCallback.call(void 0, (listener) => store.subscribe(listener), [store]);
@@ -16877,7 +17115,7 @@ function buildConfirmToolBody(request) {
16877
17115
  async function readServerErrorMessage(response) {
16878
17116
  try {
16879
17117
  const body = await response.json();
16880
- if (typeof _optionalChain([body, 'optionalAccess', _558 => _558.error]) === "string" && body.error.length > 0) return body.error;
17118
+ if (typeof _optionalChain([body, 'optionalAccess', _561 => _561.error]) === "string" && body.error.length > 0) return body.error;
16881
17119
  } catch (e19) {
16882
17120
  }
16883
17121
  return null;
@@ -17040,7 +17278,7 @@ function useManagedDialogList({
17040
17278
  try {
17041
17279
  await deleteDialogCallback(id);
17042
17280
  removeLocal(id);
17043
- _optionalChain([onDialogRemovedRef, 'access', _559 => _559.current, 'optionalCall', _560 => _560(id, "deleted")]);
17281
+ _optionalChain([onDialogRemovedRef, 'access', _562 => _562.current, 'optionalCall', _563 => _563(id, "deleted")]);
17044
17282
  } catch (err) {
17045
17283
  console.error(`${logTag} deleteDialog failed:`, err);
17046
17284
  throw err;
@@ -17051,7 +17289,7 @@ function useManagedDialogList({
17051
17289
  const renameDialog = _react.useCallback.call(void 0,
17052
17290
  async (id, title) => {
17053
17291
  if (!renameDialogCallback) return;
17054
- const previous = _optionalChain([dialogsRef, 'access', _561 => _561.current, 'access', _562 => _562.find, 'call', _563 => _563((d) => d.id === id), 'optionalAccess', _564 => _564.title]);
17292
+ const previous = _optionalChain([dialogsRef, 'access', _564 => _564.current, 'access', _565 => _565.find, 'call', _566 => _566((d) => d.id === id), 'optionalAccess', _567 => _567.title]);
17055
17293
  setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, title } : d));
17056
17294
  try {
17057
17295
  await renameDialogCallback(id, title);
@@ -17070,7 +17308,7 @@ function useManagedDialogList({
17070
17308
  try {
17071
17309
  await archiveDialogCallback(id);
17072
17310
  removeLocal(id);
17073
- _optionalChain([onDialogRemovedRef, 'access', _565 => _565.current, 'optionalCall', _566 => _566(id, "archived")]);
17311
+ _optionalChain([onDialogRemovedRef, 'access', _568 => _568.current, 'optionalCall', _569 => _569(id, "archived")]);
17074
17312
  } catch (err) {
17075
17313
  console.error(`${logTag} archiveDialog failed:`, err);
17076
17314
  throw err;
@@ -17259,7 +17497,7 @@ var STORAGE_KEY = "conversation";
17259
17497
  var namespaceFor = (source) => {
17260
17498
  const base = `mingo-chat-${source}`;
17261
17499
  const auth = _chunkGI3MMBP3cjs.getEmbedProxyAuth.call(void 0, );
17262
- return _optionalChain([auth, 'optionalAccess', _567 => _567.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
17500
+ return _optionalChain([auth, 'optionalAccess', _570 => _570.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
17263
17501
  };
17264
17502
  function createChatConversationStorage(source) {
17265
17503
  return _chunkGI3MMBP3cjs.createLocalStorageAdapter.call(void 0, {
@@ -17332,7 +17570,7 @@ function useChatHistoryHydration({
17332
17570
  if (cancelled) return;
17333
17571
  if (rows.length === 0) {
17334
17572
  const found = isRecord(body) ? body.found : void 0;
17335
- if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall', _568 => _568(conversationId)]);
17573
+ if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall', _571 => _571(conversationId)]);
17336
17574
  return;
17337
17575
  }
17338
17576
  const hydrated = [];
@@ -17409,7 +17647,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17409
17647
  const { active = true } = runtimeOptions;
17410
17648
  const runtime = _chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, );
17411
17649
  const source = runtime.source || DEFAULT_CHAT_SOURCE;
17412
- const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _569 => _569.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
17650
+ const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _572 => _572.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
17413
17651
  const sendMessageRef = _react.useRef.call(void 0,
17414
17652
  () => Promise.resolve(true)
17415
17653
  );
@@ -17445,7 +17683,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17445
17683
  if (!restoredConversationRef.current) {
17446
17684
  restoredConversationRef.current = true;
17447
17685
  pruneStaleChatConversationStorage(source);
17448
- conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _570 => _570.load, 'call', _571 => _571(), 'optionalAccess', _572 => _572.conversationId]), () => ( null));
17686
+ conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _573 => _573.load, 'call', _574 => _574(), 'optionalAccess', _575 => _575.conversationId]), () => ( null));
17449
17687
  }
17450
17688
  const [conversationId, setConversationId] = _react.useState.call(void 0, () => conversationIdRef.current);
17451
17689
  const commitConversationId = _react.useCallback.call(void 0,
@@ -17536,7 +17774,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17536
17774
  const abortControllerRef = _react.useRef.call(void 0, null);
17537
17775
  const switchConversation = _react.useCallback.call(void 0,
17538
17776
  (id) => {
17539
- _optionalChain([abortControllerRef, 'access', _573 => _573.current, 'optionalAccess', _574 => _574.abort, 'call', _575 => _575()]);
17777
+ _optionalChain([abortControllerRef, 'access', _576 => _576.current, 'optionalAccess', _577 => _577.abort, 'call', _578 => _578()]);
17540
17778
  flushDeltas();
17541
17779
  mutate((r) => r.reset());
17542
17780
  hydrationSendCountRef.current = 0;
@@ -17573,8 +17811,8 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17573
17811
  } = useManagedDialogList({
17574
17812
  autoLoad: active,
17575
17813
  fetchDialogs: fetchActiveDialogs,
17576
- renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _576 => _576.renameDialog]),
17577
- archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _577 => _577.archiveDialog]),
17814
+ renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _579 => _579.renameDialog]),
17815
+ archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _580 => _580.archiveDialog]),
17578
17816
  pageSize: CHAT_HISTORY_PAGE_SIZE,
17579
17817
  search: conversationsApi ? dialogSearch : void 0,
17580
17818
  logTag: "[useSseChatAdapter]",
@@ -17638,7 +17876,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17638
17876
  const serverMessage = await readServerErrorMessage(response);
17639
17877
  throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
17640
17878
  }
17641
- const reader = _optionalChain([response, 'access', _578 => _578.body, 'optionalAccess', _579 => _579.getReader, 'call', _580 => _580()]);
17879
+ const reader = _optionalChain([response, 'access', _581 => _581.body, 'optionalAccess', _582 => _582.getReader, 'call', _583 => _583()]);
17642
17880
  if (!reader) throw new Error("No response body");
17643
17881
  const frameDecoder = createSseFrameDecoder();
17644
17882
  let finished = false;
@@ -17667,7 +17905,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17667
17905
  }
17668
17906
  return true;
17669
17907
  } catch (err) {
17670
- if (_optionalChain([err, 'optionalAccess', _581 => _581.name]) === "AbortError" || ctrl.signal.aborted) {
17908
+ if (_optionalChain([err, 'optionalAccess', _584 => _584.name]) === "AbortError" || ctrl.signal.aborted) {
17671
17909
  return true;
17672
17910
  }
17673
17911
  flushDeltas();
@@ -17703,7 +17941,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17703
17941
  );
17704
17942
  sendMessageRef.current = sendMessage;
17705
17943
  const stopMessage = _react.useCallback.call(void 0, () => {
17706
- _optionalChain([abortControllerRef, 'access', _582 => _582.current, 'optionalAccess', _583 => _583.abort, 'call', _584 => _584()]);
17944
+ _optionalChain([abortControllerRef, 'access', _585 => _585.current, 'optionalAccess', _586 => _586.abort, 'call', _587 => _587()]);
17707
17945
  flushDeltas();
17708
17946
  mutate((r) => r.setPhase("idle"));
17709
17947
  }, [mutate, flushDeltas]);
@@ -17739,7 +17977,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17739
17977
  let sendIdx = -1;
17740
17978
  return state.messages.map((m) => {
17741
17979
  const segments = m.segments;
17742
- const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _585 => _585.filter, 'call', _586 => _586((s) => s.type === "text"), 'access', _587 => _587.map, 'call', _588 => _588((s) => s.text), 'access', _589 => _589.join, 'call', _590 => _590("")]), () => ( ""));
17980
+ const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _588 => _588.filter, 'call', _589 => _589((s) => s.type === "text"), 'access', _590 => _590.map, 'call', _591 => _591((s) => s.text), 'access', _592 => _592.join, 'call', _593 => _593("")]), () => ( ""));
17743
17981
  let sources2;
17744
17982
  let scrollAnchor;
17745
17983
  if (m.role === "user" && !m.hidden) {
@@ -17748,7 +17986,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17748
17986
  if (m.role === "assistant") {
17749
17987
  const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
17750
17988
  sources2 = sourcesMap.get(lookupIdx);
17751
- scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _591 => _591.get, 'call', _592 => _592(lookupIdx), 'optionalAccess', _593 => _593.scrollAnchor]), () => ( void 0));
17989
+ scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _594 => _594.get, 'call', _595 => _595(lookupIdx), 'optionalAccess', _596 => _596.scrollAnchor]), () => ( void 0));
17752
17990
  }
17753
17991
  return {
17754
17992
  id: m.id,
@@ -17775,7 +18013,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17775
18013
  );
17776
18014
  return;
17777
18015
  }
17778
- const refSlug = typeof _optionalChain([reference, 'access', _594 => _594.metadata, 'optionalAccess', _595 => _595.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
18016
+ const refSlug = typeof _optionalChain([reference, 'access', _597 => _597.metadata, 'optionalAccess', _598 => _598.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
17779
18017
  const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
17780
18018
  const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
17781
18019
  const text2 = `/${cmdId} display "${escaped}"`;
@@ -17823,18 +18061,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17823
18061
  /** True while the mount-time rebuild from the server transcript runs. */
17824
18062
  isHydratingHistory,
17825
18063
  /** Provider key for the lib's `<ModelDisplay>` icon. */
17826
- currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _596 => _596.provider]), () => ( null)),
17827
- currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _597 => _597.modelLabel]), () => ( null)),
17828
- currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _598 => _598.contextWindowMaxTokens]), () => ( null)),
18064
+ currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _599 => _599.provider]), () => ( null)),
18065
+ currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _600 => _600.modelLabel]), () => ( null)),
18066
+ currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _601 => _601.contextWindowMaxTokens]), () => ( null)),
17829
18067
  /** Input tokens (known after server's message_start frame; null until). */
17830
- currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _599 => _599.inputTokens]), () => ( null)),
18068
+ currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _602 => _602.inputTokens]), () => ( null)),
17831
18069
  /** Output tokens (known only after server's trailing usage frame). */
17832
- currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _600 => _600.outputTokens]), () => ( null)),
18070
+ currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _603 => _603.outputTokens]), () => ( null)),
17833
18071
  /** Cache hit % (read / total-input × 100). null during streaming. */
17834
- currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _601 => _601.cacheHitRatePct]), () => ( null)),
18072
+ currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _604 => _604.cacheHitRatePct]), () => ( null)),
17835
18073
  /** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
17836
18074
  * token counts). null until the trailing usage frame lands. */
17837
- currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _602 => _602.breakdown]), () => ( null)),
18075
+ currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _605 => _605.breakdown]), () => ( null)),
17838
18076
  // ─── Dialog management ───────────────────────────────────────────────
17839
18077
  // With `chatConversationsUrl` the server transcript store IS the dialog
17840
18078
  // list (shared `useManagedDialogList`); selecting a row re-hydrates through
@@ -17908,7 +18146,7 @@ function extractIncompleteMessageState(lastMessage) {
17908
18146
  }
17909
18147
  break;
17910
18148
  case "approval_batch": {
17911
- const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _603 => _603.data, 'access', _604 => _604.executions, 'optionalAccess', _605 => _605[c.toolExecutionRequestId], 'optionalAccess', _606 => _606.status]) === "done");
18149
+ const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _606 => _606.data, 'access', _607 => _607.executions, 'optionalAccess', _608 => _608[c.toolExecutionRequestId], 'optionalAccess', _609 => _609.status]) === "done");
17912
18150
  if (segment.status !== "rejected" && !allDone) {
17913
18151
  hasIncompleteState = true;
17914
18152
  }
@@ -17972,11 +18210,11 @@ function extractIncompleteMessageState(lastMessage) {
17972
18210
  function extractIncompleteTailState(messages) {
17973
18211
  if (!messages || messages.length === 0) return void 0;
17974
18212
  let start = messages.length;
17975
- while (start > 0 && _optionalChain([messages, 'access', _607 => _607[start - 1], 'optionalAccess', _608 => _608.role]) === "assistant") start -= 1;
18213
+ while (start > 0 && _optionalChain([messages, 'access', _610 => _610[start - 1], 'optionalAccess', _611 => _611.role]) === "assistant") start -= 1;
17976
18214
  if (start === messages.length) return void 0;
17977
18215
  const segments = [];
17978
18216
  for (let i = start; i < messages.length; i += 1) {
17979
- const content = _optionalChain([messages, 'access', _609 => _609[i], 'optionalAccess', _610 => _610.content]);
18217
+ const content = _optionalChain([messages, 'access', _612 => _612[i], 'optionalAccess', _613 => _613.content]);
17980
18218
  if (Array.isArray(content)) segments.push(...content);
17981
18219
  }
17982
18220
  if (segments.length === 0) return void 0;
@@ -18207,7 +18445,7 @@ function decodeNatsChunk(chunk) {
18207
18445
  userId: typeof data.userId === "string" ? data.userId : void 0,
18208
18446
  // Wire shape carries no label; fall back to the id (parity with
18209
18447
  // the history path in `process-historical-messages.ts`).
18210
- contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _611 => _611.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _612 => _612.id]) === "string").map((it) => ({
18448
+ contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _614 => _614.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _615 => _615.id]) === "string").map((it) => ({
18211
18449
  type: it.type,
18212
18450
  id: it.id,
18213
18451
  label: it.id
@@ -18259,15 +18497,15 @@ function decodeNatsChunk(chunk) {
18259
18497
 
18260
18498
  // src/components/chat/utils/process-historical-messages.ts
18261
18499
  function getOwnerDisplayName(owner) {
18262
- if (_optionalChain([owner, 'optionalAccess', _613 => _613.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN && owner.user) {
18500
+ if (_optionalChain([owner, 'optionalAccess', _616 => _616.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN && owner.user) {
18263
18501
  const { firstName, lastName } = owner.user;
18264
18502
  const name = [firstName, lastName].filter(Boolean).join(" ");
18265
18503
  if (name) return name;
18266
18504
  }
18267
- return _optionalChain([owner, 'optionalAccess', _614 => _614.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN ? "Admin" : "You";
18505
+ return _optionalChain([owner, 'optionalAccess', _617 => _617.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN ? "Admin" : "You";
18268
18506
  }
18269
18507
  function getOwnerAvatar(owner) {
18270
- return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _615 => _615.user, 'optionalAccess', _616 => _616.image, 'optionalAccess', _617 => _617.imageUrl]), () => ( void 0));
18508
+ return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _618 => _618.user, 'optionalAccess', _619 => _619.image, 'optionalAccess', _620 => _620.imageUrl]), () => ( void 0));
18271
18509
  }
18272
18510
  function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
18273
18511
  messageDataArray.forEach((data) => {
@@ -18459,7 +18697,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
18459
18697
  event.offerId,
18460
18698
  event.text,
18461
18699
  event.origin,
18462
- _nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _618 => _618[event.offerId]]), () => ( "pending"))
18700
+ _nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _621 => _621[event.offerId]]), () => ( "pending"))
18463
18701
  );
18464
18702
  break;
18465
18703
  case "ticket-escalated":
@@ -18493,7 +18731,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
18493
18731
  );
18494
18732
  break;
18495
18733
  case "escalation-offer-resolved":
18496
- _optionalChain([offerResolutions, 'optionalAccess', _619 => _619.set, 'call', _620 => _620(event.offerId, {
18734
+ _optionalChain([offerResolutions, 'optionalAccess', _622 => _622.set, 'call', _623 => _623(event.offerId, {
18497
18735
  status: event.status,
18498
18736
  resolvedByName: event.resolvedByName
18499
18737
  })]);
@@ -18557,7 +18795,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
18557
18795
  }
18558
18796
  }
18559
18797
  } else {
18560
- _optionalChain([escalatedApprovals, 'optionalAccess', _621 => _621.set, 'call', _622 => _622(event.requestId, {
18798
+ _optionalChain([escalatedApprovals, 'optionalAccess', _624 => _624.set, 'call', _625 => _625(event.requestId, {
18561
18799
  command: event.command || "",
18562
18800
  explanation: event.explanation,
18563
18801
  approvalType,
@@ -18572,8 +18810,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
18572
18810
  const existingStatus = approvalStatuses[requestId];
18573
18811
  const status = existingStatus || event.status;
18574
18812
  const resolvedByName = event.resolvedByName;
18575
- const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _623 => _623.get, 'call', _624 => _624(requestId)]);
18576
- if (_optionalChain([escalatedData, 'optionalAccess', _625 => _625.toolCalls]) && escalatedData.toolCalls.length > 0) {
18813
+ const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _626 => _626.get, 'call', _627 => _627(requestId)]);
18814
+ if (_optionalChain([escalatedData, 'optionalAccess', _628 => _628.toolCalls]) && escalatedData.toolCalls.length > 0) {
18577
18815
  if (batchApprovalsEnabled) {
18578
18816
  accumulator.addApprovalBatch(
18579
18817
  requestId,
@@ -18595,7 +18833,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
18595
18833
  );
18596
18834
  }
18597
18835
  }
18598
- _optionalChain([escalatedApprovals, 'optionalAccess', _626 => _626.delete, 'call', _627 => _627(requestId)]);
18836
+ _optionalChain([escalatedApprovals, 'optionalAccess', _629 => _629.delete, 'call', _630 => _630(requestId)]);
18599
18837
  break;
18600
18838
  }
18601
18839
  if (escalatedData) {
@@ -18604,7 +18842,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
18604
18842
  explanation: escalatedData.explanation,
18605
18843
  approvalType: escalatedData.approvalType
18606
18844
  });
18607
- _optionalChain([escalatedApprovals, 'optionalAccess', _628 => _628.delete, 'call', _629 => _629(requestId)]);
18845
+ _optionalChain([escalatedApprovals, 'optionalAccess', _631 => _631.delete, 'call', _632 => _632(requestId)]);
18608
18846
  }
18609
18847
  const before = accumulator.getSegments();
18610
18848
  const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
@@ -18696,14 +18934,14 @@ function processHistoricalMessages(messages, options = {}) {
18696
18934
  pushStandaloneMessages(processedMessages, msg, messageDataArray);
18697
18935
  return;
18698
18936
  }
18699
- const isUserMessage = _optionalChain([msg, 'access', _630 => _630.owner, 'optionalAccess', _631 => _631.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _632 => _632.owner, 'optionalAccess', _633 => _633.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN;
18937
+ const isUserMessage = _optionalChain([msg, 'access', _633 => _633.owner, 'optionalAccess', _634 => _634.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _635 => _635.owner, 'optionalAccess', _636 => _636.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN;
18700
18938
  if (isUserMessage) {
18701
18939
  flushAssistantMessage();
18702
- const userAuthorType = _optionalChain([msg, 'access', _634 => _634.owner, 'optionalAccess', _635 => _635.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN ? "admin" : "user";
18940
+ const userAuthorType = _optionalChain([msg, 'access', _637 => _637.owner, 'optionalAccess', _638 => _638.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN ? "admin" : "user";
18703
18941
  messageDataArray.forEach((data) => {
18704
18942
  if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
18705
18943
  const rawContext = data.contextItems;
18706
- const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _636 => _636.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _637 => _637.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
18944
+ const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _639 => _639.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _640 => _640.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
18707
18945
  processedMessages.push({
18708
18946
  id: msg.id,
18709
18947
  role: "user",
@@ -18750,7 +18988,7 @@ function processHistoricalMessages(messages, options = {}) {
18750
18988
  });
18751
18989
  const nextMsg = messages[index + 1];
18752
18990
  const isLastMessage = index === messages.length - 1;
18753
- const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _638 => _638.owner, 'optionalAccess', _639 => _639.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _640 => _640.owner, 'optionalAccess', _641 => _641.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN);
18991
+ const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _641 => _641.owner, 'optionalAccess', _642 => _642.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _643 => _643.owner, 'optionalAccess', _644 => _644.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN);
18754
18992
  if (isLastMessage || nextIsFromUser) {
18755
18993
  flushAssistantMessage();
18756
18994
  }
@@ -19134,7 +19372,7 @@ function useNatsChatAdapter(config, options = {}) {
19134
19372
  const connectionState = !active || !dialogId ? "connected" : connectedForDialog === dialogId ? "connected" : "connecting";
19135
19373
  const sendMessage = _react.useCallback.call(void 0,
19136
19374
  async (text2, sendOptions) => {
19137
- const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _642 => _642.hidden]), () => ( false));
19375
+ const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _645 => _645.hidden]), () => ( false));
19138
19376
  mutate((r) => r.pushOptimisticSend(text2, hidden));
19139
19377
  await publishUserMessage(text2, { hidden, dialogId });
19140
19378
  },
@@ -19227,11 +19465,11 @@ function useNatsChatAdapter(config, options = {}) {
19227
19465
  // Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
19228
19466
  // contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
19229
19467
  // matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
19230
- currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _643 => _643.provider]), () => ( modelProvider)), () => ( null)),
19231
- currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _644 => _644.modelLabel]), () => ( modelLabel)), () => ( null)),
19232
- currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _645 => _645.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _646 => _646.contextWindowMaxTokens]))), () => ( null)),
19233
- currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _647 => _647.inputTokensSize]), () => ( null)),
19234
- currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _648 => _648.outputTokensSize]), () => ( null)),
19468
+ currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _646 => _646.provider]), () => ( modelProvider)), () => ( null)),
19469
+ currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _647 => _647.modelLabel]), () => ( modelLabel)), () => ( null)),
19470
+ currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _648 => _648.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _649 => _649.contextWindowMaxTokens]))), () => ( null)),
19471
+ currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _650 => _650.inputTokensSize]), () => ( null)),
19472
+ currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _651 => _651.outputTokensSize]), () => ( null)),
19235
19473
  currentCacheHitRatePct: null,
19236
19474
  currentUsageBreakdown: null,
19237
19475
  // Dialog management
@@ -19353,7 +19591,7 @@ function useUnifiedChat(options) {
19353
19591
  []
19354
19592
  );
19355
19593
  const displayRefForward = _react.useCallback.call(void 0,
19356
- (ref) => _optionalChain([activeStateRef, 'access', _649 => _649.current, 'access', _650 => _650.displayRef, 'optionalCall', _651 => _651(ref)]),
19594
+ (ref) => _optionalChain([activeStateRef, 'access', _652 => _652.current, 'access', _653 => _653.displayRef, 'optionalCall', _654 => _654(ref)]),
19357
19595
  []
19358
19596
  );
19359
19597
  const displayRef = activeState.displayRef ? displayRefForward : void 0;
@@ -19363,7 +19601,7 @@ function useUnifiedChat(options) {
19363
19601
  const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
19364
19602
  const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
19365
19603
  const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
19366
- const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _652 => _652.current, 'access', _653 => _653.setDialogScope, 'optionalCall', _654 => _654(scope)]), []);
19604
+ const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _655 => _655.current, 'access', _656 => _656.setDialogScope, 'optionalCall', _657 => _657(scope)]), []);
19367
19605
  const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
19368
19606
  const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
19369
19607
  const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);
@@ -19739,4 +19977,14 @@ var MINGO_V2_SPLIT_WIDTH = MINGO_V2_RAIL_WIDTH + CHAT_BLOCK_MIN_WIDTH;
19739
19977
 
19740
19978
 
19741
19979
 
19742
- exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.AUTHORED_LINK_REL_TOKENS = AUTHORED_LINK_REL_TOKENS; exports.authoredRelTokens = authoredRelTokens; exports.isNofollowRel = isNofollowRel; exports.renderedLinkRel = renderedLinkRel; exports.findMarkdownLinkAt = findMarkdownLinkAt; exports.formatMarkdownLink = formatMarkdownLink; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.MARKDOWN_H1_CLASS = MARKDOWN_H1_CLASS; exports.MARKDOWN_H2_CLASS = MARKDOWN_H2_CLASS; exports.MARKDOWN_PARAGRAPH_CLASS = MARKDOWN_PARAGRAPH_CLASS; exports.hasRenderableSrc = hasRenderableSrc; exports.buildStandardLeafRenderers = buildStandardLeafRenderers; exports.SAFE_HTML_TAGS = SAFE_HTML_TAGS; exports.SVG_TAGS = SVG_TAGS; exports.buildEffectiveTagSet = buildEffectiveTagSet; exports.buildSanitizeSchema = buildSanitizeSchema; exports.rehypeStripUnsafe = rehypeStripUnsafe; exports.escapeUnknownHtmlTags = escapeUnknownHtmlTags; exports.cardAwareUrlTransform = cardAwareUrlTransform; exports.splitStreamingBlocks = splitStreamingBlocks; exports.completeStreamingTail = completeStreamingTail; exports.TEXT_SIZE_PRESETS = TEXT_SIZE_PRESETS; exports.resolveTextSizeConfig = resolveTextSizeConfig; exports.NO_BROKEN_LINKS = NO_BROKEN_LINKS; exports.MARKDOWN_SKELETON_LINES = MARKDOWN_SKELETON_LINES; exports.MARKDOWN_RENDERER_CLASS = MARKDOWN_RENDERER_CLASS; exports.MarkdownEngine = MarkdownEngine; exports.MarkdownEngineSkeleton = MarkdownEngineSkeleton; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.ASK_AI_OPEN_EVENT = ASK_AI_OPEN_EVENT; exports.ASK_AI_OPEN_WITH_REF_EVENT = ASK_AI_OPEN_WITH_REF_EVENT; exports.ASK_AI_OPEN_EVENTS = ASK_AI_OPEN_EVENTS; exports.holdAskAiOpens = holdAskAiOpens; exports.askAiOpenIsHeld = askAiOpenIsHeld; exports.chatListensForAskAiOpens = chatListensForAskAiOpens; exports.ASK_AI_TRIGGER_ATTRIBUTE = ASK_AI_TRIGGER_ATTRIBUTE; exports.onAskAiIntent = onAskAiIntent; exports.ChatAppearanceContext = ChatAppearanceContext; exports.useChatAppearance = useChatAppearance; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; exports.AiAssistantInfo = AiAssistantInfo; exports.TicketEscalatedMessage = TicketEscalatedMessage; exports.MESSAGE_TYPE = MESSAGE_TYPE; exports.SCROLL_ANCHOR = SCROLL_ANCHOR; exports.TICKET_EVENT_KIND = TICKET_EVENT_KIND; exports.TicketEventMessage = TicketEventMessage; exports.SystemEventMessage = SystemEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ChatPanelContext = ChatPanelContext; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.SuggestionsDisplay = SuggestionsDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.LoadingFallback = LoadingFallback; exports.LoadingSuspense = LoadingSuspense; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_BAR_CLASS = CONTEXT_BACK_BAR_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; exports.ContextItemsList = ContextItemsList; exports.ContextErrorBoundary = ContextErrorBoundary; exports.CHAT_CONTEXT_ITEMS_DEFAULT_MAX = CHAT_CONTEXT_ITEMS_DEFAULT_MAX; exports.ChatComposerPlusMenu = ChatComposerPlusMenu; exports.ChatContextPicker = ChatContextPicker; exports.ChatContextChipStrip = ChatContextChipStrip; exports.BlockCard = BlockCard; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.CHAT_MESSAGE_LIST_SKELETON_MESSAGES = CHAT_MESSAGE_LIST_SKELETON_MESSAGES; exports.ChatMessageList = ChatMessageList; exports.byKey = byKey; exports.getPlatformProductionUrl = getPlatformProductionUrl; exports.getPlatformUrl = getPlatformUrl; exports.getDeploymentUrl = getDeploymentUrl; exports.isLocalUrl = isLocalUrl; exports.getRequestOrigin = getRequestOrigin; exports.resolveRedirectTarget = resolveRedirectTarget; exports.getAllPlatformBaseDomains = getAllPlatformBaseDomains; exports.DESIGN_DOC_READINESS = DESIGN_DOC_READINESS; exports.DESIGN_DOC_READINESS_DISPLAY = DESIGN_DOC_READINESS_DISPLAY; exports.designDocReadiness = designDocReadiness; exports.formatCompletionLabel = formatCompletionLabel; exports.formatCompletionLabelWithBlockers = formatCompletionLabelWithBlockers; exports.SOURCE_ICON_NAMES = SOURCE_ICON_NAMES; exports.getSourceIconName = getSourceIconName; exports.SOURCE_LABELS_BY_TABLE = SOURCE_LABELS_BY_TABLE; exports.getSourceLabel = getSourceLabel; exports.DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID; exports.defaultTableIdForDocumentType = defaultTableIdForDocumentType; exports.DOC_TABLE_TYPES = DOC_TABLE_TYPES; exports.groupsByTable = groupsByTable; exports.recordCountLabel = recordCountLabel; exports.buildGroupedSource = buildGroupedSource; exports.groupSourcesByTable = groupSourcesByTable; exports.formatCitationIndices = formatCitationIndices; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX; exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM; exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME; exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl; exports.escapeMarkdownInline = escapeMarkdownInline; exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED; exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN; exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown; exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.flattenAssistantContent = flattenAssistantContent; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.clickupTaskUrl = clickupTaskUrl; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; exports.useMarqueeSync = useMarqueeSync; exports.getMarqueeTrackOffset = getMarqueeTrackOffset; exports.getMarqueeAppliedOffset = getMarqueeAppliedOffset; exports.getMarqueeCloneTwin = getMarqueeCloneTwin; exports.MarqueeWallFades = MarqueeWallFades; exports.MarqueeWall = MarqueeWall; exports.WALL_SKELETON_LABEL_CH = WALL_SKELETON_LABEL_CH; exports.interleave = interleave; exports.QuickActionWall = QuickActionWall; exports.chatDialogMenuItems = chatDialogMenuItems; exports.ChatListEmptyState = ChatListEmptyState; exports.CHAT_HISTORY_PAGE_SIZE = CHAT_HISTORY_PAGE_SIZE; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.MingoArchiveList = MingoArchiveList; exports.MingoChatHeader = MingoChatHeader; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.MingoChatRail = MingoChatRail; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatPanelHeader = ChatPanelHeader; exports.CHAT_ATTACHMENT_MIME_TYPES = CHAT_ATTACHMENT_MIME_TYPES; exports.CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER; exports.ChatAttachmentAddButton = ChatAttachmentAddButton; exports.ChatAttachmentChipStrip = ChatAttachmentChipStrip; exports.ChatContextMemoryBar = ChatContextMemoryBar; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.ModelDisplay = ModelDisplay; exports.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.executeNavigation = executeNavigation; exports.executeNavigationImperative = executeNavigationImperative; exports.handleChatNavClick = handleChatNavClick; exports.useNavLinkViaRuntime = useNavLinkViaRuntime; exports.NavLinkAnchorViaRuntime = NavLinkAnchorViaRuntime; exports.SourceActionButton = SourceActionButton; exports.getCaptionsUrl = getCaptionsUrl; exports.rebaseCaptionsUrl = rebaseCaptionsUrl; exports.buildCaptionsUrl = buildCaptionsUrl; exports.getEntityCaptionUrls = getEntityCaptionUrls; exports.getEntityCaptionUrlsById = getEntityCaptionUrlsById; exports.captionsEntityTypeForDocType = captionsEntityTypeForDocType; exports.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; exports.RATIO_GRID_CLASS = RATIO_GRID_CLASS; exports.RATIO_TO_CSS_ASPECT = RATIO_TO_CSS_ASPECT; exports.RatioTabs = RatioTabs; exports.detectAspectRatio = detectAspectRatio; exports.ratioToCategory = ratioToCategory; exports.groupByAspectRatio = groupByAspectRatio; exports.VIDEO_BITES_CARD_HEIGHT_DESKTOP_PX = VIDEO_BITES_CARD_HEIGHT_DESKTOP_PX; exports.VIDEO_BITES_CARD_HEIGHT_MOBILE_PX = VIDEO_BITES_CARD_HEIGHT_MOBILE_PX; exports.STRIP_LINE_MAX_PX = STRIP_LINE_MAX_PX; exports.VIDEO_BITES_SKELETON_COUNT = VIDEO_BITES_SKELETON_COUNT; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.designDocPeople = designDocPeople; exports.designDocMetaLine = designDocMetaLine; exports.DesignDocCard = DesignDocCard; exports.GitHubActivityCard = GitHubActivityCard; exports.getVendorLogo = getVendorLogo; exports.VendorIcon = VendorIcon; exports.useChatCardItem = useChatCardItem; exports.MingoInfoCardActionProvider = MingoInfoCardActionProvider; exports.readFetchedCardTitle = readFetchedCardTitle; exports.readFetchedCardPath = readFetchedCardPath; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.sourceRowCtxFromRuntime = sourceRowCtxFromRuntime; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.resolveCardDestination = resolveCardDestination; exports.chatCardLabel = chatCardLabel; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.EMPTY_DIALOG_CAPABILITIES = EMPTY_DIALOG_CAPABILITIES; exports.useChunkCatchup = useChunkCatchup; exports.useNatsDialogSubscription = useNatsDialogSubscription; exports.buildNatsWsUrl = buildNatsWsUrl; exports.fetchSlashCommands = fetchSlashCommands; exports.useSlashCommands = useSlashCommands; exports.useSlashCommandRegistry = useSlashCommandRegistry; exports.fetchEmptyStateConfig = fetchEmptyStateConfig; exports.useEmptyStateConfig = useEmptyStateConfig; exports.useChatAttachments = useChatAttachments; exports.useChatAttachmentImageGallery = useChatAttachmentImageGallery; exports.ChatIdentityProvider = ChatIdentityProvider; exports.useChatIdentity = useChatIdentity; exports.useCloseOnNavigation = useCloseOnNavigation; exports.useWhatToAsk = useWhatToAsk; exports.awaitsDecision = awaitsDecision; exports.mergeByTime = mergeByTime; exports.chatProgressLabel = chatProgressLabel; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; exports.createEmptyTurnMeta = createEmptyTurnMeta; exports.createChatStreamReducer = createChatStreamReducer; exports.DEFAULT_DIALOG_SIDE = DEFAULT_DIALOG_SIDE; exports.DEFAULT_MAX_REDUCERS = DEFAULT_MAX_REDUCERS; exports.MAX_PENDING_RETAIN_KEYS = MAX_PENDING_RETAIN_KEYS; exports.createChatDialogStore = createChatDialogStore; exports.createDeltaBatcher = createDeltaBatcher; exports.useChatStreamReducer = useChatStreamReducer; exports.createChatConversationsApi = createChatConversationsApi; exports.buildDiscussPrompt = buildDiscussPrompt; exports.useManagedDialogList = useManagedDialogList; exports.useSseChatAdapter = useSseChatAdapter; exports.extractIncompleteMessageState = extractIncompleteMessageState; exports.extractIncompleteTailState = extractIncompleteTailState; exports.decodeHistoricalMessageData = decodeHistoricalMessageData; exports.processHistoricalMessages = processHistoricalMessages; exports.extractErrorMessages = extractErrorMessages; exports.processHistoricalMessagesWithErrors = processHistoricalMessagesWithErrors; exports.mapProcessedToUnified = mapProcessedToUnified; exports.historicalToUnified = historicalToUnified; exports.useNatsChatAdapter = useNatsChatAdapter; exports.useStableShallow = useStableShallow; exports.useUnifiedChat = useUnifiedChat; exports.chatChipClass = chatChipClass; exports.MINGO_V2_RAIL_WIDTH = MINGO_V2_RAIL_WIDTH; exports.CHAT_BLOCK_MIN_WIDTH = CHAT_BLOCK_MIN_WIDTH; exports.MINGO_V2_SPLIT_WIDTH = MINGO_V2_SPLIT_WIDTH;
19980
+
19981
+
19982
+
19983
+
19984
+
19985
+
19986
+
19987
+
19988
+
19989
+
19990
+ exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.TextHold = TextHold; exports.LayoutHold = LayoutHold; exports.AUTHORED_LINK_REL_TOKENS = AUTHORED_LINK_REL_TOKENS; exports.authoredRelTokens = authoredRelTokens; exports.isNofollowRel = isNofollowRel; exports.renderedLinkRel = renderedLinkRel; exports.findMarkdownLinkAt = findMarkdownLinkAt; exports.formatMarkdownLink = formatMarkdownLink; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.MARKDOWN_H1_CLASS = MARKDOWN_H1_CLASS; exports.MARKDOWN_H2_CLASS = MARKDOWN_H2_CLASS; exports.MARKDOWN_PARAGRAPH_CLASS = MARKDOWN_PARAGRAPH_CLASS; exports.hasRenderableSrc = hasRenderableSrc; exports.buildStandardLeafRenderers = buildStandardLeafRenderers; exports.SAFE_HTML_TAGS = SAFE_HTML_TAGS; exports.SVG_TAGS = SVG_TAGS; exports.buildEffectiveTagSet = buildEffectiveTagSet; exports.buildSanitizeSchema = buildSanitizeSchema; exports.rehypeStripUnsafe = rehypeStripUnsafe; exports.escapeUnknownHtmlTags = escapeUnknownHtmlTags; exports.cardAwareUrlTransform = cardAwareUrlTransform; exports.splitStreamingBlocks = splitStreamingBlocks; exports.completeStreamingTail = completeStreamingTail; exports.TEXT_SIZE_PRESETS = TEXT_SIZE_PRESETS; exports.resolveTextSizeConfig = resolveTextSizeConfig; exports.NO_BROKEN_LINKS = NO_BROKEN_LINKS; exports.MARKDOWN_SKELETON_LINES = MARKDOWN_SKELETON_LINES; exports.MARKDOWN_RENDERER_CLASS = MARKDOWN_RENDERER_CLASS; exports.MarkdownEngine = MarkdownEngine; exports.MarkdownEngineSkeleton = MarkdownEngineSkeleton; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.ASK_AI_OPEN_EVENT = ASK_AI_OPEN_EVENT; exports.ASK_AI_OPEN_WITH_REF_EVENT = ASK_AI_OPEN_WITH_REF_EVENT; exports.ASK_AI_OPEN_EVENTS = ASK_AI_OPEN_EVENTS; exports.holdAskAiOpens = holdAskAiOpens; exports.askAiOpenIsHeld = askAiOpenIsHeld; exports.chatListensForAskAiOpens = chatListensForAskAiOpens; exports.ASK_AI_TRIGGER_ATTRIBUTE = ASK_AI_TRIGGER_ATTRIBUTE; exports.onAskAiIntent = onAskAiIntent; exports.ChatAppearanceContext = ChatAppearanceContext; exports.useChatAppearance = useChatAppearance; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; exports.AiAssistantInfo = AiAssistantInfo; exports.TicketEscalatedMessage = TicketEscalatedMessage; exports.MESSAGE_TYPE = MESSAGE_TYPE; exports.SCROLL_ANCHOR = SCROLL_ANCHOR; exports.TICKET_EVENT_KIND = TICKET_EVENT_KIND; exports.TicketEventMessage = TicketEventMessage; exports.SystemEventMessage = SystemEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ChatPanelContext = ChatPanelContext; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.SuggestionsDisplay = SuggestionsDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.LoadingFallback = LoadingFallback; exports.LoadingSuspense = LoadingSuspense; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_BAR_CLASS = CONTEXT_BACK_BAR_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; exports.ContextItemsList = ContextItemsList; exports.ContextErrorBoundary = ContextErrorBoundary; exports.CHAT_CONTEXT_ITEMS_DEFAULT_MAX = CHAT_CONTEXT_ITEMS_DEFAULT_MAX; exports.ChatComposerPlusMenu = ChatComposerPlusMenu; exports.ChatContextPicker = ChatContextPicker; exports.ChatContextChipStrip = ChatContextChipStrip; exports.BlockCard = BlockCard; exports.InlineChip = InlineChip; exports.InlineAppLinkChip = InlineAppLinkChip; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.CHAT_MESSAGE_LIST_SKELETON_MESSAGES = CHAT_MESSAGE_LIST_SKELETON_MESSAGES; exports.ChatMessageList = ChatMessageList; exports.byKey = byKey; exports.getPlatformProductionUrl = getPlatformProductionUrl; exports.getPlatformUrl = getPlatformUrl; exports.getDeploymentUrl = getDeploymentUrl; exports.isLocalUrl = isLocalUrl; exports.getRequestOrigin = getRequestOrigin; exports.resolveRedirectTarget = resolveRedirectTarget; exports.getAllPlatformBaseDomains = getAllPlatformBaseDomains; exports.DESIGN_DOC_READINESS = DESIGN_DOC_READINESS; exports.DESIGN_DOC_READINESS_DISPLAY = DESIGN_DOC_READINESS_DISPLAY; exports.designDocReadiness = designDocReadiness; exports.formatCompletionLabel = formatCompletionLabel; exports.formatCompletionLabelWithBlockers = formatCompletionLabelWithBlockers; exports.SOURCE_ICON_NAMES = SOURCE_ICON_NAMES; exports.getSourceIconName = getSourceIconName; exports.SOURCE_LABELS_BY_TABLE = SOURCE_LABELS_BY_TABLE; exports.getSourceLabel = getSourceLabel; exports.DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID; exports.defaultTableIdForDocumentType = defaultTableIdForDocumentType; exports.DOC_TABLE_TYPES = DOC_TABLE_TYPES; exports.groupsByTable = groupsByTable; exports.recordCountLabel = recordCountLabel; exports.buildGroupedSource = buildGroupedSource; exports.groupSourcesByTable = groupSourcesByTable; exports.formatCitationIndices = formatCitationIndices; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX; exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM; exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME; exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl; exports.escapeMarkdownInline = escapeMarkdownInline; exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED; exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN; exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown; exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.flattenAssistantContent = flattenAssistantContent; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.clickupTaskUrl = clickupTaskUrl; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; exports.useMarqueeSync = useMarqueeSync; exports.getMarqueeTrackOffset = getMarqueeTrackOffset; exports.getMarqueeAppliedOffset = getMarqueeAppliedOffset; exports.getMarqueeCloneTwin = getMarqueeCloneTwin; exports.MarqueeWallFades = MarqueeWallFades; exports.MarqueeWall = MarqueeWall; exports.WALL_SKELETON_LABEL_CH = WALL_SKELETON_LABEL_CH; exports.interleave = interleave; exports.QuickActionWall = QuickActionWall; exports.chatDialogMenuItems = chatDialogMenuItems; exports.ChatListEmptyState = ChatListEmptyState; exports.CHAT_HISTORY_PAGE_SIZE = CHAT_HISTORY_PAGE_SIZE; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.MingoArchiveList = MingoArchiveList; exports.MingoChatHeader = MingoChatHeader; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.MingoChatRail = MingoChatRail; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatPanelHeader = ChatPanelHeader; exports.CHAT_ATTACHMENT_MIME_TYPES = CHAT_ATTACHMENT_MIME_TYPES; exports.CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER; exports.ChatAttachmentAddButton = ChatAttachmentAddButton; exports.ChatAttachmentChipStrip = ChatAttachmentChipStrip; exports.ChatContextMemoryBar = ChatContextMemoryBar; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.ModelDisplay = ModelDisplay; exports.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.executeNavigation = executeNavigation; exports.executeNavigationImperative = executeNavigationImperative; exports.handleChatNavClick = handleChatNavClick; exports.useNavLinkViaRuntime = useNavLinkViaRuntime; exports.NavLinkAnchorViaRuntime = NavLinkAnchorViaRuntime; exports.SourceActionButton = SourceActionButton; exports.getCaptionsUrl = getCaptionsUrl; exports.rebaseCaptionsUrl = rebaseCaptionsUrl; exports.buildCaptionsUrl = buildCaptionsUrl; exports.getEntityCaptionUrls = getEntityCaptionUrls; exports.getEntityCaptionUrlsById = getEntityCaptionUrlsById; exports.captionsEntityTypeForDocType = captionsEntityTypeForDocType; exports.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; exports.RATIO_GRID_CLASS = RATIO_GRID_CLASS; exports.RATIO_TO_CSS_ASPECT = RATIO_TO_CSS_ASPECT; exports.RatioTabs = RatioTabs; exports.detectAspectRatio = detectAspectRatio; exports.ratioToCategory = ratioToCategory; exports.groupByAspectRatio = groupByAspectRatio; exports.VIDEO_BITES_CARD_HEIGHT_DESKTOP_PX = VIDEO_BITES_CARD_HEIGHT_DESKTOP_PX; exports.VIDEO_BITES_CARD_HEIGHT_MOBILE_PX = VIDEO_BITES_CARD_HEIGHT_MOBILE_PX; exports.STRIP_LINE_MAX_PX = STRIP_LINE_MAX_PX; exports.VIDEO_BITES_SKELETON_COUNT = VIDEO_BITES_SKELETON_COUNT; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.CHAT_CARD_DISCLOSURE = CHAT_CARD_DISCLOSURE; exports.CHAT_CARD_DISCLOSURES = CHAT_CARD_DISCLOSURES; exports.chatCardDisclosureOf = chatCardDisclosureOf; exports.ChatCardDisclosureButton = ChatCardDisclosureButton; exports.useChatCardDisclosure = useChatCardDisclosure; exports.ChatCardDisclosureRow = ChatCardDisclosureRow; exports.designDocPeople = designDocPeople; exports.designDocMetaLine = designDocMetaLine; exports.DesignDocCard = DesignDocCard; exports.GitHubActivityCard = GitHubActivityCard; exports.getVendorLogo = getVendorLogo; exports.VendorIcon = VendorIcon; exports.useChatCardItem = useChatCardItem; exports.MingoInfoCardActionProvider = MingoInfoCardActionProvider; exports.readFetchedCardTitle = readFetchedCardTitle; exports.readFetchedCardPath = readFetchedCardPath; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.sourceRowCtxFromRuntime = sourceRowCtxFromRuntime; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.resolveCardDestination = resolveCardDestination; exports.chatCardLabel = chatCardLabel; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.EMPTY_DIALOG_CAPABILITIES = EMPTY_DIALOG_CAPABILITIES; exports.useChunkCatchup = useChunkCatchup; exports.useNatsDialogSubscription = useNatsDialogSubscription; exports.buildNatsWsUrl = buildNatsWsUrl; exports.fetchSlashCommands = fetchSlashCommands; exports.useSlashCommands = useSlashCommands; exports.useSlashCommandRegistry = useSlashCommandRegistry; exports.fetchEmptyStateConfig = fetchEmptyStateConfig; exports.useEmptyStateConfig = useEmptyStateConfig; exports.useChatAttachments = useChatAttachments; exports.useChatAttachmentImageGallery = useChatAttachmentImageGallery; exports.ChatIdentityProvider = ChatIdentityProvider; exports.useChatIdentity = useChatIdentity; exports.useCloseOnNavigation = useCloseOnNavigation; exports.useWhatToAsk = useWhatToAsk; exports.awaitsDecision = awaitsDecision; exports.mergeByTime = mergeByTime; exports.chatProgressLabel = chatProgressLabel; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; exports.createEmptyTurnMeta = createEmptyTurnMeta; exports.createChatStreamReducer = createChatStreamReducer; exports.DEFAULT_DIALOG_SIDE = DEFAULT_DIALOG_SIDE; exports.DEFAULT_MAX_REDUCERS = DEFAULT_MAX_REDUCERS; exports.MAX_PENDING_RETAIN_KEYS = MAX_PENDING_RETAIN_KEYS; exports.createChatDialogStore = createChatDialogStore; exports.createDeltaBatcher = createDeltaBatcher; exports.useChatStreamReducer = useChatStreamReducer; exports.createChatConversationsApi = createChatConversationsApi; exports.buildDiscussPrompt = buildDiscussPrompt; exports.useManagedDialogList = useManagedDialogList; exports.useSseChatAdapter = useSseChatAdapter; exports.extractIncompleteMessageState = extractIncompleteMessageState; exports.extractIncompleteTailState = extractIncompleteTailState; exports.decodeHistoricalMessageData = decodeHistoricalMessageData; exports.processHistoricalMessages = processHistoricalMessages; exports.extractErrorMessages = extractErrorMessages; exports.processHistoricalMessagesWithErrors = processHistoricalMessagesWithErrors; exports.mapProcessedToUnified = mapProcessedToUnified; exports.historicalToUnified = historicalToUnified; exports.useNatsChatAdapter = useNatsChatAdapter; exports.useStableShallow = useStableShallow; exports.useUnifiedChat = useUnifiedChat; exports.chatChipClass = chatChipClass; exports.MINGO_V2_RAIL_WIDTH = MINGO_V2_RAIL_WIDTH; exports.CHAT_BLOCK_MIN_WIDTH = CHAT_BLOCK_MIN_WIDTH; exports.MINGO_V2_SPLIT_WIDTH = MINGO_V2_SPLIT_WIDTH;