@flamingo-stack/openframe-frontend-core 0.0.817 → 0.0.818

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 (64) hide show
  1. package/dist/{chunk-7KBHLP4E.cjs → chunk-4XASD2TL.cjs} +16 -16
  2. package/dist/{chunk-EX7M3VQC.cjs → chunk-5AIOYEXW.cjs} +47 -47
  3. package/dist/{chunk-UFBVOBYR.cjs → chunk-5VRSUEC5.cjs} +10 -10
  4. package/dist/{chunk-BL2J5RJK.cjs → chunk-6QT5K5I5.cjs} +6 -6
  5. package/dist/{chunk-ZP4JMX7G.cjs → chunk-AE22KOW3.cjs} +53 -53
  6. package/dist/{chunk-F2LVBRHC.cjs → chunk-BD42NMCT.cjs} +4 -4
  7. package/dist/{chunk-C2OUXL3Q.cjs → chunk-DGAX5WG2.cjs} +2 -2
  8. package/dist/{chunk-MAHJY2PO.cjs → chunk-DL4HWYIB.cjs} +3 -3
  9. package/dist/{chunk-24M2JYM5.cjs → chunk-IQCHV7Z2.cjs} +238 -282
  10. package/dist/{chunk-4ROR52OW.cjs → chunk-JTBJB4JF.cjs} +9 -9
  11. package/dist/{chunk-JMOCM2SW.cjs → chunk-NEXMK6OP.cjs} +4 -4
  12. package/dist/{chunk-6F4YGHGM.cjs → chunk-NWIEZUM7.cjs} +19 -19
  13. package/dist/{chunk-5TSYOIIZ.cjs → chunk-U2THWP25.cjs} +32 -32
  14. package/dist/{chunk-RDHF3F5R.cjs → chunk-VGZXB3SY.cjs} +3 -3
  15. package/dist/{chunk-TKEYWSDZ.cjs → chunk-VRXDTRIY.cjs} +39 -39
  16. package/dist/{chunk-P7JQGOX4.cjs → chunk-YHPUD4PM.cjs} +11 -11
  17. package/dist/{chunk-IOFIHVVW.cjs → chunk-YMPPE322.cjs} +107 -107
  18. package/dist/{chunk-DSBRWP5M.cjs → chunk-ZWAVMZIF.cjs} +7 -7
  19. package/dist/{cloud-tenants-NMAXIJLL.cjs → cloud-tenants-V6EV4OGK.cjs} +4 -4
  20. package/dist/components/case-studies/index.cjs +16 -16
  21. package/dist/components/chat/embeddable-chat.d.ts +0 -8
  22. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  23. package/dist/components/chat/embeddable-chat.js +10 -67
  24. package/dist/components/chat/entity-cards/dispatch.d.ts +3 -10
  25. package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
  26. package/dist/components/chat/entity-cards/dispatch.js +4 -23
  27. package/dist/components/chat/index.cjs +3 -3
  28. package/dist/components/chat/types/entities/data-room-doc.d.ts +0 -12
  29. package/dist/components/chat/types/entities/data-room-doc.d.ts.map +1 -1
  30. package/dist/components/chat/utils/source-row-cta.d.ts +9 -48
  31. package/dist/components/chat/utils/source-row-cta.d.ts.map +1 -1
  32. package/dist/components/chat/utils/source-row-cta.js +7 -32
  33. package/dist/components/contact/index.cjs +5 -5
  34. package/dist/components/docs/index.cjs +8 -8
  35. package/dist/components/embeds/index.cjs +5 -5
  36. package/dist/components/faq/index.cjs +6 -6
  37. package/dist/components/features/index.cjs +4 -4
  38. package/dist/components/help-center-pages/index.cjs +61 -61
  39. package/dist/components/index.cjs +37 -37
  40. package/dist/components/meeting-scheduler/index.cjs +29 -29
  41. package/dist/components/navigation/index.cjs +7 -7
  42. package/dist/components/onboarding-guides/index.cjs +6 -6
  43. package/dist/components/product-demo/index.cjs +13 -13
  44. package/dist/components/tickets/index.cjs +9 -9
  45. package/dist/components/ui/index.cjs +4 -4
  46. package/dist/contexts/chat-runtime-context.d.ts +3 -14
  47. package/dist/contexts/chat-runtime-context.d.ts.map +1 -1
  48. package/dist/{devices-QBKWVHE6.cjs → devices-6KZAJAAS.cjs} +5 -5
  49. package/dist/{embeddable-chat-WNPCPMDL.cjs → embeddable-chat-5IHA5SUZ.cjs} +69 -126
  50. package/dist/index.cjs +8 -8
  51. package/dist/{knowledge-FSAYWM25.cjs → knowledge-I7FDQQYJ.cjs} +5 -5
  52. package/dist/{logs-OZX4SYHG.cjs → logs-Q7PAVJUG.cjs} +12 -12
  53. package/dist/{policies-LPCUCTLX.cjs → policies-C3DW5CHS.cjs} +8 -8
  54. package/dist/{scripts-ZNFZSONW.cjs → scripts-BET663HD.cjs} +9 -9
  55. package/dist/{software-update-BRYOVQVY.cjs → software-update-W7ZQXEPK.cjs} +7 -7
  56. package/dist/utils/source-grouping.d.ts +2 -2
  57. package/package.json +1 -1
  58. package/src/components/chat/embeddable-chat.tsx +10 -74
  59. package/src/components/chat/entity-cards/data-room-doc-card.tsx +1 -1
  60. package/src/components/chat/entity-cards/dispatch.tsx +6 -31
  61. package/src/components/chat/types/entities/data-room-doc.ts +0 -12
  62. package/src/components/chat/utils/source-row-cta.ts +21 -102
  63. package/src/contexts/chat-runtime-context.tsx +3 -11
  64. package/src/utils/source-grouping.ts +2 -2
@@ -346,7 +346,6 @@ var _chunkRUHKTWGBcjs = require('./chunk-RUHKTWGB.cjs');
346
346
 
347
347
 
348
348
 
349
-
350
349
  var _chunkDVHSYPDBcjs = require('./chunk-DVHSYPDB.cjs');
351
350
 
352
351
 
@@ -11742,14 +11741,8 @@ function resolveFetchedCardHref({
11742
11741
  function sanitizePath(path) {
11743
11742
  return (path || "").replace(/[^a-zA-Z0-9/_\-.]/g, "");
11744
11743
  }
11745
- function sourceRowCtxFromRuntime(runtime, surface = {}) {
11746
- return {
11747
- currentPlatform: _nullishCoalesce(runtime.source, () => ( null)),
11748
- composeContentUrl: runtime.composeContentUrl,
11749
- docPlatformTargets: runtime.docPlatformTargets,
11750
- baseRoute: surface.baseRoute,
11751
- chipBasePlatform: surface.chipBasePlatform
11752
- };
11744
+ function sourceRowCtxFromRuntime(runtime) {
11745
+ return { composeContentUrl: runtime.composeContentUrl };
11753
11746
  }
11754
11747
  function pickSourceIcon(sourceRepo, documentType) {
11755
11748
  const iconName = sourceRepo ? getSourceIconName(sourceRepo) : void 0;
@@ -11757,7 +11750,7 @@ function pickSourceIcon(sourceRepo, documentType) {
11757
11750
  const iconLabel = _nullishCoalesce(documentType, () => ( "Source"));
11758
11751
  return { icon, iconLabel };
11759
11752
  }
11760
- function shouldFallbackToPathNav(row) {
11753
+ function isDocRow(row) {
11761
11754
  return !!row.documentType && DOC_TABLE_TYPES.includes(row.documentType);
11762
11755
  }
11763
11756
  function resolveSourceRowCTA(row, ctx = {}) {
@@ -11766,34 +11759,16 @@ function resolveSourceRowCTA(row, ctx = {}) {
11766
11759
  let href = null;
11767
11760
  let targetPlatform = null;
11768
11761
  const idValue = (_nullishCoalesce(row.id, () => ( ""))).trim();
11769
- if (row.path && shouldFallbackToPathNav(row) && !row.externalUrl) {
11770
- const safePath = sanitizePath(row.path);
11771
- if (safePath) {
11772
- const docTarget = row.documentType ? _optionalChain([ctx, 'access', _245 => _245.docPlatformTargets, 'optionalAccess', _246 => _246[row.documentType]]) : void 0;
11773
- if (docTarget) {
11774
- const seg = docTarget.basePath.split("/").filter(Boolean).join("/");
11775
- const base = `${_chunkDVHSYPDBcjs.getPlatformUrl.call(void 0, docTarget.platform)}${seg ? `/${seg}` : ""}/`;
11776
- href = _nullishCoalesce(_chunkUEULXVW2cjs.safeHref.call(void 0, new URL(safePath, base).toString()), () => ( null));
11777
- targetPlatform = docTarget.platform;
11778
- } else if (ctx.chipBasePlatform) {
11779
- const base = `${_chunkDVHSYPDBcjs.getPlatformUrl.call(void 0, ctx.chipBasePlatform)}/knowledge-base/`;
11780
- href = _nullishCoalesce(_chunkUEULXVW2cjs.safeHref.call(void 0, new URL(safePath, base).toString()), () => ( null));
11781
- targetPlatform = ctx.chipBasePlatform;
11782
- } else if (ctx.baseRoute) {
11783
- const synthetic = `https://_internal_.local${ctx.baseRoute.startsWith("/") ? ctx.baseRoute : "/" + ctx.baseRoute}/`;
11784
- const absolute = new URL(safePath, synthetic).toString();
11785
- href = _nullishCoalesce(_chunkUEULXVW2cjs.safeHref.call(void 0, absolute.replace("https://_internal_.local", "")), () => ( null));
11786
- targetPlatform = _nullishCoalesce(ctx.currentPlatform, () => ( null));
11787
- }
11788
- }
11789
- } else if (ctx.composeContentUrl && row.documentType && row.externalUrl) {
11762
+ const docPath = !row.externalUrl && row.path && isDocRow(row) ? sanitizePath(row.path) : "";
11763
+ if (ctx.composeContentUrl && row.documentType && (row.externalUrl || docPath)) {
11790
11764
  const composed = ctx.composeContentUrl({
11791
11765
  // Canonical vocabulary only — a rail-vocab alias would miss the host's
11792
11766
  // `hostedTypes` / `overrides` and fall through to the seam's default
11793
11767
  // `<origin>/<type>/<id>` branch. Same canonicalizer `buildListUrl` uses.
11794
11768
  type: _chunkIM366HS6cjs.canonicalContentRefType.call(void 0, row.documentType),
11795
11769
  identifier: idValue,
11796
- externalUrl: row.externalUrl,
11770
+ ...docPath ? { slug: docPath } : {},
11771
+ externalUrl: _nullishCoalesce(row.externalUrl, () => ( null)),
11797
11772
  targetPlatform: _nullishCoalesce(row.targetPlatform, () => ( null))
11798
11773
  });
11799
11774
  href = composed.href ? _nullishCoalesce(_chunkUEULXVW2cjs.safeHref.call(void 0, composed.href), () => ( null)) : null;
@@ -11838,7 +11813,7 @@ function resolveCardDestination({
11838
11813
  composeContentUrl,
11839
11814
  resolveHref = (href) => href
11840
11815
  }) {
11841
- const refPath = typeof _optionalChain([chatRef, 'access', _247 => _247.metadata, 'optionalAccess', _248 => _248.path]) === "string" && chatRef.metadata.path ? chatRef.metadata.path : null;
11816
+ const refPath = typeof _optionalChain([chatRef, 'access', _245 => _245.metadata, 'optionalAccess', _246 => _246.path]) === "string" && chatRef.metadata.path ? chatRef.metadata.path : null;
11842
11817
  const path = _nullishCoalesce(refPath, () => ( (item ? readFetchedCardPath(item) : null)));
11843
11818
  const cta = resolveSourceRowCTA(
11844
11819
  {
@@ -11855,7 +11830,7 @@ function resolveCardDestination({
11855
11830
  const rowUrl = cta.href ? resolveHref(cta.href) : _nullishCoalesce(chatRef.url, () => ( null));
11856
11831
  const rowPlatform = _nullishCoalesce(_nullishCoalesce(cta.targetPlatform, () => ( chatRef.targetPlatform)), () => ( null));
11857
11832
  if (rowUrl) return { url: rowUrl, targetPlatform: rowPlatform, path, source: "row" };
11858
- if (_optionalChain([entry, 'optionalAccess', _249 => _249.contentRefType]) && item) {
11833
+ if (_optionalChain([entry, 'optionalAccess', _247 => _247.contentRefType]) && item) {
11859
11834
  const choice = pickFetchedCardHref({
11860
11835
  composed: resolveFetchedCardHref({
11861
11836
  contentRefType: entry.contentRefType,
@@ -11863,7 +11838,7 @@ function resolveCardDestination({
11863
11838
  item,
11864
11839
  composeContentUrl
11865
11840
  }),
11866
- itemHref: _nullishCoalesce(_optionalChain([entry, 'access', _250 => _250.fallbackHref, 'optionalCall', _251 => _251(item)]), () => ( null)),
11841
+ itemHref: _nullishCoalesce(_optionalChain([entry, 'access', _248 => _248.fallbackHref, 'optionalCall', _249 => _249(item)]), () => ( null)),
11867
11842
  allowComposed: !entry.noComposedHref
11868
11843
  });
11869
11844
  const url = choice ? _nullishCoalesce(_chunkUEULXVW2cjs.safeHref.call(void 0, choice.href), () => ( null)) : null;
@@ -11957,8 +11932,8 @@ function cardMenuGroups(href, discuss, openDetails, externalLink) {
11957
11932
  if (href) {
11958
11933
  items.push({
11959
11934
  id: "open-details",
11960
- label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _252 => _252.label]), () => ( "Open Details")),
11961
- icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _253 => _253.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMLT7ASAcjs.EyeIcon, { size: 20 }))),
11935
+ label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _250 => _250.label]), () => ( "Open Details")),
11936
+ icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _251 => _251.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMMLT7ASAcjs.EyeIcon, { size: 20 }))),
11962
11937
  // Main row → open the entity (same tab, soft Link nav).
11963
11938
  href,
11964
11939
  // Trailing 40px ↗ side-button → open in a new tab.
@@ -12035,15 +12010,15 @@ function fetchedItemDisplayRef(item, chatRef) {
12035
12010
  }
12036
12011
  function fetchedFaqDisplayRef(item, chatRef) {
12037
12012
  const it = item;
12038
- const answer = typeof _optionalChain([it, 'optionalAccess', _254 => _254.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
12013
+ const answer = typeof _optionalChain([it, 'optionalAccess', _252 => _252.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
12039
12014
  return {
12040
12015
  type: "faq",
12041
12016
  id: chatRef.id,
12042
12017
  sourceRepo: chatRef.sourceRepo,
12043
- title: typeof _optionalChain([it, 'optionalAccess', _255 => _255.question]) === "string" && it.question ? it.question : chatRef.id,
12018
+ title: typeof _optionalChain([it, 'optionalAccess', _253 => _253.question]) === "string" && it.question ? it.question : chatRef.id,
12044
12019
  url: _nullishCoalesce(chatRef.url, () => ( null)),
12045
12020
  ...answer ? { preview: answer.length > 400 ? `${answer.slice(0, 397)}\u2026` : answer } : {},
12046
- metadata: typeof _optionalChain([it, 'optionalAccess', _256 => _256.section]) === "string" && it.section ? { section: it.section } : {}
12021
+ metadata: typeof _optionalChain([it, 'optionalAccess', _254 => _254.section]) === "string" && it.section ? { section: it.section } : {}
12047
12022
  };
12048
12023
  }
12049
12024
  function HubspotTicketChatCard({
@@ -12051,8 +12026,8 @@ function HubspotTicketChatCard({
12051
12026
  isNewTab,
12052
12027
  discuss
12053
12028
  }) {
12054
- const status = typeof _optionalChain([chatRef, 'access', _257 => _257.metadata, 'optionalAccess', _258 => _258.status]) === "string" ? chatRef.metadata.status : void 0;
12055
- const statusLabel = typeof _optionalChain([chatRef, 'access', _259 => _259.metadata, 'optionalAccess', _260 => _260.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
12029
+ const status = typeof _optionalChain([chatRef, 'access', _255 => _255.metadata, 'optionalAccess', _256 => _256.status]) === "string" ? chatRef.metadata.status : void 0;
12030
+ const statusLabel = typeof _optionalChain([chatRef, 'access', _257 => _257.metadata, 'optionalAccess', _258 => _258.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
12056
12031
  const statusText = _nullishCoalesce(statusLabel, () => ( formatStatusToken(status)));
12057
12032
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12058
12033
  MingoInfoCard,
@@ -12075,7 +12050,7 @@ function FaqChatCard({
12075
12050
  isNewTab,
12076
12051
  discuss
12077
12052
  }) {
12078
- const section = typeof _optionalChain([chatRef, 'access', _261 => _261.metadata, 'optionalAccess', _262 => _262.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
12053
+ const section = typeof _optionalChain([chatRef, 'access', _259 => _259.metadata, 'optionalAccess', _260 => _260.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
12079
12054
  const statusLabel = section && section.length > 0 ? section : "FAQ";
12080
12055
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12081
12056
  MingoInfoCard,
@@ -12095,7 +12070,7 @@ function SlackChatCard({
12095
12070
  isNewTab,
12096
12071
  discuss
12097
12072
  }) {
12098
- const channelName = typeof _optionalChain([chatRef, 'access', _263 => _263.metadata, 'optionalAccess', _264 => _264.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
12073
+ const channelName = typeof _optionalChain([chatRef, 'access', _261 => _261.metadata, 'optionalAccess', _262 => _262.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
12099
12074
  const channelPretty = channelName ? channelName.startsWith("#") ? channelName : `#${channelName}` : void 0;
12100
12075
  const title = channelPretty ? `${chatRef.title} \xB7 ${channelPretty}` : chatRef.title;
12101
12076
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -12138,7 +12113,7 @@ function TrustCenterChatCard({
12138
12113
  isNewTab,
12139
12114
  discuss
12140
12115
  }) {
12141
- const raw2 = _optionalChain([item, 'optionalAccess', _265 => _265.frameworks]);
12116
+ const raw2 = _optionalChain([item, 'optionalAccess', _263 => _263.frameworks]);
12142
12117
  const frameworks = Array.isArray(raw2) ? raw2 : [];
12143
12118
  const summary = _chunkIM366HS6cjs.trustFrameworksSummary.call(void 0, frameworks);
12144
12119
  const leadFramework = frameworks[0];
@@ -12187,7 +12162,7 @@ function GenericFinancialChatCard({
12187
12162
  isNewTab,
12188
12163
  discuss
12189
12164
  }) {
12190
- const subtitle = typeof _optionalChain([chatRef, 'access', _266 => _266.metadata, 'optionalAccess', _267 => _267.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
12165
+ const subtitle = typeof _optionalChain([chatRef, 'access', _264 => _264.metadata, 'optionalAccess', _265 => _265.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
12191
12166
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12192
12167
  MingoInfoCard,
12193
12168
  {
@@ -12261,12 +12236,12 @@ function ProductReleaseChatCard({
12261
12236
  discuss
12262
12237
  }) {
12263
12238
  const releaseProps = buildProps(item);
12264
- const status = _optionalChain([item, 'optionalAccess', _268 => _268.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
12239
+ const status = _optionalChain([item, 'optionalAccess', _266 => _266.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
12265
12240
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12266
12241
  EntityMingoCard,
12267
12242
  {
12268
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _269 => _269.title]), () => ( "")),
12269
- description: _optionalChain([item, 'optionalAccess', _270 => _270.summary]) || releaseProps.formattedDate || void 0,
12243
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _267 => _267.title]), () => ( "")),
12244
+ description: _optionalChain([item, 'optionalAccess', _268 => _268.summary]) || releaseProps.formattedDate || void 0,
12270
12245
  cover: releaseProps.coverImage || void 0,
12271
12246
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkX5LU4XQNcjs.Rocket02Icon, { size: 24 }),
12272
12247
  status,
@@ -12283,17 +12258,17 @@ function CampaignChatCard({
12283
12258
  isNewTab,
12284
12259
  discuss
12285
12260
  }) {
12286
- const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _271 => _271.goals])) ? item.goals.length : 0;
12261
+ const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _269 => _269.goals])) ? item.goals.length : 0;
12287
12262
  const meta = [
12288
- _optionalChain([item, 'optionalAccess', _272 => _272.start_date]) ? _chunkIM366HS6cjs.formatDateShort.call(void 0, item.start_date) : null,
12263
+ _optionalChain([item, 'optionalAccess', _270 => _270.start_date]) ? _chunkIM366HS6cjs.formatDateShort.call(void 0, item.start_date) : null,
12289
12264
  goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
12290
12265
  "Marketing campaign"
12291
12266
  ].filter(Boolean).join(" \xB7 ");
12292
12267
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12293
12268
  EntityMingoCard,
12294
12269
  {
12295
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _273 => _273.name]), () => ( "")),
12296
- description: meta || _optionalChain([item, 'optionalAccess', _274 => _274.description]) || void 0,
12270
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _271 => _271.name]), () => ( "")),
12271
+ description: meta || _optionalChain([item, 'optionalAccess', _272 => _272.description]) || void 0,
12297
12272
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6OCFDC2Qcjs.Megaphone01Icon, { size: 24 }),
12298
12273
  chatRef,
12299
12274
  isNewTab,
@@ -12348,14 +12323,14 @@ function BlogChatCard({
12348
12323
  hasEmbeddedVideo,
12349
12324
  discuss
12350
12325
  }) {
12351
- const category = Array.isArray(_optionalChain([item, 'optionalAccess', _275 => _275.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _276 => _276.categories, 'access', _277 => _277.find, 'call', _278 => _278((c) => _optionalChain([c, 'optionalAccess', _279 => _279.name])), 'optionalAccess', _280 => _280.name]), () => ( void 0)) : void 0;
12326
+ const category = Array.isArray(_optionalChain([item, 'optionalAccess', _273 => _273.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _274 => _274.categories, 'access', _275 => _275.find, 'call', _276 => _276((c) => _optionalChain([c, 'optionalAccess', _277 => _277.name])), 'optionalAccess', _278 => _278.name]), () => ( void 0)) : void 0;
12352
12327
  const status = hasEmbeddedVideo ? { label: "Video", variant: "primary" } : category ? { label: category, variant: "grey" } : void 0;
12353
12328
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12354
12329
  EntityMingoCard,
12355
12330
  {
12356
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _281 => _281.title]), () => ( "")),
12357
- description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _282 => _282.summary]), () => ( void 0)),
12358
- cover: entityCover(_optionalChain([item, 'optionalAccess', _283 => _283.featured_image]), ogPlaceholder),
12331
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _279 => _279.title]), () => ( "")),
12332
+ description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _280 => _280.summary]), () => ( void 0)),
12333
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _281 => _281.featured_image]), ogPlaceholder),
12359
12334
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWEAPORE6cjs.NewspaperIcon, { size: 24 }),
12360
12335
  status,
12361
12336
  chatRef,
@@ -12372,13 +12347,13 @@ function CaseStudyChatCard({
12372
12347
  ogPlaceholder,
12373
12348
  discuss
12374
12349
  }) {
12375
- const meta = [_optionalChain([item, 'optionalAccess', _284 => _284.msp, 'optionalAccess', _285 => _285.name]), _optionalChain([item, 'optionalAccess', _286 => _286.user, 'optionalAccess', _287 => _287.full_name])].filter(Boolean).join(" \xB7 ");
12350
+ const meta = [_optionalChain([item, 'optionalAccess', _282 => _282.msp, 'optionalAccess', _283 => _283.name]), _optionalChain([item, 'optionalAccess', _284 => _284.user, 'optionalAccess', _285 => _285.full_name])].filter(Boolean).join(" \xB7 ");
12376
12351
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12377
12352
  EntityMingoCard,
12378
12353
  {
12379
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _288 => _288.title]), () => ( "")),
12380
- description: _optionalChain([item, 'optionalAccess', _289 => _289.summary]) || meta || void 0,
12381
- cover: entityCover(_optionalChain([item, 'optionalAccess', _290 => _290.featured_image]), ogPlaceholder),
12354
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _286 => _286.title]), () => ( "")),
12355
+ description: _optionalChain([item, 'optionalAccess', _287 => _287.summary]) || meta || void 0,
12356
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _288 => _288.featured_image]), ogPlaceholder),
12382
12357
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk44URXY24cjs.TrophyIcon, { size: 24 }),
12383
12358
  status: { label: "Case study", variant: "grey" },
12384
12359
  chatRef,
@@ -12395,13 +12370,13 @@ function CustomerInterviewChatCard({
12395
12370
  ogPlaceholder,
12396
12371
  discuss
12397
12372
  }) {
12398
- const meta = [_optionalChain([item, 'optionalAccess', _291 => _291.user, 'optionalAccess', _292 => _292.full_name]), _optionalChain([item, 'optionalAccess', _293 => _293.msp, 'optionalAccess', _294 => _294.name])].filter(Boolean).join(" \xB7 ");
12373
+ const meta = [_optionalChain([item, 'optionalAccess', _289 => _289.user, 'optionalAccess', _290 => _290.full_name]), _optionalChain([item, 'optionalAccess', _291 => _291.msp, 'optionalAccess', _292 => _292.name])].filter(Boolean).join(" \xB7 ");
12399
12374
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12400
12375
  EntityMingoCard,
12401
12376
  {
12402
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _295 => _295.title]), () => ( "")),
12403
- description: _optionalChain([item, 'optionalAccess', _296 => _296.video_summary]) || meta || void 0,
12404
- cover: entityCover(_optionalChain([item, 'optionalAccess', _297 => _297.featured_image]), ogPlaceholder),
12377
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _293 => _293.title]), () => ( "")),
12378
+ description: _optionalChain([item, 'optionalAccess', _294 => _294.video_summary]) || meta || void 0,
12379
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _295 => _295.featured_image]), ogPlaceholder),
12405
12380
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZL4LQNYXcjs.MicrophoneIcon, { size: 24 }),
12406
12381
  status: { label: "Interview", variant: "grey" },
12407
12382
  chatRef,
@@ -12418,12 +12393,12 @@ function DesignDocChatCard({
12418
12393
  discuss
12419
12394
  }) {
12420
12395
  const displayRef = fetchedItemDisplayRef(item, chatRef);
12421
- const doc = _optionalChain([item, 'optionalAccess', _298 => _298.doc]);
12396
+ const doc = _optionalChain([item, 'optionalAccess', _296 => _296.doc]);
12422
12397
  const readiness = doc ? DESIGN_DOC_READINESS_DISPLAY[designDocReadiness(doc.completion)] : null;
12423
12398
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12424
12399
  MingoInfoCard,
12425
12400
  {
12426
- title: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _299 => _299.title]), () => ( displayRef.title)),
12401
+ title: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _297 => _297.title]), () => ( displayRef.title)),
12427
12402
  description: doc ? [designDocMetaLine(doc), formatCompletionLabel(doc.completion)].join(" \xB7 ") : _nullishCoalesce(displayRef.preview, () => ( void 0)),
12428
12403
  icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkU4USZF42cjs.FileContentIcon, { size: 24 }),
12429
12404
  status: readiness ? { label: readiness.label, variant: readiness.scheme === "success" ? "success" : "grey" } : { label: "Design doc", variant: "grey" },
@@ -12440,13 +12415,13 @@ function InvestorUpdateChatCard({
12440
12415
  ogPlaceholder,
12441
12416
  discuss
12442
12417
  }) {
12443
- const title = _optionalChain([item, 'optionalAccess', _300 => _300.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _301 => _301.update_number]), () => ( "?"))}`;
12418
+ const title = _optionalChain([item, 'optionalAccess', _298 => _298.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _299 => _299.update_number]), () => ( "?"))}`;
12444
12419
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12445
12420
  EntityMingoCard,
12446
12421
  {
12447
12422
  title,
12448
- description: _optionalChain([item, 'optionalAccess', _302 => _302.strategic_update]) || _optionalChain([item, 'optionalAccess', _303 => _303.content]) || _chunkIM366HS6cjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _304 => _304.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _305 => _305.period_end]), () => ( null))) || void 0,
12449
- cover: entityCover(_optionalChain([item, 'optionalAccess', _306 => _306.featured_image]), ogPlaceholder),
12423
+ description: _optionalChain([item, 'optionalAccess', _300 => _300.strategic_update]) || _optionalChain([item, 'optionalAccess', _301 => _301.content]) || _chunkIM366HS6cjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _302 => _302.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _303 => _303.period_end]), () => ( null))) || void 0,
12424
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _304 => _304.featured_image]), ogPlaceholder),
12450
12425
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk37SGOMF5cjs.PresentationLineIcon, { size: 24 }),
12451
12426
  status: { label: "Investor update", variant: "grey" },
12452
12427
  chatRef,
@@ -12463,12 +12438,12 @@ function OnboardingGuideChatCard({
12463
12438
  ogPlaceholder,
12464
12439
  discuss
12465
12440
  }) {
12466
- const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _307 => _307.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _308 => _308.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _309 => _309.og_image_url]), ogPlaceholder)));
12441
+ const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _305 => _305.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _306 => _306.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _307 => _307.og_image_url]), ogPlaceholder)));
12467
12442
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12468
12443
  EntityMingoCard,
12469
12444
  {
12470
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _310 => _310.title]), () => ( "")),
12471
- description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _311 => _311.summary]), () => ( _optionalChain([item, 'optionalAccess', _312 => _312.description]))), () => ( void 0)),
12445
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _308 => _308.title]), () => ( "")),
12446
+ description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _309 => _309.summary]), () => ( _optionalChain([item, 'optionalAccess', _310 => _310.description]))), () => ( void 0)),
12472
12447
  cover,
12473
12448
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZFJDLJSIcjs.CompassIcon, { size: 24 }),
12474
12449
  status: { label: "Guide", variant: "grey" },
@@ -12493,9 +12468,9 @@ function ProgramChatCard({
12493
12468
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12494
12469
  EntityMingoCard,
12495
12470
  {
12496
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _313 => _313.title]), () => ( "")),
12497
- description: meta || _optionalChain([item, 'optionalAccess', _314 => _314.description]) || void 0,
12498
- cover: entityCover(_optionalChain([item, 'optionalAccess', _315 => _315.cover_url]), ogPlaceholder),
12471
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _311 => _311.title]), () => ( "")),
12472
+ description: meta || _optionalChain([item, 'optionalAccess', _312 => _312.description]) || void 0,
12473
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _313 => _313.cover_url]), ogPlaceholder),
12499
12474
  fallbackIcon: icon,
12500
12475
  status: { label, variant: "grey" },
12501
12476
  chatRef,
@@ -12512,10 +12487,10 @@ function RoadmapChatCard({
12512
12487
  cardType,
12513
12488
  discuss
12514
12489
  }) {
12515
- const logoUrl = typeof _optionalChain([item, 'optionalAccess', _316 => _316.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
12516
- const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _317 => _317.customItemId]) != null;
12490
+ const logoUrl = typeof _optionalChain([item, 'optionalAccess', _314 => _314.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
12491
+ const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _315 => _315.customItemId]) != null;
12517
12492
  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, _chunkIM366HS6cjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _318 => _318.customItemId]), className: "size-6" }) : logoUrl ? (
12493
+ const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIM366HS6cjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _316 => _316.customItemId]), className: "size-6" }) : logoUrl ? (
12519
12494
  // Contained (not full-bleed) so the integration logo keeps its aspect
12520
12495
  // ratio inside the bordered icon box — matches RoadmapCard.
12521
12496
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -12536,10 +12511,10 @@ function RoadmapChatCard({
12536
12511
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12537
12512
  EntityMingoCard,
12538
12513
  {
12539
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _319 => _319.title]), () => ( "")),
12540
- description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _320 => _320.description]), () => ( void 0)),
12514
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _317 => _317.title]), () => ( "")),
12515
+ description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _318 => _318.description]), () => ( void 0)),
12541
12516
  fallbackIcon: icon,
12542
- status: statusPill(_optionalChain([item, 'optionalAccess', _321 => _321.status])),
12517
+ status: statusPill(_optionalChain([item, 'optionalAccess', _319 => _319.status])),
12543
12518
  chatRef,
12544
12519
  isNewTab,
12545
12520
  discuss,
@@ -12555,7 +12530,7 @@ function refHydratedEntry(docType, label, renderRef) {
12555
12530
  bareInline: true,
12556
12531
  contentRefType: docType,
12557
12532
  noComposedHref: true,
12558
- fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _322 => _322.url]), () => ( null)),
12533
+ fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _320 => _320.url]), () => ( null)),
12559
12534
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCard, { loading: true, title: "" }),
12560
12535
  render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts)
12561
12536
  };
@@ -12587,7 +12562,7 @@ function financialRegistryEntries() {
12587
12562
  );
12588
12563
  }
12589
12564
  function refText(ref, key) {
12590
- const value = _optionalChain([ref, 'optionalAccess', _323 => _323[key]]);
12565
+ const value = _optionalChain([ref, 'optionalAccess', _321 => _321[key]]);
12591
12566
  return typeof value === "string" && value.length > 0 ? value : null;
12592
12567
  }
12593
12568
  function VendorGlyph({ title, logoUrl }) {
@@ -12633,7 +12608,7 @@ var REF_GLYPH_CARD_CONFIGS = {
12633
12608
  // rate. A glyph card; it opens the pricing page.
12634
12609
  openframe_price: { label: "OpenFrame price" },
12635
12610
  // 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', _324 => _324.title]), () => ( "")), logoUrl: refText(ref, "logo_url") }) }
12611
+ vendor: { label: "Vendor", icon: (ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, VendorGlyph, { title: _nullishCoalesce(_optionalChain([ref, 'optionalAccess', _322 => _322.title]), () => ( "")), logoUrl: refText(ref, "logo_url") }) }
12637
12612
  };
12638
12613
  function sourceGlyph(docType) {
12639
12614
  const { Icon } = resolveSourceIcon({ sourceRepo: defaultTableIdForDocumentType(docType), documentType: docType });
@@ -12652,8 +12627,8 @@ function refGlyphRegistryEntries() {
12652
12627
  title: displayRef.title,
12653
12628
  description: _nullishCoalesce(displayRef.preview, () => ( void 0)),
12654
12629
  cover: entityCover(
12655
- _optionalChain([displayRef, 'access', _325 => _325.metadata, 'optionalAccess', _326 => _326.videoPoster]),
12656
- _nullishCoalesce(_optionalChain([opts, 'access', _327 => _327.extras, 'optionalAccess', _328 => _328.buildOgPlaceholderUrl, 'optionalCall', _329 => _329(_nullishCoalesce(displayRef.title, () => ( "")))]), () => ( null))
12630
+ _optionalChain([displayRef, 'access', _323 => _323.metadata, 'optionalAccess', _324 => _324.videoPoster]),
12631
+ _nullishCoalesce(_optionalChain([opts, 'access', _325 => _325.extras, 'optionalAccess', _326 => _326.buildOgPlaceholderUrl, 'optionalCall', _327 => _327(_nullishCoalesce(displayRef.title, () => ( "")))]), () => ( null))
12657
12632
  ),
12658
12633
  fallbackIcon: glyph(displayRef),
12659
12634
  status: { label: cfg.label, variant: "grey" },
@@ -12668,9 +12643,9 @@ function refGlyphRegistryEntries() {
12668
12643
  }
12669
12644
  function fetchedEmployeeEntryDisplayRef(item, chatRef) {
12670
12645
  const it = item;
12671
- const title = typeof _optionalChain([it, 'optionalAccess', _330 => _330.title]) === "string" && it.title.trim().length > 0 ? it.title.trim() : chatRef.title;
12672
- const author = typeof _optionalChain([it, 'optionalAccess', _331 => _331.author, 'optionalAccess', _332 => _332.full_name]) === "string" ? it.author.full_name.trim() : "";
12673
- const summary = typeof _optionalChain([it, 'optionalAccess', _333 => _333.summary]) === "string" ? it.summary.trim() : "";
12646
+ const title = typeof _optionalChain([it, 'optionalAccess', _328 => _328.title]) === "string" && it.title.trim().length > 0 ? it.title.trim() : chatRef.title;
12647
+ const author = typeof _optionalChain([it, 'optionalAccess', _329 => _329.author, 'optionalAccess', _330 => _330.full_name]) === "string" ? it.author.full_name.trim() : "";
12648
+ const summary = typeof _optionalChain([it, 'optionalAccess', _331 => _331.summary]) === "string" ? it.summary.trim() : "";
12674
12649
  const preview = [author, summary].filter((x) => x.length > 0).join(" \xB7 ");
12675
12650
  return { ...chatRef, title, preview: preview.length > 0 ? preview : chatRef.preview };
12676
12651
  }
@@ -12733,7 +12708,7 @@ function programRegistryEntries() {
12733
12708
  discuss: opts.discuss,
12734
12709
  configKey: cfg.configKey,
12735
12710
  label: cfg.configKey.charAt(0).toUpperCase() + cfg.configKey.slice(1),
12736
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _334 => _334.extras, 'optionalAccess', _335 => _335.buildOgPlaceholderUrl, 'optionalCall', _336 => _336(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _337 => _337.title]), () => ( "")))]), () => ( null))
12711
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _332 => _332.extras, 'optionalAccess', _333 => _333.buildOgPlaceholderUrl, 'optionalCall', _334 => _334(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _335 => _335.title]), () => ( "")))]), () => ( null))
12737
12712
  }
12738
12713
  )
12739
12714
  }));
@@ -12754,7 +12729,7 @@ var ROADMAP_CARD_CONFIGS = {
12754
12729
  // The card's destination IS the ClickUp deep link, derived from the
12755
12730
  // task id post-fetch (the refs frame used to carry it).
12756
12731
  noComposedHref: true,
12757
- fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _338 => _338.id]) != null ? clickupTaskUrl(String(item.id)) : null
12732
+ fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _336 => _336.id]) != null ? clickupTaskUrl(String(item.id)) : null
12758
12733
  }
12759
12734
  };
12760
12735
  function roadmapRegistryEntries() {
@@ -12796,8 +12771,8 @@ var CHAT_CARD_REGISTRY = {
12796
12771
  DeletedDataCard,
12797
12772
  {
12798
12773
  title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : null,
12799
- entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _339 => _339.metadata, 'optionalAccess', _340 => _340.entity_label]), () => ( null)),
12800
- recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _341 => _341.metadata, 'optionalAccess', _342 => _342.recovery_note]), () => ( null))
12774
+ entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _337 => _337.metadata, 'optionalAccess', _338 => _338.entity_label]), () => ( null)),
12775
+ recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _339 => _339.metadata, 'optionalAccess', _340 => _340.recovery_note]), () => ( null))
12801
12776
  }
12802
12777
  )
12803
12778
  },
@@ -12814,7 +12789,7 @@ var CHAT_CARD_REGISTRY = {
12814
12789
  bareInline: true,
12815
12790
  contentRefType: "faq",
12816
12791
  noComposedHref: true,
12817
- fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _343 => _343.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
12792
+ fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _341 => _341.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
12818
12793
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCard, { loading: true, title: "" }),
12819
12794
  render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FaqChatCard, { chatRef: fetchedFaqDisplayRef(item, chatRef), isNewTab: opts.isNewTab, discuss: opts.discuss })
12820
12795
  },
@@ -12861,8 +12836,8 @@ var CHAT_CARD_REGISTRY = {
12861
12836
  chatRef,
12862
12837
  isNewTab: opts.isNewTab,
12863
12838
  discuss: opts.discuss,
12864
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _344 => _344.extras, 'optionalAccess', _345 => _345.buildOgPlaceholderUrl, 'optionalCall', _346 => _346(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _347 => _347.title]), () => ( "")))]), () => ( null)),
12865
- hasEmbeddedVideo: _optionalChain([chatRef, 'access', _348 => _348.metadata, 'optionalAccess', _349 => _349.hasEmbeddedVideo]) === true
12839
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _342 => _342.extras, 'optionalAccess', _343 => _343.buildOgPlaceholderUrl, 'optionalCall', _344 => _344(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _345 => _345.title]), () => ( "")))]), () => ( null)),
12840
+ hasEmbeddedVideo: _optionalChain([chatRef, 'access', _346 => _346.metadata, 'optionalAccess', _347 => _347.hasEmbeddedVideo]) === true
12866
12841
  }
12867
12842
  )
12868
12843
  },
@@ -12879,7 +12854,7 @@ var CHAT_CARD_REGISTRY = {
12879
12854
  chatRef,
12880
12855
  isNewTab: opts.isNewTab,
12881
12856
  discuss: opts.discuss,
12882
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _350 => _350.extras, 'optionalAccess', _351 => _351.buildOgPlaceholderUrl, 'optionalCall', _352 => _352(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _353 => _353.title]), () => ( "")))]), () => ( null))
12857
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _348 => _348.extras, 'optionalAccess', _349 => _349.buildOgPlaceholderUrl, 'optionalCall', _350 => _350(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _351 => _351.title]), () => ( "")))]), () => ( null))
12883
12858
  }
12884
12859
  )
12885
12860
  },
@@ -12888,7 +12863,7 @@ var CHAT_CARD_REGISTRY = {
12888
12863
  contentRefType: "design_doc",
12889
12864
  bareInline: true,
12890
12865
  noComposedHref: true,
12891
- fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _354 => _354.url]), () => ( null)),
12866
+ fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _352 => _352.url]), () => ( null)),
12892
12867
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCard, { loading: true, title: "" }),
12893
12868
  render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DesignDocChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
12894
12869
  },
@@ -12905,7 +12880,7 @@ var CHAT_CARD_REGISTRY = {
12905
12880
  chatRef,
12906
12881
  isNewTab: opts.isNewTab,
12907
12882
  discuss: opts.discuss,
12908
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _355 => _355.extras, 'optionalAccess', _356 => _356.buildOgPlaceholderUrl, 'optionalCall', _357 => _357(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _358 => _358.title]), () => ( "")))]), () => ( null))
12883
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _353 => _353.extras, 'optionalAccess', _354 => _354.buildOgPlaceholderUrl, 'optionalCall', _355 => _355(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _356 => _356.title]), () => ( "")))]), () => ( null))
12909
12884
  }
12910
12885
  )
12911
12886
  },
@@ -12916,7 +12891,7 @@ var CHAT_CARD_REGISTRY = {
12916
12891
  bareInline: true,
12917
12892
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkIM366HS6cjs.ProductReleaseCard, { loading: true, size: "sm" }),
12918
12893
  render: (item, chatRef, opts) => {
12919
- const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _359 => _359.extras, 'optionalAccess', _360 => _360.buildProductReleaseCardProps]), () => ( _chunkIM366HS6cjs.defaultBuildProductReleaseCardProps));
12894
+ const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _357 => _357.extras, 'optionalAccess', _358 => _358.buildProductReleaseCardProps]), () => ( _chunkIM366HS6cjs.defaultBuildProductReleaseCardProps));
12920
12895
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12921
12896
  ProductReleaseChatCard,
12922
12897
  {
@@ -12943,7 +12918,7 @@ var CHAT_CARD_REGISTRY = {
12943
12918
  chatRef,
12944
12919
  isNewTab: opts.isNewTab,
12945
12920
  discuss: opts.discuss,
12946
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _361 => _361.extras, 'optionalAccess', _362 => _362.buildOgPlaceholderUrl, 'optionalCall', _363 => _363(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _364 => _364.title]), () => ( "")))]), () => ( null))
12921
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _359 => _359.extras, 'optionalAccess', _360 => _360.buildOgPlaceholderUrl, 'optionalCall', _361 => _361(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _362 => _362.title]), () => ( "")))]), () => ( null))
12947
12922
  }
12948
12923
  )
12949
12924
  },
@@ -12962,7 +12937,7 @@ var CHAT_CARD_REGISTRY = {
12962
12937
  chatRef,
12963
12938
  isNewTab: opts.isNewTab,
12964
12939
  discuss: opts.discuss,
12965
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _365 => _365.extras, 'optionalAccess', _366 => _366.buildOgPlaceholderUrl, 'optionalCall', _367 => _367(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _368 => _368.title]), () => ( "")))]), () => ( null))
12940
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _363 => _363.extras, 'optionalAccess', _364 => _364.buildOgPlaceholderUrl, 'optionalCall', _365 => _365(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _366 => _366.title]), () => ( "")))]), () => ( null))
12966
12941
  }
12967
12942
  )
12968
12943
  },
@@ -12973,13 +12948,13 @@ var CHAT_CARD_REGISTRY = {
12973
12948
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCard, { loading: true, title: "" }),
12974
12949
  // No public viewer — synthesize the hub-internal admin URL post-fetch
12975
12950
  // so the wrapper + isNewTab computation see the actual destination.
12976
- fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _369 => _369.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
12951
+ fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _367 => _367.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
12977
12952
  render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
12978
12953
  },
12979
12954
  ...roadmapRegistryEntries()
12980
12955
  };
12981
12956
  function chatCardLabel(docType) {
12982
- return _optionalChain([CHAT_CARD_REGISTRY, 'access', _370 => _370[docType], 'optionalAccess', _371 => _371.label]);
12957
+ return _optionalChain([CHAT_CARD_REGISTRY, 'access', _368 => _368[docType], 'optionalAccess', _369 => _369.label]);
12983
12958
  }
12984
12959
  function ChatCardNavWrap({
12985
12960
  href,
@@ -12995,13 +12970,13 @@ function ChatCardNavWrap({
12995
12970
  if (!href) return;
12996
12971
  const targetEl = e.target;
12997
12972
  const host = e.currentTarget;
12998
- if (!_optionalChain([host, 'optionalAccess', _372 => _372.contains, 'call', _373 => _373(targetEl)])) return;
12999
- if (_optionalChain([targetEl, 'optionalAccess', _374 => _374.closest, 'optionalCall', _375 => _375("button")])) return;
13000
- if (!_optionalChain([targetEl, 'optionalAccess', _376 => _376.closest, 'optionalCall', _377 => _377("a")])) return;
12973
+ if (!_optionalChain([host, 'optionalAccess', _370 => _370.contains, 'call', _371 => _371(targetEl)])) return;
12974
+ if (_optionalChain([targetEl, 'optionalAccess', _372 => _372.closest, 'optionalCall', _373 => _373("button")])) return;
12975
+ if (!_optionalChain([targetEl, 'optionalAccess', _374 => _374.closest, 'optionalCall', _375 => _375("a")])) return;
13001
12976
  const handled = _chunkA34UNP5Vcjs.executeNavigation.call(void 0, { event: e, runtime, href, path, targetPlatform, hostRoute });
13002
12977
  if (!handled) return;
13003
12978
  e.stopPropagation();
13004
- if (!isNewTab && _optionalChain([panel, 'optionalAccess', _378 => _378.closeChat])) panel.closeChat();
12979
+ if (!isNewTab && _optionalChain([panel, 'optionalAccess', _376 => _376.closeChat])) panel.closeChat();
13005
12980
  };
13006
12981
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "contents", onClickCapture, children });
13007
12982
  }
@@ -13021,19 +12996,12 @@ function CardWithDisclosure({
13021
12996
  ] })
13022
12997
  );
13023
12998
  }
13024
- function ChatCardLoader({
13025
- chatRef,
13026
- onDiscuss,
13027
- onDisplay,
13028
- baseRoute,
13029
- chipBasePlatform,
13030
- extras
13031
- }) {
12999
+ function ChatCardLoader({ chatRef, onDiscuss, onDisplay, extras }) {
13032
13000
  const runtime = _chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, );
13033
13001
  const entry = CHAT_CARD_REGISTRY[chatRef.type];
13034
13002
  const fetchEntry = entry && entry.contentRefType ? entry : null;
13035
13003
  const { item, isLoading, isError, isFetched } = useChatCardItem(
13036
- _nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _379 => _379.contentRefType]), () => ( "")),
13004
+ _nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _377 => _377.contentRefType]), () => ( "")),
13037
13005
  fetchEntry ? chatRef.id : ""
13038
13006
  );
13039
13007
  if (!entry) return null;
@@ -13041,7 +13009,7 @@ function ChatCardLoader({
13041
13009
  chatRef,
13042
13010
  item: fetchEntry ? item : void 0,
13043
13011
  entry: fetchEntry,
13044
- ctx: sourceRowCtxFromRuntime(runtime, { baseRoute, chipBasePlatform }),
13012
+ ctx: sourceRowCtxFromRuntime(runtime),
13045
13013
  composeContentUrl: runtime.composeContentUrl,
13046
13014
  resolveHref: (href) => _chunkDVHSYPDBcjs.navLinkTarget.call(void 0, runtime, href).href
13047
13015
  });
@@ -13064,13 +13032,11 @@ function ChatCardLoader({
13064
13032
  run: () => discussFn(finalChatRef)
13065
13033
  } : void 0;
13066
13034
  const renderOpts = {
13067
- baseRoute,
13068
- chipBasePlatform,
13069
13035
  extras,
13070
13036
  isNewTab,
13071
13037
  discuss
13072
13038
  };
13073
- const path = typeof _optionalChain([finalChatRef, 'access', _380 => _380.metadata, 'optionalAccess', _381 => _381.path]) === "string" ? finalChatRef.metadata.path : null;
13039
+ const path = typeof _optionalChain([finalChatRef, 'access', _378 => _378.metadata, 'optionalAccess', _379 => _379.path]) === "string" ? finalChatRef.metadata.path : null;
13074
13040
  const navWrap = (children) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13075
13041
  ChatCardNavWrap,
13076
13042
  {
@@ -13102,7 +13068,7 @@ function ChatCardLoader({
13102
13068
  }
13103
13069
  if (isLoading) {
13104
13070
  return finish(
13105
- _nullishCoalesce(_optionalChain([fetchEntry, 'access', _382 => _382.skeleton, 'optionalCall', _383 => _383()]), () => ( null)),
13071
+ _nullishCoalesce(_optionalChain([fetchEntry, 'access', _380 => _380.skeleton, 'optionalCall', _381 => _381()]), () => ( null)),
13106
13072
  entry.disclosure ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatCardDisclosureButton, { kind: entry.disclosure, loading: true }) : void 0,
13107
13073
  true
13108
13074
  );
@@ -13116,7 +13082,7 @@ function ChatCardLoader({
13116
13082
  }
13117
13083
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Not found" });
13118
13084
  }
13119
- const kind = _nullishCoalesce(entry.disclosure, () => ( _optionalChain([chatCardDisclosureOf, 'call', _384 => _384(item, finalChatRef), 'optionalAccess', _385 => _385.kind])));
13085
+ const kind = _nullishCoalesce(entry.disclosure, () => ( _optionalChain([chatCardDisclosureOf, 'call', _382 => _382(item, finalChatRef), 'optionalAccess', _383 => _383.kind])));
13120
13086
  if (kind) {
13121
13087
  const content = CHAT_CARD_DISCLOSURES[kind].fromItem(item, finalChatRef);
13122
13088
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -13131,18 +13097,8 @@ function ChatCardLoader({
13131
13097
  return finish(entry.render(item, finalChatRef, renderOpts));
13132
13098
  }
13133
13099
  function renderChatInlineEntityCard(chatRef, options = {}) {
13134
- const { onDiscuss, onDisplay, baseRoute, chipBasePlatform, extras } = options;
13135
- const loader = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13136
- ChatCardLoader,
13137
- {
13138
- chatRef,
13139
- onDiscuss,
13140
- onDisplay,
13141
- baseRoute,
13142
- chipBasePlatform,
13143
- extras
13144
- }
13145
- );
13100
+ const { onDiscuss, onDisplay, extras } = options;
13101
+ const loader = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ChatCardLoader, { chatRef, onDiscuss, onDisplay, extras });
13146
13102
  if (chatRef.type === "video") {
13147
13103
  const decoded = decodeVideoMarkerId(chatRef.id);
13148
13104
  if (decoded) {
@@ -13397,7 +13353,7 @@ function useChunkCatchup({
13397
13353
  if (catchupRun.current === run) {
13398
13354
  if (currentDialogId !== dialogIdRef.current) {
13399
13355
  catchupRun.current = null;
13400
- if (_optionalChain([pendingCatchupRef, 'access', _386 => _386.current, 'optionalAccess', _387 => _387.dialogId]) === currentDialogId) {
13356
+ if (_optionalChain([pendingCatchupRef, 'access', _384 => _384.current, 'optionalAccess', _385 => _385.dialogId]) === currentDialogId) {
13401
13357
  pendingCatchupRef.current = null;
13402
13358
  }
13403
13359
  } else {
@@ -13408,7 +13364,7 @@ function useChunkCatchup({
13408
13364
  if (pending.dialogId === currentDialogId) {
13409
13365
  rearmForQueuedCatchup();
13410
13366
  try {
13411
- await _optionalChain([catchUpChunksRef, 'access', _388 => _388.current, 'optionalCall', _389 => _389(pending.fromSequenceId)]);
13367
+ await _optionalChain([catchUpChunksRef, 'access', _386 => _386.current, 'optionalCall', _387 => _387(pending.fromSequenceId)]);
13412
13368
  } catch (rerunError) {
13413
13369
  console.error("Queued catch-up re-run failed:", rerunError);
13414
13370
  }
@@ -13559,20 +13515,20 @@ function useNatsDialogSubscription({
13559
13515
  const tearDownSubscriptions = () => {
13560
13516
  subscriptionRefs.current.forEach((sub) => {
13561
13517
  try {
13562
- _optionalChain([sub, 'optionalAccess', _390 => _390.unsubscribe, 'call', _391 => _391()]);
13518
+ _optionalChain([sub, 'optionalAccess', _388 => _388.unsubscribe, 'call', _389 => _389()]);
13563
13519
  } catch (e9) {
13564
13520
  }
13565
13521
  });
13566
13522
  subscriptionRefs.current.clear();
13567
13523
  lastSubscribedDialogIdRef.current = null;
13568
- _optionalChain([abortControllerRef, 'access', _392 => _392.current, 'optionalAccess', _393 => _393.abort, 'call', _394 => _394()]);
13524
+ _optionalChain([abortControllerRef, 'access', _390 => _390.current, 'optionalAccess', _391 => _391.abort, 'call', _392 => _392()]);
13569
13525
  abortControllerRef.current = null;
13570
13526
  };
13571
13527
  const isDisconnectStatus = (status) => status === "closed" || status === "disconnected";
13572
13528
  const lifecycle = _chunkQDB2JO55cjs.startConnectionLifecycle.call(void 0, {
13573
13529
  conn: sharedConn,
13574
13530
  wsUrl,
13575
- onBeforeReconnect: (ctx) => _optionalChain([onBeforeReconnectRef, 'access', _395 => _395.current, 'optionalCall', _396 => _396(ctx)]),
13531
+ onBeforeReconnect: (ctx) => _optionalChain([onBeforeReconnectRef, 'access', _393 => _393.current, 'optionalCall', _394 => _394(ctx)]),
13576
13532
  backoff: reconnectionBackoffRef.current,
13577
13533
  getFreshUrl: () => getNatsWsUrlRef.current(),
13578
13534
  shouldRetryOn: isDisconnectStatus,
@@ -13583,7 +13539,7 @@ function useNatsDialogSubscription({
13583
13539
  setReconnectionCount((c) => c + 1);
13584
13540
  }
13585
13541
  hadConnectionBeforeRef.current = true;
13586
- _optionalChain([onConnectRef, 'access', _397 => _397.current, 'optionalCall', _398 => _398()]);
13542
+ _optionalChain([onConnectRef, 'access', _395 => _395.current, 'optionalCall', _396 => _396()]);
13587
13543
  }
13588
13544
  if (status === "error") {
13589
13545
  console.warn("[NATS] protocol error:", evt.data);
@@ -13593,7 +13549,7 @@ function useNatsDialogSubscription({
13593
13549
  setIsConnected(false);
13594
13550
  setIsSubscribed(false);
13595
13551
  tearDownSubscriptions();
13596
- _optionalChain([onDisconnectRef, 'access', _399 => _399.current, 'optionalCall', _400 => _400()]);
13552
+ _optionalChain([onDisconnectRef, 'access', _397 => _397.current, 'optionalCall', _398 => _398()]);
13597
13553
  }
13598
13554
  }
13599
13555
  });
@@ -13624,13 +13580,13 @@ function useNatsDialogSubscription({
13624
13580
  setIsSubscribed(false);
13625
13581
  subscriptionRefs.current.forEach((sub) => {
13626
13582
  try {
13627
- _optionalChain([sub, 'optionalAccess', _401 => _401.unsubscribe, 'call', _402 => _402()]);
13583
+ _optionalChain([sub, 'optionalAccess', _399 => _399.unsubscribe, 'call', _400 => _400()]);
13628
13584
  } catch (e10) {
13629
13585
  }
13630
13586
  });
13631
13587
  subscriptionRefs.current.clear();
13632
13588
  lastSubscribedDialogIdRef.current = null;
13633
- _optionalChain([abortControllerRef, 'access', _403 => _403.current, 'optionalAccess', _404 => _404.abort, 'call', _405 => _405()]);
13589
+ _optionalChain([abortControllerRef, 'access', _401 => _401.current, 'optionalAccess', _402 => _402.abort, 'call', _403 => _403()]);
13634
13590
  abortControllerRef.current = null;
13635
13591
  }
13636
13592
  return void 0;
@@ -13642,12 +13598,12 @@ function useNatsDialogSubscription({
13642
13598
  if (subscriptionRefs.current.size > 0) {
13643
13599
  subscriptionRefs.current.forEach((sub) => {
13644
13600
  try {
13645
- _optionalChain([sub, 'optionalAccess', _406 => _406.unsubscribe, 'call', _407 => _407()]);
13601
+ _optionalChain([sub, 'optionalAccess', _404 => _404.unsubscribe, 'call', _405 => _405()]);
13646
13602
  } catch (e11) {
13647
13603
  }
13648
13604
  });
13649
13605
  subscriptionRefs.current.clear();
13650
- _optionalChain([abortControllerRef, 'access', _408 => _408.current, 'optionalAccess', _409 => _409.abort, 'call', _410 => _410()]);
13606
+ _optionalChain([abortControllerRef, 'access', _406 => _406.current, 'optionalAccess', _407 => _407.abort, 'call', _408 => _408()]);
13651
13607
  }
13652
13608
  abortControllerRef.current = new AbortController();
13653
13609
  const abort = abortControllerRef.current;
@@ -13677,7 +13633,7 @@ function useNatsDialogSubscription({
13677
13633
  });
13678
13634
  lastSubscribedDialogIdRef.current = dialogId;
13679
13635
  setIsSubscribed(true);
13680
- _optionalChain([onSubscribedRef, 'access', _411 => _411.current, 'optionalCall', _412 => _412()]);
13636
+ _optionalChain([onSubscribedRef, 'access', _409 => _409.current, 'optionalCall', _410 => _410()]);
13681
13637
  };
13682
13638
  if (isConnectedRef.current) {
13683
13639
  createSubscriptions();
@@ -13688,7 +13644,7 @@ function useNatsDialogSubscription({
13688
13644
  abort.abort();
13689
13645
  subscriptions.forEach((sub) => {
13690
13646
  try {
13691
- _optionalChain([sub, 'optionalAccess', _413 => _413.unsubscribe, 'call', _414 => _414()]);
13647
+ _optionalChain([sub, 'optionalAccess', _411 => _411.unsubscribe, 'call', _412 => _412()]);
13692
13648
  } catch (e13) {
13693
13649
  }
13694
13650
  });
@@ -13727,7 +13683,7 @@ function useNatsDialogSubscription({
13727
13683
  });
13728
13684
  lastSubscribedDialogIdRef.current = currentDialogId;
13729
13685
  setIsSubscribed(true);
13730
- _optionalChain([onSubscribedRef, 'access', _415 => _415.current, 'optionalCall', _416 => _416()]);
13686
+ _optionalChain([onSubscribedRef, 'access', _413 => _413.current, 'optionalCall', _414 => _414()]);
13731
13687
  } else if (subscriptionRefs.current.size > 0) {
13732
13688
  setIsSubscribed(true);
13733
13689
  }
@@ -13735,10 +13691,10 @@ function useNatsDialogSubscription({
13735
13691
  return { isConnected, isSubscribed, reconnectionCount };
13736
13692
  }
13737
13693
  function buildNatsWsUrl(apiBaseUrl, options) {
13738
- const path = _optionalChain([options, 'optionalAccess', _417 => _417.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
13694
+ const path = _optionalChain([options, 'optionalAccess', _415 => _415.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
13739
13695
  const u = new URL(path, apiBaseUrl);
13740
13696
  u.protocol = u.protocol === "https:" ? "wss:" : "ws:";
13741
- if (_optionalChain([options, 'optionalAccess', _418 => _418.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _419 => _419.token])) {
13697
+ if (_optionalChain([options, 'optionalAccess', _416 => _416.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _417 => _417.token])) {
13742
13698
  u.searchParams.set("authorization", options.token);
13743
13699
  }
13744
13700
  return u.toString();
@@ -13756,7 +13712,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
13756
13712
  const data = await res.json();
13757
13713
  return _nullishCoalesce(data.commands, () => ( []));
13758
13714
  } catch (err) {
13759
- if (_optionalChain([err, 'optionalAccess', _420 => _420.name]) === "AbortError") throw err;
13715
+ if (_optionalChain([err, 'optionalAccess', _418 => _418.name]) === "AbortError") throw err;
13760
13716
  console.warn("[chat] slash-commands fetch failed, showing none:", err);
13761
13717
  return [];
13762
13718
  }
@@ -13764,8 +13720,8 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
13764
13720
  var NO_COMMANDS = [];
13765
13721
  function useSlashCommands(prefix, commandsUrl) {
13766
13722
  const [answered, setAnswered] = _react.useState.call(void 0, null);
13767
- const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _421 => _421.prefix]) === prefix ? answered.commands : NO_COMMANDS;
13768
- const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _422 => _422.prefix]) !== prefix;
13723
+ const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _419 => _419.prefix]) === prefix ? answered.commands : NO_COMMANDS;
13724
+ const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _420 => _420.prefix]) !== prefix;
13769
13725
  _react.useEffect.call(void 0, () => {
13770
13726
  if (prefix == null) return void 0;
13771
13727
  let cancelled = false;
@@ -13775,7 +13731,7 @@ function useSlashCommands(prefix, commandsUrl) {
13775
13731
  const next = await fetchSlashCommands(prefix, ctrl.signal, commandsUrl);
13776
13732
  if (!cancelled) setAnswered({ prefix, commands: next });
13777
13733
  } catch (err) {
13778
- if (!cancelled && _optionalChain([err, 'optionalAccess', _423 => _423.name]) !== "AbortError") {
13734
+ if (!cancelled && _optionalChain([err, 'optionalAccess', _421 => _421.name]) !== "AbortError") {
13779
13735
  console.warn("[use-slash-commands] fetch failed:", err);
13780
13736
  setAnswered({ prefix, commands: NO_COMMANDS });
13781
13737
  }
@@ -13798,7 +13754,7 @@ function useSlashCommandRegistry(commandsUrl, options) {
13798
13754
  const query = _reactquery.useQuery.call(void 0, {
13799
13755
  queryKey: ["chat-slash-commands", commandsUrl],
13800
13756
  queryFn: ({ signal }) => fetchSlashCommands("", signal, commandsUrl),
13801
- enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _424 => _424.enabled]), () => ( true)),
13757
+ enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _422 => _422.enabled]), () => ( true)),
13802
13758
  staleTime: Infinity,
13803
13759
  gcTime: Infinity,
13804
13760
  // The commands registry is non-critical chrome — a failure degrades to an
@@ -13837,21 +13793,21 @@ async function fetchEmptyStateConfig(signal, emptyStateUrl) {
13837
13793
  }
13838
13794
  const data = await res.json();
13839
13795
  return {
13840
- name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _425 => _425.name]), () => ( null)),
13841
- icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _426 => _426.icon]), () => ( null)),
13842
- greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _427 => _427.greeting]), () => ( null)),
13843
- enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _428 => _428.enabledRagTableIds]), () => ( [])),
13844
- quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _429 => _429.quickActions]), () => ( [])),
13845
- suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _430 => _430.suggestedQueries]), () => ( []))
13796
+ name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _423 => _423.name]), () => ( null)),
13797
+ icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _424 => _424.icon]), () => ( null)),
13798
+ greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _425 => _425.greeting]), () => ( null)),
13799
+ enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _426 => _426.enabledRagTableIds]), () => ( [])),
13800
+ quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _427 => _427.quickActions]), () => ( [])),
13801
+ suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _428 => _428.suggestedQueries]), () => ( []))
13846
13802
  };
13847
13803
  } catch (err) {
13848
- if (_optionalChain([err, 'optionalAccess', _431 => _431.name]) === "AbortError") throw err;
13804
+ if (_optionalChain([err, 'optionalAccess', _429 => _429.name]) === "AbortError") throw err;
13849
13805
  console.warn("[chat] empty-state config fetch failed, using neutral defaults:", err);
13850
13806
  return EMPTY_STATE_FALLBACK;
13851
13807
  }
13852
13808
  }
13853
13809
  function useEmptyStateConfig(emptyStateUrl, options) {
13854
- const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _432 => _432.enabled]), () => ( true))) && !!emptyStateUrl;
13810
+ const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _430 => _430.enabled]), () => ( true))) && !!emptyStateUrl;
13855
13811
  const query = _reactquery.useQuery.call(void 0, {
13856
13812
  queryKey: ["chat-empty-state", emptyStateUrl],
13857
13813
  queryFn: ({ signal }) => fetchEmptyStateConfig(signal, emptyStateUrl),
@@ -13880,7 +13836,7 @@ var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
13880
13836
  var STORAGE_CACHE_CONTROL_IMMUTABLE = "public, max-age=31536000, immutable";
13881
13837
  function uploadWithProgress(url, file, token, onProgress, signal) {
13882
13838
  return new Promise((resolve, reject) => {
13883
- if (_optionalChain([signal, 'optionalAccess', _433 => _433.aborted])) {
13839
+ if (_optionalChain([signal, 'optionalAccess', _431 => _431.aborted])) {
13884
13840
  reject(new Error("Upload cancelled"));
13885
13841
  return;
13886
13842
  }
@@ -13922,7 +13878,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
13922
13878
  const handleSignalAbort = () => {
13923
13879
  xhr.abort();
13924
13880
  };
13925
- _optionalChain([signal, 'optionalAccess', _434 => _434.addEventListener, 'call', _435 => _435("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
13881
+ _optionalChain([signal, 'optionalAccess', _432 => _432.addEventListener, 'call', _433 => _433("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
13926
13882
  xhr.upload.addEventListener("progress", handleProgress, { signal: listeners.signal });
13927
13883
  xhr.addEventListener("load", handleLoad, { signal: listeners.signal });
13928
13884
  xhr.addEventListener("error", handleError, { signal: listeners.signal });
@@ -13966,10 +13922,10 @@ function useChatAttachments() {
13966
13922
  try {
13967
13923
  sniffed = await _filetype.fileTypeFromBlob.call(void 0, att.file);
13968
13924
  } catch (err) {
13969
- if (_optionalChain([ctrl, 'optionalAccess', _436 => _436.signal, 'access', _437 => _437.aborted])) return;
13925
+ if (_optionalChain([ctrl, 'optionalAccess', _434 => _434.signal, 'access', _435 => _435.aborted])) return;
13970
13926
  throw new Error(`Could not read file content: ${err instanceof Error ? err.message : String(err)}`);
13971
13927
  }
13972
- if (_optionalChain([ctrl, 'optionalAccess', _438 => _438.signal, 'access', _439 => _439.aborted])) return;
13928
+ if (_optionalChain([ctrl, 'optionalAccess', _436 => _436.signal, 'access', _437 => _437.aborted])) return;
13973
13929
  if (!sniffed) {
13974
13930
  throw new Error("Unrecognized file format");
13975
13931
  }
@@ -13983,7 +13939,7 @@ function useChatAttachments() {
13983
13939
  const urlResp = await _chunkGI3MMBP3cjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
13984
13940
  method: "POST",
13985
13941
  headers: { "Content-Type": "application/json" },
13986
- signal: _optionalChain([ctrl, 'optionalAccess', _440 => _440.signal]),
13942
+ signal: _optionalChain([ctrl, 'optionalAccess', _438 => _438.signal]),
13987
13943
  body: JSON.stringify({
13988
13944
  fileName: att.file.name,
13989
13945
  // Pass the SNIFFED MIME (not `file.type`, which can be a
@@ -14012,9 +13968,9 @@ function useChatAttachments() {
14012
13968
  (pct) => {
14013
13969
  updateOne(att.id, { progress: pct });
14014
13970
  },
14015
- _optionalChain([ctrl, 'optionalAccess', _441 => _441.signal])
13971
+ _optionalChain([ctrl, 'optionalAccess', _439 => _439.signal])
14016
13972
  );
14017
- if (_optionalChain([ctrl, 'optionalAccess', _442 => _442.signal, 'access', _443 => _443.aborted])) return;
13973
+ if (_optionalChain([ctrl, 'optionalAccess', _440 => _440.signal, 'access', _441 => _441.aborted])) return;
14018
13974
  updateOne(att.id, {
14019
13975
  status: "ready",
14020
13976
  progress: 100,
@@ -14022,7 +13978,7 @@ function useChatAttachments() {
14022
13978
  viewToken: mintData.viewToken
14023
13979
  });
14024
13980
  } catch (err) {
14025
- if (_optionalChain([ctrl, 'optionalAccess', _444 => _444.signal, 'access', _445 => _445.aborted])) return;
13981
+ if (_optionalChain([ctrl, 'optionalAccess', _442 => _442.signal, 'access', _443 => _443.aborted])) return;
14026
13982
  const message = err instanceof Error ? err.message : String(err);
14027
13983
  updateOne(att.id, { status: "error", progress: 0, errorMessage: message });
14028
13984
  } finally {
@@ -14171,11 +14127,11 @@ var ANON_DEFAULTS = {
14171
14127
  function useResolveChatIdentity(enabled) {
14172
14128
  const runtime = _chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, );
14173
14129
  const url = runtime.endpoints.identityUrl;
14174
- const proxyEmail = _nullishCoalesce(_optionalChain([_chunkGI3MMBP3cjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _446 => _446.email]), () => ( null));
14130
+ const proxyEmail = _nullishCoalesce(_optionalChain([_chunkGI3MMBP3cjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _444 => _444.email]), () => ( null));
14175
14131
  const requestKey = enabled ? `${url}\0${_nullishCoalesce(proxyEmail, () => ( ""))}` : null;
14176
14132
  const [resolved, setResolved] = _react.useState.call(void 0, null);
14177
- const data = _optionalChain([resolved, 'optionalAccess', _447 => _447.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
14178
- const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _448 => _448.key]) !== requestKey;
14133
+ const data = _optionalChain([resolved, 'optionalAccess', _445 => _445.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
14134
+ const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _446 => _446.key]) !== requestKey;
14179
14135
  _react.useEffect.call(void 0, () => {
14180
14136
  if (requestKey === null) return void 0;
14181
14137
  let cancelled = false;
@@ -14297,9 +14253,9 @@ function exchangeMessages({ id, at, content }, user, assistant, onPick) {
14297
14253
  role: "user",
14298
14254
  content: content.question,
14299
14255
  timestamp: new Date(at),
14300
- name: _optionalChain([user, 'optionalAccess', _449 => _449.name]),
14301
- avatar: _optionalChain([user, 'optionalAccess', _450 => _450.avatar]),
14302
- authorType: _optionalChain([user, 'optionalAccess', _451 => _451.authorType])
14256
+ name: _optionalChain([user, 'optionalAccess', _447 => _447.name]),
14257
+ avatar: _optionalChain([user, 'optionalAccess', _448 => _448.avatar]),
14258
+ authorType: _optionalChain([user, 'optionalAccess', _449 => _449.authorType])
14303
14259
  },
14304
14260
  {
14305
14261
  id: `${id}-answer`,
@@ -14310,10 +14266,10 @@ function exchangeMessages({ id, at, content }, user, assistant, onPick) {
14310
14266
  ],
14311
14267
  // A millisecond after the question, so the pair keeps its order.
14312
14268
  timestamp: new Date(at + 1),
14313
- name: _optionalChain([assistant, 'optionalAccess', _452 => _452.name]),
14314
- avatar: _optionalChain([assistant, 'optionalAccess', _453 => _453.avatar]),
14315
- authorType: _optionalChain([assistant, 'optionalAccess', _454 => _454.authorType]),
14316
- assistantType: _optionalChain([assistant, 'optionalAccess', _455 => _455.assistantType])
14269
+ name: _optionalChain([assistant, 'optionalAccess', _450 => _450.name]),
14270
+ avatar: _optionalChain([assistant, 'optionalAccess', _451 => _451.avatar]),
14271
+ authorType: _optionalChain([assistant, 'optionalAccess', _452 => _452.authorType]),
14272
+ assistantType: _optionalChain([assistant, 'optionalAccess', _453 => _453.assistantType])
14317
14273
  }
14318
14274
  ];
14319
14275
  }
@@ -14329,8 +14285,8 @@ function mergeByTime(thread, local) {
14329
14285
  const out = [];
14330
14286
  let next = 0;
14331
14287
  for (const message of thread) {
14332
- const at = _optionalChain([message, 'access', _456 => _456.timestamp, 'optionalAccess', _457 => _457.getTime, 'call', _458 => _458()]);
14333
- while (next < local.length && at !== void 0 && (_nullishCoalesce(_optionalChain([local, 'access', _459 => _459[next], 'access', _460 => _460.timestamp, 'optionalAccess', _461 => _461.getTime, 'call', _462 => _462()]), () => ( 0))) < at) {
14288
+ const at = _optionalChain([message, 'access', _454 => _454.timestamp, 'optionalAccess', _455 => _455.getTime, 'call', _456 => _456()]);
14289
+ while (next < local.length && at !== void 0 && (_nullishCoalesce(_optionalChain([local, 'access', _457 => _457[next], 'access', _458 => _458.timestamp, 'optionalAccess', _459 => _459.getTime, 'call', _460 => _460()]), () => ( 0))) < at) {
14334
14290
  out.push(local[next]);
14335
14291
  next += 1;
14336
14292
  }
@@ -14435,9 +14391,9 @@ function appendToTrailingAssistant(prev, segments) {
14435
14391
  for (const seg of segments) {
14436
14392
  const tail = merged[merged.length - 1];
14437
14393
  const key = upsertKey(seg);
14438
- if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _463 => _463.type]) === "text") {
14394
+ if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _461 => _461.type]) === "text") {
14439
14395
  merged[merged.length - 1] = { type: "text", text: tail.text + seg.text };
14440
- } else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _464 => _464.type]) === "thinking") {
14396
+ } else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _462 => _462.type]) === "thinking") {
14441
14397
  merged[merged.length - 1] = { type: "thinking", text: tail.text + seg.text };
14442
14398
  } else if (key) {
14443
14399
  let idx = merged.findIndex((m) => upsertKey(m) === key);
@@ -14478,7 +14434,7 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
14478
14434
  }
14479
14435
  if (s.type !== "approval_batch") return s;
14480
14436
  const isAnchor = s.data.approvalRequestId === requestId;
14481
- const hasRow = _optionalChain([s, 'access', _465 => _465.data, 'access', _466 => _466.toolCalls, 'optionalAccess', _467 => _467.some, 'call', _468 => _468((c) => c.toolExecutionRequestId === requestId)]);
14437
+ const hasRow = _optionalChain([s, 'access', _463 => _463.data, 'access', _464 => _464.toolCalls, 'optionalAccess', _465 => _465.some, 'call', _466 => _466((c) => c.toolExecutionRequestId === requestId)]);
14482
14438
  if (!isAnchor && !hasRow) return s;
14483
14439
  const nextResolvedBy = _nullishCoalesce(resolvedByName, () => ( s.resolvedByName));
14484
14440
  const nextExecutions = hasRow ? {
@@ -14500,8 +14456,8 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
14500
14456
  };
14501
14457
  }
14502
14458
  function nextBatchExecution(prevExec, toolData) {
14503
- if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _469 => _469.status]) === "done") return null;
14504
- return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _470 => _470.result]), success: _optionalChain([prevExec, 'optionalAccess', _471 => _471.success]) };
14459
+ if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _467 => _467.status]) === "done") return null;
14460
+ return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _468 => _468.result]), success: _optionalChain([prevExec, 'optionalAccess', _469 => _469.success]) };
14505
14461
  }
14506
14462
  function withBatchExecution(seg, execId, state) {
14507
14463
  return {
@@ -14518,11 +14474,11 @@ function projectBatchStatusToMessages(prev, anchorId, status) {
14518
14474
  }
14519
14475
  function projectBatchRowFailureToMessages(prev, rowRequestId) {
14520
14476
  return mapSegments(prev, (s) => {
14521
- if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _472 => _472.data, 'access', _473 => _473.toolCalls, 'optionalAccess', _474 => _474.some, 'call', _475 => _475((c) => c.toolExecutionRequestId === rowRequestId)])) {
14477
+ if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _470 => _470.data, 'access', _471 => _471.toolCalls, 'optionalAccess', _472 => _472.some, 'call', _473 => _473((c) => c.toolExecutionRequestId === rowRequestId)])) {
14522
14478
  return s;
14523
14479
  }
14524
- const existing = _optionalChain([s, 'access', _476 => _476.data, 'access', _477 => _477.executions, 'optionalAccess', _478 => _478[rowRequestId]]);
14525
- if (_optionalChain([existing, 'optionalAccess', _479 => _479.status]) === "done") return s;
14480
+ const existing = _optionalChain([s, 'access', _474 => _474.data, 'access', _475 => _475.executions, 'optionalAccess', _476 => _476[rowRequestId]]);
14481
+ if (_optionalChain([existing, 'optionalAccess', _477 => _477.status]) === "done") return s;
14526
14482
  return withBatchExecution(s, rowRequestId, { status: "done", success: false });
14527
14483
  });
14528
14484
  }
@@ -14558,7 +14514,7 @@ function mergeToolExecutionIfPresent(prev, segment) {
14558
14514
  for (let j = message.segments.length - 1; j >= 0; j--) {
14559
14515
  const seg = message.segments[j];
14560
14516
  if (execId && seg.type === "approval_batch" && seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId)) {
14561
- const prevExec = _optionalChain([seg, 'access', _480 => _480.data, 'access', _481 => _481.executions, 'optionalAccess', _482 => _482[execId]]);
14517
+ const prevExec = _optionalChain([seg, 'access', _478 => _478.data, 'access', _479 => _479.executions, 'optionalAccess', _480 => _480[execId]]);
14562
14518
  const nextExec = nextBatchExecution(prevExec, toolData);
14563
14519
  if (nextExec === null) return prev;
14564
14520
  if (sameExecutionState(prevExec, nextExec)) return prev;
@@ -14731,9 +14687,9 @@ var MessageSegmentAccumulator = class {
14731
14687
  type: "tool_execution",
14732
14688
  data: {
14733
14689
  ...toolData,
14734
- toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _483 => _483.data, 'access', _484 => _484.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _485 => _485.toolTitle]))),
14735
- toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _486 => _486.data, 'access', _487 => _487.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _488 => _488.toolExplanation]))),
14736
- parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _489 => _489.parameters])
14690
+ toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _481 => _481.data, 'access', _482 => _482.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _483 => _483.toolTitle]))),
14691
+ toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _484 => _484.data, 'access', _485 => _485.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _486 => _486.toolExplanation]))),
14692
+ parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _487 => _487.parameters])
14737
14693
  }
14738
14694
  };
14739
14695
  if (existingIndex !== -1) {
@@ -14757,7 +14713,7 @@ var MessageSegmentAccumulator = class {
14757
14713
  if (seg.type !== "approval_batch") return seg;
14758
14714
  const hasCall = seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId);
14759
14715
  if (!hasCall) return seg;
14760
- const prev = _optionalChain([seg, 'access', _490 => _490.data, 'access', _491 => _491.executions, 'optionalAccess', _492 => _492[execId]]);
14716
+ const prev = _optionalChain([seg, 'access', _488 => _488.data, 'access', _489 => _489.executions, 'optionalAccess', _490 => _490[execId]]);
14761
14717
  const next = nextBatchExecution(prev, toolData);
14762
14718
  matched = true;
14763
14719
  if (next === null) return seg;
@@ -14891,8 +14847,8 @@ var MessageSegmentAccumulator = class {
14891
14847
  requestId,
14892
14848
  {
14893
14849
  ...pendingApproval,
14894
- command: _optionalChain([pendingApproval, 'optionalAccess', _493 => _493.command]) || "",
14895
- approvalType: _optionalChain([pendingApproval, 'optionalAccess', _494 => _494.approvalType]) || approvalType
14850
+ command: _optionalChain([pendingApproval, 'optionalAccess', _491 => _491.command]) || "",
14851
+ approvalType: _optionalChain([pendingApproval, 'optionalAccess', _492 => _492.approvalType]) || approvalType
14896
14852
  },
14897
14853
  status
14898
14854
  );
@@ -14917,9 +14873,9 @@ var MessageSegmentAccumulator = class {
14917
14873
  type: "escalation_offer",
14918
14874
  // The resolved chunk carries no text/origin — a redelivered offer must
14919
14875
  // not blank the card the PENDING chunk already painted.
14920
- data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess', _495 => _495.data, 'access', _496 => _496.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _497 => _497.data, 'access', _498 => _498.origin]))) },
14876
+ data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess', _493 => _493.data, 'access', _494 => _494.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _495 => _495.data, 'access', _496 => _496.origin]))) },
14921
14877
  status,
14922
- resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _499 => _499.resolvedByName]))),
14878
+ resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _497 => _497.resolvedByName]))),
14923
14879
  onApprove: this.callbacks.onEscalationApprove,
14924
14880
  onReject: this.callbacks.onEscalationReject
14925
14881
  };
@@ -15323,7 +15279,7 @@ function youtubeVideoId(value) {
15323
15279
  const hostname = parsed.hostname.toLowerCase();
15324
15280
  const isYoutubeHost = hostname === "youtu.be" || hostname === "youtube.com" || hostname.endsWith(".youtube.com");
15325
15281
  if (!isYoutubeHost) return void 0;
15326
- const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access', _500 => _500.exec, 'call', _501 => _501(parsed.pathname), 'optionalAccess', _502 => _502[1]]);
15282
+ const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access', _498 => _498.exec, 'call', _499 => _499(parsed.pathname), 'optionalAccess', _500 => _500[1]]);
15327
15283
  const id = _nullishCoalesce(_nullishCoalesce(fromPath, () => ( parsed.searchParams.get("v"))), () => ( void 0));
15328
15284
  return id && YOUTUBE_ID.test(id) ? id : void 0;
15329
15285
  }
@@ -15442,11 +15398,11 @@ function cards(value, decodedSources) {
15442
15398
  {
15443
15399
  type,
15444
15400
  id,
15445
- title: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _503 => _503.name]), () => ( id)),
15446
- url: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _504 => _504.externalUrl]), () => ( null)),
15447
- ..._optionalChain([source, 'optionalAccess', _505 => _505.sourceRepo]) ? { sourceRepo: source.sourceRepo } : {},
15448
- ..._optionalChain([source, 'optionalAccess', _506 => _506.targetPlatform]) !== void 0 ? { targetPlatform: source.targetPlatform } : {},
15449
- ..._optionalChain([source, 'optionalAccess', _507 => _507.path]) ? { metadata: { path: source.path } } : {}
15401
+ title: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _501 => _501.name]), () => ( id)),
15402
+ url: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _502 => _502.externalUrl]), () => ( null)),
15403
+ ..._optionalChain([source, 'optionalAccess', _503 => _503.sourceRepo]) ? { sourceRepo: source.sourceRepo } : {},
15404
+ ..._optionalChain([source, 'optionalAccess', _504 => _504.targetPlatform]) !== void 0 ? { targetPlatform: source.targetPlatform } : {},
15405
+ ..._optionalChain([source, 'optionalAccess', _505 => _505.path]) ? { metadata: { path: source.path } } : {}
15450
15406
  }
15451
15407
  ];
15452
15408
  });
@@ -15482,11 +15438,11 @@ function attachmentsEvent(record) {
15482
15438
  }
15483
15439
  function mergeSourceMetadata(previous, event) {
15484
15440
  const byIndex = /* @__PURE__ */ new Map();
15485
- for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _508 => _508.sources]), () => ( [])), ..._nullishCoalesce(event.sources, () => ( []))]) {
15441
+ for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _506 => _506.sources]), () => ( [])), ..._nullishCoalesce(event.sources, () => ( []))]) {
15486
15442
  if (!byIndex.has(source.index)) byIndex.set(source.index, source);
15487
15443
  }
15488
15444
  const byIdentity = /* @__PURE__ */ new Map();
15489
- for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _509 => _509.refs]), () => ( [])), ..._nullishCoalesce(event.refs, () => ( []))]) {
15445
+ for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _507 => _507.refs]), () => ( [])), ..._nullishCoalesce(event.refs, () => ( []))]) {
15490
15446
  const identity = `${ref.type}:${ref.id}`;
15491
15447
  if (!byIdentity.has(identity)) byIdentity.set(identity, ref);
15492
15448
  }
@@ -15596,7 +15552,7 @@ function createChatStreamReducer(options = {}) {
15596
15552
  let stateCache = null;
15597
15553
  function invalidate() {
15598
15554
  stateCache = null;
15599
- _optionalChain([onChange, 'optionalCall', _510 => _510()]);
15555
+ _optionalChain([onChange, 'optionalCall', _508 => _508()]);
15600
15556
  }
15601
15557
  function getState() {
15602
15558
  if (!stateCache) {
@@ -15614,7 +15570,7 @@ function createChatStreamReducer(options = {}) {
15614
15570
  return stateCache;
15615
15571
  }
15616
15572
  function emit(name, ...args) {
15617
- _optionalChain([onEffect, 'optionalCall', _511 => _511({ name, args })]);
15573
+ _optionalChain([onEffect, 'optionalCall', _509 => _509({ name, args })]);
15618
15574
  }
15619
15575
  function setMessagesInternal(next) {
15620
15576
  if (next !== messages) {
@@ -15657,12 +15613,12 @@ function createChatStreamReducer(options = {}) {
15657
15613
  return stampTrailingAssistantSourceMetadata(stampTrailingAssistantSeq(next, seq));
15658
15614
  }
15659
15615
  function applySegmentsToState(segments, meta) {
15660
- const seq = _optionalChain([meta, 'optionalAccess', _512 => _512.streamSeq]);
15661
- if (_optionalChain([meta, 'optionalAccess', _513 => _513.append]) && meta.isCompacting) {
15616
+ const seq = _optionalChain([meta, 'optionalAccess', _510 => _510.streamSeq]);
15617
+ if (_optionalChain([meta, 'optionalAccess', _511 => _511.append]) && meta.isCompacting) {
15662
15618
  setMessagesInternal(commitTrailingAssistant(upsertTrailingCompaction(messages, segments), seq));
15663
15619
  return;
15664
15620
  }
15665
- if (_optionalChain([meta, 'optionalAccess', _514 => _514.append])) {
15621
+ if (_optionalChain([meta, 'optionalAccess', _512 => _512.append])) {
15666
15622
  setMessagesInternal(commitTrailingAssistant(appendToTrailingAssistant(messages, segments), seq));
15667
15623
  return;
15668
15624
  }
@@ -15674,7 +15630,7 @@ function createChatStreamReducer(options = {}) {
15674
15630
  adoptTrailingAssistant = false;
15675
15631
  const last = messages[messages.length - 1];
15676
15632
  if (!last || last.role !== "assistant" || adoptTail) return;
15677
- const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _515 => _515.segments, 'optionalAccess', _516 => _516.length]), () => ( 0))) > 0 || last.content !== "";
15633
+ const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _513 => _513.segments, 'optionalAccess', _514 => _514.length]), () => ( 0))) > 0 || last.content !== "";
15678
15634
  if (!hasContent) return;
15679
15635
  setMessagesInternal([...messages, { id: nextId("assistant"), role: "assistant", content: "", segments: [] }]);
15680
15636
  }
@@ -15893,13 +15849,13 @@ function createChatStreamReducer(options = {}) {
15893
15849
  const summary = required ? _chunkOBQ5WUNGcjs.getCommandText.call(void 0, required) : `Batch of ${toolCalls.length} tool calls`;
15894
15850
  pendingEscalated.set(requestId, {
15895
15851
  command: summary,
15896
- explanation: _optionalChain([required, 'optionalAccess', _517 => _517.toolExplanation]),
15852
+ explanation: _optionalChain([required, 'optionalAccess', _515 => _515.toolExplanation]),
15897
15853
  approvalType,
15898
15854
  toolCalls
15899
15855
  });
15900
15856
  emit("onEscalatedApproval", requestId, {
15901
15857
  command: summary,
15902
- explanation: _optionalChain([required, 'optionalAccess', _518 => _518.toolExplanation]),
15858
+ explanation: _optionalChain([required, 'optionalAccess', _516 => _516.toolExplanation]),
15903
15859
  approvalType
15904
15860
  });
15905
15861
  break;
@@ -16287,7 +16243,7 @@ function createChatStreamReducer(options = {}) {
16287
16243
  const resolveBatch = (status, confirm) => async () => {
16288
16244
  setMessagesInternal(projectBatchStatusToMessages(messages, anchorId, status));
16289
16245
  for (const id of ids) {
16290
- const ok = await _optionalChain([confirm, 'optionalCall', _519 => _519(id)]);
16246
+ const ok = await _optionalChain([confirm, 'optionalCall', _517 => _517(id)]);
16291
16247
  if (ok === false) {
16292
16248
  setMessagesInternal(projectBatchRowFailureToMessages(messages, id));
16293
16249
  }
@@ -16423,8 +16379,8 @@ function createChatStreamReducer(options = {}) {
16423
16379
  }
16424
16380
  }
16425
16381
  }
16426
- hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _520 => _520.resumed]), () => ( messages.length > 0)));
16427
- if (_optionalChain([extras, 'optionalAccess', _521 => _521.agentBusy])) agentBusyState();
16382
+ hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _518 => _518.resumed]), () => ( messages.length > 0)));
16383
+ if (_optionalChain([extras, 'optionalAccess', _519 => _519.agentBusy])) agentBusyState();
16428
16384
  invalidate();
16429
16385
  }
16430
16386
  return {
@@ -16511,7 +16467,7 @@ function createChatStreamReducer(options = {}) {
16511
16467
  },
16512
16468
  endSseTurn() {
16513
16469
  const last = messages[messages.length - 1];
16514
- if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _522 => _522.segments, 'optionalAccess', _523 => _523.length]), () => ( 0))) === 0 && last.content === "") {
16470
+ if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _520 => _520.segments, 'optionalAccess', _521 => _521.length]), () => ( 0))) === 0 && last.content === "") {
16515
16471
  messages = messages.slice(0, -1);
16516
16472
  }
16517
16473
  sseCurrentText = "";
@@ -16665,10 +16621,10 @@ function createChatDialogStore(options = {}) {
16665
16621
  if (onEvict) {
16666
16622
  const sep = key.indexOf(KEY_SEP);
16667
16623
  onEvict(key.slice(0, sep), key.slice(sep + 1), {
16668
- messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _524 => _524.state, 'access', _525 => _525.messages]), () => ( EMPTY_STATE.messages)),
16669
- approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _526 => _526.state, 'access', _527 => _527.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
16670
- lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _528 => _528.getLastAppliedSeq, 'call', _529 => _529()]), () => ( Number.NEGATIVE_INFINITY)),
16671
- pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _530 => _530.getPendingEchoes, 'call', _531 => _531()]), () => ( EMPTY_PENDING_ECHOES))
16624
+ messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _522 => _522.state, 'access', _523 => _523.messages]), () => ( EMPTY_STATE.messages)),
16625
+ approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _524 => _524.state, 'access', _525 => _525.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
16626
+ lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _526 => _526.getLastAppliedSeq, 'call', _527 => _527()]), () => ( Number.NEGATIVE_INFINITY)),
16627
+ pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _528 => _528.getPendingEchoes, 'call', _529 => _529()]), () => ( EMPTY_PENDING_ECHOES))
16672
16628
  });
16673
16629
  }
16674
16630
  }
@@ -16678,12 +16634,12 @@ function createChatDialogStore(options = {}) {
16678
16634
  const key = keyOf(dialogId, side);
16679
16635
  let reducer = reducers.get(key);
16680
16636
  if (!reducer) {
16681
- const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _532 => _532(dialogId, side)]), () => ( {}));
16637
+ const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _530 => _530(dialogId, side)]), () => ( {}));
16682
16638
  const userOnChange = base.onChange;
16683
16639
  reducer = createChatStreamReducer({
16684
16640
  ...base,
16685
16641
  onChange: () => {
16686
- _optionalChain([userOnChange, 'optionalCall', _533 => _533()]);
16642
+ _optionalChain([userOnChange, 'optionalCall', _531 => _531()]);
16687
16643
  notify();
16688
16644
  }
16689
16645
  });
@@ -16728,7 +16684,7 @@ function createChatDialogStore(options = {}) {
16728
16684
  };
16729
16685
  }
16730
16686
  function getSnapshot2(dialogId, side = DEFAULT_DIALOG_SIDE) {
16731
- return _nullishCoalesce(_optionalChain([reducers, 'access', _534 => _534.get, 'call', _535 => _535(keyOf(dialogId, side)), 'optionalAccess', _536 => _536.state]), () => ( EMPTY_STATE));
16687
+ return _nullishCoalesce(_optionalChain([reducers, 'access', _532 => _532.get, 'call', _533 => _533(keyOf(dialogId, side)), 'optionalAccess', _534 => _534.state]), () => ( EMPTY_STATE));
16732
16688
  }
16733
16689
  function getServerSnapshot2() {
16734
16690
  return EMPTY_STATE;
@@ -16817,7 +16773,7 @@ function createDeltaBatcher({
16817
16773
  pending = [];
16818
16774
  const key = pendingKey;
16819
16775
  for (const delta of batch) applyOne(delta, key);
16820
- _optionalChain([onFlushed, 'optionalCall', _537 => _537(batch.length)]);
16776
+ _optionalChain([onFlushed, 'optionalCall', _535 => _535(batch.length)]);
16821
16777
  }
16822
16778
  function schedule() {
16823
16779
  if (raf !== null || timer !== null) return;
@@ -16841,7 +16797,7 @@ function createDeltaBatcher({
16841
16797
  }
16842
16798
  if (!isDeltaEvent(event)) return false;
16843
16799
  const tail = pending[pending.length - 1];
16844
- const seqAdvances = _optionalChain([tail, 'optionalAccess', _538 => _538.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
16800
+ const seqAdvances = _optionalChain([tail, 'optionalAccess', _536 => _536.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
16845
16801
  if (tail && seqAdvances && tail.type === event.type && (tail.type !== "text-delta" || tail.leading === event.leading)) {
16846
16802
  pending[pending.length - 1] = {
16847
16803
  ...tail,
@@ -16873,7 +16829,7 @@ function useChatStreamReducer({
16873
16829
  side = DEFAULT_DIALOG_SIDE,
16874
16830
  createReducerOptions
16875
16831
  }) {
16876
- const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _539 => _539()]), () => ( {})));
16832
+ const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _537 => _537()]), () => ( {})));
16877
16833
  const getSnapshot2 = _react.useCallback.call(void 0, () => store.getSnapshot(dialogId, side), [store, dialogId, side]);
16878
16834
  const getServerSnapshot2 = _react.useCallback.call(void 0, () => store.getServerSnapshot(), [store]);
16879
16835
  const subscribe2 = _react.useCallback.call(void 0, (listener) => store.subscribe(listener), [store]);
@@ -16918,7 +16874,7 @@ function buildConfirmToolBody(request) {
16918
16874
  async function readServerErrorMessage(response) {
16919
16875
  try {
16920
16876
  const body = await response.json();
16921
- if (typeof _optionalChain([body, 'optionalAccess', _540 => _540.error]) === "string" && body.error.length > 0) return body.error;
16877
+ if (typeof _optionalChain([body, 'optionalAccess', _538 => _538.error]) === "string" && body.error.length > 0) return body.error;
16922
16878
  } catch (e17) {
16923
16879
  }
16924
16880
  return null;
@@ -17081,7 +17037,7 @@ function useManagedDialogList({
17081
17037
  try {
17082
17038
  await deleteDialogCallback(id);
17083
17039
  removeLocal(id);
17084
- _optionalChain([onDialogRemovedRef, 'access', _541 => _541.current, 'optionalCall', _542 => _542(id, "deleted")]);
17040
+ _optionalChain([onDialogRemovedRef, 'access', _539 => _539.current, 'optionalCall', _540 => _540(id, "deleted")]);
17085
17041
  } catch (err) {
17086
17042
  console.error(`${logTag} deleteDialog failed:`, err);
17087
17043
  throw err;
@@ -17092,7 +17048,7 @@ function useManagedDialogList({
17092
17048
  const renameDialog = _react.useCallback.call(void 0,
17093
17049
  async (id, title) => {
17094
17050
  if (!renameDialogCallback) return;
17095
- const previous = _optionalChain([dialogsRef, 'access', _543 => _543.current, 'access', _544 => _544.find, 'call', _545 => _545((d) => d.id === id), 'optionalAccess', _546 => _546.title]);
17051
+ const previous = _optionalChain([dialogsRef, 'access', _541 => _541.current, 'access', _542 => _542.find, 'call', _543 => _543((d) => d.id === id), 'optionalAccess', _544 => _544.title]);
17096
17052
  setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, title } : d));
17097
17053
  try {
17098
17054
  await renameDialogCallback(id, title);
@@ -17111,7 +17067,7 @@ function useManagedDialogList({
17111
17067
  try {
17112
17068
  await archiveDialogCallback(id);
17113
17069
  removeLocal(id);
17114
- _optionalChain([onDialogRemovedRef, 'access', _547 => _547.current, 'optionalCall', _548 => _548(id, "archived")]);
17070
+ _optionalChain([onDialogRemovedRef, 'access', _545 => _545.current, 'optionalCall', _546 => _546(id, "archived")]);
17115
17071
  } catch (err) {
17116
17072
  console.error(`${logTag} archiveDialog failed:`, err);
17117
17073
  throw err;
@@ -17300,7 +17256,7 @@ var STORAGE_KEY = "conversation";
17300
17256
  var namespaceFor = (source) => {
17301
17257
  const base = `mingo-chat-${source}`;
17302
17258
  const auth = _chunkGI3MMBP3cjs.getEmbedProxyAuth.call(void 0, );
17303
- return _optionalChain([auth, 'optionalAccess', _549 => _549.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
17259
+ return _optionalChain([auth, 'optionalAccess', _547 => _547.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
17304
17260
  };
17305
17261
  function createChatConversationStorage(source) {
17306
17262
  return _chunkGI3MMBP3cjs.createLocalStorageAdapter.call(void 0, {
@@ -17373,7 +17329,7 @@ function useChatHistoryHydration({
17373
17329
  if (cancelled) return;
17374
17330
  if (rows.length === 0) {
17375
17331
  const found = isRecord(body) ? body.found : void 0;
17376
- if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall', _550 => _550(conversationId)]);
17332
+ if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall', _548 => _548(conversationId)]);
17377
17333
  return;
17378
17334
  }
17379
17335
  const hydrated = [];
@@ -17450,7 +17406,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17450
17406
  const { active = true } = runtimeOptions;
17451
17407
  const runtime = _chunkUJ7AXHRZcjs.useRequiredChatRuntime.call(void 0, );
17452
17408
  const source = runtime.source || DEFAULT_CHAT_SOURCE;
17453
- const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _551 => _551.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
17409
+ const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _549 => _549.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
17454
17410
  const sendMessageRef = _react.useRef.call(void 0,
17455
17411
  () => Promise.resolve(true)
17456
17412
  );
@@ -17486,7 +17442,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17486
17442
  if (!restoredConversationRef.current) {
17487
17443
  restoredConversationRef.current = true;
17488
17444
  pruneStaleChatConversationStorage(source);
17489
- conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _552 => _552.load, 'call', _553 => _553(), 'optionalAccess', _554 => _554.conversationId]), () => ( null));
17445
+ conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _550 => _550.load, 'call', _551 => _551(), 'optionalAccess', _552 => _552.conversationId]), () => ( null));
17490
17446
  }
17491
17447
  const [conversationId, setConversationId] = _react.useState.call(void 0, () => conversationIdRef.current);
17492
17448
  const commitConversationId = _react.useCallback.call(void 0,
@@ -17577,7 +17533,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17577
17533
  const abortControllerRef = _react.useRef.call(void 0, null);
17578
17534
  const switchConversation = _react.useCallback.call(void 0,
17579
17535
  (id) => {
17580
- _optionalChain([abortControllerRef, 'access', _555 => _555.current, 'optionalAccess', _556 => _556.abort, 'call', _557 => _557()]);
17536
+ _optionalChain([abortControllerRef, 'access', _553 => _553.current, 'optionalAccess', _554 => _554.abort, 'call', _555 => _555()]);
17581
17537
  flushDeltas();
17582
17538
  mutate((r) => r.reset());
17583
17539
  hydrationSendCountRef.current = 0;
@@ -17614,8 +17570,8 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17614
17570
  } = useManagedDialogList({
17615
17571
  autoLoad: active,
17616
17572
  fetchDialogs: fetchActiveDialogs,
17617
- renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _558 => _558.renameDialog]),
17618
- archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _559 => _559.archiveDialog]),
17573
+ renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _556 => _556.renameDialog]),
17574
+ archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _557 => _557.archiveDialog]),
17619
17575
  pageSize: CHAT_HISTORY_PAGE_SIZE,
17620
17576
  search: conversationsApi ? dialogSearch : void 0,
17621
17577
  logTag: "[useSseChatAdapter]",
@@ -17679,7 +17635,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17679
17635
  const serverMessage = await readServerErrorMessage(response);
17680
17636
  throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
17681
17637
  }
17682
- const reader = _optionalChain([response, 'access', _560 => _560.body, 'optionalAccess', _561 => _561.getReader, 'call', _562 => _562()]);
17638
+ const reader = _optionalChain([response, 'access', _558 => _558.body, 'optionalAccess', _559 => _559.getReader, 'call', _560 => _560()]);
17683
17639
  if (!reader) throw new Error("No response body");
17684
17640
  const frameDecoder = createSseFrameDecoder();
17685
17641
  let finished = false;
@@ -17708,7 +17664,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17708
17664
  }
17709
17665
  return true;
17710
17666
  } catch (err) {
17711
- if (_optionalChain([err, 'optionalAccess', _563 => _563.name]) === "AbortError" || ctrl.signal.aborted) {
17667
+ if (_optionalChain([err, 'optionalAccess', _561 => _561.name]) === "AbortError" || ctrl.signal.aborted) {
17712
17668
  return true;
17713
17669
  }
17714
17670
  flushDeltas();
@@ -17744,7 +17700,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17744
17700
  );
17745
17701
  sendMessageRef.current = sendMessage;
17746
17702
  const stopMessage = _react.useCallback.call(void 0, () => {
17747
- _optionalChain([abortControllerRef, 'access', _564 => _564.current, 'optionalAccess', _565 => _565.abort, 'call', _566 => _566()]);
17703
+ _optionalChain([abortControllerRef, 'access', _562 => _562.current, 'optionalAccess', _563 => _563.abort, 'call', _564 => _564()]);
17748
17704
  flushDeltas();
17749
17705
  mutate((r) => r.setPhase("idle"));
17750
17706
  }, [mutate, flushDeltas]);
@@ -17780,7 +17736,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17780
17736
  let sendIdx = -1;
17781
17737
  return state.messages.map((m) => {
17782
17738
  const segments = m.segments;
17783
- const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _567 => _567.filter, 'call', _568 => _568((s) => s.type === "text"), 'access', _569 => _569.map, 'call', _570 => _570((s) => s.text), 'access', _571 => _571.join, 'call', _572 => _572("")]), () => ( ""));
17739
+ const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _565 => _565.filter, 'call', _566 => _566((s) => s.type === "text"), 'access', _567 => _567.map, 'call', _568 => _568((s) => s.text), 'access', _569 => _569.join, 'call', _570 => _570("")]), () => ( ""));
17784
17740
  let sources2;
17785
17741
  let scrollAnchor;
17786
17742
  if (m.role === "user" && !m.hidden) {
@@ -17789,7 +17745,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17789
17745
  if (m.role === "assistant") {
17790
17746
  const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
17791
17747
  sources2 = sourcesMap.get(lookupIdx);
17792
- scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _573 => _573.get, 'call', _574 => _574(lookupIdx), 'optionalAccess', _575 => _575.scrollAnchor]), () => ( void 0));
17748
+ scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _571 => _571.get, 'call', _572 => _572(lookupIdx), 'optionalAccess', _573 => _573.scrollAnchor]), () => ( void 0));
17793
17749
  }
17794
17750
  return {
17795
17751
  id: m.id,
@@ -17816,7 +17772,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17816
17772
  );
17817
17773
  return;
17818
17774
  }
17819
- const refSlug = typeof _optionalChain([reference, 'access', _576 => _576.metadata, 'optionalAccess', _577 => _577.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
17775
+ const refSlug = typeof _optionalChain([reference, 'access', _574 => _574.metadata, 'optionalAccess', _575 => _575.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
17820
17776
  const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
17821
17777
  const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
17822
17778
  const text2 = `/${cmdId} display "${escaped}"`;
@@ -17864,18 +17820,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
17864
17820
  /** True while the mount-time rebuild from the server transcript runs. */
17865
17821
  isHydratingHistory,
17866
17822
  /** Provider key for the lib's `<ModelDisplay>` icon. */
17867
- currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _578 => _578.provider]), () => ( null)),
17868
- currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _579 => _579.modelLabel]), () => ( null)),
17869
- currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _580 => _580.contextWindowMaxTokens]), () => ( null)),
17823
+ currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _576 => _576.provider]), () => ( null)),
17824
+ currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _577 => _577.modelLabel]), () => ( null)),
17825
+ currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _578 => _578.contextWindowMaxTokens]), () => ( null)),
17870
17826
  /** Input tokens (known after server's message_start frame; null until). */
17871
- currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _581 => _581.inputTokens]), () => ( null)),
17827
+ currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _579 => _579.inputTokens]), () => ( null)),
17872
17828
  /** Output tokens (known only after server's trailing usage frame). */
17873
- currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _582 => _582.outputTokens]), () => ( null)),
17829
+ currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _580 => _580.outputTokens]), () => ( null)),
17874
17830
  /** Cache hit % (read / total-input × 100). null during streaming. */
17875
- currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _583 => _583.cacheHitRatePct]), () => ( null)),
17831
+ currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _581 => _581.cacheHitRatePct]), () => ( null)),
17876
17832
  /** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
17877
17833
  * token counts). null until the trailing usage frame lands. */
17878
- currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _584 => _584.breakdown]), () => ( null)),
17834
+ currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _582 => _582.breakdown]), () => ( null)),
17879
17835
  // ─── Dialog management ───────────────────────────────────────────────
17880
17836
  // With `chatConversationsUrl` the server transcript store IS the dialog
17881
17837
  // list (shared `useManagedDialogList`); selecting a row re-hydrates through
@@ -17949,7 +17905,7 @@ function extractIncompleteMessageState(lastMessage) {
17949
17905
  }
17950
17906
  break;
17951
17907
  case "approval_batch": {
17952
- const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _585 => _585.data, 'access', _586 => _586.executions, 'optionalAccess', _587 => _587[c.toolExecutionRequestId], 'optionalAccess', _588 => _588.status]) === "done");
17908
+ const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _583 => _583.data, 'access', _584 => _584.executions, 'optionalAccess', _585 => _585[c.toolExecutionRequestId], 'optionalAccess', _586 => _586.status]) === "done");
17953
17909
  if (segment.status !== "rejected" && !allDone) {
17954
17910
  hasIncompleteState = true;
17955
17911
  }
@@ -18013,11 +17969,11 @@ function extractIncompleteMessageState(lastMessage) {
18013
17969
  function extractIncompleteTailState(messages) {
18014
17970
  if (!messages || messages.length === 0) return void 0;
18015
17971
  let start = messages.length;
18016
- while (start > 0 && _optionalChain([messages, 'access', _589 => _589[start - 1], 'optionalAccess', _590 => _590.role]) === "assistant") start -= 1;
17972
+ while (start > 0 && _optionalChain([messages, 'access', _587 => _587[start - 1], 'optionalAccess', _588 => _588.role]) === "assistant") start -= 1;
18017
17973
  if (start === messages.length) return void 0;
18018
17974
  const segments = [];
18019
17975
  for (let i = start; i < messages.length; i += 1) {
18020
- const content = _optionalChain([messages, 'access', _591 => _591[i], 'optionalAccess', _592 => _592.content]);
17976
+ const content = _optionalChain([messages, 'access', _589 => _589[i], 'optionalAccess', _590 => _590.content]);
18021
17977
  if (Array.isArray(content)) segments.push(...content);
18022
17978
  }
18023
17979
  if (segments.length === 0) return void 0;
@@ -18248,7 +18204,7 @@ function decodeNatsChunk(chunk) {
18248
18204
  userId: typeof data.userId === "string" ? data.userId : void 0,
18249
18205
  // Wire shape carries no label; fall back to the id (parity with
18250
18206
  // the history path in `process-historical-messages.ts`).
18251
- contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _593 => _593.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _594 => _594.id]) === "string").map((it) => ({
18207
+ contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _591 => _591.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _592 => _592.id]) === "string").map((it) => ({
18252
18208
  type: it.type,
18253
18209
  id: it.id,
18254
18210
  label: it.id
@@ -18300,15 +18256,15 @@ function decodeNatsChunk(chunk) {
18300
18256
 
18301
18257
  // src/components/chat/utils/process-historical-messages.ts
18302
18258
  function getOwnerDisplayName(owner) {
18303
- if (_optionalChain([owner, 'optionalAccess', _595 => _595.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN && owner.user) {
18259
+ if (_optionalChain([owner, 'optionalAccess', _593 => _593.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN && owner.user) {
18304
18260
  const { firstName, lastName } = owner.user;
18305
18261
  const name = [firstName, lastName].filter(Boolean).join(" ");
18306
18262
  if (name) return name;
18307
18263
  }
18308
- return _optionalChain([owner, 'optionalAccess', _596 => _596.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN ? "Admin" : "You";
18264
+ return _optionalChain([owner, 'optionalAccess', _594 => _594.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN ? "Admin" : "You";
18309
18265
  }
18310
18266
  function getOwnerAvatar(owner) {
18311
- return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _597 => _597.user, 'optionalAccess', _598 => _598.image, 'optionalAccess', _599 => _599.imageUrl]), () => ( void 0));
18267
+ return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _595 => _595.user, 'optionalAccess', _596 => _596.image, 'optionalAccess', _597 => _597.imageUrl]), () => ( void 0));
18312
18268
  }
18313
18269
  function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
18314
18270
  messageDataArray.forEach((data) => {
@@ -18500,7 +18456,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
18500
18456
  event.offerId,
18501
18457
  event.text,
18502
18458
  event.origin,
18503
- _nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _600 => _600[event.offerId]]), () => ( "pending"))
18459
+ _nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _598 => _598[event.offerId]]), () => ( "pending"))
18504
18460
  );
18505
18461
  break;
18506
18462
  case "ticket-escalated":
@@ -18534,7 +18490,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
18534
18490
  );
18535
18491
  break;
18536
18492
  case "escalation-offer-resolved":
18537
- _optionalChain([offerResolutions, 'optionalAccess', _601 => _601.set, 'call', _602 => _602(event.offerId, {
18493
+ _optionalChain([offerResolutions, 'optionalAccess', _599 => _599.set, 'call', _600 => _600(event.offerId, {
18538
18494
  status: event.status,
18539
18495
  resolvedByName: event.resolvedByName
18540
18496
  })]);
@@ -18598,7 +18554,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
18598
18554
  }
18599
18555
  }
18600
18556
  } else {
18601
- _optionalChain([escalatedApprovals, 'optionalAccess', _603 => _603.set, 'call', _604 => _604(event.requestId, {
18557
+ _optionalChain([escalatedApprovals, 'optionalAccess', _601 => _601.set, 'call', _602 => _602(event.requestId, {
18602
18558
  command: event.command || "",
18603
18559
  explanation: event.explanation,
18604
18560
  approvalType,
@@ -18613,8 +18569,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
18613
18569
  const existingStatus = approvalStatuses[requestId];
18614
18570
  const status = existingStatus || event.status;
18615
18571
  const resolvedByName = event.resolvedByName;
18616
- const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _605 => _605.get, 'call', _606 => _606(requestId)]);
18617
- if (_optionalChain([escalatedData, 'optionalAccess', _607 => _607.toolCalls]) && escalatedData.toolCalls.length > 0) {
18572
+ const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _603 => _603.get, 'call', _604 => _604(requestId)]);
18573
+ if (_optionalChain([escalatedData, 'optionalAccess', _605 => _605.toolCalls]) && escalatedData.toolCalls.length > 0) {
18618
18574
  if (batchApprovalsEnabled) {
18619
18575
  accumulator.addApprovalBatch(
18620
18576
  requestId,
@@ -18636,7 +18592,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
18636
18592
  );
18637
18593
  }
18638
18594
  }
18639
- _optionalChain([escalatedApprovals, 'optionalAccess', _608 => _608.delete, 'call', _609 => _609(requestId)]);
18595
+ _optionalChain([escalatedApprovals, 'optionalAccess', _606 => _606.delete, 'call', _607 => _607(requestId)]);
18640
18596
  break;
18641
18597
  }
18642
18598
  if (escalatedData) {
@@ -18645,7 +18601,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
18645
18601
  explanation: escalatedData.explanation,
18646
18602
  approvalType: escalatedData.approvalType
18647
18603
  });
18648
- _optionalChain([escalatedApprovals, 'optionalAccess', _610 => _610.delete, 'call', _611 => _611(requestId)]);
18604
+ _optionalChain([escalatedApprovals, 'optionalAccess', _608 => _608.delete, 'call', _609 => _609(requestId)]);
18649
18605
  }
18650
18606
  const before = accumulator.getSegments();
18651
18607
  const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
@@ -18737,14 +18693,14 @@ function processHistoricalMessages(messages, options = {}) {
18737
18693
  pushStandaloneMessages(processedMessages, msg, messageDataArray);
18738
18694
  return;
18739
18695
  }
18740
- const isUserMessage = _optionalChain([msg, 'access', _612 => _612.owner, 'optionalAccess', _613 => _613.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _614 => _614.owner, 'optionalAccess', _615 => _615.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN;
18696
+ const isUserMessage = _optionalChain([msg, 'access', _610 => _610.owner, 'optionalAccess', _611 => _611.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _612 => _612.owner, 'optionalAccess', _613 => _613.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN;
18741
18697
  if (isUserMessage) {
18742
18698
  flushAssistantMessage();
18743
- const userAuthorType = _optionalChain([msg, 'access', _616 => _616.owner, 'optionalAccess', _617 => _617.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN ? "admin" : "user";
18699
+ const userAuthorType = _optionalChain([msg, 'access', _614 => _614.owner, 'optionalAccess', _615 => _615.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN ? "admin" : "user";
18744
18700
  messageDataArray.forEach((data) => {
18745
18701
  if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
18746
18702
  const rawContext = data.contextItems;
18747
- const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _618 => _618.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _619 => _619.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
18703
+ const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _616 => _616.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _617 => _617.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
18748
18704
  processedMessages.push({
18749
18705
  id: msg.id,
18750
18706
  role: "user",
@@ -18791,7 +18747,7 @@ function processHistoricalMessages(messages, options = {}) {
18791
18747
  });
18792
18748
  const nextMsg = messages[index + 1];
18793
18749
  const isLastMessage = index === messages.length - 1;
18794
- const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _620 => _620.owner, 'optionalAccess', _621 => _621.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _622 => _622.owner, 'optionalAccess', _623 => _623.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN);
18750
+ const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _618 => _618.owner, 'optionalAccess', _619 => _619.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _620 => _620.owner, 'optionalAccess', _621 => _621.type]) === _chunkZRDVFADQcjs.OWNER_TYPE.ADMIN);
18795
18751
  if (isLastMessage || nextIsFromUser) {
18796
18752
  flushAssistantMessage();
18797
18753
  }
@@ -19175,7 +19131,7 @@ function useNatsChatAdapter(config, options = {}) {
19175
19131
  const connectionState = !active || !dialogId ? "connected" : connectedForDialog === dialogId ? "connected" : "connecting";
19176
19132
  const sendMessage = _react.useCallback.call(void 0,
19177
19133
  async (text2, sendOptions) => {
19178
- const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _624 => _624.hidden]), () => ( false));
19134
+ const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _622 => _622.hidden]), () => ( false));
19179
19135
  mutate((r) => r.pushOptimisticSend(text2, hidden));
19180
19136
  await publishUserMessage(text2, { hidden, dialogId });
19181
19137
  },
@@ -19268,11 +19224,11 @@ function useNatsChatAdapter(config, options = {}) {
19268
19224
  // Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
19269
19225
  // contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
19270
19226
  // matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
19271
- currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _625 => _625.provider]), () => ( modelProvider)), () => ( null)),
19272
- currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _626 => _626.modelLabel]), () => ( modelLabel)), () => ( null)),
19273
- currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _627 => _627.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _628 => _628.contextWindowMaxTokens]))), () => ( null)),
19274
- currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _629 => _629.inputTokensSize]), () => ( null)),
19275
- currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _630 => _630.outputTokensSize]), () => ( null)),
19227
+ currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _623 => _623.provider]), () => ( modelProvider)), () => ( null)),
19228
+ currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _624 => _624.modelLabel]), () => ( modelLabel)), () => ( null)),
19229
+ currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _625 => _625.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _626 => _626.contextWindowMaxTokens]))), () => ( null)),
19230
+ currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _627 => _627.inputTokensSize]), () => ( null)),
19231
+ currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _628 => _628.outputTokensSize]), () => ( null)),
19276
19232
  currentCacheHitRatePct: null,
19277
19233
  currentUsageBreakdown: null,
19278
19234
  // Dialog management
@@ -19394,7 +19350,7 @@ function useUnifiedChat(options) {
19394
19350
  []
19395
19351
  );
19396
19352
  const displayRefForward = _react.useCallback.call(void 0,
19397
- (ref) => _optionalChain([activeStateRef, 'access', _631 => _631.current, 'access', _632 => _632.displayRef, 'optionalCall', _633 => _633(ref)]),
19353
+ (ref) => _optionalChain([activeStateRef, 'access', _629 => _629.current, 'access', _630 => _630.displayRef, 'optionalCall', _631 => _631(ref)]),
19398
19354
  []
19399
19355
  );
19400
19356
  const displayRef = activeState.displayRef ? displayRefForward : void 0;
@@ -19404,7 +19360,7 @@ function useUnifiedChat(options) {
19404
19360
  const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
19405
19361
  const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
19406
19362
  const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
19407
- const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _634 => _634.current, 'access', _635 => _635.setDialogScope, 'optionalCall', _636 => _636(scope)]), []);
19363
+ const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _632 => _632.current, 'access', _633 => _633.setDialogScope, 'optionalCall', _634 => _634(scope)]), []);
19408
19364
  const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
19409
19365
  const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
19410
19366
  const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);