@flamingo-stack/openframe-frontend-core 0.0.646 → 0.0.647
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-XJH5M2B7.js → chunk-5DCRDV7Y.js} +6 -6
- package/dist/{chunk-C6QUB6IS.cjs → chunk-5XBO6URE.cjs} +22 -22
- package/dist/{chunk-C6QUB6IS.cjs.map → chunk-5XBO6URE.cjs.map} +1 -1
- package/dist/{chunk-7UWJMWDH.cjs → chunk-5YW3GAUR.cjs} +660 -494
- package/dist/chunk-5YW3GAUR.cjs.map +1 -0
- package/dist/{chunk-ZDIDA4QG.js → chunk-6Z4GSQPB.js} +2 -2
- package/dist/{chunk-JFBUXYDK.cjs → chunk-ABVOAYYS.cjs} +15 -15
- package/dist/{chunk-JFBUXYDK.cjs.map → chunk-ABVOAYYS.cjs.map} +1 -1
- package/dist/{chunk-NWYSHZG7.cjs → chunk-AKM4AIZY.cjs} +22 -22
- package/dist/{chunk-NWYSHZG7.cjs.map → chunk-AKM4AIZY.cjs.map} +1 -1
- package/dist/{chunk-N2E26OD6.cjs → chunk-ASPNYVGE.cjs} +45 -45
- package/dist/{chunk-N2E26OD6.cjs.map → chunk-ASPNYVGE.cjs.map} +1 -1
- package/dist/{chunk-TZO743LD.cjs → chunk-DBSU5RAE.cjs} +3 -3
- package/dist/{chunk-TZO743LD.cjs.map → chunk-DBSU5RAE.cjs.map} +1 -1
- package/dist/{chunk-PD47DDHS.js → chunk-DIGCERY4.js} +3 -3
- package/dist/{chunk-NKMXFBV5.js → chunk-DLJHXLFG.js} +4 -4
- package/dist/{chunk-NZ66W56D.cjs → chunk-EG3PA7L2.cjs} +10 -10
- package/dist/{chunk-NZ66W56D.cjs.map → chunk-EG3PA7L2.cjs.map} +1 -1
- package/dist/{chunk-5C7GMRJU.js → chunk-ERLGZPCY.js} +5 -5
- package/dist/{chunk-2V7SCIOG.cjs → chunk-EZ6HGRLP.cjs} +33 -33
- package/dist/{chunk-2V7SCIOG.cjs.map → chunk-EZ6HGRLP.cjs.map} +1 -1
- package/dist/{chunk-X2VTQ3TL.cjs → chunk-F4I46MKF.cjs} +10 -10
- package/dist/{chunk-X2VTQ3TL.cjs.map → chunk-F4I46MKF.cjs.map} +1 -1
- package/dist/{chunk-WJ7PDBPK.cjs → chunk-IBTOED4M.cjs} +4 -4
- package/dist/{chunk-WJ7PDBPK.cjs.map → chunk-IBTOED4M.cjs.map} +1 -1
- package/dist/{chunk-XATBOM3X.js → chunk-IKMETQWQ.js} +5 -5
- package/dist/{chunk-QS55P2TA.js → chunk-L6ES7O6B.js} +6 -6
- package/dist/chunk-L6ES7O6B.js.map +1 -0
- package/dist/{chunk-H4FQRA5O.cjs → chunk-MKGAIWQ5.cjs} +3 -3
- package/dist/{chunk-H4FQRA5O.cjs.map → chunk-MKGAIWQ5.cjs.map} +1 -1
- package/dist/{chunk-DULSS7R6.js → chunk-N6ZYJXVJ.js} +709 -543
- package/dist/chunk-N6ZYJXVJ.js.map +1 -0
- package/dist/{chunk-ZW2BEEX2.cjs → chunk-Q2XH3HW6.cjs} +25 -25
- package/dist/{chunk-ZW2BEEX2.cjs.map → chunk-Q2XH3HW6.cjs.map} +1 -1
- package/dist/{chunk-XPPGI7SD.js → chunk-QPAQEPA3.js} +2 -2
- package/dist/{chunk-ZGWXD2S3.js → chunk-RIOWS34T.js} +3 -3
- package/dist/{chunk-AYAZU3BO.cjs → chunk-RSRYEVGZ.cjs} +5 -5
- package/dist/{chunk-AYAZU3BO.cjs.map → chunk-RSRYEVGZ.cjs.map} +1 -1
- package/dist/{chunk-UR7BC74V.js → chunk-RUEVZAPN.js} +3 -3
- package/dist/{chunk-5MZZFTME.js → chunk-RXIFYEL7.js} +5 -5
- package/dist/{chunk-LDJ4TIDC.cjs → chunk-SS2RN4TU.cjs} +9 -9
- package/dist/{chunk-LDJ4TIDC.cjs.map → chunk-SS2RN4TU.cjs.map} +1 -1
- package/dist/{chunk-GBZ3IR3S.js → chunk-T7NBMDDE.js} +2 -2
- package/dist/{chunk-5JVN3EVT.cjs → chunk-TO4UY3P5.cjs} +71 -71
- package/dist/{chunk-5JVN3EVT.cjs.map → chunk-TO4UY3P5.cjs.map} +1 -1
- package/dist/{chunk-4GOJFHJY.js → chunk-V33TSVUR.js} +2 -2
- package/dist/{chunk-LLT5XMP2.js → chunk-VXG43NJD.js} +3 -3
- package/dist/{chunk-RRSR2XHJ.cjs → chunk-YCSYKAT2.cjs} +167 -167
- package/dist/chunk-YCSYKAT2.cjs.map +1 -0
- package/dist/{chunk-ETEM2ZD4.js → chunk-ZNSBWM2D.js} +3 -3
- package/dist/components/case-studies/index.cjs +14 -14
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +23 -23
- package/dist/components/help-center-pages/index.js +14 -14
- package/dist/components/index.cjs +39 -39
- package/dist/components/index.js +13 -13
- package/dist/components/meeting-scheduler/index.cjs +24 -24
- package/dist/components/meeting-scheduler/index.js +2 -2
- package/dist/components/navigation/index.cjs +6 -6
- package/dist/components/navigation/index.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/onboarding-guides/index.js +5 -5
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/data-table/data-table-skeleton.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/components/ui/markdown/mermaid-diagram.d.ts +31 -9
- package/dist/components/ui/markdown/mermaid-diagram.d.ts.map +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/package.json +1 -1
- package/src/components/ui/data-table/data-table-skeleton.tsx +15 -7
- package/src/components/ui/markdown/__tests__/mermaid-zoom.test.tsx +115 -0
- package/src/components/ui/markdown/mermaid-diagram.tsx +279 -59
- package/dist/chunk-7UWJMWDH.cjs.map +0 -1
- package/dist/chunk-DULSS7R6.js.map +0 -1
- package/dist/chunk-QS55P2TA.js.map +0 -1
- package/dist/chunk-RRSR2XHJ.cjs.map +0 -1
- /package/dist/{chunk-XJH5M2B7.js.map → chunk-5DCRDV7Y.js.map} +0 -0
- /package/dist/{chunk-ZDIDA4QG.js.map → chunk-6Z4GSQPB.js.map} +0 -0
- /package/dist/{chunk-PD47DDHS.js.map → chunk-DIGCERY4.js.map} +0 -0
- /package/dist/{chunk-NKMXFBV5.js.map → chunk-DLJHXLFG.js.map} +0 -0
- /package/dist/{chunk-5C7GMRJU.js.map → chunk-ERLGZPCY.js.map} +0 -0
- /package/dist/{chunk-XATBOM3X.js.map → chunk-IKMETQWQ.js.map} +0 -0
- /package/dist/{chunk-XPPGI7SD.js.map → chunk-QPAQEPA3.js.map} +0 -0
- /package/dist/{chunk-ZGWXD2S3.js.map → chunk-RIOWS34T.js.map} +0 -0
- /package/dist/{chunk-UR7BC74V.js.map → chunk-RUEVZAPN.js.map} +0 -0
- /package/dist/{chunk-5MZZFTME.js.map → chunk-RXIFYEL7.js.map} +0 -0
- /package/dist/{chunk-GBZ3IR3S.js.map → chunk-T7NBMDDE.js.map} +0 -0
- /package/dist/{chunk-4GOJFHJY.js.map → chunk-V33TSVUR.js.map} +0 -0
- /package/dist/{chunk-LLT5XMP2.js.map → chunk-VXG43NJD.js.map} +0 -0
- /package/dist/{chunk-ETEM2ZD4.js.map → chunk-ZNSBWM2D.js.map} +0 -0
|
@@ -1378,6 +1378,7 @@ function extractText(node) {
|
|
|
1378
1378
|
// src/components/ui/markdown/mermaid-diagram.tsx
|
|
1379
1379
|
|
|
1380
1380
|
|
|
1381
|
+
|
|
1381
1382
|
// src/hooks/ui/use-is-hydrated.ts
|
|
1382
1383
|
|
|
1383
1384
|
var subscribe = () => () => {
|
|
@@ -1435,38 +1436,17 @@ async function withRenderTimeout(promise, ms) {
|
|
|
1435
1436
|
}
|
|
1436
1437
|
}
|
|
1437
1438
|
var mermaidStyles = `
|
|
1439
|
+
/* The pan surface is a scroll region with NO scrollbars: drag, wheel,
|
|
1440
|
+
arrows and the toolbar move it (a canvas, the way dbdiagram, Figma and
|
|
1441
|
+
Excalidraw draw one). Two mechanisms for one motion read as a bug. */
|
|
1442
|
+
.mermaid-frame-pan { scrollbar-width: none; -ms-overflow-style: none; }
|
|
1443
|
+
.mermaid-frame-pan::-webkit-scrollbar { display: none; }
|
|
1438
1444
|
.mermaid-svg-container svg {
|
|
1439
|
-
max-width: 100
|
|
1440
|
-
height: auto
|
|
1441
|
-
min-height: 200px;
|
|
1445
|
+
max-width: 100%;
|
|
1446
|
+
height: auto;
|
|
1442
1447
|
font-family: 'DM Sans', sans-serif !important;
|
|
1443
1448
|
font-size: 14px !important;
|
|
1444
1449
|
}
|
|
1445
|
-
@media (min-width: 1520px) {
|
|
1446
|
-
.mermaid-svg-container svg {
|
|
1447
|
-
max-width: 900px !important;
|
|
1448
|
-
max-height: 700px !important;
|
|
1449
|
-
min-height: 300px;
|
|
1450
|
-
font-size: 16px !important;
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
@media (min-width: 768px) and (max-width: 1519px) {
|
|
1454
|
-
.mermaid-svg-container svg {
|
|
1455
|
-
max-width: 700px !important;
|
|
1456
|
-
max-height: 600px !important;
|
|
1457
|
-
min-height: 250px;
|
|
1458
|
-
font-size: 15px !important;
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
@media (max-width: 767px) {
|
|
1462
|
-
.mermaid-svg-container svg {
|
|
1463
|
-
max-width: 90vw !important;
|
|
1464
|
-
max-height: 400px !important;
|
|
1465
|
-
min-height: 200px;
|
|
1466
|
-
font-size: 13px !important;
|
|
1467
|
-
}
|
|
1468
|
-
}
|
|
1469
|
-
.mermaid-svg-container svg[width] { width: 100% !important; }
|
|
1470
1450
|
.mermaid-svg-container .node rect,
|
|
1471
1451
|
.mermaid-svg-container .node circle,
|
|
1472
1452
|
.mermaid-svg-container .node ellipse,
|
|
@@ -1481,15 +1461,122 @@ var mermaidStyles = `
|
|
|
1481
1461
|
.mermaid-svg-container .edgeLabel text { font-size: 16px !important; }
|
|
1482
1462
|
}
|
|
1483
1463
|
`;
|
|
1464
|
+
var MERMAID_ZOOM_MIN = 0.25;
|
|
1465
|
+
var MERMAID_ZOOM_MAX = 4;
|
|
1466
|
+
var MERMAID_ZOOM_STEP = 1.25;
|
|
1467
|
+
var clampZoom = (z) => Math.min(MERMAID_ZOOM_MAX, Math.max(MERMAID_ZOOM_MIN, z));
|
|
1484
1468
|
var mermaidRenderSeq = 0;
|
|
1485
|
-
var
|
|
1469
|
+
var FRAME_CLASS = {
|
|
1470
|
+
content: "min-h-[200px] max-h-[70svh] md:min-h-[250px]",
|
|
1471
|
+
fold: "h-[70svh] min-h-[320px]"
|
|
1472
|
+
};
|
|
1473
|
+
var MermaidDiagram = ({
|
|
1474
|
+
chart,
|
|
1475
|
+
zoomable = true,
|
|
1476
|
+
frame = "content"
|
|
1477
|
+
}) => {
|
|
1486
1478
|
const [svg, setSvg] = _react.useState.call(void 0, "");
|
|
1487
1479
|
const [error, setError] = _react.useState.call(void 0, "");
|
|
1488
1480
|
const [isLoading, setIsLoading] = _react.useState.call(void 0, true);
|
|
1481
|
+
const [zoom, setZoom] = _react.useState.call(void 0, 1);
|
|
1482
|
+
const [dragging, setDragging] = _react.useState.call(void 0, false);
|
|
1483
|
+
const empty = !chart.trim();
|
|
1484
|
+
const naturalWidth = _react.useMemo.call(void 0, () => {
|
|
1485
|
+
const px = Number(_optionalChain([svg, 'access', _27 => _27.match, 'call', _28 => _28(/max-width:\s*([\d.]+)px/), 'optionalAccess', _29 => _29[1]]));
|
|
1486
|
+
return Number.isFinite(px) && px > 0 ? Math.ceil(px) : null;
|
|
1487
|
+
}, [svg]);
|
|
1488
|
+
const scrollRef = _react.useRef.call(void 0, null);
|
|
1489
|
+
const pendingAnchor = _react.useRef.call(void 0, null);
|
|
1490
|
+
const applyZoom = _react.useCallback.call(void 0, (next, anchor) => {
|
|
1491
|
+
setZoom((current) => {
|
|
1492
|
+
const target = clampZoom(Math.round(next * 100) / 100);
|
|
1493
|
+
if (target === current) return current;
|
|
1494
|
+
const el = scrollRef.current;
|
|
1495
|
+
const ax = _nullishCoalesce(_optionalChain([anchor, 'optionalAccess', _30 => _30.ax]), () => ( (el ? el.clientWidth / 2 : 0)));
|
|
1496
|
+
const ay = _nullishCoalesce(_optionalChain([anchor, 'optionalAccess', _31 => _31.ay]), () => ( (el ? el.clientHeight / 2 : 0)));
|
|
1497
|
+
pendingAnchor.current = { ratio: target / current, ax, ay };
|
|
1498
|
+
return target;
|
|
1499
|
+
});
|
|
1500
|
+
}, []);
|
|
1501
|
+
_react.useLayoutEffect.call(void 0, () => {
|
|
1502
|
+
const el = scrollRef.current;
|
|
1503
|
+
const pending = pendingAnchor.current;
|
|
1504
|
+
if (!el || !pending) return;
|
|
1505
|
+
pendingAnchor.current = null;
|
|
1506
|
+
el.scrollLeft = (el.scrollLeft + pending.ax) * pending.ratio - pending.ax;
|
|
1507
|
+
el.scrollTop = (el.scrollTop + pending.ay) * pending.ratio - pending.ay;
|
|
1508
|
+
}, [zoom]);
|
|
1509
|
+
const zoomBy = _react.useCallback.call(void 0,
|
|
1510
|
+
(factor, anchor) => applyZoom(zoom * factor, anchor),
|
|
1511
|
+
[applyZoom, zoom]
|
|
1512
|
+
);
|
|
1513
|
+
const fit = _react.useCallback.call(void 0, () => {
|
|
1514
|
+
const el = scrollRef.current;
|
|
1515
|
+
const svgEl = _optionalChain([el, 'optionalAccess', _32 => _32.querySelector, 'call', _33 => _33("svg")]);
|
|
1516
|
+
if (!el || !svgEl) return;
|
|
1517
|
+
const box = svgEl.getBoundingClientRect();
|
|
1518
|
+
const w = box.width / zoom;
|
|
1519
|
+
const h = box.height / zoom;
|
|
1520
|
+
if (!(w > 0 && h > 0)) return;
|
|
1521
|
+
const next = Math.min(1, el.clientWidth / w, el.clientHeight / h);
|
|
1522
|
+
pendingAnchor.current = null;
|
|
1523
|
+
setZoom(clampZoom(Math.floor(next * 100) / 100));
|
|
1524
|
+
el.scrollTo({ left: 0, top: 0 });
|
|
1525
|
+
}, [zoom]);
|
|
1526
|
+
_react.useEffect.call(void 0, () => {
|
|
1527
|
+
const el = scrollRef.current;
|
|
1528
|
+
if (!el || !zoomable) return void 0;
|
|
1529
|
+
const onWheel = (e) => {
|
|
1530
|
+
if (!(e.ctrlKey || e.metaKey)) return;
|
|
1531
|
+
e.preventDefault();
|
|
1532
|
+
const rect = el.getBoundingClientRect();
|
|
1533
|
+
applyZoom(zoom * Math.exp(-e.deltaY * 25e-4), { ax: e.clientX - rect.left, ay: e.clientY - rect.top });
|
|
1534
|
+
};
|
|
1535
|
+
el.addEventListener("wheel", onWheel, { passive: false });
|
|
1536
|
+
return () => el.removeEventListener("wheel", onWheel);
|
|
1537
|
+
}, [zoomable, svg, zoom, applyZoom]);
|
|
1538
|
+
const drag = _react.useRef.call(void 0, null);
|
|
1539
|
+
const onPointerDown = (e) => {
|
|
1540
|
+
if (!zoomable || e.button !== 0 || e.pointerType === "touch") return;
|
|
1541
|
+
const el = scrollRef.current;
|
|
1542
|
+
if (!el) return;
|
|
1543
|
+
e.preventDefault();
|
|
1544
|
+
drag.current = { x: e.clientX, y: e.clientY, left: el.scrollLeft, top: el.scrollTop };
|
|
1545
|
+
_optionalChain([el, 'access', _34 => _34.setPointerCapture, 'optionalCall', _35 => _35(e.pointerId)]);
|
|
1546
|
+
el.focus({ preventScroll: true });
|
|
1547
|
+
setDragging(true);
|
|
1548
|
+
};
|
|
1549
|
+
const onPointerMove = (e) => {
|
|
1550
|
+
const d = drag.current;
|
|
1551
|
+
const el = scrollRef.current;
|
|
1552
|
+
if (!d || !el) return;
|
|
1553
|
+
el.scrollLeft = d.left - (e.clientX - d.x);
|
|
1554
|
+
el.scrollTop = d.top - (e.clientY - d.y);
|
|
1555
|
+
};
|
|
1556
|
+
const endDrag = (e) => {
|
|
1557
|
+
if (!drag.current) return;
|
|
1558
|
+
drag.current = null;
|
|
1559
|
+
_optionalChain([scrollRef, 'access', _36 => _36.current, 'optionalAccess', _37 => _37.releasePointerCapture, 'optionalCall', _38 => _38(e.pointerId)]);
|
|
1560
|
+
setDragging(false);
|
|
1561
|
+
};
|
|
1562
|
+
const onKeyDown = (e) => {
|
|
1563
|
+
if (!zoomable || !svg) return;
|
|
1564
|
+
if (e.key === "+" || e.key === "=") zoomBy(MERMAID_ZOOM_STEP);
|
|
1565
|
+
else if (e.key === "-") zoomBy(1 / MERMAID_ZOOM_STEP);
|
|
1566
|
+
else if (e.key === "0") applyZoom(1);
|
|
1567
|
+
else if (e.key === "f" || e.key === "F") fit();
|
|
1568
|
+
else return;
|
|
1569
|
+
e.preventDefault();
|
|
1570
|
+
};
|
|
1489
1571
|
const mounted = useIsHydrated();
|
|
1490
1572
|
_react.useEffect.call(void 0, () => {
|
|
1491
1573
|
let cancelled = false;
|
|
1492
1574
|
const renderId = `mermaid-${mermaidRenderSeq += 1}`;
|
|
1575
|
+
if (empty) {
|
|
1576
|
+
return () => {
|
|
1577
|
+
cancelled = true;
|
|
1578
|
+
};
|
|
1579
|
+
}
|
|
1493
1580
|
const renderMermaid = async () => {
|
|
1494
1581
|
try {
|
|
1495
1582
|
setIsLoading(true);
|
|
@@ -1539,6 +1626,8 @@ var MermaidDiagram = ({ chart }) => {
|
|
|
1539
1626
|
);
|
|
1540
1627
|
if (cancelled) return;
|
|
1541
1628
|
setSvg(renderedSvg);
|
|
1629
|
+
pendingAnchor.current = null;
|
|
1630
|
+
setZoom(1);
|
|
1542
1631
|
setError("");
|
|
1543
1632
|
setIsLoading(false);
|
|
1544
1633
|
} catch (err) {
|
|
@@ -1553,36 +1642,113 @@ var MermaidDiagram = ({ chart }) => {
|
|
|
1553
1642
|
}
|
|
1554
1643
|
return () => {
|
|
1555
1644
|
cancelled = true;
|
|
1556
|
-
_optionalChain([document, 'access',
|
|
1557
|
-
_optionalChain([document, 'access',
|
|
1645
|
+
_optionalChain([document, 'access', _39 => _39.getElementById, 'call', _40 => _40(`d${renderId}`), 'optionalAccess', _41 => _41.remove, 'call', _42 => _42()]);
|
|
1646
|
+
_optionalChain([document, 'access', _43 => _43.getElementById, 'call', _44 => _44(renderId), 'optionalAccess', _45 => _45.remove, 'call', _46 => _46()]);
|
|
1558
1647
|
};
|
|
1559
|
-
}, [chart, mounted]);
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1648
|
+
}, [chart, empty, mounted]);
|
|
1649
|
+
const frameClass = `${FRAME_CLASS[frame]} flex w-full overflow-auto outline-none focus-visible:ring-1 focus-visible:ring-ods-accent ${zoomable && svg ? `mermaid-frame-pan select-none ${dragging ? "cursor-grabbing" : "cursor-grab"}` : ""}`;
|
|
1650
|
+
const frameStyle = { justifyContent: "safe center", alignItems: "safe center" };
|
|
1651
|
+
const body = error && !empty ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "error-state m-auto rounded-lg border border-ods-border bg-ods-card p-6", children: [
|
|
1652
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "error-icon mb-4 flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.AlertCircleIcon, { className: "h-12 w-12 text-ods-error" }) }),
|
|
1653
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "error-title mb-2 text-center font-sans text-lg font-semibold text-ods-error", children: "Diagram Error" }),
|
|
1654
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "error-description mb-4 max-w-full overflow-hidden break-words text-center font-sans text-sm text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "pre", { className: "whitespace-pre-wrap break-words text-xs", children: error }) }) })
|
|
1655
|
+
] }) : empty || isLoading || !svg ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "skeleton-code m-auto animate-pulse font-sans text-ods-text-tertiary", children: isLoading ? "Loading diagram renderer..." : "Rendering diagram..." }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1656
|
+
"div",
|
|
1657
|
+
{
|
|
1658
|
+
className: "mermaid-svg-container flex shrink-0 justify-center",
|
|
1659
|
+
"data-testid": "mermaid-svg-container",
|
|
1660
|
+
"data-zoom": zoom,
|
|
1661
|
+
style: {
|
|
1662
|
+
fontSize: "14px",
|
|
1663
|
+
zoom,
|
|
1664
|
+
width: naturalWidth ? `min(${naturalWidth}px, calc(100% * ${zoom}))` : "100%"
|
|
1665
|
+
},
|
|
1666
|
+
dangerouslySetInnerHTML: { __html: svg }
|
|
1667
|
+
}
|
|
1668
|
+
);
|
|
1669
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mermaid-container relative my-6 rounded-lg border border-ods-border bg-ods-card p-4 md:p-6 lg:p-8", children: [
|
|
1571
1670
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "style", { dangerouslySetInnerHTML: { __html: mermaidStyles } }),
|
|
1572
|
-
|
|
1671
|
+
zoomable && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1573
1672
|
"div",
|
|
1574
1673
|
{
|
|
1575
|
-
className: "
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1674
|
+
className: "absolute right-2 top-2 z-10 flex items-center gap-[var(--spacing-system-xxs)] rounded-md bg-ods-card",
|
|
1675
|
+
role: "group",
|
|
1676
|
+
"aria-label": "Diagram zoom",
|
|
1677
|
+
children: [
|
|
1678
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1679
|
+
_chunkF6U2H42Lcjs.Button,
|
|
1680
|
+
{
|
|
1681
|
+
variant: "outline",
|
|
1682
|
+
size: "icon-sm",
|
|
1683
|
+
"aria-label": "Zoom out",
|
|
1684
|
+
title: "Zoom out (\u2212, \u2318/Ctrl + wheel)",
|
|
1685
|
+
disabled: !svg || zoom <= MERMAID_ZOOM_MIN,
|
|
1686
|
+
onClick: () => zoomBy(1 / MERMAID_ZOOM_STEP),
|
|
1687
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ZoomOut, {})
|
|
1688
|
+
}
|
|
1689
|
+
),
|
|
1690
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1691
|
+
_chunkF6U2H42Lcjs.Button,
|
|
1692
|
+
{
|
|
1693
|
+
variant: "outline",
|
|
1694
|
+
size: "compact",
|
|
1695
|
+
"aria-label": "Reset zoom",
|
|
1696
|
+
title: "Back to 100% (0)",
|
|
1697
|
+
disabled: !svg || zoom === 1,
|
|
1698
|
+
onClick: () => applyZoom(1),
|
|
1699
|
+
children: [
|
|
1700
|
+
Math.round(zoom * 100),
|
|
1701
|
+
"%"
|
|
1702
|
+
]
|
|
1703
|
+
}
|
|
1704
|
+
),
|
|
1705
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1706
|
+
_chunkF6U2H42Lcjs.Button,
|
|
1707
|
+
{
|
|
1708
|
+
variant: "outline",
|
|
1709
|
+
size: "icon-sm",
|
|
1710
|
+
"aria-label": "Zoom in",
|
|
1711
|
+
title: "Zoom in (+, \u2318/Ctrl + wheel)",
|
|
1712
|
+
disabled: !svg || zoom >= MERMAID_ZOOM_MAX,
|
|
1713
|
+
onClick: () => zoomBy(MERMAID_ZOOM_STEP),
|
|
1714
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ZoomIn, {})
|
|
1715
|
+
}
|
|
1716
|
+
),
|
|
1717
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1718
|
+
_chunkF6U2H42Lcjs.Button,
|
|
1719
|
+
{
|
|
1720
|
+
variant: "outline",
|
|
1721
|
+
size: "icon-sm",
|
|
1722
|
+
"aria-label": "Fit to frame",
|
|
1723
|
+
title: "Fit the whole diagram in the frame (f)",
|
|
1724
|
+
disabled: !svg,
|
|
1725
|
+
onClick: fit,
|
|
1726
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Maximize2, {})
|
|
1727
|
+
}
|
|
1582
1728
|
)
|
|
1583
|
-
|
|
1729
|
+
]
|
|
1584
1730
|
}
|
|
1585
|
-
)
|
|
1731
|
+
),
|
|
1732
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1733
|
+
"div",
|
|
1734
|
+
{
|
|
1735
|
+
ref: scrollRef,
|
|
1736
|
+
className: frameClass,
|
|
1737
|
+
style: frameStyle,
|
|
1738
|
+
"data-testid": "mermaid-frame",
|
|
1739
|
+
"data-frame": frame,
|
|
1740
|
+
tabIndex: zoomable && svg ? 0 : -1,
|
|
1741
|
+
role: zoomable && svg ? "region" : void 0,
|
|
1742
|
+
"aria-label": zoomable && svg ? "Diagram. Drag to pan; Ctrl or Cmd plus wheel, or + and -, to zoom; 0 resets; f fits." : void 0,
|
|
1743
|
+
title: zoomable && svg ? "Drag to pan \xB7 \u2318/Ctrl + wheel to zoom" : void 0,
|
|
1744
|
+
onPointerDown,
|
|
1745
|
+
onPointerMove,
|
|
1746
|
+
onPointerUp: endDrag,
|
|
1747
|
+
onPointerCancel: endDrag,
|
|
1748
|
+
onKeyDown,
|
|
1749
|
+
children: body
|
|
1750
|
+
}
|
|
1751
|
+
)
|
|
1586
1752
|
] });
|
|
1587
1753
|
};
|
|
1588
1754
|
|
|
@@ -1661,7 +1827,7 @@ function buildBaseComponents({
|
|
|
1661
1827
|
function MarkdownHeading({ node, children }) {
|
|
1662
1828
|
const mapped = useHeadingId(node);
|
|
1663
1829
|
const taken = useAssignedHeadingIds();
|
|
1664
|
-
const explicit = typeof _optionalChain([node, 'optionalAccess',
|
|
1830
|
+
const explicit = typeof _optionalChain([node, 'optionalAccess', _47 => _47.properties, 'optionalAccess', _48 => _48.id]) === "string" && node.properties.id !== "" ? node.properties.id : void 0;
|
|
1665
1831
|
const id = _nullishCoalesce(_nullishCoalesce(explicit, () => ( mapped)), () => ( resolveFallbackHeadingId(_chunkTLLJIGTPcjs.slugifyHeadingText.call(void 0, extractText(children)), taken)));
|
|
1666
1832
|
const EffectiveTag = Tag2 === "h1" && demoteMarkdownH1ToH2 ? "h2" : Tag2;
|
|
1667
1833
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EffectiveTag, { id: id || void 0, className: headingClassName, children });
|
|
@@ -1738,7 +1904,7 @@ function buildBaseComponents({
|
|
|
1738
1904
|
if (inPageAnchorId === null) return;
|
|
1739
1905
|
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0) return;
|
|
1740
1906
|
const target = _chunkTLLJIGTPcjs.getHashTargetElement.call(void 0, inPageAnchorId);
|
|
1741
|
-
if (!_optionalChain([target, 'optionalAccess',
|
|
1907
|
+
if (!_optionalChain([target, 'optionalAccess', _49 => _49.id])) return;
|
|
1742
1908
|
e.preventDefault();
|
|
1743
1909
|
_chunkTLLJIGTPcjs.navigateSamePageHash.call(void 0, `#${target.id}`, { headerOffset: _chunkTLLJIGTPcjs.HUB_HEADER_OFFSET_PX });
|
|
1744
1910
|
};
|
|
@@ -1747,8 +1913,8 @@ function buildBaseComponents({
|
|
|
1747
1913
|
{
|
|
1748
1914
|
href,
|
|
1749
1915
|
className: `relative text-ods-accent no-underline transition-colors duration-200 after:absolute after:-bottom-0.5 after:left-0 after:h-0.5 after:w-0 after:bg-ods-accent after:transition-all after:duration-300 after:content-[''] hover:after:w-full ${linkClassName || ""}`,
|
|
1750
|
-
target: _optionalChain([href, 'optionalAccess',
|
|
1751
|
-
rel: _optionalChain([href, 'optionalAccess',
|
|
1916
|
+
target: _optionalChain([href, 'optionalAccess', _50 => _50.startsWith, 'call', _51 => _51("http")]) ? "_blank" : void 0,
|
|
1917
|
+
rel: _optionalChain([href, 'optionalAccess', _52 => _52.startsWith, 'call', _53 => _53("http")]) ? "noopener noreferrer" : void 0,
|
|
1752
1918
|
onClick: inPageAnchorId !== null ? handleAnchorClick : void 0,
|
|
1753
1919
|
children
|
|
1754
1920
|
}
|
|
@@ -2153,7 +2319,7 @@ function buildSanitizeSchema(options = {}) {
|
|
|
2153
2319
|
clobber: [],
|
|
2154
2320
|
protocols: {
|
|
2155
2321
|
..._rehypesanitize.defaultSchema.protocols,
|
|
2156
|
-
href: [..._nullishCoalesce(_optionalChain([_rehypesanitize.defaultSchema, 'access',
|
|
2322
|
+
href: [..._nullishCoalesce(_optionalChain([_rehypesanitize.defaultSchema, 'access', _54 => _54.protocols, 'optionalAccess', _55 => _55.href]), () => ( [])), "card", "mention"]
|
|
2157
2323
|
}
|
|
2158
2324
|
};
|
|
2159
2325
|
}
|
|
@@ -2385,7 +2551,7 @@ function visualColumn(line, upTo) {
|
|
|
2385
2551
|
return col;
|
|
2386
2552
|
}
|
|
2387
2553
|
function leadingIndent(line) {
|
|
2388
|
-
const ws = _nullishCoalesce(_optionalChain([/^[ \t]*/, 'access',
|
|
2554
|
+
const ws = _nullishCoalesce(_optionalChain([/^[ \t]*/, 'access', _56 => _56.exec, 'call', _57 => _57(line), 'optionalAccess', _58 => _58[0]]), () => ( ""));
|
|
2389
2555
|
return visualColumn(line, ws.length);
|
|
2390
2556
|
}
|
|
2391
2557
|
function charIndexAtColumn(line, col) {
|
|
@@ -2487,7 +2653,7 @@ var LINK_DEF_CONT_PREFIX_RE = / {0,3}(?:>[ \t]?)*[ \t]{0,16}/y;
|
|
|
2487
2653
|
var LINK_DEF_OPEN_RE = new RegExp(`^${LINK_DEF_CONTAINER_PREFIX}\\[(?!\\^)`);
|
|
2488
2654
|
function contPrefixLen(c) {
|
|
2489
2655
|
LINK_DEF_CONT_PREFIX_RE.lastIndex = 0;
|
|
2490
|
-
return _nullishCoalesce(_optionalChain([LINK_DEF_CONT_PREFIX_RE, 'access',
|
|
2656
|
+
return _nullishCoalesce(_optionalChain([LINK_DEF_CONT_PREFIX_RE, 'access', _59 => _59.exec, 'call', _60 => _60(c), 'optionalAccess', _61 => _61[0], 'access', _62 => _62.length]), () => ( 0));
|
|
2491
2657
|
}
|
|
2492
2658
|
function findLabelClose(lines, i, from) {
|
|
2493
2659
|
for (let j = i; j < lines.length; j++) {
|
|
@@ -2655,7 +2821,7 @@ function blankTagAttributes(masked) {
|
|
|
2655
2821
|
}
|
|
2656
2822
|
function footnoteIndentCols(c) {
|
|
2657
2823
|
FOOTNOTE_QUOTE_PREFIX_RE.lastIndex = 0;
|
|
2658
|
-
let q = _nullishCoalesce(_optionalChain([FOOTNOTE_QUOTE_PREFIX_RE, 'access',
|
|
2824
|
+
let q = _nullishCoalesce(_optionalChain([FOOTNOTE_QUOTE_PREFIX_RE, 'access', _63 => _63.exec, 'call', _64 => _64(c), 'optionalAccess', _65 => _65[0], 'access', _66 => _66.length]), () => ( 0));
|
|
2659
2825
|
let col = 0;
|
|
2660
2826
|
for (; q < c.length && isSpaceTab(c[q]); q++) col = c[q] === " " ? col + 4 - col % 4 : col + 1;
|
|
2661
2827
|
return col;
|
|
@@ -3516,7 +3682,7 @@ var MarkdownEngineImpl = ({
|
|
|
3516
3682
|
streaming = false
|
|
3517
3683
|
}) => {
|
|
3518
3684
|
const textSizes = _react.useMemo.call(void 0, () => resolveTextSizeConfig(textSize), [textSize]);
|
|
3519
|
-
const extraTagsKey = _nullishCoalesce(_optionalChain([extraAllowedHtmlTags, 'optionalAccess',
|
|
3685
|
+
const extraTagsKey = _nullishCoalesce(_optionalChain([extraAllowedHtmlTags, 'optionalAccess', _67 => _67.join, 'call', _68 => _68("|")]), () => ( ""));
|
|
3520
3686
|
const effectiveTags = _react.useMemo.call(void 0,
|
|
3521
3687
|
() => buildEffectiveTagSet(extraTagsKey ? extraTagsKey.split("|") : void 0),
|
|
3522
3688
|
[extraTagsKey]
|
|
@@ -3751,7 +3917,7 @@ var AskDisplay = _react.forwardRef.call(void 0, ({ className, cards: cards2, onS
|
|
|
3751
3917
|
{
|
|
3752
3918
|
type: "button",
|
|
3753
3919
|
disabled: !isInteractive,
|
|
3754
|
-
onClick: () => _optionalChain([onSelect, 'optionalCall',
|
|
3920
|
+
onClick: () => _optionalChain([onSelect, 'optionalCall', _69 => _69(option.label)]),
|
|
3755
3921
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
3756
3922
|
"flex w-full items-start gap-[var(--spacing-system-s)] bg-ods-card p-[var(--spacing-system-s)] text-left transition-colors",
|
|
3757
3923
|
optionIndex > 0 && "border-t border-ods-border",
|
|
@@ -4243,13 +4409,13 @@ function OverlayOpenRegistryProvider({ onOpenChange, children }) {
|
|
|
4243
4409
|
() => ({
|
|
4244
4410
|
acquire: () => {
|
|
4245
4411
|
countRef.current += 1;
|
|
4246
|
-
if (countRef.current === 1) _optionalChain([onOpenChangeRef, 'access',
|
|
4412
|
+
if (countRef.current === 1) _optionalChain([onOpenChangeRef, 'access', _70 => _70.current, 'optionalCall', _71 => _71(true)]);
|
|
4247
4413
|
let released = false;
|
|
4248
4414
|
return () => {
|
|
4249
4415
|
if (released) return;
|
|
4250
4416
|
released = true;
|
|
4251
4417
|
countRef.current -= 1;
|
|
4252
|
-
if (countRef.current === 0) _optionalChain([onOpenChangeRef, 'access',
|
|
4418
|
+
if (countRef.current === 0) _optionalChain([onOpenChangeRef, 'access', _72 => _72.current, 'optionalCall', _73 => _73(false)]);
|
|
4253
4419
|
};
|
|
4254
4420
|
}
|
|
4255
4421
|
}),
|
|
@@ -4272,7 +4438,7 @@ var SecondaryAction = ({ action }) => {
|
|
|
4272
4438
|
e.preventDefault();
|
|
4273
4439
|
return;
|
|
4274
4440
|
}
|
|
4275
|
-
_optionalChain([action, 'access',
|
|
4441
|
+
_optionalChain([action, 'access', _74 => _74.onClick, 'optionalCall', _75 => _75()]);
|
|
4276
4442
|
},
|
|
4277
4443
|
[action]
|
|
4278
4444
|
);
|
|
@@ -4316,13 +4482,13 @@ var MenuItem = ({ item, onItemClick }) => {
|
|
|
4316
4482
|
const activate = _react.useCallback.call(void 0, () => {
|
|
4317
4483
|
if (item.disabled) return;
|
|
4318
4484
|
if (item.type === "checkbox") {
|
|
4319
|
-
_optionalChain([item, 'access',
|
|
4320
|
-
_optionalChain([onItemClick, 'optionalCall',
|
|
4485
|
+
_optionalChain([item, 'access', _76 => _76.onClick, 'optionalCall', _77 => _77()]);
|
|
4486
|
+
_optionalChain([onItemClick, 'optionalCall', _78 => _78(item)]);
|
|
4321
4487
|
return;
|
|
4322
4488
|
}
|
|
4323
4489
|
if (item.type === "submenu") return;
|
|
4324
|
-
_optionalChain([item, 'access',
|
|
4325
|
-
_optionalChain([onItemClick, 'optionalCall',
|
|
4490
|
+
_optionalChain([item, 'access', _79 => _79.onClick, 'optionalCall', _80 => _80()]);
|
|
4491
|
+
_optionalChain([onItemClick, 'optionalCall', _81 => _81(item)]);
|
|
4326
4492
|
}, [item, onItemClick]);
|
|
4327
4493
|
const handleClick = _react.useCallback.call(void 0,
|
|
4328
4494
|
(e) => {
|
|
@@ -4348,8 +4514,8 @@ var MenuItem = ({ item, onItemClick }) => {
|
|
|
4348
4514
|
e.stopPropagation();
|
|
4349
4515
|
return;
|
|
4350
4516
|
}
|
|
4351
|
-
_optionalChain([item, 'access',
|
|
4352
|
-
_optionalChain([onItemClick, 'optionalCall',
|
|
4517
|
+
_optionalChain([item, 'access', _82 => _82.onClick, 'optionalCall', _83 => _83()]);
|
|
4518
|
+
_optionalChain([onItemClick, 'optionalCall', _84 => _84(item)]);
|
|
4353
4519
|
},
|
|
4354
4520
|
[item, onItemClick]
|
|
4355
4521
|
);
|
|
@@ -4514,7 +4680,7 @@ var ActionsMenuDropdown = ({
|
|
|
4514
4680
|
}, [open, setOpen]);
|
|
4515
4681
|
const handleItemClick = _react.useCallback.call(void 0,
|
|
4516
4682
|
(item) => {
|
|
4517
|
-
_optionalChain([onItemClick, 'optionalCall',
|
|
4683
|
+
_optionalChain([onItemClick, 'optionalCall', _85 => _85(item)]);
|
|
4518
4684
|
if (item.type !== "checkbox" && item.type !== "submenu" && item.closeOnSelect !== false) {
|
|
4519
4685
|
setOpen(false);
|
|
4520
4686
|
}
|
|
@@ -5461,7 +5627,7 @@ function resolveFromLibrary(iconName) {
|
|
|
5461
5627
|
return void 0;
|
|
5462
5628
|
}
|
|
5463
5629
|
function resolveIcon(iconName, opts) {
|
|
5464
|
-
if (_optionalChain([opts, 'optionalAccess',
|
|
5630
|
+
if (_optionalChain([opts, 'optionalAccess', _86 => _86.variant]) === "brand") {
|
|
5465
5631
|
return getIconComponent(iconName);
|
|
5466
5632
|
}
|
|
5467
5633
|
if (!iconName) return _chunkYRTMAXLEcjs.FileIcon;
|
|
@@ -5679,8 +5845,8 @@ function SlashCommandSuggestions({
|
|
|
5679
5845
|
children: commands.map((cmd, idx) => {
|
|
5680
5846
|
const Icon = resolveIcon(cmd.iconName);
|
|
5681
5847
|
const legacyMeta = !cmd.iconName && cmd.primarySourceId && resolveSourceIcon2 ? resolveSourceIcon2(cmd.primarySourceId) : void 0;
|
|
5682
|
-
const LegacyIcon = _optionalChain([legacyMeta, 'optionalAccess',
|
|
5683
|
-
const title = _nullishCoalesce(_nullishCoalesce(cmd.label, () => ( _optionalChain([legacyMeta, 'optionalAccess',
|
|
5848
|
+
const LegacyIcon = _optionalChain([legacyMeta, 'optionalAccess', _87 => _87.Icon]);
|
|
5849
|
+
const title = _nullishCoalesce(_nullishCoalesce(cmd.label, () => ( _optionalChain([legacyMeta, 'optionalAccess', _88 => _88.label]))), () => ( cmd.id));
|
|
5684
5850
|
const isHighlighted = idx === highlightedIdx;
|
|
5685
5851
|
const slashLabel = cmd.argumentHint ? `/${cmd.id} ${cmd.argumentHint}` : `/${cmd.id}`;
|
|
5686
5852
|
const cardActions = onAction && cmd.actions.length > 0 ? cmd.actions.map((action) => ({
|
|
@@ -5739,13 +5905,13 @@ function parseSegments(value, meta) {
|
|
|
5739
5905
|
if (m.index > last) segs.push({ kind: "text", text: value.slice(last, m.index) });
|
|
5740
5906
|
const token = m[0].slice(1);
|
|
5741
5907
|
const info = meta.get(token);
|
|
5742
|
-
segs.push({ kind: "mention", token, label: _nullishCoalesce(_optionalChain([info, 'optionalAccess',
|
|
5908
|
+
segs.push({ kind: "mention", token, label: _nullishCoalesce(_optionalChain([info, 'optionalAccess', _89 => _89.label]), () => ( token.slice(token.indexOf(":") + 1))), icon: _optionalChain([info, 'optionalAccess', _90 => _90.icon]) });
|
|
5743
5909
|
last = m.index + m[0].length;
|
|
5744
5910
|
}
|
|
5745
5911
|
if (last < value.length) segs.push({ kind: "text", text: value.slice(last) });
|
|
5746
5912
|
return segs;
|
|
5747
5913
|
}
|
|
5748
|
-
var isChip = (n) => n.nodeType === 1 && _optionalChain([n, 'access',
|
|
5914
|
+
var isChip = (n) => n.nodeType === 1 && _optionalChain([n, 'access', _91 => _91.dataset, 'optionalAccess', _92 => _92.token]) !== void 0;
|
|
5749
5915
|
function serialize(el) {
|
|
5750
5916
|
let out = "";
|
|
5751
5917
|
for (const node of Array.from(el.childNodes)) {
|
|
@@ -5799,7 +5965,7 @@ function placeCaretAtOffset(el, offset2) {
|
|
|
5799
5965
|
const node = el.firstChild;
|
|
5800
5966
|
const range = document.createRange();
|
|
5801
5967
|
if (node && node.nodeType === Node.TEXT_NODE) {
|
|
5802
|
-
range.setStart(node, Math.max(0, Math.min(offset2, _nullishCoalesce(_optionalChain([node, 'access',
|
|
5968
|
+
range.setStart(node, Math.max(0, Math.min(offset2, _nullishCoalesce(_optionalChain([node, 'access', _93 => _93.textContent, 'optionalAccess', _94 => _94.length]), () => ( 0)))));
|
|
5803
5969
|
range.collapse(true);
|
|
5804
5970
|
} else {
|
|
5805
5971
|
range.selectNodeContents(el);
|
|
@@ -5857,13 +6023,13 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
|
|
|
5857
6023
|
const metaRef = _react.useRef.call(void 0, /* @__PURE__ */ new Map());
|
|
5858
6024
|
const focusEditor = _react.useCallback.call(void 0, () => {
|
|
5859
6025
|
if (disabled) return;
|
|
5860
|
-
_optionalChain([editorRef, 'access',
|
|
6026
|
+
_optionalChain([editorRef, 'access', _95 => _95.current, 'optionalAccess', _96 => _96.focus, 'call', _97 => _97({ preventScroll: true })]);
|
|
5861
6027
|
}, [disabled]);
|
|
5862
6028
|
_react.useEffect.call(void 0, () => {
|
|
5863
6029
|
if (autoFocus) focusEditor();
|
|
5864
6030
|
}, [autoFocus, focusEditor]);
|
|
5865
6031
|
_react.useEffect.call(void 0, () => {
|
|
5866
|
-
_optionalChain([onValueChange, 'optionalCall',
|
|
6032
|
+
_optionalChain([onValueChange, 'optionalCall', _98 => _98(value)]);
|
|
5867
6033
|
}, [value, onValueChange]);
|
|
5868
6034
|
const previewTextRef = _react.useRef.call(void 0, previewText);
|
|
5869
6035
|
_react.useEffect.call(void 0, () => {
|
|
@@ -5920,7 +6086,7 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
|
|
|
5920
6086
|
ref,
|
|
5921
6087
|
() => ({
|
|
5922
6088
|
focus: () => focusEditor(),
|
|
5923
|
-
blur: () => _optionalChain([editorRef, 'access',
|
|
6089
|
+
blur: () => _optionalChain([editorRef, 'access', _99 => _99.current, 'optionalAccess', _100 => _100.blur, 'call', _101 => _101()]),
|
|
5924
6090
|
clear: () => {
|
|
5925
6091
|
metaRef.current = /* @__PURE__ */ new Map();
|
|
5926
6092
|
applyValue("");
|
|
@@ -5955,7 +6121,7 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
|
|
|
5955
6121
|
return m ? _nullishCoalesce(m[2], () => ( "")) : null;
|
|
5956
6122
|
}, [value, mentionEnabled]);
|
|
5957
6123
|
_react.useEffect.call(void 0, () => {
|
|
5958
|
-
if (mentionEnabled) _optionalChain([onMentionQueryChange, 'optionalCall',
|
|
6124
|
+
if (mentionEnabled) _optionalChain([onMentionQueryChange, 'optionalCall', _102 => _102(mentionQuery)]);
|
|
5959
6125
|
}, [mentionEnabled, mentionQuery, onMentionQueryChange]);
|
|
5960
6126
|
const slashMatch = _react.useMemo.call(void 0, () => slashCommands ? value.match(SLASH_INPUT_TRIGGER) : null, [value, slashCommands]);
|
|
5961
6127
|
const slashPrefix = slashMatch ? _nullishCoalesce(slashMatch[1], () => ( "")) : null;
|
|
@@ -5976,7 +6142,7 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
|
|
|
5976
6142
|
setHighlightedIdx(0);
|
|
5977
6143
|
}
|
|
5978
6144
|
} catch (err) {
|
|
5979
|
-
if (!cancelled && _optionalChain([err, 'optionalAccess',
|
|
6145
|
+
if (!cancelled && _optionalChain([err, 'optionalAccess', _103 => _103.name]) !== "AbortError") {
|
|
5980
6146
|
console.warn("[chat-input] slash-command fetch failed:", err);
|
|
5981
6147
|
}
|
|
5982
6148
|
}
|
|
@@ -6144,8 +6310,8 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
|
|
|
6144
6310
|
highlightedIdx,
|
|
6145
6311
|
onHover: setHighlightedIdx,
|
|
6146
6312
|
onSelect: acceptSuggestion,
|
|
6147
|
-
resolveSourceIcon: _optionalChain([slashCommands, 'optionalAccess',
|
|
6148
|
-
onAction: _optionalChain([slashCommands, 'optionalAccess',
|
|
6313
|
+
resolveSourceIcon: _optionalChain([slashCommands, 'optionalAccess', _104 => _104.resolveSourceIcon]),
|
|
6314
|
+
onAction: _optionalChain([slashCommands, 'optionalAccess', _105 => _105.onAction])
|
|
6149
6315
|
}
|
|
6150
6316
|
),
|
|
6151
6317
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -6588,7 +6754,7 @@ function ChatContextPicker({
|
|
|
6588
6754
|
if (!open) return void 0;
|
|
6589
6755
|
const onDocDown = (e) => {
|
|
6590
6756
|
const target = e.target;
|
|
6591
|
-
if (_optionalChain([rootRef, 'access',
|
|
6757
|
+
if (_optionalChain([rootRef, 'access', _106 => _106.current, 'optionalAccess', _107 => _107.contains, 'call', _108 => _108(target)]) || _optionalChain([target, 'optionalAccess', _109 => _109.closest, 'optionalCall', _110 => _110("[data-context-trigger]")])) return;
|
|
6592
6758
|
onClose();
|
|
6593
6759
|
};
|
|
6594
6760
|
document.addEventListener("mousedown", onDocDown);
|
|
@@ -6596,7 +6762,7 @@ function ChatContextPicker({
|
|
|
6596
6762
|
}, [open, onClose]);
|
|
6597
6763
|
_react.useEffect.call(void 0, () => {
|
|
6598
6764
|
if (!open || view !== "items") return void 0;
|
|
6599
|
-
const id = requestAnimationFrame(() => _optionalChain([searchRef, 'access',
|
|
6765
|
+
const id = requestAnimationFrame(() => _optionalChain([searchRef, 'access', _111 => _111.current, 'optionalAccess', _112 => _112.focus, 'call', _113 => _113()]));
|
|
6600
6766
|
return () => cancelAnimationFrame(id);
|
|
6601
6767
|
}, [open, view]);
|
|
6602
6768
|
_react.useEffect.call(void 0, () => {
|
|
@@ -6678,7 +6844,7 @@ function ChatContextPicker({
|
|
|
6678
6844
|
{
|
|
6679
6845
|
icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.Upload02Icon, { size: 24 }),
|
|
6680
6846
|
label: "Upload File",
|
|
6681
|
-
onClick: () => _optionalChain([config, 'access',
|
|
6847
|
+
onClick: () => _optionalChain([config, 'access', _114 => _114.onUploadFile, 'optionalCall', _115 => _115()])
|
|
6682
6848
|
}
|
|
6683
6849
|
),
|
|
6684
6850
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ContextMenuRow, { icon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.PackagePlusIcon, { size: 24 }), label: "Assign Item", onClick: () => setView("types") })
|
|
@@ -6773,7 +6939,7 @@ function ChatContextChipStrip({
|
|
|
6773
6939
|
// `tag` pills (Figma 1:6073): 32px tall, card surface, bordered, mono-
|
|
6774
6940
|
// uppercase label, 16px lead icon + xmark-circle remove. Wraps to new rows.
|
|
6775
6941
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkX7CEWD6Vcjs.cn.call(void 0, "flex flex-wrap content-center items-center gap-2", className), children: items.map((item) => {
|
|
6776
|
-
const hostNode = _optionalChain([renderItem, 'optionalCall',
|
|
6942
|
+
const hostNode = _optionalChain([renderItem, 'optionalCall', _116 => _116(item)]);
|
|
6777
6943
|
if (hostNode != null) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: hostNode }, itemKey2(item));
|
|
6778
6944
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
6779
6945
|
"div",
|
|
@@ -6927,7 +7093,7 @@ var ToolExecutionDisplay = _react.forwardRef.call(void 0,
|
|
|
6927
7093
|
const isExecuting = message.type === "EXECUTING_TOOL";
|
|
6928
7094
|
const isExecuted = message.type === "EXECUTED_TOOL";
|
|
6929
7095
|
const integratedToolType = message.integratedToolType || "OPENFRAME";
|
|
6930
|
-
const previewText = variant === "client" ? _optionalChain([message, 'access',
|
|
7096
|
+
const previewText = variant === "client" ? _optionalChain([message, 'access', _117 => _117.toolExplanation, 'optionalAccess', _118 => _118.trim, 'call', _119 => _119()]) : _optionalChain([message, 'access', _120 => _120.toolTitle, 'optionalAccess', _121 => _121.trim, 'call', _122 => _122()]);
|
|
6931
7097
|
const argEntries = _react.useMemo.call(void 0, () => {
|
|
6932
7098
|
if (!message.parameters || typeof message.parameters !== "object") return [];
|
|
6933
7099
|
const entries = Object.entries(message.parameters).filter(([, v]) => v !== null && v !== void 0 && v !== "");
|
|
@@ -7046,7 +7212,7 @@ function groupAskRuns(segments) {
|
|
|
7046
7212
|
runs.set(index, [segment]);
|
|
7047
7213
|
return;
|
|
7048
7214
|
}
|
|
7049
|
-
_optionalChain([runs, 'access',
|
|
7215
|
+
_optionalChain([runs, 'access', _123 => _123.get, 'call', _124 => _124(headIndex), 'optionalAccess', _125 => _125.push, 'call', _126 => _126(segment)]);
|
|
7050
7216
|
});
|
|
7051
7217
|
return runs;
|
|
7052
7218
|
}
|
|
@@ -7176,7 +7342,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7176
7342
|
}, [hasMarkerSupport, renderEntityCard, refByKey, segments]);
|
|
7177
7343
|
_react.useEffect.call(void 0, () => {
|
|
7178
7344
|
const cache = renderedCardNodeCache.current;
|
|
7179
|
-
const usedKeys = _optionalChain([renderingPlan, 'optionalAccess',
|
|
7345
|
+
const usedKeys = _optionalChain([renderingPlan, 'optionalAccess', _127 => _127.usedKeys]);
|
|
7180
7346
|
if (!usedKeys) return;
|
|
7181
7347
|
if (cache.size <= usedKeys.size) return;
|
|
7182
7348
|
for (const k of [...cache.keys()]) {
|
|
@@ -7199,7 +7365,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7199
7365
|
const sepIdx = stripped.indexOf(":");
|
|
7200
7366
|
const marker = sepIdx === -1 ? stripped : stripped.slice(0, sepIdx);
|
|
7201
7367
|
const id = sepIdx === -1 ? "" : stripped.slice(sepIdx + 1);
|
|
7202
|
-
const node = _optionalChain([renderMention, 'optionalCall',
|
|
7368
|
+
const node = _optionalChain([renderMention, 'optionalCall', _128 => _128({ marker, id })]);
|
|
7203
7369
|
if (node != null) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: node });
|
|
7204
7370
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary opacity-60", children });
|
|
7205
7371
|
}
|
|
@@ -7210,7 +7376,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7210
7376
|
const cardType = stripped.slice(0, sepIdx);
|
|
7211
7377
|
const cardId = stripped.slice(sepIdx + 1);
|
|
7212
7378
|
const key = `${cardType}:${cardId}`;
|
|
7213
|
-
const inline = _optionalChain([renderingPlanRef, 'access',
|
|
7379
|
+
const inline = _optionalChain([renderingPlanRef, 'access', _129 => _129.current, 'optionalAccess', _130 => _130.inlineByKey, 'access', _131 => _131.get, 'call', _132 => _132(key)]);
|
|
7214
7380
|
if (inline != null) return inline;
|
|
7215
7381
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-ods-text-secondary opacity-60", children: cardId });
|
|
7216
7382
|
}
|
|
@@ -7223,7 +7389,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7223
7389
|
};
|
|
7224
7390
|
}, [hasMarkerSupport, hasMentionSupport, renderMention, NavLinkAnchor]);
|
|
7225
7391
|
const renderSegmentBody = (segIndex, text2, isStreaming) => {
|
|
7226
|
-
const parts = _optionalChain([renderingPlan, 'optionalAccess',
|
|
7392
|
+
const parts = _optionalChain([renderingPlan, 'optionalAccess', _133 => _133.partsBySegment, 'access', _134 => _134.get, 'call', _135 => _135(segIndex)]);
|
|
7227
7393
|
if (!parts || parts.length === 0) {
|
|
7228
7394
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7229
7395
|
SimpleMarkdownRenderer,
|
|
@@ -7396,7 +7562,7 @@ var ChatMessageEnhanced = _react.forwardRef.call(void 0,
|
|
|
7396
7562
|
);
|
|
7397
7563
|
ChatMessageEnhanced.displayName = "ChatMessageEnhanced";
|
|
7398
7564
|
var MemoizedChatMessageEnhanced = _react.memo.call(void 0, ChatMessageEnhanced, (prevProps, nextProps) => {
|
|
7399
|
-
return prevProps.role === nextProps.role && prevProps.content === nextProps.content && prevProps.name === nextProps.name && prevProps.avatar === nextProps.avatar && prevProps.isTyping === nextProps.isTyping && _optionalChain([prevProps, 'access',
|
|
7565
|
+
return prevProps.role === nextProps.role && prevProps.content === nextProps.content && prevProps.name === nextProps.name && prevProps.avatar === nextProps.avatar && prevProps.isTyping === nextProps.isTyping && _optionalChain([prevProps, 'access', _136 => _136.timestamp, 'optionalAccess', _137 => _137.getTime, 'call', _138 => _138()]) === _optionalChain([nextProps, 'access', _139 => _139.timestamp, 'optionalAccess', _140 => _140.getTime, 'call', _141 => _141()]) && prevProps.showAvatar === nextProps.showAvatar && prevProps.assistantType === nextProps.assistantType && prevProps.approvalVariant === nextProps.approvalVariant && prevProps.authorType === nextProps.authorType && prevProps.assistantIcon === nextProps.assistantIcon && prevProps.className === nextProps.className && // Reference equality — the host re-uses the same array instance per
|
|
7400
7566
|
// message (it's set once on the optimistic send and never mutated).
|
|
7401
7567
|
prevProps.contextItems === nextProps.contextItems && prevProps.resolveContextIcon === nextProps.resolveContextIcon && prevProps.renderContextItem === nextProps.renderContextItem && // Host keeps this stable (module const / useCallback), so reference
|
|
7402
7568
|
// equality holds across streaming chunks.
|
|
@@ -7663,7 +7829,7 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7663
7829
|
const prevCount = prevRenderRef.current.messageCount;
|
|
7664
7830
|
const prevLastId = prevRenderRef.current.lastMessageId;
|
|
7665
7831
|
const newCount = messages.length;
|
|
7666
|
-
const currentLastId = _optionalChain([messages, 'access',
|
|
7832
|
+
const currentLastId = _optionalChain([messages, 'access', _142 => _142[messages.length - 1], 'optionalAccess', _143 => _143.id]);
|
|
7667
7833
|
prevRenderRef.current = { dialogId, messageCount: newCount, lastMessageId: currentLastId };
|
|
7668
7834
|
if (dialogChanged) {
|
|
7669
7835
|
followBottomRef.current = true;
|
|
@@ -7730,10 +7896,10 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7730
7896
|
};
|
|
7731
7897
|
let touchY = null;
|
|
7732
7898
|
const onTouchStart = (e) => {
|
|
7733
|
-
touchY = _nullishCoalesce(_optionalChain([e, 'access',
|
|
7899
|
+
touchY = _nullishCoalesce(_optionalChain([e, 'access', _144 => _144.touches, 'access', _145 => _145[0], 'optionalAccess', _146 => _146.clientY]), () => ( null));
|
|
7734
7900
|
};
|
|
7735
7901
|
const onTouchMove = (e) => {
|
|
7736
|
-
const y = _optionalChain([e, 'access',
|
|
7902
|
+
const y = _optionalChain([e, 'access', _147 => _147.touches, 'access', _148 => _148[0], 'optionalAccess', _149 => _149.clientY]);
|
|
7737
7903
|
if (y == null || touchY == null) return;
|
|
7738
7904
|
if (y > touchY) disarm();
|
|
7739
7905
|
touchY = y;
|
|
@@ -7863,7 +8029,7 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7863
8029
|
ro.observe(node);
|
|
7864
8030
|
const timer = setTimeout(() => {
|
|
7865
8031
|
ro.disconnect();
|
|
7866
|
-
if (_optionalChain([anchorWatcherRef, 'access',
|
|
8032
|
+
if (_optionalChain([anchorWatcherRef, 'access', _150 => _150.current, 'optionalAccess', _151 => _151.id]) === last.id) {
|
|
7867
8033
|
anchorWatcherRef.current = null;
|
|
7868
8034
|
}
|
|
7869
8035
|
}, 2e3);
|
|
@@ -7893,7 +8059,7 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7893
8059
|
scrollTop: el.scrollTop
|
|
7894
8060
|
};
|
|
7895
8061
|
}
|
|
7896
|
-
_optionalChain([onLoadMoreRef, 'access',
|
|
8062
|
+
_optionalChain([onLoadMoreRef, 'access', _152 => _152.current, 'optionalCall', _153 => _153()]);
|
|
7897
8063
|
}
|
|
7898
8064
|
},
|
|
7899
8065
|
{ root: scrollContainer, rootMargin: "200px", threshold: 0.1 }
|
|
@@ -7927,8 +8093,8 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7927
8093
|
);
|
|
7928
8094
|
}
|
|
7929
8095
|
const lastMessage = messages[messages.length - 1];
|
|
7930
|
-
const lastSegments = Array.isArray(_optionalChain([lastMessage, 'optionalAccess',
|
|
7931
|
-
const lastSegment = _optionalChain([lastSegments, 'optionalAccess',
|
|
8096
|
+
const lastSegments = Array.isArray(_optionalChain([lastMessage, 'optionalAccess', _154 => _154.content])) ? lastMessage.content : null;
|
|
8097
|
+
const lastSegment = _optionalChain([lastSegments, 'optionalAccess', _155 => _155[lastSegments.length - 1]]);
|
|
7932
8098
|
const isPausedOnApproval = !!lastSegment && (lastSegment.type === "approval_request" || lastSegment.type === "approval_batch" || lastSegment.type === "escalation_offer") && (lastSegment.status === void 0 || lastSegment.status === "pending");
|
|
7933
8099
|
const showStreamingLoader = isTyping && !isPausedOnApproval && !(pendingApprovals && pendingApprovals.length > 0);
|
|
7934
8100
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, OverlayOpenRegistryProvider, { onOpenChange: handleOverlayOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-h-0 flex-1 flex-col", children: [
|
|
@@ -7971,7 +8137,7 @@ var ChatMessageList = _react.forwardRef.call(void 0,
|
|
|
7971
8137
|
if (message.hidden) return null;
|
|
7972
8138
|
const isEmptyPendingTurn = index === messages.length - 1 && isTyping && message.role === "assistant" && !hasNonEmptyContent(message.content) && (!Array.isArray(message.content) || message.content.every((s) => s.type === "text"));
|
|
7973
8139
|
if (isEmptyPendingTurn) return null;
|
|
7974
|
-
const ownedContent = _optionalChain([renderAfterMessage, 'optionalCall',
|
|
8140
|
+
const ownedContent = _optionalChain([renderAfterMessage, 'optionalCall', _156 => _156(message, index)]);
|
|
7975
8141
|
const row = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
7976
8142
|
MemoizedChatMessageEnhanced,
|
|
7977
8143
|
{
|
|
@@ -8151,7 +8317,7 @@ function EntityIcon({
|
|
|
8151
8317
|
size: size2 = 20,
|
|
8152
8318
|
className
|
|
8153
8319
|
}) {
|
|
8154
|
-
if (_optionalChain([icon, 'optionalAccess',
|
|
8320
|
+
if (_optionalChain([icon, 'optionalAccess', _157 => _157.url])) {
|
|
8155
8321
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8156
8322
|
_chunkWLSFBRT5cjs.next_image_default,
|
|
8157
8323
|
{
|
|
@@ -8165,7 +8331,7 @@ function EntityIcon({
|
|
|
8165
8331
|
}
|
|
8166
8332
|
);
|
|
8167
8333
|
}
|
|
8168
|
-
if (_optionalChain([icon, 'optionalAccess',
|
|
8334
|
+
if (_optionalChain([icon, 'optionalAccess', _158 => _158.name]) && BRAND_MARK_NAMES.has(icon.name)) {
|
|
8169
8335
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
8170
8336
|
"span",
|
|
8171
8337
|
{
|
|
@@ -8175,8 +8341,8 @@ function EntityIcon({
|
|
|
8175
8341
|
}
|
|
8176
8342
|
);
|
|
8177
8343
|
}
|
|
8178
|
-
const Glyph = resolveIcon(_nullishCoalesce(_optionalChain([icon, 'optionalAccess',
|
|
8179
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Glyph, { size: size2, className, ..._nullishCoalesce(_optionalChain([icon, 'optionalAccess',
|
|
8344
|
+
const Glyph = resolveIcon(_nullishCoalesce(_optionalChain([icon, 'optionalAccess', _159 => _159.name]), () => ( void 0)));
|
|
8345
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Glyph, { size: size2, className, ..._nullishCoalesce(_optionalChain([icon, 'optionalAccess', _160 => _160.props]), () => ( {})) });
|
|
8180
8346
|
}
|
|
8181
8347
|
|
|
8182
8348
|
// src/components/chat/quick-action-chip.tsx
|
|
@@ -8186,7 +8352,7 @@ function getAgentAccent(slug) {
|
|
|
8186
8352
|
return slug === "fae" || slug === "mingo" ? AGENT_ACCENTS[slug] : void 0;
|
|
8187
8353
|
}
|
|
8188
8354
|
function accentFromIdentityIcon(icon) {
|
|
8189
|
-
const color = _optionalChain([icon, 'optionalAccess',
|
|
8355
|
+
const color = _optionalChain([icon, 'optionalAccess', _161 => _161.props, 'optionalAccess', _162 => _162.color]);
|
|
8190
8356
|
return typeof color === "string" && color.length > 0 ? color : void 0;
|
|
8191
8357
|
}
|
|
8192
8358
|
var ACCENT_CLASS = {
|
|
@@ -8268,7 +8434,7 @@ function QuickActionChipButton({
|
|
|
8268
8434
|
className
|
|
8269
8435
|
}) {
|
|
8270
8436
|
const themedIcon = theme && isQuickActionIconSpec(icon) && !icon.accent ? { ...icon, accent: theme.accent } : icon;
|
|
8271
|
-
const resolvedLozenge = lozenge === true ? _optionalChain([theme, 'optionalAccess',
|
|
8437
|
+
const resolvedLozenge = lozenge === true ? _optionalChain([theme, 'optionalAccess', _163 => _163.lozenge]) : lozenge === false ? void 0 : lozenge;
|
|
8272
8438
|
const resolvedIcon = renderQuickActionIcon(themedIcon);
|
|
8273
8439
|
const resolvedLabel = composeChipLabel(label, resolvedLozenge);
|
|
8274
8440
|
const tagVariant = selected ? selectedAccent === "cyan" ? "selectedCyan" : "selected" : variant;
|
|
@@ -8480,7 +8646,7 @@ function MarqueeWall({
|
|
|
8480
8646
|
if (!container || !copy) return;
|
|
8481
8647
|
const size2 = axis === "y" ? copy.offsetHeight : copy.offsetWidth;
|
|
8482
8648
|
copySizeRef.current = size2;
|
|
8483
|
-
const clone = _optionalChain([trackRef, 'access',
|
|
8649
|
+
const clone = _optionalChain([trackRef, 'access', _164 => _164.current, 'optionalAccess', _165 => _165.querySelector, 'call', _166 => _166('[data-marquee-copy="clone"]')]);
|
|
8484
8650
|
wrapSizeRef.current = clone ? axis === "y" ? clone.offsetTop - copy.offsetTop : clone.offsetLeft - copy.offsetLeft : size2 + (typeof copyGap === "number" ? copyGap : 0);
|
|
8485
8651
|
const avail = axis === "y" ? container.clientHeight : container.clientWidth;
|
|
8486
8652
|
setOverflows(size2 > avail + 1);
|
|
@@ -8501,7 +8667,7 @@ function MarqueeWall({
|
|
|
8501
8667
|
_react.useEffect.call(void 0, () => {
|
|
8502
8668
|
const el = containerRef.current;
|
|
8503
8669
|
if (!el || typeof IntersectionObserver === "undefined") return void 0;
|
|
8504
|
-
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access',
|
|
8670
|
+
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access', _167 => _167[0], 'optionalAccess', _168 => _168.isIntersecting]), () => ( true))), {
|
|
8505
8671
|
rootMargin: _chunkTLLJIGTPcjs.NEAR_VIEWPORT_ROOT_MARGIN
|
|
8506
8672
|
});
|
|
8507
8673
|
io.observe(el);
|
|
@@ -8612,7 +8778,7 @@ function MarqueeWall({
|
|
|
8612
8778
|
if (Math.abs(delta) > 3 && !dragMovedRef.current) {
|
|
8613
8779
|
dragMovedRef.current = true;
|
|
8614
8780
|
try {
|
|
8615
|
-
_optionalChain([containerRef, 'access',
|
|
8781
|
+
_optionalChain([containerRef, 'access', _169 => _169.current, 'optionalAccess', _170 => _170.setPointerCapture, 'call', _171 => _171(e.pointerId)]);
|
|
8616
8782
|
} catch (e7) {
|
|
8617
8783
|
}
|
|
8618
8784
|
}
|
|
@@ -8629,7 +8795,7 @@ function MarqueeWall({
|
|
|
8629
8795
|
dragSuppressUntilRef.current = performance.now() + DRAG_RESUME_MS;
|
|
8630
8796
|
if (dragMovedRef.current) {
|
|
8631
8797
|
try {
|
|
8632
|
-
_optionalChain([containerRef, 'access',
|
|
8798
|
+
_optionalChain([containerRef, 'access', _172 => _172.current, 'optionalAccess', _173 => _173.releasePointerCapture, 'call', _174 => _174(e.pointerId)]);
|
|
8633
8799
|
} catch (e8) {
|
|
8634
8800
|
}
|
|
8635
8801
|
}
|
|
@@ -9065,7 +9231,7 @@ var ChatTicketItem = _react.forwardRef.call(void 0,
|
|
|
9065
9231
|
{
|
|
9066
9232
|
ref,
|
|
9067
9233
|
type: "button",
|
|
9068
|
-
onClick: () => _optionalChain([onClick, 'optionalCall',
|
|
9234
|
+
onClick: () => _optionalChain([onClick, 'optionalCall', _175 => _175(ticket.id)]),
|
|
9069
9235
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
9070
9236
|
"flex h-20 w-full items-center gap-4 px-4",
|
|
9071
9237
|
"border-b border-ods-border bg-ods-card",
|
|
@@ -9296,7 +9462,7 @@ function MingoChatHistoryRow({
|
|
|
9296
9462
|
const unread = _nullishCoalesce(dialog.unreadMessagesCount, () => ( 0));
|
|
9297
9463
|
const hasMenu = !!onRequestRename || !!onRequestArchive || !!onRequestCopyLink;
|
|
9298
9464
|
const owner = dialog.owner;
|
|
9299
|
-
const hasAvatar = !!(_optionalChain([owner, 'optionalAccess',
|
|
9465
|
+
const hasAvatar = !!(_optionalChain([owner, 'optionalAccess', _176 => _176.name]) || _optionalChain([owner, 'optionalAccess', _177 => _177.avatarUrl]));
|
|
9300
9466
|
const [menuOpen, setMenuOpen] = _react.useState.call(void 0, false);
|
|
9301
9467
|
const menuItems = [
|
|
9302
9468
|
onRequestCopyLink && {
|
|
@@ -9332,11 +9498,11 @@ function MingoChatHistoryRow({
|
|
|
9332
9498
|
{
|
|
9333
9499
|
role: "button",
|
|
9334
9500
|
tabIndex: 0,
|
|
9335
|
-
onClick: () => _optionalChain([onSelect, 'optionalCall',
|
|
9501
|
+
onClick: () => _optionalChain([onSelect, 'optionalCall', _178 => _178(dialog.id)]),
|
|
9336
9502
|
onKeyDown: (e) => {
|
|
9337
9503
|
if (e.key === "Enter" || e.key === " ") {
|
|
9338
9504
|
e.preventDefault();
|
|
9339
|
-
_optionalChain([onSelect, 'optionalCall',
|
|
9505
|
+
_optionalChain([onSelect, 'optionalCall', _179 => _179(dialog.id)]);
|
|
9340
9506
|
}
|
|
9341
9507
|
},
|
|
9342
9508
|
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",
|
|
@@ -9403,8 +9569,8 @@ function MingoChatHistoryRow({
|
|
|
9403
9569
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
9404
9570
|
"span",
|
|
9405
9571
|
{
|
|
9406
|
-
onClick: () => _optionalChain([onSelect, 'optionalCall',
|
|
9407
|
-
title: _optionalChain([owner, 'optionalAccess',
|
|
9572
|
+
onClick: () => _optionalChain([onSelect, 'optionalCall', _180 => _180(dialog.id)]),
|
|
9573
|
+
title: _optionalChain([owner, 'optionalAccess', _181 => _181.name]) || void 0,
|
|
9408
9574
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
9409
9575
|
"absolute inset-0 flex cursor-pointer items-center justify-center transition-opacity",
|
|
9410
9576
|
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")
|
|
@@ -9414,9 +9580,9 @@ function MingoChatHistoryRow({
|
|
|
9414
9580
|
{
|
|
9415
9581
|
variant: "round",
|
|
9416
9582
|
sizePx: 24,
|
|
9417
|
-
src: _optionalChain([owner, 'optionalAccess',
|
|
9418
|
-
alt: _optionalChain([owner, 'optionalAccess',
|
|
9419
|
-
fallback: _optionalChain([owner, 'optionalAccess',
|
|
9583
|
+
src: _optionalChain([owner, 'optionalAccess', _182 => _182.avatarUrl]) || void 0,
|
|
9584
|
+
alt: _optionalChain([owner, 'optionalAccess', _183 => _183.name]) || void 0,
|
|
9585
|
+
fallback: _optionalChain([owner, 'optionalAccess', _184 => _184.name]) || void 0,
|
|
9420
9586
|
initialsClassName: "text-[10px] text-ods-text-secondary"
|
|
9421
9587
|
}
|
|
9422
9588
|
)
|
|
@@ -9467,7 +9633,7 @@ function MingoChatHistory({
|
|
|
9467
9633
|
className
|
|
9468
9634
|
}) {
|
|
9469
9635
|
const groups = _react.useMemo.call(void 0, () => groupDialogs(dialogs), [dialogs]);
|
|
9470
|
-
const noSearchResults = groups.length === 0 && !!_optionalChain([searchQuery, 'optionalAccess',
|
|
9636
|
+
const noSearchResults = groups.length === 0 && !!_optionalChain([searchQuery, 'optionalAccess', _185 => _185.trim, 'call', _186 => _186()]);
|
|
9471
9637
|
const { scrollRef, fadeTop, fadeBottom, update: updateFade } = useScrollFade();
|
|
9472
9638
|
const sentinelRef = _react.useRef.call(void 0, null);
|
|
9473
9639
|
const onLoadMoreRef = _react.useRef.call(void 0, onLoadMore);
|
|
@@ -9484,7 +9650,7 @@ function MingoChatHistory({
|
|
|
9484
9650
|
const io = new IntersectionObserver(
|
|
9485
9651
|
([entry]) => {
|
|
9486
9652
|
if (entry.isIntersecting && !isLoadingMoreRef.current) {
|
|
9487
|
-
_optionalChain([onLoadMoreRef, 'access',
|
|
9653
|
+
_optionalChain([onLoadMoreRef, 'access', _187 => _187.current, 'optionalCall', _188 => _188()]);
|
|
9488
9654
|
}
|
|
9489
9655
|
},
|
|
9490
9656
|
{ root, rootMargin: "120px", threshold: 0.1 }
|
|
@@ -9668,8 +9834,8 @@ function MingoWelcome({
|
|
|
9668
9834
|
icon: action.icon,
|
|
9669
9835
|
variant: action.variant,
|
|
9670
9836
|
onSelect: action.onClick,
|
|
9671
|
-
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall',
|
|
9672
|
-
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall',
|
|
9837
|
+
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall', _189 => _189(action)]),
|
|
9838
|
+
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall', _190 => _190()])
|
|
9673
9839
|
})),
|
|
9674
9840
|
agentSlug,
|
|
9675
9841
|
rows: 4,
|
|
@@ -9722,9 +9888,9 @@ function GuideWelcome({
|
|
|
9722
9888
|
props: action.iconProps,
|
|
9723
9889
|
accent: _nullishCoalesce(_nullishCoalesce(action.accent, () => ( accentFromIdentityIcon(icon))), () => ( "cyan"))
|
|
9724
9890
|
},
|
|
9725
|
-
onSelect: () => _optionalChain([onQuickAction, 'optionalCall',
|
|
9726
|
-
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall',
|
|
9727
|
-
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall',
|
|
9891
|
+
onSelect: () => _optionalChain([onQuickAction, 'optionalCall', _191 => _191(action)]),
|
|
9892
|
+
onHoverStart: () => _optionalChain([onQuickActionHover, 'optionalCall', _192 => _192(action)]),
|
|
9893
|
+
onHoverEnd: () => _optionalChain([onQuickActionHoverEnd, 'optionalCall', _193 => _193()])
|
|
9728
9894
|
})),
|
|
9729
9895
|
[quickActions, icon, onQuickAction, onQuickActionHover, onQuickActionHoverEnd]
|
|
9730
9896
|
);
|
|
@@ -9900,7 +10066,7 @@ function MingoHistoryRail({
|
|
|
9900
10066
|
onRetry,
|
|
9901
10067
|
className
|
|
9902
10068
|
}) {
|
|
9903
|
-
const hasSearch = !!_optionalChain([searchQuery, 'optionalAccess',
|
|
10069
|
+
const hasSearch = !!_optionalChain([searchQuery, 'optionalAccess', _194 => _194.trim, 'call', _195 => _195()]);
|
|
9904
10070
|
const hasList = dialogs.length > 0 || hasSearch;
|
|
9905
10071
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
9906
10072
|
"div",
|
|
@@ -10026,7 +10192,7 @@ var Modal = _react.forwardRef.call(void 0,
|
|
|
10026
10192
|
document.removeEventListener("focusin", containFocus);
|
|
10027
10193
|
const idx = modalStack.lastIndexOf(stackId);
|
|
10028
10194
|
if (idx !== -1) modalStack.splice(idx, 1);
|
|
10029
|
-
_optionalChain([restoreFocusRef, 'access',
|
|
10195
|
+
_optionalChain([restoreFocusRef, 'access', _196 => _196.current, 'optionalAccess', _197 => _197.focus, 'optionalCall', _198 => _198()]);
|
|
10030
10196
|
};
|
|
10031
10197
|
}, [isOpen]);
|
|
10032
10198
|
_react.useEffect.call(void 0, () => {
|
|
@@ -10276,7 +10442,7 @@ function ChatDialogModals({
|
|
|
10276
10442
|
RenameChatModal,
|
|
10277
10443
|
{
|
|
10278
10444
|
isOpen: renameTarget != null,
|
|
10279
|
-
initialName: _nullishCoalesce(_optionalChain([renameTarget, 'optionalAccess',
|
|
10445
|
+
initialName: _nullishCoalesce(_optionalChain([renameTarget, 'optionalAccess', _199 => _199.title]), () => ( "")),
|
|
10280
10446
|
onClose: () => setRenameTarget(null),
|
|
10281
10447
|
onSave: onConfirmRename
|
|
10282
10448
|
}
|
|
@@ -10348,7 +10514,7 @@ function ChatHeaderSearchField({
|
|
|
10348
10514
|
const finishCollapse = _react.useCallback.call(void 0, () => {
|
|
10349
10515
|
if (collapsedRef.current) return;
|
|
10350
10516
|
collapsedRef.current = true;
|
|
10351
|
-
_optionalChain([onCollapse, 'optionalCall',
|
|
10517
|
+
_optionalChain([onCollapse, 'optionalCall', _200 => _200()]);
|
|
10352
10518
|
}, [onCollapse]);
|
|
10353
10519
|
const beginCollapse = _react.useCallback.call(void 0, () => {
|
|
10354
10520
|
setExiting(true);
|
|
@@ -10670,7 +10836,7 @@ function ChatAttachmentAddButton({
|
|
|
10670
10836
|
const canAddMore = slotsAvailable > 0 && !disabled;
|
|
10671
10837
|
const handlePick = () => {
|
|
10672
10838
|
if (!canAddMore) return;
|
|
10673
|
-
_optionalChain([fileInputRef, 'access',
|
|
10839
|
+
_optionalChain([fileInputRef, 'access', _201 => _201.current, 'optionalAccess', _202 => _202.click, 'call', _203 => _203()]);
|
|
10674
10840
|
};
|
|
10675
10841
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
10676
10842
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -10833,7 +10999,7 @@ function ChatContextMemoryBar({
|
|
|
10833
10999
|
_react.useEffect.call(void 0, () => {
|
|
10834
11000
|
if (!open) return void 0;
|
|
10835
11001
|
const onOutside = (e) => {
|
|
10836
|
-
if (_optionalChain([rootRef, 'access',
|
|
11002
|
+
if (_optionalChain([rootRef, 'access', _204 => _204.current, 'optionalAccess', _205 => _205.contains, 'call', _206 => _206(e.target)])) return;
|
|
10837
11003
|
setOpen(false);
|
|
10838
11004
|
};
|
|
10839
11005
|
document.addEventListener("mousedown", onOutside, true);
|
|
@@ -11132,7 +11298,7 @@ function ChatComposer({
|
|
|
11132
11298
|
const contextEnabled = !!contextPicker && !archived;
|
|
11133
11299
|
const selected = _nullishCoalesce(selectedContextItems, () => ( []));
|
|
11134
11300
|
const memory = _nullishCoalesce(contextMemoryItems, () => ( []));
|
|
11135
|
-
const entityTypes = _optionalChain([contextPicker, 'optionalAccess',
|
|
11301
|
+
const entityTypes = _optionalChain([contextPicker, 'optionalAccess', _207 => _207.entityTypes]);
|
|
11136
11302
|
const iconByType = _react.useMemo.call(void 0, () => {
|
|
11137
11303
|
const map = /* @__PURE__ */ new Map();
|
|
11138
11304
|
for (const t of _nullishCoalesce(entityTypes, () => ( []))) map.set(t.type, t.icon);
|
|
@@ -11159,7 +11325,7 @@ function ChatComposer({
|
|
|
11159
11325
|
startIcon: contextEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11160
11326
|
ChatComposerPlusMenu,
|
|
11161
11327
|
{
|
|
11162
|
-
onToggle: () => contextPickerOpen ? _optionalChain([onCloseContextPicker, 'optionalCall',
|
|
11328
|
+
onToggle: () => contextPickerOpen ? _optionalChain([onCloseContextPicker, 'optionalCall', _208 => _208()]) : _optionalChain([onOpenContextPicker, 'optionalCall', _209 => _209()]),
|
|
11163
11329
|
open: contextPickerOpen,
|
|
11164
11330
|
disabled: attachmentsDisabled,
|
|
11165
11331
|
dropdown: contextPicker ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -11168,8 +11334,8 @@ function ChatComposer({
|
|
|
11168
11334
|
open: contextPickerOpen,
|
|
11169
11335
|
config: contextPicker,
|
|
11170
11336
|
selectedItems: selected,
|
|
11171
|
-
onToggleItem: (item) => _optionalChain([onToggleContextItem, 'optionalCall',
|
|
11172
|
-
onClose: () => _optionalChain([onCloseContextPicker, 'optionalCall',
|
|
11337
|
+
onToggleItem: (item) => _optionalChain([onToggleContextItem, 'optionalCall', _210 => _210(item)]),
|
|
11338
|
+
onClose: () => _optionalChain([onCloseContextPicker, 'optionalCall', _211 => _211()]),
|
|
11173
11339
|
mentionQuery
|
|
11174
11340
|
}
|
|
11175
11341
|
) : void 0
|
|
@@ -11360,8 +11526,8 @@ ChatSidebarSkeleton.displayName = "ChatSidebarSkeleton";
|
|
|
11360
11526
|
var DialogListItem = _react.forwardRef.call(void 0,
|
|
11361
11527
|
({ className, dialog, isActive, onDialogSelect, onClick, ...props }, ref) => {
|
|
11362
11528
|
const handleClick = (e) => {
|
|
11363
|
-
_optionalChain([onDialogSelect, 'optionalCall',
|
|
11364
|
-
_optionalChain([onClick, 'optionalCall',
|
|
11529
|
+
_optionalChain([onDialogSelect, 'optionalCall', _212 => _212(dialog.id)]);
|
|
11530
|
+
_optionalChain([onClick, 'optionalCall', _213 => _213(e)]);
|
|
11365
11531
|
};
|
|
11366
11532
|
const formatTimestamp = (timestamp) => {
|
|
11367
11533
|
return _chunkEX5PJGVAcjs.formatDateWithTimezone.call(void 0, timestamp, _chunkEX5PJGVAcjs.VIEWER_TIMEZONE, "numericDateTime24h");
|
|
@@ -11434,7 +11600,7 @@ var ChatSidebar = _react.forwardRef.call(void 0,
|
|
|
11434
11600
|
(entries) => {
|
|
11435
11601
|
const [entry] = entries;
|
|
11436
11602
|
if (entry.isIntersecting && !isFetchingRef.current) {
|
|
11437
|
-
_optionalChain([onLoadMoreRef, 'access',
|
|
11603
|
+
_optionalChain([onLoadMoreRef, 'access', _214 => _214.current, 'optionalCall', _215 => _215()]);
|
|
11438
11604
|
}
|
|
11439
11605
|
},
|
|
11440
11606
|
{ root: scrollContainer, rootMargin: "100px", threshold: 0.1 }
|
|
@@ -11562,7 +11728,7 @@ function isForeignOriginHref(href) {
|
|
|
11562
11728
|
function runNavigation(runtime, href, path, targetPlatform, fallbackNavigate) {
|
|
11563
11729
|
const isNewTab = runtime ? _chunkEX5PJGVAcjs.computeIsNewTab.call(void 0, runtime, href, _nullishCoalesce(targetPlatform, () => ( null))) : false;
|
|
11564
11730
|
if (isNewTab) {
|
|
11565
|
-
if (_optionalChain([runtime, 'optionalAccess',
|
|
11731
|
+
if (_optionalChain([runtime, 'optionalAccess', _216 => _216.navigation, 'access', _217 => _217.openExternal])) runtime.navigation.openExternal(href);
|
|
11566
11732
|
else window.open(href, "_blank", NEW_TAB_FEATURES);
|
|
11567
11733
|
return;
|
|
11568
11734
|
}
|
|
@@ -11570,7 +11736,7 @@ function runNavigation(runtime, href, path, targetPlatform, fallbackNavigate) {
|
|
|
11570
11736
|
if (target.includes("#") && _chunkTLLJIGTPcjs.navigateSamePageHash.call(void 0, target, { headerOffset: _chunkTLLJIGTPcjs.STICKY_HEADER_OFFSET_PX })) {
|
|
11571
11737
|
return;
|
|
11572
11738
|
}
|
|
11573
|
-
const handled = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess',
|
|
11739
|
+
const handled = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _218 => _218.navigation, 'access', _219 => _219.navigate, 'optionalCall', _220 => _220({ href, path, targetPlatform })]), () => ( false));
|
|
11574
11740
|
if (!handled) {
|
|
11575
11741
|
if (fallbackNavigate) fallbackNavigate(target);
|
|
11576
11742
|
else window.location.assign(target);
|
|
@@ -11629,7 +11795,7 @@ function NavLinkAnchorViaRuntime({
|
|
|
11629
11795
|
targetPlatform,
|
|
11630
11796
|
fallbackNavigate: router.push
|
|
11631
11797
|
});
|
|
11632
|
-
if (handled && !isNewTab && _optionalChain([panel, 'optionalAccess',
|
|
11798
|
+
if (handled && !isNewTab && _optionalChain([panel, 'optionalAccess', _221 => _221.closeChat])) panel.closeChat();
|
|
11633
11799
|
};
|
|
11634
11800
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href: resolvedHref, ..._chunkEX5PJGVAcjs.newTabAnchorAttrs.call(void 0, isNewTab), onClick, className, children });
|
|
11635
11801
|
}
|
|
@@ -11756,11 +11922,11 @@ var DEFAULT_CAPTIONS_PATH = "/api/captions";
|
|
|
11756
11922
|
function getCaptionsUrl(entityType, entityId, srtContent, options) {
|
|
11757
11923
|
if (!srtContent) return void 0;
|
|
11758
11924
|
const hash = `${srtContent.length}-${srtContent.slice(0, 8).replace(/\s/g, "")}`;
|
|
11759
|
-
const variant = _optionalChain([options, 'optionalAccess',
|
|
11925
|
+
const variant = _optionalChain([options, 'optionalAccess', _222 => _222.variant]) ? `&variant=${options.variant}` : "";
|
|
11760
11926
|
return `${DEFAULT_CAPTIONS_PATH}/${entityType}/${entityId}?v=${hash}${variant}`;
|
|
11761
11927
|
}
|
|
11762
11928
|
function resolveCaptionsBase(endpoints) {
|
|
11763
|
-
return _optionalChain([endpoints, 'optionalAccess',
|
|
11929
|
+
return _optionalChain([endpoints, 'optionalAccess', _223 => _223.captionsUrlPrefix]) || DEFAULT_CAPTIONS_PATH;
|
|
11764
11930
|
}
|
|
11765
11931
|
function rebaseCaptionsUrl(endpoints, url) {
|
|
11766
11932
|
if (!url || !url.startsWith(`${DEFAULT_CAPTIONS_PATH}/`)) return url;
|
|
@@ -11870,7 +12036,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
|
11870
12036
|
// src/components/features/use-captions.ts
|
|
11871
12037
|
|
|
11872
12038
|
function useCaptions() {
|
|
11873
|
-
const endpoints = _nullishCoalesce(_optionalChain([_chunkU2YLMFJKcjs.useChatRuntime.call(void 0, ), 'optionalAccess',
|
|
12039
|
+
const endpoints = _nullishCoalesce(_optionalChain([_chunkU2YLMFJKcjs.useChatRuntime.call(void 0, ), 'optionalAccess', _224 => _224.endpoints]), () => ( null));
|
|
11874
12040
|
return _react.useMemo.call(void 0,
|
|
11875
12041
|
() => ({
|
|
11876
12042
|
forEntity: (entityType, entity) => getEntityCaptionUrls(endpoints, entityType, entity),
|
|
@@ -11899,11 +12065,11 @@ function fetchPriorityProp(priority) {
|
|
|
11899
12065
|
var ENTER_FULLSCREEN_REQUEST = "mediaenterfullscreenrequest";
|
|
11900
12066
|
function isIosAppShell() {
|
|
11901
12067
|
const capacitor = globalThis.Capacitor;
|
|
11902
|
-
return _optionalChain([capacitor, 'optionalAccess',
|
|
12068
|
+
return _optionalChain([capacitor, 'optionalAccess', _225 => _225.isNativePlatform, 'optionalCall', _226 => _226()]) === true && _optionalChain([capacitor, 'access', _227 => _227.getPlatform, 'optionalCall', _228 => _228()]) === "ios";
|
|
11903
12069
|
}
|
|
11904
12070
|
function nativeVideoElement(player) {
|
|
11905
12071
|
const media = player.media;
|
|
11906
|
-
const element = _nullishCoalesce(_optionalChain([media, 'optionalAccess',
|
|
12072
|
+
const element = _nullishCoalesce(_optionalChain([media, 'optionalAccess', _229 => _229.nativeEl]), () => ( media));
|
|
11907
12073
|
return element instanceof HTMLVideoElement ? element : null;
|
|
11908
12074
|
}
|
|
11909
12075
|
function useIosNativeVideoFullscreen(playerRef) {
|
|
@@ -11913,7 +12079,7 @@ function useIosNativeVideoFullscreen(playerRef) {
|
|
|
11913
12079
|
if (!(player instanceof EventTarget)) return void 0;
|
|
11914
12080
|
const takeOver = (event) => {
|
|
11915
12081
|
const video = nativeVideoElement(player);
|
|
11916
|
-
if (!_optionalChain([video, 'optionalAccess',
|
|
12082
|
+
if (!_optionalChain([video, 'optionalAccess', _230 => _230.webkitSupportsFullscreen]) || typeof video.webkitEnterFullscreen !== "function") return;
|
|
11917
12083
|
event.stopImmediatePropagation();
|
|
11918
12084
|
video.webkitEnterFullscreen();
|
|
11919
12085
|
};
|
|
@@ -11947,11 +12113,11 @@ function toMuxPreviewUrl(url, maxResolution = "720p") {
|
|
|
11947
12113
|
function saveDataEnabled() {
|
|
11948
12114
|
if (typeof navigator === "undefined") return false;
|
|
11949
12115
|
const conn = navigator.connection;
|
|
11950
|
-
return _optionalChain([conn, 'optionalAccess',
|
|
12116
|
+
return _optionalChain([conn, 'optionalAccess', _231 => _231.saveData]) === true;
|
|
11951
12117
|
}
|
|
11952
12118
|
function useVideoOriginPreconnect({ supabaseStorageOrigin } = {}) {
|
|
11953
12119
|
const runtime = _chunkU2YLMFJKcjs.useChatRuntime.call(void 0, );
|
|
11954
|
-
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess',
|
|
12120
|
+
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _232 => _232.endpoints, 'access', _233 => _233.supabaseStorageOrigin])));
|
|
11955
12121
|
try {
|
|
11956
12122
|
_reactdom2.default.preconnect(MUX_STREAM_ORIGIN, { crossOrigin: "anonymous" });
|
|
11957
12123
|
_reactdom2.default.preconnect(MUX_IMAGE_ORIGIN, { crossOrigin: "anonymous" });
|
|
@@ -11970,7 +12136,7 @@ function useVideoWarmup({
|
|
|
11970
12136
|
nearMargin = "1000px"
|
|
11971
12137
|
} = {}) {
|
|
11972
12138
|
const runtime = _chunkU2YLMFJKcjs.useChatRuntime.call(void 0, );
|
|
11973
|
-
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess',
|
|
12139
|
+
const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _234 => _234.endpoints, 'access', _235 => _235.supabaseStorageOrigin])));
|
|
11974
12140
|
useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
|
|
11975
12141
|
const { ref, isNear } = _chunkTLLJIGTPcjs.useNearViewport.call(void 0, nearMargin);
|
|
11976
12142
|
_react.useEffect.call(void 0, () => {
|
|
@@ -12072,7 +12238,7 @@ if (typeof document !== "undefined") {
|
|
|
12072
12238
|
}
|
|
12073
12239
|
if (typeof window !== "undefined") {
|
|
12074
12240
|
const w = window;
|
|
12075
|
-
if (!_optionalChain([w, 'access',
|
|
12241
|
+
if (!_optionalChain([w, 'access', _236 => _236.chrome, 'optionalAccess', _237 => _237.cast])) {
|
|
12076
12242
|
w.chrome = { ..._nullishCoalesce(w.chrome, () => ( {})), cast: { isAvailable: false } };
|
|
12077
12243
|
}
|
|
12078
12244
|
}
|
|
@@ -12328,7 +12494,7 @@ function FilePlayer({
|
|
|
12328
12494
|
const clearPerfListener = _react.useCallback.call(void 0, () => {
|
|
12329
12495
|
if (perfListenerRef.current) {
|
|
12330
12496
|
try {
|
|
12331
|
-
_optionalChain([hoverPlayerRef, 'access',
|
|
12497
|
+
_optionalChain([hoverPlayerRef, 'access', _238 => _238.current, 'optionalAccess', _239 => _239.removeEventListener, 'optionalCall', _240 => _240("playing", perfListenerRef.current)]);
|
|
12332
12498
|
} catch (e21) {
|
|
12333
12499
|
}
|
|
12334
12500
|
perfListenerRef.current = null;
|
|
@@ -12363,7 +12529,7 @@ function FilePlayer({
|
|
|
12363
12529
|
};
|
|
12364
12530
|
perfListenerRef.current = onPlaying;
|
|
12365
12531
|
try {
|
|
12366
|
-
_optionalChain([el, 'access',
|
|
12532
|
+
_optionalChain([el, 'access', _241 => _241.addEventListener, 'optionalCall', _242 => _242("playing", onPlaying)]);
|
|
12367
12533
|
} catch (e22) {
|
|
12368
12534
|
}
|
|
12369
12535
|
}
|
|
@@ -12371,12 +12537,12 @@ function FilePlayer({
|
|
|
12371
12537
|
el.volume = 0.5;
|
|
12372
12538
|
if (userHasInteracted) {
|
|
12373
12539
|
el.muted = mutedIntentRef.current;
|
|
12374
|
-
_optionalChain([el, 'access',
|
|
12375
|
-
const name = _optionalChain([err, 'optionalAccess',
|
|
12540
|
+
_optionalChain([el, 'access', _243 => _243.play, 'optionalCall', _244 => _244(), 'optionalAccess', _245 => _245.catch, 'optionalCall', _246 => _246((err) => {
|
|
12541
|
+
const name = _optionalChain([err, 'optionalAccess', _247 => _247.name]);
|
|
12376
12542
|
if (name === "NotAllowedError" && hoverActiveRef.current && generation === hoverGenerationRef.current) {
|
|
12377
12543
|
try {
|
|
12378
12544
|
el.muted = true;
|
|
12379
|
-
_optionalChain([el, 'access',
|
|
12545
|
+
_optionalChain([el, 'access', _248 => _248.play, 'optionalCall', _249 => _249(), 'optionalAccess', _250 => _250.catch, 'optionalCall', _251 => _251(() => {
|
|
12380
12546
|
if (hoverActiveRef.current && generation === hoverGenerationRef.current) {
|
|
12381
12547
|
setMutedFallbackBlocked(true);
|
|
12382
12548
|
}
|
|
@@ -12388,7 +12554,7 @@ function FilePlayer({
|
|
|
12388
12554
|
})]);
|
|
12389
12555
|
} else {
|
|
12390
12556
|
el.muted = true;
|
|
12391
|
-
_optionalChain([el, 'access',
|
|
12557
|
+
_optionalChain([el, 'access', _252 => _252.play, 'optionalCall', _253 => _253(), 'optionalAccess', _254 => _254.catch, 'optionalCall', _255 => _255(() => {
|
|
12392
12558
|
if (hoverActiveRef.current && generation === hoverGenerationRef.current) {
|
|
12393
12559
|
setMutedFallbackBlocked(true);
|
|
12394
12560
|
}
|
|
@@ -12418,7 +12584,7 @@ function FilePlayer({
|
|
|
12418
12584
|
clearActivationWaiter();
|
|
12419
12585
|
clearPerfListener();
|
|
12420
12586
|
try {
|
|
12421
|
-
_optionalChain([hoverPlayerRef, 'access',
|
|
12587
|
+
_optionalChain([hoverPlayerRef, 'access', _256 => _256.current, 'optionalAccess', _257 => _257.pause, 'optionalCall', _258 => _258()]);
|
|
12422
12588
|
} catch (e26) {
|
|
12423
12589
|
}
|
|
12424
12590
|
}, [clearActivationWaiter, clearPerfListener]);
|
|
@@ -12430,7 +12596,7 @@ function FilePlayer({
|
|
|
12430
12596
|
if (el) {
|
|
12431
12597
|
el.muted = false;
|
|
12432
12598
|
el.volume = 0.5;
|
|
12433
|
-
_optionalChain([el, 'access',
|
|
12599
|
+
_optionalChain([el, 'access', _259 => _259.play, 'optionalCall', _260 => _260(), 'optionalAccess', _261 => _261.catch, 'optionalCall', _262 => _262(() => {
|
|
12434
12600
|
})]);
|
|
12435
12601
|
}
|
|
12436
12602
|
} catch (e27) {
|
|
@@ -12450,7 +12616,7 @@ function FilePlayer({
|
|
|
12450
12616
|
onMutedFallbackChangeRef.current = onMutedFallbackChange;
|
|
12451
12617
|
});
|
|
12452
12618
|
_react.useEffect.call(void 0, () => {
|
|
12453
|
-
_optionalChain([onMutedFallbackChangeRef, 'access',
|
|
12619
|
+
_optionalChain([onMutedFallbackChangeRef, 'access', _263 => _263.current, 'optionalCall', _264 => _264({
|
|
12454
12620
|
muted: hoverMutedFallback,
|
|
12455
12621
|
blocked: hoverMutedFallback && mutedFallbackBlocked
|
|
12456
12622
|
})]);
|
|
@@ -12469,7 +12635,7 @@ function FilePlayer({
|
|
|
12469
12635
|
if (autoPlay) {
|
|
12470
12636
|
const reportBlocked = () => setMutedFallbackBlocked(true);
|
|
12471
12637
|
try {
|
|
12472
|
-
_optionalChain([mutedEl, 'access',
|
|
12638
|
+
_optionalChain([mutedEl, 'access', _265 => _265.play, 'optionalCall', _266 => _266(), 'optionalAccess', _267 => _267.catch, 'optionalCall', _268 => _268(reportBlocked)]);
|
|
12473
12639
|
} catch (e29) {
|
|
12474
12640
|
reportBlocked();
|
|
12475
12641
|
}
|
|
@@ -12483,12 +12649,12 @@ function FilePlayer({
|
|
|
12483
12649
|
try {
|
|
12484
12650
|
el.muted = false;
|
|
12485
12651
|
el.volume = typeof el.volume === "number" ? el.volume : 1;
|
|
12486
|
-
_optionalChain([el, 'access',
|
|
12487
|
-
const name = _optionalChain([err, 'optionalAccess',
|
|
12652
|
+
_optionalChain([el, 'access', _269 => _269.play, 'optionalCall', _270 => _270(), 'optionalAccess', _271 => _271.catch, 'optionalCall', _272 => _272((err) => {
|
|
12653
|
+
const name = _optionalChain([err, 'optionalAccess', _273 => _273.name]);
|
|
12488
12654
|
if (name !== "NotAllowedError") return;
|
|
12489
12655
|
try {
|
|
12490
12656
|
el.muted = true;
|
|
12491
|
-
_optionalChain([el, 'access',
|
|
12657
|
+
_optionalChain([el, 'access', _274 => _274.play, 'optionalCall', _275 => _275(), 'optionalAccess', _276 => _276.catch, 'optionalCall', _277 => _277(() => {
|
|
12492
12658
|
setMutedFallbackBlocked(true);
|
|
12493
12659
|
setHoverMutedFallback(true);
|
|
12494
12660
|
})]);
|
|
@@ -12504,7 +12670,7 @@ function FilePlayer({
|
|
|
12504
12670
|
}, [autoPlayUnmuted, startMuted, autoPlay]);
|
|
12505
12671
|
_react.useEffect.call(void 0, () => {
|
|
12506
12672
|
const el = hoverPlayerRef.current;
|
|
12507
|
-
if (!_optionalChain([el, 'optionalAccess',
|
|
12673
|
+
if (!_optionalChain([el, 'optionalAccess', _278 => _278.addEventListener])) return void 0;
|
|
12508
12674
|
const onVolumeChange = () => {
|
|
12509
12675
|
if (el.muted === false) {
|
|
12510
12676
|
setMutedFallbackBlocked(false);
|
|
@@ -12517,14 +12683,14 @@ function FilePlayer({
|
|
|
12517
12683
|
}
|
|
12518
12684
|
return () => {
|
|
12519
12685
|
try {
|
|
12520
|
-
_optionalChain([el, 'access',
|
|
12686
|
+
_optionalChain([el, 'access', _279 => _279.removeEventListener, 'optionalCall', _280 => _280("volumechange", onVolumeChange)]);
|
|
12521
12687
|
} catch (e33) {
|
|
12522
12688
|
}
|
|
12523
12689
|
};
|
|
12524
12690
|
}, []);
|
|
12525
12691
|
_react.useEffect.call(void 0, () => {
|
|
12526
12692
|
const el = hoverPlayerRef.current;
|
|
12527
|
-
if (!_optionalChain([el, 'optionalAccess',
|
|
12693
|
+
if (!_optionalChain([el, 'optionalAccess', _281 => _281.addEventListener])) return void 0;
|
|
12528
12694
|
const onPlaying = () => setMutedFallbackBlocked(false);
|
|
12529
12695
|
try {
|
|
12530
12696
|
el.addEventListener("playing", onPlaying);
|
|
@@ -12532,7 +12698,7 @@ function FilePlayer({
|
|
|
12532
12698
|
}
|
|
12533
12699
|
return () => {
|
|
12534
12700
|
try {
|
|
12535
|
-
_optionalChain([el, 'access',
|
|
12701
|
+
_optionalChain([el, 'access', _282 => _282.removeEventListener, 'optionalCall', _283 => _283("playing", onPlaying)]);
|
|
12536
12702
|
} catch (e35) {
|
|
12537
12703
|
}
|
|
12538
12704
|
};
|
|
@@ -12543,15 +12709,15 @@ function FilePlayer({
|
|
|
12543
12709
|
});
|
|
12544
12710
|
_react.useEffect.call(void 0, () => {
|
|
12545
12711
|
const el = hoverPlayerRef.current;
|
|
12546
|
-
if (!_optionalChain([el, 'optionalAccess',
|
|
12547
|
-
const handler = () => _optionalChain([onEndedRef, 'access',
|
|
12712
|
+
if (!_optionalChain([el, 'optionalAccess', _284 => _284.addEventListener])) return void 0;
|
|
12713
|
+
const handler = () => _optionalChain([onEndedRef, 'access', _285 => _285.current, 'optionalCall', _286 => _286()]);
|
|
12548
12714
|
try {
|
|
12549
12715
|
el.addEventListener("ended", handler);
|
|
12550
12716
|
} catch (e36) {
|
|
12551
12717
|
}
|
|
12552
12718
|
return () => {
|
|
12553
12719
|
try {
|
|
12554
|
-
_optionalChain([el, 'access',
|
|
12720
|
+
_optionalChain([el, 'access', _287 => _287.removeEventListener, 'optionalCall', _288 => _288("ended", handler)]);
|
|
12555
12721
|
} catch (e37) {
|
|
12556
12722
|
}
|
|
12557
12723
|
};
|
|
@@ -12560,19 +12726,19 @@ function FilePlayer({
|
|
|
12560
12726
|
_react.useImperativeHandle.call(void 0,
|
|
12561
12727
|
playerHandleRef,
|
|
12562
12728
|
() => ({
|
|
12563
|
-
getCurrentTime: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access',
|
|
12729
|
+
getCurrentTime: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _289 => _289.current, 'optionalAccess', _290 => _290.currentTime]), () => ( 0)),
|
|
12564
12730
|
getDuration: () => {
|
|
12565
|
-
const d = _optionalChain([hoverPlayerRef, 'access',
|
|
12731
|
+
const d = _optionalChain([hoverPlayerRef, 'access', _291 => _291.current, 'optionalAccess', _292 => _292.duration]);
|
|
12566
12732
|
return typeof d === "number" && isFinite(d) ? d : 0;
|
|
12567
12733
|
},
|
|
12568
|
-
getPaused: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access',
|
|
12569
|
-
getMuted: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access',
|
|
12734
|
+
getPaused: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _293 => _293.current, 'optionalAccess', _294 => _294.paused]), () => ( true)),
|
|
12735
|
+
getMuted: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _295 => _295.current, 'optionalAccess', _296 => _296.muted]), () => ( false)),
|
|
12570
12736
|
play: async () => {
|
|
12571
|
-
await _optionalChain([hoverPlayerRef, 'access',
|
|
12737
|
+
await _optionalChain([hoverPlayerRef, 'access', _297 => _297.current, 'optionalAccess', _298 => _298.play, 'optionalCall', _299 => _299()]);
|
|
12572
12738
|
},
|
|
12573
12739
|
pause: () => {
|
|
12574
12740
|
try {
|
|
12575
|
-
_optionalChain([hoverPlayerRef, 'access',
|
|
12741
|
+
_optionalChain([hoverPlayerRef, 'access', _300 => _300.current, 'optionalAccess', _301 => _301.pause, 'optionalCall', _302 => _302()]);
|
|
12576
12742
|
} catch (e38) {
|
|
12577
12743
|
}
|
|
12578
12744
|
},
|
|
@@ -12639,10 +12805,10 @@ function FilePlayer({
|
|
|
12639
12805
|
if (!el) return;
|
|
12640
12806
|
const resumeAt = typeof el.currentTime === "number" ? el.currentTime : 0;
|
|
12641
12807
|
try {
|
|
12642
|
-
_optionalChain([el, 'access',
|
|
12808
|
+
_optionalChain([el, 'access', _303 => _303.load, 'optionalCall', _304 => _304()]);
|
|
12643
12809
|
if (resumeAt > 0 && el.addEventListener && el.removeEventListener) {
|
|
12644
12810
|
const seekBack = () => {
|
|
12645
|
-
_optionalChain([el, 'access',
|
|
12811
|
+
_optionalChain([el, 'access', _305 => _305.removeEventListener, 'optionalCall', _306 => _306("loadedmetadata", seekBack)]);
|
|
12646
12812
|
try {
|
|
12647
12813
|
el.currentTime = resumeAt;
|
|
12648
12814
|
} catch (e40) {
|
|
@@ -12650,7 +12816,7 @@ function FilePlayer({
|
|
|
12650
12816
|
};
|
|
12651
12817
|
el.addEventListener("loadedmetadata", seekBack);
|
|
12652
12818
|
}
|
|
12653
|
-
_optionalChain([el, 'access',
|
|
12819
|
+
_optionalChain([el, 'access', _307 => _307.play, 'optionalCall', _308 => _308(), 'optionalAccess', _309 => _309.catch, 'optionalCall', _310 => _310(() => {
|
|
12654
12820
|
})]);
|
|
12655
12821
|
} catch (e41) {
|
|
12656
12822
|
}
|
|
@@ -12809,7 +12975,7 @@ function YouTubeFacadeInner({
|
|
|
12809
12975
|
const iframe = iframeRef.current;
|
|
12810
12976
|
if (!iframe) return void 0;
|
|
12811
12977
|
function subscribe2() {
|
|
12812
|
-
_optionalChain([iframe, 'optionalAccess',
|
|
12978
|
+
_optionalChain([iframe, 'optionalAccess', _311 => _311.contentWindow, 'optionalAccess', _312 => _312.postMessage, 'call', _313 => _313('{"event":"listening"}', YT_NOCOOKIE_ORIGIN)]);
|
|
12813
12979
|
}
|
|
12814
12980
|
iframe.addEventListener("load", subscribe2);
|
|
12815
12981
|
subscribe2();
|
|
@@ -12830,13 +12996,13 @@ function YouTubeFacadeInner({
|
|
|
12830
12996
|
return;
|
|
12831
12997
|
}
|
|
12832
12998
|
if (payload.event !== "infoDelivery") return;
|
|
12833
|
-
const state = _optionalChain([payload, 'access',
|
|
12999
|
+
const state = _optionalChain([payload, 'access', _314 => _314.info, 'optionalAccess', _315 => _315.playerState]);
|
|
12834
13000
|
if (typeof state !== "number") return;
|
|
12835
13001
|
if (state === YT_STATE_PLAYING) {
|
|
12836
13002
|
if (blurTimer !== null) return;
|
|
12837
13003
|
blurTimer = setTimeout(() => {
|
|
12838
13004
|
blurTimer = null;
|
|
12839
|
-
_optionalChain([iframeRef, 'access',
|
|
13005
|
+
_optionalChain([iframeRef, 'access', _316 => _316.current, 'optionalAccess', _317 => _317.blur, 'call', _318 => _318()]);
|
|
12840
13006
|
}, YT_PLAYING_BLUR_DELAY_MS);
|
|
12841
13007
|
return;
|
|
12842
13008
|
}
|
|
@@ -12857,7 +13023,7 @@ function YouTubeFacadeInner({
|
|
|
12857
13023
|
prevSuspendedRef.current = Boolean(suspended);
|
|
12858
13024
|
if (!activated) return;
|
|
12859
13025
|
if (suspended && !wasSuspended) {
|
|
12860
|
-
_optionalChain([iframeRef, 'access',
|
|
13026
|
+
_optionalChain([iframeRef, 'access', _319 => _319.current, 'optionalAccess', _320 => _320.contentWindow, 'optionalAccess', _321 => _321.postMessage, 'call', _322 => _322(
|
|
12861
13027
|
'{"event":"command","func":"pauseVideo","args":[]}',
|
|
12862
13028
|
YT_NOCOOKIE_ORIGIN
|
|
12863
13029
|
)]);
|
|
@@ -13111,7 +13277,7 @@ function CardsStrip(props) {
|
|
|
13111
13277
|
_react.useEffect.call(void 0, () => {
|
|
13112
13278
|
const el = wrapperRef.current;
|
|
13113
13279
|
if (!el || typeof IntersectionObserver === "undefined") return void 0;
|
|
13114
|
-
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access',
|
|
13280
|
+
const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access', _323 => _323[0], 'optionalAccess', _324 => _324.isIntersecting]), () => ( true))), {
|
|
13115
13281
|
rootMargin: "200px"
|
|
13116
13282
|
});
|
|
13117
13283
|
io.observe(el);
|
|
@@ -13133,9 +13299,9 @@ function CardsStrip(props) {
|
|
|
13133
13299
|
const p = hoverPointerRef.current;
|
|
13134
13300
|
if (!p.inside) return;
|
|
13135
13301
|
const el = typeof document !== "undefined" ? document.elementFromPoint(p.x, p.y) : null;
|
|
13136
|
-
const cardEl = _optionalChain([el, 'optionalAccess',
|
|
13137
|
-
const scoped = cardEl && _optionalChain([scrollerRef, 'access',
|
|
13138
|
-
const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess',
|
|
13302
|
+
const cardEl = _optionalChain([el, 'optionalAccess', _325 => _325.closest, 'optionalCall', _326 => _326("[data-strip-card-key]")]);
|
|
13303
|
+
const scoped = cardEl && _optionalChain([scrollerRef, 'access', _327 => _327.current, 'optionalAccess', _328 => _328.contains, 'call', _329 => _329(cardEl)]) ? cardEl : null;
|
|
13304
|
+
const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess', _330 => _330.getAttribute, 'call', _331 => _331("data-strip-card-key")]), () => ( null));
|
|
13139
13305
|
const current = activeKeyRef.current;
|
|
13140
13306
|
if (key === current) return;
|
|
13141
13307
|
if (current !== null) deactivate(current);
|
|
@@ -13173,7 +13339,7 @@ function CardsStrip(props) {
|
|
|
13173
13339
|
}, [syncHoverToPointer]);
|
|
13174
13340
|
const seamBuffer = _react.useCallback.call(void 0, () => {
|
|
13175
13341
|
const half = singleCopyWidthRef.current;
|
|
13176
|
-
const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access',
|
|
13342
|
+
const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access', _332 => _332.current, 'optionalAccess', _333 => _333.clientWidth]), () => ( 0));
|
|
13177
13343
|
return Math.max(0, Math.min(200, half / 4, half - viewport - TRACK_GAP_PX - 1));
|
|
13178
13344
|
}, []);
|
|
13179
13345
|
const { posRef: marqueePosRef, glideBy } = _chunkTLLJIGTPcjs.useMarqueeEngine.call(void 0, {
|
|
@@ -13189,7 +13355,7 @@ function CardsStrip(props) {
|
|
|
13189
13355
|
const scroller = scrollerRef.current;
|
|
13190
13356
|
if (scroller) scroller.scrollLeft = pos;
|
|
13191
13357
|
},
|
|
13192
|
-
readBack: () => _nullishCoalesce(_optionalChain([scrollerRef, 'access',
|
|
13358
|
+
readBack: () => _nullishCoalesce(_optionalChain([scrollerRef, 'access', _334 => _334.current, 'optionalAccess', _335 => _335.scrollLeft]), () => ( 0)),
|
|
13193
13359
|
onAfterFrame: syncHoverIfScrolled
|
|
13194
13360
|
});
|
|
13195
13361
|
const [mountedIdx, setMountedIdx] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
|
|
@@ -13237,11 +13403,11 @@ function CardsStrip(props) {
|
|
|
13237
13403
|
fn = (el) => {
|
|
13238
13404
|
if (!el) return void 0;
|
|
13239
13405
|
cardElIdxRef.current.set(el, idx);
|
|
13240
|
-
_optionalChain([cardObserverRef, 'access',
|
|
13406
|
+
_optionalChain([cardObserverRef, 'access', _336 => _336.current, 'optionalAccess', _337 => _337.observe, 'call', _338 => _338(el)]);
|
|
13241
13407
|
return () => {
|
|
13242
13408
|
cardElIdxRef.current.delete(el);
|
|
13243
13409
|
cardElNearRef.current.delete(el);
|
|
13244
|
-
_optionalChain([cardObserverRef, 'access',
|
|
13410
|
+
_optionalChain([cardObserverRef, 'access', _339 => _339.current, 'optionalAccess', _340 => _340.unobserve, 'call', _341 => _341(el)]);
|
|
13245
13411
|
};
|
|
13246
13412
|
};
|
|
13247
13413
|
cardRefFns.set(idx, fn);
|
|
@@ -13260,7 +13426,7 @@ function CardsStrip(props) {
|
|
|
13260
13426
|
const track = trackRef.current;
|
|
13261
13427
|
if (!scroller || !track) return;
|
|
13262
13428
|
const firstCard = track.firstElementChild;
|
|
13263
|
-
const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess',
|
|
13429
|
+
const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess', _342 => _342.offsetWidth]), () => ( 320))) + TRACK_GAP_PX;
|
|
13264
13430
|
chevronSuppressUntilRef.current = performance.now() + CHEVRON_SUPPRESS_MS;
|
|
13265
13431
|
if (marqueeActiveRef.current) {
|
|
13266
13432
|
glideBy(dir * step);
|
|
@@ -13317,7 +13483,7 @@ function CardsStrip(props) {
|
|
|
13317
13483
|
{
|
|
13318
13484
|
ref: (node) => {
|
|
13319
13485
|
wrapperRef.current = node;
|
|
13320
|
-
_optionalChain([rootRef, 'optionalCall',
|
|
13486
|
+
_optionalChain([rootRef, 'optionalCall', _343 => _343(node)]);
|
|
13321
13487
|
},
|
|
13322
13488
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0, "flex w-full min-w-0 flex-col gap-6", className),
|
|
13323
13489
|
children: [
|
|
@@ -13429,7 +13595,7 @@ function VideoHoverPreviewSurface({
|
|
|
13429
13595
|
if (gateControlled) return void 0;
|
|
13430
13596
|
const el = rootElRef.current;
|
|
13431
13597
|
if (!el || typeof IntersectionObserver === "undefined") return void 0;
|
|
13432
|
-
const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access',
|
|
13598
|
+
const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access', _344 => _344[0], 'optionalAccess', _345 => _345.isIntersecting]), () => ( false))), {
|
|
13433
13599
|
rootMargin: _chunkTLLJIGTPcjs.NEAR_VIEWPORT_ROOT_MARGIN
|
|
13434
13600
|
});
|
|
13435
13601
|
io.observe(el);
|
|
@@ -13574,7 +13740,7 @@ function VideoBitesStrip({
|
|
|
13574
13740
|
const filtered = filterPublished ? bites.filter((b) => b.published) : [...bites];
|
|
13575
13741
|
return filtered.sort(sortComparator);
|
|
13576
13742
|
}, [bites, filterPublished, sortComparator]);
|
|
13577
|
-
const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access',
|
|
13743
|
+
const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access', _346 => _346[0], 'optionalAccess', _347 => _347.url]) || null });
|
|
13578
13744
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
13579
13745
|
CardsStrip,
|
|
13580
13746
|
{
|
|
@@ -13641,8 +13807,8 @@ function VideoBiteCard({
|
|
|
13641
13807
|
const controlled = active !== void 0;
|
|
13642
13808
|
const [selfActive, setSelfActive] = _react.useState.call(void 0, false);
|
|
13643
13809
|
const isActive = controlled ? !!active : selfActive;
|
|
13644
|
-
const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall',
|
|
13645
|
-
const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall',
|
|
13810
|
+
const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall', _348 => _348(key)]) : setSelfActive(true);
|
|
13811
|
+
const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall', _349 => _349(key)]) : setSelfActive(false);
|
|
13646
13812
|
const titleInputRef = _react.useRef.call(void 0, null);
|
|
13647
13813
|
_chunkTLLJIGTPcjs.useIsomorphicLayoutEffect.call(void 0, () => {
|
|
13648
13814
|
const el = titleInputRef.current;
|
|
@@ -13652,7 +13818,7 @@ function VideoBiteCard({
|
|
|
13652
13818
|
});
|
|
13653
13819
|
const navigate = () => {
|
|
13654
13820
|
if (bite.onNavigate) bite.onNavigate();
|
|
13655
|
-
else _optionalChain([onBiteNavigate, 'optionalCall',
|
|
13821
|
+
else _optionalChain([onBiteNavigate, 'optionalCall', _350 => _350(bite, index)]);
|
|
13656
13822
|
};
|
|
13657
13823
|
const handlePointerEnter = () => {
|
|
13658
13824
|
if (!isTouch) activate();
|
|
@@ -13677,9 +13843,9 @@ function VideoBiteCard({
|
|
|
13677
13843
|
placeholder: "Title (optional)",
|
|
13678
13844
|
"aria-label": "Bite title",
|
|
13679
13845
|
rows: 1,
|
|
13680
|
-
onChange: (e) => _optionalChain([onTitleChange, 'optionalCall',
|
|
13846
|
+
onChange: (e) => _optionalChain([onTitleChange, 'optionalCall', _351 => _351(e.target.value)]),
|
|
13681
13847
|
ref: titleInputRef,
|
|
13682
|
-
onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall',
|
|
13848
|
+
onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall', _352 => _352(e.target.value)]),
|
|
13683
13849
|
onClick: (e) => e.stopPropagation(),
|
|
13684
13850
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
13685
13851
|
titleClass,
|
|
@@ -13756,7 +13922,7 @@ function VideoBiteCard({
|
|
|
13756
13922
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
13757
13923
|
"div",
|
|
13758
13924
|
{
|
|
13759
|
-
ref: (node) => _optionalChain([rootRef, 'optionalCall',
|
|
13925
|
+
ref: (node) => _optionalChain([rootRef, 'optionalCall', _353 => _353(node)]),
|
|
13760
13926
|
"aria-hidden": isClone || void 0,
|
|
13761
13927
|
"data-strip-card-key": key,
|
|
13762
13928
|
className: _chunkX7CEWD6Vcjs.cn.call(void 0,
|
|
@@ -13811,8 +13977,8 @@ function EntityVideoSection({
|
|
|
13811
13977
|
const hasHighlight = !!highlightVideoUrl;
|
|
13812
13978
|
const hasVideo = hasFullVideo || hasHighlight;
|
|
13813
13979
|
const derivedCaptions = captionsEntity ? captions.forEntityId(captionsEntity.type, captionsEntity.id) : null;
|
|
13814
|
-
const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess',
|
|
13815
|
-
const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess',
|
|
13980
|
+
const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _354 => _354.captionsUrl])));
|
|
13981
|
+
const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _355 => _355.highlightCaptionsUrl])));
|
|
13816
13982
|
if (!hasVideo && !videoSummary && (!videoBites || videoBites.length === 0)) {
|
|
13817
13983
|
return null;
|
|
13818
13984
|
}
|
|
@@ -14331,7 +14497,7 @@ function DataRoomDocCard({ item, className, badgeText, anchorProps }) {
|
|
|
14331
14497
|
] }) : null,
|
|
14332
14498
|
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
|
|
14333
14499
|
] }),
|
|
14334
|
-
_optionalChain([anchorProps, 'optionalAccess',
|
|
14500
|
+
_optionalChain([anchorProps, 'optionalAccess', _356 => _356.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
|
|
14335
14501
|
] });
|
|
14336
14502
|
if (!anchorProps) {
|
|
14337
14503
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkEX5PJGVAcjs.COMPACT_CARD_OUTER_STATIC} ${_nullishCoalesce(className, () => ( ""))}`, "aria-label": "No link available", children: body });
|
|
@@ -14359,7 +14525,7 @@ function DataRoomDocCardSkeleton({ className }) {
|
|
|
14359
14525
|
|
|
14360
14526
|
|
|
14361
14527
|
function CampaignCardAdmin({ campaign, className, anchorProps }) {
|
|
14362
|
-
const goalsCount = _optionalChain([campaign, 'access',
|
|
14528
|
+
const goalsCount = _optionalChain([campaign, 'access', _357 => _357.goals, 'optionalAccess', _358 => _358.length]) || 0;
|
|
14363
14529
|
const innerChildren = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
14364
14530
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkEX5PJGVAcjs.COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Megaphone, { className: "h-5 w-5" }) }),
|
|
14365
14531
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkEX5PJGVAcjs.COMPACT_CARD_TEXT_COL, children: [
|
|
@@ -14653,7 +14819,7 @@ function pickFetchedCardHref({
|
|
|
14653
14819
|
itemHref,
|
|
14654
14820
|
allowComposed
|
|
14655
14821
|
}) {
|
|
14656
|
-
if (_optionalChain([composed, 'optionalAccess',
|
|
14822
|
+
if (_optionalChain([composed, 'optionalAccess', _359 => _359.hostOverride])) {
|
|
14657
14823
|
return { source: "hostOverride", href: composed.href, targetPlatform: composed.targetPlatform };
|
|
14658
14824
|
}
|
|
14659
14825
|
if (itemHref) return { source: "item", href: itemHref };
|
|
@@ -14897,7 +15063,7 @@ function byKey(key) {
|
|
|
14897
15063
|
return PLATFORM_DOMAINS.find((e) => e.key === key);
|
|
14898
15064
|
}
|
|
14899
15065
|
function envOverrideFor(key) {
|
|
14900
|
-
const envVar = _optionalChain([byKey, 'call',
|
|
15066
|
+
const envVar = _optionalChain([byKey, 'call', _360 => _360(key), 'optionalAccess', _361 => _361.envVar]);
|
|
14901
15067
|
if (!envVar) return null;
|
|
14902
15068
|
return ENV_OVERRIDES[envVar] || null;
|
|
14903
15069
|
}
|
|
@@ -14907,7 +15073,7 @@ function ensureScheme(url) {
|
|
|
14907
15073
|
return `https://${trimmed.replace(/^\/+/, "")}`;
|
|
14908
15074
|
}
|
|
14909
15075
|
function getPlatformProductionUrl(platform) {
|
|
14910
|
-
const resolved = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(envOverrideFor(platform), () => ( _optionalChain([byKey, 'call',
|
|
15076
|
+
const resolved = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(envOverrideFor(platform), () => ( _optionalChain([byKey, 'call', _362 => _362(platform), 'optionalAccess', _363 => _363.defaultUrl]))), () => ( envOverrideFor("flamingo"))), () => ( "https://www.flamingo.run"));
|
|
14911
15077
|
return ensureScheme(resolved);
|
|
14912
15078
|
}
|
|
14913
15079
|
function getPlatformUrl(platform, options = {}) {
|
|
@@ -14916,7 +15082,7 @@ function getPlatformUrl(platform, options = {}) {
|
|
|
14916
15082
|
}
|
|
14917
15083
|
function getDeploymentUrl(options) {
|
|
14918
15084
|
if (typeof window !== "undefined") return window.location.origin;
|
|
14919
|
-
const configured = _optionalChain([options, 'access',
|
|
15085
|
+
const configured = _optionalChain([options, 'access', _364 => _364.configuredUrl, 'optionalAccess', _365 => _365.trim, 'call', _366 => _366()]);
|
|
14920
15086
|
if (configured) return ensureScheme(configured).replace(/\/+$/, "");
|
|
14921
15087
|
if (process.env.VERCEL_ENV === "preview" && process.env.VERCEL_URL) {
|
|
14922
15088
|
return ensureScheme(process.env.VERCEL_URL).replace(/\/+$/, "");
|
|
@@ -14938,7 +15104,7 @@ function getRequestOrigin(headers, options) {
|
|
|
14938
15104
|
const host = headers.get("host");
|
|
14939
15105
|
if (!host) return getDeploymentUrl(options);
|
|
14940
15106
|
const local = LOCAL_HOSTNAME.test(host.replace(/:\d+$/, ""));
|
|
14941
|
-
const proto = _optionalChain([headers, 'access',
|
|
15107
|
+
const proto = _optionalChain([headers, 'access', _367 => _367.get, 'call', _368 => _368("x-forwarded-proto"), 'optionalAccess', _369 => _369.split, 'call', _370 => _370(","), 'access', _371 => _371[0], 'access', _372 => _372.trim, 'call', _373 => _373()]) || (local ? "http" : "https");
|
|
14942
15108
|
return `${proto}://${host}`;
|
|
14943
15109
|
}
|
|
14944
15110
|
function resolveRedirectTarget(origin, target) {
|
|
@@ -14967,7 +15133,7 @@ function toRegistrableBaseDomain(host) {
|
|
|
14967
15133
|
return void 0;
|
|
14968
15134
|
}
|
|
14969
15135
|
function aliasHostsOf(key) {
|
|
14970
|
-
return _nullishCoalesce(_optionalChain([byKey, 'call',
|
|
15136
|
+
return _nullishCoalesce(_optionalChain([byKey, 'call', _374 => _374(key), 'optionalAccess', _375 => _375.aliasHostnames]), () => ( []));
|
|
14971
15137
|
}
|
|
14972
15138
|
function hostsForEntry(entry, opts) {
|
|
14973
15139
|
const resolved = hostOf(getPlatformProductionUrl(entry.key));
|
|
@@ -15048,7 +15214,7 @@ function resolveSourceRowCTA(row, ctx = {}) {
|
|
|
15048
15214
|
if (row.path && shouldFallbackToPathNav(row) && !row.externalUrl) {
|
|
15049
15215
|
const safePath = sanitizePath(row.path);
|
|
15050
15216
|
if (safePath) {
|
|
15051
|
-
const docTarget = row.documentType ? _optionalChain([ctx, 'access',
|
|
15217
|
+
const docTarget = row.documentType ? _optionalChain([ctx, 'access', _376 => _376.docPlatformTargets, 'optionalAccess', _377 => _377[row.documentType]]) : void 0;
|
|
15052
15218
|
if (docTarget) {
|
|
15053
15219
|
const seg = docTarget.basePath.split("/").filter(Boolean).join("/");
|
|
15054
15220
|
const base = `${getPlatformUrl(docTarget.platform)}${seg ? `/${seg}` : ""}/`;
|
|
@@ -15191,8 +15357,8 @@ function cardMenuGroups(href, discuss, openDetails, externalLink) {
|
|
|
15191
15357
|
if (href) {
|
|
15192
15358
|
items.push({
|
|
15193
15359
|
id: "open-details",
|
|
15194
|
-
label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess',
|
|
15195
|
-
icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess',
|
|
15360
|
+
label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _378 => _378.label]), () => ( "Open Details")),
|
|
15361
|
+
icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _379 => _379.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.EyeIcon, { size: 20 }))),
|
|
15196
15362
|
// Main row → open the entity (same tab, soft Link nav).
|
|
15197
15363
|
href,
|
|
15198
15364
|
// Trailing 40px ↗ side-button → open in a new tab.
|
|
@@ -15252,18 +15418,18 @@ function itemVideoMetadata(item) {
|
|
|
15252
15418
|
for (const v of vals) if (typeof v === "string" && v.length > 0) return v;
|
|
15253
15419
|
return void 0;
|
|
15254
15420
|
};
|
|
15255
|
-
const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15421
|
+
const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess', _380 => _380.metadata]), () => ( {}));
|
|
15256
15422
|
const out = {};
|
|
15257
|
-
const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess',
|
|
15258
|
-
const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess',
|
|
15259
|
-
const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess',
|
|
15423
|
+
const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess', _381 => _381.custom_video_url]), _optionalChain([item, 'optionalAccess', _382 => _382.main_video_url]));
|
|
15424
|
+
const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess', _383 => _383.youtube_url]), _optionalChain([item, 'optionalAccess', _384 => _384.testimonial_video_url]));
|
|
15425
|
+
const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess', _385 => _385.highlight_video_url]));
|
|
15260
15426
|
const videoPoster = pick(
|
|
15261
15427
|
m.videoPoster,
|
|
15262
|
-
_optionalChain([item, 'optionalAccess',
|
|
15263
|
-
_optionalChain([item, 'optionalAccess',
|
|
15264
|
-
_optionalChain([item, 'optionalAccess',
|
|
15428
|
+
_optionalChain([item, 'optionalAccess', _386 => _386.main_video_thumbnail]),
|
|
15429
|
+
_optionalChain([item, 'optionalAccess', _387 => _387.highlight_video_thumbnail]),
|
|
15430
|
+
_optionalChain([item, 'optionalAccess', _388 => _388.featured_image])
|
|
15265
15431
|
);
|
|
15266
|
-
const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess',
|
|
15432
|
+
const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess', _389 => _389.highlight_video_thumbnail]));
|
|
15267
15433
|
if (videoUrl) out.videoUrl = videoUrl;
|
|
15268
15434
|
if (youtubeUrl) out.youtubeUrl = youtubeUrl;
|
|
15269
15435
|
if (highlightVideoUrl) out.highlightVideoUrl = highlightVideoUrl;
|
|
@@ -15293,15 +15459,15 @@ function fetchedItemDisplayRef(item, chatRef) {
|
|
|
15293
15459
|
}
|
|
15294
15460
|
function fetchedFaqDisplayRef(item, chatRef) {
|
|
15295
15461
|
const it = item;
|
|
15296
|
-
const answer = typeof _optionalChain([it, 'optionalAccess',
|
|
15462
|
+
const answer = typeof _optionalChain([it, 'optionalAccess', _390 => _390.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
|
|
15297
15463
|
return {
|
|
15298
15464
|
type: "faq",
|
|
15299
15465
|
id: chatRef.id,
|
|
15300
15466
|
sourceRepo: chatRef.sourceRepo,
|
|
15301
|
-
title: typeof _optionalChain([it, 'optionalAccess',
|
|
15467
|
+
title: typeof _optionalChain([it, 'optionalAccess', _391 => _391.question]) === "string" && it.question ? it.question : chatRef.id,
|
|
15302
15468
|
url: _nullishCoalesce(chatRef.url, () => ( null)),
|
|
15303
15469
|
...answer ? { preview: answer.length > 400 ? `${answer.slice(0, 397)}\u2026` : answer } : {},
|
|
15304
|
-
metadata: typeof _optionalChain([it, 'optionalAccess',
|
|
15470
|
+
metadata: typeof _optionalChain([it, 'optionalAccess', _392 => _392.section]) === "string" && it.section ? { section: it.section } : {}
|
|
15305
15471
|
};
|
|
15306
15472
|
}
|
|
15307
15473
|
function HubspotTicketChatCard({
|
|
@@ -15309,8 +15475,8 @@ function HubspotTicketChatCard({
|
|
|
15309
15475
|
isNewTab,
|
|
15310
15476
|
discuss
|
|
15311
15477
|
}) {
|
|
15312
|
-
const status = typeof _optionalChain([chatRef, 'access',
|
|
15313
|
-
const statusLabel = typeof _optionalChain([chatRef, 'access',
|
|
15478
|
+
const status = typeof _optionalChain([chatRef, 'access', _393 => _393.metadata, 'optionalAccess', _394 => _394.status]) === "string" ? chatRef.metadata.status : void 0;
|
|
15479
|
+
const statusLabel = typeof _optionalChain([chatRef, 'access', _395 => _395.metadata, 'optionalAccess', _396 => _396.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
|
|
15314
15480
|
const statusText = _nullishCoalesce(statusLabel, () => ( formatStatusToken(status)));
|
|
15315
15481
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15316
15482
|
MingoInfoCard,
|
|
@@ -15333,7 +15499,7 @@ function FaqChatCard({
|
|
|
15333
15499
|
isNewTab,
|
|
15334
15500
|
discuss
|
|
15335
15501
|
}) {
|
|
15336
|
-
const section = typeof _optionalChain([chatRef, 'access',
|
|
15502
|
+
const section = typeof _optionalChain([chatRef, 'access', _397 => _397.metadata, 'optionalAccess', _398 => _398.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
|
|
15337
15503
|
const statusLabel = section && section.length > 0 ? section : "FAQ";
|
|
15338
15504
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15339
15505
|
MingoInfoCard,
|
|
@@ -15353,7 +15519,7 @@ function SlackChatCard({
|
|
|
15353
15519
|
isNewTab,
|
|
15354
15520
|
discuss
|
|
15355
15521
|
}) {
|
|
15356
|
-
const channelName = typeof _optionalChain([chatRef, 'access',
|
|
15522
|
+
const channelName = typeof _optionalChain([chatRef, 'access', _399 => _399.metadata, 'optionalAccess', _400 => _400.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
|
|
15357
15523
|
const channelPretty = channelName ? channelName.startsWith("#") ? channelName : `#${channelName}` : void 0;
|
|
15358
15524
|
const title = channelPretty ? `${chatRef.title} \xB7 ${channelPretty}` : chatRef.title;
|
|
15359
15525
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -15411,7 +15577,7 @@ function GenericFinancialChatCard({
|
|
|
15411
15577
|
isNewTab,
|
|
15412
15578
|
discuss
|
|
15413
15579
|
}) {
|
|
15414
|
-
const subtitle = typeof _optionalChain([chatRef, 'access',
|
|
15580
|
+
const subtitle = typeof _optionalChain([chatRef, 'access', _401 => _401.metadata, 'optionalAccess', _402 => _402.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
|
|
15415
15581
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15416
15582
|
MingoInfoCard,
|
|
15417
15583
|
{
|
|
@@ -15480,12 +15646,12 @@ function ProductReleaseChatCard({
|
|
|
15480
15646
|
discuss
|
|
15481
15647
|
}) {
|
|
15482
15648
|
const releaseProps = buildProps(item);
|
|
15483
|
-
const status = _optionalChain([item, 'optionalAccess',
|
|
15649
|
+
const status = _optionalChain([item, 'optionalAccess', _403 => _403.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
|
|
15484
15650
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15485
15651
|
EntityMingoCard,
|
|
15486
15652
|
{
|
|
15487
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15488
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15653
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _404 => _404.title]), () => ( "")),
|
|
15654
|
+
description: _optionalChain([item, 'optionalAccess', _405 => _405.summary]) || releaseProps.formattedDate || void 0,
|
|
15489
15655
|
cover: releaseProps.coverImage || void 0,
|
|
15490
15656
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.Rocket02Icon, { size: 24 }),
|
|
15491
15657
|
status,
|
|
@@ -15502,17 +15668,17 @@ function CampaignChatCard({
|
|
|
15502
15668
|
isNewTab,
|
|
15503
15669
|
discuss
|
|
15504
15670
|
}) {
|
|
15505
|
-
const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess',
|
|
15671
|
+
const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _406 => _406.goals])) ? item.goals.length : 0;
|
|
15506
15672
|
const meta = [
|
|
15507
|
-
_optionalChain([item, 'optionalAccess',
|
|
15673
|
+
_optionalChain([item, 'optionalAccess', _407 => _407.start_date]) ? _chunkEX5PJGVAcjs.formatDateShort.call(void 0, item.start_date) : null,
|
|
15508
15674
|
goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
|
|
15509
15675
|
"Marketing campaign"
|
|
15510
15676
|
].filter(Boolean).join(" \xB7 ");
|
|
15511
15677
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15512
15678
|
EntityMingoCard,
|
|
15513
15679
|
{
|
|
15514
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15515
|
-
description: meta || _optionalChain([item, 'optionalAccess',
|
|
15680
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _408 => _408.name]), () => ( "")),
|
|
15681
|
+
description: meta || _optionalChain([item, 'optionalAccess', _409 => _409.description]) || void 0,
|
|
15516
15682
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.Megaphone01Icon, { size: 24 }),
|
|
15517
15683
|
chatRef,
|
|
15518
15684
|
isNewTab,
|
|
@@ -15567,14 +15733,14 @@ function BlogChatCard({
|
|
|
15567
15733
|
hasEmbeddedVideo,
|
|
15568
15734
|
discuss
|
|
15569
15735
|
}) {
|
|
15570
|
-
const category = Array.isArray(_optionalChain([item, 'optionalAccess',
|
|
15736
|
+
const category = Array.isArray(_optionalChain([item, 'optionalAccess', _410 => _410.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _411 => _411.categories, 'access', _412 => _412.find, 'call', _413 => _413((c) => _optionalChain([c, 'optionalAccess', _414 => _414.name])), 'optionalAccess', _415 => _415.name]), () => ( void 0)) : void 0;
|
|
15571
15737
|
const status = hasEmbeddedVideo ? { label: "Video", variant: "primary" } : category ? { label: category, variant: "grey" } : void 0;
|
|
15572
15738
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15573
15739
|
EntityMingoCard,
|
|
15574
15740
|
{
|
|
15575
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15576
|
-
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15577
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15741
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _416 => _416.title]), () => ( "")),
|
|
15742
|
+
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _417 => _417.summary]), () => ( void 0)),
|
|
15743
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _418 => _418.featured_image]), ogPlaceholder),
|
|
15578
15744
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.NewspaperIcon, { size: 24 }),
|
|
15579
15745
|
status,
|
|
15580
15746
|
chatRef,
|
|
@@ -15591,13 +15757,13 @@ function CaseStudyChatCard({
|
|
|
15591
15757
|
ogPlaceholder,
|
|
15592
15758
|
discuss
|
|
15593
15759
|
}) {
|
|
15594
|
-
const meta = [_optionalChain([item, 'optionalAccess',
|
|
15760
|
+
const meta = [_optionalChain([item, 'optionalAccess', _419 => _419.msp, 'optionalAccess', _420 => _420.name]), _optionalChain([item, 'optionalAccess', _421 => _421.user, 'optionalAccess', _422 => _422.full_name])].filter(Boolean).join(" \xB7 ");
|
|
15595
15761
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15596
15762
|
EntityMingoCard,
|
|
15597
15763
|
{
|
|
15598
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15599
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15600
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15764
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _423 => _423.title]), () => ( "")),
|
|
15765
|
+
description: _optionalChain([item, 'optionalAccess', _424 => _424.summary]) || meta || void 0,
|
|
15766
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _425 => _425.featured_image]), ogPlaceholder),
|
|
15601
15767
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.TrophyIcon, { size: 24 }),
|
|
15602
15768
|
status: { label: "Case study", variant: "grey" },
|
|
15603
15769
|
chatRef,
|
|
@@ -15614,13 +15780,13 @@ function CustomerInterviewChatCard({
|
|
|
15614
15780
|
ogPlaceholder,
|
|
15615
15781
|
discuss
|
|
15616
15782
|
}) {
|
|
15617
|
-
const meta = [_optionalChain([item, 'optionalAccess',
|
|
15783
|
+
const meta = [_optionalChain([item, 'optionalAccess', _426 => _426.user, 'optionalAccess', _427 => _427.full_name]), _optionalChain([item, 'optionalAccess', _428 => _428.msp, 'optionalAccess', _429 => _429.name])].filter(Boolean).join(" \xB7 ");
|
|
15618
15784
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15619
15785
|
EntityMingoCard,
|
|
15620
15786
|
{
|
|
15621
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15622
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15623
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15787
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _430 => _430.title]), () => ( "")),
|
|
15788
|
+
description: _optionalChain([item, 'optionalAccess', _431 => _431.video_summary]) || meta || void 0,
|
|
15789
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _432 => _432.featured_image]), ogPlaceholder),
|
|
15624
15790
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.MicrophoneIcon, { size: 24 }),
|
|
15625
15791
|
status: { label: "Interview", variant: "grey" },
|
|
15626
15792
|
chatRef,
|
|
@@ -15637,13 +15803,13 @@ function InvestorUpdateChatCard({
|
|
|
15637
15803
|
ogPlaceholder,
|
|
15638
15804
|
discuss
|
|
15639
15805
|
}) {
|
|
15640
|
-
const title = _optionalChain([item, 'optionalAccess',
|
|
15806
|
+
const title = _optionalChain([item, 'optionalAccess', _433 => _433.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _434 => _434.update_number]), () => ( "?"))}`;
|
|
15641
15807
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15642
15808
|
EntityMingoCard,
|
|
15643
15809
|
{
|
|
15644
15810
|
title,
|
|
15645
|
-
description: _optionalChain([item, 'optionalAccess',
|
|
15646
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15811
|
+
description: _optionalChain([item, 'optionalAccess', _435 => _435.strategic_update]) || _optionalChain([item, 'optionalAccess', _436 => _436.content]) || _chunkEX5PJGVAcjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _437 => _437.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _438 => _438.period_end]), () => ( null))) || void 0,
|
|
15812
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _439 => _439.featured_image]), ogPlaceholder),
|
|
15647
15813
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.PresentationLineIcon, { size: 24 }),
|
|
15648
15814
|
status: { label: "Investor update", variant: "grey" },
|
|
15649
15815
|
chatRef,
|
|
@@ -15660,12 +15826,12 @@ function OnboardingGuideChatCard({
|
|
|
15660
15826
|
ogPlaceholder,
|
|
15661
15827
|
discuss
|
|
15662
15828
|
}) {
|
|
15663
|
-
const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess',
|
|
15829
|
+
const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _440 => _440.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _441 => _441.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _442 => _442.og_image_url]), ogPlaceholder)));
|
|
15664
15830
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15665
15831
|
EntityMingoCard,
|
|
15666
15832
|
{
|
|
15667
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15668
|
-
description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15833
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _443 => _443.title]), () => ( "")),
|
|
15834
|
+
description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _444 => _444.summary]), () => ( _optionalChain([item, 'optionalAccess', _445 => _445.description]))), () => ( void 0)),
|
|
15669
15835
|
cover,
|
|
15670
15836
|
fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.CompassIcon, { size: 24 }),
|
|
15671
15837
|
status: { label: "Guide", variant: "grey" },
|
|
@@ -15690,9 +15856,9 @@ function ProgramChatCard({
|
|
|
15690
15856
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15691
15857
|
EntityMingoCard,
|
|
15692
15858
|
{
|
|
15693
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15694
|
-
description: meta || _optionalChain([item, 'optionalAccess',
|
|
15695
|
-
cover: entityCover(_optionalChain([item, 'optionalAccess',
|
|
15859
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _446 => _446.title]), () => ( "")),
|
|
15860
|
+
description: meta || _optionalChain([item, 'optionalAccess', _447 => _447.description]) || void 0,
|
|
15861
|
+
cover: entityCover(_optionalChain([item, 'optionalAccess', _448 => _448.cover_url]), ogPlaceholder),
|
|
15696
15862
|
fallbackIcon: icon,
|
|
15697
15863
|
status: { label, variant: "grey" },
|
|
15698
15864
|
chatRef,
|
|
@@ -15709,10 +15875,10 @@ function RoadmapChatCard({
|
|
|
15709
15875
|
cardType,
|
|
15710
15876
|
discuss
|
|
15711
15877
|
}) {
|
|
15712
|
-
const logoUrl = typeof _optionalChain([item, 'optionalAccess',
|
|
15713
|
-
const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess',
|
|
15878
|
+
const logoUrl = typeof _optionalChain([item, 'optionalAccess', _449 => _449.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
|
|
15879
|
+
const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _450 => _450.customItemId]) != null;
|
|
15714
15880
|
const defaultIcon = cardType === "delivery_item" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.TruckFastIcon, { size: 24 }) : cardType === "internal_task" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.CheckSquareIcon, { size: 24 }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.MapIcon, { size: 24 });
|
|
15715
|
-
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEX5PJGVAcjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess',
|
|
15881
|
+
const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEX5PJGVAcjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _451 => _451.customItemId]), className: "size-6" }) : logoUrl ? (
|
|
15716
15882
|
// Contained (not full-bleed) so the integration logo keeps its aspect
|
|
15717
15883
|
// ratio inside the bordered icon box — matches RoadmapCard.
|
|
15718
15884
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWLSFBRT5cjs.next_image_default, { src: logoUrl, alt: "", className: "size-6 object-contain", width: 24, height: 24, unoptimized: true })
|
|
@@ -15723,10 +15889,10 @@ function RoadmapChatCard({
|
|
|
15723
15889
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
15724
15890
|
EntityMingoCard,
|
|
15725
15891
|
{
|
|
15726
|
-
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15727
|
-
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15892
|
+
title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _452 => _452.title]), () => ( "")),
|
|
15893
|
+
description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _453 => _453.description]), () => ( void 0)),
|
|
15728
15894
|
fallbackIcon: icon,
|
|
15729
|
-
status: statusPill(_optionalChain([item, 'optionalAccess',
|
|
15895
|
+
status: statusPill(_optionalChain([item, 'optionalAccess', _454 => _454.status])),
|
|
15730
15896
|
chatRef,
|
|
15731
15897
|
isNewTab,
|
|
15732
15898
|
discuss,
|
|
@@ -15742,7 +15908,7 @@ function refHydratedEntry(docType, label, renderRef) {
|
|
|
15742
15908
|
bareInline: true,
|
|
15743
15909
|
contentRefType: docType,
|
|
15744
15910
|
noComposedHref: true,
|
|
15745
|
-
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess',
|
|
15911
|
+
fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _455 => _455.url]), () => ( null)),
|
|
15746
15912
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
|
|
15747
15913
|
render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts)
|
|
15748
15914
|
};
|
|
@@ -15799,8 +15965,8 @@ function refGlyphRegistryEntries() {
|
|
|
15799
15965
|
title: displayRef.title,
|
|
15800
15966
|
description: _nullishCoalesce(displayRef.preview, () => ( void 0)),
|
|
15801
15967
|
cover: entityCover(
|
|
15802
|
-
_optionalChain([displayRef, 'access',
|
|
15803
|
-
_nullishCoalesce(_optionalChain([opts, 'access',
|
|
15968
|
+
_optionalChain([displayRef, 'access', _456 => _456.metadata, 'optionalAccess', _457 => _457.videoPoster]),
|
|
15969
|
+
_nullishCoalesce(_optionalChain([opts, 'access', _458 => _458.extras, 'optionalAccess', _459 => _459.buildOgPlaceholderUrl, 'optionalCall', _460 => _460(_nullishCoalesce(displayRef.title, () => ( "")))]), () => ( null))
|
|
15804
15970
|
),
|
|
15805
15971
|
fallbackIcon: cfg.icon(),
|
|
15806
15972
|
status: { label: cfg.label, variant: "grey" },
|
|
@@ -15815,9 +15981,9 @@ function refGlyphRegistryEntries() {
|
|
|
15815
15981
|
}
|
|
15816
15982
|
function fetchedEmployeeEntryDisplayRef(item, chatRef) {
|
|
15817
15983
|
const it = item;
|
|
15818
|
-
const title = typeof _optionalChain([it, 'optionalAccess',
|
|
15819
|
-
const author = typeof _optionalChain([it, 'optionalAccess',
|
|
15820
|
-
const summary = typeof _optionalChain([it, 'optionalAccess',
|
|
15984
|
+
const title = typeof _optionalChain([it, 'optionalAccess', _461 => _461.title]) === "string" && it.title.trim().length > 0 ? it.title.trim() : chatRef.title;
|
|
15985
|
+
const author = typeof _optionalChain([it, 'optionalAccess', _462 => _462.author, 'optionalAccess', _463 => _463.full_name]) === "string" ? it.author.full_name.trim() : "";
|
|
15986
|
+
const summary = typeof _optionalChain([it, 'optionalAccess', _464 => _464.summary]) === "string" ? it.summary.trim() : "";
|
|
15821
15987
|
const preview = [author, summary].filter((x) => x.length > 0).join(" \xB7 ");
|
|
15822
15988
|
return { ...chatRef, title, preview: preview.length > 0 ? preview : chatRef.preview };
|
|
15823
15989
|
}
|
|
@@ -15869,7 +16035,7 @@ function programRegistryEntries() {
|
|
|
15869
16035
|
discuss: opts.discuss,
|
|
15870
16036
|
configKey: cfg.configKey,
|
|
15871
16037
|
label: cfg.configKey.charAt(0).toUpperCase() + cfg.configKey.slice(1),
|
|
15872
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16038
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _465 => _465.extras, 'optionalAccess', _466 => _466.buildOgPlaceholderUrl, 'optionalCall', _467 => _467(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _468 => _468.title]), () => ( "")))]), () => ( null))
|
|
15873
16039
|
}
|
|
15874
16040
|
)
|
|
15875
16041
|
}));
|
|
@@ -15890,7 +16056,7 @@ var ROADMAP_CARD_CONFIGS = {
|
|
|
15890
16056
|
// The card's destination IS the ClickUp deep link, derived from the
|
|
15891
16057
|
// task id post-fetch (the refs frame used to carry it).
|
|
15892
16058
|
noComposedHref: true,
|
|
15893
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
16059
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _469 => _469.id]) != null ? clickupTaskUrl(String(item.id)) : null
|
|
15894
16060
|
}
|
|
15895
16061
|
};
|
|
15896
16062
|
function roadmapRegistryEntries() {
|
|
@@ -15932,8 +16098,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15932
16098
|
DeletedDataCard,
|
|
15933
16099
|
{
|
|
15934
16100
|
title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : null,
|
|
15935
|
-
entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access',
|
|
15936
|
-
recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access',
|
|
16101
|
+
entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _470 => _470.metadata, 'optionalAccess', _471 => _471.entity_label]), () => ( null)),
|
|
16102
|
+
recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _472 => _472.metadata, 'optionalAccess', _473 => _473.recovery_note]), () => ( null))
|
|
15937
16103
|
}
|
|
15938
16104
|
)
|
|
15939
16105
|
},
|
|
@@ -15950,7 +16116,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15950
16116
|
bareInline: true,
|
|
15951
16117
|
contentRefType: "faq",
|
|
15952
16118
|
noComposedHref: true,
|
|
15953
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
16119
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _474 => _474.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
|
|
15954
16120
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
|
|
15955
16121
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FaqChatCard, { chatRef: fetchedFaqDisplayRef(item, chatRef), isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
15956
16122
|
},
|
|
@@ -15984,8 +16150,8 @@ var CHAT_CARD_REGISTRY = {
|
|
|
15984
16150
|
chatRef,
|
|
15985
16151
|
isNewTab: opts.isNewTab,
|
|
15986
16152
|
discuss: opts.discuss,
|
|
15987
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
15988
|
-
hasEmbeddedVideo: _optionalChain([chatRef, 'access',
|
|
16153
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _475 => _475.extras, 'optionalAccess', _476 => _476.buildOgPlaceholderUrl, 'optionalCall', _477 => _477(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _478 => _478.title]), () => ( "")))]), () => ( null)),
|
|
16154
|
+
hasEmbeddedVideo: _optionalChain([chatRef, 'access', _479 => _479.metadata, 'optionalAccess', _480 => _480.hasEmbeddedVideo]) === true
|
|
15989
16155
|
}
|
|
15990
16156
|
)
|
|
15991
16157
|
},
|
|
@@ -16001,7 +16167,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16001
16167
|
chatRef,
|
|
16002
16168
|
isNewTab: opts.isNewTab,
|
|
16003
16169
|
discuss: opts.discuss,
|
|
16004
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16170
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _481 => _481.extras, 'optionalAccess', _482 => _482.buildOgPlaceholderUrl, 'optionalCall', _483 => _483(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _484 => _484.title]), () => ( "")))]), () => ( null))
|
|
16005
16171
|
}
|
|
16006
16172
|
)
|
|
16007
16173
|
},
|
|
@@ -16017,7 +16183,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16017
16183
|
chatRef,
|
|
16018
16184
|
isNewTab: opts.isNewTab,
|
|
16019
16185
|
discuss: opts.discuss,
|
|
16020
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16186
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _485 => _485.extras, 'optionalAccess', _486 => _486.buildOgPlaceholderUrl, 'optionalCall', _487 => _487(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _488 => _488.title]), () => ( "")))]), () => ( null))
|
|
16021
16187
|
}
|
|
16022
16188
|
)
|
|
16023
16189
|
},
|
|
@@ -16027,7 +16193,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16027
16193
|
bareInline: true,
|
|
16028
16194
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEX5PJGVAcjs.ProductReleaseCardSkeleton, { size: "sm" }),
|
|
16029
16195
|
render: (item, chatRef, opts) => {
|
|
16030
|
-
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16196
|
+
const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _489 => _489.extras, 'optionalAccess', _490 => _490.buildProductReleaseCardProps]), () => ( _chunkEX5PJGVAcjs.defaultBuildProductReleaseCardProps));
|
|
16031
16197
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16032
16198
|
ProductReleaseChatCard,
|
|
16033
16199
|
{
|
|
@@ -16053,7 +16219,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16053
16219
|
chatRef,
|
|
16054
16220
|
isNewTab: opts.isNewTab,
|
|
16055
16221
|
discuss: opts.discuss,
|
|
16056
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16222
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _491 => _491.extras, 'optionalAccess', _492 => _492.buildOgPlaceholderUrl, 'optionalCall', _493 => _493(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _494 => _494.title]), () => ( "")))]), () => ( null))
|
|
16057
16223
|
}
|
|
16058
16224
|
)
|
|
16059
16225
|
},
|
|
@@ -16071,7 +16237,7 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16071
16237
|
chatRef,
|
|
16072
16238
|
isNewTab: opts.isNewTab,
|
|
16073
16239
|
discuss: opts.discuss,
|
|
16074
|
-
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
16240
|
+
ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _495 => _495.extras, 'optionalAccess', _496 => _496.buildOgPlaceholderUrl, 'optionalCall', _497 => _497(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _498 => _498.title]), () => ( "")))]), () => ( null))
|
|
16075
16241
|
}
|
|
16076
16242
|
)
|
|
16077
16243
|
},
|
|
@@ -16082,13 +16248,13 @@ var CHAT_CARD_REGISTRY = {
|
|
|
16082
16248
|
skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignCardAdminSkeleton, {}),
|
|
16083
16249
|
// No public viewer — synthesize the hub-internal admin URL post-fetch
|
|
16084
16250
|
// so the wrapper + isNewTab computation see the actual destination.
|
|
16085
|
-
fallbackHref: (item) => _optionalChain([item, 'optionalAccess',
|
|
16251
|
+
fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _499 => _499.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
|
|
16086
16252
|
render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
|
|
16087
16253
|
},
|
|
16088
16254
|
...roadmapRegistryEntries()
|
|
16089
16255
|
};
|
|
16090
16256
|
function chatCardLabel(docType) {
|
|
16091
|
-
return _optionalChain([CHAT_CARD_REGISTRY, 'access',
|
|
16257
|
+
return _optionalChain([CHAT_CARD_REGISTRY, 'access', _500 => _500[docType], 'optionalAccess', _501 => _501.label]);
|
|
16092
16258
|
}
|
|
16093
16259
|
function ChatCardNavWrap({
|
|
16094
16260
|
href,
|
|
@@ -16104,13 +16270,13 @@ function ChatCardNavWrap({
|
|
|
16104
16270
|
if (!href) return;
|
|
16105
16271
|
const targetEl = e.target;
|
|
16106
16272
|
const host = e.currentTarget;
|
|
16107
|
-
if (!_optionalChain([host, 'optionalAccess',
|
|
16108
|
-
if (_optionalChain([targetEl, 'optionalAccess',
|
|
16109
|
-
if (!_optionalChain([targetEl, 'optionalAccess',
|
|
16273
|
+
if (!_optionalChain([host, 'optionalAccess', _502 => _502.contains, 'call', _503 => _503(targetEl)])) return;
|
|
16274
|
+
if (_optionalChain([targetEl, 'optionalAccess', _504 => _504.closest, 'optionalCall', _505 => _505("button")])) return;
|
|
16275
|
+
if (!_optionalChain([targetEl, 'optionalAccess', _506 => _506.closest, 'optionalCall', _507 => _507("a")])) return;
|
|
16110
16276
|
const handled = executeNavigation({ event: e, runtime, href, path, targetPlatform, fallbackNavigate: router.push });
|
|
16111
16277
|
if (!handled) return;
|
|
16112
16278
|
e.stopPropagation();
|
|
16113
|
-
if (!isNewTab && _optionalChain([panel, 'optionalAccess',
|
|
16279
|
+
if (!isNewTab && _optionalChain([panel, 'optionalAccess', _508 => _508.closeChat])) panel.closeChat();
|
|
16114
16280
|
};
|
|
16115
16281
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "contents", onClickCapture, children });
|
|
16116
16282
|
}
|
|
@@ -16132,7 +16298,7 @@ function ChatCardLoader({
|
|
|
16132
16298
|
title: chatRef.title,
|
|
16133
16299
|
externalUrl: chatRef.url,
|
|
16134
16300
|
targetPlatform: chatRef.targetPlatform,
|
|
16135
|
-
path: typeof _optionalChain([chatRef, 'access',
|
|
16301
|
+
path: typeof _optionalChain([chatRef, 'access', _509 => _509.metadata, 'optionalAccess', _510 => _510.path]) === "string" ? chatRef.metadata.path : null
|
|
16136
16302
|
},
|
|
16137
16303
|
sourceRowCtxFromRuntime(runtime, { baseRoute, chipBasePlatform })
|
|
16138
16304
|
);
|
|
@@ -16146,11 +16312,11 @@ function ChatCardLoader({
|
|
|
16146
16312
|
const entry = CHAT_CARD_REGISTRY[resolvedChatRef.type];
|
|
16147
16313
|
const fetchEntry = entry && entry.contentRefType ? entry : null;
|
|
16148
16314
|
const { item, isLoading, isError, isFetched } = useChatCardItem(
|
|
16149
|
-
_nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess',
|
|
16315
|
+
_nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _511 => _511.contentRefType]), () => ( "")),
|
|
16150
16316
|
fetchEntry ? resolvedChatRef.id : ""
|
|
16151
16317
|
);
|
|
16152
16318
|
if (!entry) return null;
|
|
16153
|
-
const composedHref = _optionalChain([fetchEntry, 'optionalAccess',
|
|
16319
|
+
const composedHref = _optionalChain([fetchEntry, 'optionalAccess', _512 => _512.contentRefType]) && !resolvedChatRef.url && item ? resolveFetchedCardHref({
|
|
16154
16320
|
contentRefType: fetchEntry.contentRefType,
|
|
16155
16321
|
id: resolvedChatRef.id,
|
|
16156
16322
|
item,
|
|
@@ -16158,7 +16324,7 @@ function ChatCardLoader({
|
|
|
16158
16324
|
}) : null;
|
|
16159
16325
|
const hrefChoice = fetchEntry && !resolvedChatRef.url && item ? pickFetchedCardHref({
|
|
16160
16326
|
composed: composedHref,
|
|
16161
|
-
itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access',
|
|
16327
|
+
itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _513 => _513.fallbackHref, 'optionalCall', _514 => _514(item)]), () => ( null)),
|
|
16162
16328
|
allowComposed: !fetchEntry.noComposedHref
|
|
16163
16329
|
}) : null;
|
|
16164
16330
|
const hrefResolvedChatRef = hrefChoice ? {
|
|
@@ -16192,7 +16358,7 @@ function ChatCardLoader({
|
|
|
16192
16358
|
isNewTab,
|
|
16193
16359
|
discuss
|
|
16194
16360
|
};
|
|
16195
|
-
const path = typeof _optionalChain([finalChatRef, 'access',
|
|
16361
|
+
const path = typeof _optionalChain([finalChatRef, 'access', _515 => _515.metadata, 'optionalAccess', _516 => _516.path]) === "string" ? finalChatRef.metadata.path : null;
|
|
16196
16362
|
const navWrap = (children) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
16197
16363
|
ChatCardNavWrap,
|
|
16198
16364
|
{
|
|
@@ -16216,7 +16382,7 @@ function ChatCardLoader({
|
|
|
16216
16382
|
if (!fetchEntry) {
|
|
16217
16383
|
return finish(entry.render(void 0, finalChatRef, renderOpts));
|
|
16218
16384
|
}
|
|
16219
|
-
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access',
|
|
16385
|
+
if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _517 => _517.skeleton, 'optionalCall', _518 => _518()]), () => ( null)) });
|
|
16220
16386
|
if (!item) {
|
|
16221
16387
|
if (isError) {
|
|
16222
16388
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Failed to load" });
|
|
@@ -16579,7 +16745,7 @@ function useChunkCatchup({
|
|
|
16579
16745
|
if (catchupRun.current === run) {
|
|
16580
16746
|
if (currentDialogId !== dialogIdRef.current) {
|
|
16581
16747
|
catchupRun.current = null;
|
|
16582
|
-
if (_optionalChain([pendingCatchupRef, 'access',
|
|
16748
|
+
if (_optionalChain([pendingCatchupRef, 'access', _519 => _519.current, 'optionalAccess', _520 => _520.dialogId]) === currentDialogId) {
|
|
16583
16749
|
pendingCatchupRef.current = null;
|
|
16584
16750
|
}
|
|
16585
16751
|
} else {
|
|
@@ -16590,7 +16756,7 @@ function useChunkCatchup({
|
|
|
16590
16756
|
if (pending.dialogId === currentDialogId) {
|
|
16591
16757
|
rearmForQueuedCatchup();
|
|
16592
16758
|
try {
|
|
16593
|
-
await _optionalChain([catchUpChunksRef, 'access',
|
|
16759
|
+
await _optionalChain([catchUpChunksRef, 'access', _521 => _521.current, 'optionalCall', _522 => _522(pending.fromSequenceId)]);
|
|
16594
16760
|
} catch (rerunError) {
|
|
16595
16761
|
console.error("Queued catch-up re-run failed:", rerunError);
|
|
16596
16762
|
}
|
|
@@ -16657,7 +16823,7 @@ function useChunkCatchup({
|
|
|
16657
16823
|
|
|
16658
16824
|
var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
|
|
16659
16825
|
function prefersReducedMotion() {
|
|
16660
|
-
return typeof window !== "undefined" && _optionalChain([window, 'access',
|
|
16826
|
+
return typeof window !== "undefined" && _optionalChain([window, 'access', _523 => _523.matchMedia, 'optionalCall', _524 => _524("(prefers-reduced-motion: reduce)"), 'access', _525 => _525.matches]) === true;
|
|
16661
16827
|
}
|
|
16662
16828
|
function useScriptedStream(frames, resetKey, enabled = true) {
|
|
16663
16829
|
const [index, setIndex] = _react.useState.call(void 0, 0);
|
|
@@ -16668,7 +16834,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
|
|
|
16668
16834
|
setIndex(0);
|
|
16669
16835
|
}
|
|
16670
16836
|
_react.useEffect.call(void 0, () => {
|
|
16671
|
-
const mq = _optionalChain([window, 'access',
|
|
16837
|
+
const mq = _optionalChain([window, 'access', _526 => _526.matchMedia, 'optionalCall', _527 => _527("(prefers-reduced-motion: reduce)")]);
|
|
16672
16838
|
const sync = () => setReducedMotion(mq ? mq.matches : prefersReducedMotion());
|
|
16673
16839
|
sync();
|
|
16674
16840
|
if (!mq) return void 0;
|
|
@@ -16811,7 +16977,7 @@ function useJetStreamDialogSubscription({
|
|
|
16811
16977
|
const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
|
|
16812
16978
|
conn: sharedConn,
|
|
16813
16979
|
wsUrl,
|
|
16814
|
-
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access',
|
|
16980
|
+
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _528 => _528.current, 'optionalCall', _529 => _529()]),
|
|
16815
16981
|
backoff: reconnectionBackoffRef.current,
|
|
16816
16982
|
getFreshUrl: () => getNatsWsUrlRef.current(),
|
|
16817
16983
|
// JetStream emits 'error' for protocol-level failures (e.g. -ERR Permissions
|
|
@@ -16826,7 +16992,7 @@ function useJetStreamDialogSubscription({
|
|
|
16826
16992
|
setReconnectionCount((c) => c + 1);
|
|
16827
16993
|
}
|
|
16828
16994
|
hadConnectionBeforeRef.current = true;
|
|
16829
|
-
_optionalChain([onConnectRef, 'access',
|
|
16995
|
+
_optionalChain([onConnectRef, 'access', _530 => _530.current, 'optionalCall', _531 => _531()]);
|
|
16830
16996
|
}
|
|
16831
16997
|
if (status === "error") {
|
|
16832
16998
|
console.warn("[JetStream] NATS protocol error:", evt.data);
|
|
@@ -16836,7 +17002,7 @@ function useJetStreamDialogSubscription({
|
|
|
16836
17002
|
setIsConnected(false);
|
|
16837
17003
|
setIsSubscribed(false);
|
|
16838
17004
|
tearDownSubscription();
|
|
16839
|
-
_optionalChain([onDisconnectRef, 'access',
|
|
17005
|
+
_optionalChain([onDisconnectRef, 'access', _532 => _532.current, 'optionalCall', _533 => _533()]);
|
|
16840
17006
|
}
|
|
16841
17007
|
}
|
|
16842
17008
|
});
|
|
@@ -16962,7 +17128,7 @@ function useJetStreamDialogSubscription({
|
|
|
16962
17128
|
}
|
|
16963
17129
|
subscriptionRef.current = handle;
|
|
16964
17130
|
setIsSubscribed(true);
|
|
16965
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
17131
|
+
_optionalChain([onSubscribedRef, 'access', _534 => _534.current, 'optionalCall', _535 => _535()]);
|
|
16966
17132
|
} catch (e52) {
|
|
16967
17133
|
if (!cancelled) {
|
|
16968
17134
|
setIsSubscribed(false);
|
|
@@ -17078,20 +17244,20 @@ function useNatsDialogSubscription({
|
|
|
17078
17244
|
const tearDownSubscriptions = () => {
|
|
17079
17245
|
subscriptionRefs.current.forEach((sub) => {
|
|
17080
17246
|
try {
|
|
17081
|
-
_optionalChain([sub, 'optionalAccess',
|
|
17247
|
+
_optionalChain([sub, 'optionalAccess', _536 => _536.unsubscribe, 'call', _537 => _537()]);
|
|
17082
17248
|
} catch (e54) {
|
|
17083
17249
|
}
|
|
17084
17250
|
});
|
|
17085
17251
|
subscriptionRefs.current.clear();
|
|
17086
17252
|
lastSubscribedDialogIdRef.current = null;
|
|
17087
|
-
_optionalChain([abortControllerRef, 'access',
|
|
17253
|
+
_optionalChain([abortControllerRef, 'access', _538 => _538.current, 'optionalAccess', _539 => _539.abort, 'call', _540 => _540()]);
|
|
17088
17254
|
abortControllerRef.current = null;
|
|
17089
17255
|
};
|
|
17090
17256
|
const isDisconnectStatus = (status) => status === "closed" || status === "disconnected";
|
|
17091
17257
|
const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
|
|
17092
17258
|
conn: sharedConn,
|
|
17093
17259
|
wsUrl,
|
|
17094
|
-
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access',
|
|
17260
|
+
onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _541 => _541.current, 'optionalCall', _542 => _542()]),
|
|
17095
17261
|
backoff: reconnectionBackoffRef.current,
|
|
17096
17262
|
getFreshUrl: () => getNatsWsUrlRef.current(),
|
|
17097
17263
|
shouldRetryOn: isDisconnectStatus,
|
|
@@ -17102,7 +17268,7 @@ function useNatsDialogSubscription({
|
|
|
17102
17268
|
setReconnectionCount((c) => c + 1);
|
|
17103
17269
|
}
|
|
17104
17270
|
hadConnectionBeforeRef.current = true;
|
|
17105
|
-
_optionalChain([onConnectRef, 'access',
|
|
17271
|
+
_optionalChain([onConnectRef, 'access', _543 => _543.current, 'optionalCall', _544 => _544()]);
|
|
17106
17272
|
}
|
|
17107
17273
|
if (status === "error") {
|
|
17108
17274
|
console.warn("[NATS] protocol error:", evt.data);
|
|
@@ -17112,7 +17278,7 @@ function useNatsDialogSubscription({
|
|
|
17112
17278
|
setIsConnected(false);
|
|
17113
17279
|
setIsSubscribed(false);
|
|
17114
17280
|
tearDownSubscriptions();
|
|
17115
|
-
_optionalChain([onDisconnectRef, 'access',
|
|
17281
|
+
_optionalChain([onDisconnectRef, 'access', _545 => _545.current, 'optionalCall', _546 => _546()]);
|
|
17116
17282
|
}
|
|
17117
17283
|
}
|
|
17118
17284
|
});
|
|
@@ -17143,13 +17309,13 @@ function useNatsDialogSubscription({
|
|
|
17143
17309
|
setIsSubscribed(false);
|
|
17144
17310
|
subscriptionRefs.current.forEach((sub) => {
|
|
17145
17311
|
try {
|
|
17146
|
-
_optionalChain([sub, 'optionalAccess',
|
|
17312
|
+
_optionalChain([sub, 'optionalAccess', _547 => _547.unsubscribe, 'call', _548 => _548()]);
|
|
17147
17313
|
} catch (e55) {
|
|
17148
17314
|
}
|
|
17149
17315
|
});
|
|
17150
17316
|
subscriptionRefs.current.clear();
|
|
17151
17317
|
lastSubscribedDialogIdRef.current = null;
|
|
17152
|
-
_optionalChain([abortControllerRef, 'access',
|
|
17318
|
+
_optionalChain([abortControllerRef, 'access', _549 => _549.current, 'optionalAccess', _550 => _550.abort, 'call', _551 => _551()]);
|
|
17153
17319
|
abortControllerRef.current = null;
|
|
17154
17320
|
}
|
|
17155
17321
|
return void 0;
|
|
@@ -17161,12 +17327,12 @@ function useNatsDialogSubscription({
|
|
|
17161
17327
|
if (subscriptionRefs.current.size > 0) {
|
|
17162
17328
|
subscriptionRefs.current.forEach((sub) => {
|
|
17163
17329
|
try {
|
|
17164
|
-
_optionalChain([sub, 'optionalAccess',
|
|
17330
|
+
_optionalChain([sub, 'optionalAccess', _552 => _552.unsubscribe, 'call', _553 => _553()]);
|
|
17165
17331
|
} catch (e56) {
|
|
17166
17332
|
}
|
|
17167
17333
|
});
|
|
17168
17334
|
subscriptionRefs.current.clear();
|
|
17169
|
-
_optionalChain([abortControllerRef, 'access',
|
|
17335
|
+
_optionalChain([abortControllerRef, 'access', _554 => _554.current, 'optionalAccess', _555 => _555.abort, 'call', _556 => _556()]);
|
|
17170
17336
|
}
|
|
17171
17337
|
abortControllerRef.current = new AbortController();
|
|
17172
17338
|
const abort = abortControllerRef.current;
|
|
@@ -17196,7 +17362,7 @@ function useNatsDialogSubscription({
|
|
|
17196
17362
|
});
|
|
17197
17363
|
lastSubscribedDialogIdRef.current = dialogId;
|
|
17198
17364
|
setIsSubscribed(true);
|
|
17199
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
17365
|
+
_optionalChain([onSubscribedRef, 'access', _557 => _557.current, 'optionalCall', _558 => _558()]);
|
|
17200
17366
|
};
|
|
17201
17367
|
if (isConnectedRef.current) {
|
|
17202
17368
|
createSubscriptions();
|
|
@@ -17207,7 +17373,7 @@ function useNatsDialogSubscription({
|
|
|
17207
17373
|
abort.abort();
|
|
17208
17374
|
subscriptions.forEach((sub) => {
|
|
17209
17375
|
try {
|
|
17210
|
-
_optionalChain([sub, 'optionalAccess',
|
|
17376
|
+
_optionalChain([sub, 'optionalAccess', _559 => _559.unsubscribe, 'call', _560 => _560()]);
|
|
17211
17377
|
} catch (e58) {
|
|
17212
17378
|
}
|
|
17213
17379
|
});
|
|
@@ -17246,7 +17412,7 @@ function useNatsDialogSubscription({
|
|
|
17246
17412
|
});
|
|
17247
17413
|
lastSubscribedDialogIdRef.current = currentDialogId;
|
|
17248
17414
|
setIsSubscribed(true);
|
|
17249
|
-
_optionalChain([onSubscribedRef, 'access',
|
|
17415
|
+
_optionalChain([onSubscribedRef, 'access', _561 => _561.current, 'optionalCall', _562 => _562()]);
|
|
17250
17416
|
} else if (subscriptionRefs.current.size > 0) {
|
|
17251
17417
|
setIsSubscribed(true);
|
|
17252
17418
|
}
|
|
@@ -17254,10 +17420,10 @@ function useNatsDialogSubscription({
|
|
|
17254
17420
|
return { isConnected, isSubscribed, reconnectionCount };
|
|
17255
17421
|
}
|
|
17256
17422
|
function buildNatsWsUrl(apiBaseUrl, options) {
|
|
17257
|
-
const path = _optionalChain([options, 'optionalAccess',
|
|
17423
|
+
const path = _optionalChain([options, 'optionalAccess', _563 => _563.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
|
|
17258
17424
|
const u = new URL(path, apiBaseUrl);
|
|
17259
17425
|
u.protocol = u.protocol === "https:" ? "wss:" : "ws:";
|
|
17260
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
17426
|
+
if (_optionalChain([options, 'optionalAccess', _564 => _564.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _565 => _565.token])) {
|
|
17261
17427
|
u.searchParams.set("authorization", options.token);
|
|
17262
17428
|
}
|
|
17263
17429
|
return u.toString();
|
|
@@ -17275,7 +17441,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
17275
17441
|
const data = await res.json();
|
|
17276
17442
|
return _nullishCoalesce(data.commands, () => ( []));
|
|
17277
17443
|
} catch (err) {
|
|
17278
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
17444
|
+
if (_optionalChain([err, 'optionalAccess', _566 => _566.name]) === "AbortError") throw err;
|
|
17279
17445
|
console.warn("[chat] slash-commands fetch failed, showing none:", err);
|
|
17280
17446
|
return [];
|
|
17281
17447
|
}
|
|
@@ -17283,8 +17449,8 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
|
|
|
17283
17449
|
var NO_COMMANDS = [];
|
|
17284
17450
|
function useSlashCommands(prefix, commandsUrl) {
|
|
17285
17451
|
const [answered, setAnswered] = _react.useState.call(void 0, null);
|
|
17286
|
-
const commands = prefix != null && _optionalChain([answered, 'optionalAccess',
|
|
17287
|
-
const loading = prefix != null && _optionalChain([answered, 'optionalAccess',
|
|
17452
|
+
const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _567 => _567.prefix]) === prefix ? answered.commands : NO_COMMANDS;
|
|
17453
|
+
const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _568 => _568.prefix]) !== prefix;
|
|
17288
17454
|
_react.useEffect.call(void 0, () => {
|
|
17289
17455
|
if (prefix == null) return void 0;
|
|
17290
17456
|
let cancelled = false;
|
|
@@ -17294,7 +17460,7 @@ function useSlashCommands(prefix, commandsUrl) {
|
|
|
17294
17460
|
const next = await fetchSlashCommands(prefix, ctrl.signal, commandsUrl);
|
|
17295
17461
|
if (!cancelled) setAnswered({ prefix, commands: next });
|
|
17296
17462
|
} catch (err) {
|
|
17297
|
-
if (!cancelled && _optionalChain([err, 'optionalAccess',
|
|
17463
|
+
if (!cancelled && _optionalChain([err, 'optionalAccess', _569 => _569.name]) !== "AbortError") {
|
|
17298
17464
|
console.warn("[use-slash-commands] fetch failed:", err);
|
|
17299
17465
|
setAnswered({ prefix, commands: NO_COMMANDS });
|
|
17300
17466
|
}
|
|
@@ -17317,7 +17483,7 @@ function useSlashCommandRegistry(commandsUrl, options) {
|
|
|
17317
17483
|
const query = _reactquery.useQuery.call(void 0, {
|
|
17318
17484
|
queryKey: ["chat-slash-commands", commandsUrl],
|
|
17319
17485
|
queryFn: ({ signal }) => fetchSlashCommands("", signal, commandsUrl),
|
|
17320
|
-
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
17486
|
+
enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _570 => _570.enabled]), () => ( true)),
|
|
17321
17487
|
staleTime: Infinity,
|
|
17322
17488
|
gcTime: Infinity,
|
|
17323
17489
|
// The commands registry is non-critical chrome — a failure degrades to an
|
|
@@ -17356,21 +17522,21 @@ async function fetchEmptyStateConfig(signal, emptyStateUrl) {
|
|
|
17356
17522
|
}
|
|
17357
17523
|
const data = await res.json();
|
|
17358
17524
|
return {
|
|
17359
|
-
name: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
17360
|
-
icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
17361
|
-
greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
17362
|
-
enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
17363
|
-
quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
17364
|
-
suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
17525
|
+
name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _571 => _571.name]), () => ( null)),
|
|
17526
|
+
icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _572 => _572.icon]), () => ( null)),
|
|
17527
|
+
greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _573 => _573.greeting]), () => ( null)),
|
|
17528
|
+
enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _574 => _574.enabledRagTableIds]), () => ( [])),
|
|
17529
|
+
quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _575 => _575.quickActions]), () => ( [])),
|
|
17530
|
+
suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _576 => _576.suggestedQueries]), () => ( []))
|
|
17365
17531
|
};
|
|
17366
17532
|
} catch (err) {
|
|
17367
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
17533
|
+
if (_optionalChain([err, 'optionalAccess', _577 => _577.name]) === "AbortError") throw err;
|
|
17368
17534
|
console.warn("[chat] empty-state config fetch failed, using neutral defaults:", err);
|
|
17369
17535
|
return EMPTY_STATE_FALLBACK;
|
|
17370
17536
|
}
|
|
17371
17537
|
}
|
|
17372
17538
|
function useEmptyStateConfig(emptyStateUrl, options) {
|
|
17373
|
-
const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
17539
|
+
const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _578 => _578.enabled]), () => ( true))) && !!emptyStateUrl;
|
|
17374
17540
|
const query = _reactquery.useQuery.call(void 0, {
|
|
17375
17541
|
queryKey: ["chat-empty-state", emptyStateUrl],
|
|
17376
17542
|
queryFn: ({ signal }) => fetchEmptyStateConfig(signal, emptyStateUrl),
|
|
@@ -17399,7 +17565,7 @@ var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
|
|
|
17399
17565
|
var STORAGE_CACHE_CONTROL_IMMUTABLE = "public, max-age=31536000, immutable";
|
|
17400
17566
|
function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
17401
17567
|
return new Promise((resolve, reject) => {
|
|
17402
|
-
if (_optionalChain([signal, 'optionalAccess',
|
|
17568
|
+
if (_optionalChain([signal, 'optionalAccess', _579 => _579.aborted])) {
|
|
17403
17569
|
reject(new Error("Upload cancelled"));
|
|
17404
17570
|
return;
|
|
17405
17571
|
}
|
|
@@ -17441,7 +17607,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
|
|
|
17441
17607
|
const handleSignalAbort = () => {
|
|
17442
17608
|
xhr.abort();
|
|
17443
17609
|
};
|
|
17444
|
-
_optionalChain([signal, 'optionalAccess',
|
|
17610
|
+
_optionalChain([signal, 'optionalAccess', _580 => _580.addEventListener, 'call', _581 => _581("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
|
|
17445
17611
|
xhr.upload.addEventListener("progress", handleProgress, { signal: listeners.signal });
|
|
17446
17612
|
xhr.addEventListener("load", handleLoad, { signal: listeners.signal });
|
|
17447
17613
|
xhr.addEventListener("error", handleError, { signal: listeners.signal });
|
|
@@ -17485,10 +17651,10 @@ function useChatAttachments() {
|
|
|
17485
17651
|
try {
|
|
17486
17652
|
sniffed = await _filetype.fileTypeFromBlob.call(void 0, att.file);
|
|
17487
17653
|
} catch (err) {
|
|
17488
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17654
|
+
if (_optionalChain([ctrl, 'optionalAccess', _582 => _582.signal, 'access', _583 => _583.aborted])) return;
|
|
17489
17655
|
throw new Error(`Could not read file content: ${err instanceof Error ? err.message : String(err)}`);
|
|
17490
17656
|
}
|
|
17491
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17657
|
+
if (_optionalChain([ctrl, 'optionalAccess', _584 => _584.signal, 'access', _585 => _585.aborted])) return;
|
|
17492
17658
|
if (!sniffed) {
|
|
17493
17659
|
throw new Error("Unrecognized file format");
|
|
17494
17660
|
}
|
|
@@ -17502,7 +17668,7 @@ function useChatAttachments() {
|
|
|
17502
17668
|
const urlResp = await _chunkXOGD2AMEcjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
|
|
17503
17669
|
method: "POST",
|
|
17504
17670
|
headers: { "Content-Type": "application/json" },
|
|
17505
|
-
signal: _optionalChain([ctrl, 'optionalAccess',
|
|
17671
|
+
signal: _optionalChain([ctrl, 'optionalAccess', _586 => _586.signal]),
|
|
17506
17672
|
body: JSON.stringify({
|
|
17507
17673
|
fileName: att.file.name,
|
|
17508
17674
|
// Pass the SNIFFED MIME (not `file.type`, which can be a
|
|
@@ -17531,9 +17697,9 @@ function useChatAttachments() {
|
|
|
17531
17697
|
(pct) => {
|
|
17532
17698
|
updateOne(att.id, { progress: pct });
|
|
17533
17699
|
},
|
|
17534
|
-
_optionalChain([ctrl, 'optionalAccess',
|
|
17700
|
+
_optionalChain([ctrl, 'optionalAccess', _587 => _587.signal])
|
|
17535
17701
|
);
|
|
17536
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17702
|
+
if (_optionalChain([ctrl, 'optionalAccess', _588 => _588.signal, 'access', _589 => _589.aborted])) return;
|
|
17537
17703
|
updateOne(att.id, {
|
|
17538
17704
|
status: "ready",
|
|
17539
17705
|
progress: 100,
|
|
@@ -17541,7 +17707,7 @@ function useChatAttachments() {
|
|
|
17541
17707
|
viewToken: mintData.viewToken
|
|
17542
17708
|
});
|
|
17543
17709
|
} catch (err) {
|
|
17544
|
-
if (_optionalChain([ctrl, 'optionalAccess',
|
|
17710
|
+
if (_optionalChain([ctrl, 'optionalAccess', _590 => _590.signal, 'access', _591 => _591.aborted])) return;
|
|
17545
17711
|
const message = err instanceof Error ? err.message : String(err);
|
|
17546
17712
|
updateOne(att.id, { status: "error", progress: 0, errorMessage: message });
|
|
17547
17713
|
} finally {
|
|
@@ -17690,11 +17856,11 @@ var ANON_DEFAULTS = {
|
|
|
17690
17856
|
function useResolveChatIdentity(enabled) {
|
|
17691
17857
|
const runtime = _chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, );
|
|
17692
17858
|
const url = runtime.endpoints.identityUrl;
|
|
17693
|
-
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkXOGD2AMEcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess',
|
|
17859
|
+
const proxyEmail = _nullishCoalesce(_optionalChain([_chunkXOGD2AMEcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _592 => _592.email]), () => ( null));
|
|
17694
17860
|
const requestKey = enabled ? `${url}\0${_nullishCoalesce(proxyEmail, () => ( ""))}` : null;
|
|
17695
17861
|
const [resolved, setResolved] = _react.useState.call(void 0, null);
|
|
17696
|
-
const data = _optionalChain([resolved, 'optionalAccess',
|
|
17697
|
-
const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess',
|
|
17862
|
+
const data = _optionalChain([resolved, 'optionalAccess', _593 => _593.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
|
|
17863
|
+
const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _594 => _594.key]) !== requestKey;
|
|
17698
17864
|
_react.useEffect.call(void 0, () => {
|
|
17699
17865
|
if (requestKey === null) return void 0;
|
|
17700
17866
|
let cancelled = false;
|
|
@@ -17841,7 +18007,7 @@ function useChat({
|
|
|
17841
18007
|
onMessagesChangeRef.current = onMessagesChange;
|
|
17842
18008
|
});
|
|
17843
18009
|
_react.useEffect.call(void 0, () => {
|
|
17844
|
-
_optionalChain([onMessagesChangeRef, 'access',
|
|
18010
|
+
_optionalChain([onMessagesChangeRef, 'access', _595 => _595.current, 'optionalCall', _596 => _596(messages)]);
|
|
17845
18011
|
}, [messages]);
|
|
17846
18012
|
const {
|
|
17847
18013
|
streamMessage,
|
|
@@ -17878,7 +18044,7 @@ function useChat({
|
|
|
17878
18044
|
name: "You",
|
|
17879
18045
|
content: text2,
|
|
17880
18046
|
timestamp: /* @__PURE__ */ new Date(),
|
|
17881
|
-
..._optionalChain([options, 'optionalAccess',
|
|
18047
|
+
..._optionalChain([options, 'optionalAccess', _597 => _597.hidden]) ? { hidden: true } : {}
|
|
17882
18048
|
};
|
|
17883
18049
|
addMessage(userMessage);
|
|
17884
18050
|
setIsTyping(true);
|
|
@@ -18092,7 +18258,7 @@ function buildConfirmToolBody(request) {
|
|
|
18092
18258
|
async function readServerErrorMessage(response) {
|
|
18093
18259
|
try {
|
|
18094
18260
|
const body = await response.json();
|
|
18095
|
-
if (typeof _optionalChain([body, 'optionalAccess',
|
|
18261
|
+
if (typeof _optionalChain([body, 'optionalAccess', _598 => _598.error]) === "string" && body.error.length > 0) return body.error;
|
|
18096
18262
|
} catch (e60) {
|
|
18097
18263
|
}
|
|
18098
18264
|
return null;
|
|
@@ -18399,7 +18565,7 @@ function youtubeVideoId(value) {
|
|
|
18399
18565
|
const hostname = parsed.hostname.toLowerCase();
|
|
18400
18566
|
const isYoutubeHost = hostname === "youtu.be" || hostname === "youtube.com" || hostname.endsWith(".youtube.com");
|
|
18401
18567
|
if (!isYoutubeHost) return void 0;
|
|
18402
|
-
const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access',
|
|
18568
|
+
const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access', _599 => _599.exec, 'call', _600 => _600(parsed.pathname), 'optionalAccess', _601 => _601[1]]);
|
|
18403
18569
|
const id = _nullishCoalesce(_nullishCoalesce(fromPath, () => ( parsed.searchParams.get("v"))), () => ( void 0));
|
|
18404
18570
|
return id && YOUTUBE_ID.test(id) ? id : void 0;
|
|
18405
18571
|
}
|
|
@@ -18518,11 +18684,11 @@ function cards(value, decodedSources) {
|
|
|
18518
18684
|
{
|
|
18519
18685
|
type,
|
|
18520
18686
|
id,
|
|
18521
|
-
title: _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
18522
|
-
url: _nullishCoalesce(_optionalChain([source, 'optionalAccess',
|
|
18523
|
-
..._optionalChain([source, 'optionalAccess',
|
|
18524
|
-
..._optionalChain([source, 'optionalAccess',
|
|
18525
|
-
..._optionalChain([source, 'optionalAccess',
|
|
18687
|
+
title: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _602 => _602.name]), () => ( id)),
|
|
18688
|
+
url: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _603 => _603.externalUrl]), () => ( null)),
|
|
18689
|
+
..._optionalChain([source, 'optionalAccess', _604 => _604.sourceRepo]) ? { sourceRepo: source.sourceRepo } : {},
|
|
18690
|
+
..._optionalChain([source, 'optionalAccess', _605 => _605.targetPlatform]) !== void 0 ? { targetPlatform: source.targetPlatform } : {},
|
|
18691
|
+
..._optionalChain([source, 'optionalAccess', _606 => _606.path]) ? { metadata: { path: source.path } } : {}
|
|
18526
18692
|
}
|
|
18527
18693
|
];
|
|
18528
18694
|
});
|
|
@@ -18548,11 +18714,11 @@ function sourceMetadataEvent(payload) {
|
|
|
18548
18714
|
}
|
|
18549
18715
|
function mergeSourceMetadata(previous, event) {
|
|
18550
18716
|
const byIndex = /* @__PURE__ */ new Map();
|
|
18551
|
-
for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess',
|
|
18717
|
+
for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _607 => _607.sources]), () => ( [])), ..._nullishCoalesce(event.sources, () => ( []))]) {
|
|
18552
18718
|
if (!byIndex.has(source.index)) byIndex.set(source.index, source);
|
|
18553
18719
|
}
|
|
18554
18720
|
const byIdentity = /* @__PURE__ */ new Map();
|
|
18555
|
-
for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess',
|
|
18721
|
+
for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _608 => _608.refs]), () => ( [])), ..._nullishCoalesce(event.refs, () => ( []))]) {
|
|
18556
18722
|
const identity = `${ref.type}:${ref.id}`;
|
|
18557
18723
|
if (!byIdentity.has(identity)) byIdentity.set(identity, ref);
|
|
18558
18724
|
}
|
|
@@ -18638,9 +18804,9 @@ function appendToTrailingAssistant(prev, segments) {
|
|
|
18638
18804
|
for (const seg of segments) {
|
|
18639
18805
|
const tail = merged[merged.length - 1];
|
|
18640
18806
|
const key = upsertKey(seg);
|
|
18641
|
-
if (seg.type === "text" && _optionalChain([tail, 'optionalAccess',
|
|
18807
|
+
if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _609 => _609.type]) === "text") {
|
|
18642
18808
|
merged[merged.length - 1] = { type: "text", text: tail.text + seg.text };
|
|
18643
|
-
} else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess',
|
|
18809
|
+
} else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _610 => _610.type]) === "thinking") {
|
|
18644
18810
|
merged[merged.length - 1] = { type: "thinking", text: tail.text + seg.text };
|
|
18645
18811
|
} else if (key) {
|
|
18646
18812
|
let idx = merged.findIndex((m) => upsertKey(m) === key);
|
|
@@ -18681,7 +18847,7 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
|
|
|
18681
18847
|
}
|
|
18682
18848
|
if (s.type !== "approval_batch") return s;
|
|
18683
18849
|
const isAnchor = s.data.approvalRequestId === requestId;
|
|
18684
|
-
const hasRow = _optionalChain([s, 'access',
|
|
18850
|
+
const hasRow = _optionalChain([s, 'access', _611 => _611.data, 'access', _612 => _612.toolCalls, 'optionalAccess', _613 => _613.some, 'call', _614 => _614((c) => c.toolExecutionRequestId === requestId)]);
|
|
18685
18851
|
if (!isAnchor && !hasRow) return s;
|
|
18686
18852
|
const nextResolvedBy = _nullishCoalesce(resolvedByName, () => ( s.resolvedByName));
|
|
18687
18853
|
const nextExecutions = hasRow ? {
|
|
@@ -18703,8 +18869,8 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
|
|
|
18703
18869
|
};
|
|
18704
18870
|
}
|
|
18705
18871
|
function nextBatchExecution(prevExec, toolData) {
|
|
18706
|
-
if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess',
|
|
18707
|
-
return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess',
|
|
18872
|
+
if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _615 => _615.status]) === "done") return null;
|
|
18873
|
+
return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _616 => _616.result]), success: _optionalChain([prevExec, 'optionalAccess', _617 => _617.success]) };
|
|
18708
18874
|
}
|
|
18709
18875
|
function withBatchExecution(seg, execId, state) {
|
|
18710
18876
|
return {
|
|
@@ -18721,11 +18887,11 @@ function projectBatchStatusToMessages(prev, anchorId, status) {
|
|
|
18721
18887
|
}
|
|
18722
18888
|
function projectBatchRowFailureToMessages(prev, rowRequestId) {
|
|
18723
18889
|
return mapSegments(prev, (s) => {
|
|
18724
|
-
if (s.type !== "approval_batch" || !_optionalChain([s, 'access',
|
|
18890
|
+
if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _618 => _618.data, 'access', _619 => _619.toolCalls, 'optionalAccess', _620 => _620.some, 'call', _621 => _621((c) => c.toolExecutionRequestId === rowRequestId)])) {
|
|
18725
18891
|
return s;
|
|
18726
18892
|
}
|
|
18727
|
-
const existing = _optionalChain([s, 'access',
|
|
18728
|
-
if (_optionalChain([existing, 'optionalAccess',
|
|
18893
|
+
const existing = _optionalChain([s, 'access', _622 => _622.data, 'access', _623 => _623.executions, 'optionalAccess', _624 => _624[rowRequestId]]);
|
|
18894
|
+
if (_optionalChain([existing, 'optionalAccess', _625 => _625.status]) === "done") return s;
|
|
18729
18895
|
return withBatchExecution(s, rowRequestId, { status: "done", success: false });
|
|
18730
18896
|
});
|
|
18731
18897
|
}
|
|
@@ -18761,7 +18927,7 @@ function mergeToolExecutionIfPresent(prev, segment) {
|
|
|
18761
18927
|
for (let j = message.segments.length - 1; j >= 0; j--) {
|
|
18762
18928
|
const seg = message.segments[j];
|
|
18763
18929
|
if (execId && seg.type === "approval_batch" && seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId)) {
|
|
18764
|
-
const prevExec = _optionalChain([seg, 'access',
|
|
18930
|
+
const prevExec = _optionalChain([seg, 'access', _626 => _626.data, 'access', _627 => _627.executions, 'optionalAccess', _628 => _628[execId]]);
|
|
18765
18931
|
const nextExec = nextBatchExecution(prevExec, toolData);
|
|
18766
18932
|
if (nextExec === null) return prev;
|
|
18767
18933
|
if (sameExecutionState(prevExec, nextExec)) return prev;
|
|
@@ -18934,9 +19100,9 @@ var MessageSegmentAccumulator = class {
|
|
|
18934
19100
|
type: "tool_execution",
|
|
18935
19101
|
data: {
|
|
18936
19102
|
...toolData,
|
|
18937
|
-
toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess',
|
|
18938
|
-
toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess',
|
|
18939
|
-
parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess',
|
|
19103
|
+
toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _629 => _629.data, 'access', _630 => _630.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _631 => _631.toolTitle]))),
|
|
19104
|
+
toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _632 => _632.data, 'access', _633 => _633.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _634 => _634.toolExplanation]))),
|
|
19105
|
+
parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _635 => _635.parameters])
|
|
18940
19106
|
}
|
|
18941
19107
|
};
|
|
18942
19108
|
if (existingIndex !== -1) {
|
|
@@ -18960,7 +19126,7 @@ var MessageSegmentAccumulator = class {
|
|
|
18960
19126
|
if (seg.type !== "approval_batch") return seg;
|
|
18961
19127
|
const hasCall = seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId);
|
|
18962
19128
|
if (!hasCall) return seg;
|
|
18963
|
-
const prev = _optionalChain([seg, 'access',
|
|
19129
|
+
const prev = _optionalChain([seg, 'access', _636 => _636.data, 'access', _637 => _637.executions, 'optionalAccess', _638 => _638[execId]]);
|
|
18964
19130
|
const next = nextBatchExecution(prev, toolData);
|
|
18965
19131
|
matched = true;
|
|
18966
19132
|
if (next === null) return seg;
|
|
@@ -19094,8 +19260,8 @@ var MessageSegmentAccumulator = class {
|
|
|
19094
19260
|
requestId,
|
|
19095
19261
|
{
|
|
19096
19262
|
...pendingApproval,
|
|
19097
|
-
command: _optionalChain([pendingApproval, 'optionalAccess',
|
|
19098
|
-
approvalType: _optionalChain([pendingApproval, 'optionalAccess',
|
|
19263
|
+
command: _optionalChain([pendingApproval, 'optionalAccess', _639 => _639.command]) || "",
|
|
19264
|
+
approvalType: _optionalChain([pendingApproval, 'optionalAccess', _640 => _640.approvalType]) || approvalType
|
|
19099
19265
|
},
|
|
19100
19266
|
status
|
|
19101
19267
|
);
|
|
@@ -19120,9 +19286,9 @@ var MessageSegmentAccumulator = class {
|
|
|
19120
19286
|
type: "escalation_offer",
|
|
19121
19287
|
// The resolved chunk carries no text/origin — a redelivered offer must
|
|
19122
19288
|
// not blank the card the PENDING chunk already painted.
|
|
19123
|
-
data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess',
|
|
19289
|
+
data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess', _641 => _641.data, 'access', _642 => _642.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _643 => _643.data, 'access', _644 => _644.origin]))) },
|
|
19124
19290
|
status,
|
|
19125
|
-
resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess',
|
|
19291
|
+
resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _645 => _645.resolvedByName]))),
|
|
19126
19292
|
onApprove: this.callbacks.onEscalationApprove,
|
|
19127
19293
|
onReject: this.callbacks.onEscalationReject
|
|
19128
19294
|
};
|
|
@@ -19447,7 +19613,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
19447
19613
|
let stateCache = null;
|
|
19448
19614
|
function invalidate() {
|
|
19449
19615
|
stateCache = null;
|
|
19450
|
-
_optionalChain([onChange, 'optionalCall',
|
|
19616
|
+
_optionalChain([onChange, 'optionalCall', _646 => _646()]);
|
|
19451
19617
|
}
|
|
19452
19618
|
function getState() {
|
|
19453
19619
|
if (!stateCache) {
|
|
@@ -19463,7 +19629,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
19463
19629
|
return stateCache;
|
|
19464
19630
|
}
|
|
19465
19631
|
function emit(name, ...args) {
|
|
19466
|
-
_optionalChain([onEffect, 'optionalCall',
|
|
19632
|
+
_optionalChain([onEffect, 'optionalCall', _647 => _647({ name, args })]);
|
|
19467
19633
|
}
|
|
19468
19634
|
function setMessagesInternal(next) {
|
|
19469
19635
|
if (next !== messages) {
|
|
@@ -19506,12 +19672,12 @@ function createChatStreamReducer(options = {}) {
|
|
|
19506
19672
|
return stampTrailingAssistantSourceMetadata(stampTrailingAssistantSeq(next, seq));
|
|
19507
19673
|
}
|
|
19508
19674
|
function applySegmentsToState(segments, meta) {
|
|
19509
|
-
const seq = _optionalChain([meta, 'optionalAccess',
|
|
19510
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
19675
|
+
const seq = _optionalChain([meta, 'optionalAccess', _648 => _648.streamSeq]);
|
|
19676
|
+
if (_optionalChain([meta, 'optionalAccess', _649 => _649.append]) && meta.isCompacting) {
|
|
19511
19677
|
setMessagesInternal(commitTrailingAssistant(upsertTrailingCompaction(messages, segments), seq));
|
|
19512
19678
|
return;
|
|
19513
19679
|
}
|
|
19514
|
-
if (_optionalChain([meta, 'optionalAccess',
|
|
19680
|
+
if (_optionalChain([meta, 'optionalAccess', _650 => _650.append])) {
|
|
19515
19681
|
setMessagesInternal(commitTrailingAssistant(appendToTrailingAssistant(messages, segments), seq));
|
|
19516
19682
|
return;
|
|
19517
19683
|
}
|
|
@@ -19523,7 +19689,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
19523
19689
|
adoptTrailingAssistant = false;
|
|
19524
19690
|
const last = messages[messages.length - 1];
|
|
19525
19691
|
if (!last || last.role !== "assistant" || adoptTail) return;
|
|
19526
|
-
const hasContent = (_nullishCoalesce(_optionalChain([last, 'access',
|
|
19692
|
+
const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _651 => _651.segments, 'optionalAccess', _652 => _652.length]), () => ( 0))) > 0 || last.content !== "";
|
|
19527
19693
|
if (!hasContent) return;
|
|
19528
19694
|
setMessagesInternal([...messages, { id: nextId("assistant"), role: "assistant", content: "", segments: [] }]);
|
|
19529
19695
|
}
|
|
@@ -19742,13 +19908,13 @@ function createChatStreamReducer(options = {}) {
|
|
|
19742
19908
|
const summary = required ? getCommandText(required) : `Batch of ${toolCalls.length} tool calls`;
|
|
19743
19909
|
pendingEscalated.set(requestId, {
|
|
19744
19910
|
command: summary,
|
|
19745
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
19911
|
+
explanation: _optionalChain([required, 'optionalAccess', _653 => _653.toolExplanation]),
|
|
19746
19912
|
approvalType,
|
|
19747
19913
|
toolCalls
|
|
19748
19914
|
});
|
|
19749
19915
|
emit("onEscalatedApproval", requestId, {
|
|
19750
19916
|
command: summary,
|
|
19751
|
-
explanation: _optionalChain([required, 'optionalAccess',
|
|
19917
|
+
explanation: _optionalChain([required, 'optionalAccess', _654 => _654.toolExplanation]),
|
|
19752
19918
|
approvalType
|
|
19753
19919
|
});
|
|
19754
19920
|
break;
|
|
@@ -20132,7 +20298,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
20132
20298
|
const resolveBatch = (status, confirm) => async () => {
|
|
20133
20299
|
setMessagesInternal(projectBatchStatusToMessages(messages, anchorId, status));
|
|
20134
20300
|
for (const id of ids) {
|
|
20135
|
-
const ok = await _optionalChain([confirm, 'optionalCall',
|
|
20301
|
+
const ok = await _optionalChain([confirm, 'optionalCall', _655 => _655(id)]);
|
|
20136
20302
|
if (ok === false) {
|
|
20137
20303
|
setMessagesInternal(projectBatchRowFailureToMessages(messages, id));
|
|
20138
20304
|
}
|
|
@@ -20268,8 +20434,8 @@ function createChatStreamReducer(options = {}) {
|
|
|
20268
20434
|
}
|
|
20269
20435
|
}
|
|
20270
20436
|
}
|
|
20271
|
-
hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess',
|
|
20272
|
-
if (_optionalChain([extras, 'optionalAccess',
|
|
20437
|
+
hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _656 => _656.resumed]), () => ( messages.length > 0)));
|
|
20438
|
+
if (_optionalChain([extras, 'optionalAccess', _657 => _657.agentBusy])) agentBusyState();
|
|
20273
20439
|
invalidate();
|
|
20274
20440
|
}
|
|
20275
20441
|
return {
|
|
@@ -20354,7 +20520,7 @@ function createChatStreamReducer(options = {}) {
|
|
|
20354
20520
|
},
|
|
20355
20521
|
endSseTurn() {
|
|
20356
20522
|
const last = messages[messages.length - 1];
|
|
20357
|
-
if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access',
|
|
20523
|
+
if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _658 => _658.segments, 'optionalAccess', _659 => _659.length]), () => ( 0))) === 0 && last.content === "") {
|
|
20358
20524
|
messages = messages.slice(0, -1);
|
|
20359
20525
|
}
|
|
20360
20526
|
sseCurrentText = "";
|
|
@@ -20507,10 +20673,10 @@ function createChatDialogStore(options = {}) {
|
|
|
20507
20673
|
if (onEvict) {
|
|
20508
20674
|
const sep = key.indexOf(KEY_SEP);
|
|
20509
20675
|
onEvict(key.slice(0, sep), key.slice(sep + 1), {
|
|
20510
|
-
messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
20511
|
-
approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
20512
|
-
lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
20513
|
-
pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess',
|
|
20676
|
+
messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _660 => _660.state, 'access', _661 => _661.messages]), () => ( EMPTY_STATE.messages)),
|
|
20677
|
+
approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _662 => _662.state, 'access', _663 => _663.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
|
|
20678
|
+
lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _664 => _664.getLastAppliedSeq, 'call', _665 => _665()]), () => ( Number.NEGATIVE_INFINITY)),
|
|
20679
|
+
pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _666 => _666.getPendingEchoes, 'call', _667 => _667()]), () => ( EMPTY_PENDING_ECHOES))
|
|
20514
20680
|
});
|
|
20515
20681
|
}
|
|
20516
20682
|
}
|
|
@@ -20520,12 +20686,12 @@ function createChatDialogStore(options = {}) {
|
|
|
20520
20686
|
const key = keyOf(dialogId, side);
|
|
20521
20687
|
let reducer = reducers.get(key);
|
|
20522
20688
|
if (!reducer) {
|
|
20523
|
-
const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall',
|
|
20689
|
+
const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _668 => _668(dialogId, side)]), () => ( {}));
|
|
20524
20690
|
const userOnChange = base.onChange;
|
|
20525
20691
|
reducer = createChatStreamReducer({
|
|
20526
20692
|
...base,
|
|
20527
20693
|
onChange: () => {
|
|
20528
|
-
_optionalChain([userOnChange, 'optionalCall',
|
|
20694
|
+
_optionalChain([userOnChange, 'optionalCall', _669 => _669()]);
|
|
20529
20695
|
notify();
|
|
20530
20696
|
}
|
|
20531
20697
|
});
|
|
@@ -20570,7 +20736,7 @@ function createChatDialogStore(options = {}) {
|
|
|
20570
20736
|
};
|
|
20571
20737
|
}
|
|
20572
20738
|
function getSnapshot2(dialogId, side = DEFAULT_DIALOG_SIDE) {
|
|
20573
|
-
return _nullishCoalesce(_optionalChain([reducers, 'access',
|
|
20739
|
+
return _nullishCoalesce(_optionalChain([reducers, 'access', _670 => _670.get, 'call', _671 => _671(keyOf(dialogId, side)), 'optionalAccess', _672 => _672.state]), () => ( EMPTY_STATE));
|
|
20574
20740
|
}
|
|
20575
20741
|
function getServerSnapshot2() {
|
|
20576
20742
|
return EMPTY_STATE;
|
|
@@ -20662,7 +20828,7 @@ function createDeltaBatcher({
|
|
|
20662
20828
|
pending = [];
|
|
20663
20829
|
const key = pendingKey;
|
|
20664
20830
|
for (const delta of batch) applyOne(delta, key);
|
|
20665
|
-
_optionalChain([onFlushed, 'optionalCall',
|
|
20831
|
+
_optionalChain([onFlushed, 'optionalCall', _673 => _673(batch.length)]);
|
|
20666
20832
|
}
|
|
20667
20833
|
function schedule() {
|
|
20668
20834
|
if (raf !== null || timer !== null) return;
|
|
@@ -20686,7 +20852,7 @@ function createDeltaBatcher({
|
|
|
20686
20852
|
}
|
|
20687
20853
|
if (!isDeltaEvent(event)) return false;
|
|
20688
20854
|
const tail = pending[pending.length - 1];
|
|
20689
|
-
const seqAdvances = _optionalChain([tail, 'optionalAccess',
|
|
20855
|
+
const seqAdvances = _optionalChain([tail, 'optionalAccess', _674 => _674.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
|
|
20690
20856
|
if (tail && seqAdvances && tail.type === event.type && (tail.type !== "text-delta" || tail.leading === event.leading)) {
|
|
20691
20857
|
pending[pending.length - 1] = {
|
|
20692
20858
|
...tail,
|
|
@@ -20717,7 +20883,7 @@ function useChatStreamReducer({
|
|
|
20717
20883
|
side = DEFAULT_DIALOG_SIDE,
|
|
20718
20884
|
createReducerOptions
|
|
20719
20885
|
}) {
|
|
20720
|
-
const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall',
|
|
20886
|
+
const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _675 => _675()]), () => ( {})));
|
|
20721
20887
|
const getSnapshot2 = _react.useCallback.call(void 0, () => store.getSnapshot(dialogId, side), [store, dialogId, side]);
|
|
20722
20888
|
const getServerSnapshot2 = _react.useCallback.call(void 0, () => store.getServerSnapshot(), [store]);
|
|
20723
20889
|
const subscribe2 = _react.useCallback.call(void 0, (listener) => store.subscribe(listener), [store]);
|
|
@@ -20756,7 +20922,7 @@ var STORAGE_KEY = "conversation";
|
|
|
20756
20922
|
var namespaceFor = (source) => {
|
|
20757
20923
|
const base = `mingo-chat-${source}`;
|
|
20758
20924
|
const auth = _chunkXOGD2AMEcjs.getEmbedProxyAuth.call(void 0, );
|
|
20759
|
-
return _optionalChain([auth, 'optionalAccess',
|
|
20925
|
+
return _optionalChain([auth, 'optionalAccess', _676 => _676.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
|
|
20760
20926
|
};
|
|
20761
20927
|
function createChatConversationStorage(source) {
|
|
20762
20928
|
return _chunkXOGD2AMEcjs.createLocalStorageAdapter.call(void 0, {
|
|
@@ -20868,7 +21034,7 @@ function formatSingularLookupInvocation(cmdId, value) {
|
|
|
20868
21034
|
return safe ? `/${cmdId} "${safe}"` : `/${cmdId}`;
|
|
20869
21035
|
}
|
|
20870
21036
|
function extractEntityIdFilter(override, expectedTableId) {
|
|
20871
|
-
const f = _optionalChain([override, 'optionalAccess',
|
|
21037
|
+
const f = _optionalChain([override, 'optionalAccess', _677 => _677.entityIdFilter]);
|
|
20872
21038
|
if (!f) return null;
|
|
20873
21039
|
const tableId = typeof f.tableId === "string" ? f.tableId : "";
|
|
20874
21040
|
const id = typeof f.id === "string" ? f.id : "";
|
|
@@ -20907,7 +21073,7 @@ var AUTO_CONTINUATION_DIRECTIVE_PREFIX = "[internal-auto-continuation]";
|
|
|
20907
21073
|
function buildAutoContinuationDirective(toolName, opts = {}) {
|
|
20908
21074
|
const ticketRef = opts.ticketId ? ` (ticket #${opts.ticketId})` : "";
|
|
20909
21075
|
const ticketHash = opts.ticketId ? ` #${opts.ticketId}` : "";
|
|
20910
|
-
const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access',
|
|
21076
|
+
const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access', _678 => _678.status, 'optionalAccess', _679 => _679.toUpperCase, 'call', _680 => _680()]) === "CLOSED";
|
|
20911
21077
|
if (toolName === "create_ticket") {
|
|
20912
21078
|
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.`;
|
|
20913
21079
|
}
|
|
@@ -20957,7 +21123,7 @@ function useChatHistoryHydration({
|
|
|
20957
21123
|
if (cancelled) return;
|
|
20958
21124
|
if (rows.length === 0) {
|
|
20959
21125
|
const found = isRecord(body) ? body.found : void 0;
|
|
20960
|
-
if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall',
|
|
21126
|
+
if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall', _681 => _681(conversationId)]);
|
|
20961
21127
|
return;
|
|
20962
21128
|
}
|
|
20963
21129
|
const hydrated = [];
|
|
@@ -21101,7 +21267,7 @@ function useManagedDialogList({
|
|
|
21101
21267
|
try {
|
|
21102
21268
|
await deleteDialogCallback(id);
|
|
21103
21269
|
removeLocal(id);
|
|
21104
|
-
_optionalChain([onDialogRemovedRef, 'access',
|
|
21270
|
+
_optionalChain([onDialogRemovedRef, 'access', _682 => _682.current, 'optionalCall', _683 => _683(id, "deleted")]);
|
|
21105
21271
|
} catch (err) {
|
|
21106
21272
|
console.error(`${logTag} deleteDialog failed:`, err);
|
|
21107
21273
|
throw err;
|
|
@@ -21112,7 +21278,7 @@ function useManagedDialogList({
|
|
|
21112
21278
|
const renameDialog = _react.useCallback.call(void 0,
|
|
21113
21279
|
async (id, title) => {
|
|
21114
21280
|
if (!renameDialogCallback) return;
|
|
21115
|
-
const previous = _optionalChain([dialogsRef, 'access',
|
|
21281
|
+
const previous = _optionalChain([dialogsRef, 'access', _684 => _684.current, 'access', _685 => _685.find, 'call', _686 => _686((d) => d.id === id), 'optionalAccess', _687 => _687.title]);
|
|
21116
21282
|
setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, title } : d));
|
|
21117
21283
|
try {
|
|
21118
21284
|
await renameDialogCallback(id, title);
|
|
@@ -21131,7 +21297,7 @@ function useManagedDialogList({
|
|
|
21131
21297
|
try {
|
|
21132
21298
|
await archiveDialogCallback(id);
|
|
21133
21299
|
removeLocal(id);
|
|
21134
|
-
_optionalChain([onDialogRemovedRef, 'access',
|
|
21300
|
+
_optionalChain([onDialogRemovedRef, 'access', _688 => _688.current, 'optionalCall', _689 => _689(id, "archived")]);
|
|
21135
21301
|
} catch (err) {
|
|
21136
21302
|
console.error(`${logTag} archiveDialog failed:`, err);
|
|
21137
21303
|
throw err;
|
|
@@ -21223,7 +21389,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21223
21389
|
const { active = true } = runtimeOptions;
|
|
21224
21390
|
const runtime = _chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, );
|
|
21225
21391
|
const source = runtime.source || DEFAULT_CHAT_SOURCE;
|
|
21226
|
-
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
21392
|
+
const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _690 => _690.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
|
|
21227
21393
|
const sendMessageRef = _react.useRef.call(void 0,
|
|
21228
21394
|
() => Promise.resolve(true)
|
|
21229
21395
|
);
|
|
@@ -21259,7 +21425,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21259
21425
|
if (!restoredConversationRef.current) {
|
|
21260
21426
|
restoredConversationRef.current = true;
|
|
21261
21427
|
pruneStaleChatConversationStorage(source);
|
|
21262
|
-
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access',
|
|
21428
|
+
conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _691 => _691.load, 'call', _692 => _692(), 'optionalAccess', _693 => _693.conversationId]), () => ( null));
|
|
21263
21429
|
}
|
|
21264
21430
|
const [conversationId, setConversationId] = _react.useState.call(void 0, () => conversationIdRef.current);
|
|
21265
21431
|
const commitConversationId = _react.useCallback.call(void 0,
|
|
@@ -21350,7 +21516,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21350
21516
|
const abortControllerRef = _react.useRef.call(void 0, null);
|
|
21351
21517
|
const switchConversation = _react.useCallback.call(void 0,
|
|
21352
21518
|
(id) => {
|
|
21353
|
-
_optionalChain([abortControllerRef, 'access',
|
|
21519
|
+
_optionalChain([abortControllerRef, 'access', _694 => _694.current, 'optionalAccess', _695 => _695.abort, 'call', _696 => _696()]);
|
|
21354
21520
|
flushDeltas();
|
|
21355
21521
|
mutate((r) => r.reset());
|
|
21356
21522
|
hydrationSendCountRef.current = 0;
|
|
@@ -21387,8 +21553,8 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21387
21553
|
} = useManagedDialogList({
|
|
21388
21554
|
autoLoad: active,
|
|
21389
21555
|
fetchDialogs: fetchActiveDialogs,
|
|
21390
|
-
renameDialog: _optionalChain([conversationsApi, 'optionalAccess',
|
|
21391
|
-
archiveDialog: _optionalChain([conversationsApi, 'optionalAccess',
|
|
21556
|
+
renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _697 => _697.renameDialog]),
|
|
21557
|
+
archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _698 => _698.archiveDialog]),
|
|
21392
21558
|
pageSize: 20,
|
|
21393
21559
|
search: conversationsApi ? dialogSearch : void 0,
|
|
21394
21560
|
logTag: "[useSseChatAdapter]",
|
|
@@ -21452,7 +21618,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21452
21618
|
const serverMessage = await readServerErrorMessage(response);
|
|
21453
21619
|
throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
|
|
21454
21620
|
}
|
|
21455
|
-
const reader = _optionalChain([response, 'access',
|
|
21621
|
+
const reader = _optionalChain([response, 'access', _699 => _699.body, 'optionalAccess', _700 => _700.getReader, 'call', _701 => _701()]);
|
|
21456
21622
|
if (!reader) throw new Error("No response body");
|
|
21457
21623
|
const frameDecoder = createSseFrameDecoder();
|
|
21458
21624
|
let finished = false;
|
|
@@ -21481,7 +21647,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21481
21647
|
}
|
|
21482
21648
|
return true;
|
|
21483
21649
|
} catch (err) {
|
|
21484
|
-
if (_optionalChain([err, 'optionalAccess',
|
|
21650
|
+
if (_optionalChain([err, 'optionalAccess', _702 => _702.name]) === "AbortError" || ctrl.signal.aborted) {
|
|
21485
21651
|
return true;
|
|
21486
21652
|
}
|
|
21487
21653
|
flushDeltas();
|
|
@@ -21517,7 +21683,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21517
21683
|
);
|
|
21518
21684
|
sendMessageRef.current = sendMessage;
|
|
21519
21685
|
const stopMessage = _react.useCallback.call(void 0, () => {
|
|
21520
|
-
_optionalChain([abortControllerRef, 'access',
|
|
21686
|
+
_optionalChain([abortControllerRef, 'access', _703 => _703.current, 'optionalAccess', _704 => _704.abort, 'call', _705 => _705()]);
|
|
21521
21687
|
flushDeltas();
|
|
21522
21688
|
mutate((r) => r.setPhase("idle"));
|
|
21523
21689
|
}, [mutate, flushDeltas]);
|
|
@@ -21553,7 +21719,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21553
21719
|
let sendIdx = -1;
|
|
21554
21720
|
return state.messages.map((m) => {
|
|
21555
21721
|
const segments = m.segments;
|
|
21556
|
-
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess',
|
|
21722
|
+
const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _706 => _706.filter, 'call', _707 => _707((s) => s.type === "text"), 'access', _708 => _708.map, 'call', _709 => _709((s) => s.text), 'access', _710 => _710.join, 'call', _711 => _711("")]), () => ( ""));
|
|
21557
21723
|
let sources2;
|
|
21558
21724
|
let scrollAnchor;
|
|
21559
21725
|
if (m.role === "user" && !m.hidden) {
|
|
@@ -21562,7 +21728,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21562
21728
|
if (m.role === "assistant") {
|
|
21563
21729
|
const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
|
|
21564
21730
|
sources2 = sourcesMap.get(lookupIdx);
|
|
21565
|
-
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access',
|
|
21731
|
+
scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _712 => _712.get, 'call', _713 => _713(lookupIdx), 'optionalAccess', _714 => _714.scrollAnchor]), () => ( void 0));
|
|
21566
21732
|
}
|
|
21567
21733
|
return {
|
|
21568
21734
|
id: m.id,
|
|
@@ -21589,7 +21755,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21589
21755
|
);
|
|
21590
21756
|
return;
|
|
21591
21757
|
}
|
|
21592
|
-
const refSlug = typeof _optionalChain([reference, 'access',
|
|
21758
|
+
const refSlug = typeof _optionalChain([reference, 'access', _715 => _715.metadata, 'optionalAccess', _716 => _716.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
|
|
21593
21759
|
const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
|
|
21594
21760
|
const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
|
|
21595
21761
|
const text2 = `/${cmdId} display "${escaped}"`;
|
|
@@ -21635,18 +21801,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
|
|
|
21635
21801
|
/** True while the mount-time rebuild from the server transcript runs. */
|
|
21636
21802
|
isHydratingHistory,
|
|
21637
21803
|
/** Provider key for the lib's `<ModelDisplay>` icon. */
|
|
21638
|
-
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21639
|
-
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21640
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21804
|
+
currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _717 => _717.provider]), () => ( null)),
|
|
21805
|
+
currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _718 => _718.modelLabel]), () => ( null)),
|
|
21806
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _719 => _719.contextWindowMaxTokens]), () => ( null)),
|
|
21641
21807
|
/** Input tokens (known after server's message_start frame; null until). */
|
|
21642
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21808
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _720 => _720.inputTokens]), () => ( null)),
|
|
21643
21809
|
/** Output tokens (known only after server's trailing usage frame). */
|
|
21644
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21810
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _721 => _721.outputTokens]), () => ( null)),
|
|
21645
21811
|
/** Cache hit % (read / total-input × 100). null during streaming. */
|
|
21646
|
-
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21812
|
+
currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _722 => _722.cacheHitRatePct]), () => ( null)),
|
|
21647
21813
|
/** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
|
|
21648
21814
|
* token counts). null until the trailing usage frame lands. */
|
|
21649
|
-
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess',
|
|
21815
|
+
currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _723 => _723.breakdown]), () => ( null)),
|
|
21650
21816
|
// ─── Dialog management ───────────────────────────────────────────────
|
|
21651
21817
|
// With `chatConversationsUrl` the server transcript store IS the dialog
|
|
21652
21818
|
// list (shared `useManagedDialogList`); selecting a row re-hydrates through
|
|
@@ -21901,7 +22067,7 @@ function decodeNatsChunk(chunk) {
|
|
|
21901
22067
|
userId: typeof data.userId === "string" ? data.userId : void 0,
|
|
21902
22068
|
// Wire shape carries no label; fall back to the id (parity with
|
|
21903
22069
|
// the history path in `process-historical-messages.ts`).
|
|
21904
|
-
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess',
|
|
22070
|
+
contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _724 => _724.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _725 => _725.id]) === "string").map((it) => ({
|
|
21905
22071
|
type: it.type,
|
|
21906
22072
|
id: it.id,
|
|
21907
22073
|
label: it.id
|
|
@@ -21992,7 +22158,7 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
21992
22158
|
}
|
|
21993
22159
|
break;
|
|
21994
22160
|
case "approval_batch": {
|
|
21995
|
-
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access',
|
|
22161
|
+
const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _726 => _726.data, 'access', _727 => _727.executions, 'optionalAccess', _728 => _728[c.toolExecutionRequestId], 'optionalAccess', _729 => _729.status]) === "done");
|
|
21996
22162
|
if (segment.status !== "rejected" && !allDone) {
|
|
21997
22163
|
hasIncompleteState = true;
|
|
21998
22164
|
}
|
|
@@ -22054,11 +22220,11 @@ function extractIncompleteMessageState(lastMessage) {
|
|
|
22054
22220
|
function extractIncompleteTailState(messages) {
|
|
22055
22221
|
if (!messages || messages.length === 0) return void 0;
|
|
22056
22222
|
let start = messages.length;
|
|
22057
|
-
while (start > 0 && _optionalChain([messages, 'access',
|
|
22223
|
+
while (start > 0 && _optionalChain([messages, 'access', _730 => _730[start - 1], 'optionalAccess', _731 => _731.role]) === "assistant") start -= 1;
|
|
22058
22224
|
if (start === messages.length) return void 0;
|
|
22059
22225
|
const segments = [];
|
|
22060
22226
|
for (let i = start; i < messages.length; i += 1) {
|
|
22061
|
-
const content = _optionalChain([messages, 'access',
|
|
22227
|
+
const content = _optionalChain([messages, 'access', _732 => _732[i], 'optionalAccess', _733 => _733.content]);
|
|
22062
22228
|
if (Array.isArray(content)) segments.push(...content);
|
|
22063
22229
|
}
|
|
22064
22230
|
if (segments.length === 0) return void 0;
|
|
@@ -22071,15 +22237,15 @@ function extractIncompleteTailState(messages) {
|
|
|
22071
22237
|
|
|
22072
22238
|
// src/components/chat/utils/process-historical-messages.ts
|
|
22073
22239
|
function getOwnerDisplayName(owner) {
|
|
22074
|
-
if (_optionalChain([owner, 'optionalAccess',
|
|
22240
|
+
if (_optionalChain([owner, 'optionalAccess', _734 => _734.type]) === OWNER_TYPE.ADMIN && owner.user) {
|
|
22075
22241
|
const { firstName, lastName } = owner.user;
|
|
22076
22242
|
const name = [firstName, lastName].filter(Boolean).join(" ");
|
|
22077
22243
|
if (name) return name;
|
|
22078
22244
|
}
|
|
22079
|
-
return _optionalChain([owner, 'optionalAccess',
|
|
22245
|
+
return _optionalChain([owner, 'optionalAccess', _735 => _735.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
|
|
22080
22246
|
}
|
|
22081
22247
|
function getOwnerAvatar(owner) {
|
|
22082
|
-
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess',
|
|
22248
|
+
return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _736 => _736.user, 'optionalAccess', _737 => _737.image, 'optionalAccess', _738 => _738.imageUrl]), () => ( void 0));
|
|
22083
22249
|
}
|
|
22084
22250
|
function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
|
|
22085
22251
|
messageDataArray.forEach((data) => {
|
|
@@ -22269,7 +22435,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
22269
22435
|
event.offerId,
|
|
22270
22436
|
event.text,
|
|
22271
22437
|
event.origin,
|
|
22272
|
-
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess',
|
|
22438
|
+
_nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _739 => _739[event.offerId]]), () => ( "pending"))
|
|
22273
22439
|
);
|
|
22274
22440
|
break;
|
|
22275
22441
|
case "ticket-escalated":
|
|
@@ -22303,7 +22469,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
22303
22469
|
);
|
|
22304
22470
|
break;
|
|
22305
22471
|
case "escalation-offer-resolved":
|
|
22306
|
-
_optionalChain([offerResolutions, 'optionalAccess',
|
|
22472
|
+
_optionalChain([offerResolutions, 'optionalAccess', _740 => _740.set, 'call', _741 => _741(event.offerId, {
|
|
22307
22473
|
status: event.status,
|
|
22308
22474
|
resolvedByName: event.resolvedByName
|
|
22309
22475
|
})]);
|
|
@@ -22367,7 +22533,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
22367
22533
|
}
|
|
22368
22534
|
}
|
|
22369
22535
|
} else {
|
|
22370
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
22536
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _742 => _742.set, 'call', _743 => _743(event.requestId, {
|
|
22371
22537
|
command: event.command || "",
|
|
22372
22538
|
explanation: event.explanation,
|
|
22373
22539
|
approvalType,
|
|
@@ -22382,8 +22548,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
22382
22548
|
const existingStatus = approvalStatuses[requestId];
|
|
22383
22549
|
const status = existingStatus || event.status;
|
|
22384
22550
|
const resolvedByName = event.resolvedByName;
|
|
22385
|
-
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess',
|
|
22386
|
-
if (_optionalChain([escalatedData, 'optionalAccess',
|
|
22551
|
+
const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _744 => _744.get, 'call', _745 => _745(requestId)]);
|
|
22552
|
+
if (_optionalChain([escalatedData, 'optionalAccess', _746 => _746.toolCalls]) && escalatedData.toolCalls.length > 0) {
|
|
22387
22553
|
if (batchApprovalsEnabled) {
|
|
22388
22554
|
accumulator.addApprovalBatch(
|
|
22389
22555
|
requestId,
|
|
@@ -22405,7 +22571,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
22405
22571
|
);
|
|
22406
22572
|
}
|
|
22407
22573
|
}
|
|
22408
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
22574
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _747 => _747.delete, 'call', _748 => _748(requestId)]);
|
|
22409
22575
|
break;
|
|
22410
22576
|
}
|
|
22411
22577
|
if (escalatedData) {
|
|
@@ -22414,7 +22580,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
|
|
|
22414
22580
|
explanation: escalatedData.explanation,
|
|
22415
22581
|
approvalType: escalatedData.approvalType
|
|
22416
22582
|
});
|
|
22417
|
-
_optionalChain([escalatedApprovals, 'optionalAccess',
|
|
22583
|
+
_optionalChain([escalatedApprovals, 'optionalAccess', _749 => _749.delete, 'call', _750 => _750(requestId)]);
|
|
22418
22584
|
}
|
|
22419
22585
|
const before = accumulator.getSegments();
|
|
22420
22586
|
const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
|
|
@@ -22506,14 +22672,14 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
22506
22672
|
pushStandaloneMessages(processedMessages, msg, messageDataArray);
|
|
22507
22673
|
return;
|
|
22508
22674
|
}
|
|
22509
|
-
const isUserMessage = _optionalChain([msg, 'access',
|
|
22675
|
+
const isUserMessage = _optionalChain([msg, 'access', _751 => _751.owner, 'optionalAccess', _752 => _752.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _753 => _753.owner, 'optionalAccess', _754 => _754.type]) === OWNER_TYPE.ADMIN;
|
|
22510
22676
|
if (isUserMessage) {
|
|
22511
22677
|
flushAssistantMessage();
|
|
22512
|
-
const userAuthorType = _optionalChain([msg, 'access',
|
|
22678
|
+
const userAuthorType = _optionalChain([msg, 'access', _755 => _755.owner, 'optionalAccess', _756 => _756.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
|
|
22513
22679
|
messageDataArray.forEach((data) => {
|
|
22514
22680
|
if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
|
|
22515
22681
|
const rawContext = data.contextItems;
|
|
22516
|
-
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess',
|
|
22682
|
+
const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _757 => _757.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _758 => _758.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
|
|
22517
22683
|
processedMessages.push({
|
|
22518
22684
|
id: msg.id,
|
|
22519
22685
|
role: "user",
|
|
@@ -22560,7 +22726,7 @@ function processHistoricalMessages(messages, options = {}) {
|
|
|
22560
22726
|
});
|
|
22561
22727
|
const nextMsg = messages[index + 1];
|
|
22562
22728
|
const isLastMessage = index === messages.length - 1;
|
|
22563
|
-
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access',
|
|
22729
|
+
const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _759 => _759.owner, 'optionalAccess', _760 => _760.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _761 => _761.owner, 'optionalAccess', _762 => _762.type]) === OWNER_TYPE.ADMIN);
|
|
22564
22730
|
if (isLastMessage || nextIsFromUser) {
|
|
22565
22731
|
flushAssistantMessage();
|
|
22566
22732
|
}
|
|
@@ -22943,7 +23109,7 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
22943
23109
|
const connectionState = !active || !dialogId ? "connected" : connectedForDialog === dialogId ? "connected" : "connecting";
|
|
22944
23110
|
const sendMessage = _react.useCallback.call(void 0,
|
|
22945
23111
|
async (text2, sendOptions) => {
|
|
22946
|
-
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess',
|
|
23112
|
+
const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _763 => _763.hidden]), () => ( false));
|
|
22947
23113
|
mutate((r) => r.pushOptimisticSend(text2, hidden));
|
|
22948
23114
|
await publishUserMessage(text2, { hidden, dialogId });
|
|
22949
23115
|
},
|
|
@@ -23036,11 +23202,11 @@ function useNatsChatAdapter(config, options = {}) {
|
|
|
23036
23202
|
// Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
|
|
23037
23203
|
// contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
|
|
23038
23204
|
// matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
|
|
23039
|
-
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
23040
|
-
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess',
|
|
23041
|
-
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
23042
|
-
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
23043
|
-
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess',
|
|
23205
|
+
currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _764 => _764.provider]), () => ( modelProvider)), () => ( null)),
|
|
23206
|
+
currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _765 => _765.modelLabel]), () => ( modelLabel)), () => ( null)),
|
|
23207
|
+
currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _766 => _766.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _767 => _767.contextWindowMaxTokens]))), () => ( null)),
|
|
23208
|
+
currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _768 => _768.inputTokensSize]), () => ( null)),
|
|
23209
|
+
currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _769 => _769.outputTokensSize]), () => ( null)),
|
|
23044
23210
|
currentCacheHitRatePct: null,
|
|
23045
23211
|
currentUsageBreakdown: null,
|
|
23046
23212
|
// Dialog management
|
|
@@ -23162,7 +23328,7 @@ function useUnifiedChat(options) {
|
|
|
23162
23328
|
[]
|
|
23163
23329
|
);
|
|
23164
23330
|
const displayRefForward = _react.useCallback.call(void 0,
|
|
23165
|
-
(ref) => _optionalChain([activeStateRef, 'access',
|
|
23331
|
+
(ref) => _optionalChain([activeStateRef, 'access', _770 => _770.current, 'access', _771 => _771.displayRef, 'optionalCall', _772 => _772(ref)]),
|
|
23166
23332
|
[]
|
|
23167
23333
|
);
|
|
23168
23334
|
const displayRef = activeState.displayRef ? displayRefForward : void 0;
|
|
@@ -23172,7 +23338,7 @@ function useUnifiedChat(options) {
|
|
|
23172
23338
|
const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
|
|
23173
23339
|
const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
|
|
23174
23340
|
const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
|
|
23175
|
-
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access',
|
|
23341
|
+
const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _773 => _773.current, 'access', _774 => _774.setDialogScope, 'optionalCall', _775 => _775(scope)]), []);
|
|
23176
23342
|
const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
|
|
23177
23343
|
const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
|
|
23178
23344
|
const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);
|
|
@@ -23280,19 +23446,19 @@ function turnRequestKeys(content) {
|
|
|
23280
23446
|
if (!Array.isArray(content)) return keys;
|
|
23281
23447
|
for (const seg of content) {
|
|
23282
23448
|
if (seg.type === "tool_execution") {
|
|
23283
|
-
const id = _optionalChain([seg, 'access',
|
|
23449
|
+
const id = _optionalChain([seg, 'access', _776 => _776.data, 'optionalAccess', _777 => _777.toolExecutionRequestId]);
|
|
23284
23450
|
if (id) keys.add(id);
|
|
23285
23451
|
} else if (seg.type === "approval_request") {
|
|
23286
|
-
const id = _optionalChain([seg, 'access',
|
|
23452
|
+
const id = _optionalChain([seg, 'access', _778 => _778.data, 'optionalAccess', _779 => _779.requestId]);
|
|
23287
23453
|
if (id) keys.add(id);
|
|
23288
23454
|
} else if (seg.type === "escalation_offer") {
|
|
23289
|
-
const id = _optionalChain([seg, 'access',
|
|
23455
|
+
const id = _optionalChain([seg, 'access', _780 => _780.data, 'optionalAccess', _781 => _781.offerId]);
|
|
23290
23456
|
if (id) keys.add(id);
|
|
23291
23457
|
} else if (seg.type === "approval_batch") {
|
|
23292
23458
|
const data = seg.data;
|
|
23293
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
23294
|
-
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
23295
|
-
if (_optionalChain([call, 'optionalAccess',
|
|
23459
|
+
if (_optionalChain([data, 'optionalAccess', _782 => _782.approvalRequestId])) keys.add(data.approvalRequestId);
|
|
23460
|
+
for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess', _783 => _783.toolCalls]), () => ( []))) {
|
|
23461
|
+
if (_optionalChain([call, 'optionalAccess', _784 => _784.toolExecutionRequestId])) keys.add(call.toolExecutionRequestId);
|
|
23296
23462
|
}
|
|
23297
23463
|
}
|
|
23298
23464
|
}
|
|
@@ -23376,18 +23542,18 @@ function mergeHistoryWithRealtime(input) {
|
|
|
23376
23542
|
}
|
|
23377
23543
|
}
|
|
23378
23544
|
const trailing = processedHistory[processedHistory.length - 1];
|
|
23379
|
-
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess',
|
|
23380
|
-
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access',
|
|
23545
|
+
const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _785 => _785.role]) === "assistant" ? trailing : null;
|
|
23546
|
+
const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _786 => _786.content, 'access', _787 => _787.find, 'call', _788 => _788((s) => s.type === "approval_batch"), 'optionalAccess', _789 => _789.data, 'optionalAccess', _790 => _790.approvalRequestId]), () => ( null)) : null;
|
|
23381
23547
|
let processedToUse = processedHistory;
|
|
23382
23548
|
const pinnedSyntheticIds = /* @__PURE__ */ new Set();
|
|
23383
23549
|
const droppedSyntheticIds = /* @__PURE__ */ new Set();
|
|
23384
23550
|
if (historyBatchId) {
|
|
23385
23551
|
const batchTwins = existingMessages.filter(
|
|
23386
|
-
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access',
|
|
23552
|
+
(m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access', _791 => _791.data, 'optionalAccess', _792 => _792.approvalRequestId]) === historyBatchId)
|
|
23387
23553
|
);
|
|
23388
23554
|
const existingWithSameBatch = _nullishCoalesce(batchTwins.find((m) => m.id === streamingMessageId), () => ( batchTwins[batchTwins.length - 1]));
|
|
23389
23555
|
if (existingWithSameBatch && Array.isArray(existingWithSameBatch.content)) {
|
|
23390
|
-
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess',
|
|
23556
|
+
const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _793 => _793.content])) ? historyTrailingAssistant.content.length : 0;
|
|
23391
23557
|
const realtimeSize = existingWithSameBatch.content.length;
|
|
23392
23558
|
if (existingWithSameBatch.id === streamingMessageId || realtimeSize > histSize) {
|
|
23393
23559
|
processedToUse = processedHistory.slice(0, -1);
|
|
@@ -23420,9 +23586,9 @@ function mergeHistoryWithRealtime(input) {
|
|
|
23420
23586
|
const trailingAssistantText = lastProcessed && lastProcessed.role === "assistant" ? assistantAnswerText(lastProcessed.content) : "";
|
|
23421
23587
|
const windowSignals = collectTwinSignals(processedToUse);
|
|
23422
23588
|
const seenUserSyntheticByContent = /* @__PURE__ */ new Map();
|
|
23423
|
-
const isInWindow = (m) => processedIds.has(m.id) || (_nullishCoalesce(_optionalChain([rawHistoryIds, 'optionalAccess',
|
|
23589
|
+
const isInWindow = (m) => processedIds.has(m.id) || (_nullishCoalesce(_optionalChain([rawHistoryIds, 'optionalAccess', _794 => _794.has, 'call', _795 => _795(m.id)]), () => ( false)));
|
|
23424
23590
|
const firstWindowIndex = existingMessages.findIndex(isInWindow);
|
|
23425
|
-
const isPersistedOlder = (m) => !isClientMintedId(m.id) && (_nullishCoalesce(_optionalChain([m, 'access',
|
|
23591
|
+
const isPersistedOlder = (m) => !isClientMintedId(m.id) && (_nullishCoalesce(_optionalChain([m, 'access', _796 => _796.timestamp, 'optionalAccess', _797 => _797.getTime, 'call', _798 => _798()]), () => ( 0))) <= historyFetchedAt;
|
|
23426
23592
|
let lastOlderPersistedIndex = -1;
|
|
23427
23593
|
if (firstWindowIndex < 0) {
|
|
23428
23594
|
for (const [index, m] of existingMessages.entries()) {
|
|
@@ -23440,7 +23606,7 @@ function mergeHistoryWithRealtime(input) {
|
|
|
23440
23606
|
} else if (pm.role === "assistant") {
|
|
23441
23607
|
windowHasUnstampedAssistant = true;
|
|
23442
23608
|
}
|
|
23443
|
-
const time = _optionalChain([pm, 'access',
|
|
23609
|
+
const time = _optionalChain([pm, 'access', _799 => _799.timestamp, 'optionalAccess', _800 => _800.getTime, 'call', _801 => _801()]);
|
|
23444
23610
|
if (typeof time === "number" && time < windowMinTime) windowMinTime = time;
|
|
23445
23611
|
}
|
|
23446
23612
|
const threadHasClientMintedRow = existingMessages.some((m) => isClientMintedId(m.id));
|
|
@@ -23458,14 +23624,14 @@ function mergeHistoryWithRealtime(input) {
|
|
|
23458
23624
|
const verdict = twinVerdict(windowSignals, m);
|
|
23459
23625
|
return verdict === "unknown" ? !seqCanMislead(m) : verdict === "distinct";
|
|
23460
23626
|
}
|
|
23461
|
-
const time = _optionalChain([m, 'access',
|
|
23627
|
+
const time = _optionalChain([m, 'access', _802 => _802.timestamp, 'optionalAccess', _803 => _803.getTime, 'call', _804 => _804()]);
|
|
23462
23628
|
if (typeof time !== "number" || time > historyFetchedAt) return false;
|
|
23463
23629
|
if (!Number.isFinite(windowMinTime) || time >= windowMinTime) return false;
|
|
23464
23630
|
return twinVerdict(windowSignals, m) === "distinct";
|
|
23465
23631
|
};
|
|
23466
23632
|
const keepRealtime = (m) => {
|
|
23467
23633
|
if (m.role === "user" && isOptimisticId(m.id) && typeof m.content === "string") {
|
|
23468
|
-
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access',
|
|
23634
|
+
const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _805 => _805.timestamp, 'optionalAccess', _806 => _806.getTime, 'call', _807 => _807()]), () => ( 0))) <= historyFetchedAt;
|
|
23469
23635
|
return !(canBeInSnapshot && windowSignals.userContents.has(m.content));
|
|
23470
23636
|
}
|
|
23471
23637
|
if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
|
|
@@ -23489,7 +23655,7 @@ function mergeHistoryWithRealtime(input) {
|
|
|
23489
23655
|
} else if (typeof m.streamSeq === "number") {
|
|
23490
23656
|
covered = historyMaxStreamSeq > 0 && historyMaxStreamSeq >= m.streamSeq;
|
|
23491
23657
|
} else {
|
|
23492
|
-
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access',
|
|
23658
|
+
covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _808 => _808.timestamp, 'optionalAccess', _809 => _809.getTime, 'call', _810 => _810()]), () => ( 0))) <= historyFetchedAt;
|
|
23493
23659
|
}
|
|
23494
23660
|
if (covered) return false;
|
|
23495
23661
|
}
|
|
@@ -23598,7 +23764,7 @@ function normalizeHistoricalMessageData(md) {
|
|
|
23598
23764
|
function isHistoricalUserTurn(m) {
|
|
23599
23765
|
return !!m.owner;
|
|
23600
23766
|
}
|
|
23601
|
-
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess',
|
|
23767
|
+
var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _811 => _811.type]) === "TEXT" && typeof d.text === "string";
|
|
23602
23768
|
var THINK_MS = 550;
|
|
23603
23769
|
var TOKEN_MS = 55;
|
|
23604
23770
|
var USER_MS = 480;
|
|
@@ -24231,7 +24397,7 @@ function useChatDialogManager({
|
|
|
24231
24397
|
const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
|
|
24232
24398
|
if (restoreTarget) {
|
|
24233
24399
|
try {
|
|
24234
|
-
await _optionalChain([unarchiveDialog, 'optionalCall',
|
|
24400
|
+
await _optionalChain([unarchiveDialog, 'optionalCall', _812 => _812(restoreTarget.id)]);
|
|
24235
24401
|
} catch (err) {
|
|
24236
24402
|
console.error("[useChatDialogManager] unarchive failed:", err);
|
|
24237
24403
|
return;
|
|
@@ -24777,7 +24943,7 @@ function EmbeddableChatInner({
|
|
|
24777
24943
|
}),
|
|
24778
24944
|
[commandsUrl]
|
|
24779
24945
|
);
|
|
24780
|
-
const headerUserName = _optionalChain([identityUser, 'optionalAccess',
|
|
24946
|
+
const headerUserName = _optionalChain([identityUser, 'optionalAccess', _813 => _813.name, 'optionalAccess', _814 => _814.trim, 'call', _815 => _815()]) || [_optionalChain([identityUser, 'optionalAccess', _816 => _816.firstName]), _optionalChain([identityUser, 'optionalAccess', _817 => _817.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _818 => _818.trim, 'call', _819 => _819()]) || void 0;
|
|
24781
24947
|
const effectiveModes = _react.useMemo.call(void 0, () => {
|
|
24782
24948
|
if (modes) return modes;
|
|
24783
24949
|
const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
|
|
@@ -24792,7 +24958,7 @@ function EmbeddableChatInner({
|
|
|
24792
24958
|
if (controlledActiveMode === void 0) {
|
|
24793
24959
|
setUncontrolledActiveMode(next);
|
|
24794
24960
|
}
|
|
24795
|
-
_optionalChain([onActiveModeChange, 'optionalCall',
|
|
24961
|
+
_optionalChain([onActiveModeChange, 'optionalCall', _820 => _820(next)]);
|
|
24796
24962
|
},
|
|
24797
24963
|
[controlledActiveMode, onActiveModeChange]
|
|
24798
24964
|
);
|
|
@@ -24819,7 +24985,7 @@ function EmbeddableChatInner({
|
|
|
24819
24985
|
);
|
|
24820
24986
|
const effectiveAssistantName = emptyStateConfig.name;
|
|
24821
24987
|
const effectiveAssistantIcon = emptyStateConfig.icon;
|
|
24822
|
-
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess',
|
|
24988
|
+
const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _821 => _821.title]) === "string" ? guideWelcome.title : null)));
|
|
24823
24989
|
const {
|
|
24824
24990
|
messages: rawMessages,
|
|
24825
24991
|
isLoading: chatLoading,
|
|
@@ -24862,8 +25028,8 @@ function EmbeddableChatInner({
|
|
|
24862
25028
|
const mingoCaps = _react.useMemo.call(void 0,
|
|
24863
25029
|
() => ({
|
|
24864
25030
|
...dialogCapabilities,
|
|
24865
|
-
canRename: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess',
|
|
24866
|
-
canArchive: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess',
|
|
25031
|
+
canRename: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _822 => _822.canRename]), () => ( false)),
|
|
25032
|
+
canArchive: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _823 => _823.canArchive]), () => ( false))
|
|
24867
25033
|
}),
|
|
24868
25034
|
[dialogCapabilities]
|
|
24869
25035
|
);
|
|
@@ -24878,7 +25044,7 @@ function EmbeddableChatInner({
|
|
|
24878
25044
|
void sendMessage(guidePendingPrompt).catch((err) => {
|
|
24879
25045
|
console.error("[EmbeddableChat] guide launcher prompt failed:", err);
|
|
24880
25046
|
});
|
|
24881
|
-
_optionalChain([onGuidePromptConsumed, 'optionalCall',
|
|
25047
|
+
_optionalChain([onGuidePromptConsumed, 'optionalCall', _824 => _824()]);
|
|
24882
25048
|
}, [guidePendingPrompt, activeMode, sendMessage, onGuidePromptConsumed]);
|
|
24883
25049
|
const {
|
|
24884
25050
|
attachments: stagedAttachments,
|
|
@@ -24889,7 +25055,7 @@ function EmbeddableChatInner({
|
|
|
24889
25055
|
clear: clearAttachments
|
|
24890
25056
|
} = useChatAttachments();
|
|
24891
25057
|
const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
|
|
24892
|
-
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
25058
|
+
const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _825 => _825.maxItems]), () => ( 10));
|
|
24893
25059
|
const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
|
|
24894
25060
|
const [contextItems, setContextItems] = _react.useState.call(void 0, NO_CONTEXT_ITEMS);
|
|
24895
25061
|
const [contextPickerOpen, setContextPickerOpen] = _react.useState.call(void 0, false);
|
|
@@ -24910,10 +25076,10 @@ function EmbeddableChatInner({
|
|
|
24910
25076
|
}, [activeDialogId, activeMode]);
|
|
24911
25077
|
const mentionMarkerByType = _react.useMemo.call(void 0, () => {
|
|
24912
25078
|
const m = /* @__PURE__ */ new Map();
|
|
24913
|
-
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess',
|
|
25079
|
+
for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _826 => _826.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
|
|
24914
25080
|
return m;
|
|
24915
|
-
}, [_optionalChain([contextPicker, 'optionalAccess',
|
|
24916
|
-
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess',
|
|
25081
|
+
}, [_optionalChain([contextPicker, 'optionalAccess', _827 => _827.entityTypes])]);
|
|
25082
|
+
const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _828 => _828.entityTypes]);
|
|
24917
25083
|
const resolveContextIcon = _react.useMemo.call(void 0, () => {
|
|
24918
25084
|
const byType = /* @__PURE__ */ new Map();
|
|
24919
25085
|
for (const t of _nullishCoalesce(contextEntityTypes, () => ( []))) byType.set(t.type, t.icon);
|
|
@@ -24925,7 +25091,7 @@ function EmbeddableChatInner({
|
|
|
24925
25091
|
if (mentionActiveRef.current) {
|
|
24926
25092
|
if (contextItems.some((p) => `${p.type}:${p.id}` === key)) return;
|
|
24927
25093
|
if (contextItems.length >= contextMaxItems) return;
|
|
24928
|
-
_optionalChain([chatInputRef, 'access',
|
|
25094
|
+
_optionalChain([chatInputRef, 'access', _829 => _829.current, 'optionalAccess', _830 => _830.commitMention, 'call', _831 => _831(mentionTokenOf(key, mentionMarkerByType), {
|
|
24929
25095
|
label: item.label,
|
|
24930
25096
|
icon: resolveContextIcon(item)
|
|
24931
25097
|
})]);
|
|
@@ -24948,9 +25114,9 @@ function EmbeddableChatInner({
|
|
|
24948
25114
|
setContextItems((prev) => prev.filter((p) => `${p.type}:${p.id}` !== key));
|
|
24949
25115
|
if (mentionKeysRef.current.has(key)) {
|
|
24950
25116
|
mentionKeysRef.current.delete(key);
|
|
24951
|
-
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access',
|
|
25117
|
+
const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _832 => _832.current, 'optionalAccess', _833 => _833.getValue, 'call', _834 => _834()]), () => ( ""));
|
|
24952
25118
|
const next = cur.replace(`@${mentionTokenOf(key, mentionMarkerByType)}`, "").replace(/\s{2,}/g, " ").trimStart();
|
|
24953
|
-
_optionalChain([chatInputRef, 'access',
|
|
25119
|
+
_optionalChain([chatInputRef, 'access', _835 => _835.current, 'optionalAccess', _836 => _836.setValue, 'call', _837 => _837(next)]);
|
|
24954
25120
|
}
|
|
24955
25121
|
},
|
|
24956
25122
|
[mentionMarkerByType]
|
|
@@ -24972,7 +25138,7 @@ function EmbeddableChatInner({
|
|
|
24972
25138
|
}, []);
|
|
24973
25139
|
const closeContextPicker = _react.useCallback.call(void 0, () => {
|
|
24974
25140
|
if (mentionActiveRef.current) {
|
|
24975
|
-
_optionalChain([chatInputRef, 'access',
|
|
25141
|
+
_optionalChain([chatInputRef, 'access', _838 => _838.current, 'optionalAccess', _839 => _839.removeMentionTrigger, 'call', _840 => _840()]);
|
|
24976
25142
|
}
|
|
24977
25143
|
setContextPickerOpen(false);
|
|
24978
25144
|
setMentionQuery(null);
|
|
@@ -25006,8 +25172,8 @@ function EmbeddableChatInner({
|
|
|
25006
25172
|
[effectiveAssistantIcon]
|
|
25007
25173
|
);
|
|
25008
25174
|
const [timestampCache] = _react.useState.call(void 0, () => /* @__PURE__ */ new Map());
|
|
25009
|
-
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess',
|
|
25010
|
-
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess',
|
|
25175
|
+
const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _841 => _841.firstName]), _optionalChain([identityUser, 'optionalAccess', _842 => _842.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _843 => _843.name, 'optionalAccess', _844 => _844.trim, 'call', _845 => _845()]) || void 0 : void 0;
|
|
25176
|
+
const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _846 => _846.avatarUrl, 'optionalAccess', _847 => _847.trim, 'call', _848 => _848()]) || void 0 : void 0;
|
|
25011
25177
|
const messages = _react.useMemo.call(void 0, () => {
|
|
25012
25178
|
const options = { userName: guideUserName, userAvatar: guideUserAvatar, timestampCache };
|
|
25013
25179
|
const mapped = rawMessages.map((m) => mapHostMessage(m, options));
|
|
@@ -25181,7 +25347,7 @@ function EmbeddableChatInner({
|
|
|
25181
25347
|
_react.useEffect.call(void 0, () => {
|
|
25182
25348
|
if (!panelBoundary || typeof ResizeObserver === "undefined") return void 0;
|
|
25183
25349
|
const ro = new ResizeObserver((entries) => {
|
|
25184
|
-
const w = _optionalChain([entries, 'access',
|
|
25350
|
+
const w = _optionalChain([entries, 'access', _849 => _849[0], 'optionalAccess', _850 => _850.contentRect, 'optionalAccess', _851 => _851.width]);
|
|
25185
25351
|
if (typeof w === "number") setPanelWidth(w);
|
|
25186
25352
|
});
|
|
25187
25353
|
ro.observe(panelBoundary);
|
|
@@ -25225,17 +25391,17 @@ function EmbeddableChatInner({
|
|
|
25225
25391
|
const stackedListView = isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen && !emptyListSkipped;
|
|
25226
25392
|
const headerShowBack = hasConversation || guideCanReturnToMingo;
|
|
25227
25393
|
const freshConversationTitle = isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "New Chat";
|
|
25228
|
-
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
25394
|
+
const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _852 => _852.title]) || freshConversationTitle : isGuideEmpty ? freshConversationTitle : "Current Chats";
|
|
25229
25395
|
const headerBackAriaLabel = hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo";
|
|
25230
25396
|
const headerOnBack = hasConversation ? handleBack : () => handleActiveModeChange("mingo");
|
|
25231
25397
|
const headerOnRestore = isViewingArchived && unarchiveDialog && activeDialog ? () => setRestoreTarget(activeDialog) : void 0;
|
|
25232
25398
|
const headerOnRename = activeDialogId && activeDialog && mingoCaps.canRename ? () => setRenameTarget(activeDialog) : void 0;
|
|
25233
25399
|
const headerOnArchive = activeDialogId && activeDialog && mingoCaps.canArchive ? () => setArchiveTarget(activeDialog) : void 0;
|
|
25234
|
-
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access',
|
|
25400
|
+
const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _853 => _853.onCopyLink, 'optionalCall', _854 => _854(activeDialog)]) : void 0;
|
|
25235
25401
|
const headerOnOpenArchive = fetchArchivedDialogs ? openArchive : void 0;
|
|
25236
|
-
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess',
|
|
25237
|
-
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess',
|
|
25238
|
-
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access',
|
|
25402
|
+
const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _855 => _855.owner]) : void 0;
|
|
25403
|
+
const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _856 => _856.name, 'optionalAccess', _857 => _857.trim, 'call', _858 => _858()]) || headerUserName;
|
|
25404
|
+
const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _859 => _859.avatarUrl, 'optionalAccess', _860 => _860.trim, 'call', _861 => _861()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _862 => _862.avatarUrl, 'optionalAccess', _863 => _863.trim, 'call', _864 => _864()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _865 => _865.trim, 'call', _866 => _866()]) || void 0;
|
|
25239
25405
|
const headerAvatar = headerPersonName || headerPersonAvatarUrl ? { name: headerPersonName, avatarUrl: headerPersonAvatarUrl } : void 0;
|
|
25240
25406
|
const handleNewChat = _react.useCallback.call(void 0, () => {
|
|
25241
25407
|
resetToNewChat();
|
|
@@ -25583,9 +25749,9 @@ function EmbeddableChatInner({
|
|
|
25583
25749
|
subtitle: _nullishCoalesce(effectiveGreeting, () => ( void 0)),
|
|
25584
25750
|
subtitleLoading: emptyStateLoading,
|
|
25585
25751
|
...guideWelcome,
|
|
25586
|
-
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
25587
|
-
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess',
|
|
25588
|
-
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess',
|
|
25752
|
+
title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _867 => _867.title]))),
|
|
25753
|
+
icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _868 => _868.icon]))),
|
|
25754
|
+
quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _869 => _869.quickActions]), () => ( guideSuggestedActions)),
|
|
25589
25755
|
onQuickAction: (action) => {
|
|
25590
25756
|
setQuickActionPreview(null);
|
|
25591
25757
|
handleSend(_nullishCoalesce(action.prompt, () => ( action.label)));
|
|
@@ -25659,8 +25825,8 @@ function EmbeddableChatInner({
|
|
|
25659
25825
|
selectedContextItems: contextItems,
|
|
25660
25826
|
onToggleContextItem: toggleContextItem,
|
|
25661
25827
|
onRemoveContextItem: removeContextItem,
|
|
25662
|
-
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess',
|
|
25663
|
-
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess',
|
|
25828
|
+
contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _870 => _870.items]),
|
|
25829
|
+
onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _871 => _871.onRemove]),
|
|
25664
25830
|
contextPickerOpen,
|
|
25665
25831
|
onOpenContextPicker: openContextPicker,
|
|
25666
25832
|
onCloseContextPicker: closeContextPicker,
|
|
@@ -26138,4 +26304,4 @@ function EmbeddableChatInner({
|
|
|
26138
26304
|
|
|
26139
26305
|
|
|
26140
26306
|
exports.FloatingTooltip = FloatingTooltip; exports.tagVariants = tagVariants; exports.Tag = Tag; 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.VideoPlayBadge = VideoPlayBadge; exports.VideoUnmuteGlyph = VideoUnmuteGlyph; exports.extractYouTubeId = extractYouTubeId; exports.VIDEO_PLAYBACK_FAILED_EVENT = VIDEO_PLAYBACK_FAILED_EVENT; exports.Video = Video2; exports.HoverDropdown = HoverDropdown; exports.ExpandChevron = ExpandChevron; exports.useCollapsible = useCollapsible; exports.getCommandText = getCommandText; exports.ArgRow = ArgRow; exports.ResultBlock = ResultBlock; exports.CommandBlock = CommandBlock; exports.ApprovalStatusTag = ApprovalStatusTag; exports.ApprovalBatchMessage = ApprovalBatchMessage; 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.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.resolveIcon = resolveIcon; exports.ICON_OPTIONS = ICON_OPTIONS; exports.SlashCommandSuggestions = SlashCommandSuggestions; exports.ChatInput = ChatInput; 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.FAE_AVATAR_DATA_URI = FAE_AVATAR_DATA_URI; exports.AgentMark = AgentMark; 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.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.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.ADMIN_CONTENT_CARD_GRID_CLASS = ADMIN_CONTENT_CARD_GRID_CLASS; exports.AdminContentCardSkeleton = AdminContentCardSkeleton; exports.AdminContentCardGrid = AdminContentCardGrid; exports.getCaptionsUrl = getCaptionsUrl; exports.rebaseCaptionsUrl = rebaseCaptionsUrl; exports.buildCaptionsUrl = buildCaptionsUrl; exports.getEntityCaptionUrls = getEntityCaptionUrls; exports.getEntityCaptionUrlsById = getEntityCaptionUrlsById; exports.captionsEntityTypeForDocType = captionsEntityTypeForDocType; exports.PAGE_HEADING_CLASS = PAGE_HEADING_CLASS; exports.SECTION_HEADING_CLASS = SECTION_HEADING_CLASS; exports.PageHeading = PageHeading; 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.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.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.chatCardLabel = chatCardLabel; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; 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.CONNECTION_STATUS = CONNECTION_STATUS; exports.isStructuredContent = isStructuredContent; exports.normalizeContent = normalizeContent2; 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;
|
|
26141
|
-
//# sourceMappingURL=chunk-
|
|
26307
|
+
//# sourceMappingURL=chunk-5YW3GAUR.cjs.map
|