@flamingo-stack/openframe-frontend-core 0.0.698-2527.7788.1 → 0.0.698
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-DMUUWHII.cjs → chunk-26GBOUIP.cjs} +92 -9
- package/dist/chunk-26GBOUIP.cjs.map +1 -0
- package/dist/{chunk-LJRMRHX3.js → chunk-2QESJBGE.js} +8 -8
- package/dist/{chunk-6FA7CKGO.cjs → chunk-3CFHHJKK.cjs} +3 -3
- package/dist/{chunk-6FA7CKGO.cjs.map → chunk-3CFHHJKK.cjs.map} +1 -1
- package/dist/{chunk-C36HIYNP.cjs → chunk-4FS56YZS.cjs} +681 -660
- package/dist/chunk-4FS56YZS.cjs.map +1 -0
- package/dist/{chunk-6JZJU3MT.cjs → chunk-55L6XDGC.cjs} +7 -7
- package/dist/{chunk-6JZJU3MT.cjs.map → chunk-55L6XDGC.cjs.map} +1 -1
- package/dist/{chunk-R6W6Q7LP.js → chunk-5VXVHYHC.js} +5 -5
- package/dist/{chunk-TQJCGJC3.cjs → chunk-676MGKZW.cjs} +5 -5
- package/dist/{chunk-TQJCGJC3.cjs.map → chunk-676MGKZW.cjs.map} +1 -1
- package/dist/{chunk-AUGTCILI.js → chunk-7QAT2DV5.js} +3 -3
- package/dist/{chunk-L4TUCNI2.js → chunk-AC6OEPUV.js} +6 -6
- package/dist/{chunk-G6ASUIGI.js → chunk-AXAGIZTZ.js} +21 -24
- package/dist/chunk-AXAGIZTZ.js.map +1 -0
- package/dist/{chunk-KAYOPKVW.cjs → chunk-BRTCMVBG.cjs} +15 -15
- package/dist/{chunk-KAYOPKVW.cjs.map → chunk-BRTCMVBG.cjs.map} +1 -1
- package/dist/{chunk-DBC5HYVO.cjs → chunk-BZHARMWU.cjs} +80 -80
- package/dist/{chunk-DBC5HYVO.cjs.map → chunk-BZHARMWU.cjs.map} +1 -1
- package/dist/{chunk-LXKEHZUV.cjs → chunk-COX4CSXZ.cjs} +466 -469
- package/dist/chunk-COX4CSXZ.cjs.map +1 -0
- package/dist/{chunk-AVRVYWCS.js → chunk-CXQTK6W3.js} +89 -6
- package/dist/chunk-CXQTK6W3.js.map +1 -0
- package/dist/{chunk-77DK66OI.cjs → chunk-FBXR26Q4.cjs} +50 -50
- package/dist/{chunk-77DK66OI.cjs.map → chunk-FBXR26Q4.cjs.map} +1 -1
- package/dist/{chunk-MRNN5TYM.js → chunk-FI7ZPOYQ.js} +27 -6
- package/dist/chunk-FI7ZPOYQ.js.map +1 -0
- package/dist/{chunk-UODSGUIM.js → chunk-FWVIDEOA.js} +2 -2
- package/dist/{chunk-OV6AUU2F.js → chunk-HNHKXOCZ.js} +7 -7
- package/dist/{chunk-DCKHFLXE.cjs → chunk-IRWS22CP.cjs} +22 -22
- package/dist/{chunk-DCKHFLXE.cjs.map → chunk-IRWS22CP.cjs.map} +1 -1
- package/dist/{chunk-SIQDC6VE.js → chunk-J3ZS6CRA.js} +4 -4
- package/dist/{chunk-ZYU3U3EI.js → chunk-J6ZEVCVN.js} +4 -4
- package/dist/{chunk-T3ZAMHEG.js → chunk-MOEOLUVD.js} +3 -3
- package/dist/{chunk-AHAZ6WLZ.cjs → chunk-OEX2WLZX.cjs} +10 -10
- package/dist/{chunk-AHAZ6WLZ.cjs.map → chunk-OEX2WLZX.cjs.map} +1 -1
- package/dist/{chunk-WCHS6P5U.js → chunk-R2XJXMAT.js} +6 -6
- package/dist/{chunk-DVDXCOTA.js → chunk-R4JFUVQ4.js} +3 -3
- package/dist/{chunk-UVRLSOEJ.js → chunk-TN2RFU6D.js} +113 -183
- package/dist/chunk-TN2RFU6D.js.map +1 -0
- package/dist/{chunk-MKOAFRVX.cjs → chunk-UXU4DROI.cjs} +12 -12
- package/dist/{chunk-MKOAFRVX.cjs.map → chunk-UXU4DROI.cjs.map} +1 -1
- package/dist/{chunk-VF37HVC4.cjs → chunk-VCEO6AGC.cjs} +18 -18
- package/dist/{chunk-VF37HVC4.cjs.map → chunk-VCEO6AGC.cjs.map} +1 -1
- package/dist/{chunk-UIWQO4OC.cjs → chunk-VO2FJ2AL.cjs} +36 -36
- package/dist/{chunk-UIWQO4OC.cjs.map → chunk-VO2FJ2AL.cjs.map} +1 -1
- package/dist/{chunk-COA3TIOD.js → chunk-VOSO3SC5.js} +5 -5
- package/dist/{chunk-W4YXUJOF.cjs → chunk-VP6PJLMI.cjs} +48 -118
- package/dist/chunk-VP6PJLMI.cjs.map +1 -0
- package/dist/{chunk-Z7OC25FG.cjs → chunk-VQEXKCFM.cjs} +5 -5
- package/dist/{chunk-Z7OC25FG.cjs.map → chunk-VQEXKCFM.cjs.map} +1 -1
- package/dist/{chunk-IMCBJOFN.cjs → chunk-X2W4ANCM.cjs} +43 -43
- package/dist/{chunk-IMCBJOFN.cjs.map → chunk-X2W4ANCM.cjs.map} +1 -1
- package/dist/{chunk-3WRN7VAD.js → chunk-YNBOPBO7.js} +4 -4
- package/dist/{chunk-LNUZHW4O.cjs → chunk-YRSPHPGO.cjs} +25 -25
- package/dist/{chunk-LNUZHW4O.cjs.map → chunk-YRSPHPGO.cjs.map} +1 -1
- package/dist/{chunk-HOZGKVRI.js → chunk-ZNJK5HOE.js} +2 -2
- package/dist/components/announcement-bar.d.ts.map +1 -1
- package/dist/components/case-studies/index.cjs +17 -17
- package/dist/components/case-studies/index.js +5 -5
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/index.cjs +6 -6
- package/dist/components/contact/index.js +5 -5
- package/dist/components/docs/index.cjs +9 -9
- package/dist/components/docs/index.js +8 -8
- package/dist/components/embeds/index.cjs +6 -6
- package/dist/components/embeds/index.js +5 -5
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/faq/index.js +5 -5
- package/dist/components/features/cards-strip.d.ts.map +1 -1
- package/dist/components/features/index.cjs +5 -5
- package/dist/components/features/index.js +4 -4
- package/dist/components/help-center-pages/index.cjs +81 -81
- package/dist/components/help-center-pages/index.js +16 -16
- package/dist/components/index.cjs +48 -47
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +17 -16
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +32 -32
- package/dist/components/meeting-scheduler/index.js +4 -4
- package/dist/components/navigation/index.cjs +8 -8
- package/dist/components/navigation/index.js +7 -7
- package/dist/components/onboarding-guides/index.cjs +8 -8
- package/dist/components/onboarding-guides/index.js +7 -7
- package/dist/components/tickets/index.cjs +9 -9
- package/dist/components/tickets/index.js +8 -8
- package/dist/components/ui/index.cjs +5 -5
- package/dist/components/ui/index.js +4 -4
- package/dist/components/ui/marquee-wall.d.ts.map +1 -1
- package/dist/hooks/index.cjs +5 -5
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +7 -7
- package/dist/hooks/ui/use-in-view.d.ts +8 -1
- package/dist/hooks/ui/use-in-view.d.ts.map +1 -1
- package/dist/hooks/use-scenario-player.d.ts +3 -0
- package/dist/hooks/use-scenario-player.d.ts.map +1 -1
- package/dist/index.cjs +20 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -13
- package/dist/index.js.map +1 -1
- package/dist/utils/index.cjs +21 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +19 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/path-pattern.d.ts +5 -0
- package/dist/utils/path-pattern.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/announcement-bar.tsx +3 -2
- package/src/components/features/cards-strip.tsx +12 -11
- package/src/components/ui/marquee-wall.tsx +16 -14
- package/src/hooks/__tests__/use-scenario-player.test.tsx +48 -0
- package/src/hooks/ui/use-in-view.ts +15 -3
- package/src/hooks/use-scenario-player.ts +22 -2
- package/src/utils/__tests__/path-pattern.test.ts +30 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/path-pattern.ts +31 -0
- package/dist/chunk-AVRVYWCS.js.map +0 -1
- package/dist/chunk-C36HIYNP.cjs.map +0 -1
- package/dist/chunk-DMUUWHII.cjs.map +0 -1
- package/dist/chunk-G6ASUIGI.js.map +0 -1
- package/dist/chunk-LXKEHZUV.cjs.map +0 -1
- package/dist/chunk-MRNN5TYM.js.map +0 -1
- package/dist/chunk-UVRLSOEJ.js.map +0 -1
- package/dist/chunk-W4YXUJOF.cjs.map +0 -1
- /package/dist/{chunk-LJRMRHX3.js.map → chunk-2QESJBGE.js.map} +0 -0
- /package/dist/{chunk-R6W6Q7LP.js.map → chunk-5VXVHYHC.js.map} +0 -0
- /package/dist/{chunk-AUGTCILI.js.map → chunk-7QAT2DV5.js.map} +0 -0
- /package/dist/{chunk-L4TUCNI2.js.map → chunk-AC6OEPUV.js.map} +0 -0
- /package/dist/{chunk-UODSGUIM.js.map → chunk-FWVIDEOA.js.map} +0 -0
- /package/dist/{chunk-OV6AUU2F.js.map → chunk-HNHKXOCZ.js.map} +0 -0
- /package/dist/{chunk-SIQDC6VE.js.map → chunk-J3ZS6CRA.js.map} +0 -0
- /package/dist/{chunk-ZYU3U3EI.js.map → chunk-J6ZEVCVN.js.map} +0 -0
- /package/dist/{chunk-T3ZAMHEG.js.map → chunk-MOEOLUVD.js.map} +0 -0
- /package/dist/{chunk-WCHS6P5U.js.map → chunk-R2XJXMAT.js.map} +0 -0
- /package/dist/{chunk-DVDXCOTA.js.map → chunk-R4JFUVQ4.js.map} +0 -0
- /package/dist/{chunk-COA3TIOD.js.map → chunk-VOSO3SC5.js.map} +0 -0
- /package/dist/{chunk-3WRN7VAD.js.map → chunk-YNBOPBO7.js.map} +0 -0
- /package/dist/{chunk-HOZGKVRI.js.map → chunk-ZNJK5HOE.js.map} +0 -0
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var _chunk26GBOUIPcjs = require('./chunk-26GBOUIP.cjs');
|
|
24
26
|
|
|
25
27
|
|
|
26
28
|
var _chunkSADRZ4YIcjs = require('./chunk-SADRZ4YI.cjs');
|
|
@@ -533,7 +535,7 @@ function ToolCallRow({ call, expanded, onToggle, batchStatus, execution, showExe
|
|
|
533
535
|
onClick: onToggle,
|
|
534
536
|
className: "flex w-full cursor-pointer items-start gap-[var(--spacing-system-xsf)] p-[var(--spacing-system-sf)] text-left",
|
|
535
537
|
children: [
|
|
536
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
538
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk26GBOUIPcjs.ToolIcon, { toolType, size: 16 }) }),
|
|
537
539
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
538
540
|
"div",
|
|
539
541
|
{
|
|
@@ -1160,14 +1162,14 @@ function buildHeadingIdMap(content, sectionIds) {
|
|
|
1160
1162
|
for (const section of sectionIds) {
|
|
1161
1163
|
sectionIdMap.set(section.title, section.id);
|
|
1162
1164
|
sectionIdMap.set(section.title.toLowerCase(), section.id);
|
|
1163
|
-
sectionIdMap.set(
|
|
1165
|
+
sectionIdMap.set(_chunk26GBOUIPcjs.stripHeadingEmojis.call(void 0, section.title).toLowerCase(), section.id);
|
|
1164
1166
|
}
|
|
1165
1167
|
}
|
|
1166
|
-
const dedupe =
|
|
1168
|
+
const dedupe = _chunk26GBOUIPcjs.createHeadingIdDeduper.call(void 0, );
|
|
1167
1169
|
const map = /* @__PURE__ */ new Map();
|
|
1168
1170
|
let sectionOrdinal = 0;
|
|
1169
1171
|
let headingOrdinal = 0;
|
|
1170
|
-
for (const { line, level, text: rawText } of
|
|
1172
|
+
for (const { line, level, text: rawText } of _chunk26GBOUIPcjs.scanHeadings.call(void 0, content)) {
|
|
1171
1173
|
const text2 = stripInlineMarkdown(rawText).trim();
|
|
1172
1174
|
headingOrdinal++;
|
|
1173
1175
|
if (level <= EXTRACTOR_MAX_LEVEL) sectionOrdinal++;
|
|
@@ -1176,8 +1178,8 @@ function buildHeadingIdMap(content, sectionIds) {
|
|
|
1176
1178
|
for (const variation of [
|
|
1177
1179
|
text2,
|
|
1178
1180
|
text2.toLowerCase(),
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
+
_chunk26GBOUIPcjs.stripHeadingEmojis.call(void 0, text2),
|
|
1182
|
+
_chunk26GBOUIPcjs.stripHeadingEmojis.call(void 0, text2).toLowerCase()
|
|
1181
1183
|
]) {
|
|
1182
1184
|
const id = sectionIdMap.get(variation);
|
|
1183
1185
|
if (id) {
|
|
@@ -1187,7 +1189,7 @@ function buildHeadingIdMap(content, sectionIds) {
|
|
|
1187
1189
|
}
|
|
1188
1190
|
}
|
|
1189
1191
|
if (assigned === void 0) {
|
|
1190
|
-
const baseId =
|
|
1192
|
+
const baseId = _chunk26GBOUIPcjs.slugifyHeadingText.call(void 0, text2);
|
|
1191
1193
|
assigned = dedupe(
|
|
1192
1194
|
baseId || (level <= EXTRACTOR_MAX_LEVEL ? `section-${sectionOrdinal}` : `heading-${headingOrdinal}`)
|
|
1193
1195
|
);
|
|
@@ -1689,7 +1691,7 @@ function buildBaseComponents({
|
|
|
1689
1691
|
const mapped = useHeadingId(node);
|
|
1690
1692
|
const taken = useAssignedHeadingIds();
|
|
1691
1693
|
const explicit = typeof _optionalChain([node, 'optionalAccess', _53 => _53.properties, 'optionalAccess', _54 => _54.id]) === "string" && node.properties.id !== "" ? node.properties.id : void 0;
|
|
1692
|
-
const id = _nullishCoalesce(_nullishCoalesce(explicit, () => ( mapped)), () => ( resolveFallbackHeadingId(
|
|
1694
|
+
const id = _nullishCoalesce(_nullishCoalesce(explicit, () => ( mapped)), () => ( resolveFallbackHeadingId(_chunk26GBOUIPcjs.slugifyHeadingText.call(void 0, extractText(children)), taken)));
|
|
1693
1695
|
const EffectiveTag = Tag2 === "h1" && demoteMarkdownH1ToH2 ? "h2" : Tag2;
|
|
1694
1696
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EffectiveTag, { id: id || void 0, className: headingClassName, children });
|
|
1695
1697
|
}
|
|
@@ -1764,10 +1766,10 @@ function buildBaseComponents({
|
|
|
1764
1766
|
const handleAnchorClick = (e) => {
|
|
1765
1767
|
if (inPageAnchorId === null) return;
|
|
1766
1768
|
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) return;
|
|
1767
|
-
const target =
|
|
1769
|
+
const target = _chunk26GBOUIPcjs.getHashTargetElement.call(void 0, inPageAnchorId);
|
|
1768
1770
|
if (!_optionalChain([target, 'optionalAccess', _55 => _55.id])) return;
|
|
1769
1771
|
e.preventDefault();
|
|
1770
|
-
|
|
1772
|
+
_chunk26GBOUIPcjs.navigateSamePageHash.call(void 0, `#${target.id}`, { headerOffset: _chunk26GBOUIPcjs.HUB_HEADER_OFFSET_PX });
|
|
1771
1773
|
};
|
|
1772
1774
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1773
1775
|
"a",
|
|
@@ -2307,7 +2309,7 @@ function findInlineCodeRanges(source) {
|
|
|
2307
2309
|
while (pos <= len) {
|
|
2308
2310
|
let end = source.indexOf("\n", pos);
|
|
2309
2311
|
if (end === -1) end = len;
|
|
2310
|
-
const blank =
|
|
2312
|
+
const blank = _chunk26GBOUIPcjs.isBlankLine.call(void 0, source.slice(pos, end));
|
|
2311
2313
|
if (blank && segStart !== -1) break;
|
|
2312
2314
|
if (!blank) {
|
|
2313
2315
|
if (segStart === -1) segStart = pos;
|
|
@@ -2389,7 +2391,7 @@ function toMaskLines(source) {
|
|
|
2389
2391
|
return out;
|
|
2390
2392
|
}
|
|
2391
2393
|
function blankFencedRegions(masked, lines) {
|
|
2392
|
-
const fences =
|
|
2394
|
+
const fences = _chunk26GBOUIPcjs.createFenceTracker.call(void 0, );
|
|
2393
2395
|
const ranges = [];
|
|
2394
2396
|
let openStart = null;
|
|
2395
2397
|
let lastEnd = 0;
|
|
@@ -2428,7 +2430,7 @@ function blankIndentedCode(masked, lines) {
|
|
|
2428
2430
|
const listContentCols = [];
|
|
2429
2431
|
const ranges = [];
|
|
2430
2432
|
for (const line of lines) {
|
|
2431
|
-
if (
|
|
2433
|
+
if (_chunk26GBOUIPcjs.isBlankLine.call(void 0, line.content)) continue;
|
|
2432
2434
|
const indent = leadingIndent(line.content);
|
|
2433
2435
|
const top = listContentCols.length ? listContentCols[listContentCols.length - 1] : 0;
|
|
2434
2436
|
if (indent >= top + 4) {
|
|
@@ -2519,7 +2521,7 @@ function contPrefixLen(c) {
|
|
|
2519
2521
|
function findLabelClose(lines, i, from) {
|
|
2520
2522
|
for (let j = i; j < lines.length; j++) {
|
|
2521
2523
|
const c = stripCr(lines[j].content);
|
|
2522
|
-
if (j > i &&
|
|
2524
|
+
if (j > i && _chunk26GBOUIPcjs.isBlankLine.call(void 0, c)) return { stoppedAt: j };
|
|
2523
2525
|
for (let q = j === i ? from : contPrefixLen(c); q < c.length; q = skipEscaped(c, q)) {
|
|
2524
2526
|
if (c[q] === "[") return { stoppedAt: j };
|
|
2525
2527
|
if (c[q] !== "]") continue;
|
|
@@ -2537,7 +2539,7 @@ function blankLinkDefinitions(masked, lines) {
|
|
|
2537
2539
|
let k = from;
|
|
2538
2540
|
for (; k < lines.length; k++) {
|
|
2539
2541
|
const c = stripCr(lines[k].content);
|
|
2540
|
-
if (
|
|
2542
|
+
if (_chunk26GBOUIPcjs.isBlankLine.call(void 0, c)) break;
|
|
2541
2543
|
blankLine(lines[k]);
|
|
2542
2544
|
if (stop(c)) {
|
|
2543
2545
|
k++;
|
|
@@ -2580,7 +2582,7 @@ function blankLinkDefinitions(masked, lines) {
|
|
|
2580
2582
|
const k = j + 1;
|
|
2581
2583
|
if (k >= lines.length) break;
|
|
2582
2584
|
const c = stripCr(lines[k].content);
|
|
2583
|
-
if (
|
|
2585
|
+
if (_chunk26GBOUIPcjs.isBlankLine.call(void 0, c)) break;
|
|
2584
2586
|
const at = contPrefixLen(c);
|
|
2585
2587
|
const next = tail.k === "needDest" ? parseDefTail(c, at) : parseTitleTail(c, skipSpaces(c, at));
|
|
2586
2588
|
if (next.k === "decline") break;
|
|
@@ -2650,7 +2652,7 @@ function blankUnreferencedFootnotes(masked, lines, folded) {
|
|
|
2650
2652
|
let sawBlank = false;
|
|
2651
2653
|
for (let k = i + 1; k < lines.length; k++) {
|
|
2652
2654
|
const c = text2(lines[k]);
|
|
2653
|
-
if (
|
|
2655
|
+
if (_chunk26GBOUIPcjs.isBlankLine.call(void 0, c)) {
|
|
2654
2656
|
sawBlank = true;
|
|
2655
2657
|
continue;
|
|
2656
2658
|
}
|
|
@@ -2750,7 +2752,7 @@ function paragraphEnd(s, from) {
|
|
|
2750
2752
|
lineStart += 1;
|
|
2751
2753
|
const next = s.indexOf("\n", lineStart);
|
|
2752
2754
|
const line = s.slice(lineStart, next === -1 ? s.length : next);
|
|
2753
|
-
if (
|
|
2755
|
+
if (_chunk26GBOUIPcjs.isBlankLine.call(void 0, line)) return lineStart;
|
|
2754
2756
|
if (next === -1) break;
|
|
2755
2757
|
lineStart = next;
|
|
2756
2758
|
}
|
|
@@ -2904,7 +2906,7 @@ function blankListItemCode(masked, lines, depth = 0) {
|
|
|
2904
2906
|
run = [];
|
|
2905
2907
|
};
|
|
2906
2908
|
for (const line of lines) {
|
|
2907
|
-
if (
|
|
2909
|
+
if (_chunk26GBOUIPcjs.isBlankLine.call(void 0, line.content)) {
|
|
2908
2910
|
if (run.length > 0) run.push({ ...line, content: "" });
|
|
2909
2911
|
continue;
|
|
2910
2912
|
}
|
|
@@ -3129,7 +3131,7 @@ function htmlBlockStartKind(line, inParagraph) {
|
|
|
3129
3131
|
function computeHtmlBlockRanges(text2) {
|
|
3130
3132
|
if (text2.indexOf("<") === -1) return [];
|
|
3131
3133
|
const ranges = [];
|
|
3132
|
-
const fences =
|
|
3134
|
+
const fences = _chunk26GBOUIPcjs.createFenceTracker.call(void 0, );
|
|
3133
3135
|
let kind = null;
|
|
3134
3136
|
let start = 0;
|
|
3135
3137
|
let lastEnd = 0;
|
|
@@ -3144,9 +3146,9 @@ function computeHtmlBlockRanges(text2) {
|
|
|
3144
3146
|
const expanded = expandTabs(line);
|
|
3145
3147
|
const norm = stripContainerPrefix(expanded, listContentCol);
|
|
3146
3148
|
if (norm.openedListCol >= 0) listContentCol = norm.openedListCol;
|
|
3147
|
-
else if (!
|
|
3148
|
-
const normBlank =
|
|
3149
|
-
const blank = openPrefixLen > 0 ?
|
|
3149
|
+
else if (!_chunk26GBOUIPcjs.isBlankLine.call(void 0, norm.text) && norm.text === expanded) listContentCol = 0;
|
|
3150
|
+
const normBlank = _chunk26GBOUIPcjs.isBlankLine.call(void 0, norm.text);
|
|
3151
|
+
const blank = openPrefixLen > 0 ? _chunk26GBOUIPcjs.isBlankLine.call(void 0, expanded.slice(openPrefixLen)) : _chunk26GBOUIPcjs.isBlankLine.call(void 0, line);
|
|
3150
3152
|
if (kind !== null) {
|
|
3151
3153
|
if (kind >= 6) {
|
|
3152
3154
|
if (blank) {
|
|
@@ -3300,7 +3302,7 @@ var ScanState = class {
|
|
|
3300
3302
|
* `FENCE_RE` plus its own open/close state machine, cross-referenced by a
|
|
3301
3303
|
* comment) is precisely the drift that produced the `~~~` bug.
|
|
3302
3304
|
*/
|
|
3303
|
-
this.fences =
|
|
3305
|
+
this.fences = _chunk26GBOUIPcjs.createFenceTracker.call(void 0, );
|
|
3304
3306
|
/** Depth of currently open raw HTML block containers. */
|
|
3305
3307
|
this.htmlDepth = 0;
|
|
3306
3308
|
/** Raw-block tag name of a start tag still waiting for its `>`, or null. */
|
|
@@ -3373,7 +3375,7 @@ function splitStreamingBlocks(content) {
|
|
|
3373
3375
|
const isListOrQuote = (line) => /^\s{0,3}(?:[-+*]\s|\d{1,9}[.)]\s|>)/.test(line);
|
|
3374
3376
|
const firstNonBlank = (arr) => {
|
|
3375
3377
|
for (const line of arr) {
|
|
3376
|
-
if (!
|
|
3378
|
+
if (!_chunk26GBOUIPcjs.isBlankLine.call(void 0, line)) return line;
|
|
3377
3379
|
}
|
|
3378
3380
|
return void 0;
|
|
3379
3381
|
};
|
|
@@ -3383,10 +3385,10 @@ function splitStreamingBlocks(content) {
|
|
|
3383
3385
|
state.scanLine(line);
|
|
3384
3386
|
if (state.htmlMark() !== markBefore || state.htmlLatched()) currentTouchedHtml = true;
|
|
3385
3387
|
current.push(line);
|
|
3386
|
-
const isBlank =
|
|
3388
|
+
const isBlank = _chunk26GBOUIPcjs.isBlankLine.call(void 0, line);
|
|
3387
3389
|
if (!isBlank || state.fences.openChar() !== null || state.htmlBlocksCut()) continue;
|
|
3388
3390
|
let j = i + 1;
|
|
3389
|
-
while (j < lines.length &&
|
|
3391
|
+
while (j < lines.length && _chunk26GBOUIPcjs.isBlankLine.call(void 0, lines[j])) j++;
|
|
3390
3392
|
if (j >= lines.length) continue;
|
|
3391
3393
|
const next = lines[j];
|
|
3392
3394
|
if (/^\s/.test(next)) continue;
|
|
@@ -3394,7 +3396,7 @@ function splitStreamingBlocks(content) {
|
|
|
3394
3396
|
if (isListOrQuote(next) && unitOpener !== void 0 && isListOrQuote(unitOpener)) {
|
|
3395
3397
|
continue;
|
|
3396
3398
|
}
|
|
3397
|
-
if (current.every(
|
|
3399
|
+
if (current.every(_chunk26GBOUIPcjs.isBlankLine)) continue;
|
|
3398
3400
|
units.push(current);
|
|
3399
3401
|
unitTouchedHtml.push(currentTouchedHtml);
|
|
3400
3402
|
current = [];
|
|
@@ -4216,7 +4218,7 @@ function hexToRgb2(hex) {
|
|
|
4216
4218
|
return { r: n >> 16 & 255, g: n >> 8 & 255, b: n & 255 };
|
|
4217
4219
|
}
|
|
4218
4220
|
function rgbToHex(r, g, b) {
|
|
4219
|
-
const to = (n) =>
|
|
4221
|
+
const to = (n) => _chunk26GBOUIPcjs.clamp.call(void 0, Math.round(n), 0, 255).toString(16).padStart(2, "0");
|
|
4220
4222
|
return `#${to(r)}${to(g)}${to(b)}`;
|
|
4221
4223
|
}
|
|
4222
4224
|
var HOVER_DARKEN_STEP = 10;
|
|
@@ -4250,8 +4252,8 @@ function rgbToHsl(r, g, b) {
|
|
|
4250
4252
|
return { h: Math.round(h), s: Math.round(s * 100), l: Math.round(l * 100) };
|
|
4251
4253
|
}
|
|
4252
4254
|
function hslToRgb(h, s, l) {
|
|
4253
|
-
const sn =
|
|
4254
|
-
const ln =
|
|
4255
|
+
const sn = _chunk26GBOUIPcjs.clamp.call(void 0, s, 0, 100) / 100;
|
|
4256
|
+
const ln = _chunk26GBOUIPcjs.clamp.call(void 0, l, 0, 100) / 100;
|
|
4255
4257
|
const hn = (h % 360 + 360) % 360;
|
|
4256
4258
|
if (sn === 0) {
|
|
4257
4259
|
const v = Math.round(ln * 255);
|
|
@@ -7095,7 +7097,7 @@ var ToolExecutionDisplay = _react.forwardRef.call(void 0,
|
|
|
7095
7097
|
const statusTone = isExecuting ? "working" : message.success === false ? "error" : "success";
|
|
7096
7098
|
const statusLabel = _optionalChain([message, 'access', _129 => _129.statusLabel, 'optionalAccess', _130 => _130.trim, 'call', _131 => _131()]) || (isExecuting ? "Working on it" : message.success === false ? "Failed" : "Done");
|
|
7097
7099
|
const headerContent = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
7098
|
-
!isClient && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7100
|
+
!isClient && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk26GBOUIPcjs.ToolIcon, { toolType: integratedToolType, size: 16 }) }),
|
|
7099
7101
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7100
7102
|
"div",
|
|
7101
7103
|
{
|
|
@@ -8607,7 +8609,7 @@ function MarqueeWallFades({
|
|
|
8607
8609
|
}) });
|
|
8608
8610
|
}
|
|
8609
8611
|
function CloneCopy({ className, style, children }) {
|
|
8610
|
-
const ref =
|
|
8612
|
+
const ref = _chunk26GBOUIPcjs.useSuppressCloneFocus.call(void 0, true);
|
|
8611
8613
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref, "aria-hidden": true, "data-marquee-copy": "clone", className, style, children });
|
|
8612
8614
|
}
|
|
8613
8615
|
function MarqueeWall({
|
|
@@ -8634,7 +8636,7 @@ function MarqueeWall({
|
|
|
8634
8636
|
const containerRef = _react.useRef.call(void 0, null);
|
|
8635
8637
|
const trackRef = _react.useRef.call(void 0, null);
|
|
8636
8638
|
const copyRef = _react.useRef.call(void 0, null);
|
|
8637
|
-
const reducedMotion = _nullishCoalesce(
|
|
8639
|
+
const reducedMotion = _nullishCoalesce(_chunk26GBOUIPcjs.useMediaQuery.call(void 0, "(prefers-reduced-motion: reduce)"), () => ( false));
|
|
8638
8640
|
const [overflows, setOverflows] = _react.useState.call(void 0, false);
|
|
8639
8641
|
const copySizeRef = _react.useRef.call(void 0, 0);
|
|
8640
8642
|
const wrapSizeRef = _react.useRef.call(void 0, 0);
|
|
@@ -8661,16 +8663,15 @@ function MarqueeWall({
|
|
|
8661
8663
|
ro.observe(copy);
|
|
8662
8664
|
return () => ro.disconnect();
|
|
8663
8665
|
}, [measure, marqueeMounted]);
|
|
8664
|
-
const
|
|
8666
|
+
const { ref: observe, inView: nearViewport } = _chunk26GBOUIPcjs.useInView.call(void 0, {
|
|
8667
|
+
rootMargin: _chunk26GBOUIPcjs.NEAR_VIEWPORT_ROOT_MARGIN,
|
|
8668
|
+
initial: true
|
|
8669
|
+
});
|
|
8665
8670
|
_react.useEffect.call(void 0, () => {
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
});
|
|
8671
|
-
io.observe(el);
|
|
8672
|
-
return () => io.disconnect();
|
|
8673
|
-
}, []);
|
|
8671
|
+
observe(containerRef.current);
|
|
8672
|
+
return () => observe(null);
|
|
8673
|
+
}, [observe]);
|
|
8674
|
+
const autoplay = _chunk26GBOUIPcjs.useAutoplay.call(void 0, nearViewport);
|
|
8674
8675
|
const pointerInsideRef = _react.useRef.call(void 0, false);
|
|
8675
8676
|
const clearPointerInside = _react.useCallback.call(void 0, () => {
|
|
8676
8677
|
pointerInsideRef.current = false;
|
|
@@ -8683,7 +8684,7 @@ function MarqueeWall({
|
|
|
8683
8684
|
if (e.pointerType === "touch") return;
|
|
8684
8685
|
pointerInsideRef.current = false;
|
|
8685
8686
|
}, []);
|
|
8686
|
-
|
|
8687
|
+
_chunk26GBOUIPcjs.useResetOnPageHidden.call(void 0, clearPointerInside);
|
|
8687
8688
|
const draggingRef = _react.useRef.call(void 0, false);
|
|
8688
8689
|
const dragSuppressUntilRef = _react.useRef.call(void 0, 0);
|
|
8689
8690
|
const applyTransform = _react.useCallback.call(void 0,
|
|
@@ -8736,10 +8737,10 @@ function MarqueeWall({
|
|
|
8736
8737
|
if (!sync) return void 0;
|
|
8737
8738
|
return sync.register(member);
|
|
8738
8739
|
}, [sync, member]);
|
|
8739
|
-
const { posRef, wrap } =
|
|
8740
|
-
active: marqueeActive &&
|
|
8740
|
+
const { posRef, wrap } = _chunk26GBOUIPcjs.useMarqueeEngine.call(void 0, {
|
|
8741
|
+
active: marqueeActive && autoplay.playing && isDriver,
|
|
8741
8742
|
speed,
|
|
8742
|
-
isPaused: (now) => pauseOnHover && pointerInsideRef.current || draggingRef.current || now < dragSuppressUntilRef.current
|
|
8743
|
+
isPaused: (now) => pauseOnHover && pointerInsideRef.current || draggingRef.current || now < dragSuppressUntilRef.current,
|
|
8743
8744
|
getWrapSize: () => wrapSizeRef.current,
|
|
8744
8745
|
apply: applyPos,
|
|
8745
8746
|
// Synced pairs: a re-elected driver resumes from the pair's live position
|
|
@@ -8776,7 +8777,7 @@ function MarqueeWall({
|
|
|
8776
8777
|
if (Math.abs(delta) > 3 && !dragMovedRef.current) {
|
|
8777
8778
|
dragMovedRef.current = true;
|
|
8778
8779
|
try {
|
|
8779
|
-
_optionalChain([containerRef, 'access',
|
|
8780
|
+
_optionalChain([containerRef, 'access', _178 => _178.current, 'optionalAccess', _179 => _179.setPointerCapture, 'call', _180 => _180(e.pointerId)]);
|
|
8780
8781
|
} catch (e7) {
|
|
8781
8782
|
}
|
|
8782
8783
|
}
|
|
@@ -8793,7 +8794,7 @@ function MarqueeWall({
|
|
|
8793
8794
|
dragSuppressUntilRef.current = performance.now() + DRAG_RESUME_MS;
|
|
8794
8795
|
if (dragMovedRef.current) {
|
|
8795
8796
|
try {
|
|
8796
|
-
_optionalChain([containerRef, 'access',
|
|
8797
|
+
_optionalChain([containerRef, 'access', _181 => _181.current, 'optionalAccess', _182 => _182.releasePointerCapture, 'call', _183 => _183(e.pointerId)]);
|
|
8797
8798
|
} catch (e8) {
|
|
8798
8799
|
}
|
|
8799
8800
|
}
|
|
@@ -9229,7 +9230,7 @@ var ChatTicketItem = _react.forwardRef.call(void 0,
|
|
|
9229
9230
|
{
|
|
9230
9231
|
ref,
|
|
9231
9232
|
type: "button",
|
|
9232
|
-
onClick: () => _optionalChain([onClick, 'optionalCall',
|
|
9233
|
+
onClick: () => _optionalChain([onClick, 'optionalCall', _184 => _184(ticket.id)]),
|
|
9233
9234
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
9234
9235
|
"flex h-20 w-full items-center gap-4 px-4",
|
|
9235
9236
|
"border-b border-ods-border bg-ods-card",
|
|
@@ -9499,7 +9500,7 @@ function MingoChatHistoryRow({
|
|
|
9499
9500
|
const unread = _nullishCoalesce(dialog.unreadMessagesCount, () => ( 0));
|
|
9500
9501
|
const hasMenu = !!onRequestRename || !!onRequestArchive || !!onRequestCopyLink || !!onRequestCompact;
|
|
9501
9502
|
const owner = dialog.owner;
|
|
9502
|
-
const hasAvatar = !!(_optionalChain([owner, 'optionalAccess',
|
|
9503
|
+
const hasAvatar = !!(_optionalChain([owner, 'optionalAccess', _185 => _185.name]) || _optionalChain([owner, 'optionalAccess', _186 => _186.avatarUrl]));
|
|
9503
9504
|
const [menuOpen, setMenuOpen] = _react.useState.call(void 0, false);
|
|
9504
9505
|
const menuItems = chatDialogMenuItems({
|
|
9505
9506
|
onCopyLink: onRequestCopyLink && (() => onRequestCopyLink(dialog)),
|
|
@@ -9524,11 +9525,11 @@ function MingoChatHistoryRow({
|
|
|
9524
9525
|
{
|
|
9525
9526
|
role: "button",
|
|
9526
9527
|
tabIndex: 0,
|
|
9527
|
-
onClick: () => _optionalChain([onSelect, 'optionalCall',
|
|
9528
|
+
onClick: () => _optionalChain([onSelect, 'optionalCall', _187 => _187(dialog.id)]),
|
|
9528
9529
|
onKeyDown: (e) => {
|
|
9529
9530
|
if (e.key === "Enter" || e.key === " ") {
|
|
9530
9531
|
e.preventDefault();
|
|
9531
|
-
_optionalChain([onSelect, 'optionalCall',
|
|
9532
|
+
_optionalChain([onSelect, 'optionalCall', _188 => _188(dialog.id)]);
|
|
9532
9533
|
}
|
|
9533
9534
|
},
|
|
9534
9535
|
className: "flex min-w-0 flex-1 cursor-pointer items-center gap-[var(--spacing-system-xsf)] p-[var(--spacing-system-s)] focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ods-accent",
|
|
@@ -9595,8 +9596,8 @@ function MingoChatHistoryRow({
|
|
|
9595
9596
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9596
9597
|
"span",
|
|
9597
9598
|
{
|
|
9598
|
-
onClick: () => _optionalChain([onSelect, 'optionalCall',
|
|
9599
|
-
title: _optionalChain([owner, 'optionalAccess',
|
|
9599
|
+
onClick: () => _optionalChain([onSelect, 'optionalCall', _189 => _189(dialog.id)]),
|
|
9600
|
+
title: _optionalChain([owner, 'optionalAccess', _190 => _190.name]) || void 0,
|
|
9600
9601
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
9601
9602
|
"absolute inset-0 flex cursor-pointer items-center justify-center transition-opacity",
|
|
9602
9603
|
hasMenu && (menuOpen ? "pointer-events-none opacity-0" : "md:group-hover/row:pointer-events-none md:group-hover/row:opacity-0 md:peer-[:focus-within]/menu:pointer-events-none md:peer-[:focus-within]/menu:opacity-0")
|
|
@@ -9606,9 +9607,9 @@ function MingoChatHistoryRow({
|
|
|
9606
9607
|
{
|
|
9607
9608
|
variant: "round",
|
|
9608
9609
|
sizePx: 24,
|
|
9609
|
-
src: _optionalChain([owner, 'optionalAccess',
|
|
9610
|
-
alt: _optionalChain([owner, 'optionalAccess',
|
|
9611
|
-
fallback: _optionalChain([owner, 'optionalAccess',
|
|
9610
|
+
src: _optionalChain([owner, 'optionalAccess', _191 => _191.avatarUrl]) || void 0,
|
|
9611
|
+
alt: _optionalChain([owner, 'optionalAccess', _192 => _192.name]) || void 0,
|
|
9612
|
+
fallback: _optionalChain([owner, 'optionalAccess', _193 => _193.name]) || void 0,
|
|
9612
9613
|
initialsClassName: "text-[10px] text-ods-text-secondary"
|
|
9613
9614
|
}
|
|
9614
9615
|
)
|
|
@@ -9660,7 +9661,7 @@ function MingoChatHistory({
|
|
|
9660
9661
|
className
|
|
9661
9662
|
}) {
|
|
9662
9663
|
const groups = _react.useMemo.call(void 0, () => groupDialogs(dialogs), [dialogs]);
|
|
9663
|
-
const noSearchResults = groups.length === 0 && !!_optionalChain([searchQuery, 'optionalAccess',
|
|
9664
|
+
const noSearchResults = groups.length === 0 && !!_optionalChain([searchQuery, 'optionalAccess', _194 => _194.trim, 'call', _195 => _195()]);
|
|
9664
9665
|
const { scrollRef, fadeTop, fadeBottom, update: updateFade } = useScrollFade();
|
|
9665
9666
|
const sentinelRef = _react.useRef.call(void 0, null);
|
|
9666
9667
|
const onLoadMoreRef = _react.useRef.call(void 0, onLoadMore);
|
|
@@ -9677,7 +9678,7 @@ function MingoChatHistory({
|
|
|
9677
9678
|
const io = new IntersectionObserver(
|
|
9678
9679
|
([entry]) => {
|
|
9679
9680
|
if (entry.isIntersecting && !isLoadingMoreRef.current) {
|
|
9680
|
-
_optionalChain([onLoadMoreRef, 'access',
|
|
9681
|
+
_optionalChain([onLoadMoreRef, 'access', _196 => _196.current, 'optionalCall', _197 => _197()]);
|
|
9681
9682
|
}
|
|
9682
9683
|
},
|
|
9683
9684
|
{ root, rootMargin: "120px", threshold: 0.1 }
|
|
@@ -9862,8 +9863,8 @@ function MingoWelcome({
|
|
|
9862
9863
|
icon: action.icon,
|
|
9863
9864
|
variant: action.variant,
|
|
9864
9865
|
onSelect: action.onClick,
|
|
9865
|
-
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall',
|
|
9866
|
-
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall',
|
|
9866
|
+
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall', _198 => _198(action)]),
|
|
9867
|
+
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall', _199 => _199()])
|
|
9867
9868
|
})),
|
|
9868
9869
|
agentSlug,
|
|
9869
9870
|
rows: 4,
|
|
@@ -9916,9 +9917,9 @@ function GuideWelcome({
|
|
|
9916
9917
|
props: action.iconProps,
|
|
9917
9918
|
accent: _nullishCoalesce(_nullishCoalesce(action.accent, () => ( accentFromIdentityIcon(icon))), () => ( "cyan"))
|
|
9918
9919
|
},
|
|
9919
|
-
onSelect: () => _optionalChain([onQuickAction, 'optionalCall',
|
|
9920
|
-
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall',
|
|
9921
|
-
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall',
|
|
9920
|
+
onSelect: () => _optionalChain([onQuickAction, 'optionalCall', _200 => _200(action)]),
|
|
9921
|
+
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall', _201 => _201(action)]),
|
|
9922
|
+
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall', _202 => _202()])
|
|
9922
9923
|
})),
|
|
9923
9924
|
[quickActions, icon, onQuickAction, onQuickActionHover, onQuickActionHoverEnd]
|
|
9924
9925
|
);
|
|
@@ -10095,7 +10096,7 @@ function MingoHistoryRail({
|
|
|
10095
10096
|
onRetry,
|
|
10096
10097
|
className
|
|
10097
10098
|
}) {
|
|
10098
|
-
const hasSearch = !!_optionalChain([searchQuery, 'optionalAccess',
|
|
10099
|
+
const hasSearch = !!_optionalChain([searchQuery, 'optionalAccess', _203 => _203.trim, 'call', _204 => _204()]);
|
|
10099
10100
|
const hasList = dialogs.length > 0 || hasSearch;
|
|
10100
10101
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
10101
10102
|
"div",
|
|
@@ -10222,7 +10223,7 @@ var Modal = _react.forwardRef.call(void 0,
|
|
|
10222
10223
|
document.removeEventListener("focusin", containFocus);
|
|
10223
10224
|
const idx = modalStack.lastIndexOf(stackId);
|
|
10224
10225
|
if (idx !== -1) modalStack.splice(idx, 1);
|
|
10225
|
-
_optionalChain([restoreFocusRef, 'access',
|
|
10226
|
+
_optionalChain([restoreFocusRef, 'access', _205 => _205.current, 'optionalAccess', _206 => _206.focus, 'optionalCall', _207 => _207()]);
|
|
10226
10227
|
};
|
|
10227
10228
|
}, [isOpen]);
|
|
10228
10229
|
_react.useEffect.call(void 0, () => {
|
|
@@ -10472,7 +10473,7 @@ function ChatDialogModals({
|
|
|
10472
10473
|
RenameChatModal,
|
|
10473
10474
|
{
|
|
10474
10475
|
isOpen: renameTarget != null,
|
|
10475
|
-
initialName: _nullishCoalesce(_optionalChain([renameTarget, 'optionalAccess',
|
|
10476
|
+
initialName: _nullishCoalesce(_optionalChain([renameTarget, 'optionalAccess', _208 => _208.title]), () => ( "")),
|
|
10476
10477
|
onClose: () => setRenameTarget(null),
|
|
10477
10478
|
onSave: onConfirmRename
|
|
10478
10479
|
}
|
|
@@ -10531,7 +10532,7 @@ function ChatHeaderSearchField({
|
|
|
10531
10532
|
className
|
|
10532
10533
|
}) {
|
|
10533
10534
|
const [value, setValue] = _react.useState.call(void 0, _nullishCoalesce(initialValue, () => ( "")));
|
|
10534
|
-
const debounced =
|
|
10535
|
+
const debounced = _chunk26GBOUIPcjs.useDebounce.call(void 0, value, 300);
|
|
10535
10536
|
const lastEmitted = _react.useRef.call(void 0, _nullishCoalesce(initialValue, () => ( "")));
|
|
10536
10537
|
const [exiting, setExiting] = _react.useState.call(void 0, false);
|
|
10537
10538
|
const collapsedRef = _react.useRef.call(void 0, false);
|
|
@@ -10544,7 +10545,7 @@ function ChatHeaderSearchField({
|
|
|
10544
10545
|
const finishCollapse = _react.useCallback.call(void 0, () => {
|
|
10545
10546
|
if (collapsedRef.current) return;
|
|
10546
10547
|
collapsedRef.current = true;
|
|
10547
|
-
_optionalChain([onCollapse, 'optionalCall',
|
|
10548
|
+
_optionalChain([onCollapse, 'optionalCall', _209 => _209()]);
|
|
10548
10549
|
}, [onCollapse]);
|
|
10549
10550
|
const beginCollapse = _react.useCallback.call(void 0, () => {
|
|
10550
10551
|
setExiting(true);
|
|
@@ -10860,7 +10861,7 @@ function ChatAttachmentAddButton({
|
|
|
10860
10861
|
const canAddMore = slotsAvailable > 0 && !disabled;
|
|
10861
10862
|
const handlePick = () => {
|
|
10862
10863
|
if (!canAddMore) return;
|
|
10863
|
-
_optionalChain([fileInputRef, 'access',
|
|
10864
|
+
_optionalChain([fileInputRef, 'access', _210 => _210.current, 'optionalAccess', _211 => _211.click, 'call', _212 => _212()]);
|
|
10864
10865
|
};
|
|
10865
10866
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
10866
10867
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -11023,7 +11024,7 @@ function ChatContextMemoryBar({
|
|
|
11023
11024
|
_react.useEffect.call(void 0, () => {
|
|
11024
11025
|
if (!open) return void 0;
|
|
11025
11026
|
const onOutside = (e) => {
|
|
11026
|
-
if (_optionalChain([rootRef, 'access',
|
|
11027
|
+
if (_optionalChain([rootRef, 'access', _213 => _213.current, 'optionalAccess', _214 => _214.contains, 'call', _215 => _215(e.target)])) return;
|
|
11027
11028
|
setOpen(false);
|
|
11028
11029
|
};
|
|
11029
11030
|
document.addEventListener("mousedown", onOutside, true);
|
|
@@ -11324,7 +11325,7 @@ function ChatComposer({
|
|
|
11324
11325
|
const locked = lock != null;
|
|
11325
11326
|
const selected = _nullishCoalesce(selectedContextItems, () => ( []));
|
|
11326
11327
|
const memory = _nullishCoalesce(contextMemoryItems, () => ( []));
|
|
11327
|
-
const entityTypes = _optionalChain([contextPicker, 'optionalAccess',
|
|
11328
|
+
const entityTypes = _optionalChain([contextPicker, 'optionalAccess', _216 => _216.entityTypes]);
|
|
11328
11329
|
const iconByType = _react.useMemo.call(void 0, () => {
|
|
11329
11330
|
const map = /* @__PURE__ */ new Map();
|
|
11330
11331
|
for (const t of _nullishCoalesce(entityTypes, () => ( []))) map.set(t.type, t.icon);
|
|
@@ -11340,7 +11341,7 @@ function ChatComposer({
|
|
|
11340
11341
|
sending,
|
|
11341
11342
|
placeholder,
|
|
11342
11343
|
disabled: locked,
|
|
11343
|
-
disabledPlaceholder: _optionalChain([lock, 'optionalAccess',
|
|
11344
|
+
disabledPlaceholder: _optionalChain([lock, 'optionalAccess', _217 => _217.placeholder]),
|
|
11344
11345
|
previewText,
|
|
11345
11346
|
fullWidth: true,
|
|
11346
11347
|
className: "px-0",
|
|
@@ -11353,7 +11354,7 @@ function ChatComposer({
|
|
|
11353
11354
|
startIcon: contextEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11354
11355
|
ChatComposerPlusMenu,
|
|
11355
11356
|
{
|
|
11356
|
-
onToggle: () => contextPickerOpen ? _optionalChain([onCloseContextPicker, 'optionalCall',
|
|
11357
|
+
onToggle: () => contextPickerOpen ? _optionalChain([onCloseContextPicker, 'optionalCall', _218 => _218()]) : _optionalChain([onOpenContextPicker, 'optionalCall', _219 => _219()]),
|
|
11357
11358
|
open: contextPickerOpen,
|
|
11358
11359
|
disabled: attachmentsDisabled || locked,
|
|
11359
11360
|
dropdown: contextPicker ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -11362,8 +11363,8 @@ function ChatComposer({
|
|
|
11362
11363
|
open: contextPickerOpen,
|
|
11363
11364
|
config: contextPicker,
|
|
11364
11365
|
selectedItems: selected,
|
|
11365
|
-
onToggleItem: (item) => _optionalChain([onToggleContextItem, 'optionalCall',
|
|
11366
|
-
onClose: () => _optionalChain([onCloseContextPicker, 'optionalCall',
|
|
11366
|
+
onToggleItem: (item) => _optionalChain([onToggleContextItem, 'optionalCall', _220 => _220(item)]),
|
|
11367
|
+
onClose: () => _optionalChain([onCloseContextPicker, 'optionalCall', _221 => _221()]),
|
|
11367
11368
|
mentionQuery
|
|
11368
11369
|
}
|
|
11369
11370
|
) : void 0
|
|
@@ -11554,8 +11555,8 @@ ChatSidebarSkeleton.displayName = "ChatSidebarSkeleton";
|
|
|
11554
11555
|
var DialogListItem = _react.forwardRef.call(void 0,
|
|
11555
11556
|
({ className, dialog, isActive, onDialogSelect, onClick, ...props }, ref) => {
|
|
11556
11557
|
const handleClick = (e) => {
|
|
11557
|
-
_optionalChain([onDialogSelect, 'optionalCall',
|
|
11558
|
-
_optionalChain([onClick, 'optionalCall',
|
|
11558
|
+
_optionalChain([onDialogSelect, 'optionalCall', _222 => _222(dialog.id)]);
|
|
11559
|
+
_optionalChain([onClick, 'optionalCall', _223 => _223(e)]);
|
|
11559
11560
|
};
|
|
11560
11561
|
const formatTimestamp = (timestamp) => {
|
|
11561
11562
|
return _chunkQTTBDMPOcjs.formatDateWithTimezone.call(void 0, timestamp, _chunkQTTBDMPOcjs.VIEWER_TIMEZONE, "numericDateTime24h");
|
|
@@ -11628,7 +11629,7 @@ var ChatSidebar = _react.forwardRef.call(void 0,
|
|
|
11628
11629
|
(entries) => {
|
|
11629
11630
|
const [entry] = entries;
|
|
11630
11631
|
if (entry.isIntersecting && !isFetchingRef.current) {
|
|
11631
|
-
_optionalChain([onLoadMoreRef, 'access',
|
|
11632
|
+
_optionalChain([onLoadMoreRef, 'access', _224 => _224.current, 'optionalCall', _225 => _225()]);
|
|
11632
11633
|
}
|
|
11633
11634
|
},
|
|
11634
11635
|
{ root: scrollContainer, rootMargin: "100px", threshold: 0.1 }
|
|
@@ -11933,7 +11934,7 @@ function OnboardingCarousel({
|
|
|
11933
11934
|
" of ",
|
|
11934
11935
|
steps.length,
|
|
11935
11936
|
": ",
|
|
11936
|
-
_optionalChain([steps, 'access',
|
|
11937
|
+
_optionalChain([steps, 'access', _226 => _226[index], 'optionalAccess', _227 => _227.title])
|
|
11937
11938
|
] }),
|
|
11938
11939
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center", role: "group", "aria-label": "Choose step", children: steps.map((step, i) => {
|
|
11939
11940
|
const isCurrent = i === index;
|
|
@@ -12038,15 +12039,15 @@ function isForeignOriginHref(href) {
|
|
|
12038
12039
|
function runNavigation(runtime, href, path, targetPlatform, fallbackNavigate) {
|
|
12039
12040
|
const isNewTab = runtime ? _chunkQTTBDMPOcjs.computeIsNewTab.call(void 0, runtime, href, _nullishCoalesce(targetPlatform, () => ( null))) : false;
|
|
12040
12041
|
if (isNewTab) {
|
|
12041
|
-
if (_optionalChain([runtime, 'optionalAccess',
|
|
12042
|
+
if (_optionalChain([runtime, 'optionalAccess', _228 => _228.navigation, 'access', _229 => _229.openExternal])) runtime.navigation.openExternal(href);
|
|
12042
12043
|
else window.open(href, "_blank", NEW_TAB_FEATURES);
|
|
12043
12044
|
return;
|
|
12044
12045
|
}
|
|
12045
12046
|
const target = isForeignOriginHref(href) ? href : stripSameOriginToPath(href);
|
|
12046
|
-
if (target.includes("#") &&
|
|
12047
|
+
if (target.includes("#") && _chunk26GBOUIPcjs.navigateSamePageHash.call(void 0, target, { headerOffset: _chunk26GBOUIPcjs.STICKY_HEADER_OFFSET_PX })) {
|
|
12047
12048
|
return;
|
|
12048
12049
|
}
|
|
12049
|
-
const handled = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
|
12050
|
+
const handled = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _230 => _230.navigation, 'access', _231 => _231.navigate, 'optionalCall', _232 => _232({ href, path, targetPlatform })]), () => ( false));
|
|
12050
12051
|
if (!handled) {
|
|
12051
12052
|
if (fallbackNavigate) fallbackNavigate(target);
|
|
12052
12053
|
else window.location.assign(target);
|
|
@@ -12105,7 +12106,7 @@ function NavLinkAnchorViaRuntime({
|
|
|
12105
12106
|
targetPlatform,
|
|
12106
12107
|
fallbackNavigate: router.push
|
|
12107
12108
|
});
|
|
12108
|
-
if (handled && !isNewTab && _optionalChain([panel, 'optionalAccess',
|
|
12109
|
+
if (handled && !isNewTab && _optionalChain([panel, 'optionalAccess', _233 => _233.closeChat])) panel.closeChat();
|
|
12109
12110
|
};
|
|
12110
12111
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href: resolvedHref, ..._chunkQTTBDMPOcjs.newTabAnchorAttrs.call(void 0, isNewTab), onClick, className, children });
|
|
12111
12112
|
}
|
|
@@ -12171,11 +12172,11 @@ var DEFAULT_CAPTIONS_PATH = "/api/captions";
|
|
|
12171
12172
|
function getCaptionsUrl(entityType, entityId, srtContent, options) {
|
|
12172
12173
|
if (!srtContent) return void 0;
|
|
12173
12174
|
const hash = `${srtContent.length}-${srtContent.slice(0, 8).replace(/\s/g, "")}`;
|
|
12174
|
-
const variant = _optionalChain([options, 'optionalAccess',
|
|
12175
|
+
const variant = _optionalChain([options, 'optionalAccess', _234 => _234.variant]) ? `&variant=${options.variant}` : "";
|
|
12175
12176
|
return `${DEFAULT_CAPTIONS_PATH}/${entityType}/${entityId}?v=${hash}${variant}`;
|
|
12176
12177
|
}
|
|
12177
12178
|
function resolveCaptionsBase(endpoints) {
|
|
12178
|
-
return _optionalChain([endpoints, 'optionalAccess',
|
|
12179
|
+
return _optionalChain([endpoints, 'optionalAccess', _235 => _235.captionsUrlPrefix]) || DEFAULT_CAPTIONS_PATH;
|
|
12179
12180
|
}
|
|
12180
12181
|
function rebaseCaptionsUrl(endpoints, url) {
|
|
12181
12182
|
if (!url || !url.startsWith(`${DEFAULT_CAPTIONS_PATH}/`)) return url;
|
|
@@ -12264,7 +12265,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
|
12264
12265
|
// src/components/features/use-captions.ts
|
|
12265
12266
|
|
|
12266
12267
|
function useCaptions() {
|
|
12267
|
-
const endpoints = _nullishCoalesce(_optionalChain([_chunkU2YLMFJKcjs.useChatRuntime.call(void 0, ), 'optionalAccess',
|
|
12268
|
+
const endpoints = _nullishCoalesce(_optionalChain([_chunkU2YLMFJKcjs.useChatRuntime.call(void 0, ), 'optionalAccess', _236 => _236.endpoints]), () => ( null));
|
|
12268
12269
|
return _react.useMemo.call(void 0,
|
|
12269
12270
|
() => ({
|
|
12270
12271
|
forEntity: (entityType, entity) => getEntityCaptionUrls(endpoints, entityType, entity),
|
|
@@ -12293,11 +12294,11 @@ function fetchPriorityProp(priority) {
|
|
|
12293
12294
|
var ENTER_FULLSCREEN_REQUEST = "mediaenterfullscreenrequest";
|
|
12294
12295
|
function isIosAppShell() {
|
|
12295
12296
|
const capacitor = globalThis.Capacitor;
|
|
12296
|
-
return _optionalChain([capacitor, 'optionalAccess',
|
|
12297
|
+
return _optionalChain([capacitor, 'optionalAccess', _237 => _237.isNativePlatform, 'optionalCall', _238 => _238()]) === true && _optionalChain([capacitor, 'access', _239 => _239.getPlatform, 'optionalCall', _240 => _240()]) === "ios";
|
|
12297
12298
|
}
|
|
12298
12299
|
function nativeVideoElement(player) {
|
|
12299
12300
|
const media = player.media;
|
|
12300
|
-
const element = _nullishCoalesce(_optionalChain([media, 'optionalAccess',
|
|
12301
|
+
const element = _nullishCoalesce(_optionalChain([media, 'optionalAccess', _241 => _241.nativeEl]), () => ( media));
|
|
12301
12302
|
return element instanceof HTMLVideoElement ? element : null;
|
|
12302
12303
|
}
|
|
12303
12304
|
function useIosNativeVideoFullscreen(playerRef) {
|
|
@@ -12307,7 +12308,7 @@ function useIosNativeVideoFullscreen(playerRef) {
|
|
|
12307
12308
|
if (!(player instanceof EventTarget)) return void 0;
|
|
12308
12309
|
const takeOver = (event) => {
|
|
12309
12310
|
const video = nativeVideoElement(player);
|
|
12310
|
-
if (!_optionalChain([video, 'optionalAccess',
|
|
12311
|
+
if (!_optionalChain([video, 'optionalAccess', _242 => _242.webkitSupportsFullscreen]) || typeof video.webkitEnterFullscreen !== "function") return;
|
|
12311
12312
|
event.stopImmediatePropagation();
|
|
12312
12313
|
video.webkitEnterFullscreen();
|
|
12313
12314
|
};
|
|
@@ -12341,11 +12342,11 @@ function toMuxPreviewUrl(url, maxResolution = "720p") {
|
|
|
12341
12342
|
function saveDataEnabled() {
|
|
12342
12343
|
if (typeof navigator === "undefined") return false;
|
|
12343
12344
|
const conn = navigator.connection;
|
|
12344
|
-
return _optionalChain([conn, 'optionalAccess',
|
|
12345
|
+
return _optionalChain([conn, 'optionalAccess', _243 => _243.saveData]) === true;
|
|
12345
12346
|
}
|
|
12346
12347
|
function useVideoOriginPreconnect({ supabaseStorageOrigin } = {}) {
|
|
12347
12348
|
const runtime = _chunkU2YLMFJKcjs.useChatRuntime.call(void 0, );
|
|
12348
|
-
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess',
|
|
12349
|
+
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _244 => _244.endpoints, 'access', _245 => _245.supabaseStorageOrigin])));
|
|
12349
12350
|
try {
|
|
12350
12351
|
_reactdom2.default.preconnect(MUX_STREAM_ORIGIN, { crossOrigin: "anonymous" });
|
|
12351
12352
|
_reactdom2.default.preconnect(MUX_IMAGE_ORIGIN, { crossOrigin: "anonymous" });
|
|
@@ -12364,9 +12365,9 @@ function useVideoWarmup({
|
|
|
12364
12365
|
nearMargin = "1000px"
|
|
12365
12366
|
} = {}) {
|
|
12366
12367
|
const runtime = _chunkU2YLMFJKcjs.useChatRuntime.call(void 0, );
|
|
12367
|
-
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess',
|
|
12368
|
+
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _246 => _246.endpoints, 'access', _247 => _247.supabaseStorageOrigin])));
|
|
12368
12369
|
useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
|
|
12369
|
-
const { ref, isNear } =
|
|
12370
|
+
const { ref, isNear } = _chunk26GBOUIPcjs.useNearViewport.call(void 0, nearMargin);
|
|
12370
12371
|
_react.useEffect.call(void 0, () => {
|
|
12371
12372
|
if (!isNear || !videoUrl || !resolvedOrigin) return void 0;
|
|
12372
12373
|
if (saveDataEnabled()) return void 0;
|
|
@@ -12424,7 +12425,7 @@ if (typeof document !== "undefined") {
|
|
|
12424
12425
|
}
|
|
12425
12426
|
if (typeof window !== "undefined") {
|
|
12426
12427
|
const w = window;
|
|
12427
|
-
if (!_optionalChain([w, 'access',
|
|
12428
|
+
if (!_optionalChain([w, 'access', _248 => _248.chrome, 'optionalAccess', _249 => _249.cast])) {
|
|
12428
12429
|
w.chrome = { ..._nullishCoalesce(w.chrome, () => ( {})), cast: { isAvailable: false } };
|
|
12429
12430
|
}
|
|
12430
12431
|
}
|
|
@@ -12562,7 +12563,7 @@ var VIDEO_YOUTUBE_FACADE_KEYS = [
|
|
|
12562
12563
|
];
|
|
12563
12564
|
var pickYouTube = (props) => pickForwardedKeys(props, VIDEO_YOUTUBE_FACADE_KEYS);
|
|
12564
12565
|
function Video2(props) {
|
|
12565
|
-
const { ref: nearRef, isNear } =
|
|
12566
|
+
const { ref: nearRef, isNear } = _chunk26GBOUIPcjs.useNearViewport.call(void 0, );
|
|
12566
12567
|
const url = props.url;
|
|
12567
12568
|
if (!url) return null;
|
|
12568
12569
|
const effectiveKind = resolveKind(props, url);
|
|
@@ -12681,7 +12682,7 @@ function FilePlayer({
|
|
|
12681
12682
|
const clearPerfListener = _react.useCallback.call(void 0, () => {
|
|
12682
12683
|
if (perfListenerRef.current) {
|
|
12683
12684
|
try {
|
|
12684
|
-
_optionalChain([hoverPlayerRef, 'access',
|
|
12685
|
+
_optionalChain([hoverPlayerRef, 'access', _250 => _250.current, 'optionalAccess', _251 => _251.removeEventListener, 'optionalCall', _252 => _252("playing", perfListenerRef.current)]);
|
|
12685
12686
|
} catch (e21) {
|
|
12686
12687
|
}
|
|
12687
12688
|
perfListenerRef.current = null;
|
|
@@ -12716,7 +12717,7 @@ function FilePlayer({
|
|
|
12716
12717
|
};
|
|
12717
12718
|
perfListenerRef.current = onPlaying;
|
|
12718
12719
|
try {
|
|
12719
|
-
_optionalChain([el, 'access',
|
|
12720
|
+
_optionalChain([el, 'access', _253 => _253.addEventListener, 'optionalCall', _254 => _254("playing", onPlaying)]);
|
|
12720
12721
|
} catch (e22) {
|
|
12721
12722
|
}
|
|
12722
12723
|
}
|
|
@@ -12724,12 +12725,12 @@ function FilePlayer({
|
|
|
12724
12725
|
el.volume = 0.5;
|
|
12725
12726
|
if (userHasInteracted) {
|
|
12726
12727
|
el.muted = mutedIntentRef.current;
|
|
12727
|
-
_optionalChain([el, 'access',
|
|
12728
|
-
const name = _optionalChain([err, 'optionalAccess',
|
|
12728
|
+
_optionalChain([el, 'access', _255 => _255.play, 'optionalCall', _256 => _256(), 'optionalAccess', _257 => _257.catch, 'optionalCall', _258 => _258((err) => {
|
|
12729
|
+
const name = _optionalChain([err, 'optionalAccess', _259 => _259.name]);
|
|
12729
12730
|
if (name === "NotAllowedError" && hoverActiveRef.current && generation === hoverGenerationRef.current) {
|
|
12730
12731
|
try {
|
|
12731
12732
|
el.muted = true;
|
|
12732
|
-
_optionalChain([el, 'access',
|
|
12733
|
+
_optionalChain([el, 'access', _260 => _260.play, 'optionalCall', _261 => _261(), 'optionalAccess', _262 => _262.catch, 'optionalCall', _263 => _263(() => {
|
|
12733
12734
|
if (hoverActiveRef.current && generation === hoverGenerationRef.current) {
|
|
12734
12735
|
setMutedFallbackBlocked(true);
|
|
12735
12736
|
}
|
|
@@ -12741,7 +12742,7 @@ function FilePlayer({
|
|
|
12741
12742
|
})]);
|
|
12742
12743
|
} else {
|
|
12743
12744
|
el.muted = true;
|
|
12744
|
-
_optionalChain([el, 'access',
|
|
12745
|
+
_optionalChain([el, 'access', _264 => _264.play, 'optionalCall', _265 => _265(), 'optionalAccess', _266 => _266.catch, 'optionalCall', _267 => _267(() => {
|
|
12745
12746
|
if (hoverActiveRef.current && generation === hoverGenerationRef.current) {
|
|
12746
12747
|
setMutedFallbackBlocked(true);
|
|
12747
12748
|
}
|
|
@@ -12771,7 +12772,7 @@ function FilePlayer({
|
|
|
12771
12772
|
clearActivationWaiter();
|
|
12772
12773
|
clearPerfListener();
|
|
12773
12774
|
try {
|
|
12774
|
-
_optionalChain([hoverPlayerRef, 'access',
|
|
12775
|
+
_optionalChain([hoverPlayerRef, 'access', _268 => _268.current, 'optionalAccess', _269 => _269.pause, 'optionalCall', _270 => _270()]);
|
|
12775
12776
|
} catch (e26) {
|
|
12776
12777
|
}
|
|
12777
12778
|
}, [clearActivationWaiter, clearPerfListener]);
|
|
@@ -12783,7 +12784,7 @@ function FilePlayer({
|
|
|
12783
12784
|
if (el) {
|
|
12784
12785
|
el.muted = false;
|
|
12785
12786
|
el.volume = 0.5;
|
|
12786
|
-
_optionalChain([el, 'access',
|
|
12787
|
+
_optionalChain([el, 'access', _271 => _271.play, 'optionalCall', _272 => _272(), 'optionalAccess', _273 => _273.catch, 'optionalCall', _274 => _274(() => {
|
|
12787
12788
|
})]);
|
|
12788
12789
|
}
|
|
12789
12790
|
} catch (e27) {
|
|
@@ -12803,7 +12804,7 @@ function FilePlayer({
|
|
|
12803
12804
|
onMutedFallbackChangeRef.current = onMutedFallbackChange;
|
|
12804
12805
|
});
|
|
12805
12806
|
_react.useEffect.call(void 0, () => {
|
|
12806
|
-
_optionalChain([onMutedFallbackChangeRef, 'access',
|
|
12807
|
+
_optionalChain([onMutedFallbackChangeRef, 'access', _275 => _275.current, 'optionalCall', _276 => _276({
|
|
12807
12808
|
muted: hoverMutedFallback,
|
|
12808
12809
|
blocked: hoverMutedFallback && mutedFallbackBlocked
|
|
12809
12810
|
})]);
|
|
@@ -12822,7 +12823,7 @@ function FilePlayer({
|
|
|
12822
12823
|
if (autoPlay) {
|
|
12823
12824
|
const reportBlocked = () => setMutedFallbackBlocked(true);
|
|
12824
12825
|
try {
|
|
12825
|
-
_optionalChain([mutedEl, 'access',
|
|
12826
|
+
_optionalChain([mutedEl, 'access', _277 => _277.play, 'optionalCall', _278 => _278(), 'optionalAccess', _279 => _279.catch, 'optionalCall', _280 => _280(reportBlocked)]);
|
|
12826
12827
|
} catch (e29) {
|
|
12827
12828
|
reportBlocked();
|
|
12828
12829
|
}
|
|
@@ -12836,12 +12837,12 @@ function FilePlayer({
|
|
|
12836
12837
|
try {
|
|
12837
12838
|
el.muted = false;
|
|
12838
12839
|
el.volume = typeof el.volume === "number" ? el.volume : 1;
|
|
12839
|
-
_optionalChain([el, 'access',
|
|
12840
|
-
const name = _optionalChain([err, 'optionalAccess',
|
|
12840
|
+
_optionalChain([el, 'access', _281 => _281.play, 'optionalCall', _282 => _282(), 'optionalAccess', _283 => _283.catch, 'optionalCall', _284 => _284((err) => {
|
|
12841
|
+
const name = _optionalChain([err, 'optionalAccess', _285 => _285.name]);
|
|
12841
12842
|
if (name !== "NotAllowedError") return;
|
|
12842
12843
|
try {
|
|
12843
12844
|
el.muted = true;
|
|
12844
|
-
_optionalChain([el, 'access',
|
|
12845
|
+
_optionalChain([el, 'access', _286 => _286.play, 'optionalCall', _287 => _287(), 'optionalAccess', _288 => _288.catch, 'optionalCall', _289 => _289(() => {
|
|
12845
12846
|
setMutedFallbackBlocked(true);
|
|
12846
12847
|
setHoverMutedFallback(true);
|
|
12847
12848
|
})]);
|
|
@@ -12857,7 +12858,7 @@ function FilePlayer({
|
|
|
12857
12858
|
}, [autoPlayUnmuted, startMuted, autoPlay]);
|
|
12858
12859
|
_react.useEffect.call(void 0, () => {
|
|
12859
12860
|
const el = hoverPlayerRef.current;
|
|
12860
|
-
if (!_optionalChain([el, 'optionalAccess',
|
|
12861
|
+
if (!_optionalChain([el, 'optionalAccess', _290 => _290.addEventListener])) return void 0;
|
|
12861
12862
|
const onVolumeChange = () => {
|
|
12862
12863
|
if (el.muted === false) {
|
|
12863
12864
|
setMutedFallbackBlocked(false);
|
|
@@ -12870,14 +12871,14 @@ function FilePlayer({
|
|
|
12870
12871
|
}
|
|
12871
12872
|
return () => {
|
|
12872
12873
|
try {
|
|
12873
|
-
_optionalChain([el, 'access',
|
|
12874
|
+
_optionalChain([el, 'access', _291 => _291.removeEventListener, 'optionalCall', _292 => _292("volumechange", onVolumeChange)]);
|
|
12874
12875
|
} catch (e33) {
|
|
12875
12876
|
}
|
|
12876
12877
|
};
|
|
12877
12878
|
}, []);
|
|
12878
12879
|
_react.useEffect.call(void 0, () => {
|
|
12879
12880
|
const el = hoverPlayerRef.current;
|
|
12880
|
-
if (!_optionalChain([el, 'optionalAccess',
|
|
12881
|
+
if (!_optionalChain([el, 'optionalAccess', _293 => _293.addEventListener])) return void 0;
|
|
12881
12882
|
const onPlaying = () => setMutedFallbackBlocked(false);
|
|
12882
12883
|
try {
|
|
12883
12884
|
el.addEventListener("playing", onPlaying);
|
|
@@ -12885,7 +12886,7 @@ function FilePlayer({
|
|
|
12885
12886
|
}
|
|
12886
12887
|
return () => {
|
|
12887
12888
|
try {
|
|
12888
|
-
_optionalChain([el, 'access',
|
|
12889
|
+
_optionalChain([el, 'access', _294 => _294.removeEventListener, 'optionalCall', _295 => _295("playing", onPlaying)]);
|
|
12889
12890
|
} catch (e35) {
|
|
12890
12891
|
}
|
|
12891
12892
|
};
|
|
@@ -12896,15 +12897,15 @@ function FilePlayer({
|
|
|
12896
12897
|
});
|
|
12897
12898
|
_react.useEffect.call(void 0, () => {
|
|
12898
12899
|
const el = hoverPlayerRef.current;
|
|
12899
|
-
if (!_optionalChain([el, 'optionalAccess',
|
|
12900
|
-
const handler = () => _optionalChain([onEndedRef, 'access',
|
|
12900
|
+
if (!_optionalChain([el, 'optionalAccess', _296 => _296.addEventListener])) return void 0;
|
|
12901
|
+
const handler = () => _optionalChain([onEndedRef, 'access', _297 => _297.current, 'optionalCall', _298 => _298()]);
|
|
12901
12902
|
try {
|
|
12902
12903
|
el.addEventListener("ended", handler);
|
|
12903
12904
|
} catch (e36) {
|
|
12904
12905
|
}
|
|
12905
12906
|
return () => {
|
|
12906
12907
|
try {
|
|
12907
|
-
_optionalChain([el, 'access',
|
|
12908
|
+
_optionalChain([el, 'access', _299 => _299.removeEventListener, 'optionalCall', _300 => _300("ended", handler)]);
|
|
12908
12909
|
} catch (e37) {
|
|
12909
12910
|
}
|
|
12910
12911
|
};
|
|
@@ -12913,19 +12914,19 @@ function FilePlayer({
|
|
|
12913
12914
|
_react.useImperativeHandle.call(void 0,
|
|
12914
12915
|
playerHandleRef,
|
|
12915
12916
|
() => ({
|
|
12916
|
-
getCurrentTime: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access',
|
|
12917
|
+
getCurrentTime: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _301 => _301.current, 'optionalAccess', _302 => _302.currentTime]), () => ( 0)),
|
|
12917
12918
|
getDuration: () => {
|
|
12918
|
-
const d = _optionalChain([hoverPlayerRef, 'access',
|
|
12919
|
+
const d = _optionalChain([hoverPlayerRef, 'access', _303 => _303.current, 'optionalAccess', _304 => _304.duration]);
|
|
12919
12920
|
return typeof d === "number" && isFinite(d) ? d : 0;
|
|
12920
12921
|
},
|
|
12921
|
-
getPaused: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access',
|
|
12922
|
-
getMuted: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access',
|
|
12922
|
+
getPaused: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _305 => _305.current, 'optionalAccess', _306 => _306.paused]), () => ( true)),
|
|
12923
|
+
getMuted: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _307 => _307.current, 'optionalAccess', _308 => _308.muted]), () => ( false)),
|
|
12923
12924
|
play: async () => {
|
|
12924
|
-
await _optionalChain([hoverPlayerRef, 'access',
|
|
12925
|
+
await _optionalChain([hoverPlayerRef, 'access', _309 => _309.current, 'optionalAccess', _310 => _310.play, 'optionalCall', _311 => _311()]);
|
|
12925
12926
|
},
|
|
12926
12927
|
pause: () => {
|
|
12927
12928
|
try {
|
|
12928
|
-
_optionalChain([hoverPlayerRef, 'access',
|
|
12929
|
+
_optionalChain([hoverPlayerRef, 'access', _312 => _312.current, 'optionalAccess', _313 => _313.pause, 'optionalCall', _314 => _314()]);
|
|
12929
12930
|
} catch (e38) {
|
|
12930
12931
|
}
|
|
12931
12932
|
},
|
|
@@ -12992,10 +12993,10 @@ function FilePlayer({
|
|
|
12992
12993
|
if (!el) return;
|
|
12993
12994
|
const resumeAt = typeof el.currentTime === "number" ? el.currentTime : 0;
|
|
12994
12995
|
try {
|
|
12995
|
-
_optionalChain([el, 'access',
|
|
12996
|
+
_optionalChain([el, 'access', _315 => _315.load, 'optionalCall', _316 => _316()]);
|
|
12996
12997
|
if (resumeAt > 0 && el.addEventListener && el.removeEventListener) {
|
|
12997
12998
|
const seekBack = () => {
|
|
12998
|
-
_optionalChain([el, 'access',
|
|
12999
|
+
_optionalChain([el, 'access', _317 => _317.removeEventListener, 'optionalCall', _318 => _318("loadedmetadata", seekBack)]);
|
|
12999
13000
|
try {
|
|
13000
13001
|
el.currentTime = resumeAt;
|
|
13001
13002
|
} catch (e40) {
|
|
@@ -13003,7 +13004,7 @@ function FilePlayer({
|
|
|
13003
13004
|
};
|
|
13004
13005
|
el.addEventListener("loadedmetadata", seekBack);
|
|
13005
13006
|
}
|
|
13006
|
-
_optionalChain([el, 'access',
|
|
13007
|
+
_optionalChain([el, 'access', _319 => _319.play, 'optionalCall', _320 => _320(), 'optionalAccess', _321 => _321.catch, 'optionalCall', _322 => _322(() => {
|
|
13007
13008
|
})]);
|
|
13008
13009
|
} catch (e41) {
|
|
13009
13010
|
}
|
|
@@ -13171,7 +13172,7 @@ function YouTubeFacadeInner({
|
|
|
13171
13172
|
const iframe = iframeRef.current;
|
|
13172
13173
|
if (!iframe) return void 0;
|
|
13173
13174
|
function subscribe2() {
|
|
13174
|
-
_optionalChain([iframe, 'optionalAccess',
|
|
13175
|
+
_optionalChain([iframe, 'optionalAccess', _323 => _323.contentWindow, 'optionalAccess', _324 => _324.postMessage, 'call', _325 => _325('{"event":"listening"}', YT_NOCOOKIE_ORIGIN)]);
|
|
13175
13176
|
}
|
|
13176
13177
|
iframe.addEventListener("load", subscribe2);
|
|
13177
13178
|
subscribe2();
|
|
@@ -13192,13 +13193,13 @@ function YouTubeFacadeInner({
|
|
|
13192
13193
|
return;
|
|
13193
13194
|
}
|
|
13194
13195
|
if (payload.event !== "infoDelivery") return;
|
|
13195
|
-
const state = _optionalChain([payload, 'access',
|
|
13196
|
+
const state = _optionalChain([payload, 'access', _326 => _326.info, 'optionalAccess', _327 => _327.playerState]);
|
|
13196
13197
|
if (typeof state !== "number") return;
|
|
13197
13198
|
if (state === YT_STATE_PLAYING) {
|
|
13198
13199
|
if (blurTimer !== null) return;
|
|
13199
13200
|
blurTimer = setTimeout(() => {
|
|
13200
13201
|
blurTimer = null;
|
|
13201
|
-
_optionalChain([iframeRef, 'access',
|
|
13202
|
+
_optionalChain([iframeRef, 'access', _328 => _328.current, 'optionalAccess', _329 => _329.blur, 'call', _330 => _330()]);
|
|
13202
13203
|
}, YT_PLAYING_BLUR_DELAY_MS);
|
|
13203
13204
|
return;
|
|
13204
13205
|
}
|
|
@@ -13218,7 +13219,7 @@ function YouTubeFacadeInner({
|
|
|
13218
13219
|
const wasSuspended = prevSuspendedRef.current;
|
|
13219
13220
|
prevSuspendedRef.current = Boolean(suspended);
|
|
13220
13221
|
if (!activated || Boolean(suspended) === wasSuspended) return;
|
|
13221
|
-
_optionalChain([iframeRef, 'access',
|
|
13222
|
+
_optionalChain([iframeRef, 'access', _331 => _331.current, 'optionalAccess', _332 => _332.contentWindow, 'optionalAccess', _333 => _333.postMessage, 'call', _334 => _334(
|
|
13222
13223
|
`{"event":"command","func":"${suspended ? "pauseVideo" : "playVideo"}","args":[]}`,
|
|
13223
13224
|
YT_NOCOOKIE_ORIGIN
|
|
13224
13225
|
)]);
|
|
@@ -13404,7 +13405,7 @@ function ManagedCell({
|
|
|
13404
13405
|
}) {
|
|
13405
13406
|
const hintedWidth = _react2.default.isValidElement(item) ? item.props["data-strip-cell-width"] : void 0;
|
|
13406
13407
|
const desktopWidth = typeof hintedWidth === "number" ? hintedWidth : cardWidthDesktop;
|
|
13407
|
-
const cloneRef =
|
|
13408
|
+
const cloneRef = _chunk26GBOUIPcjs.useSuppressCloneFocus.call(void 0, ctx.isClone);
|
|
13408
13409
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13409
13410
|
"div",
|
|
13410
13411
|
{
|
|
@@ -13520,16 +13521,12 @@ function CardsStrip(props) {
|
|
|
13520
13521
|
}, [measure, items.length, marqueeActive, isMobile]);
|
|
13521
13522
|
const chevronSuppressUntilRef = _react.useRef.call(void 0, 0);
|
|
13522
13523
|
const userScrollSuppressUntilRef = _react.useRef.call(void 0, 0);
|
|
13523
|
-
const
|
|
13524
|
+
const { ref: observe, inView: nearViewport } = _chunk26GBOUIPcjs.useInView.call(void 0, { rootMargin: "200px", initial: true });
|
|
13524
13525
|
_react.useEffect.call(void 0, () => {
|
|
13525
|
-
|
|
13526
|
-
|
|
13527
|
-
|
|
13528
|
-
|
|
13529
|
-
});
|
|
13530
|
-
io.observe(el);
|
|
13531
|
-
return () => io.disconnect();
|
|
13532
|
-
}, []);
|
|
13526
|
+
observe(wrapperRef.current);
|
|
13527
|
+
return () => observe(null);
|
|
13528
|
+
}, [observe]);
|
|
13529
|
+
const autoplay = _chunk26GBOUIPcjs.useAutoplay.call(void 0, nearViewport);
|
|
13533
13530
|
const [activeKey, setActiveKey] = _react.useState.call(void 0, null);
|
|
13534
13531
|
const activeKeyRef = _react.useRef.call(void 0, null);
|
|
13535
13532
|
const activate = _react.useCallback.call(void 0, (key) => {
|
|
@@ -13546,9 +13543,9 @@ function CardsStrip(props) {
|
|
|
13546
13543
|
const p = hoverPointerRef.current;
|
|
13547
13544
|
if (!p.inside) return;
|
|
13548
13545
|
const el = typeof document !== "undefined" ? document.elementFromPoint(p.x, p.y) : null;
|
|
13549
|
-
const cardEl = _optionalChain([el, 'optionalAccess',
|
|
13550
|
-
const scoped = cardEl && _optionalChain([scrollerRef, 'access',
|
|
13551
|
-
const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess',
|
|
13546
|
+
const cardEl = _optionalChain([el, 'optionalAccess', _335 => _335.closest, 'optionalCall', _336 => _336("[data-strip-card-key]")]);
|
|
13547
|
+
const scoped = cardEl && _optionalChain([scrollerRef, 'access', _337 => _337.current, 'optionalAccess', _338 => _338.contains, 'call', _339 => _339(cardEl)]) ? cardEl : null;
|
|
13548
|
+
const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess', _340 => _340.getAttribute, 'call', _341 => _341("data-strip-card-key")]), () => ( null));
|
|
13552
13549
|
const current = activeKeyRef.current;
|
|
13553
13550
|
if (key === current) return;
|
|
13554
13551
|
if (current !== null) deactivate(current);
|
|
@@ -13576,7 +13573,7 @@ function CardsStrip(props) {
|
|
|
13576
13573
|
const current = activeKeyRef.current;
|
|
13577
13574
|
if (current !== null) deactivate(current);
|
|
13578
13575
|
}, [deactivate]);
|
|
13579
|
-
|
|
13576
|
+
_chunk26GBOUIPcjs.useResetOnPageHidden.call(void 0, clearHover);
|
|
13580
13577
|
const syncHoverIfScrolled = _react.useCallback.call(void 0, () => {
|
|
13581
13578
|
const scroller = scrollerRef.current;
|
|
13582
13579
|
if (!scroller) return;
|
|
@@ -13586,7 +13583,7 @@ function CardsStrip(props) {
|
|
|
13586
13583
|
}, [syncHoverToPointer]);
|
|
13587
13584
|
const seamBuffer = _react.useCallback.call(void 0, () => {
|
|
13588
13585
|
const half = singleCopyWidthRef.current;
|
|
13589
|
-
const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access',
|
|
13586
|
+
const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access', _342 => _342.current, 'optionalAccess', _343 => _343.clientWidth]), () => ( 0));
|
|
13590
13587
|
return Math.max(0, Math.min(200, half / 4, half - viewport - TRACK_GAP_PX - 1));
|
|
13591
13588
|
}, []);
|
|
13592
13589
|
const mirror = _react.useCallback.call(void 0,
|
|
@@ -13597,20 +13594,20 @@ function CardsStrip(props) {
|
|
|
13597
13594
|
},
|
|
13598
13595
|
[reverse, seamBuffer]
|
|
13599
13596
|
);
|
|
13600
|
-
const { posRef: marqueePosRef, glideBy } =
|
|
13597
|
+
const { posRef: marqueePosRef, glideBy } = _chunk26GBOUIPcjs.useMarqueeEngine.call(void 0, {
|
|
13601
13598
|
// Viewport gates `active` (the rAF fully stops off-screen — a paused
|
|
13602
13599
|
// engine would keep scheduling frames forever), same treatment as
|
|
13603
13600
|
// <MarqueeWall>; the envelope persists, so re-entry resumes at cruise.
|
|
13604
|
-
active: marqueeActive &&
|
|
13601
|
+
active: marqueeActive && autoplay.playing,
|
|
13605
13602
|
speed: autoScrollSpeed,
|
|
13606
|
-
isPaused: (now) => pauseOnHover && (hoverPointerRef.current.inside || activeKeyRef.current !== null) ||
|
|
13603
|
+
isPaused: (now) => pauseOnHover && (hoverPointerRef.current.inside || activeKeyRef.current !== null) || now < Math.max(chevronSuppressUntilRef.current, userScrollSuppressUntilRef.current),
|
|
13607
13604
|
getWrapSize: () => singleCopyWidthRef.current,
|
|
13608
13605
|
getWrapMin: seamBuffer,
|
|
13609
13606
|
apply: (pos) => {
|
|
13610
13607
|
const scroller = scrollerRef.current;
|
|
13611
13608
|
if (scroller) scroller.scrollLeft = mirror(pos);
|
|
13612
13609
|
},
|
|
13613
|
-
readBack: () => mirror(_nullishCoalesce(_optionalChain([scrollerRef, 'access',
|
|
13610
|
+
readBack: () => mirror(_nullishCoalesce(_optionalChain([scrollerRef, 'access', _344 => _344.current, 'optionalAccess', _345 => _345.scrollLeft]), () => ( 0))),
|
|
13614
13611
|
onAfterFrame: syncHoverIfScrolled
|
|
13615
13612
|
});
|
|
13616
13613
|
const [mountedIdx, setMountedIdx] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
|
|
@@ -13639,7 +13636,7 @@ function CardsStrip(props) {
|
|
|
13639
13636
|
return next;
|
|
13640
13637
|
});
|
|
13641
13638
|
},
|
|
13642
|
-
{ rootMargin:
|
|
13639
|
+
{ rootMargin: _chunk26GBOUIPcjs.NEAR_VIEWPORT_ROOT_MARGIN }
|
|
13643
13640
|
);
|
|
13644
13641
|
cardObserverRef.current = io;
|
|
13645
13642
|
cardElIdxRef.current.forEach((_idx, el) => {
|
|
@@ -13658,11 +13655,11 @@ function CardsStrip(props) {
|
|
|
13658
13655
|
fn = (el) => {
|
|
13659
13656
|
if (!el) return void 0;
|
|
13660
13657
|
cardElIdxRef.current.set(el, idx);
|
|
13661
|
-
_optionalChain([cardObserverRef, 'access',
|
|
13658
|
+
_optionalChain([cardObserverRef, 'access', _346 => _346.current, 'optionalAccess', _347 => _347.observe, 'call', _348 => _348(el)]);
|
|
13662
13659
|
return () => {
|
|
13663
13660
|
cardElIdxRef.current.delete(el);
|
|
13664
13661
|
cardElNearRef.current.delete(el);
|
|
13665
|
-
_optionalChain([cardObserverRef, 'access',
|
|
13662
|
+
_optionalChain([cardObserverRef, 'access', _349 => _349.current, 'optionalAccess', _350 => _350.unobserve, 'call', _351 => _351(el)]);
|
|
13666
13663
|
};
|
|
13667
13664
|
};
|
|
13668
13665
|
cardRefFns.set(idx, fn);
|
|
@@ -13681,7 +13678,7 @@ function CardsStrip(props) {
|
|
|
13681
13678
|
const track = trackRef.current;
|
|
13682
13679
|
if (!scroller || !track) return;
|
|
13683
13680
|
const firstCard = track.firstElementChild;
|
|
13684
|
-
const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess',
|
|
13681
|
+
const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess', _352 => _352.offsetWidth]), () => ( 320))) + TRACK_GAP_PX;
|
|
13685
13682
|
chevronSuppressUntilRef.current = performance.now() + CHEVRON_SUPPRESS_MS;
|
|
13686
13683
|
if (marqueeActiveRef.current) {
|
|
13687
13684
|
glideBy((reverse ? -dir : dir) * step);
|
|
@@ -13742,7 +13739,7 @@ function CardsStrip(props) {
|
|
|
13742
13739
|
{
|
|
13743
13740
|
ref: (node) => {
|
|
13744
13741
|
wrapperRef.current = node;
|
|
13745
|
-
_optionalChain([rootRef, 'optionalCall',
|
|
13742
|
+
_optionalChain([rootRef, 'optionalCall', _353 => _353(node)]);
|
|
13746
13743
|
},
|
|
13747
13744
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0, "flex w-full min-w-0 flex-col gap-6", className),
|
|
13748
13745
|
children: [
|
|
@@ -13861,8 +13858,8 @@ function VideoHoverPreviewSurface({
|
|
|
13861
13858
|
if (gateControlled) return void 0;
|
|
13862
13859
|
const el = rootElRef.current;
|
|
13863
13860
|
if (!el || typeof IntersectionObserver === "undefined") return void 0;
|
|
13864
|
-
const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access',
|
|
13865
|
-
rootMargin:
|
|
13861
|
+
const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access', _354 => _354[0], 'optionalAccess', _355 => _355.isIntersecting]), () => ( false))), {
|
|
13862
|
+
rootMargin: _chunk26GBOUIPcjs.NEAR_VIEWPORT_ROOT_MARGIN
|
|
13866
13863
|
});
|
|
13867
13864
|
io.observe(el);
|
|
13868
13865
|
return () => io.disconnect();
|
|
@@ -14006,7 +14003,7 @@ function VideoBitesStrip({
|
|
|
14006
14003
|
const filtered = filterPublished ? bites.filter((b) => b.published) : [...bites];
|
|
14007
14004
|
return filtered.sort(sortComparator);
|
|
14008
14005
|
}, [bites, filterPublished, sortComparator]);
|
|
14009
|
-
const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access',
|
|
14006
|
+
const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access', _356 => _356[0], 'optionalAccess', _357 => _357.url]) || null });
|
|
14010
14007
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
14011
14008
|
CardsStrip,
|
|
14012
14009
|
{
|
|
@@ -14073,8 +14070,8 @@ function VideoBiteCard({
|
|
|
14073
14070
|
const controlled = active !== void 0;
|
|
14074
14071
|
const [selfActive, setSelfActive] = _react.useState.call(void 0, false);
|
|
14075
14072
|
const isActive = controlled ? !!active : selfActive;
|
|
14076
|
-
const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall',
|
|
14077
|
-
const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall',
|
|
14073
|
+
const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall', _358 => _358(key)]) : setSelfActive(true);
|
|
14074
|
+
const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall', _359 => _359(key)]) : setSelfActive(false);
|
|
14078
14075
|
const titleInputRef = _react.useRef.call(void 0, null);
|
|
14079
14076
|
_chunkMNFV4YLKcjs.useIsomorphicLayoutEffect.call(void 0, () => {
|
|
14080
14077
|
const el = titleInputRef.current;
|
|
@@ -14084,7 +14081,7 @@ function VideoBiteCard({
|
|
|
14084
14081
|
});
|
|
14085
14082
|
const navigate = () => {
|
|
14086
14083
|
if (bite.onNavigate) bite.onNavigate();
|
|
14087
|
-
else _optionalChain([onBiteNavigate, 'optionalCall',
|
|
14084
|
+
else _optionalChain([onBiteNavigate, 'optionalCall', _360 => _360(bite, index)]);
|
|
14088
14085
|
};
|
|
14089
14086
|
const handlePointerEnter = () => {
|
|
14090
14087
|
if (!isTouch) activate();
|
|
@@ -14109,9 +14106,9 @@ function VideoBiteCard({
|
|
|
14109
14106
|
placeholder: "Title (optional)",
|
|
14110
14107
|
"aria-label": "Bite title",
|
|
14111
14108
|
rows: 1,
|
|
14112
|
-
onChange: (e) => _optionalChain([onTitleChange, 'optionalCall',
|
|
14109
|
+
onChange: (e) => _optionalChain([onTitleChange, 'optionalCall', _361 => _361(e.target.value)]),
|
|
14113
14110
|
ref: titleInputRef,
|
|
14114
|
-
onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall',
|
|
14111
|
+
onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall', _362 => _362(e.target.value)]),
|
|
14115
14112
|
onClick: (e) => e.stopPropagation(),
|
|
14116
14113
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
14117
14114
|
titleClass,
|
|
@@ -14188,7 +14185,7 @@ function VideoBiteCard({
|
|
|
14188
14185
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
14189
14186
|
"div",
|
|
14190
14187
|
{
|
|
14191
|
-
ref: (node) => _optionalChain([rootRef, 'optionalCall',
|
|
14188
|
+
ref: (node) => _optionalChain([rootRef, 'optionalCall', _363 => _363(node)]),
|
|
14192
14189
|
"aria-hidden": isClone || void 0,
|
|
14193
14190
|
"data-strip-card-key": key,
|
|
14194
14191
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
@@ -14243,8 +14240,8 @@ function EntityVideoSection({
|
|
|
14243
14240
|
const hasHighlight = !!highlightVideoUrl;
|
|
14244
14241
|
const hasVideo = hasFullVideo || hasHighlight;
|
|
14245
14242
|
const derivedCaptions = captionsEntity ? captions.forEntityId(captionsEntity.type, captionsEntity.id) : null;
|
|
14246
|
-
const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess',
|
|
14247
|
-
const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess',
|
|
14243
|
+
const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _364 => _364.captionsUrl])));
|
|
14244
|
+
const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _365 => _365.highlightCaptionsUrl])));
|
|
14248
14245
|
if (!hasVideo && !videoSummary && (!videoBites || videoBites.length === 0)) {
|
|
14249
14246
|
return null;
|
|
14250
14247
|
}
|
|
@@ -14562,7 +14559,7 @@ var MediaSkeleton = {
|
|
|
14562
14559
|
|
|
14563
14560
|
function designDocPeople(doc) {
|
|
14564
14561
|
const people = [];
|
|
14565
|
-
if (_optionalChain([doc, 'access',
|
|
14562
|
+
if (_optionalChain([doc, 'access', _366 => _366.author, 'optionalAccess', _367 => _367.full_name]))
|
|
14566
14563
|
people.push({
|
|
14567
14564
|
key: `dri-${_nullishCoalesce(doc.author.id, () => ( doc.author.full_name))}`,
|
|
14568
14565
|
name: doc.author.full_name,
|
|
@@ -14575,7 +14572,7 @@ function designDocPeople(doc) {
|
|
|
14575
14572
|
return people;
|
|
14576
14573
|
}
|
|
14577
14574
|
function designDocMetaLine(doc) {
|
|
14578
|
-
return [_optionalChain([doc, 'access',
|
|
14575
|
+
return [_optionalChain([doc, 'access', _368 => _368.author, 'optionalAccess', _369 => _369.full_name]) ? `DRI ${doc.author.full_name}` : null, `updated ${_chunkQTTBDMPOcjs.formatDateShort.call(void 0, doc.updated_at)}`].filter(Boolean).join(" \xB7 ");
|
|
14579
14576
|
}
|
|
14580
14577
|
function DesignDocCardSkeleton() {
|
|
14581
14578
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -15049,7 +15046,7 @@ function DataRoomDocCard({ item, className, badgeText, anchorProps }) {
|
|
|
15049
15046
|
] }) : null,
|
|
15050
15047
|
item.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex min-w-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-clamp-2 whitespace-pre-wrap break-words text-ods-text-secondary text-h6", children: item.preview }) }) : null
|
|
15051
15048
|
] }),
|
|
15052
|
-
_optionalChain([anchorProps, 'optionalAccess',
|
|
15049
|
+
_optionalChain([anchorProps, 'optionalAccess', _370 => _370.href]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-3.5 w-3.5" }) }) : null
|
|
15053
15050
|
] });
|
|
15054
15051
|
if (!anchorProps) {
|
|
15055
15052
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkQTTBDMPOcjs.COMPACT_CARD_OUTER_STATIC} ${_nullishCoalesce(className, () => ( ""))}`, "aria-label": "No link available", children: body });
|
|
@@ -15077,7 +15074,7 @@ function DataRoomDocCardSkeleton({ className }) {
|
|
|
15077
15074
|
|
|
15078
15075
|
|
|
15079
15076
|
function CampaignCardAdmin({ campaign, className, anchorProps }) {
|
|
15080
|
-
const goalsCount = _optionalChain([campaign, 'access',
|
|
15077
|
+
const goalsCount = _optionalChain([campaign, 'access', _371 => _371.goals, 'optionalAccess', _372 => _372.length]) || 0;
|
|
15081
15078
|
const innerChildren = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
15082
15079
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkQTTBDMPOcjs.COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Megaphone, { className: "h-5 w-5" }) }),
|
|
15083
15080
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkQTTBDMPOcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
@@ -15371,7 +15368,7 @@ function pickFetchedCardHref({
|
|
|
15371
15368
|
itemHref,
|
|
15372
15369
|
allowComposed
|
|
15373
15370
|
}) {
|
|
15374
|
-
if (_optionalChain([composed, 'optionalAccess',
|
|
15371
|
+
if (_optionalChain([composed, 'optionalAccess', _373 => _373.hostOverride])) {
|
|
15375
15372
|
return { source: "hostOverride", href: composed.href, targetPlatform: composed.targetPlatform };
|
|
15376
15373
|
}
|
|
15377
15374
|
if (itemHref) return { source: "item", href: itemHref };
|
|
@@ -15654,7 +15651,7 @@ function byKey(key) {
|
|
|
15654
15651
|
return PLATFORM_DOMAINS.find((e) => e.key === key);
|
|
15655
15652
|
}
|
|
15656
15653
|
function envOverrideFor(key) {
|
|
15657
|
-
const envVar = _optionalChain([byKey, 'call',
|
|
15654
|
+
const envVar = _optionalChain([byKey, 'call', _374 => _374(key), 'optionalAccess', _375 => _375.envVar]);
|
|
15658
15655
|
if (!envVar) return null;
|
|
15659
15656
|
return ENV_OVERRIDES[envVar] || null;
|
|
15660
15657
|
}
|
|
@@ -15664,7 +15661,7 @@ function ensureScheme(url) {
|
|
|
15664
15661
|
return `https://${trimmed.replace(/^\/+/, "")}`;
|
|
15665
15662
|
}
|
|
15666
15663
|
function getPlatformProductionUrl(platform) {
|
|
15667
|
-
const resolved = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(envOverrideFor(platform), () => ( _optionalChain([byKey, 'call',
|
|
15664
|
+
const resolved = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(envOverrideFor(platform), () => ( _optionalChain([byKey, 'call', _376 => _376(platform), 'optionalAccess', _377 => _377.defaultUrl]))), () => ( envOverrideFor("flamingo"))), () => ( "https://www.flamingo.run"));
|
|
15668
15665
|
return ensureScheme(resolved);
|
|
15669
15666
|
}
|
|
15670
15667
|
function getPlatformUrl(platform, options = {}) {
|
|
@@ -15673,7 +15670,7 @@ function getPlatformUrl(platform, options = {}) {
|
|
|
15673
15670
|
}
|
|
15674
15671
|
function getDeploymentUrl(options) {
|
|
15675
15672
|
if (typeof window !== "undefined") return window.location.origin;
|
|
15676
|
-
const configured = _optionalChain([options, 'access',
|
|
15673
|
+
const configured = _optionalChain([options, 'access', _378 => _378.configuredUrl, 'optionalAccess', _379 => _379.trim, 'call', _380 => _380()]);
|
|
15677
15674
|
if (configured) return ensureScheme(configured).replace(/\/+$/, "");
|
|
15678
15675
|
if (process.env.VERCEL_ENV === "preview" && process.env.VERCEL_URL) {
|
|
15679
15676
|
return ensureScheme(process.env.VERCEL_URL).replace(/\/+$/, "");
|
|
@@ -15695,7 +15692,7 @@ function getRequestOrigin(headers, options) {
|
|
|
15695
15692
|
const host = headers.get("host");
|
|
15696
15693
|
if (!host) return getDeploymentUrl(options);
|
|
15697
15694
|
const local = LOCAL_HOSTNAME.test(host.replace(/:\d+$/, ""));
|
|
15698
|
-
const proto = _optionalChain([headers, 'access',
|
|
15695
|
+
const proto = _optionalChain([headers, 'access', _381 => _381.get, 'call', _382 => _382("x-forwarded-proto"), 'optionalAccess', _383 => _383.split, 'call', _384 => _384(","), 'access', _385 => _385[0], 'access', _386 => _386.trim, 'call', _387 => _387()]) || (local ? "http" : "https");
|
|
15699
15696
|
return `${proto}://${host}`;
|
|
15700
15697
|
}
|
|
15701
15698
|
function resolveRedirectTarget(origin, target) {
|
|
@@ -15724,7 +15721,7 @@ function toRegistrableBaseDomain(host) {
|
|
|
15724
15721
|
return void 0;
|
|
15725
15722
|
}
|
|
15726
15723
|
function aliasHostsOf(key) {
|
|
15727
|
-
return _nullishCoalesce(_optionalChain([byKey, 'call',
|
|
15724
|
+
return _nullishCoalesce(_optionalChain([byKey, 'call', _388 => _388(key), 'optionalAccess', _389 => _389.aliasHostnames]), () => ( []));
|
|
15728
15725
|
}
|
|
15729
15726
|
function hostsForEntry(entry, opts) {
|
|
15730
15727
|
const resolved = hostOf(getPlatformProductionUrl(entry.key));
|
|
@@ -15783,13 +15780,13 @@ function recordCountLabel(count) {
|
|
|
15783
15780
|
}
|
|
15784
15781
|
function buildGroupedSource(spec) {
|
|
15785
15782
|
const first = spec.rows[0];
|
|
15786
|
-
const externalUrl = _nullishCoalesce(spec.externalUrl, () => ( _optionalChain([first, 'optionalAccess',
|
|
15787
|
-
const targetPlatform = spec.targetPlatform !== void 0 ? spec.targetPlatform : _optionalChain([first, 'optionalAccess',
|
|
15783
|
+
const externalUrl = _nullishCoalesce(spec.externalUrl, () => ( _optionalChain([first, 'optionalAccess', _390 => _390.externalUrl])));
|
|
15784
|
+
const targetPlatform = spec.targetPlatform !== void 0 ? spec.targetPlatform : _optionalChain([first, 'optionalAccess', _391 => _391.targetPlatform]);
|
|
15788
15785
|
return {
|
|
15789
15786
|
index: spec.index,
|
|
15790
15787
|
name: `${getSourceLabel(spec.sourceRepo)} ${recordCountLabel(spec.rows.length)}`,
|
|
15791
|
-
path: _nullishCoalesce(_optionalChain([first, 'optionalAccess',
|
|
15792
|
-
documentType: _nullishCoalesce(_optionalChain([first, 'optionalAccess',
|
|
15788
|
+
path: _nullishCoalesce(_optionalChain([first, 'optionalAccess', _392 => _392.path]), () => ( "")),
|
|
15789
|
+
documentType: _nullishCoalesce(_optionalChain([first, 'optionalAccess', _393 => _393.documentType]), () => ( "")),
|
|
15793
15790
|
...externalUrl ? { externalUrl } : {},
|
|
15794
15791
|
targetPlatform: _nullishCoalesce(targetPlatform, () => ( null)),
|
|
15795
15792
|
sourceRepo: spec.sourceRepo,
|
|
@@ -15858,7 +15855,7 @@ function groupSourcesByTable(sources2) {
|
|
|
15858
15855
|
index: source.index,
|
|
15859
15856
|
sourceRepo: source.sourceRepo,
|
|
15860
15857
|
rows: uniqueRows(members.flatMap(rowsOf)),
|
|
15861
|
-
..._optionalChain([serverChip, 'optionalAccess',
|
|
15858
|
+
..._optionalChain([serverChip, 'optionalAccess', _394 => _394.externalUrl]) ? { externalUrl: serverChip.externalUrl } : {},
|
|
15862
15859
|
...serverChip && serverChip.targetPlatform !== void 0 ? { targetPlatform: serverChip.targetPlatform } : {}
|
|
15863
15860
|
})
|
|
15864
15861
|
);
|
|
@@ -15908,7 +15905,7 @@ function resolveSourceRowCTA(row, ctx = {}) {
|
|
|
15908
15905
|
if (row.path && shouldFallbackToPathNav(row) && !row.externalUrl) {
|
|
15909
15906
|
const safePath = sanitizePath(row.path);
|
|
15910
15907
|
if (safePath) {
|
|
15911
|
-
const docTarget = row.documentType ? _optionalChain([ctx, 'access',
|
|
15908
|
+
const docTarget = row.documentType ? _optionalChain([ctx, 'access', _395 => _395.docPlatformTargets, 'optionalAccess', _396 => _396[row.documentType]]) : void 0;
|
|
15912
15909
|
if (docTarget) {
|
|
15913
15910
|
const seg = docTarget.basePath.split("/").filter(Boolean).join("/");
|
|
15914
15911
|
const base = `${getPlatformUrl(docTarget.platform)}${seg ? `/${seg}` : ""}/`;
|
|
@@ -16051,8 +16048,8 @@ function cardMenuGroups(href, discuss, openDetails, externalLink) {
|
|
|
16051
16048
|
if (href) {
|
|
16052
16049
|
items.push({
|
|
16053
16050
|
id: "open-details",
|
|
16054
|
-
label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess',
|
|
16055
|
-
icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess',
|
|
16051
|
+
label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _397 => _397.label]), () => ( "Open Details")),
|
|
16052
|
+
icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _398 => _398.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDWCV7IDUcjs.EyeIcon, { size: 20 }))),
|
|
16056
16053
|
// Main row → open the entity (same tab, soft Link nav).
|
|
16057
16054
|
href,
|
|
16058
16055
|
// Trailing 40px ↗ side-button → open in a new tab.
|
|
@@ -16112,18 +16109,18 @@ function itemVideoMetadata(item) {
|
|
|
16112
16109
|
for (const v of vals) if (typeof v === "string" && v.length > 0) return v;
|
|
16113
16110
|
return void 0;
|
|
16114
16111
|
};
|
|
16115
|
-
const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16112
|
+
const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess', _399 => _399.metadata]), () => ( {}));
|
|
16116
16113
|
const out = {};
|
|
16117
|
-
const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess',
|
|
16118
|
-
const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess',
|
|
16119
|
-
const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess',
|
|
16114
|
+
const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess', _400 => _400.custom_video_url]), _optionalChain([item, 'optionalAccess', _401 => _401.main_video_url]));
|
|
16115
|
+
const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess', _402 => _402.youtube_url]), _optionalChain([item, 'optionalAccess', _403 => _403.testimonial_video_url]));
|
|
16116
|
+
const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess', _404 => _404.highlight_video_url]));
|
|
16120
16117
|
const videoPoster = pick(
|
|
16121
16118
|
m.videoPoster,
|
|
16122
|
-
_optionalChain([item, 'optionalAccess',
|
|
16123
|
-
_optionalChain([item, 'optionalAccess',
|
|
16124
|
-
_optionalChain([item, 'optionalAccess',
|
|
16119
|
+
_optionalChain([item, 'optionalAccess', _405 => _405.main_video_thumbnail]),
|
|
16120
|
+
_optionalChain([item, 'optionalAccess', _406 => _406.highlight_video_thumbnail]),
|
|
16121
|
+
_optionalChain([item, 'optionalAccess', _407 => _407.featured_image])
|
|
16125
16122
|
);
|
|
16126
|
-
const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess',
|
|
16123
|
+
const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess', _408 => _408.highlight_video_thumbnail]));
|
|
16127
16124
|
if (videoUrl) out.videoUrl = videoUrl;
|
|
16128
16125
|
if (youtubeUrl) out.youtubeUrl = youtubeUrl;
|
|
16129
16126
|
if (highlightVideoUrl) out.highlightVideoUrl = highlightVideoUrl;
|
|
@@ -16153,15 +16150,15 @@ function fetchedItemDisplayRef(item, chatRef) {
|
|
|
16153
16150
|
}
|
|
16154
16151
|
function fetchedFaqDisplayRef(item, chatRef) {
|
|
16155
16152
|
const it = item;
|
|
16156
|
-
const answer = typeof _optionalChain([it, 'optionalAccess',
|
|
16153
|
+
const answer = typeof _optionalChain([it, 'optionalAccess', _409 => _409.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
|
|
16157
16154
|
return {
|
|
16158
16155
|
type: "faq",
|
|
16159
16156
|
id: chatRef.id,
|
|
16160
16157
|
sourceRepo: chatRef.sourceRepo,
|
|
16161
|
-
title: typeof _optionalChain([it, 'optionalAccess',
|
|
16158
|
+
title: typeof _optionalChain([it, 'optionalAccess', _410 => _410.question]) === "string" && it.question ? it.question : chatRef.id,
|
|
16162
16159
|
url: _nullishCoalesce(chatRef.url, () => ( null)),
|
|
16163
16160
|
...answer ? { preview: answer.length > 400 ? `${answer.slice(0, 397)}\u2026` : answer } : {},
|
|
16164
|
-
metadata: typeof _optionalChain([it, 'optionalAccess',
|
|
16161
|
+
metadata: typeof _optionalChain([it, 'optionalAccess', _411 => _411.section]) === "string" && it.section ? { section: it.section } : {}
|
|
16165
16162
|
};
|
|
16166
16163
|
}
|
|
16167
16164
|
function HubspotTicketChatCard({
|
|
@@ -16169,8 +16166,8 @@ function HubspotTicketChatCard({
|
|
|
16169
16166
|
isNewTab,
|
|
16170
16167
|
discuss
|
|
16171
16168
|
}) {
|
|
16172
|
-
const status = typeof _optionalChain([chatRef, 'access',
|
|
16173
|
-
const statusLabel = typeof _optionalChain([chatRef, 'access',
|
|
16169
|
+
const status = typeof _optionalChain([chatRef, 'access', _412 => _412.metadata, 'optionalAccess', _413 => _413.status]) === "string" ? chatRef.metadata.status : void 0;
|
|
16170
|
+
const statusLabel = typeof _optionalChain([chatRef, 'access', _414 => _414.metadata, 'optionalAccess', _415 => _415.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
|
|
16174
16171
|
const statusText = _nullishCoalesce(statusLabel, () => ( formatStatusToken(status)));
|
|
16175
16172
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16176
16173
|
MingoInfoCard,
|
|
@@ -16193,7 +16190,7 @@ function FaqChatCard({
|
|
|
16193
16190
|
isNewTab,
|
|
16194
16191
|
discuss
|
|
16195
16192
|
}) {
|
|
16196
|
-
const section = typeof _optionalChain([chatRef, 'access',
|
|
16193
|
+
const section = typeof _optionalChain([chatRef, 'access', _416 => _416.metadata, 'optionalAccess', _417 => _417.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
|
|
16197
16194
|
const statusLabel = section && section.length > 0 ? section : "FAQ";
|
|
16198
16195
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16199
16196
|
MingoInfoCard,
|
|
@@ -16213,7 +16210,7 @@ function SlackChatCard({
|
|
|
16213
16210
|
isNewTab,
|
|
16214
16211
|
discuss
|
|
16215
16212
|
}) {
|
|
16216
|
-
const channelName = typeof _optionalChain([chatRef, 'access',
|
|
16213
|
+
const channelName = typeof _optionalChain([chatRef, 'access', _418 => _418.metadata, 'optionalAccess', _419 => _419.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
|
|
16217
16214
|
const channelPretty = channelName ? channelName.startsWith("#") ? channelName : `#${channelName}` : void 0;
|
|
16218
16215
|
const title = channelPretty ? `${chatRef.title} \xB7 ${channelPretty}` : chatRef.title;
|
|
16219
16216
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -16256,7 +16253,7 @@ function TrustCenterChatCard({
|
|
|
16256
16253
|
isNewTab,
|
|
16257
16254
|
discuss
|
|
16258
16255
|
}) {
|
|
16259
|
-
const raw = _optionalChain([item, 'optionalAccess',
|
|
16256
|
+
const raw = _optionalChain([item, 'optionalAccess', _420 => _420.frameworks]);
|
|
16260
16257
|
const frameworks = Array.isArray(raw) ? raw : [];
|
|
16261
16258
|
const summary = _chunkQTTBDMPOcjs.trustFrameworksSummary.call(void 0, frameworks);
|
|
16262
16259
|
const leadFramework = frameworks[0];
|
|
@@ -16305,7 +16302,7 @@ function GenericFinancialChatCard({
|
|
|
16305
16302
|
isNewTab,
|
|
16306
16303
|
discuss
|
|
16307
16304
|
}) {
|
|
16308
|
-
const subtitle = typeof _optionalChain([chatRef, 'access',
|
|
16305
|
+
const subtitle = typeof _optionalChain([chatRef, 'access', _421 => _421.metadata, 'optionalAccess', _422 => _422.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
|
|
16309
16306
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16310
16307
|
MingoInfoCard,
|
|
16311
16308
|
{
|
|
@@ -16374,12 +16371,12 @@ function ProductReleaseChatCard({
|
|
|
16374
16371
|
discuss
|
|
16375
16372
|
}) {
|
|
16376
16373
|
const releaseProps = buildProps(item);
|
|
16377
|
-
const status = _optionalChain([item, 'optionalAccess',
|
|
16374
|
+
const status = _optionalChain([item, 'optionalAccess', _423 => _423.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
|
|
16378
16375
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16379
16376
|
EntityMingoCard,
|
|
16380
16377
|
{
|
|
16381
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16382
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
16378
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _424 => _424.title]), () => ( "")),
|
|
16379
|
+
description: _optionalChain([item, 'optionalAccess', _425 => _425.summary]) || releaseProps.formattedDate || void 0,
|
|
16383
16380
|
cover: releaseProps.coverImage || void 0,
|
|
16384
16381
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDWCV7IDUcjs.Rocket02Icon, { size: 24 }),
|
|
16385
16382
|
status,
|
|
@@ -16396,17 +16393,17 @@ function CampaignChatCard({
|
|
|
16396
16393
|
isNewTab,
|
|
16397
16394
|
discuss
|
|
16398
16395
|
}) {
|
|
16399
|
-
const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess',
|
|
16396
|
+
const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _426 => _426.goals])) ? item.goals.length : 0;
|
|
16400
16397
|
const meta = [
|
|
16401
|
-
_optionalChain([item, 'optionalAccess',
|
|
16398
|
+
_optionalChain([item, 'optionalAccess', _427 => _427.start_date]) ? _chunkQTTBDMPOcjs.formatDateShort.call(void 0, item.start_date) : null,
|
|
16402
16399
|
goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
|
|
16403
16400
|
"Marketing campaign"
|
|
16404
16401
|
].filter(Boolean).join(" \xB7 ");
|
|
16405
16402
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16406
16403
|
EntityMingoCard,
|
|
16407
16404
|
{
|
|
16408
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16409
|
-
description: meta || _optionalChain([item, 'optionalAccess',
|
|
16405
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _428 => _428.name]), () => ( "")),
|
|
16406
|
+
description: meta || _optionalChain([item, 'optionalAccess', _429 => _429.description]) || void 0,
|
|
16410
16407
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDWCV7IDUcjs.Megaphone01Icon, { size: 24 }),
|
|
16411
16408
|
chatRef,
|
|
16412
16409
|
isNewTab,
|
|
@@ -16461,14 +16458,14 @@ function BlogChatCard({
|
|
|
16461
16458
|
hasEmbeddedVideo,
|
|
16462
16459
|
discuss
|
|
16463
16460
|
}) {
|
|
16464
|
-
const category = Array.isArray(_optionalChain([item, 'optionalAccess',
|
|
16461
|
+
const category = Array.isArray(_optionalChain([item, 'optionalAccess', _430 => _430.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _431 => _431.categories, 'access', _432 => _432.find, 'call', _433 => _433((c) => _optionalChain([c, 'optionalAccess', _434 => _434.name])), 'optionalAccess', _435 => _435.name]), () => ( void 0)) : void 0;
|
|
16465
16462
|
const status = hasEmbeddedVideo ? { label: "Video", variant: "primary" } : category ? { label: category, variant: "grey" } : void 0;
|
|
16466
16463
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16467
16464
|
EntityMingoCard,
|
|
16468
16465
|
{
|
|
16469
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16470
|
-
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16471
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
16466
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _436 => _436.title]), () => ( "")),
|
|
16467
|
+
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _437 => _437.summary]), () => ( void 0)),
|
|
16468
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _438 => _438.featured_image]), ogPlaceholder),
|
|
16472
16469
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDWCV7IDUcjs.NewspaperIcon, { size: 24 }),
|
|
16473
16470
|
status,
|
|
16474
16471
|
chatRef,
|
|
@@ -16485,13 +16482,13 @@ function CaseStudyChatCard({
|
|
|
16485
16482
|
ogPlaceholder,
|
|
16486
16483
|
discuss
|
|
16487
16484
|
}) {
|
|
16488
|
-
const meta = [_optionalChain([item, 'optionalAccess',
|
|
16485
|
+
const meta = [_optionalChain([item, 'optionalAccess', _439 => _439.msp, 'optionalAccess', _440 => _440.name]), _optionalChain([item, 'optionalAccess', _441 => _441.user, 'optionalAccess', _442 => _442.full_name])].filter(Boolean).join(" \xB7 ");
|
|
16489
16486
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16490
16487
|
EntityMingoCard,
|
|
16491
16488
|
{
|
|
16492
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16493
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
16494
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
16489
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _443 => _443.title]), () => ( "")),
|
|
16490
|
+
description: _optionalChain([item, 'optionalAccess', _444 => _444.summary]) || meta || void 0,
|
|
16491
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _445 => _445.featured_image]), ogPlaceholder),
|
|
16495
16492
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDWCV7IDUcjs.TrophyIcon, { size: 24 }),
|
|
16496
16493
|
status: { label: "Case study", variant: "grey" },
|
|
16497
16494
|
chatRef,
|
|
@@ -16508,13 +16505,13 @@ function CustomerInterviewChatCard({
|
|
|
16508
16505
|
ogPlaceholder,
|
|
16509
16506
|
discuss
|
|
16510
16507
|
}) {
|
|
16511
|
-
const meta = [_optionalChain([item, 'optionalAccess',
|
|
16508
|
+
const meta = [_optionalChain([item, 'optionalAccess', _446 => _446.user, 'optionalAccess', _447 => _447.full_name]), _optionalChain([item, 'optionalAccess', _448 => _448.msp, 'optionalAccess', _449 => _449.name])].filter(Boolean).join(" \xB7 ");
|
|
16512
16509
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16513
16510
|
EntityMingoCard,
|
|
16514
16511
|
{
|
|
16515
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16516
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
16517
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
16512
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _450 => _450.title]), () => ( "")),
|
|
16513
|
+
description: _optionalChain([item, 'optionalAccess', _451 => _451.video_summary]) || meta || void 0,
|
|
16514
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _452 => _452.featured_image]), ogPlaceholder),
|
|
16518
16515
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDWCV7IDUcjs.MicrophoneIcon, { size: 24 }),
|
|
16519
16516
|
status: { label: "Interview", variant: "grey" },
|
|
16520
16517
|
chatRef,
|
|
@@ -16531,12 +16528,12 @@ function DesignDocChatCard({
|
|
|
16531
16528
|
discuss
|
|
16532
16529
|
}) {
|
|
16533
16530
|
const displayRef = fetchedItemDisplayRef(item, chatRef);
|
|
16534
|
-
const doc = _optionalChain([item, 'optionalAccess',
|
|
16531
|
+
const doc = _optionalChain([item, 'optionalAccess', _453 => _453.doc]);
|
|
16535
16532
|
const readiness = doc ? DESIGN_DOC_READINESS_DISPLAY[designDocReadiness(doc.completion)] : null;
|
|
16536
16533
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16537
16534
|
MingoInfoCard,
|
|
16538
16535
|
{
|
|
16539
|
-
title: _nullishCoalesce(_optionalChain([doc, 'optionalAccess',
|
|
16536
|
+
title: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _454 => _454.title]), () => ( displayRef.title)),
|
|
16540
16537
|
description: doc ? [designDocMetaLine(doc), formatCompletionLabel(doc.completion)].join(" \xB7 ") : _nullishCoalesce(displayRef.preview, () => ( void 0)),
|
|
16541
16538
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDWCV7IDUcjs.FileContentIcon, { size: 24 }),
|
|
16542
16539
|
status: readiness ? { label: readiness.label, variant: readiness.scheme === "success" ? "success" : "grey" } : { label: "Design doc", variant: "grey" },
|
|
@@ -16553,13 +16550,13 @@ function InvestorUpdateChatCard({
|
|
|
16553
16550
|
ogPlaceholder,
|
|
16554
16551
|
discuss
|
|
16555
16552
|
}) {
|
|
16556
|
-
const title = _optionalChain([item, 'optionalAccess',
|
|
16553
|
+
const title = _optionalChain([item, 'optionalAccess', _455 => _455.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _456 => _456.update_number]), () => ( "?"))}`;
|
|
16557
16554
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16558
16555
|
EntityMingoCard,
|
|
16559
16556
|
{
|
|
16560
16557
|
title,
|
|
16561
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
16562
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
16558
|
+
description: _optionalChain([item, 'optionalAccess', _457 => _457.strategic_update]) || _optionalChain([item, 'optionalAccess', _458 => _458.content]) || _chunkQTTBDMPOcjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _459 => _459.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _460 => _460.period_end]), () => ( null))) || void 0,
|
|
16559
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _461 => _461.featured_image]), ogPlaceholder),
|
|
16563
16560
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDWCV7IDUcjs.PresentationLineIcon, { size: 24 }),
|
|
16564
16561
|
status: { label: "Investor update", variant: "grey" },
|
|
16565
16562
|
chatRef,
|
|
@@ -16576,12 +16573,12 @@ function OnboardingGuideChatCard({
|
|
|
16576
16573
|
ogPlaceholder,
|
|
16577
16574
|
discuss
|
|
16578
16575
|
}) {
|
|
16579
|
-
const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess',
|
|
16576
|
+
const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _462 => _462.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _463 => _463.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _464 => _464.og_image_url]), ogPlaceholder)));
|
|
16580
16577
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16581
16578
|
EntityMingoCard,
|
|
16582
16579
|
{
|
|
16583
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16584
|
-
description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16580
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _465 => _465.title]), () => ( "")),
|
|
16581
|
+
description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _466 => _466.summary]), () => ( _optionalChain([item, 'optionalAccess', _467 => _467.description]))), () => ( void 0)),
|
|
16585
16582
|
cover,
|
|
16586
16583
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDWCV7IDUcjs.CompassIcon, { size: 24 }),
|
|
16587
16584
|
status: { label: "Guide", variant: "grey" },
|
|
@@ -16606,9 +16603,9 @@ function ProgramChatCard({
|
|
|
16606
16603
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16607
16604
|
EntityMingoCard,
|
|
16608
16605
|
{
|
|
16609
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16610
|
-
description: meta || _optionalChain([item, 'optionalAccess',
|
|
16611
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
16606
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _468 => _468.title]), () => ( "")),
|
|
16607
|
+
description: meta || _optionalChain([item, 'optionalAccess', _469 => _469.description]) || void 0,
|
|
16608
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _470 => _470.cover_url]), ogPlaceholder),
|
|
16612
16609
|
fallbackIcon: icon,
|
|
16613
16610
|
status: { label, variant: "grey" },
|
|
16614
16611
|
chatRef,
|
|
@@ -16625,10 +16622,10 @@ function RoadmapChatCard({
|
|
|
16625
16622
|
cardType,
|
|
16626
16623
|
discuss
|
|
16627
16624
|
}) {
|
|
16628
|
-
const logoUrl = typeof _optionalChain([item, 'optionalAccess',
|
|
16629
|
-
const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess',
|
|
16625
|
+
const logoUrl = typeof _optionalChain([item, 'optionalAccess', _471 => _471.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
|
|
16626
|
+
const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _472 => _472.customItemId]) != null;
|
|
16630
16627
|
const defaultIcon = cardType === "delivery_item" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDWCV7IDUcjs.TruckFastIcon, { size: 24 }) : cardType === "internal_task" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDWCV7IDUcjs.CheckSquareIcon, { size: 24 }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkDWCV7IDUcjs.MapIcon, { size: 24 });
|
|
16631
|
-
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQTTBDMPOcjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess',
|
|
16628
|
+
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQTTBDMPOcjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _473 => _473.customItemId]), className: "size-6" }) : logoUrl ? (
|
|
16632
16629
|
// Contained (not full-bleed) so the integration logo keeps its aspect
|
|
16633
16630
|
// ratio inside the bordered icon box — matches RoadmapCard.
|
|
16634
16631
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWLSFBRT5cjs.next_image_default, { src: logoUrl, alt: "", className: "size-6 object-contain", width: 24, height: 24, unoptimized: true })
|
|
@@ -16639,10 +16636,10 @@ function RoadmapChatCard({
|
|
|
16639
16636
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16640
16637
|
EntityMingoCard,
|
|
16641
16638
|
{
|
|
16642
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16643
|
-
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16639
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _474 => _474.title]), () => ( "")),
|
|
16640
|
+
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _475 => _475.description]), () => ( void 0)),
|
|
16644
16641
|
fallbackIcon: icon,
|
|
16645
|
-
status: statusPill(_optionalChain([item, 'optionalAccess',
|
|
16642
|
+
status: statusPill(_optionalChain([item, 'optionalAccess', _476 => _476.status])),
|
|
16646
16643
|
chatRef,
|
|
16647
16644
|
isNewTab,
|
|
16648
16645
|
discuss,
|
|
@@ -16658,7 +16655,7 @@ function refHydratedEntry(docType, label, renderRef) {
|
|
|
16658
16655
|
bareInline: true,
|
|
16659
16656
|
contentRefType: docType,
|
|
16660
16657
|
noComposedHref: true,
|
|
16661
|
-
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16658
|
+
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _477 => _477.url]), () => ( null)),
|
|
16662
16659
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
|
|
16663
16660
|
render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts)
|
|
16664
16661
|
};
|
|
@@ -16732,8 +16729,8 @@ function refGlyphRegistryEntries() {
|
|
|
16732
16729
|
title: displayRef.title,
|
|
16733
16730
|
description: _nullishCoalesce(displayRef.preview, () => ( void 0)),
|
|
16734
16731
|
cover: entityCover(
|
|
16735
|
-
_optionalChain([displayRef, 'access',
|
|
16736
|
-
_nullishCoalesce(_optionalChain([opts, 'access',
|
|
16732
|
+
_optionalChain([displayRef, 'access', _478 => _478.metadata, 'optionalAccess', _479 => _479.videoPoster]),
|
|
16733
|
+
_nullishCoalesce(_optionalChain([opts, 'access', _480 => _480.extras, 'optionalAccess', _481 => _481.buildOgPlaceholderUrl, 'optionalCall', _482 => _482(_nullishCoalesce(displayRef.title, () => ( "")))]), () => ( null))
|
|
16737
16734
|
),
|
|
16738
16735
|
fallbackIcon: cfg.icon(),
|
|
16739
16736
|
status: { label: cfg.label, variant: "grey" },
|
|
@@ -16748,9 +16745,9 @@ function refGlyphRegistryEntries() {
|
|
|
16748
16745
|
}
|
|
16749
16746
|
function fetchedEmployeeEntryDisplayRef(item, chatRef) {
|
|
16750
16747
|
const it = item;
|
|
16751
|
-
const title = typeof _optionalChain([it, 'optionalAccess',
|
|
16752
|
-
const author = typeof _optionalChain([it, 'optionalAccess',
|
|
16753
|
-
const summary = typeof _optionalChain([it, 'optionalAccess',
|
|
16748
|
+
const title = typeof _optionalChain([it, 'optionalAccess', _483 => _483.title]) === "string" && it.title.trim().length > 0 ? it.title.trim() : chatRef.title;
|
|
16749
|
+
const author = typeof _optionalChain([it, 'optionalAccess', _484 => _484.author, 'optionalAccess', _485 => _485.full_name]) === "string" ? it.author.full_name.trim() : "";
|
|
16750
|
+
const summary = typeof _optionalChain([it, 'optionalAccess', _486 => _486.summary]) === "string" ? it.summary.trim() : "";
|
|
16754
16751
|
const preview = [author, summary].filter((x) => x.length > 0).join(" \xB7 ");
|
|
16755
16752
|
return { ...chatRef, title, preview: preview.length > 0 ? preview : chatRef.preview };
|
|
16756
16753
|
}
|
|
@@ -16802,7 +16799,7 @@ function programRegistryEntries() {
|
|
|
16802
16799
|
discuss: opts.discuss,
|
|
16803
16800
|
configKey: cfg.configKey,
|
|
16804
16801
|
label: cfg.configKey.charAt(0).toUpperCase() + cfg.configKey.slice(1),
|
|
16805
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16802
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _487 => _487.extras, 'optionalAccess', _488 => _488.buildOgPlaceholderUrl, 'optionalCall', _489 => _489(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _490 => _490.title]), () => ( "")))]), () => ( null))
|
|
16806
16803
|
}
|
|
16807
16804
|
)
|
|
16808
16805
|
}));
|
|
@@ -16823,7 +16820,7 @@ var ROADMAP_CARD_CONFIGS = {
|
|
|
16823
16820
|
// The card's destination IS the ClickUp deep link, derived from the
|
|
16824
16821
|
// task id post-fetch (the refs frame used to carry it).
|
|
16825
16822
|
noComposedHref: true,
|
|
16826
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
16823
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _491 => _491.id]) != null ? clickupTaskUrl(String(item.id)) : null
|
|
16827
16824
|
}
|
|
16828
16825
|
};
|
|
16829
16826
|
function roadmapRegistryEntries() {
|
|
@@ -16865,8 +16862,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16865
16862
|
DeletedDataCard,
|
|
16866
16863
|
{
|
|
16867
16864
|
title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : null,
|
|
16868
|
-
entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access',
|
|
16869
|
-
recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access',
|
|
16865
|
+
entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _492 => _492.metadata, 'optionalAccess', _493 => _493.entity_label]), () => ( null)),
|
|
16866
|
+
recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _494 => _494.metadata, 'optionalAccess', _495 => _495.recovery_note]), () => ( null))
|
|
16870
16867
|
}
|
|
16871
16868
|
)
|
|
16872
16869
|
},
|
|
@@ -16883,7 +16880,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16883
16880
|
bareInline: true,
|
|
16884
16881
|
contentRefType: "faq",
|
|
16885
16882
|
noComposedHref: true,
|
|
16886
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
16883
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _496 => _496.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
|
|
16887
16884
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
|
|
16888
16885
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FaqChatCard, { chatRef: fetchedFaqDisplayRef(item, chatRef), isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
16889
16886
|
},
|
|
@@ -16930,8 +16927,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16930
16927
|
chatRef,
|
|
16931
16928
|
isNewTab: opts.isNewTab,
|
|
16932
16929
|
discuss: opts.discuss,
|
|
16933
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16934
|
-
hasEmbeddedVideo: _optionalChain([chatRef, 'access',
|
|
16930
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _497 => _497.extras, 'optionalAccess', _498 => _498.buildOgPlaceholderUrl, 'optionalCall', _499 => _499(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _500 => _500.title]), () => ( "")))]), () => ( null)),
|
|
16931
|
+
hasEmbeddedVideo: _optionalChain([chatRef, 'access', _501 => _501.metadata, 'optionalAccess', _502 => _502.hasEmbeddedVideo]) === true
|
|
16935
16932
|
}
|
|
16936
16933
|
)
|
|
16937
16934
|
},
|
|
@@ -16947,7 +16944,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16947
16944
|
chatRef,
|
|
16948
16945
|
isNewTab: opts.isNewTab,
|
|
16949
16946
|
discuss: opts.discuss,
|
|
16950
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16947
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _503 => _503.extras, 'optionalAccess', _504 => _504.buildOgPlaceholderUrl, 'optionalCall', _505 => _505(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _506 => _506.title]), () => ( "")))]), () => ( null))
|
|
16951
16948
|
}
|
|
16952
16949
|
)
|
|
16953
16950
|
},
|
|
@@ -16956,7 +16953,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16956
16953
|
contentRefType: "design_doc",
|
|
16957
16954
|
bareInline: true,
|
|
16958
16955
|
noComposedHref: true,
|
|
16959
|
-
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
16956
|
+
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _507 => _507.url]), () => ( null)),
|
|
16960
16957
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
|
|
16961
16958
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DesignDocChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
16962
16959
|
},
|
|
@@ -16972,7 +16969,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16972
16969
|
chatRef,
|
|
16973
16970
|
isNewTab: opts.isNewTab,
|
|
16974
16971
|
discuss: opts.discuss,
|
|
16975
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16972
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _508 => _508.extras, 'optionalAccess', _509 => _509.buildOgPlaceholderUrl, 'optionalCall', _510 => _510(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _511 => _511.title]), () => ( "")))]), () => ( null))
|
|
16976
16973
|
}
|
|
16977
16974
|
)
|
|
16978
16975
|
},
|
|
@@ -16982,7 +16979,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16982
16979
|
bareInline: true,
|
|
16983
16980
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQTTBDMPOcjs.ProductReleaseCardSkeleton, { size: "sm" }),
|
|
16984
16981
|
render: (item, chatRef, opts) => {
|
|
16985
|
-
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16982
|
+
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _512 => _512.extras, 'optionalAccess', _513 => _513.buildProductReleaseCardProps]), () => ( _chunkQTTBDMPOcjs.defaultBuildProductReleaseCardProps));
|
|
16986
16983
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16987
16984
|
ProductReleaseChatCard,
|
|
16988
16985
|
{
|
|
@@ -17008,7 +17005,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
17008
17005
|
chatRef,
|
|
17009
17006
|
isNewTab: opts.isNewTab,
|
|
17010
17007
|
discuss: opts.discuss,
|
|
17011
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
17008
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _514 => _514.extras, 'optionalAccess', _515 => _515.buildOgPlaceholderUrl, 'optionalCall', _516 => _516(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _517 => _517.title]), () => ( "")))]), () => ( null))
|
|
17012
17009
|
}
|
|
17013
17010
|
)
|
|
17014
17011
|
},
|
|
@@ -17026,7 +17023,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
17026
17023
|
chatRef,
|
|
17027
17024
|
isNewTab: opts.isNewTab,
|
|
17028
17025
|
discuss: opts.discuss,
|
|
17029
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
17026
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _518 => _518.extras, 'optionalAccess', _519 => _519.buildOgPlaceholderUrl, 'optionalCall', _520 => _520(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _521 => _521.title]), () => ( "")))]), () => ( null))
|
|
17030
17027
|
}
|
|
17031
17028
|
)
|
|
17032
17029
|
},
|
|
@@ -17037,13 +17034,13 @@ var CHAT_CARD_REGISTRY = {
|
|
|
17037
17034
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignCardAdminSkeleton, {}),
|
|
17038
17035
|
// No public viewer — synthesize the hub-internal admin URL post-fetch
|
|
17039
17036
|
// so the wrapper + isNewTab computation see the actual destination.
|
|
17040
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
17037
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _522 => _522.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
|
|
17041
17038
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
17042
17039
|
},
|
|
17043
17040
|
...roadmapRegistryEntries()
|
|
17044
17041
|
};
|
|
17045
17042
|
function chatCardLabel(docType) {
|
|
17046
|
-
return _optionalChain([CHAT_CARD_REGISTRY, 'access',
|
|
17043
|
+
return _optionalChain([CHAT_CARD_REGISTRY, 'access', _523 => _523[docType], 'optionalAccess', _524 => _524.label]);
|
|
17047
17044
|
}
|
|
17048
17045
|
function ChatCardNavWrap({
|
|
17049
17046
|
href,
|
|
@@ -17059,13 +17056,13 @@ function ChatCardNavWrap({
|
|
|
17059
17056
|
if (!href) return;
|
|
17060
17057
|
const targetEl = e.target;
|
|
17061
17058
|
const host = e.currentTarget;
|
|
17062
|
-
if (!_optionalChain([host, 'optionalAccess',
|
|
17063
|
-
if (_optionalChain([targetEl, 'optionalAccess',
|
|
17064
|
-
if (!_optionalChain([targetEl, 'optionalAccess',
|
|
17059
|
+
if (!_optionalChain([host, 'optionalAccess', _525 => _525.contains, 'call', _526 => _526(targetEl)])) return;
|
|
17060
|
+
if (_optionalChain([targetEl, 'optionalAccess', _527 => _527.closest, 'optionalCall', _528 => _528("button")])) return;
|
|
17061
|
+
if (!_optionalChain([targetEl, 'optionalAccess', _529 => _529.closest, 'optionalCall', _530 => _530("a")])) return;
|
|
17065
17062
|
const handled = executeNavigation({ event: e, runtime, href, path, targetPlatform, fallbackNavigate: router.push });
|
|
17066
17063
|
if (!handled) return;
|
|
17067
17064
|
e.stopPropagation();
|
|
17068
|
-
if (!isNewTab && _optionalChain([panel, 'optionalAccess',
|
|
17065
|
+
if (!isNewTab && _optionalChain([panel, 'optionalAccess', _531 => _531.closeChat])) panel.closeChat();
|
|
17069
17066
|
};
|
|
17070
17067
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "contents", onClickCapture, children });
|
|
17071
17068
|
}
|
|
@@ -17087,7 +17084,7 @@ function ChatCardLoader({
|
|
|
17087
17084
|
title: chatRef.title,
|
|
17088
17085
|
externalUrl: chatRef.url,
|
|
17089
17086
|
targetPlatform: chatRef.targetPlatform,
|
|
17090
|
-
path: typeof _optionalChain([chatRef, 'access',
|
|
17087
|
+
path: typeof _optionalChain([chatRef, 'access', _532 => _532.metadata, 'optionalAccess', _533 => _533.path]) === "string" ? chatRef.metadata.path : null
|
|
17091
17088
|
},
|
|
17092
17089
|
sourceRowCtxFromRuntime(runtime, { baseRoute, chipBasePlatform })
|
|
17093
17090
|
);
|
|
@@ -17101,11 +17098,11 @@ function ChatCardLoader({
|
|
|
17101
17098
|
const entry = CHAT_CARD_REGISTRY[resolvedChatRef.type];
|
|
17102
17099
|
const fetchEntry = entry && entry.contentRefType ? entry : null;
|
|
17103
17100
|
const { item, isLoading, isError, isFetched } = useChatCardItem(
|
|
17104
|
-
_nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess',
|
|
17101
|
+
_nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _534 => _534.contentRefType]), () => ( "")),
|
|
17105
17102
|
fetchEntry ? resolvedChatRef.id : ""
|
|
17106
17103
|
);
|
|
17107
17104
|
if (!entry) return null;
|
|
17108
|
-
const composedHref = _optionalChain([fetchEntry, 'optionalAccess',
|
|
17105
|
+
const composedHref = _optionalChain([fetchEntry, 'optionalAccess', _535 => _535.contentRefType]) && !resolvedChatRef.url && item ? resolveFetchedCardHref({
|
|
17109
17106
|
contentRefType: fetchEntry.contentRefType,
|
|
17110
17107
|
id: resolvedChatRef.id,
|
|
17111
17108
|
item,
|
|
@@ -17113,7 +17110,7 @@ function ChatCardLoader({
|
|
|
17113
17110
|
}) : null;
|
|
17114
17111
|
const hrefChoice = fetchEntry && !resolvedChatRef.url && item ? pickFetchedCardHref({
|
|
17115
17112
|
composed: composedHref,
|
|
17116
|
-
itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access',
|
|
17113
|
+
itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _536 => _536.fallbackHref, 'optionalCall', _537 => _537(item)]), () => ( null)),
|
|
17117
17114
|
allowComposed: !fetchEntry.noComposedHref
|
|
17118
17115
|
}) : null;
|
|
17119
17116
|
const hrefResolvedChatRef = hrefChoice ? {
|
|
@@ -17147,7 +17144,7 @@ function ChatCardLoader({
|
|
|
17147
17144
|
isNewTab,
|
|
17148
17145
|
discuss
|
|
17149
17146
|
};
|
|
17150
|
-
const path = typeof _optionalChain([finalChatRef, 'access',
|
|
17147
|
+
const path = typeof _optionalChain([finalChatRef, 'access', _538 => _538.metadata, 'optionalAccess', _539 => _539.path]) === "string" ? finalChatRef.metadata.path : null;
|
|
17151
17148
|
const navWrap = (children) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
17152
17149
|
ChatCardNavWrap,
|
|
17153
17150
|
{
|
|
@@ -17171,7 +17168,7 @@ function ChatCardLoader({
|
|
|
17171
17168
|
if (!fetchEntry) {
|
|
17172
17169
|
return finish(entry.render(void 0, finalChatRef, renderOpts));
|
|
17173
17170
|
}
|
|
17174
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access',
|
|
17171
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _540 => _540.skeleton, 'optionalCall', _541 => _541()]), () => ( null)) });
|
|
17175
17172
|
if (!item) {
|
|
17176
17173
|
if (isError) {
|
|
17177
17174
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Failed to load" });
|
|
@@ -17479,7 +17476,7 @@ function useChunkCatchup({
|
|
|
17479
17476
|
if (catchupRun.current === run) {
|
|
17480
17477
|
if (currentDialogId !== dialogIdRef.current) {
|
|
17481
17478
|
catchupRun.current = null;
|
|
17482
|
-
if (_optionalChain([pendingCatchupRef, 'access',
|
|
17479
|
+
if (_optionalChain([pendingCatchupRef, 'access', _542 => _542.current, 'optionalAccess', _543 => _543.dialogId]) === currentDialogId) {
|
|
17483
17480
|
pendingCatchupRef.current = null;
|
|
17484
17481
|
}
|
|
17485
17482
|
} else {
|
|
@@ -17490,7 +17487,7 @@ function useChunkCatchup({
|
|
|
17490
17487
|
if (pending.dialogId === currentDialogId) {
|
|
17491
17488
|
rearmForQueuedCatchup();
|
|
17492
17489
|
try {
|
|
17493
|
-
await _optionalChain([catchUpChunksRef, 'access',
|
|
17490
|
+
await _optionalChain([catchUpChunksRef, 'access', _544 => _544.current, 'optionalCall', _545 => _545(pending.fromSequenceId)]);
|
|
17494
17491
|
} catch (rerunError) {
|
|
17495
17492
|
console.error("Queued catch-up re-run failed:", rerunError);
|
|
17496
17493
|
}
|
|
@@ -17557,7 +17554,7 @@ function useChunkCatchup({
|
|
|
17557
17554
|
|
|
17558
17555
|
var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
|
|
17559
17556
|
function prefersReducedMotion() {
|
|
17560
|
-
return typeof window !== "undefined" && _optionalChain([window, 'access',
|
|
17557
|
+
return typeof window !== "undefined" && _optionalChain([window, 'access', _546 => _546.matchMedia, 'optionalCall', _547 => _547("(prefers-reduced-motion: reduce)"), 'access', _548 => _548.matches]) === true;
|
|
17561
17558
|
}
|
|
17562
17559
|
function useScriptedStream(frames, resetKey, enabled = true) {
|
|
17563
17560
|
const [index, setIndex] = _react.useState.call(void 0, 0);
|
|
@@ -17568,7 +17565,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
17568
17565
|
setIndex(0);
|
|
17569
17566
|
}
|
|
17570
17567
|
_react.useEffect.call(void 0, () => {
|
|
17571
|
-
const mq = _optionalChain([window, 'access',
|
|
17568
|
+
const mq = _optionalChain([window, 'access', _549 => _549.matchMedia, 'optionalCall', _550 => _550("(prefers-reduced-motion: reduce)")]);
|
|
17572
17569
|
const sync = () => setReducedMotion(mq ? mq.matches : prefersReducedMotion());
|
|
17573
17570
|
sync();
|
|
17574
17571
|
if (!mq) return void 0;
|
|
@@ -17711,7 +17708,7 @@ function useJetStreamDialogSubscription({
|
|
|
17711
17708
|
const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
|
|
17712
17709
|
conn: sharedConn,
|
|
17713
17710
|
wsUrl,
|
|
17714
|
-
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access',
|
|
17711
|
+
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _551 => _551.current, 'optionalCall', _552 => _552()]),
|
|
17715
17712
|
backoff: reconnectionBackoffRef.current,
|
|
17716
17713
|
getFreshUrl: () => getNatsWsUrlRef.current(),
|
|
17717
17714
|
// JetStream emits 'error' for protocol-level failures (e.g. -ERR Permissions
|
|
@@ -17726,7 +17723,7 @@ function useJetStreamDialogSubscription({
|
|
|
17726
17723
|
setReconnectionCount((c) => c + 1);
|
|
17727
17724
|
}
|
|
17728
17725
|
hadConnectionBeforeRef.current = true;
|
|
17729
|
-
_optionalChain([onConnectRef, 'access',
|
|
17726
|
+
_optionalChain([onConnectRef, 'access', _553 => _553.current, 'optionalCall', _554 => _554()]);
|
|
17730
17727
|
}
|
|
17731
17728
|
if (status === "error") {
|
|
17732
17729
|
console.warn("[JetStream] NATS protocol error:", evt.data);
|
|
@@ -17736,7 +17733,7 @@ function useJetStreamDialogSubscription({
|
|
|
17736
17733
|
setIsConnected(false);
|
|
17737
17734
|
setIsSubscribed(false);
|
|
17738
17735
|
tearDownSubscription();
|
|
17739
|
-
_optionalChain([onDisconnectRef, 'access',
|
|
17736
|
+
_optionalChain([onDisconnectRef, 'access', _555 => _555.current, 'optionalCall', _556 => _556()]);
|
|
17740
17737
|
}
|
|
17741
17738
|
}
|
|
17742
17739
|
});
|
|
@@ -17862,7 +17859,7 @@ function useJetStreamDialogSubscription({
|
|
|
17862
17859
|
}
|
|
17863
17860
|
subscriptionRef.current = handle;
|
|
17864
17861
|
setIsSubscribed(true);
|
|
17865
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
17862
|
+
_optionalChain([onSubscribedRef, 'access', _557 => _557.current, 'optionalCall', _558 => _558()]);
|
|
17866
17863
|
} catch (e52) {
|
|
17867
17864
|
if (!cancelled) {
|
|
17868
17865
|
setIsSubscribed(false);
|
|
@@ -17978,20 +17975,20 @@ function useNatsDialogSubscription({
|
|
|
17978
17975
|
const tearDownSubscriptions = () => {
|
|
17979
17976
|
subscriptionRefs.current.forEach((sub) => {
|
|
17980
17977
|
try {
|
|
17981
|
-
_optionalChain([sub, 'optionalAccess',
|
|
17978
|
+
_optionalChain([sub, 'optionalAccess', _559 => _559.unsubscribe, 'call', _560 => _560()]);
|
|
17982
17979
|
} catch (e54) {
|
|
17983
17980
|
}
|
|
17984
17981
|
});
|
|
17985
17982
|
subscriptionRefs.current.clear();
|
|
17986
17983
|
lastSubscribedDialogIdRef.current = null;
|
|
17987
|
-
_optionalChain([abortControllerRef, 'access',
|
|
17984
|
+
_optionalChain([abortControllerRef, 'access', _561 => _561.current, 'optionalAccess', _562 => _562.abort, 'call', _563 => _563()]);
|
|
17988
17985
|
abortControllerRef.current = null;
|
|
17989
17986
|
};
|
|
17990
17987
|
const isDisconnectStatus = (status) => status === "closed" || status === "disconnected";
|
|
17991
17988
|
const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
|
|
17992
17989
|
conn: sharedConn,
|
|
17993
17990
|
wsUrl,
|
|
17994
|
-
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access',
|
|
17991
|
+
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _564 => _564.current, 'optionalCall', _565 => _565()]),
|
|
17995
17992
|
backoff: reconnectionBackoffRef.current,
|
|
17996
17993
|
getFreshUrl: () => getNatsWsUrlRef.current(),
|
|
17997
17994
|
shouldRetryOn: isDisconnectStatus,
|
|
@@ -18002,7 +17999,7 @@ function useNatsDialogSubscription({
|
|
|
18002
17999
|
setReconnectionCount((c) => c + 1);
|
|
18003
18000
|
}
|
|
18004
18001
|
hadConnectionBeforeRef.current = true;
|
|
18005
|
-
_optionalChain([onConnectRef, 'access',
|
|
18002
|
+
_optionalChain([onConnectRef, 'access', _566 => _566.current, 'optionalCall', _567 => _567()]);
|
|
18006
18003
|
}
|
|
18007
18004
|
if (status === "error") {
|
|
18008
18005
|
console.warn("[NATS] protocol error:", evt.data);
|
|
@@ -18012,7 +18009,7 @@ function useNatsDialogSubscription({
|
|
|
18012
18009
|
setIsConnected(false);
|
|
18013
18010
|
setIsSubscribed(false);
|
|
18014
18011
|
tearDownSubscriptions();
|
|
18015
|
-
_optionalChain([onDisconnectRef, 'access',
|
|
18012
|
+
_optionalChain([onDisconnectRef, 'access', _568 => _568.current, 'optionalCall', _569 => _569()]);
|
|
18016
18013
|
}
|
|
18017
18014
|
}
|
|
18018
18015
|
});
|
|
@@ -18043,13 +18040,13 @@ function useNatsDialogSubscription({
|
|
|
18043
18040
|
setIsSubscribed(false);
|
|
18044
18041
|
subscriptionRefs.current.forEach((sub) => {
|
|
18045
18042
|
try {
|
|
18046
|
-
_optionalChain([sub, 'optionalAccess',
|
|
18043
|
+
_optionalChain([sub, 'optionalAccess', _570 => _570.unsubscribe, 'call', _571 => _571()]);
|
|
18047
18044
|
} catch (e55) {
|
|
18048
18045
|
}
|
|
18049
18046
|
});
|
|
18050
18047
|
subscriptionRefs.current.clear();
|
|
18051
18048
|
lastSubscribedDialogIdRef.current = null;
|
|
18052
|
-
_optionalChain([abortControllerRef, 'access',
|
|
18049
|
+
_optionalChain([abortControllerRef, 'access', _572 => _572.current, 'optionalAccess', _573 => _573.abort, 'call', _574 => _574()]);
|
|
18053
18050
|
abortControllerRef.current = null;
|
|
18054
18051
|
}
|
|
18055
18052
|
return void 0;
|
|
@@ -18061,12 +18058,12 @@ function useNatsDialogSubscription({
|
|
|
18061
18058
|
if (subscriptionRefs.current.size > 0) {
|
|
18062
18059
|
subscriptionRefs.current.forEach((sub) => {
|
|
18063
18060
|
try {
|
|
18064
|
-
_optionalChain([sub, 'optionalAccess',
|
|
18061
|
+
_optionalChain([sub, 'optionalAccess', _575 => _575.unsubscribe, 'call', _576 => _576()]);
|
|
18065
18062
|
} catch (e56) {
|
|
18066
18063
|
}
|
|
18067
18064
|
});
|
|
18068
18065
|
subscriptionRefs.current.clear();
|
|
18069
|
-
_optionalChain([abortControllerRef, 'access',
|
|
18066
|
+
_optionalChain([abortControllerRef, 'access', _577 => _577.current, 'optionalAccess', _578 => _578.abort, 'call', _579 => _579()]);
|
|
18070
18067
|
}
|
|
18071
18068
|
abortControllerRef.current = new AbortController();
|
|
18072
18069
|
const abort = abortControllerRef.current;
|
|
@@ -18096,7 +18093,7 @@ function useNatsDialogSubscription({
|
|
|
18096
18093
|
});
|
|
18097
18094
|
lastSubscribedDialogIdRef.current = dialogId;
|
|
18098
18095
|
setIsSubscribed(true);
|
|
18099
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
18096
|
+
_optionalChain([onSubscribedRef, 'access', _580 => _580.current, 'optionalCall', _581 => _581()]);
|
|
18100
18097
|
};
|
|
18101
18098
|
if (isConnectedRef.current) {
|
|
18102
18099
|
createSubscriptions();
|
|
@@ -18107,7 +18104,7 @@ function useNatsDialogSubscription({
|
|
|
18107
18104
|
abort.abort();
|
|
18108
18105
|
subscriptions.forEach((sub) => {
|
|
18109
18106
|
try {
|
|
18110
|
-
_optionalChain([sub, 'optionalAccess',
|
|
18107
|
+
_optionalChain([sub, 'optionalAccess', _582 => _582.unsubscribe, 'call', _583 => _583()]);
|
|
18111
18108
|
} catch (e58) {
|
|
18112
18109
|
}
|
|
18113
18110
|
});
|
|
@@ -18146,7 +18143,7 @@ function useNatsDialogSubscription({
|
|
|
18146
18143
|
});
|
|
18147
18144
|
lastSubscribedDialogIdRef.current = currentDialogId;
|
|
18148
18145
|
setIsSubscribed(true);
|
|
18149
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
18146
|
+
_optionalChain([onSubscribedRef, 'access', _584 => _584.current, 'optionalCall', _585 => _585()]);
|
|
18150
18147
|
} else if (subscriptionRefs.current.size > 0) {
|
|
18151
18148
|
setIsSubscribed(true);
|
|
18152
18149
|
}
|
|
@@ -18154,10 +18151,10 @@ function useNatsDialogSubscription({
|
|
|
18154
18151
|
return { isConnected, isSubscribed, reconnectionCount };
|
|
18155
18152
|
}
|
|
18156
18153
|
function buildNatsWsUrl(apiBaseUrl, options) {
|
|
18157
|
-
const path = _optionalChain([options, 'optionalAccess',
|
|
18154
|
+
const path = _optionalChain([options, 'optionalAccess', _586 => _586.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
|
|
18158
18155
|
const u = new URL(path, apiBaseUrl);
|
|
18159
18156
|
u.protocol = u.protocol === "https:" ? "wss:" : "ws:";
|
|
18160
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
18157
|
+
if (_optionalChain([options, 'optionalAccess', _587 => _587.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _588 => _588.token])) {
|
|
18161
18158
|
u.searchParams.set("authorization", options.token);
|
|
18162
18159
|
}
|
|
18163
18160
|
return u.toString();
|
|
@@ -18175,7 +18172,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
18175
18172
|
const data = await res.json();
|
|
18176
18173
|
return _nullishCoalesce(data.commands, () => ( []));
|
|
18177
18174
|
} catch (err) {
|
|
18178
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
18175
|
+
if (_optionalChain([err, 'optionalAccess', _589 => _589.name]) === "AbortError") throw err;
|
|
18179
18176
|
console.warn("[chat] slash-commands fetch failed, showing none:", err);
|
|
18180
18177
|
return [];
|
|
18181
18178
|
}
|
|
@@ -18183,8 +18180,8 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
18183
18180
|
var NO_COMMANDS = [];
|
|
18184
18181
|
function useSlashCommands(prefix, commandsUrl) {
|
|
18185
18182
|
const [answered, setAnswered] = _react.useState.call(void 0, null);
|
|
18186
|
-
const commands = prefix != null && _optionalChain([answered, 'optionalAccess',
|
|
18187
|
-
const loading = prefix != null && _optionalChain([answered, 'optionalAccess',
|
|
18183
|
+
const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _590 => _590.prefix]) === prefix ? answered.commands : NO_COMMANDS;
|
|
18184
|
+
const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _591 => _591.prefix]) !== prefix;
|
|
18188
18185
|
_react.useEffect.call(void 0, () => {
|
|
18189
18186
|
if (prefix == null) return void 0;
|
|
18190
18187
|
let cancelled = false;
|
|
@@ -18194,7 +18191,7 @@ function useSlashCommands(prefix, commandsUrl) {
|
|
|
18194
18191
|
const next = await fetchSlashCommands(prefix, ctrl.signal, commandsUrl);
|
|
18195
18192
|
if (!cancelled) setAnswered({ prefix, commands: next });
|
|
18196
18193
|
} catch (err) {
|
|
18197
|
-
if (!cancelled && _optionalChain([err, 'optionalAccess',
|
|
18194
|
+
if (!cancelled && _optionalChain([err, 'optionalAccess', _592 => _592.name]) !== "AbortError") {
|
|
18198
18195
|
console.warn("[use-slash-commands] fetch failed:", err);
|
|
18199
18196
|
setAnswered({ prefix, commands: NO_COMMANDS });
|
|
18200
18197
|
}
|
|
@@ -18217,7 +18214,7 @@ function useSlashCommandRegistry(commandsUrl, options) {
|
|
|
18217
18214
|
const query = _reactquery.useQuery.call(void 0, {
|
|
18218
18215
|
queryKey: ["chat-slash-commands", commandsUrl],
|
|
18219
18216
|
queryFn: ({ signal }) => fetchSlashCommands("", signal, commandsUrl),
|
|
18220
|
-
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
18217
|
+
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _593 => _593.enabled]), () => ( true)),
|
|
18221
18218
|
staleTime: Infinity,
|
|
18222
18219
|
gcTime: Infinity,
|
|
18223
18220
|
// The commands registry is non-critical chrome — a failure degrades to an
|
|
@@ -18256,21 +18253,21 @@ async function fetchEmptyStateConfig(signal, emptyStateUrl) {
|
|
|
18256
18253
|
}
|
|
18257
18254
|
const data = await res.json();
|
|
18258
18255
|
return {
|
|
18259
|
-
name: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
18260
|
-
icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
18261
|
-
greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
18262
|
-
enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
18263
|
-
quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
18264
|
-
suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
18256
|
+
name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _594 => _594.name]), () => ( null)),
|
|
18257
|
+
icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _595 => _595.icon]), () => ( null)),
|
|
18258
|
+
greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _596 => _596.greeting]), () => ( null)),
|
|
18259
|
+
enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _597 => _597.enabledRagTableIds]), () => ( [])),
|
|
18260
|
+
quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _598 => _598.quickActions]), () => ( [])),
|
|
18261
|
+
suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _599 => _599.suggestedQueries]), () => ( []))
|
|
18265
18262
|
};
|
|
18266
18263
|
} catch (err) {
|
|
18267
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
18264
|
+
if (_optionalChain([err, 'optionalAccess', _600 => _600.name]) === "AbortError") throw err;
|
|
18268
18265
|
console.warn("[chat] empty-state config fetch failed, using neutral defaults:", err);
|
|
18269
18266
|
return EMPTY_STATE_FALLBACK;
|
|
18270
18267
|
}
|
|
18271
18268
|
}
|
|
18272
18269
|
function useEmptyStateConfig(emptyStateUrl, options) {
|
|
18273
|
-
const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
18270
|
+
const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _601 => _601.enabled]), () => ( true))) && !!emptyStateUrl;
|
|
18274
18271
|
const query = _reactquery.useQuery.call(void 0, {
|
|
18275
18272
|
queryKey: ["chat-empty-state", emptyStateUrl],
|
|
18276
18273
|
queryFn: ({ signal }) => fetchEmptyStateConfig(signal, emptyStateUrl),
|
|
@@ -18299,7 +18296,7 @@ var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
|
|
|
18299
18296
|
var STORAGE_CACHE_CONTROL_IMMUTABLE = "public, max-age=31536000, immutable";
|
|
18300
18297
|
function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
18301
18298
|
return new Promise((resolve, reject) => {
|
|
18302
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
18299
|
+
if (_optionalChain([signal, 'optionalAccess', _602 => _602.aborted])) {
|
|
18303
18300
|
reject(new Error("Upload cancelled"));
|
|
18304
18301
|
return;
|
|
18305
18302
|
}
|
|
@@ -18341,7 +18338,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
18341
18338
|
const handleSignalAbort = () => {
|
|
18342
18339
|
xhr.abort();
|
|
18343
18340
|
};
|
|
18344
|
-
_optionalChain([signal, 'optionalAccess',
|
|
18341
|
+
_optionalChain([signal, 'optionalAccess', _603 => _603.addEventListener, 'call', _604 => _604("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
|
|
18345
18342
|
xhr.upload.addEventListener("progress", handleProgress, { signal: listeners.signal });
|
|
18346
18343
|
xhr.addEventListener("load", handleLoad, { signal: listeners.signal });
|
|
18347
18344
|
xhr.addEventListener("error", handleError, { signal: listeners.signal });
|
|
@@ -18385,10 +18382,10 @@ function useChatAttachments() {
|
|
|
18385
18382
|
try {
|
|
18386
18383
|
sniffed = await _filetype.fileTypeFromBlob.call(void 0, att.file);
|
|
18387
18384
|
} catch (err) {
|
|
18388
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
18385
|
+
if (_optionalChain([ctrl, 'optionalAccess', _605 => _605.signal, 'access', _606 => _606.aborted])) return;
|
|
18389
18386
|
throw new Error(`Could not read file content: ${err instanceof Error ? err.message : String(err)}`);
|
|
18390
18387
|
}
|
|
18391
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
18388
|
+
if (_optionalChain([ctrl, 'optionalAccess', _607 => _607.signal, 'access', _608 => _608.aborted])) return;
|
|
18392
18389
|
if (!sniffed) {
|
|
18393
18390
|
throw new Error("Unrecognized file format");
|
|
18394
18391
|
}
|
|
@@ -18402,7 +18399,7 @@ function useChatAttachments() {
|
|
|
18402
18399
|
const urlResp = await _chunkMNFV4YLKcjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
|
|
18403
18400
|
method: "POST",
|
|
18404
18401
|
headers: { "Content-Type": "application/json" },
|
|
18405
|
-
signal: _optionalChain([ctrl, 'optionalAccess',
|
|
18402
|
+
signal: _optionalChain([ctrl, 'optionalAccess', _609 => _609.signal]),
|
|
18406
18403
|
body: JSON.stringify({
|
|
18407
18404
|
fileName: att.file.name,
|
|
18408
18405
|
// Pass the SNIFFED MIME (not `file.type`, which can be a
|
|
@@ -18431,9 +18428,9 @@ function useChatAttachments() {
|
|
|
18431
18428
|
(pct) => {
|
|
18432
18429
|
updateOne(att.id, { progress: pct });
|
|
18433
18430
|
},
|
|
18434
|
-
_optionalChain([ctrl, 'optionalAccess',
|
|
18431
|
+
_optionalChain([ctrl, 'optionalAccess', _610 => _610.signal])
|
|
18435
18432
|
);
|
|
18436
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
18433
|
+
if (_optionalChain([ctrl, 'optionalAccess', _611 => _611.signal, 'access', _612 => _612.aborted])) return;
|
|
18437
18434
|
updateOne(att.id, {
|
|
18438
18435
|
status: "ready",
|
|
18439
18436
|
progress: 100,
|
|
@@ -18441,7 +18438,7 @@ function useChatAttachments() {
|
|
|
18441
18438
|
viewToken: mintData.viewToken
|
|
18442
18439
|
});
|
|
18443
18440
|
} catch (err) {
|
|
18444
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
18441
|
+
if (_optionalChain([ctrl, 'optionalAccess', _613 => _613.signal, 'access', _614 => _614.aborted])) return;
|
|
18445
18442
|
const message = err instanceof Error ? err.message : String(err);
|
|
18446
18443
|
updateOne(att.id, { status: "error", progress: 0, errorMessage: message });
|
|
18447
18444
|
} finally {
|
|
@@ -18590,11 +18587,11 @@ var ANON_DEFAULTS = {
|
|
|
18590
18587
|
function useResolveChatIdentity(enabled) {
|
|
18591
18588
|
const runtime = _chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, );
|
|
18592
18589
|
const url = runtime.endpoints.identityUrl;
|
|
18593
|
-
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkMNFV4YLKcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess',
|
|
18590
|
+
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkMNFV4YLKcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _615 => _615.email]), () => ( null));
|
|
18594
18591
|
const requestKey = enabled ? `${url}\0${_nullishCoalesce(proxyEmail, () => ( ""))}` : null;
|
|
18595
18592
|
const [resolved, setResolved] = _react.useState.call(void 0, null);
|
|
18596
|
-
const data = _optionalChain([resolved, 'optionalAccess',
|
|
18597
|
-
const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess',
|
|
18593
|
+
const data = _optionalChain([resolved, 'optionalAccess', _616 => _616.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
|
|
18594
|
+
const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _617 => _617.key]) !== requestKey;
|
|
18598
18595
|
_react.useEffect.call(void 0, () => {
|
|
18599
18596
|
if (requestKey === null) return void 0;
|
|
18600
18597
|
let cancelled = false;
|
|
@@ -18741,7 +18738,7 @@ function useChat({
|
|
|
18741
18738
|
onMessagesChangeRef.current = onMessagesChange;
|
|
18742
18739
|
});
|
|
18743
18740
|
_react.useEffect.call(void 0, () => {
|
|
18744
|
-
_optionalChain([onMessagesChangeRef, 'access',
|
|
18741
|
+
_optionalChain([onMessagesChangeRef, 'access', _618 => _618.current, 'optionalCall', _619 => _619(messages)]);
|
|
18745
18742
|
}, [messages]);
|
|
18746
18743
|
const {
|
|
18747
18744
|
streamMessage,
|
|
@@ -18778,7 +18775,7 @@ function useChat({
|
|
|
18778
18775
|
name: "You",
|
|
18779
18776
|
content: text2,
|
|
18780
18777
|
timestamp: /* @__PURE__ */ new Date(),
|
|
18781
|
-
..._optionalChain([options, 'optionalAccess',
|
|
18778
|
+
..._optionalChain([options, 'optionalAccess', _620 => _620.hidden]) ? { hidden: true } : {}
|
|
18782
18779
|
};
|
|
18783
18780
|
addMessage(userMessage);
|
|
18784
18781
|
setIsTyping(true);
|
|
@@ -18992,7 +18989,7 @@ function buildConfirmToolBody(request) {
|
|
|
18992
18989
|
async function readServerErrorMessage(response) {
|
|
18993
18990
|
try {
|
|
18994
18991
|
const body = await response.json();
|
|
18995
|
-
if (typeof _optionalChain([body, 'optionalAccess',
|
|
18992
|
+
if (typeof _optionalChain([body, 'optionalAccess', _621 => _621.error]) === "string" && body.error.length > 0) return body.error;
|
|
18996
18993
|
} catch (e60) {
|
|
18997
18994
|
}
|
|
18998
18995
|
return null;
|
|
@@ -19320,7 +19317,7 @@ function youtubeVideoId(value) {
|
|
|
19320
19317
|
const hostname = parsed.hostname.toLowerCase();
|
|
19321
19318
|
const isYoutubeHost = hostname === "youtu.be" || hostname === "youtube.com" || hostname.endsWith(".youtube.com");
|
|
19322
19319
|
if (!isYoutubeHost) return void 0;
|
|
19323
|
-
const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access',
|
|
19320
|
+
const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access', _622 => _622.exec, 'call', _623 => _623(parsed.pathname), 'optionalAccess', _624 => _624[1]]);
|
|
19324
19321
|
const id = _nullishCoalesce(_nullishCoalesce(fromPath, () => ( parsed.searchParams.get("v"))), () => ( void 0));
|
|
19325
19322
|
return id && YOUTUBE_ID.test(id) ? id : void 0;
|
|
19326
19323
|
}
|
|
@@ -19439,11 +19436,11 @@ function cards(value, decodedSources) {
|
|
|
19439
19436
|
{
|
|
19440
19437
|
type,
|
|
19441
19438
|
id,
|
|
19442
|
-
title: _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
19443
|
-
url: _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
19444
|
-
..._optionalChain([source, 'optionalAccess',
|
|
19445
|
-
..._optionalChain([source, 'optionalAccess',
|
|
19446
|
-
..._optionalChain([source, 'optionalAccess',
|
|
19439
|
+
title: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _625 => _625.name]), () => ( id)),
|
|
19440
|
+
url: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _626 => _626.externalUrl]), () => ( null)),
|
|
19441
|
+
..._optionalChain([source, 'optionalAccess', _627 => _627.sourceRepo]) ? { sourceRepo: source.sourceRepo } : {},
|
|
19442
|
+
..._optionalChain([source, 'optionalAccess', _628 => _628.targetPlatform]) !== void 0 ? { targetPlatform: source.targetPlatform } : {},
|
|
19443
|
+
..._optionalChain([source, 'optionalAccess', _629 => _629.path]) ? { metadata: { path: source.path } } : {}
|
|
19447
19444
|
}
|
|
19448
19445
|
];
|
|
19449
19446
|
});
|
|
@@ -19469,11 +19466,11 @@ function sourceMetadataEvent(payload) {
|
|
|
19469
19466
|
}
|
|
19470
19467
|
function mergeSourceMetadata(previous, event) {
|
|
19471
19468
|
const byIndex = /* @__PURE__ */ new Map();
|
|
19472
|
-
for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess',
|
|
19469
|
+
for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _630 => _630.sources]), () => ( [])), ..._nullishCoalesce(event.sources, () => ( []))]) {
|
|
19473
19470
|
if (!byIndex.has(source.index)) byIndex.set(source.index, source);
|
|
19474
19471
|
}
|
|
19475
19472
|
const byIdentity = /* @__PURE__ */ new Map();
|
|
19476
|
-
for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess',
|
|
19473
|
+
for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _631 => _631.refs]), () => ( [])), ..._nullishCoalesce(event.refs, () => ( []))]) {
|
|
19477
19474
|
const identity = `${ref.type}:${ref.id}`;
|
|
19478
19475
|
if (!byIdentity.has(identity)) byIdentity.set(identity, ref);
|
|
19479
19476
|
}
|
|
@@ -19559,9 +19556,9 @@ function appendToTrailingAssistant(prev, segments) {
|
|
|
19559
19556
|
for (const seg of segments) {
|
|
19560
19557
|
const tail = merged[merged.length - 1];
|
|
19561
19558
|
const key = upsertKey(seg);
|
|
19562
|
-
if (seg.type === "text" && _optionalChain([tail, 'optionalAccess',
|
|
19559
|
+
if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _632 => _632.type]) === "text") {
|
|
19563
19560
|
merged[merged.length - 1] = { type: "text", text: tail.text + seg.text };
|
|
19564
|
-
} else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess',
|
|
19561
|
+
} else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _633 => _633.type]) === "thinking") {
|
|
19565
19562
|
merged[merged.length - 1] = { type: "thinking", text: tail.text + seg.text };
|
|
19566
19563
|
} else if (key) {
|
|
19567
19564
|
let idx = merged.findIndex((m) => upsertKey(m) === key);
|
|
@@ -19602,7 +19599,7 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
|
|
|
19602
19599
|
}
|
|
19603
19600
|
if (s.type !== "approval_batch") return s;
|
|
19604
19601
|
const isAnchor = s.data.approvalRequestId === requestId;
|
|
19605
|
-
const hasRow = _optionalChain([s, 'access',
|
|
19602
|
+
const hasRow = _optionalChain([s, 'access', _634 => _634.data, 'access', _635 => _635.toolCalls, 'optionalAccess', _636 => _636.some, 'call', _637 => _637((c) => c.toolExecutionRequestId === requestId)]);
|
|
19606
19603
|
if (!isAnchor && !hasRow) return s;
|
|
19607
19604
|
const nextResolvedBy = _nullishCoalesce(resolvedByName, () => ( s.resolvedByName));
|
|
19608
19605
|
const nextExecutions = hasRow ? {
|
|
@@ -19624,8 +19621,8 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
|
|
|
19624
19621
|
};
|
|
19625
19622
|
}
|
|
19626
19623
|
function nextBatchExecution(prevExec, toolData) {
|
|
19627
|
-
if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess',
|
|
19628
|
-
return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess',
|
|
19624
|
+
if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _638 => _638.status]) === "done") return null;
|
|
19625
|
+
return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _639 => _639.result]), success: _optionalChain([prevExec, 'optionalAccess', _640 => _640.success]) };
|
|
19629
19626
|
}
|
|
19630
19627
|
function withBatchExecution(seg, execId, state) {
|
|
19631
19628
|
return {
|
|
@@ -19642,11 +19639,11 @@ function projectBatchStatusToMessages(prev, anchorId, status) {
|
|
|
19642
19639
|
}
|
|
19643
19640
|
function projectBatchRowFailureToMessages(prev, rowRequestId) {
|
|
19644
19641
|
return mapSegments(prev, (s) => {
|
|
19645
|
-
if (s.type !== "approval_batch" || !_optionalChain([s, 'access',
|
|
19642
|
+
if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _641 => _641.data, 'access', _642 => _642.toolCalls, 'optionalAccess', _643 => _643.some, 'call', _644 => _644((c) => c.toolExecutionRequestId === rowRequestId)])) {
|
|
19646
19643
|
return s;
|
|
19647
19644
|
}
|
|
19648
|
-
const existing = _optionalChain([s, 'access',
|
|
19649
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
19645
|
+
const existing = _optionalChain([s, 'access', _645 => _645.data, 'access', _646 => _646.executions, 'optionalAccess', _647 => _647[rowRequestId]]);
|
|
19646
|
+
if (_optionalChain([existing, 'optionalAccess', _648 => _648.status]) === "done") return s;
|
|
19650
19647
|
return withBatchExecution(s, rowRequestId, { status: "done", success: false });
|
|
19651
19648
|
});
|
|
19652
19649
|
}
|
|
@@ -19682,7 +19679,7 @@ function mergeToolExecutionIfPresent(prev, segment) {
|
|
|
19682
19679
|
for (let j = message.segments.length - 1; j >= 0; j--) {
|
|
19683
19680
|
const seg = message.segments[j];
|
|
19684
19681
|
if (execId && seg.type === "approval_batch" && seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId)) {
|
|
19685
|
-
const prevExec = _optionalChain([seg, 'access',
|
|
19682
|
+
const prevExec = _optionalChain([seg, 'access', _649 => _649.data, 'access', _650 => _650.executions, 'optionalAccess', _651 => _651[execId]]);
|
|
19686
19683
|
const nextExec = nextBatchExecution(prevExec, toolData);
|
|
19687
19684
|
if (nextExec === null) return prev;
|
|
19688
19685
|
if (sameExecutionState(prevExec, nextExec)) return prev;
|
|
@@ -19855,9 +19852,9 @@ var MessageSegmentAccumulator = class {
|
|
|
19855
19852
|
type: "tool_execution",
|
|
19856
19853
|
data: {
|
|
19857
19854
|
...toolData,
|
|
19858
|
-
toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess',
|
|
19859
|
-
toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess',
|
|
19860
|
-
parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess',
|
|
19855
|
+
toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _652 => _652.data, 'access', _653 => _653.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _654 => _654.toolTitle]))),
|
|
19856
|
+
toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _655 => _655.data, 'access', _656 => _656.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _657 => _657.toolExplanation]))),
|
|
19857
|
+
parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _658 => _658.parameters])
|
|
19861
19858
|
}
|
|
19862
19859
|
};
|
|
19863
19860
|
if (existingIndex !== -1) {
|
|
@@ -19881,7 +19878,7 @@ var MessageSegmentAccumulator = class {
|
|
|
19881
19878
|
if (seg.type !== "approval_batch") return seg;
|
|
19882
19879
|
const hasCall = seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId);
|
|
19883
19880
|
if (!hasCall) return seg;
|
|
19884
|
-
const prev = _optionalChain([seg, 'access',
|
|
19881
|
+
const prev = _optionalChain([seg, 'access', _659 => _659.data, 'access', _660 => _660.executions, 'optionalAccess', _661 => _661[execId]]);
|
|
19885
19882
|
const next = nextBatchExecution(prev, toolData);
|
|
19886
19883
|
matched = true;
|
|
19887
19884
|
if (next === null) return seg;
|
|
@@ -20015,8 +20012,8 @@ var MessageSegmentAccumulator = class {
|
|
|
20015
20012
|
requestId,
|
|
20016
20013
|
{
|
|
20017
20014
|
...pendingApproval,
|
|
20018
|
-
command: _optionalChain([pendingApproval, 'optionalAccess',
|
|
20019
|
-
approvalType: _optionalChain([pendingApproval, 'optionalAccess',
|
|
20015
|
+
command: _optionalChain([pendingApproval, 'optionalAccess', _662 => _662.command]) || "",
|
|
20016
|
+
approvalType: _optionalChain([pendingApproval, 'optionalAccess', _663 => _663.approvalType]) || approvalType
|
|
20020
20017
|
},
|
|
20021
20018
|
status
|
|
20022
20019
|
);
|
|
@@ -20041,9 +20038,9 @@ var MessageSegmentAccumulator = class {
|
|
|
20041
20038
|
type: "escalation_offer",
|
|
20042
20039
|
// The resolved chunk carries no text/origin — a redelivered offer must
|
|
20043
20040
|
// not blank the card the PENDING chunk already painted.
|
|
20044
|
-
data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess',
|
|
20041
|
+
data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess', _664 => _664.data, 'access', _665 => _665.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _666 => _666.data, 'access', _667 => _667.origin]))) },
|
|
20045
20042
|
status,
|
|
20046
|
-
resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess',
|
|
20043
|
+
resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _668 => _668.resolvedByName]))),
|
|
20047
20044
|
onApprove: this.callbacks.onEscalationApprove,
|
|
20048
20045
|
onReject: this.callbacks.onEscalationReject
|
|
20049
20046
|
};
|
|
@@ -20369,7 +20366,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
20369
20366
|
let stateCache = null;
|
|
20370
20367
|
function invalidate() {
|
|
20371
20368
|
stateCache = null;
|
|
20372
|
-
_optionalChain([onChange, 'optionalCall',
|
|
20369
|
+
_optionalChain([onChange, 'optionalCall', _669 => _669()]);
|
|
20373
20370
|
}
|
|
20374
20371
|
function getState() {
|
|
20375
20372
|
if (!stateCache) {
|
|
@@ -20387,7 +20384,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
20387
20384
|
return stateCache;
|
|
20388
20385
|
}
|
|
20389
20386
|
function emit(name, ...args) {
|
|
20390
|
-
_optionalChain([onEffect, 'optionalCall',
|
|
20387
|
+
_optionalChain([onEffect, 'optionalCall', _670 => _670({ name, args })]);
|
|
20391
20388
|
}
|
|
20392
20389
|
function setMessagesInternal(next) {
|
|
20393
20390
|
if (next !== messages) {
|
|
@@ -20430,12 +20427,12 @@ function createChatStreamReducer(options = {}) {
|
|
|
20430
20427
|
return stampTrailingAssistantSourceMetadata(stampTrailingAssistantSeq(next, seq));
|
|
20431
20428
|
}
|
|
20432
20429
|
function applySegmentsToState(segments, meta) {
|
|
20433
|
-
const seq = _optionalChain([meta, 'optionalAccess',
|
|
20434
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
20430
|
+
const seq = _optionalChain([meta, 'optionalAccess', _671 => _671.streamSeq]);
|
|
20431
|
+
if (_optionalChain([meta, 'optionalAccess', _672 => _672.append]) && meta.isCompacting) {
|
|
20435
20432
|
setMessagesInternal(commitTrailingAssistant(upsertTrailingCompaction(messages, segments), seq));
|
|
20436
20433
|
return;
|
|
20437
20434
|
}
|
|
20438
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
20435
|
+
if (_optionalChain([meta, 'optionalAccess', _673 => _673.append])) {
|
|
20439
20436
|
setMessagesInternal(commitTrailingAssistant(appendToTrailingAssistant(messages, segments), seq));
|
|
20440
20437
|
return;
|
|
20441
20438
|
}
|
|
@@ -20447,7 +20444,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
20447
20444
|
adoptTrailingAssistant = false;
|
|
20448
20445
|
const last = messages[messages.length - 1];
|
|
20449
20446
|
if (!last || last.role !== "assistant" || adoptTail) return;
|
|
20450
|
-
const hasContent = (_nullishCoalesce(_optionalChain([last, 'access',
|
|
20447
|
+
const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _674 => _674.segments, 'optionalAccess', _675 => _675.length]), () => ( 0))) > 0 || last.content !== "";
|
|
20451
20448
|
if (!hasContent) return;
|
|
20452
20449
|
setMessagesInternal([...messages, { id: nextId("assistant"), role: "assistant", content: "", segments: [] }]);
|
|
20453
20450
|
}
|
|
@@ -20666,13 +20663,13 @@ function createChatStreamReducer(options = {}) {
|
|
|
20666
20663
|
const summary = required ? getCommandText(required) : `Batch of ${toolCalls.length} tool calls`;
|
|
20667
20664
|
pendingEscalated.set(requestId, {
|
|
20668
20665
|
command: summary,
|
|
20669
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
20666
|
+
explanation: _optionalChain([required, 'optionalAccess', _676 => _676.toolExplanation]),
|
|
20670
20667
|
approvalType,
|
|
20671
20668
|
toolCalls
|
|
20672
20669
|
});
|
|
20673
20670
|
emit("onEscalatedApproval", requestId, {
|
|
20674
20671
|
command: summary,
|
|
20675
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
20672
|
+
explanation: _optionalChain([required, 'optionalAccess', _677 => _677.toolExplanation]),
|
|
20676
20673
|
approvalType
|
|
20677
20674
|
});
|
|
20678
20675
|
break;
|
|
@@ -21060,7 +21057,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
21060
21057
|
const resolveBatch = (status, confirm) => async () => {
|
|
21061
21058
|
setMessagesInternal(projectBatchStatusToMessages(messages, anchorId, status));
|
|
21062
21059
|
for (const id of ids) {
|
|
21063
|
-
const ok = await _optionalChain([confirm, 'optionalCall',
|
|
21060
|
+
const ok = await _optionalChain([confirm, 'optionalCall', _678 => _678(id)]);
|
|
21064
21061
|
if (ok === false) {
|
|
21065
21062
|
setMessagesInternal(projectBatchRowFailureToMessages(messages, id));
|
|
21066
21063
|
}
|
|
@@ -21196,8 +21193,8 @@ function createChatStreamReducer(options = {}) {
|
|
|
21196
21193
|
}
|
|
21197
21194
|
}
|
|
21198
21195
|
}
|
|
21199
|
-
hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess',
|
|
21200
|
-
if (_optionalChain([extras, 'optionalAccess',
|
|
21196
|
+
hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _679 => _679.resumed]), () => ( messages.length > 0)));
|
|
21197
|
+
if (_optionalChain([extras, 'optionalAccess', _680 => _680.agentBusy])) agentBusyState();
|
|
21201
21198
|
invalidate();
|
|
21202
21199
|
}
|
|
21203
21200
|
return {
|
|
@@ -21284,7 +21281,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
21284
21281
|
},
|
|
21285
21282
|
endSseTurn() {
|
|
21286
21283
|
const last = messages[messages.length - 1];
|
|
21287
|
-
if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access',
|
|
21284
|
+
if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _681 => _681.segments, 'optionalAccess', _682 => _682.length]), () => ( 0))) === 0 && last.content === "") {
|
|
21288
21285
|
messages = messages.slice(0, -1);
|
|
21289
21286
|
}
|
|
21290
21287
|
sseCurrentText = "";
|
|
@@ -21438,10 +21435,10 @@ function createChatDialogStore(options = {}) {
|
|
|
21438
21435
|
if (onEvict) {
|
|
21439
21436
|
const sep = key.indexOf(KEY_SEP);
|
|
21440
21437
|
onEvict(key.slice(0, sep), key.slice(sep + 1), {
|
|
21441
|
-
messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
21442
|
-
approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
21443
|
-
lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
21444
|
-
pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
21438
|
+
messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _683 => _683.state, 'access', _684 => _684.messages]), () => ( EMPTY_STATE.messages)),
|
|
21439
|
+
approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _685 => _685.state, 'access', _686 => _686.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
|
|
21440
|
+
lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _687 => _687.getLastAppliedSeq, 'call', _688 => _688()]), () => ( Number.NEGATIVE_INFINITY)),
|
|
21441
|
+
pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _689 => _689.getPendingEchoes, 'call', _690 => _690()]), () => ( EMPTY_PENDING_ECHOES))
|
|
21445
21442
|
});
|
|
21446
21443
|
}
|
|
21447
21444
|
}
|
|
@@ -21451,12 +21448,12 @@ function createChatDialogStore(options = {}) {
|
|
|
21451
21448
|
const key = keyOf(dialogId, side);
|
|
21452
21449
|
let reducer = reducers.get(key);
|
|
21453
21450
|
if (!reducer) {
|
|
21454
|
-
const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall',
|
|
21451
|
+
const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _691 => _691(dialogId, side)]), () => ( {}));
|
|
21455
21452
|
const userOnChange = base.onChange;
|
|
21456
21453
|
reducer = createChatStreamReducer({
|
|
21457
21454
|
...base,
|
|
21458
21455
|
onChange: () => {
|
|
21459
|
-
_optionalChain([userOnChange, 'optionalCall',
|
|
21456
|
+
_optionalChain([userOnChange, 'optionalCall', _692 => _692()]);
|
|
21460
21457
|
notify();
|
|
21461
21458
|
}
|
|
21462
21459
|
});
|
|
@@ -21501,7 +21498,7 @@ function createChatDialogStore(options = {}) {
|
|
|
21501
21498
|
};
|
|
21502
21499
|
}
|
|
21503
21500
|
function getSnapshot2(dialogId, side = DEFAULT_DIALOG_SIDE) {
|
|
21504
|
-
return _nullishCoalesce(_optionalChain([reducers, 'access',
|
|
21501
|
+
return _nullishCoalesce(_optionalChain([reducers, 'access', _693 => _693.get, 'call', _694 => _694(keyOf(dialogId, side)), 'optionalAccess', _695 => _695.state]), () => ( EMPTY_STATE));
|
|
21505
21502
|
}
|
|
21506
21503
|
function getServerSnapshot2() {
|
|
21507
21504
|
return EMPTY_STATE;
|
|
@@ -21593,7 +21590,7 @@ function createDeltaBatcher({
|
|
|
21593
21590
|
pending = [];
|
|
21594
21591
|
const key = pendingKey;
|
|
21595
21592
|
for (const delta of batch) applyOne(delta, key);
|
|
21596
|
-
_optionalChain([onFlushed, 'optionalCall',
|
|
21593
|
+
_optionalChain([onFlushed, 'optionalCall', _696 => _696(batch.length)]);
|
|
21597
21594
|
}
|
|
21598
21595
|
function schedule() {
|
|
21599
21596
|
if (raf !== null || timer !== null) return;
|
|
@@ -21617,7 +21614,7 @@ function createDeltaBatcher({
|
|
|
21617
21614
|
}
|
|
21618
21615
|
if (!isDeltaEvent(event)) return false;
|
|
21619
21616
|
const tail = pending[pending.length - 1];
|
|
21620
|
-
const seqAdvances = _optionalChain([tail, 'optionalAccess',
|
|
21617
|
+
const seqAdvances = _optionalChain([tail, 'optionalAccess', _697 => _697.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
|
|
21621
21618
|
if (tail && seqAdvances && tail.type === event.type && (tail.type !== "text-delta" || tail.leading === event.leading)) {
|
|
21622
21619
|
pending[pending.length - 1] = {
|
|
21623
21620
|
...tail,
|
|
@@ -21648,7 +21645,7 @@ function useChatStreamReducer({
|
|
|
21648
21645
|
side = DEFAULT_DIALOG_SIDE,
|
|
21649
21646
|
createReducerOptions
|
|
21650
21647
|
}) {
|
|
21651
|
-
const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall',
|
|
21648
|
+
const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _698 => _698()]), () => ( {})));
|
|
21652
21649
|
const getSnapshot2 = _react.useCallback.call(void 0, () => store.getSnapshot(dialogId, side), [store, dialogId, side]);
|
|
21653
21650
|
const getServerSnapshot2 = _react.useCallback.call(void 0, () => store.getServerSnapshot(), [store]);
|
|
21654
21651
|
const subscribe2 = _react.useCallback.call(void 0, (listener) => store.subscribe(listener), [store]);
|
|
@@ -21687,7 +21684,7 @@ var STORAGE_KEY = "conversation";
|
|
|
21687
21684
|
var namespaceFor = (source) => {
|
|
21688
21685
|
const base = `mingo-chat-${source}`;
|
|
21689
21686
|
const auth = _chunkMNFV4YLKcjs.getEmbedProxyAuth.call(void 0, );
|
|
21690
|
-
return _optionalChain([auth, 'optionalAccess',
|
|
21687
|
+
return _optionalChain([auth, 'optionalAccess', _699 => _699.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
|
|
21691
21688
|
};
|
|
21692
21689
|
function createChatConversationStorage(source) {
|
|
21693
21690
|
return _chunkMNFV4YLKcjs.createLocalStorageAdapter.call(void 0, {
|
|
@@ -21799,7 +21796,7 @@ function formatSingularLookupInvocation(cmdId, value) {
|
|
|
21799
21796
|
return safe ? `/${cmdId} "${safe}"` : `/${cmdId}`;
|
|
21800
21797
|
}
|
|
21801
21798
|
function extractEntityIdFilter(override, expectedTableId) {
|
|
21802
|
-
const f = _optionalChain([override, 'optionalAccess',
|
|
21799
|
+
const f = _optionalChain([override, 'optionalAccess', _700 => _700.entityIdFilter]);
|
|
21803
21800
|
if (!f) return null;
|
|
21804
21801
|
const tableId = typeof f.tableId === "string" ? f.tableId : "";
|
|
21805
21802
|
const id = typeof f.id === "string" ? f.id : "";
|
|
@@ -21838,7 +21835,7 @@ var AUTO_CONTINUATION_DIRECTIVE_PREFIX = "[internal-auto-continuation]";
|
|
|
21838
21835
|
function buildAutoContinuationDirective(toolName, opts = {}) {
|
|
21839
21836
|
const ticketRef = opts.ticketId ? ` (ticket #${opts.ticketId})` : "";
|
|
21840
21837
|
const ticketHash = opts.ticketId ? ` #${opts.ticketId}` : "";
|
|
21841
|
-
const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access',
|
|
21838
|
+
const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access', _701 => _701.status, 'optionalAccess', _702 => _702.toUpperCase, 'call', _703 => _703()]) === "CLOSED";
|
|
21842
21839
|
if (toolName === "create_ticket") {
|
|
21843
21840
|
return `${AUTO_CONTINUATION_DIRECTIVE_PREFIX} The user just approved create_ticket${ticketRef}. Per ticket-protocol \xA71a, ask 2-4 SHORT, issue-specific diagnostic follow-up questions tailored to the symptom they reported in their original message. When they answer, propose an update_ticket with content_addendum carrying a clean Q&A digest. Do NOT call any tool in this turn \u2014 just write the questions as prose.`;
|
|
21844
21841
|
}
|
|
@@ -21888,7 +21885,7 @@ function useChatHistoryHydration({
|
|
|
21888
21885
|
if (cancelled) return;
|
|
21889
21886
|
if (rows.length === 0) {
|
|
21890
21887
|
const found = isRecord(body) ? body.found : void 0;
|
|
21891
|
-
if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall',
|
|
21888
|
+
if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall', _704 => _704(conversationId)]);
|
|
21892
21889
|
return;
|
|
21893
21890
|
}
|
|
21894
21891
|
const hydrated = [];
|
|
@@ -22032,7 +22029,7 @@ function useManagedDialogList({
|
|
|
22032
22029
|
try {
|
|
22033
22030
|
await deleteDialogCallback(id);
|
|
22034
22031
|
removeLocal(id);
|
|
22035
|
-
_optionalChain([onDialogRemovedRef, 'access',
|
|
22032
|
+
_optionalChain([onDialogRemovedRef, 'access', _705 => _705.current, 'optionalCall', _706 => _706(id, "deleted")]);
|
|
22036
22033
|
} catch (err) {
|
|
22037
22034
|
console.error(`${logTag} deleteDialog failed:`, err);
|
|
22038
22035
|
throw err;
|
|
@@ -22043,7 +22040,7 @@ function useManagedDialogList({
|
|
|
22043
22040
|
const renameDialog = _react.useCallback.call(void 0,
|
|
22044
22041
|
async (id, title) => {
|
|
22045
22042
|
if (!renameDialogCallback) return;
|
|
22046
|
-
const previous = _optionalChain([dialogsRef, 'access',
|
|
22043
|
+
const previous = _optionalChain([dialogsRef, 'access', _707 => _707.current, 'access', _708 => _708.find, 'call', _709 => _709((d) => d.id === id), 'optionalAccess', _710 => _710.title]);
|
|
22047
22044
|
setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, title } : d));
|
|
22048
22045
|
try {
|
|
22049
22046
|
await renameDialogCallback(id, title);
|
|
@@ -22062,7 +22059,7 @@ function useManagedDialogList({
|
|
|
22062
22059
|
try {
|
|
22063
22060
|
await archiveDialogCallback(id);
|
|
22064
22061
|
removeLocal(id);
|
|
22065
|
-
_optionalChain([onDialogRemovedRef, 'access',
|
|
22062
|
+
_optionalChain([onDialogRemovedRef, 'access', _711 => _711.current, 'optionalCall', _712 => _712(id, "archived")]);
|
|
22066
22063
|
} catch (err) {
|
|
22067
22064
|
console.error(`${logTag} archiveDialog failed:`, err);
|
|
22068
22065
|
throw err;
|
|
@@ -22154,7 +22151,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
22154
22151
|
const { active = true } = runtimeOptions;
|
|
22155
22152
|
const runtime = _chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, );
|
|
22156
22153
|
const source = runtime.source || DEFAULT_CHAT_SOURCE;
|
|
22157
|
-
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
22154
|
+
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _713 => _713.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
|
|
22158
22155
|
const sendMessageRef = _react.useRef.call(void 0,
|
|
22159
22156
|
() => Promise.resolve(true)
|
|
22160
22157
|
);
|
|
@@ -22190,7 +22187,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
22190
22187
|
if (!restoredConversationRef.current) {
|
|
22191
22188
|
restoredConversationRef.current = true;
|
|
22192
22189
|
pruneStaleChatConversationStorage(source);
|
|
22193
|
-
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access',
|
|
22190
|
+
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _714 => _714.load, 'call', _715 => _715(), 'optionalAccess', _716 => _716.conversationId]), () => ( null));
|
|
22194
22191
|
}
|
|
22195
22192
|
const [conversationId, setConversationId] = _react.useState.call(void 0, () => conversationIdRef.current);
|
|
22196
22193
|
const commitConversationId = _react.useCallback.call(void 0,
|
|
@@ -22281,7 +22278,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
22281
22278
|
const abortControllerRef = _react.useRef.call(void 0, null);
|
|
22282
22279
|
const switchConversation = _react.useCallback.call(void 0,
|
|
22283
22280
|
(id) => {
|
|
22284
|
-
_optionalChain([abortControllerRef, 'access',
|
|
22281
|
+
_optionalChain([abortControllerRef, 'access', _717 => _717.current, 'optionalAccess', _718 => _718.abort, 'call', _719 => _719()]);
|
|
22285
22282
|
flushDeltas();
|
|
22286
22283
|
mutate((r) => r.reset());
|
|
22287
22284
|
hydrationSendCountRef.current = 0;
|
|
@@ -22318,8 +22315,8 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
22318
22315
|
} = useManagedDialogList({
|
|
22319
22316
|
autoLoad: active,
|
|
22320
22317
|
fetchDialogs: fetchActiveDialogs,
|
|
22321
|
-
renameDialog: _optionalChain([conversationsApi, 'optionalAccess',
|
|
22322
|
-
archiveDialog: _optionalChain([conversationsApi, 'optionalAccess',
|
|
22318
|
+
renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _720 => _720.renameDialog]),
|
|
22319
|
+
archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _721 => _721.archiveDialog]),
|
|
22323
22320
|
pageSize: 20,
|
|
22324
22321
|
search: conversationsApi ? dialogSearch : void 0,
|
|
22325
22322
|
logTag: "[useSseChatAdapter]",
|
|
@@ -22383,7 +22380,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
22383
22380
|
const serverMessage = await readServerErrorMessage(response);
|
|
22384
22381
|
throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
|
|
22385
22382
|
}
|
|
22386
|
-
const reader = _optionalChain([response, 'access',
|
|
22383
|
+
const reader = _optionalChain([response, 'access', _722 => _722.body, 'optionalAccess', _723 => _723.getReader, 'call', _724 => _724()]);
|
|
22387
22384
|
if (!reader) throw new Error("No response body");
|
|
22388
22385
|
const frameDecoder = createSseFrameDecoder();
|
|
22389
22386
|
let finished = false;
|
|
@@ -22412,7 +22409,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
22412
22409
|
}
|
|
22413
22410
|
return true;
|
|
22414
22411
|
} catch (err) {
|
|
22415
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
22412
|
+
if (_optionalChain([err, 'optionalAccess', _725 => _725.name]) === "AbortError" || ctrl.signal.aborted) {
|
|
22416
22413
|
return true;
|
|
22417
22414
|
}
|
|
22418
22415
|
flushDeltas();
|
|
@@ -22448,7 +22445,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
22448
22445
|
);
|
|
22449
22446
|
sendMessageRef.current = sendMessage;
|
|
22450
22447
|
const stopMessage = _react.useCallback.call(void 0, () => {
|
|
22451
|
-
_optionalChain([abortControllerRef, 'access',
|
|
22448
|
+
_optionalChain([abortControllerRef, 'access', _726 => _726.current, 'optionalAccess', _727 => _727.abort, 'call', _728 => _728()]);
|
|
22452
22449
|
flushDeltas();
|
|
22453
22450
|
mutate((r) => r.setPhase("idle"));
|
|
22454
22451
|
}, [mutate, flushDeltas]);
|
|
@@ -22484,7 +22481,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
22484
22481
|
let sendIdx = -1;
|
|
22485
22482
|
return state.messages.map((m) => {
|
|
22486
22483
|
const segments = m.segments;
|
|
22487
|
-
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess',
|
|
22484
|
+
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _729 => _729.filter, 'call', _730 => _730((s) => s.type === "text"), 'access', _731 => _731.map, 'call', _732 => _732((s) => s.text), 'access', _733 => _733.join, 'call', _734 => _734("")]), () => ( ""));
|
|
22488
22485
|
let sources2;
|
|
22489
22486
|
let scrollAnchor;
|
|
22490
22487
|
if (m.role === "user" && !m.hidden) {
|
|
@@ -22493,7 +22490,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
22493
22490
|
if (m.role === "assistant") {
|
|
22494
22491
|
const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
|
|
22495
22492
|
sources2 = sourcesMap.get(lookupIdx);
|
|
22496
|
-
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access',
|
|
22493
|
+
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _735 => _735.get, 'call', _736 => _736(lookupIdx), 'optionalAccess', _737 => _737.scrollAnchor]), () => ( void 0));
|
|
22497
22494
|
}
|
|
22498
22495
|
return {
|
|
22499
22496
|
id: m.id,
|
|
@@ -22520,7 +22517,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
22520
22517
|
);
|
|
22521
22518
|
return;
|
|
22522
22519
|
}
|
|
22523
|
-
const refSlug = typeof _optionalChain([reference, 'access',
|
|
22520
|
+
const refSlug = typeof _optionalChain([reference, 'access', _738 => _738.metadata, 'optionalAccess', _739 => _739.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
|
|
22524
22521
|
const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
|
|
22525
22522
|
const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
22526
22523
|
const text2 = `/${cmdId} display "${escaped}"`;
|
|
@@ -22568,18 +22565,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
22568
22565
|
/** True while the mount-time rebuild from the server transcript runs. */
|
|
22569
22566
|
isHydratingHistory,
|
|
22570
22567
|
/** Provider key for the lib's `<ModelDisplay>` icon. */
|
|
22571
|
-
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
22572
|
-
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
22573
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
22568
|
+
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _740 => _740.provider]), () => ( null)),
|
|
22569
|
+
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _741 => _741.modelLabel]), () => ( null)),
|
|
22570
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _742 => _742.contextWindowMaxTokens]), () => ( null)),
|
|
22574
22571
|
/** Input tokens (known after server's message_start frame; null until). */
|
|
22575
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
22572
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _743 => _743.inputTokens]), () => ( null)),
|
|
22576
22573
|
/** Output tokens (known only after server's trailing usage frame). */
|
|
22577
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
22574
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _744 => _744.outputTokens]), () => ( null)),
|
|
22578
22575
|
/** Cache hit % (read / total-input × 100). null during streaming. */
|
|
22579
|
-
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
22576
|
+
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _745 => _745.cacheHitRatePct]), () => ( null)),
|
|
22580
22577
|
/** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
|
|
22581
22578
|
* token counts). null until the trailing usage frame lands. */
|
|
22582
|
-
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
22579
|
+
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _746 => _746.breakdown]), () => ( null)),
|
|
22583
22580
|
// ─── Dialog management ───────────────────────────────────────────────
|
|
22584
22581
|
// With `chatConversationsUrl` the server transcript store IS the dialog
|
|
22585
22582
|
// list (shared `useManagedDialogList`); selecting a row re-hydrates through
|
|
@@ -22834,7 +22831,7 @@ function decodeNatsChunk(chunk) {
|
|
|
22834
22831
|
userId: typeof data.userId === "string" ? data.userId : void 0,
|
|
22835
22832
|
// Wire shape carries no label; fall back to the id (parity with
|
|
22836
22833
|
// the history path in `process-historical-messages.ts`).
|
|
22837
|
-
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess',
|
|
22834
|
+
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _747 => _747.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _748 => _748.id]) === "string").map((it) => ({
|
|
22838
22835
|
type: it.type,
|
|
22839
22836
|
id: it.id,
|
|
22840
22837
|
label: it.id
|
|
@@ -22925,7 +22922,7 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
22925
22922
|
}
|
|
22926
22923
|
break;
|
|
22927
22924
|
case "approval_batch": {
|
|
22928
|
-
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access',
|
|
22925
|
+
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _749 => _749.data, 'access', _750 => _750.executions, 'optionalAccess', _751 => _751[c.toolExecutionRequestId], 'optionalAccess', _752 => _752.status]) === "done");
|
|
22929
22926
|
if (segment.status !== "rejected" && !allDone) {
|
|
22930
22927
|
hasIncompleteState = true;
|
|
22931
22928
|
}
|
|
@@ -22987,11 +22984,11 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
22987
22984
|
function extractIncompleteTailState(messages) {
|
|
22988
22985
|
if (!messages || messages.length === 0) return void 0;
|
|
22989
22986
|
let start = messages.length;
|
|
22990
|
-
while (start > 0 && _optionalChain([messages, 'access',
|
|
22987
|
+
while (start > 0 && _optionalChain([messages, 'access', _753 => _753[start - 1], 'optionalAccess', _754 => _754.role]) === "assistant") start -= 1;
|
|
22991
22988
|
if (start === messages.length) return void 0;
|
|
22992
22989
|
const segments = [];
|
|
22993
22990
|
for (let i = start; i < messages.length; i += 1) {
|
|
22994
|
-
const content = _optionalChain([messages, 'access',
|
|
22991
|
+
const content = _optionalChain([messages, 'access', _755 => _755[i], 'optionalAccess', _756 => _756.content]);
|
|
22995
22992
|
if (Array.isArray(content)) segments.push(...content);
|
|
22996
22993
|
}
|
|
22997
22994
|
if (segments.length === 0) return void 0;
|
|
@@ -23004,15 +23001,15 @@ function extractIncompleteTailState(messages) {
|
|
|
23004
23001
|
|
|
23005
23002
|
// src/components/chat/utils/process-historical-messages.ts
|
|
23006
23003
|
function getOwnerDisplayName(owner) {
|
|
23007
|
-
if (_optionalChain([owner, 'optionalAccess',
|
|
23004
|
+
if (_optionalChain([owner, 'optionalAccess', _757 => _757.type]) === OWNER_TYPE.ADMIN && owner.user) {
|
|
23008
23005
|
const { firstName, lastName } = owner.user;
|
|
23009
23006
|
const name = [firstName, lastName].filter(Boolean).join(" ");
|
|
23010
23007
|
if (name) return name;
|
|
23011
23008
|
}
|
|
23012
|
-
return _optionalChain([owner, 'optionalAccess',
|
|
23009
|
+
return _optionalChain([owner, 'optionalAccess', _758 => _758.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
|
|
23013
23010
|
}
|
|
23014
23011
|
function getOwnerAvatar(owner) {
|
|
23015
|
-
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess',
|
|
23012
|
+
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _759 => _759.user, 'optionalAccess', _760 => _760.image, 'optionalAccess', _761 => _761.imageUrl]), () => ( void 0));
|
|
23016
23013
|
}
|
|
23017
23014
|
function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
|
|
23018
23015
|
messageDataArray.forEach((data) => {
|
|
@@ -23202,7 +23199,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
23202
23199
|
event.offerId,
|
|
23203
23200
|
event.text,
|
|
23204
23201
|
event.origin,
|
|
23205
|
-
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess',
|
|
23202
|
+
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _762 => _762[event.offerId]]), () => ( "pending"))
|
|
23206
23203
|
);
|
|
23207
23204
|
break;
|
|
23208
23205
|
case "ticket-escalated":
|
|
@@ -23236,7 +23233,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
23236
23233
|
);
|
|
23237
23234
|
break;
|
|
23238
23235
|
case "escalation-offer-resolved":
|
|
23239
|
-
_optionalChain([offerResolutions, 'optionalAccess',
|
|
23236
|
+
_optionalChain([offerResolutions, 'optionalAccess', _763 => _763.set, 'call', _764 => _764(event.offerId, {
|
|
23240
23237
|
status: event.status,
|
|
23241
23238
|
resolvedByName: event.resolvedByName
|
|
23242
23239
|
})]);
|
|
@@ -23300,7 +23297,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
23300
23297
|
}
|
|
23301
23298
|
}
|
|
23302
23299
|
} else {
|
|
23303
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
23300
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _765 => _765.set, 'call', _766 => _766(event.requestId, {
|
|
23304
23301
|
command: event.command || "",
|
|
23305
23302
|
explanation: event.explanation,
|
|
23306
23303
|
approvalType,
|
|
@@ -23315,8 +23312,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
23315
23312
|
const existingStatus = approvalStatuses[requestId];
|
|
23316
23313
|
const status = existingStatus || event.status;
|
|
23317
23314
|
const resolvedByName = event.resolvedByName;
|
|
23318
|
-
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess',
|
|
23319
|
-
if (_optionalChain([escalatedData, 'optionalAccess',
|
|
23315
|
+
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _767 => _767.get, 'call', _768 => _768(requestId)]);
|
|
23316
|
+
if (_optionalChain([escalatedData, 'optionalAccess', _769 => _769.toolCalls]) && escalatedData.toolCalls.length > 0) {
|
|
23320
23317
|
if (batchApprovalsEnabled) {
|
|
23321
23318
|
accumulator.addApprovalBatch(
|
|
23322
23319
|
requestId,
|
|
@@ -23338,7 +23335,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
23338
23335
|
);
|
|
23339
23336
|
}
|
|
23340
23337
|
}
|
|
23341
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
23338
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _770 => _770.delete, 'call', _771 => _771(requestId)]);
|
|
23342
23339
|
break;
|
|
23343
23340
|
}
|
|
23344
23341
|
if (escalatedData) {
|
|
@@ -23347,7 +23344,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
23347
23344
|
explanation: escalatedData.explanation,
|
|
23348
23345
|
approvalType: escalatedData.approvalType
|
|
23349
23346
|
});
|
|
23350
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
23347
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _772 => _772.delete, 'call', _773 => _773(requestId)]);
|
|
23351
23348
|
}
|
|
23352
23349
|
const before = accumulator.getSegments();
|
|
23353
23350
|
const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
|
|
@@ -23439,14 +23436,14 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
23439
23436
|
pushStandaloneMessages(processedMessages, msg, messageDataArray);
|
|
23440
23437
|
return;
|
|
23441
23438
|
}
|
|
23442
|
-
const isUserMessage = _optionalChain([msg, 'access',
|
|
23439
|
+
const isUserMessage = _optionalChain([msg, 'access', _774 => _774.owner, 'optionalAccess', _775 => _775.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _776 => _776.owner, 'optionalAccess', _777 => _777.type]) === OWNER_TYPE.ADMIN;
|
|
23443
23440
|
if (isUserMessage) {
|
|
23444
23441
|
flushAssistantMessage();
|
|
23445
|
-
const userAuthorType = _optionalChain([msg, 'access',
|
|
23442
|
+
const userAuthorType = _optionalChain([msg, 'access', _778 => _778.owner, 'optionalAccess', _779 => _779.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
|
|
23446
23443
|
messageDataArray.forEach((data) => {
|
|
23447
23444
|
if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
|
|
23448
23445
|
const rawContext = data.contextItems;
|
|
23449
|
-
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess',
|
|
23446
|
+
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _780 => _780.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _781 => _781.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
|
|
23450
23447
|
processedMessages.push({
|
|
23451
23448
|
id: msg.id,
|
|
23452
23449
|
role: "user",
|
|
@@ -23493,7 +23490,7 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
23493
23490
|
});
|
|
23494
23491
|
const nextMsg = messages[index + 1];
|
|
23495
23492
|
const isLastMessage = index === messages.length - 1;
|
|
23496
|
-
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access',
|
|
23493
|
+
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _782 => _782.owner, 'optionalAccess', _783 => _783.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _784 => _784.owner, 'optionalAccess', _785 => _785.type]) === OWNER_TYPE.ADMIN);
|
|
23497
23494
|
if (isLastMessage || nextIsFromUser) {
|
|
23498
23495
|
flushAssistantMessage();
|
|
23499
23496
|
}
|
|
@@ -23876,7 +23873,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
23876
23873
|
const connectionState = !active || !dialogId ? "connected" : connectedForDialog === dialogId ? "connected" : "connecting";
|
|
23877
23874
|
const sendMessage = _react.useCallback.call(void 0,
|
|
23878
23875
|
async (text2, sendOptions) => {
|
|
23879
|
-
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess',
|
|
23876
|
+
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _786 => _786.hidden]), () => ( false));
|
|
23880
23877
|
mutate((r) => r.pushOptimisticSend(text2, hidden));
|
|
23881
23878
|
await publishUserMessage(text2, { hidden, dialogId });
|
|
23882
23879
|
},
|
|
@@ -23969,11 +23966,11 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
23969
23966
|
// Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
|
|
23970
23967
|
// contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
|
|
23971
23968
|
// matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
|
|
23972
|
-
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
23973
|
-
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
23974
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
23975
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
23976
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
23969
|
+
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _787 => _787.provider]), () => ( modelProvider)), () => ( null)),
|
|
23970
|
+
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _788 => _788.modelLabel]), () => ( modelLabel)), () => ( null)),
|
|
23971
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _789 => _789.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _790 => _790.contextWindowMaxTokens]))), () => ( null)),
|
|
23972
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _791 => _791.inputTokensSize]), () => ( null)),
|
|
23973
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _792 => _792.outputTokensSize]), () => ( null)),
|
|
23977
23974
|
currentCacheHitRatePct: null,
|
|
23978
23975
|
currentUsageBreakdown: null,
|
|
23979
23976
|
// Dialog management
|
|
@@ -24095,7 +24092,7 @@ function useUnifiedChat(options) {
|
|
|
24095
24092
|
[]
|
|
24096
24093
|
);
|
|
24097
24094
|
const displayRefForward = _react.useCallback.call(void 0,
|
|
24098
|
-
(ref) => _optionalChain([activeStateRef, 'access',
|
|
24095
|
+
(ref) => _optionalChain([activeStateRef, 'access', _793 => _793.current, 'access', _794 => _794.displayRef, 'optionalCall', _795 => _795(ref)]),
|
|
24099
24096
|
[]
|
|
24100
24097
|
);
|
|
24101
24098
|
const displayRef = activeState.displayRef ? displayRefForward : void 0;
|
|
@@ -24105,7 +24102,7 @@ function useUnifiedChat(options) {
|
|
|
24105
24102
|
const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
|
|
24106
24103
|
const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
|
|
24107
24104
|
const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
|
|
24108
|
-
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access',
|
|
24105
|
+
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _796 => _796.current, 'access', _797 => _797.setDialogScope, 'optionalCall', _798 => _798(scope)]), []);
|
|
24109
24106
|
const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
|
|
24110
24107
|
const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
|
|
24111
24108
|
const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);
|
|
@@ -24214,19 +24211,19 @@ function turnRequestKeys(content) {
|
|
|
24214
24211
|
if (!Array.isArray(content)) return keys;
|
|
24215
24212
|
for (const seg of content) {
|
|
24216
24213
|
if (seg.type === "tool_execution") {
|
|
24217
|
-
const id = _optionalChain([seg, 'access',
|
|
24214
|
+
const id = _optionalChain([seg, 'access', _799 => _799.data, 'optionalAccess', _800 => _800.toolExecutionRequestId]);
|
|
24218
24215
|
if (id) keys.add(id);
|
|
24219
24216
|
} else if (seg.type === "approval_request") {
|
|
24220
|
-
const id = _optionalChain([seg, 'access',
|
|
24217
|
+
const id = _optionalChain([seg, 'access', _801 => _801.data, 'optionalAccess', _802 => _802.requestId]);
|
|
24221
24218
|
if (id) keys.add(id);
|
|
24222
24219
|
} else if (seg.type === "escalation_offer") {
|
|
24223
|
-
const id = _optionalChain([seg, 'access',
|
|
24220
|
+
const id = _optionalChain([seg, 'access', _803 => _803.data, 'optionalAccess', _804 => _804.offerId]);
|
|
24224
24221
|
if (id) keys.add(id);
|
|
24225
24222
|
} else if (seg.type === "approval_batch") {
|
|
24226
24223
|
const data = seg.data;
|
|
24227
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
24228
|
-
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
24229
|
-
if (_optionalChain([call, 'optionalAccess',
|
|
24224
|
+
if (_optionalChain([data, 'optionalAccess', _805 => _805.approvalRequestId])) keys.add(data.approvalRequestId);
|
|
24225
|
+
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess', _806 => _806.toolCalls]), () => ( []))) {
|
|
24226
|
+
if (_optionalChain([call, 'optionalAccess', _807 => _807.toolExecutionRequestId])) keys.add(call.toolExecutionRequestId);
|
|
24230
24227
|
}
|
|
24231
24228
|
}
|
|
24232
24229
|
}
|
|
@@ -24311,18 +24308,18 @@ function mergeHistoryWithRealtime(input) {
|
|
|
24311
24308
|
}
|
|
24312
24309
|
}
|
|
24313
24310
|
const trailing = processedHistory[processedHistory.length - 1];
|
|
24314
|
-
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess',
|
|
24315
|
-
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access',
|
|
24311
|
+
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _808 => _808.role]) === "assistant" ? trailing : null;
|
|
24312
|
+
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _809 => _809.content, 'access', _810 => _810.find, 'call', _811 => _811((s) => s.type === "approval_batch"), 'optionalAccess', _812 => _812.data, 'optionalAccess', _813 => _813.approvalRequestId]), () => ( null)) : null;
|
|
24316
24313
|
let processedToUse = processedHistory;
|
|
24317
24314
|
const pinnedSyntheticIds = /* @__PURE__ */ new Set();
|
|
24318
24315
|
const droppedSyntheticIds = /* @__PURE__ */ new Set();
|
|
24319
24316
|
if (historyBatchId) {
|
|
24320
24317
|
const batchTwins = existingMessages.filter(
|
|
24321
|
-
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access',
|
|
24318
|
+
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access', _814 => _814.data, 'optionalAccess', _815 => _815.approvalRequestId]) === historyBatchId)
|
|
24322
24319
|
);
|
|
24323
24320
|
const existingWithSameBatch = _nullishCoalesce(batchTwins.find((m) => m.id === streamingMessageId), () => ( batchTwins[batchTwins.length - 1]));
|
|
24324
24321
|
if (existingWithSameBatch && Array.isArray(existingWithSameBatch.content)) {
|
|
24325
|
-
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess',
|
|
24322
|
+
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _816 => _816.content])) ? historyTrailingAssistant.content.length : 0;
|
|
24326
24323
|
const realtimeSize = existingWithSameBatch.content.length;
|
|
24327
24324
|
if (existingWithSameBatch.id === streamingMessageId || realtimeSize > histSize) {
|
|
24328
24325
|
processedToUse = processedHistory.slice(0, -1);
|
|
@@ -24355,9 +24352,9 @@ function mergeHistoryWithRealtime(input) {
|
|
|
24355
24352
|
const trailingAssistantText = lastProcessed && lastProcessed.role === "assistant" ? assistantAnswerText(lastProcessed.content) : "";
|
|
24356
24353
|
const windowSignals = collectTwinSignals(processedToUse);
|
|
24357
24354
|
const seenUserSyntheticByContent = /* @__PURE__ */ new Map();
|
|
24358
|
-
const isInWindow = (m) => processedIds.has(m.id) || (_nullishCoalesce(_optionalChain([rawHistoryIds, 'optionalAccess',
|
|
24355
|
+
const isInWindow = (m) => processedIds.has(m.id) || (_nullishCoalesce(_optionalChain([rawHistoryIds, 'optionalAccess', _817 => _817.has, 'call', _818 => _818(m.id)]), () => ( false)));
|
|
24359
24356
|
const firstWindowIndex = existingMessages.findIndex(isInWindow);
|
|
24360
|
-
const isPersistedOlder = (m) => !isClientMintedId(m.id) && (_nullishCoalesce(_optionalChain([m, 'access',
|
|
24357
|
+
const isPersistedOlder = (m) => !isClientMintedId(m.id) && (_nullishCoalesce(_optionalChain([m, 'access', _819 => _819.timestamp, 'optionalAccess', _820 => _820.getTime, 'call', _821 => _821()]), () => ( 0))) <= historyFetchedAt;
|
|
24361
24358
|
let lastOlderPersistedIndex = -1;
|
|
24362
24359
|
if (firstWindowIndex < 0) {
|
|
24363
24360
|
for (const [index, m] of existingMessages.entries()) {
|
|
@@ -24375,7 +24372,7 @@ function mergeHistoryWithRealtime(input) {
|
|
|
24375
24372
|
} else if (pm.role === "assistant") {
|
|
24376
24373
|
windowHasUnstampedAssistant = true;
|
|
24377
24374
|
}
|
|
24378
|
-
const time = _optionalChain([pm, 'access',
|
|
24375
|
+
const time = _optionalChain([pm, 'access', _822 => _822.timestamp, 'optionalAccess', _823 => _823.getTime, 'call', _824 => _824()]);
|
|
24379
24376
|
if (typeof time === "number" && time < windowMinTime) windowMinTime = time;
|
|
24380
24377
|
}
|
|
24381
24378
|
const threadHasClientMintedRow = existingMessages.some((m) => isClientMintedId(m.id));
|
|
@@ -24393,14 +24390,14 @@ function mergeHistoryWithRealtime(input) {
|
|
|
24393
24390
|
const verdict = twinVerdict(windowSignals, m);
|
|
24394
24391
|
return verdict === "unknown" ? !seqCanMislead(m) : verdict === "distinct";
|
|
24395
24392
|
}
|
|
24396
|
-
const time = _optionalChain([m, 'access',
|
|
24393
|
+
const time = _optionalChain([m, 'access', _825 => _825.timestamp, 'optionalAccess', _826 => _826.getTime, 'call', _827 => _827()]);
|
|
24397
24394
|
if (typeof time !== "number" || time > historyFetchedAt) return false;
|
|
24398
24395
|
if (!Number.isFinite(windowMinTime) || time >= windowMinTime) return false;
|
|
24399
24396
|
return twinVerdict(windowSignals, m) === "distinct";
|
|
24400
24397
|
};
|
|
24401
24398
|
const keepRealtime = (m) => {
|
|
24402
24399
|
if (m.role === "user" && isOptimisticId(m.id) && typeof m.content === "string") {
|
|
24403
|
-
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access',
|
|
24400
|
+
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _828 => _828.timestamp, 'optionalAccess', _829 => _829.getTime, 'call', _830 => _830()]), () => ( 0))) <= historyFetchedAt;
|
|
24404
24401
|
return !(canBeInSnapshot && windowSignals.userContents.has(userTwinKey(m)));
|
|
24405
24402
|
}
|
|
24406
24403
|
if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
|
|
@@ -24425,7 +24422,7 @@ function mergeHistoryWithRealtime(input) {
|
|
|
24425
24422
|
} else if (typeof m.streamSeq === "number") {
|
|
24426
24423
|
covered = historyMaxStreamSeq > 0 && historyMaxStreamSeq >= m.streamSeq;
|
|
24427
24424
|
} else {
|
|
24428
|
-
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access',
|
|
24425
|
+
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _831 => _831.timestamp, 'optionalAccess', _832 => _832.getTime, 'call', _833 => _833()]), () => ( 0))) <= historyFetchedAt;
|
|
24429
24426
|
}
|
|
24430
24427
|
if (covered) return false;
|
|
24431
24428
|
}
|
|
@@ -24534,7 +24531,7 @@ function normalizeHistoricalMessageData(md) {
|
|
|
24534
24531
|
function isHistoricalUserTurn(m) {
|
|
24535
24532
|
return !!m.owner;
|
|
24536
24533
|
}
|
|
24537
|
-
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess',
|
|
24534
|
+
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _834 => _834.type]) === "TEXT" && typeof d.text === "string";
|
|
24538
24535
|
var THINK_MS = 550;
|
|
24539
24536
|
var TOKEN_MS = 55;
|
|
24540
24537
|
var USER_MS = 480;
|
|
@@ -24713,7 +24710,7 @@ function useResizableSize({ enabled, isHorizontal, minSize, maxSize, defaultSize
|
|
|
24713
24710
|
(value) => {
|
|
24714
24711
|
const vp = viewportSize(isHorizontal);
|
|
24715
24712
|
const effectiveMax = vp > 0 ? Math.min(maxSize, vp - 80) : maxSize;
|
|
24716
|
-
return
|
|
24713
|
+
return _chunk26GBOUIPcjs.clamp.call(void 0, value, minSize, Math.max(minSize, effectiveMax));
|
|
24717
24714
|
},
|
|
24718
24715
|
[isHorizontal, minSize, maxSize]
|
|
24719
24716
|
);
|
|
@@ -24855,7 +24852,7 @@ var DrawerContent = _react.forwardRef.call(void 0,
|
|
|
24855
24852
|
const resolvedSide = _nullishCoalesce(side, () => ( "right"));
|
|
24856
24853
|
const isHorizontal = HORIZONTAL_SIDES.has(resolvedSide);
|
|
24857
24854
|
const initialSize = _nullishCoalesce(defaultSize, () => ( (isHorizontal ? 560 : 480)));
|
|
24858
|
-
const headerHeight =
|
|
24855
|
+
const headerHeight = _chunk26GBOUIPcjs.useHeaderHeight.call(void 0, );
|
|
24859
24856
|
const [isMobile, setIsMobile] = _react.useState.call(void 0, false);
|
|
24860
24857
|
_react.useEffect.call(void 0, () => {
|
|
24861
24858
|
if (typeof window === "undefined") return void 0;
|
|
@@ -25167,7 +25164,7 @@ function useChatDialogManager({
|
|
|
25167
25164
|
const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
|
|
25168
25165
|
if (restoreTarget) {
|
|
25169
25166
|
try {
|
|
25170
|
-
await _optionalChain([unarchiveDialog, 'optionalCall',
|
|
25167
|
+
await _optionalChain([unarchiveDialog, 'optionalCall', _835 => _835(restoreTarget.id)]);
|
|
25171
25168
|
} catch (err) {
|
|
25172
25169
|
console.error("[useChatDialogManager] unarchive failed:", err);
|
|
25173
25170
|
return;
|
|
@@ -25718,7 +25715,7 @@ function EmbeddableChatInner({
|
|
|
25718
25715
|
}),
|
|
25719
25716
|
[commandsUrl]
|
|
25720
25717
|
);
|
|
25721
|
-
const headerUserName = _optionalChain([identityUser, 'optionalAccess',
|
|
25718
|
+
const headerUserName = _optionalChain([identityUser, 'optionalAccess', _836 => _836.name, 'optionalAccess', _837 => _837.trim, 'call', _838 => _838()]) || [_optionalChain([identityUser, 'optionalAccess', _839 => _839.firstName]), _optionalChain([identityUser, 'optionalAccess', _840 => _840.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _841 => _841.trim, 'call', _842 => _842()]) || void 0;
|
|
25722
25719
|
const effectiveModes = _react.useMemo.call(void 0, () => {
|
|
25723
25720
|
if (modes) return modes;
|
|
25724
25721
|
const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
|
|
@@ -25733,7 +25730,7 @@ function EmbeddableChatInner({
|
|
|
25733
25730
|
if (controlledActiveMode === void 0) {
|
|
25734
25731
|
setUncontrolledActiveMode(next);
|
|
25735
25732
|
}
|
|
25736
|
-
_optionalChain([onActiveModeChange, 'optionalCall',
|
|
25733
|
+
_optionalChain([onActiveModeChange, 'optionalCall', _843 => _843(next)]);
|
|
25737
25734
|
},
|
|
25738
25735
|
[controlledActiveMode, onActiveModeChange]
|
|
25739
25736
|
);
|
|
@@ -25760,7 +25757,7 @@ function EmbeddableChatInner({
|
|
|
25760
25757
|
);
|
|
25761
25758
|
const effectiveAssistantName = emptyStateConfig.name;
|
|
25762
25759
|
const effectiveAssistantIcon = emptyStateConfig.icon;
|
|
25763
|
-
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess',
|
|
25760
|
+
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _844 => _844.title]) === "string" ? guideWelcome.title : null)));
|
|
25764
25761
|
const {
|
|
25765
25762
|
messages: rawMessages,
|
|
25766
25763
|
isLoading: chatLoading,
|
|
@@ -25816,8 +25813,8 @@ function EmbeddableChatInner({
|
|
|
25816
25813
|
const mingoCaps = _react.useMemo.call(void 0,
|
|
25817
25814
|
() => ({
|
|
25818
25815
|
...dialogCapabilities,
|
|
25819
|
-
canRename: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess',
|
|
25820
|
-
canArchive: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess',
|
|
25816
|
+
canRename: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _845 => _845.canRename]), () => ( false)),
|
|
25817
|
+
canArchive: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _846 => _846.canArchive]), () => ( false))
|
|
25821
25818
|
}),
|
|
25822
25819
|
[dialogCapabilities]
|
|
25823
25820
|
);
|
|
@@ -25832,7 +25829,7 @@ function EmbeddableChatInner({
|
|
|
25832
25829
|
void sendMessage(guidePendingPrompt).catch((err) => {
|
|
25833
25830
|
console.error("[EmbeddableChat] guide launcher prompt failed:", err);
|
|
25834
25831
|
});
|
|
25835
|
-
_optionalChain([onGuidePromptConsumed, 'optionalCall',
|
|
25832
|
+
_optionalChain([onGuidePromptConsumed, 'optionalCall', _847 => _847()]);
|
|
25836
25833
|
}, [guidePendingPrompt, activeMode, sendMessage, onGuidePromptConsumed]);
|
|
25837
25834
|
const {
|
|
25838
25835
|
attachments: stagedAttachments,
|
|
@@ -25843,7 +25840,7 @@ function EmbeddableChatInner({
|
|
|
25843
25840
|
clear: clearAttachments
|
|
25844
25841
|
} = useChatAttachments();
|
|
25845
25842
|
const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
|
|
25846
|
-
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
25843
|
+
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _848 => _848.maxItems]), () => ( 10));
|
|
25847
25844
|
const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
|
|
25848
25845
|
const [contextItems, setContextItems] = _react.useState.call(void 0, NO_CONTEXT_ITEMS);
|
|
25849
25846
|
const [contextPickerOpen, setContextPickerOpen] = _react.useState.call(void 0, false);
|
|
@@ -25872,10 +25869,10 @@ function EmbeddableChatInner({
|
|
|
25872
25869
|
}, [composerKey, clearAttachments]);
|
|
25873
25870
|
const mentionMarkerByType = _react.useMemo.call(void 0, () => {
|
|
25874
25871
|
const m = /* @__PURE__ */ new Map();
|
|
25875
|
-
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
25872
|
+
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _849 => _849.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
|
|
25876
25873
|
return m;
|
|
25877
|
-
}, [_optionalChain([contextPicker, 'optionalAccess',
|
|
25878
|
-
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess',
|
|
25874
|
+
}, [_optionalChain([contextPicker, 'optionalAccess', _850 => _850.entityTypes])]);
|
|
25875
|
+
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _851 => _851.entityTypes]);
|
|
25879
25876
|
const resolveContextIcon = _react.useMemo.call(void 0, () => {
|
|
25880
25877
|
const byType = /* @__PURE__ */ new Map();
|
|
25881
25878
|
for (const t of _nullishCoalesce(contextEntityTypes, () => ( []))) byType.set(t.type, t.icon);
|
|
@@ -25887,7 +25884,7 @@ function EmbeddableChatInner({
|
|
|
25887
25884
|
if (mentionActiveRef.current) {
|
|
25888
25885
|
if (contextItems.some((p) => `${p.type}:${p.id}` === key)) return;
|
|
25889
25886
|
if (contextItems.length >= contextMaxItems) return;
|
|
25890
|
-
_optionalChain([chatInputRef, 'access',
|
|
25887
|
+
_optionalChain([chatInputRef, 'access', _852 => _852.current, 'optionalAccess', _853 => _853.commitMention, 'call', _854 => _854(mentionTokenOf(key, mentionMarkerByType), {
|
|
25891
25888
|
label: item.label,
|
|
25892
25889
|
icon: resolveContextIcon(item)
|
|
25893
25890
|
})]);
|
|
@@ -25910,9 +25907,9 @@ function EmbeddableChatInner({
|
|
|
25910
25907
|
setContextItems((prev) => prev.filter((p) => `${p.type}:${p.id}` !== key));
|
|
25911
25908
|
if (mentionKeysRef.current.has(key)) {
|
|
25912
25909
|
mentionKeysRef.current.delete(key);
|
|
25913
|
-
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access',
|
|
25910
|
+
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _855 => _855.current, 'optionalAccess', _856 => _856.getValue, 'call', _857 => _857()]), () => ( ""));
|
|
25914
25911
|
const next = cur.replace(`@${mentionTokenOf(key, mentionMarkerByType)}`, "").replace(/\s{2,}/g, " ").trimStart();
|
|
25915
|
-
_optionalChain([chatInputRef, 'access',
|
|
25912
|
+
_optionalChain([chatInputRef, 'access', _858 => _858.current, 'optionalAccess', _859 => _859.setValue, 'call', _860 => _860(next)]);
|
|
25916
25913
|
}
|
|
25917
25914
|
},
|
|
25918
25915
|
[mentionMarkerByType]
|
|
@@ -25934,7 +25931,7 @@ function EmbeddableChatInner({
|
|
|
25934
25931
|
}, []);
|
|
25935
25932
|
const closeContextPicker = _react.useCallback.call(void 0, () => {
|
|
25936
25933
|
if (mentionActiveRef.current) {
|
|
25937
|
-
_optionalChain([chatInputRef, 'access',
|
|
25934
|
+
_optionalChain([chatInputRef, 'access', _861 => _861.current, 'optionalAccess', _862 => _862.removeMentionTrigger, 'call', _863 => _863()]);
|
|
25938
25935
|
}
|
|
25939
25936
|
setContextPickerOpen(false);
|
|
25940
25937
|
setMentionQuery(null);
|
|
@@ -25968,8 +25965,8 @@ function EmbeddableChatInner({
|
|
|
25968
25965
|
[effectiveAssistantIcon]
|
|
25969
25966
|
);
|
|
25970
25967
|
const [timestampCache] = _react.useState.call(void 0, () => /* @__PURE__ */ new Map());
|
|
25971
|
-
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess',
|
|
25972
|
-
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess',
|
|
25968
|
+
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _864 => _864.firstName]), _optionalChain([identityUser, 'optionalAccess', _865 => _865.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _866 => _866.name, 'optionalAccess', _867 => _867.trim, 'call', _868 => _868()]) || void 0 : void 0;
|
|
25969
|
+
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _869 => _869.avatarUrl, 'optionalAccess', _870 => _870.trim, 'call', _871 => _871()]) || void 0 : void 0;
|
|
25973
25970
|
const messages = _react.useMemo.call(void 0, () => {
|
|
25974
25971
|
const options = { userName: guideUserName, userAvatar: guideUserAvatar, timestampCache };
|
|
25975
25972
|
const mapped = rawMessages.map((m) => mapHostMessage(m, options));
|
|
@@ -26144,7 +26141,7 @@ function EmbeddableChatInner({
|
|
|
26144
26141
|
_react.useEffect.call(void 0, () => {
|
|
26145
26142
|
if (!panelBoundary || typeof ResizeObserver === "undefined") return void 0;
|
|
26146
26143
|
const ro = new ResizeObserver((entries) => {
|
|
26147
|
-
const w = _optionalChain([entries, 'access',
|
|
26144
|
+
const w = _optionalChain([entries, 'access', _872 => _872[0], 'optionalAccess', _873 => _873.contentRect, 'optionalAccess', _874 => _874.width]);
|
|
26148
26145
|
if (typeof w === "number") setCanSplit(w >= SPLIT_MIN_WIDTH);
|
|
26149
26146
|
});
|
|
26150
26147
|
ro.observe(panelBoundary);
|
|
@@ -26187,18 +26184,18 @@ function EmbeddableChatInner({
|
|
|
26187
26184
|
const stackedListView = isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen && !emptyListSkipped;
|
|
26188
26185
|
const headerShowBack = hasConversation || guideCanReturnToMingo;
|
|
26189
26186
|
const freshConversationTitle = isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "New Chat";
|
|
26190
|
-
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
26187
|
+
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _875 => _875.title]) || freshConversationTitle : isGuideEmpty ? freshConversationTitle : "Current Chats";
|
|
26191
26188
|
const headerBackAriaLabel = hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo";
|
|
26192
26189
|
const headerOnBack = hasConversation ? handleBack : () => handleActiveModeChange("mingo");
|
|
26193
26190
|
const headerOnRestore = isViewingArchived && unarchiveDialog && activeDialog ? () => setRestoreTarget(activeDialog) : void 0;
|
|
26194
26191
|
const headerOnRename = activeDialogId && activeDialog && mingoCaps.canRename ? () => setRenameTarget(activeDialog) : void 0;
|
|
26195
26192
|
const headerOnArchive = activeDialogId && activeDialog && mingoCaps.canArchive ? () => setArchiveTarget(activeDialog) : void 0;
|
|
26196
|
-
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access',
|
|
26197
|
-
const headerOnCompact = activeDialogId && activeDialog && mingoCaps.compactDialog ? () => _optionalChain([mingoCaps, 'access',
|
|
26193
|
+
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _876 => _876.onCopyLink, 'optionalCall', _877 => _877(activeDialog)]) : void 0;
|
|
26194
|
+
const headerOnCompact = activeDialogId && activeDialog && mingoCaps.compactDialog ? () => _optionalChain([mingoCaps, 'access', _878 => _878.compactDialog, 'optionalCall', _879 => _879(activeDialog)]) : void 0;
|
|
26198
26195
|
const headerOnOpenArchive = fetchArchivedDialogs ? openArchive : void 0;
|
|
26199
|
-
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
26200
|
-
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess',
|
|
26201
|
-
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access',
|
|
26196
|
+
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _880 => _880.owner]) : void 0;
|
|
26197
|
+
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _881 => _881.name, 'optionalAccess', _882 => _882.trim, 'call', _883 => _883()]) || headerUserName;
|
|
26198
|
+
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _884 => _884.avatarUrl, 'optionalAccess', _885 => _885.trim, 'call', _886 => _886()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _887 => _887.avatarUrl, 'optionalAccess', _888 => _888.trim, 'call', _889 => _889()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _890 => _890.trim, 'call', _891 => _891()]) || void 0;
|
|
26202
26199
|
const headerAvatar = headerPersonName || headerPersonAvatarUrl ? { name: headerPersonName, avatarUrl: headerPersonAvatarUrl } : void 0;
|
|
26203
26200
|
const handleNewChat = _react.useCallback.call(void 0, () => {
|
|
26204
26201
|
resetToNewChat();
|
|
@@ -26551,9 +26548,9 @@ function EmbeddableChatInner({
|
|
|
26551
26548
|
subtitle: _nullishCoalesce(effectiveGreeting, () => ( void 0)),
|
|
26552
26549
|
subtitleLoading: emptyStateLoading,
|
|
26553
26550
|
...guideWelcome,
|
|
26554
|
-
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
26555
|
-
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
26556
|
-
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess',
|
|
26551
|
+
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _892 => _892.title]))),
|
|
26552
|
+
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _893 => _893.icon]))),
|
|
26553
|
+
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _894 => _894.quickActions]), () => ( guideSuggestedActions)),
|
|
26557
26554
|
onQuickAction: (action) => {
|
|
26558
26555
|
setQuickActionPreview(null);
|
|
26559
26556
|
handleSend(_nullishCoalesce(action.prompt, () => ( action.label)));
|
|
@@ -26628,8 +26625,8 @@ function EmbeddableChatInner({
|
|
|
26628
26625
|
selectedContextItems: contextItems,
|
|
26629
26626
|
onToggleContextItem: toggleContextItem,
|
|
26630
26627
|
onRemoveContextItem: removeContextItem,
|
|
26631
|
-
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess',
|
|
26632
|
-
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess',
|
|
26628
|
+
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _895 => _895.items]),
|
|
26629
|
+
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _896 => _896.onRemove]),
|
|
26633
26630
|
contextPickerOpen,
|
|
26634
26631
|
onOpenContextPicker: openContextPicker,
|
|
26635
26632
|
onCloseContextPicker: closeContextPicker,
|
|
@@ -26838,7 +26835,7 @@ var GROUPS = [
|
|
|
26838
26835
|
}
|
|
26839
26836
|
];
|
|
26840
26837
|
function maskKey(key) {
|
|
26841
|
-
const prefix = _nullishCoalesce(_optionalChain([/^fpk_[a-z0-9-]+_/i, 'access',
|
|
26838
|
+
const prefix = _nullishCoalesce(_optionalChain([/^fpk_[a-z0-9-]+_/i, 'access', _897 => _897.exec, 'call', _898 => _898(key), 'optionalAccess', _899 => _899[0]]), () => ( ""));
|
|
26842
26839
|
return key.length - prefix.length <= 8 ? `${prefix}\u2022\u2022\u2022\u2022` : `${prefix}\u2026${key.slice(-4)}`;
|
|
26843
26840
|
}
|
|
26844
26841
|
function HeaderName({ children }) {
|
|
@@ -26875,8 +26872,8 @@ function ProxyCredentialsForm({ description, saved }) {
|
|
|
26875
26872
|
const errors = _react.useMemo.call(void 0, () => {
|
|
26876
26873
|
const out = {};
|
|
26877
26874
|
for (const { field } of _chunkMNFV4YLKcjs.EMBED_PROXY_OPTIONAL_HEADERS) {
|
|
26878
|
-
const value = _optionalChain([optional, 'access',
|
|
26879
|
-
const message = value ? _optionalChain([OPTIONAL_FIELD_COPY, 'access',
|
|
26875
|
+
const value = _optionalChain([optional, 'access', _900 => _900[field], 'optionalAccess', _901 => _901.trim, 'call', _902 => _902()]);
|
|
26876
|
+
const message = value ? _optionalChain([OPTIONAL_FIELD_COPY, 'access', _903 => _903[field], 'access', _904 => _904.validate, 'optionalCall', _905 => _905(value)]) : null;
|
|
26880
26877
|
if (message) out[field] = message;
|
|
26881
26878
|
}
|
|
26882
26879
|
return out;
|
|
@@ -26888,12 +26885,12 @@ function ProxyCredentialsForm({ description, saved }) {
|
|
|
26888
26885
|
...keyForPreview ? [["Authorization", `Bearer ${keyForPreview}`]] : [],
|
|
26889
26886
|
...email.trim() ? [["X-Chat-Act-As", email.trim().toLowerCase()]] : [],
|
|
26890
26887
|
..._chunkMNFV4YLKcjs.EMBED_PROXY_OPTIONAL_HEADERS.flatMap(({ field, header }) => {
|
|
26891
|
-
const value = _optionalChain([optional, 'access',
|
|
26888
|
+
const value = _optionalChain([optional, 'access', _906 => _906[field], 'optionalAccess', _907 => _907.trim, 'call', _908 => _908()]);
|
|
26892
26889
|
return value ? [[header, value]] : [];
|
|
26893
26890
|
})
|
|
26894
26891
|
];
|
|
26895
26892
|
const save = () => {
|
|
26896
|
-
const key = secret.trim() || _optionalChain([_chunkMNFV4YLKcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess',
|
|
26893
|
+
const key = secret.trim() || _optionalChain([_chunkMNFV4YLKcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _909 => _909.secret]);
|
|
26897
26894
|
const actAs = email.trim().toLowerCase();
|
|
26898
26895
|
if (!key || !actAs || hasErrors) {
|
|
26899
26896
|
setStatus(hasErrors ? "Fix the highlighted fields first." : "API key and act-as email are required.");
|
|
@@ -27425,4 +27422,4 @@ function ProxyCredentialsForm({ description, saved }) {
|
|
|
27425
27422
|
|
|
27426
27423
|
|
|
27427
27424
|
exports.InfoHint = InfoHint; exports.Field = Field; exports.formatTicketRelativeTime = formatTicketRelativeTime; exports.formatTicketFullTimestamp = formatTicketFullTimestamp; exports.formatRelativeTime = formatRelativeTime; exports.formatAbsoluteDate = formatAbsoluteDate; exports.formatDateTime = formatDateTime; exports.getDetailedTimeDifference = getDetailedTimeDifference; exports.isToday = isToday; exports.isWithinMinutes = isWithinMinutes; exports.createUTCTimestamp = createUTCTimestamp; exports.DESIGN_PALETTE = DESIGN_PALETTE; exports.getContrastRatio = getContrastRatio; exports.pickReadableTextColor = pickReadableTextColor; exports.extractDominantColor = extractDominantColor; exports.getBestContrastColor = getBestContrastColor; exports.analyzeImageColor = analyzeImageColor; exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync; exports.getCurrentPlatform = getCurrentPlatform; exports.switchPlatformTheme = switchPlatformTheme; exports.getSemanticColor = getSemanticColor; exports.getPlatformConfig = getPlatformConfig; exports.usePlatformColors = usePlatformColors; exports.getReadableTextColor = getReadableTextColor; exports.HEX_PATTERN = HEX_PATTERN; exports.hexToRgb = hexToRgb2; exports.rgbToHex = rgbToHex; exports.deriveHoverColor = deriveHoverColor; exports.deriveActiveColor = deriveActiveColor; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.ActionsMenu = ActionsMenu; exports.ActionsMenuDropdown = ActionsMenuDropdown; exports.ColorSwatch = ColorSwatch; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.resolveTicketStatus = resolveTicketStatus; exports.getTicketStatusConfig = getTicketStatusConfig; exports.getTicketStatusTag = getTicketStatusTag; exports.kindToCanonicalStatus = kindToCanonicalStatus; exports.usesCanonicalStatusStyle = usesCanonicalStatusStyle; exports.resolveStatusTagProps = resolveStatusTagProps; exports.TicketStatusTag = TicketStatusTag; exports.useScrollFade = useScrollFade; exports.ScrollFadeOverlay = ScrollFadeOverlay; exports.ScrollShadow = ScrollShadow; exports.Modal = Modal; exports.ModalContent = ModalContent; exports.ModalTwoColumn = ModalTwoColumn; exports.ModalHeader = ModalHeader; exports.ModalTitle = ModalTitle; exports.ModalFooter = ModalFooter; exports.OVERLAY_BACKDROP_CLASS = OVERLAY_BACKDROP_CLASS; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerClose = DrawerClose; exports.DrawerPortal = DrawerPortal; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DrawerBody = DrawerBody; exports.DrawerFooter = DrawerFooter; exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.hasRenderableSrc = hasRenderableSrc; exports.buildStandardLeafRenderers = buildStandardLeafRenderers; exports.SAFE_HTML_TAGS = SAFE_HTML_TAGS; exports.SVG_TAGS = SVG_TAGS; exports.buildEffectiveTagSet = buildEffectiveTagSet; exports.buildSanitizeSchema = buildSanitizeSchema; exports.rehypeStripUnsafe = rehypeStripUnsafe; exports.escapeUnknownHtmlTags = escapeUnknownHtmlTags; exports.cardAwareUrlTransform = cardAwareUrlTransform; exports.splitStreamingBlocks = splitStreamingBlocks; exports.completeStreamingTail = completeStreamingTail; exports.TEXT_SIZE_PRESETS = TEXT_SIZE_PRESETS; exports.resolveTextSizeConfig = resolveTextSizeConfig; exports.NO_BROKEN_LINKS = NO_BROKEN_LINKS; exports.MarkdownEngine = MarkdownEngine; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.fetchPriorityProp = fetchPriorityProp; exports.MUX_STREAM_ORIGIN = MUX_STREAM_ORIGIN; exports.MUX_IMAGE_ORIGIN = MUX_IMAGE_ORIGIN; exports.saveDataEnabled = saveDataEnabled; exports.useVideoOriginPreconnect = useVideoOriginPreconnect; exports.useVideoWarmup = useVideoWarmup; exports.extractYouTubeId = extractYouTubeId; exports.VIDEO_PLAYBACK_FAILED_EVENT = VIDEO_PLAYBACK_FAILED_EVENT; exports.Video = Video2; exports.HoverDropdown = HoverDropdown; exports.StatusLine = StatusLine; exports.ExpandChevron = ExpandChevron; exports.useCollapsible = useCollapsible; exports.getCommandText = getCommandText; exports.ArgRow = ArgRow; exports.ResultBlock = ResultBlock; exports.CommandBlock = CommandBlock; exports.ApprovalStatusTag = ApprovalStatusTag; exports.ApprovalWaitingLine = ApprovalWaitingLine; exports.ApprovalBatchMessage = ApprovalBatchMessage; exports.CHAT_TYPE = CHAT_TYPE; exports.OWNER_TYPE = OWNER_TYPE; exports.MESSAGE_ROLE = MESSAGE_ROLE; exports.ASSISTANT_TYPE = ASSISTANT_TYPE; exports.AUTHOR_TYPE = AUTHOR_TYPE; exports.APPROVAL_STATUS = APPROVAL_STATUS; exports.APPROVAL_BLOCK_VARIANT = APPROVAL_BLOCK_VARIANT; exports.CHAT_APPEARANCE = CHAT_APPEARANCE; exports.CONNECTION_STATUS = CONNECTION_STATUS; exports.isStructuredContent = isStructuredContent; exports.normalizeContent = normalizeContent; exports.ChatAppearanceContext = ChatAppearanceContext; exports.useChatAppearance = useChatAppearance; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; exports.formatTime = formatTime; exports.AiAssistantInfo = AiAssistantInfo; exports.TicketEscalatedMessage = TicketEscalatedMessage; exports.MESSAGE_TYPE = MESSAGE_TYPE; exports.SCROLL_ANCHOR = SCROLL_ANCHOR; exports.TICKET_EVENT_KIND = TICKET_EVENT_KIND; exports.TicketEventMessage = TicketEventMessage; exports.SystemEventMessage = SystemEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.MspOrganizationCardSkeleton = MspOrganizationCardSkeleton; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.ChatTypingIndicator = ChatTypingIndicator; exports.MingoOnboardingCard = MingoOnboardingCard; exports.ICON_REGISTRY = ICON_REGISTRY; exports.normalizeIconKey = normalizeIconKey; exports.getIconComponent = getIconComponent; exports.getDynamicIcon = getDynamicIcon; exports.ICON_ALIASES = ICON_ALIASES; exports.brandLogoForName = brandLogoForName; exports.resolveIcon = resolveIcon; exports.ICON_OPTIONS = ICON_OPTIONS; exports.SlashCommandSuggestions = SlashCommandSuggestions; exports.ChatInput = ChatInput; exports.FAE_AVATAR_DATA_URI = FAE_AVATAR_DATA_URI; exports.AgentMark = AgentMark; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_CLASS = CONTEXT_BACK_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; exports.ContextItemsSkeleton = ContextItemsSkeleton; exports.ContextItemsList = ContextItemsList; exports.ContextErrorBoundary = ContextErrorBoundary; exports.CHAT_CONTEXT_ITEMS_DEFAULT_MAX = CHAT_CONTEXT_ITEMS_DEFAULT_MAX; exports.ChatComposerPlusMenu = ChatComposerPlusMenu; exports.ChatContextPicker = ChatContextPicker; exports.ChatContextChipStrip = ChatContextChipStrip; exports.BlockCard = BlockCard; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.ChatMessageSkeleton = ChatMessageSkeleton; exports.ChatMessageListSkeleton = ChatMessageListSkeleton; exports.ChatMessageList = ChatMessageList; exports.useProxiedImageUrl = useProxiedImageUrl; exports.ChatMessageRow = ChatMessageRow; exports.ChatMessageRowSkeleton = ChatMessageRowSkeleton; exports.EntityIcon = EntityIcon; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipSkeleton = QuickActionChipSkeleton; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.useMarqueeSync = useMarqueeSync; exports.getMarqueeTrackOffset = getMarqueeTrackOffset; exports.getMarqueeAppliedOffset = getMarqueeAppliedOffset; exports.getMarqueeCloneTwin = getMarqueeCloneTwin; exports.MarqueeWallFades = MarqueeWallFades; exports.MarqueeWall = MarqueeWall; exports.WALL_SKELETON_LABEL_CH = WALL_SKELETON_LABEL_CH; exports.interleave = interleave; exports.QuickActionWall = QuickActionWall; exports.QuickActionMarquee = QuickActionMarquee; exports.ChatTicketItem = ChatTicketItem; exports.ChatTicketList = ChatTicketList; exports.MingoOnboardingCardSkeleton = MingoOnboardingCardSkeleton; exports.MingoOnboardingListSkeleton = MingoOnboardingListSkeleton; exports.ChatListEmptyState = ChatListEmptyState; exports.MingoChatHistorySkeleton = MingoChatHistorySkeleton; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatHeaderIconButton = ChatHeaderIconButton; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.ChatPanelHeader = ChatPanelHeader; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX; exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM; exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME; exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl; exports.escapeMarkdownInline = escapeMarkdownInline; exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED; exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN; exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown; exports.CHAT_ATTACHMENT_MIME_TYPES = CHAT_ATTACHMENT_MIME_TYPES; exports.CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER; exports.ChatAttachmentAddButton = ChatAttachmentAddButton; exports.ChatAttachmentChipStrip = ChatAttachmentChipStrip; exports.ChatContextMemoryBar = ChatContextMemoryBar; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.ModelDisplay = ModelDisplay; exports.ModelDisplaySkeleton = ModelDisplaySkeleton; exports.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.DialogListItem = DialogListItem; exports.ChatSidebar = ChatSidebar; exports.ChatNavSidebar = ChatNavSidebar; exports.ChatListItem = ChatListItem; exports.ChatTopNavigation = ChatTopNavigation; exports.OnboardingCarousel = OnboardingCarousel; exports.NEW_TAB_FEATURES = NEW_TAB_FEATURES; exports.isModifierClick = isModifierClick; exports.stripSameOriginToPath = stripSameOriginToPath; exports.resolveExternalNavigation = resolveExternalNavigation; exports.executeNavigation = executeNavigation; exports.executeNavigationImperative = executeNavigationImperative; exports.handleChatNavClick = handleChatNavClick; exports.NavLinkAnchorViaRuntime = NavLinkAnchorViaRuntime; exports.SourceActionButton = SourceActionButton; exports.getCaptionsUrl = getCaptionsUrl; exports.rebaseCaptionsUrl = rebaseCaptionsUrl; exports.buildCaptionsUrl = buildCaptionsUrl; exports.getEntityCaptionUrls = getEntityCaptionUrls; exports.getEntityCaptionUrlsById = getEntityCaptionUrlsById; exports.captionsEntityTypeForDocType = captionsEntityTypeForDocType; exports.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; exports.VideoHoverPreviewSurface = VideoHoverPreviewSurface; exports.RATIO_GRID_CLASS = RATIO_GRID_CLASS; exports.RATIO_TO_CSS_ASPECT = RATIO_TO_CSS_ASPECT; exports.RatioTabs = RatioTabs; exports.detectAspectRatio = detectAspectRatio; exports.ratioToCategory = ratioToCategory; exports.groupByAspectRatio = groupByAspectRatio; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.DESIGN_DOC_READINESS = DESIGN_DOC_READINESS; exports.DESIGN_DOC_READINESS_DISPLAY = DESIGN_DOC_READINESS_DISPLAY; exports.designDocReadiness = designDocReadiness; exports.formatCompletionLabel = formatCompletionLabel; exports.formatCompletionLabelWithBlockers = formatCompletionLabelWithBlockers; exports.UnifiedSkeleton = UnifiedSkeleton; exports.TextSkeleton = TextSkeleton; exports.InteractiveSkeleton = InteractiveSkeleton; exports.MediaSkeleton = MediaSkeleton; exports.designDocPeople = designDocPeople; exports.designDocMetaLine = designDocMetaLine; exports.DesignDocCardSkeleton = DesignDocCardSkeleton; exports.DesignDocCard = DesignDocCard; exports.GitHubActivityCard = GitHubActivityCard; exports.GitHubActivityCardSkeleton = GitHubActivityCardSkeleton; exports.SlackMessageCard = SlackMessageCard; exports.SlackMessageCardSkeleton = SlackMessageCardSkeleton; exports.HubspotTicketCard = HubspotTicketCard; exports.HubspotTicketCardSkeleton = HubspotTicketCardSkeleton; exports.DataRoomDocCard = DataRoomDocCard; exports.DataRoomDocCardSkeleton = DataRoomDocCardSkeleton; exports.CampaignCardAdmin = CampaignCardAdmin; exports.CampaignCardAdminSkeleton = CampaignCardAdminSkeleton; exports.GenericEntityCard = GenericEntityCard; exports.GenericEntityCardSkeleton = GenericEntityCardSkeleton; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; exports.useChatCardItem = useChatCardItem; exports.clickupTaskUrl = clickupTaskUrl; exports.readFetchedCardTitle = readFetchedCardTitle; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.SOURCE_ICON_NAMES = SOURCE_ICON_NAMES; exports.getSourceIconName = getSourceIconName; exports.SOURCE_LABELS_BY_TABLE = SOURCE_LABELS_BY_TABLE; exports.getSourceLabel = getSourceLabel; exports.DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID; exports.defaultTableIdForDocumentType = defaultTableIdForDocumentType; exports.byKey = byKey; exports.getPlatformProductionUrl = getPlatformProductionUrl; exports.getPlatformUrl = getPlatformUrl; exports.getDeploymentUrl = getDeploymentUrl; exports.isLocalUrl = isLocalUrl; exports.getRequestOrigin = getRequestOrigin; exports.resolveRedirectTarget = resolveRedirectTarget; exports.getAllPlatformBaseDomains = getAllPlatformBaseDomains; exports.DOC_TABLE_TYPES = DOC_TABLE_TYPES; exports.groupsByTable = groupsByTable; exports.recordCountLabel = recordCountLabel; exports.buildGroupedSource = buildGroupedSource; exports.groupSourcesByTable = groupSourcesByTable; exports.formatCitationIndices = formatCitationIndices; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.chatCardLabel = chatCardLabel; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.NETWORK_CONFIG = NETWORK_CONFIG; exports.EMPTY_DIALOG_CAPABILITIES = EMPTY_DIALOG_CAPABILITIES; exports.useChunkCatchup = useChunkCatchup; exports.useScriptedStream = useScriptedStream; exports.RESYNC_AFTER_HIDDEN_MS = RESYNC_AFTER_HIDDEN_MS; exports.useJetStreamDialogSubscription = useJetStreamDialogSubscription; exports.useNatsDialogSubscription = useNatsDialogSubscription; exports.buildNatsWsUrl = buildNatsWsUrl; exports.fetchSlashCommands = fetchSlashCommands; exports.useSlashCommands = useSlashCommands; exports.useSlashCommandRegistry = useSlashCommandRegistry; exports.fetchEmptyStateConfig = fetchEmptyStateConfig; exports.useEmptyStateConfig = useEmptyStateConfig; exports.useChatAttachments = useChatAttachments; exports.useChatAttachmentImageGallery = useChatAttachmentImageGallery; exports.ChatIdentityProvider = ChatIdentityProvider; exports.useChatIdentity = useChatIdentity; exports.useCloseOnNavigation = useCloseOnNavigation; exports.useSSE = useSSE; exports.useChat = useChat; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.createEmptyTurnMeta = createEmptyTurnMeta; exports.createChatStreamReducer = createChatStreamReducer; exports.DEFAULT_DIALOG_SIDE = DEFAULT_DIALOG_SIDE; exports.DEFAULT_MAX_REDUCERS = DEFAULT_MAX_REDUCERS; exports.MAX_PENDING_RETAIN_KEYS = MAX_PENDING_RETAIN_KEYS; exports.createChatDialogStore = createChatDialogStore; exports.createDeltaBatcher = createDeltaBatcher; exports.useChatStreamReducer = useChatStreamReducer; exports.createChatConversationsApi = createChatConversationsApi; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.buildDiscussPrompt = buildDiscussPrompt; exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.useManagedDialogList = useManagedDialogList; exports.useSseChatAdapter = useSseChatAdapter; exports.extractIncompleteMessageState = extractIncompleteMessageState; exports.extractIncompleteTailState = extractIncompleteTailState; exports.decodeHistoricalMessageData = decodeHistoricalMessageData; exports.processHistoricalMessages = processHistoricalMessages; exports.extractErrorMessages = extractErrorMessages; exports.processHistoricalMessagesWithErrors = processHistoricalMessagesWithErrors; exports.mapProcessedToUnified = mapProcessedToUnified; exports.historicalToUnified = historicalToUnified; exports.useNatsChatAdapter = useNatsChatAdapter; exports.useStableShallow = useStableShallow; exports.useUnifiedChat = useUnifiedChat; exports.SYNTHETIC_REALTIME_ID_PREFIXES = SYNTHETIC_REALTIME_ID_PREFIXES; exports.flattenMessagePagesChronological = flattenMessagePagesChronological; exports.maxPersistedStreamSeq = maxPersistedStreamSeq; exports.mergeHistoryWithRealtime = mergeHistoryWithRealtime; exports.computeHistoryPrepend = computeHistoryPrepend; exports.CHIP_ACTION_BUTTON_CLASS = CHIP_ACTION_BUTTON_CLASS; exports.chatChipClass = chatChipClass; exports.flattenAssistantContent = flattenAssistantContent; exports.normalizeHistoricalMessageData = normalizeHistoricalMessageData; exports.isHistoricalUserTurn = isHistoricalUserTurn; exports.buildStreamFrames = buildStreamFrames; exports.EmbeddableChat = EmbeddableChat; exports.ProxyCredentialsPanel = ProxyCredentialsPanel;
|
|
27428
|
-
//# sourceMappingURL=chunk-
|
|
27425
|
+
//# sourceMappingURL=chunk-COX4CSXZ.cjs.map
|