@arbidocs/blocks 0.5.26 → 0.5.27
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/{ConnectedNativeDocxComparison-3IPJEVEH.js → ConnectedNativeDocxComparison-5VOMPGV5.js} +7 -7
- package/dist/{ConnectedNativeDocxComparison-3IPJEVEH.js.map → ConnectedNativeDocxComparison-5VOMPGV5.js.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-E4NEJZ5L.cjs → ConnectedNativeDocxComparison-ZJ44DWVV.cjs} +8 -8
- package/dist/{ConnectedNativeDocxComparison-E4NEJZ5L.cjs.map → ConnectedNativeDocxComparison-ZJ44DWVV.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-43YCQZYJ.js → ConnectedNativeDocxEditor-CSD3YIPD.js} +6 -6
- package/dist/{ConnectedNativeDocxEditor-43YCQZYJ.js.map → ConnectedNativeDocxEditor-CSD3YIPD.js.map} +1 -1
- package/dist/{ConnectedNativeDocxEditor-TYRH4YYS.cjs → ConnectedNativeDocxEditor-KQEYRN4T.cjs} +8 -8
- package/dist/{ConnectedNativeDocxEditor-TYRH4YYS.cjs.map → ConnectedNativeDocxEditor-KQEYRN4T.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-LRUJ3SC3.cjs → ConnectedStreamedWordArtifact-OTC4CAYP.cjs} +8 -8
- package/dist/ConnectedStreamedWordArtifact-OTC4CAYP.cjs.map +1 -0
- package/dist/{ConnectedStreamedWordArtifact-VHLK2CRN.js → ConnectedStreamedWordArtifact-ZPI76QX2.js} +7 -7
- package/dist/{ConnectedStreamedWordArtifact-VHLK2CRN.js.map → ConnectedStreamedWordArtifact-ZPI76QX2.js.map} +1 -1
- package/dist/{WorkspaceTableView-QB4N4KM3.cjs → WorkspaceTableView-5I3KWZ5I.cjs} +7 -7
- package/dist/{WorkspaceTableView-QB4N4KM3.cjs.map → WorkspaceTableView-5I3KWZ5I.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-P5B4A6QF.js → WorkspaceTableView-LS6LFKBE.js} +5 -5
- package/dist/{WorkspaceTableView-P5B4A6QF.js.map → WorkspaceTableView-LS6LFKBE.js.map} +1 -1
- package/dist/agents/index.cjs +327 -327
- package/dist/agents/index.js +5 -5
- package/dist/{chunk-JS7KJRKG.js → chunk-75Z5AUMM.js} +3 -3
- package/dist/{chunk-JS7KJRKG.js.map → chunk-75Z5AUMM.js.map} +1 -1
- package/dist/{chunk-EEVPNS7F.js → chunk-7FKVJUR4.js} +3 -3
- package/dist/{chunk-EEVPNS7F.js.map → chunk-7FKVJUR4.js.map} +1 -1
- package/dist/{chunk-UYSARUCL.js → chunk-A3WHSTRX.js} +3 -3
- package/dist/{chunk-UYSARUCL.js.map → chunk-A3WHSTRX.js.map} +1 -1
- package/dist/{chunk-NEZE2BHH.js → chunk-DEB2YRCN.js} +4 -4
- package/dist/{chunk-NEZE2BHH.js.map → chunk-DEB2YRCN.js.map} +1 -1
- package/dist/{chunk-WKI4ATLQ.cjs → chunk-F5T4R7CN.cjs} +4 -4
- package/dist/{chunk-WKI4ATLQ.cjs.map → chunk-F5T4R7CN.cjs.map} +1 -1
- package/dist/{chunk-RMHNOUDC.cjs → chunk-FV32BTXV.cjs} +3 -3
- package/dist/{chunk-RMHNOUDC.cjs.map → chunk-FV32BTXV.cjs.map} +1 -1
- package/dist/{chunk-KEED4XPY.js → chunk-G6O77PJD.js} +3 -3
- package/dist/{chunk-KEED4XPY.js.map → chunk-G6O77PJD.js.map} +1 -1
- package/dist/{chunk-AQZFO4UE.js → chunk-H5XHCIWY.js} +3 -3
- package/dist/{chunk-AQZFO4UE.js.map → chunk-H5XHCIWY.js.map} +1 -1
- package/dist/{chunk-6WD2OGWW.cjs → chunk-I45LDMQU.cjs} +5 -5
- package/dist/{chunk-6WD2OGWW.cjs.map → chunk-I45LDMQU.cjs.map} +1 -1
- package/dist/{chunk-BIRDOSOU.js → chunk-L2C7WV6D.js} +3 -3
- package/dist/{chunk-BIRDOSOU.js.map → chunk-L2C7WV6D.js.map} +1 -1
- package/dist/{chunk-VA2VADOX.cjs → chunk-LX3JJYVP.cjs} +3 -3
- package/dist/{chunk-VA2VADOX.cjs.map → chunk-LX3JJYVP.cjs.map} +1 -1
- package/dist/{chunk-5CQOSYC4.js → chunk-OUCSQ3IE.js} +4 -4
- package/dist/{chunk-5CQOSYC4.js.map → chunk-OUCSQ3IE.js.map} +1 -1
- package/dist/{chunk-KQZWBMAC.cjs → chunk-P57ASK2E.cjs} +4 -4
- package/dist/{chunk-KQZWBMAC.cjs.map → chunk-P57ASK2E.cjs.map} +1 -1
- package/dist/{chunk-XYPVZKAN.js → chunk-PXYP3DM5.js} +202 -3
- package/dist/chunk-PXYP3DM5.js.map +1 -0
- package/dist/{chunk-LFQZDALT.cjs → chunk-QWKT4DO6.cjs} +206 -2
- package/dist/chunk-QWKT4DO6.cjs.map +1 -0
- package/dist/{chunk-KQHUPFBX.js → chunk-R4K5L6QY.js} +3 -3
- package/dist/{chunk-KQHUPFBX.js.map → chunk-R4K5L6QY.js.map} +1 -1
- package/dist/{chunk-EPXQ7AAF.cjs → chunk-SQQULKT4.cjs} +9 -9
- package/dist/{chunk-EPXQ7AAF.cjs.map → chunk-SQQULKT4.cjs.map} +1 -1
- package/dist/{chunk-QK2YO2RP.cjs → chunk-TL5VXRNT.cjs} +9 -9
- package/dist/{chunk-QK2YO2RP.cjs.map → chunk-TL5VXRNT.cjs.map} +1 -1
- package/dist/{chunk-CLFJTKQH.cjs → chunk-WBBUUEER.cjs} +48 -48
- package/dist/{chunk-CLFJTKQH.cjs.map → chunk-WBBUUEER.cjs.map} +1 -1
- package/dist/{chunk-NVCIN6U6.js → chunk-WP4IDJBA.js} +3 -3
- package/dist/{chunk-NVCIN6U6.js.map → chunk-WP4IDJBA.js.map} +1 -1
- package/dist/{chunk-D2IJHMGM.js → chunk-XMUYSOYU.js} +4 -4
- package/dist/{chunk-D2IJHMGM.js.map → chunk-XMUYSOYU.js.map} +1 -1
- package/dist/{chunk-F72ZD5Q2.cjs → chunk-YD3RN2FY.cjs} +3 -3
- package/dist/{chunk-F72ZD5Q2.cjs.map → chunk-YD3RN2FY.cjs.map} +1 -1
- package/dist/{chunk-SQ3TVPAW.cjs → chunk-Z2BAYT2U.cjs} +4 -4
- package/dist/{chunk-SQ3TVPAW.cjs.map → chunk-Z2BAYT2U.cjs.map} +1 -1
- package/dist/{chunk-4PG6NJDO.cjs → chunk-ZXXXLYZY.cjs} +16 -16
- package/dist/{chunk-4PG6NJDO.cjs.map → chunk-ZXXXLYZY.cjs.map} +1 -1
- package/dist/connect/docx.cjs +10 -10
- package/dist/connect/docx.js +6 -6
- package/dist/connect/index.cjs +488 -489
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +22 -23
- package/dist/connect/index.js.map +1 -1
- package/dist/connect/viewer.cjs +20 -20
- package/dist/connect/viewer.js +9 -9
- package/dist/document-tools/index.cjs +17 -17
- package/dist/document-tools/index.js +2 -2
- package/dist/facts/index.cjs +55 -55
- package/dist/facts/index.js +3 -3
- package/dist/files/index.cjs +1 -1
- package/dist/files/index.js +1 -1
- package/dist/index.cjs +498 -478
- package/dist/index.js +13 -13
- package/dist/settings/index.cjs +1 -1
- package/dist/settings/index.js +1 -1
- package/dist/shell/index.cjs +71 -51
- package/dist/shell/index.d.ts +1 -0
- package/dist/shell/index.js +2 -2
- package/dist/shell/reload-policy.d.ts +58 -0
- package/dist/site/index.cjs +22 -22
- package/dist/site/index.js +2 -2
- package/dist/studio/index.cjs +2 -2
- package/dist/studio/index.js +2 -2
- package/dist/workflow-canvas/index.cjs +18 -18
- package/dist/workflow-canvas/index.js +5 -5
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/ConnectedStreamedWordArtifact-LRUJ3SC3.cjs.map +0 -1
- package/dist/chunk-LFQZDALT.cjs.map +0 -1
- package/dist/chunk-XYPVZKAN.js.map +0 -1
package/dist/connect/index.cjs
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
var chunkWL57N2KJ_cjs = require('../chunk-WL57N2KJ.cjs');
|
|
4
|
+
var chunkLX3JJYVP_cjs = require('../chunk-LX3JJYVP.cjs');
|
|
6
5
|
var chunkV2GEULRG_cjs = require('../chunk-V2GEULRG.cjs');
|
|
7
6
|
var chunkKWJW5TMH_cjs = require('../chunk-KWJW5TMH.cjs');
|
|
8
7
|
var chunkPSIKUQYM_cjs = require('../chunk-PSIKUQYM.cjs');
|
|
9
|
-
var
|
|
8
|
+
var chunkYD3RN2FY_cjs = require('../chunk-YD3RN2FY.cjs');
|
|
10
9
|
var chunkORVJFY72_cjs = require('../chunk-ORVJFY72.cjs');
|
|
11
10
|
var chunkOU3RGQFX_cjs = require('../chunk-OU3RGQFX.cjs');
|
|
12
11
|
require('../chunk-UAEYU2NN.cjs');
|
|
12
|
+
var chunkWL57N2KJ_cjs = require('../chunk-WL57N2KJ.cjs');
|
|
13
13
|
var chunk2CO5PMOE_cjs = require('../chunk-2CO5PMOE.cjs');
|
|
14
|
-
var
|
|
14
|
+
var chunkSQQULKT4_cjs = require('../chunk-SQQULKT4.cjs');
|
|
15
15
|
var chunk4Y4724GI_cjs = require('../chunk-4Y4724GI.cjs');
|
|
16
16
|
var chunkHT62K3UO_cjs = require('../chunk-HT62K3UO.cjs');
|
|
17
|
-
var chunk223D4727_cjs = require('../chunk-223D4727.cjs');
|
|
18
17
|
var chunk2WLXQGWC_cjs = require('../chunk-2WLXQGWC.cjs');
|
|
18
|
+
var chunk223D4727_cjs = require('../chunk-223D4727.cjs');
|
|
19
19
|
var chunk2XLVE2XD_cjs = require('../chunk-2XLVE2XD.cjs');
|
|
20
|
-
var chunkIRY63R4L_cjs = require('../chunk-IRY63R4L.cjs');
|
|
21
20
|
require('../chunk-UWIILWDI.cjs');
|
|
21
|
+
var chunkIRY63R4L_cjs = require('../chunk-IRY63R4L.cjs');
|
|
22
22
|
require('../chunk-464YPRAE.cjs');
|
|
23
23
|
require('../chunk-NML42O7Q.cjs');
|
|
24
24
|
var chunk5FYU7ZIU_cjs = require('../chunk-5FYU7ZIU.cjs');
|
|
25
25
|
require('../chunk-ZESMRGDV.cjs');
|
|
26
|
-
var
|
|
27
|
-
var chunkQZTNTP75_cjs = require('../chunk-QZTNTP75.cjs');
|
|
26
|
+
var chunkI45LDMQU_cjs = require('../chunk-I45LDMQU.cjs');
|
|
28
27
|
var chunkC2ECYOPP_cjs = require('../chunk-C2ECYOPP.cjs');
|
|
29
28
|
var chunkGOWXP5KT_cjs = require('../chunk-GOWXP5KT.cjs');
|
|
30
29
|
var chunk7YGUUUL7_cjs = require('../chunk-7YGUUUL7.cjs');
|
|
30
|
+
var chunkQZTNTP75_cjs = require('../chunk-QZTNTP75.cjs');
|
|
31
31
|
var chunkAKW4JLHQ_cjs = require('../chunk-AKW4JLHQ.cjs');
|
|
32
32
|
var chunkKUQOHPKP_cjs = require('../chunk-KUQOHPKP.cjs');
|
|
33
|
-
require('../chunk-NWNVWO6L.cjs');
|
|
34
|
-
require('../chunk-PCB2BPN3.cjs');
|
|
35
33
|
var chunkVPPX5XUF_cjs = require('../chunk-VPPX5XUF.cjs');
|
|
34
|
+
require('../chunk-PCB2BPN3.cjs');
|
|
35
|
+
require('../chunk-NWNVWO6L.cjs');
|
|
36
36
|
var chunkWUG24K7P_cjs = require('../chunk-WUG24K7P.cjs');
|
|
37
37
|
require('../chunk-7G2LJMUG.cjs');
|
|
38
38
|
var chunkTM2D4XT4_cjs = require('../chunk-TM2D4XT4.cjs');
|
|
39
39
|
var chunk5Y6V7F6W_cjs = require('../chunk-5Y6V7F6W.cjs');
|
|
40
|
-
var
|
|
41
|
-
require('../chunk-VLCY46K6.cjs');
|
|
40
|
+
var chunkQWKT4DO6_cjs = require('../chunk-QWKT4DO6.cjs');
|
|
42
41
|
var chunkBBTHGWZO_cjs = require('../chunk-BBTHGWZO.cjs');
|
|
42
|
+
require('../chunk-VLCY46K6.cjs');
|
|
43
43
|
require('../chunk-D54JXTPG.cjs');
|
|
44
44
|
var chunkJIOHDVWH_cjs = require('../chunk-JIOHDVWH.cjs');
|
|
45
45
|
var chunkRC25WMVB_cjs = require('../chunk-RC25WMVB.cjs');
|
|
46
|
-
var
|
|
46
|
+
var chunkTL5VXRNT_cjs = require('../chunk-TL5VXRNT.cjs');
|
|
47
47
|
var chunkRFIBUWLF_cjs = require('../chunk-RFIBUWLF.cjs');
|
|
48
|
-
var
|
|
49
|
-
var chunkAQPZ4QMV_cjs = require('../chunk-AQPZ4QMV.cjs');
|
|
48
|
+
var chunkF5T4R7CN_cjs = require('../chunk-F5T4R7CN.cjs');
|
|
50
49
|
var chunk5OEDXFPX_cjs = require('../chunk-5OEDXFPX.cjs');
|
|
50
|
+
var chunkAQPZ4QMV_cjs = require('../chunk-AQPZ4QMV.cjs');
|
|
51
51
|
require('../chunk-SIB6C7P7.cjs');
|
|
52
52
|
require('../chunk-DVUZTGVL.cjs');
|
|
53
53
|
var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
|
|
@@ -58,6 +58,9 @@ var chunkLKK52DEY_cjs = require('../chunk-LKK52DEY.cjs');
|
|
|
58
58
|
var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
|
|
59
59
|
var chunkBYJUI4AT_cjs = require('../chunk-BYJUI4AT.cjs');
|
|
60
60
|
var chunkCG757WKY_cjs = require('../chunk-CG757WKY.cjs');
|
|
61
|
+
var chunkW3PSIIMN_cjs = require('../chunk-W3PSIIMN.cjs');
|
|
62
|
+
var chunkQUMUAJ2P_cjs = require('../chunk-QUMUAJ2P.cjs');
|
|
63
|
+
var chunkVZOOGA47_cjs = require('../chunk-VZOOGA47.cjs');
|
|
61
64
|
var chunk7U2DNPMZ_cjs = require('../chunk-7U2DNPMZ.cjs');
|
|
62
65
|
var chunkEGSSLWNZ_cjs = require('../chunk-EGSSLWNZ.cjs');
|
|
63
66
|
var chunkEVV32AXB_cjs = require('../chunk-EVV32AXB.cjs');
|
|
@@ -66,9 +69,6 @@ var chunkMOIZ2R5X_cjs = require('../chunk-MOIZ2R5X.cjs');
|
|
|
66
69
|
var chunkMB3S2ETI_cjs = require('../chunk-MB3S2ETI.cjs');
|
|
67
70
|
var chunkMEMWZ72Y_cjs = require('../chunk-MEMWZ72Y.cjs');
|
|
68
71
|
var chunkZW6FPIFC_cjs = require('../chunk-ZW6FPIFC.cjs');
|
|
69
|
-
var chunkW3PSIIMN_cjs = require('../chunk-W3PSIIMN.cjs');
|
|
70
|
-
var chunkQUMUAJ2P_cjs = require('../chunk-QUMUAJ2P.cjs');
|
|
71
|
-
var chunkVZOOGA47_cjs = require('../chunk-VZOOGA47.cjs');
|
|
72
72
|
var chunkADH5KQZW_cjs = require('../chunk-ADH5KQZW.cjs');
|
|
73
73
|
var chunk6PFVCAWJ_cjs = require('../chunk-6PFVCAWJ.cjs');
|
|
74
74
|
var chunkZ2XZ2D4N_cjs = require('../chunk-Z2XZ2D4N.cjs');
|
|
@@ -163,9 +163,9 @@ var ConnectedUserEntity = React7.memo(function ConnectedUserEntity2({
|
|
|
163
163
|
if (isMe) openSettings();
|
|
164
164
|
else openDirectChat?.(user.external_id);
|
|
165
165
|
};
|
|
166
|
-
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
166
|
+
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(chunkI45LDMQU_cjs.EntityTooltip, { children: [
|
|
167
167
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
168
|
-
|
|
168
|
+
chunkI45LDMQU_cjs.EntityTooltipHeader,
|
|
169
169
|
{
|
|
170
170
|
lead: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
171
171
|
ui.Avatar,
|
|
@@ -196,13 +196,13 @@ var ConnectedUserEntity = React7.memo(function ConnectedUserEntity2({
|
|
|
196
196
|
subtitle: user.email
|
|
197
197
|
}
|
|
198
198
|
),
|
|
199
|
-
userIsAgent && agentOwner && /* @__PURE__ */ jsxRuntime.jsx(
|
|
199
|
+
userIsAgent && agentOwner && /* @__PURE__ */ jsxRuntime.jsx(chunkI45LDMQU_cjs.EntityTooltipSection, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkI45LDMQU_cjs.EntityTooltipHint, { icon: /* @__PURE__ */ jsxRuntime.jsx(react.ArbiBotHeadIcon, { className: "w-3.5 h-3.5 flex-shrink-0" }), children: [
|
|
200
200
|
"Agent of",
|
|
201
201
|
" ",
|
|
202
202
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: ui.getUserDisplayName(agentOwner) })
|
|
203
203
|
] }) }),
|
|
204
204
|
sharedWorkspaces.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
205
|
-
|
|
205
|
+
chunkI45LDMQU_cjs.EntityTooltipSection,
|
|
206
206
|
{
|
|
207
207
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "w-3.5 h-3.5 flex-shrink-0" }),
|
|
208
208
|
heading: "Shared Workspaces",
|
|
@@ -233,7 +233,7 @@ var ConnectedUserEntity = React7.memo(function ConnectedUserEntity2({
|
|
|
233
233
|
] })
|
|
234
234
|
}
|
|
235
235
|
),
|
|
236
|
-
interactive && variant === "pill" && canChat && /* @__PURE__ */ jsxRuntime.jsx(
|
|
236
|
+
interactive && variant === "pill" && canChat && /* @__PURE__ */ jsxRuntime.jsx(chunkI45LDMQU_cjs.EntityTooltipHint, { isRuled: true, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageCircleMore, { className: "w-3 h-3" }), children: "Click to send message" })
|
|
237
237
|
] });
|
|
238
238
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
239
239
|
ui.UserEntity,
|
|
@@ -375,7 +375,7 @@ function ConnectedWorkspaceActivity({
|
|
|
375
375
|
[feed.data]
|
|
376
376
|
);
|
|
377
377
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
378
|
-
|
|
378
|
+
chunkI45LDMQU_cjs.WorkspaceActivityList,
|
|
379
379
|
{
|
|
380
380
|
...listProps,
|
|
381
381
|
items,
|
|
@@ -1217,7 +1217,7 @@ function WorkspaceBadge({ workspace }) {
|
|
|
1217
1217
|
ui.ShieldIcon,
|
|
1218
1218
|
{
|
|
1219
1219
|
char: workspace.name.charAt(0),
|
|
1220
|
-
workspaceColor:
|
|
1220
|
+
workspaceColor: chunkQWKT4DO6_cjs.workspaceKindColor(react.getWorkspaceKind(workspace)),
|
|
1221
1221
|
size: 16
|
|
1222
1222
|
}
|
|
1223
1223
|
),
|
|
@@ -1408,7 +1408,7 @@ function ConnectedWorkspaceNotificationMenu({
|
|
|
1408
1408
|
}, [error, notify17]);
|
|
1409
1409
|
if (!workspaceId) return null;
|
|
1410
1410
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1411
|
-
|
|
1411
|
+
chunkI45LDMQU_cjs.WorkspaceNotificationMenu,
|
|
1412
1412
|
{
|
|
1413
1413
|
...menuProps,
|
|
1414
1414
|
level,
|
|
@@ -1427,7 +1427,7 @@ function ConnectedThreadFollow({
|
|
|
1427
1427
|
enabled: live
|
|
1428
1428
|
});
|
|
1429
1429
|
if (!conversationId) return null;
|
|
1430
|
-
const Control = as === "menu-item" ?
|
|
1430
|
+
const Control = as === "menu-item" ? chunkI45LDMQU_cjs.ThreadFollowMenuItem : chunkI45LDMQU_cjs.ThreadFollowButton;
|
|
1431
1431
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1432
1432
|
Control,
|
|
1433
1433
|
{
|
|
@@ -1500,7 +1500,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
|
|
|
1500
1500
|
onChange: (e) => {
|
|
1501
1501
|
const file = e.target.files?.[0];
|
|
1502
1502
|
e.target.value = "";
|
|
1503
|
-
if (file) void add(() =>
|
|
1503
|
+
if (file) void add(() => chunkTL5VXRNT_cjs.importSkillFile(file));
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
1506
|
),
|
|
@@ -1525,7 +1525,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
|
|
|
1525
1525
|
className: "space-y-2",
|
|
1526
1526
|
onSubmit: (e) => {
|
|
1527
1527
|
e.preventDefault();
|
|
1528
|
-
if (url.trim()) void add(() =>
|
|
1528
|
+
if (url.trim()) void add(() => chunkTL5VXRNT_cjs.importSkillFromUrl(url));
|
|
1529
1529
|
},
|
|
1530
1530
|
children: [
|
|
1531
1531
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "skills-add-url", children: l.fromLink }),
|
|
@@ -1588,9 +1588,9 @@ function ConnectedSkillsLibrary({
|
|
|
1588
1588
|
const [type, setType] = React7.useState("all");
|
|
1589
1589
|
const [view, setView] = React7.useState("gallery");
|
|
1590
1590
|
const [isBusy, setIsBusy] = React7.useState(false);
|
|
1591
|
-
const all = React7.useMemo(() =>
|
|
1591
|
+
const all = React7.useMemo(() => chunkTL5VXRNT_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
|
|
1592
1592
|
const shown = React7.useMemo(
|
|
1593
|
-
() =>
|
|
1593
|
+
() => chunkTL5VXRNT_cjs.filterLibrarySkills(all, { query, source, type }),
|
|
1594
1594
|
[all, query, source, type]
|
|
1595
1595
|
);
|
|
1596
1596
|
const current2 = all.find((s) => s.slug === selected) ?? null;
|
|
@@ -1601,21 +1601,21 @@ function ConnectedSkillsLibrary({
|
|
|
1601
1601
|
const count2 = (s) => all.filter((x) => x.source === s).length;
|
|
1602
1602
|
const sourceOptions = [
|
|
1603
1603
|
{ id: "all", label: "All", count: all.length },
|
|
1604
|
-
{ id: "builtin", label:
|
|
1605
|
-
{ id: "mine", label:
|
|
1606
|
-
{ id: "shared", label:
|
|
1604
|
+
{ id: "builtin", label: chunkTL5VXRNT_cjs.SKILL_SOURCE_LABELS.builtin, count: count2("builtin") },
|
|
1605
|
+
{ id: "mine", label: chunkTL5VXRNT_cjs.SKILL_SOURCE_LABELS.mine, count: count2("mine") },
|
|
1606
|
+
{ id: "shared", label: chunkTL5VXRNT_cjs.SKILL_SOURCE_LABELS.shared, count: count2("shared") }
|
|
1607
1607
|
];
|
|
1608
1608
|
const types = [...new Set(all.map((s) => s.type))];
|
|
1609
1609
|
const typeOptions = [
|
|
1610
1610
|
{ id: "all", label: "Any kind" },
|
|
1611
|
-
...types.map((t) => ({ id: t, label:
|
|
1611
|
+
...types.map((t) => ({ id: t, label: chunkTL5VXRNT_cjs.SKILL_TYPE_LABELS[t] ?? t }))
|
|
1612
1612
|
];
|
|
1613
1613
|
const pick = (slug) => {
|
|
1614
1614
|
setSelected(slug);
|
|
1615
1615
|
setMode("detail");
|
|
1616
1616
|
};
|
|
1617
1617
|
const markdownOf = async (skill) => {
|
|
1618
|
-
if (!skill.docExtId) return
|
|
1618
|
+
if (!skill.docExtId) return chunkTL5VXRNT_cjs.workflowToSkillMarkdown(skill.workflow);
|
|
1619
1619
|
const response = await arbi.documents.download(skill.docExtId);
|
|
1620
1620
|
if (!response.ok) throw new Error(`Could not read the skill (${response.status})`);
|
|
1621
1621
|
return response.text();
|
|
@@ -1679,7 +1679,7 @@ function ConnectedSkillsLibrary({
|
|
|
1679
1679
|
try {
|
|
1680
1680
|
documentTools.downloadBlob(
|
|
1681
1681
|
new Blob([await markdownOf(skill)], { type: "text/markdown" }),
|
|
1682
|
-
|
|
1682
|
+
chunkTL5VXRNT_cjs.SKILL_MAIN_FILENAME
|
|
1683
1683
|
);
|
|
1684
1684
|
} catch (error) {
|
|
1685
1685
|
notify17(errorText(error, "Could not export the skill"), "error");
|
|
@@ -1720,10 +1720,10 @@ function ConnectedSkillsLibrary({
|
|
|
1720
1720
|
}
|
|
1721
1721
|
)
|
|
1722
1722
|
] }),
|
|
1723
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1723
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.SkillViewToggle, { value: view, onChange: setView })
|
|
1724
1724
|
] }),
|
|
1725
1725
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1726
|
-
|
|
1726
|
+
chunkTL5VXRNT_cjs.SkillFilterChips,
|
|
1727
1727
|
{
|
|
1728
1728
|
label: "Show",
|
|
1729
1729
|
value: source,
|
|
@@ -1732,7 +1732,7 @@ function ConnectedSkillsLibrary({
|
|
|
1732
1732
|
}
|
|
1733
1733
|
),
|
|
1734
1734
|
types.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1735
|
-
|
|
1735
|
+
chunkTL5VXRNT_cjs.SkillFilterChips,
|
|
1736
1736
|
{
|
|
1737
1737
|
label: "Kind",
|
|
1738
1738
|
value: type,
|
|
@@ -1779,12 +1779,12 @@ function ConnectedSkillsLibrary({
|
|
|
1779
1779
|
view === "gallery" ? "grid grid-cols-[repeat(auto-fill,minmax(9.5rem,1fr))]" : "flex flex-col"
|
|
1780
1780
|
),
|
|
1781
1781
|
children: shown.map((skill) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1782
|
-
|
|
1782
|
+
chunkTL5VXRNT_cjs.SkillTile,
|
|
1783
1783
|
{
|
|
1784
1784
|
name: skill.title,
|
|
1785
1785
|
testId: `skill-tile-${skill.slug}`,
|
|
1786
1786
|
description: skill.description,
|
|
1787
|
-
sourceLabel: skill.isShared ? `${
|
|
1787
|
+
sourceLabel: skill.isShared ? `${chunkTL5VXRNT_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunkTL5VXRNT_cjs.SKILL_SOURCE_LABELS[skill.source],
|
|
1788
1788
|
type: skill.type,
|
|
1789
1789
|
icon,
|
|
1790
1790
|
layout: view,
|
|
@@ -1819,7 +1819,7 @@ function ConnectedSkillsLibrary({
|
|
|
1819
1819
|
}
|
|
1820
1820
|
),
|
|
1821
1821
|
mode === "new" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1822
|
-
|
|
1822
|
+
chunkTL5VXRNT_cjs.SkillGenerateForm,
|
|
1823
1823
|
{
|
|
1824
1824
|
icon,
|
|
1825
1825
|
onGenerate: (desc) => {
|
|
@@ -1846,11 +1846,11 @@ function ConnectedSkillsLibrary({
|
|
|
1846
1846
|
),
|
|
1847
1847
|
mode === "add" && /* @__PURE__ */ jsxRuntime.jsx(ConnectedSkillUpload, { onDone: done }),
|
|
1848
1848
|
mode === "detail" && current2 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1849
|
-
|
|
1849
|
+
chunkTL5VXRNT_cjs.SkillLibraryDetail,
|
|
1850
1850
|
{
|
|
1851
1851
|
skill: current2,
|
|
1852
1852
|
icon,
|
|
1853
|
-
instructions: current2.docExtId ? currentText ?
|
|
1853
|
+
instructions: current2.docExtId ? currentText ? chunkTL5VXRNT_cjs.parseSkillFrontmatter(currentText, chunkTL5VXRNT_cjs.SKILL_MAIN_FILENAME).content : "" : current2.workflow.run.kind === "prompt" ? current2.workflow.run.promptTemplate : "",
|
|
1854
1854
|
isLoading: !!current2.docExtId && textLoading,
|
|
1855
1855
|
actions: {
|
|
1856
1856
|
onRun: () => onRun(current2.slug),
|
|
@@ -1885,7 +1885,7 @@ function SkillEditor({
|
|
|
1885
1885
|
const [seeded, setSeeded] = React7.useState(!isEditing);
|
|
1886
1886
|
const [nameError, setNameError] = React7.useState(null);
|
|
1887
1887
|
if (isEditing && !seeded && text2 !== void 0) {
|
|
1888
|
-
const parsed =
|
|
1888
|
+
const parsed = chunkTL5VXRNT_cjs.parseSkillFrontmatter(text2, chunkTL5VXRNT_cjs.SKILL_MAIN_FILENAME);
|
|
1889
1889
|
setDescription(parsed.description ?? "");
|
|
1890
1890
|
setBody(parsed.content ?? "");
|
|
1891
1891
|
setSeeded(true);
|
|
@@ -1899,15 +1899,15 @@ function SkillEditor({
|
|
|
1899
1899
|
notify17("Add a short description.", "error");
|
|
1900
1900
|
return;
|
|
1901
1901
|
}
|
|
1902
|
-
const slug =
|
|
1902
|
+
const slug = chunkTL5VXRNT_cjs.skillSlug(name);
|
|
1903
1903
|
try {
|
|
1904
|
-
await onSave(slug,
|
|
1904
|
+
await onSave(slug, chunkTL5VXRNT_cjs.serializeSkill({ name: slug, description, body }), isEditing);
|
|
1905
1905
|
} catch (err) {
|
|
1906
1906
|
notify17(errorText(err, "Could not save the skill"), "error");
|
|
1907
1907
|
}
|
|
1908
1908
|
};
|
|
1909
1909
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1910
|
-
|
|
1910
|
+
chunkTL5VXRNT_cjs.SkillEditForm,
|
|
1911
1911
|
{
|
|
1912
1912
|
name,
|
|
1913
1913
|
onNameChange: setName,
|
|
@@ -1943,9 +1943,9 @@ function ConnectedAgentCreator({
|
|
|
1943
1943
|
agent,
|
|
1944
1944
|
initialName,
|
|
1945
1945
|
onSaved,
|
|
1946
|
-
capabilities =
|
|
1947
|
-
templates =
|
|
1948
|
-
types =
|
|
1946
|
+
capabilities = chunkTL5VXRNT_cjs.DEFAULT_AGENT_CAPABILITIES,
|
|
1947
|
+
templates = chunkTL5VXRNT_cjs.DEFAULT_AGENT_TEMPLATES,
|
|
1948
|
+
types = chunkTL5VXRNT_cjs.DEFAULT_AGENT_TYPES,
|
|
1949
1949
|
canRevokeWorkspaces = false,
|
|
1950
1950
|
labels
|
|
1951
1951
|
}) {
|
|
@@ -1987,7 +1987,7 @@ function ConnectedAgentCreator({
|
|
|
1987
1987
|
const initialValues = React7.useMemo(
|
|
1988
1988
|
() => ({
|
|
1989
1989
|
name: agent?.given_name ?? initialName ?? "",
|
|
1990
|
-
persona: isEdit ?
|
|
1990
|
+
persona: isEdit ? chunkTL5VXRNT_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
|
|
1991
1991
|
modelName: String(agents.AGENT_MODEL_NAME ?? ""),
|
|
1992
1992
|
capabilities: Object.fromEntries(capabilities.map(({ key }) => [key, Boolean(agents[key])])),
|
|
1993
1993
|
type: "builtin",
|
|
@@ -2006,7 +2006,7 @@ function ConnectedAgentCreator({
|
|
|
2006
2006
|
try {
|
|
2007
2007
|
let agentExtId = agent?.external_id ?? early?.id ?? "";
|
|
2008
2008
|
if (!agentExtId) {
|
|
2009
|
-
if (!
|
|
2009
|
+
if (!chunkTL5VXRNT_cjs.isValidAgentName(values.name)) {
|
|
2010
2010
|
notify17("Give the agent a name first.", "error");
|
|
2011
2011
|
return;
|
|
2012
2012
|
}
|
|
@@ -2042,7 +2042,7 @@ function ConnectedAgentCreator({
|
|
|
2042
2042
|
title: `agent-${name}`,
|
|
2043
2043
|
sections: {
|
|
2044
2044
|
Agents: {
|
|
2045
|
-
PERSONA:
|
|
2045
|
+
PERSONA: chunkTL5VXRNT_cjs.composePersona(name, values.persona),
|
|
2046
2046
|
...values.modelName ? { AGENT_MODEL_NAME: values.modelName } : {},
|
|
2047
2047
|
...Object.fromEntries(capabilities.map(({ key }) => [key, !!values.capabilities[key]])),
|
|
2048
2048
|
ENABLED_SKILLS: values.capabilities.SKILLS_ENABLED && skills.length ? skills : null,
|
|
@@ -2065,7 +2065,7 @@ function ConnectedAgentCreator({
|
|
|
2065
2065
|
};
|
|
2066
2066
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2067
2067
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2068
|
-
|
|
2068
|
+
chunkTL5VXRNT_cjs.AgentCreator,
|
|
2069
2069
|
{
|
|
2070
2070
|
open: ready,
|
|
2071
2071
|
onOpenChange,
|
|
@@ -2081,11 +2081,11 @@ function ConnectedAgentCreator({
|
|
|
2081
2081
|
) : void 0,
|
|
2082
2082
|
revokingWorkspaceId: revokeAccess.isPending ? revokeAccess.variables?.workspaceId : void 0,
|
|
2083
2083
|
avatar: (values) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2084
|
-
|
|
2084
|
+
chunkTL5VXRNT_cjs.AgentAvatarField,
|
|
2085
2085
|
{
|
|
2086
2086
|
picture,
|
|
2087
2087
|
isBusy: avatarBusy,
|
|
2088
|
-
canGenerate: isEdit ||
|
|
2088
|
+
canGenerate: isEdit || chunkTL5VXRNT_cjs.isValidAgentName(values.name),
|
|
2089
2089
|
onGenerate: () => handleGenerateAvatar(values)
|
|
2090
2090
|
}
|
|
2091
2091
|
),
|
|
@@ -2137,7 +2137,7 @@ function ConnectedAgentCreator({
|
|
|
2137
2137
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: "Connect your agent" }),
|
|
2138
2138
|
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { children: "This key is shown once. Run the script on the machine that will host the agent." })
|
|
2139
2139
|
] }),
|
|
2140
|
-
connect && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2140
|
+
connect && /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
|
|
2141
2141
|
]
|
|
2142
2142
|
}
|
|
2143
2143
|
) })
|
|
@@ -2174,7 +2174,7 @@ function ConnectedWorkflowHistory({
|
|
|
2174
2174
|
const { openConversation } = chunkAHYSHKPL_cjs.useBlocksEnvironment();
|
|
2175
2175
|
const { data: runs = [], isLoading } = react.useWorkflowRuns(workflow?.external_id);
|
|
2176
2176
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2177
|
-
|
|
2177
|
+
chunkTL5VXRNT_cjs.TaskRunsDialog,
|
|
2178
2178
|
{
|
|
2179
2179
|
inline,
|
|
2180
2180
|
hideHeader,
|
|
@@ -2210,14 +2210,14 @@ function ConnectedTaskActivityDialog({
|
|
|
2210
2210
|
const activity = react.useConversationActivity(conversationId, { live });
|
|
2211
2211
|
const { data: agents = [] } = react.useAgents();
|
|
2212
2212
|
const { userId } = chunkNZCAWWV4_cjs.useConnectedWorkspace();
|
|
2213
|
-
const { members } =
|
|
2213
|
+
const { members } = chunkSQQULKT4_cjs.useConnectedWorkspaceRole();
|
|
2214
2214
|
const renderPerson = React7.useCallback(
|
|
2215
2215
|
(id) => {
|
|
2216
2216
|
const isMe = !!id && id === userId;
|
|
2217
2217
|
const member = members.find((m) => m.user.external_id === id)?.user;
|
|
2218
2218
|
const name = member && [member.given_name, member.family_name].filter(Boolean).join(" ") || member?.email;
|
|
2219
2219
|
const person = { id, label: isMe ? "You" : name || "Someone", isMe };
|
|
2220
|
-
return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2220
|
+
return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(chunkF5T4R7CN_cjs.PersonPill, { person });
|
|
2221
2221
|
},
|
|
2222
2222
|
[renderTaskPerson, userId, members]
|
|
2223
2223
|
);
|
|
@@ -2226,7 +2226,7 @@ function ConnectedTaskActivityDialog({
|
|
|
2226
2226
|
[agents]
|
|
2227
2227
|
);
|
|
2228
2228
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2229
|
-
|
|
2229
|
+
chunkTL5VXRNT_cjs.TaskActivityDialog,
|
|
2230
2230
|
{
|
|
2231
2231
|
open: true,
|
|
2232
2232
|
onOpenChange: (open) => !open && onClose(),
|
|
@@ -2372,7 +2372,7 @@ function useWorkflowThread(workflow, options2 = {}) {
|
|
|
2372
2372
|
);
|
|
2373
2373
|
const conversation = conversations.data?.find((c) => c.external_id === threadId);
|
|
2374
2374
|
const steps = React7.useMemo(
|
|
2375
|
-
() => chunkEZLZ3MDU_cjs.workflowSteps(workflow).length > 0 ? chunkEZLZ3MDU_cjs.workflowSteps(workflow) :
|
|
2375
|
+
() => chunkEZLZ3MDU_cjs.workflowSteps(workflow).length > 0 ? chunkEZLZ3MDU_cjs.workflowSteps(workflow) : chunkTL5VXRNT_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
|
|
2376
2376
|
[workflow, conversation?.plan?.steps]
|
|
2377
2377
|
);
|
|
2378
2378
|
const activity = react.useConversationActivity(threadId, { live: !!threadId });
|
|
@@ -2432,7 +2432,7 @@ function useWorkflowThread(workflow, options2 = {}) {
|
|
|
2432
2432
|
criteria: [],
|
|
2433
2433
|
max_passes: 3,
|
|
2434
2434
|
documents: [],
|
|
2435
|
-
steps:
|
|
2435
|
+
steps: chunkTL5VXRNT_cjs.toPlanSteps(workflow, {
|
|
2436
2436
|
inputs: values,
|
|
2437
2437
|
resolveWorkflow: options2.resolveWorkflow,
|
|
2438
2438
|
compose: options2.compose
|
|
@@ -2519,7 +2519,7 @@ function useWorkflowThread(workflow, options2 = {}) {
|
|
|
2519
2519
|
const anyRunning = Object.values(states).some((s) => s.status === "running");
|
|
2520
2520
|
const needsStart = !threadId || idle && !anyRunning;
|
|
2521
2521
|
const runError = idle ? conversation?.last_error ?? null : null;
|
|
2522
|
-
const view =
|
|
2522
|
+
const view = chunkTL5VXRNT_cjs.useWorkflowView({
|
|
2523
2523
|
steps,
|
|
2524
2524
|
states,
|
|
2525
2525
|
inputs,
|
|
@@ -2685,7 +2685,7 @@ function WorkflowWordDialog({
|
|
|
2685
2685
|
title: title ?? labels.wordTitle,
|
|
2686
2686
|
size: "xl",
|
|
2687
2687
|
testId: "workflow-word-dialog",
|
|
2688
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2688
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkSQQULKT4_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
|
|
2689
2689
|
}
|
|
2690
2690
|
);
|
|
2691
2691
|
}
|
|
@@ -3007,7 +3007,7 @@ function ConnectedWorkflowRunner({
|
|
|
3007
3007
|
);
|
|
3008
3008
|
};
|
|
3009
3009
|
const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3010
|
-
|
|
3010
|
+
chunkTL5VXRNT_cjs.WorkflowRunner,
|
|
3011
3011
|
{
|
|
3012
3012
|
people,
|
|
3013
3013
|
...runnerProps,
|
|
@@ -3053,7 +3053,7 @@ function ConnectedWorkflowRunner({
|
|
|
3053
3053
|
) }),
|
|
3054
3054
|
inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3055
3055
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3056
|
-
|
|
3056
|
+
chunkTL5VXRNT_cjs.WorkflowStepBar,
|
|
3057
3057
|
{
|
|
3058
3058
|
run: view,
|
|
3059
3059
|
levels: chunkEZLZ3MDU_cjs.stepLevels(view.steps),
|
|
@@ -3344,7 +3344,7 @@ function ConnectedTagTable({
|
|
|
3344
3344
|
const fail = (fallback) => (e) => notify17(browser.refusalReason(e, fallback), "error");
|
|
3345
3345
|
const snapshot3 = (data) => {
|
|
3346
3346
|
const title = exportTitle ?? ui.tagKindTitle(kind, { plural: true });
|
|
3347
|
-
const bytes =
|
|
3347
|
+
const bytes = chunkI45LDMQU_cjs.tagTableDocx(data, {
|
|
3348
3348
|
title,
|
|
3349
3349
|
nameOf: (id) => people.find((p) => p.value === id)?.label
|
|
3350
3350
|
});
|
|
@@ -3353,7 +3353,7 @@ function ConnectedTagTable({
|
|
|
3353
3353
|
return { blob: new Blob([bytes], { type: chunkJIOHDVWH_cjs.DOCX_MIME_TYPE }), name };
|
|
3354
3354
|
};
|
|
3355
3355
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3356
|
-
|
|
3356
|
+
chunkI45LDMQU_cjs.TagTable,
|
|
3357
3357
|
{
|
|
3358
3358
|
...props,
|
|
3359
3359
|
table,
|
|
@@ -3394,7 +3394,7 @@ function DocTagPassages({ docId, tagId, label, docOf, testId }) {
|
|
|
3394
3394
|
const [open, setOpen] = React7.useState(false);
|
|
3395
3395
|
const doctag = docOf(docId)?.doctags?.find((dt) => dt.tag_ext_id === tagId);
|
|
3396
3396
|
const citations = React7.useMemo(
|
|
3397
|
-
() =>
|
|
3397
|
+
() => chunkYD3RN2FY_cjs.toFactCitations(doctag?.citations) ?? [],
|
|
3398
3398
|
[doctag?.citations]
|
|
3399
3399
|
);
|
|
3400
3400
|
const { quoteFor, orderOf } = react.usePassageQuotes(
|
|
@@ -3403,7 +3403,7 @@ function DocTagPassages({ docId, tagId, label, docOf, testId }) {
|
|
|
3403
3403
|
const { openDocument } = chunkAHYSHKPL_cjs.useBlocksEnvironment();
|
|
3404
3404
|
const viewingPassageId = react.useArbiSessionState((s) => s.viewingDocument?.passageId ?? null);
|
|
3405
3405
|
const id = testId ?? `doctag-passages-${docId}`;
|
|
3406
|
-
const refOf = (cited) =>
|
|
3406
|
+
const refOf = (cited) => chunkYD3RN2FY_cjs.citedVersionRef(cited.doc_ext_id, cited.version, docOf(cited.doc_ext_id)?.current_version);
|
|
3407
3407
|
const ordered = (cited) => [...cited.chunks].sort((a, b) => {
|
|
3408
3408
|
const oa = orderOf(a.chunk_id);
|
|
3409
3409
|
const ob = orderOf(b.chunk_id);
|
|
@@ -3434,7 +3434,7 @@ function DocTagPassages({ docId, tagId, label, docOf, testId }) {
|
|
|
3434
3434
|
const doc = docOf(cited.doc_ext_id);
|
|
3435
3435
|
const passages = ordered(cited);
|
|
3436
3436
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3437
|
-
|
|
3437
|
+
chunkYD3RN2FY_cjs.FactSourceGroup,
|
|
3438
3438
|
{
|
|
3439
3439
|
docId: cited.doc_ext_id,
|
|
3440
3440
|
hasPassages: passages.length > 0,
|
|
@@ -3491,9 +3491,9 @@ function GlossaryExport({ labelId, nameOf }) {
|
|
|
3491
3491
|
const narrowed = agreements.find((a) => a.id === narrowTo);
|
|
3492
3492
|
const title = narrowed ? `Glossary - ${narrowed.name}` : "Glossary";
|
|
3493
3493
|
const download = (format) => {
|
|
3494
|
-
const entries =
|
|
3495
|
-
const blob = format === "docx" ? new Blob([
|
|
3496
|
-
documentTools.downloadBlob(blob,
|
|
3494
|
+
const entries = chunkI45LDMQU_cjs.glossaryEntries(sources, { labelId: narrowed?.id });
|
|
3495
|
+
const blob = format === "docx" ? new Blob([chunkI45LDMQU_cjs.glossaryDocx(entries, { title })], { type: chunkJIOHDVWH_cjs.DOCX_MIME_TYPE }) : new Blob([chunkI45LDMQU_cjs.glossaryMarkdown(entries, { title })], { type: "text/markdown" });
|
|
3496
|
+
documentTools.downloadBlob(blob, chunkI45LDMQU_cjs.glossaryFileName(title, format));
|
|
3497
3497
|
};
|
|
3498
3498
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", "data-testid": "tags-glossary", children: [
|
|
3499
3499
|
agreements.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -4279,7 +4279,7 @@ var DocumentSharedCell = React7.memo(function DocumentSharedCell2({
|
|
|
4279
4279
|
[document2.external_id, onToggle]
|
|
4280
4280
|
);
|
|
4281
4281
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4282
|
-
|
|
4282
|
+
chunkI45LDMQU_cjs.SharedCell,
|
|
4283
4283
|
{
|
|
4284
4284
|
item: document2,
|
|
4285
4285
|
onToggle: handleToggle,
|
|
@@ -4990,7 +4990,7 @@ function KindSection({
|
|
|
4990
4990
|
{
|
|
4991
4991
|
testId: `tags-kind-${kind}`,
|
|
4992
4992
|
title: ui.tagKindTitle(kind, { plural: true }),
|
|
4993
|
-
description:
|
|
4993
|
+
description: chunkI45LDMQU_cjs.tagKindDescription(kind),
|
|
4994
4994
|
actions: picker,
|
|
4995
4995
|
children: [
|
|
4996
4996
|
browser.isEntityTag({ kind }) && extractingCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -5001,9 +5001,9 @@ function KindSection({
|
|
|
5001
5001
|
children: [
|
|
5002
5002
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }),
|
|
5003
5003
|
"Extracting ",
|
|
5004
|
-
|
|
5004
|
+
chunkI45LDMQU_cjs.entitiesPhrase().toLowerCase(),
|
|
5005
5005
|
" from ",
|
|
5006
|
-
|
|
5006
|
+
chunkI45LDMQU_cjs.documentCount(extractingCount),
|
|
5007
5007
|
"\u2026"
|
|
5008
5008
|
]
|
|
5009
5009
|
}
|
|
@@ -5021,7 +5021,7 @@ function KindSection({
|
|
|
5021
5021
|
onOpenDocument: (id) => openDocument(id),
|
|
5022
5022
|
onOpenFact: ctx.onOpenFact,
|
|
5023
5023
|
onOpenThread: (id) => openConversation(id),
|
|
5024
|
-
labels:
|
|
5024
|
+
labels: chunkI45LDMQU_cjs.tagTableLabels(kind),
|
|
5025
5025
|
testId: `tags-table-${kind}`
|
|
5026
5026
|
}
|
|
5027
5027
|
)
|
|
@@ -5123,12 +5123,12 @@ function TagSection({
|
|
|
5123
5123
|
onOpenDocument: (id) => openDocument(id),
|
|
5124
5124
|
onOpenFact: ctx.onOpenFact,
|
|
5125
5125
|
onOpenThread: (id) => openConversation(id),
|
|
5126
|
-
labels:
|
|
5126
|
+
labels: chunkI45LDMQU_cjs.tagTableLabels(tag.kind),
|
|
5127
5127
|
testId: "tags-rows"
|
|
5128
5128
|
}
|
|
5129
5129
|
),
|
|
5130
5130
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5131
|
-
|
|
5131
|
+
chunkI45LDMQU_cjs.TagDetail,
|
|
5132
5132
|
{
|
|
5133
5133
|
row: detailRow && narrowTagRow(detailRow, ctx.filter.matches),
|
|
5134
5134
|
fields: schema.data?.fields ?? [],
|
|
@@ -5140,10 +5140,10 @@ function TagSection({
|
|
|
5140
5140
|
onOpenDocument: (id) => openDocument(id),
|
|
5141
5141
|
onOpenFact: ctx.onOpenFact,
|
|
5142
5142
|
onOpenThread: (id) => openConversation(id),
|
|
5143
|
-
noteLabel:
|
|
5143
|
+
noteLabel: chunkI45LDMQU_cjs.tagNoteLabel(tag.kind),
|
|
5144
5144
|
noteIsValue: tag.kind === "annotation",
|
|
5145
5145
|
renderPassages: (d, label) => renderPassages(d.doc_ext_id, label),
|
|
5146
|
-
labels:
|
|
5146
|
+
labels: chunkI45LDMQU_cjs.tagDetailLabels(),
|
|
5147
5147
|
testId: "tags-detail"
|
|
5148
5148
|
}
|
|
5149
5149
|
)
|
|
@@ -5231,7 +5231,7 @@ function ConnectedTagsPage({
|
|
|
5231
5231
|
const onDelete = async (t) => {
|
|
5232
5232
|
const nested = browser.getChildTags([...tags], t.external_id);
|
|
5233
5233
|
const uses = browser.tagUseCount(t);
|
|
5234
|
-
const n2 =
|
|
5234
|
+
const n2 = chunkI45LDMQU_cjs.tagsPageNouns();
|
|
5235
5235
|
const tagNoun = (count2) => (count2 === 1 ? n2.tag : n2.tags).toLowerCase();
|
|
5236
5236
|
const carriers = uses === 1 ? `${n2.document}, ${n2.fact} or ${n2.thread}` : `${n2.documents}, ${n2.facts} and ${n2.threads}`;
|
|
5237
5237
|
const message = `Delete ${ui.tagKindNouns(t.kind).singular} "${t.name}"?` + (uses > 0 ? `
|
|
@@ -5252,16 +5252,16 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
5252
5252
|
try {
|
|
5253
5253
|
await extract.mutateAsync(docIds);
|
|
5254
5254
|
notify17(
|
|
5255
|
-
`Extracting ${
|
|
5255
|
+
`Extracting ${chunkI45LDMQU_cjs.entitiesPhrase().toLowerCase()} from ${chunkI45LDMQU_cjs.documentCount(docIds.length)}. You will be notified when it is done.`,
|
|
5256
5256
|
"info"
|
|
5257
5257
|
);
|
|
5258
5258
|
} catch (error) {
|
|
5259
|
-
notify17(browser.refusalReason(error, `Could not extract ${
|
|
5259
|
+
notify17(browser.refusalReason(error, `Could not extract ${chunkI45LDMQU_cjs.entitiesPhrase().toLowerCase()}`), "error");
|
|
5260
5260
|
throw error;
|
|
5261
5261
|
}
|
|
5262
5262
|
};
|
|
5263
5263
|
const picker = /* @__PURE__ */ jsxRuntime.jsx(
|
|
5264
|
-
|
|
5264
|
+
chunkI45LDMQU_cjs.TagPicker,
|
|
5265
5265
|
{
|
|
5266
5266
|
tags: viewTags,
|
|
5267
5267
|
selectedId: tag?.external_id,
|
|
@@ -5275,10 +5275,10 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
5275
5275
|
onOpenTag: openTag,
|
|
5276
5276
|
onOpenFact
|
|
5277
5277
|
};
|
|
5278
|
-
const n =
|
|
5278
|
+
const n = chunkI45LDMQU_cjs.tagsPageNouns();
|
|
5279
5279
|
const action = view === "person" || view === "organisation" ? {
|
|
5280
5280
|
label: "Extract",
|
|
5281
|
-
title: `Extract ${
|
|
5281
|
+
title: `Extract ${chunkI45LDMQU_cjs.entitiesPhrase().toLowerCase()} from ${n.documents.toLowerCase()}`,
|
|
5282
5282
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "h-4 w-4" }),
|
|
5283
5283
|
run: () => setExtracting(true),
|
|
5284
5284
|
testId: "tags-extract-entities"
|
|
@@ -5428,7 +5428,7 @@ ${nested.length} nested ${tagNoun(nested.length)} ${nested.length === 1 ? "moves
|
|
|
5428
5428
|
}
|
|
5429
5429
|
),
|
|
5430
5430
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5431
|
-
|
|
5431
|
+
chunkI45LDMQU_cjs.ExtractEntitiesDialog,
|
|
5432
5432
|
{
|
|
5433
5433
|
open: extracting,
|
|
5434
5434
|
onOpenChange: setExtracting,
|
|
@@ -5489,7 +5489,7 @@ function FactSourcesPopover({
|
|
|
5489
5489
|
reset();
|
|
5490
5490
|
}
|
|
5491
5491
|
};
|
|
5492
|
-
const refOf = (docId) =>
|
|
5492
|
+
const refOf = (docId) => chunkYD3RN2FY_cjs.citedVersionRef(
|
|
5493
5493
|
docId,
|
|
5494
5494
|
citations.find((d) => d.doc_ext_id === docId)?.version,
|
|
5495
5495
|
citedDocs?.[docId]?.current_version
|
|
@@ -5519,7 +5519,7 @@ function FactSourcesPopover({
|
|
|
5519
5519
|
const olderVersion = refOf(docId) !== docId ? refOf(docId).split("@v")[1] : null;
|
|
5520
5520
|
const cited = passagesOf(docId);
|
|
5521
5521
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5522
|
-
|
|
5522
|
+
chunkYD3RN2FY_cjs.FactSourceGroup,
|
|
5523
5523
|
{
|
|
5524
5524
|
docId,
|
|
5525
5525
|
isViewing,
|
|
@@ -5588,8 +5588,8 @@ function FactMarkdownEditor({
|
|
|
5588
5588
|
citationContainer,
|
|
5589
5589
|
"data-testid": dataTestId
|
|
5590
5590
|
}) {
|
|
5591
|
-
const sources = React7.useMemo(() =>
|
|
5592
|
-
const docIds =
|
|
5591
|
+
const sources = React7.useMemo(() => chunkYD3RN2FY_cjs.toFactCitations(citations) ?? [], [citations]);
|
|
5592
|
+
const docIds = chunkYD3RN2FY_cjs.docIdsOf(sources);
|
|
5593
5593
|
const hasSources = docIds.length > 0;
|
|
5594
5594
|
const { quoteFor, orderOf } = react.usePassageQuotes(
|
|
5595
5595
|
React7.useMemo(() => sources.filter((d) => d.chunks.length > 0).map((d) => d.doc_ext_id), [sources])
|
|
@@ -5608,7 +5608,7 @@ function FactMarkdownEditor({
|
|
|
5608
5608
|
const editorRef = React7.useRef(null);
|
|
5609
5609
|
React7.useEffect(() => {
|
|
5610
5610
|
if (!editorRef.current) return;
|
|
5611
|
-
return
|
|
5611
|
+
return chunkYD3RN2FY_cjs.enableFactTableColumnResize(editorRef.current);
|
|
5612
5612
|
}, []);
|
|
5613
5613
|
React7.useEffect(() => {
|
|
5614
5614
|
if (!editing) return;
|
|
@@ -5623,14 +5623,14 @@ function FactMarkdownEditor({
|
|
|
5623
5623
|
return () => document.removeEventListener("pointerdown", onPointerDown, true);
|
|
5624
5624
|
}, [editing]);
|
|
5625
5625
|
const removeDoc = (docExtId) => {
|
|
5626
|
-
const remaining =
|
|
5626
|
+
const remaining = chunkYD3RN2FY_cjs.withoutDoc(sources, docExtId);
|
|
5627
5627
|
if (!remaining) setSourcesOpen(false);
|
|
5628
5628
|
onChange(value, remaining);
|
|
5629
5629
|
};
|
|
5630
5630
|
const citeDocument = (docExtId) => onCiteDocument(docExtId, { toggle: false });
|
|
5631
5631
|
const handleToggleDoc = (docExtId) => {
|
|
5632
5632
|
if (docIds.includes(docExtId)) removeDoc(docExtId);
|
|
5633
|
-
else onChange(value,
|
|
5633
|
+
else onChange(value, chunkYD3RN2FY_cjs.withDoc(sources, docExtId));
|
|
5634
5634
|
};
|
|
5635
5635
|
const expandToggle = /* @__PURE__ */ jsxRuntime.jsx(
|
|
5636
5636
|
"button",
|
|
@@ -5849,7 +5849,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
5849
5849
|
const [composing, setComposing] = React7.useState(false);
|
|
5850
5850
|
const [draft, setDraft] = React7.useState("");
|
|
5851
5851
|
const [baselineText, setBaselineText] = React7.useState("");
|
|
5852
|
-
const [draftDateFields, setDraftDateFields] = React7.useState(
|
|
5852
|
+
const [draftDateFields, setDraftDateFields] = React7.useState(chunkYD3RN2FY_cjs.EMPTY_FACT_DATE_FIELDS);
|
|
5853
5853
|
const [composerError, setComposerError] = React7.useState(null);
|
|
5854
5854
|
const [editingId, setEditingId] = React7.useState(null);
|
|
5855
5855
|
const [draftShared, setDraftShared] = React7.useState(false);
|
|
@@ -5906,9 +5906,9 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
5906
5906
|
if (!collector || !picked?.length || !collectingFor || !docBeingCollected) return;
|
|
5907
5907
|
const docExtId = docBeingCollected;
|
|
5908
5908
|
const apply = (prev) => {
|
|
5909
|
-
let next =
|
|
5909
|
+
let next = chunkYD3RN2FY_cjs.toFactCitations(prev);
|
|
5910
5910
|
for (const pending of picked) {
|
|
5911
|
-
next =
|
|
5911
|
+
next = chunkYD3RN2FY_cjs.withChunk(next, docExtId, { chunk_id: pending.chunk_id, page: pending.page ?? null });
|
|
5912
5912
|
}
|
|
5913
5913
|
return next ?? [];
|
|
5914
5914
|
};
|
|
@@ -5919,8 +5919,8 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
5919
5919
|
React7.useEffect(() => {
|
|
5920
5920
|
if (!collector || !unpicked?.length || !collectingFor) return;
|
|
5921
5921
|
setDraftCitations((prev) => {
|
|
5922
|
-
let next =
|
|
5923
|
-
for (const chunkId of unpicked) next =
|
|
5922
|
+
let next = chunkYD3RN2FY_cjs.toFactCitations(prev);
|
|
5923
|
+
for (const chunkId of unpicked) next = chunkYD3RN2FY_cjs.withoutChunk(next, chunkId);
|
|
5924
5924
|
return next;
|
|
5925
5925
|
});
|
|
5926
5926
|
collector.consumeUnpicked();
|
|
@@ -5930,7 +5930,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
5930
5930
|
setBaselineText("");
|
|
5931
5931
|
setDraftCitations(null);
|
|
5932
5932
|
setDraftTagIds([]);
|
|
5933
|
-
setDraftDateFields(
|
|
5933
|
+
setDraftDateFields(chunkYD3RN2FY_cjs.EMPTY_FACT_DATE_FIELDS);
|
|
5934
5934
|
setDraftShared(false);
|
|
5935
5935
|
setDraftConfirmed(true);
|
|
5936
5936
|
setComposerError(null);
|
|
@@ -5944,7 +5944,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
5944
5944
|
setBaselineText("");
|
|
5945
5945
|
setDraftCitations(null);
|
|
5946
5946
|
setDraftTagIds([]);
|
|
5947
|
-
setDraftDateFields(
|
|
5947
|
+
setDraftDateFields(chunkYD3RN2FY_cjs.EMPTY_FACT_DATE_FIELDS);
|
|
5948
5948
|
setDraftShared(false);
|
|
5949
5949
|
setDraftConfirmed(true);
|
|
5950
5950
|
setComposerError(null);
|
|
@@ -5955,7 +5955,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
5955
5955
|
const content = chunkRC25WMVB_cjs.decodeWhitespaceEntities(draft).trim();
|
|
5956
5956
|
if (!content) return;
|
|
5957
5957
|
setComposerError(null);
|
|
5958
|
-
const span =
|
|
5958
|
+
const span = chunkYD3RN2FY_cjs.factDateFieldsToSpan(draftDateFields);
|
|
5959
5959
|
try {
|
|
5960
5960
|
let saved;
|
|
5961
5961
|
if (editingId) {
|
|
@@ -5993,7 +5993,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
5993
5993
|
setBaselineText(draft);
|
|
5994
5994
|
setDraftCitations(saved.citations ?? null);
|
|
5995
5995
|
setDraftTagIds(saved.tags.map((t) => t.tag_ext_id));
|
|
5996
|
-
setDraftDateFields(
|
|
5996
|
+
setDraftDateFields(chunkYD3RN2FY_cjs.factDateSpanToFields(saved.date_start, saved.date_end, saved.timezone));
|
|
5997
5997
|
setDraftShared(saved.shared ?? false);
|
|
5998
5998
|
setDraftConfirmed(saved.confirmed ?? true);
|
|
5999
5999
|
}
|
|
@@ -6018,7 +6018,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
6018
6018
|
setBaselineText(m.text);
|
|
6019
6019
|
setDraftCitations(m.citations ?? null);
|
|
6020
6020
|
setDraftTagIds(m.tags.map((t) => t.tag_ext_id));
|
|
6021
|
-
setDraftDateFields(
|
|
6021
|
+
setDraftDateFields(chunkYD3RN2FY_cjs.factDateSpanToFields(m.date_start, m.date_end, m.timezone));
|
|
6022
6022
|
setDraftShared(m.shared ?? false);
|
|
6023
6023
|
setDraftConfirmed(m.confirmed ?? true);
|
|
6024
6024
|
setComposerError(null);
|
|
@@ -6032,7 +6032,7 @@ function useFactComposer(notes, remove, gridApiRef, collector, composeRequested,
|
|
|
6032
6032
|
const textChanged = draft.trim() !== baselineText.trim();
|
|
6033
6033
|
const citationsChanged = JSON.stringify(draftCitations ?? null) !== JSON.stringify(f.citations ?? null);
|
|
6034
6034
|
const tagsChanged = JSON.stringify([...draftTagIds].sort()) !== JSON.stringify(f.tags.map((t) => t.tag_ext_id).sort());
|
|
6035
|
-
const dateChanged = JSON.stringify(draftDateFields) !== JSON.stringify(
|
|
6035
|
+
const dateChanged = JSON.stringify(draftDateFields) !== JSON.stringify(chunkYD3RN2FY_cjs.factDateSpanToFields(f.date_start, f.date_end, f.timezone));
|
|
6036
6036
|
const sharedChanged = draftShared !== (f.shared ?? false);
|
|
6037
6037
|
const confirmedChanged = draftConfirmed !== (f.confirmed ?? true);
|
|
6038
6038
|
return textChanged || citationsChanged || tagsChanged || dateChanged || sharedChanged || confirmedChanged;
|
|
@@ -6206,7 +6206,7 @@ function useFactFilters(notes, view, chat) {
|
|
|
6206
6206
|
const makeTagPicker = React7.useCallback(
|
|
6207
6207
|
(selected, setSelected, opts) => {
|
|
6208
6208
|
const applied = new Set(selected);
|
|
6209
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6209
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkYD3RN2FY_cjs.FactFieldRow, { label: "Labels", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6210
6210
|
chunkHT62K3UO_cjs.FieldLabelsSelect,
|
|
6211
6211
|
{
|
|
6212
6212
|
options: labelOptions,
|
|
@@ -6397,14 +6397,14 @@ function useFactSelection(notes, gridApiRef, setFactTags, chat) {
|
|
|
6397
6397
|
}
|
|
6398
6398
|
function renderSourcesCell(params) {
|
|
6399
6399
|
const fact = params.data;
|
|
6400
|
-
const count2 =
|
|
6400
|
+
const count2 = chunkYD3RN2FY_cjs.sourceDocCount(fact);
|
|
6401
6401
|
if (!fact || count2 === 0) return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/40", children: "\u2014" });
|
|
6402
6402
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6403
6403
|
"button",
|
|
6404
6404
|
{
|
|
6405
6405
|
type: "button",
|
|
6406
6406
|
onClick: () => params.context?.openEdit?.(fact),
|
|
6407
|
-
title:
|
|
6407
|
+
title: chunkYD3RN2FY_cjs.DEFAULT_FACT_COLUMN_LABELS.sourcedFrom(count2),
|
|
6408
6408
|
"data-testid": `facts-grid-sources-${fact.external_id}`,
|
|
6409
6409
|
className: "inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",
|
|
6410
6410
|
children: [
|
|
@@ -6461,14 +6461,14 @@ function createFactPageColumns({
|
|
|
6461
6461
|
onToggleConfirmed,
|
|
6462
6462
|
onToggleShared
|
|
6463
6463
|
}) {
|
|
6464
|
-
const columns =
|
|
6464
|
+
const columns = chunkYD3RN2FY_cjs.createFactColumns({
|
|
6465
6465
|
onToggleInChat,
|
|
6466
6466
|
isInChat,
|
|
6467
6467
|
renderHeader: (params, colId) => /* @__PURE__ */ jsxRuntime.jsx(FactHeader, { params, colId }),
|
|
6468
6468
|
renderRowActions: (fact, params) => {
|
|
6469
6469
|
const ctx = params.context;
|
|
6470
6470
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6471
|
-
|
|
6471
|
+
chunkYD3RN2FY_cjs.FactRowActions,
|
|
6472
6472
|
{
|
|
6473
6473
|
onEdit: () => ctx?.openEdit?.(fact),
|
|
6474
6474
|
canEdit: ctx?.canRewrite?.(fact) !== false,
|
|
@@ -6598,7 +6598,7 @@ function useFactsGrid({
|
|
|
6598
6598
|
);
|
|
6599
6599
|
const renderFactTags = React7.useCallback(
|
|
6600
6600
|
(fact, rowHeight) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6601
|
-
|
|
6601
|
+
chunkYD3RN2FY_cjs.FactLabelsCell,
|
|
6602
6602
|
{
|
|
6603
6603
|
options: labelOptions,
|
|
6604
6604
|
selectedIds: fact.tags.map((t) => t.tag_ext_id),
|
|
@@ -7029,7 +7029,7 @@ function ConnectedExportPanel({
|
|
|
7029
7029
|
ui.ShieldIcon,
|
|
7030
7030
|
{
|
|
7031
7031
|
char: w.name.charAt(0),
|
|
7032
|
-
workspaceColor:
|
|
7032
|
+
workspaceColor: chunkQWKT4DO6_cjs.workspaceKindColor(react.getWorkspaceKind(w)),
|
|
7033
7033
|
size: 32,
|
|
7034
7034
|
isSelected: false
|
|
7035
7035
|
}
|
|
@@ -7216,7 +7216,7 @@ function OpenExportDialog({
|
|
|
7216
7216
|
ui.ShieldIcon,
|
|
7217
7217
|
{
|
|
7218
7218
|
char: workspace.name.charAt(0),
|
|
7219
|
-
workspaceColor:
|
|
7219
|
+
workspaceColor: chunkQWKT4DO6_cjs.workspaceKindColor(react.getWorkspaceKind(workspace)),
|
|
7220
7220
|
size: 20,
|
|
7221
7221
|
isSelected: false
|
|
7222
7222
|
}
|
|
@@ -7247,7 +7247,7 @@ var citedDocIdsCache = /* @__PURE__ */ new WeakMap();
|
|
|
7247
7247
|
function citedDocIds(m) {
|
|
7248
7248
|
const cached = citedDocIdsCache.get(m);
|
|
7249
7249
|
if (cached) return cached;
|
|
7250
|
-
const ids =
|
|
7250
|
+
const ids = chunkYD3RN2FY_cjs.docIdsOf(chunkYD3RN2FY_cjs.toFactCitations(m.citations));
|
|
7251
7251
|
citedDocIdsCache.set(m, ids);
|
|
7252
7252
|
return ids;
|
|
7253
7253
|
}
|
|
@@ -7348,7 +7348,7 @@ function ConnectedFactsPage({
|
|
|
7348
7348
|
const citedDocs = React7.useMemo(() => {
|
|
7349
7349
|
const wanted = /* @__PURE__ */ new Set([
|
|
7350
7350
|
...notes.flatMap((n) => citedDocIds(n)),
|
|
7351
|
-
...
|
|
7351
|
+
...chunkYD3RN2FY_cjs.docIdsOf(chunkYD3RN2FY_cjs.toFactCitations(composer.draftCitations))
|
|
7352
7352
|
]);
|
|
7353
7353
|
return Object.fromEntries(
|
|
7354
7354
|
documents.filter((d) => wanted.has(d.external_id)).map((d) => [d.external_id, d])
|
|
@@ -7402,7 +7402,7 @@ function ConnectedFactsPage({
|
|
|
7402
7402
|
};
|
|
7403
7403
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: setFactSection, className: "relative flex h-full flex-col", "data-testid": "facts-page", children: [
|
|
7404
7404
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7405
|
-
|
|
7405
|
+
chunkYD3RN2FY_cjs.FactsToolbar,
|
|
7406
7406
|
{
|
|
7407
7407
|
count: filteredNotes.length,
|
|
7408
7408
|
hasActiveFilters: filters.hasActiveFilters,
|
|
@@ -7431,7 +7431,7 @@ function ConnectedFactsPage({
|
|
|
7431
7431
|
onNewFact: composing && !editingId ? () => void 0 : composer.startNewFact,
|
|
7432
7432
|
navSlotRef: setNavSlot,
|
|
7433
7433
|
navigator: view === "table" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7434
|
-
|
|
7434
|
+
chunkI45LDMQU_cjs.GridRowNavigator,
|
|
7435
7435
|
{
|
|
7436
7436
|
gridApi,
|
|
7437
7437
|
selectedId: editingId,
|
|
@@ -7442,7 +7442,7 @@ function ConnectedFactsPage({
|
|
|
7442
7442
|
) : null,
|
|
7443
7443
|
showToolbarRow: view !== "smart_search",
|
|
7444
7444
|
tools: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7445
|
-
view === "table" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7445
|
+
view === "table" && /* @__PURE__ */ jsxRuntime.jsx(chunkYD3RN2FY_cjs.FactsFieldsButton, { getGridApi: () => gridApiRef.current }),
|
|
7446
7446
|
view === "table" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7447
7447
|
chunkHT62K3UO_cjs.RowDensityControl,
|
|
7448
7448
|
{
|
|
@@ -7463,7 +7463,7 @@ function ConnectedFactsPage({
|
|
|
7463
7463
|
}
|
|
7464
7464
|
),
|
|
7465
7465
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7466
|
-
|
|
7466
|
+
chunkYD3RN2FY_cjs.FactComposer,
|
|
7467
7467
|
{
|
|
7468
7468
|
isOpen: composing,
|
|
7469
7469
|
isEditing: !!editingId,
|
|
@@ -7496,7 +7496,7 @@ function ConnectedFactsPage({
|
|
|
7496
7496
|
reserveSourcesSpace: view === "gantt" || view === "calendar",
|
|
7497
7497
|
citationContainer: factSection,
|
|
7498
7498
|
renderDocumentPicker: (onSelect, selectedIds, onOpen, sourcesToggle, sourcesOpen) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7499
|
-
|
|
7499
|
+
chunkYD3RN2FY_cjs.FactSourcesRow,
|
|
7500
7500
|
{
|
|
7501
7501
|
toggle: sourcesToggle,
|
|
7502
7502
|
picker: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7542,7 +7542,7 @@ function ConnectedFactsPage({
|
|
|
7542
7542
|
}
|
|
7543
7543
|
),
|
|
7544
7544
|
dateInput: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7545
|
-
|
|
7545
|
+
chunkYD3RN2FY_cjs.FactDateInput,
|
|
7546
7546
|
{
|
|
7547
7547
|
value: composer.draftDateFields,
|
|
7548
7548
|
onChange: composer.setDraftDateFields,
|
|
@@ -7552,13 +7552,13 @@ function ConnectedFactsPage({
|
|
|
7552
7552
|
}
|
|
7553
7553
|
),
|
|
7554
7554
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "scrollbar-subtle flex-1 overflow-y-auto pb-2", children: [
|
|
7555
|
-
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7555
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkYD3RN2FY_cjs.FactsLoading, {}) : isError ? /* @__PURE__ */ jsxRuntime.jsx(chunkYD3RN2FY_cjs.FactsLoadError, { onRetry: () => refetch() }) : smartSearch ? (
|
|
7556
7556
|
// Searches facts only (never documents). Kept before the empty-state guard so the
|
|
7557
7557
|
// search UI is reachable even in an empty workspace.
|
|
7558
7558
|
smartSearch({ selectedFactId: editingId, onOpenFact: openFactById })
|
|
7559
7559
|
) : notes.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-full flex-col items-center justify-center", children: [
|
|
7560
7560
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7561
|
-
|
|
7561
|
+
chunkYD3RN2FY_cjs.FactsEmptyState,
|
|
7562
7562
|
{
|
|
7563
7563
|
onUseExample: (text2) => {
|
|
7564
7564
|
composer.setDraft(text2);
|
|
@@ -7569,7 +7569,7 @@ function ConnectedFactsPage({
|
|
|
7569
7569
|
),
|
|
7570
7570
|
emptyStateExtra
|
|
7571
7571
|
] }) : view === "calendar" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7572
|
-
|
|
7572
|
+
chunkYD3RN2FY_cjs.FactsCalendar,
|
|
7573
7573
|
{
|
|
7574
7574
|
facts: filteredNotes,
|
|
7575
7575
|
onSelect: (n) => openEditIfAllowed(n),
|
|
@@ -7578,7 +7578,7 @@ function ConnectedFactsPage({
|
|
|
7578
7578
|
navigatorTotal: filteredNotes.length
|
|
7579
7579
|
}
|
|
7580
7580
|
) : view === "gantt" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
7581
|
-
|
|
7581
|
+
chunkYD3RN2FY_cjs.FactsGanttPane,
|
|
7582
7582
|
{
|
|
7583
7583
|
items: ganttItems,
|
|
7584
7584
|
labelWidth: pageView.labelWidth,
|
|
@@ -7628,7 +7628,7 @@ function ConnectedFactsPage({
|
|
|
7628
7628
|
)
|
|
7629
7629
|
] }),
|
|
7630
7630
|
selectable && notes.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7631
|
-
|
|
7631
|
+
chunkYD3RN2FY_cjs.FactsBulkBar,
|
|
7632
7632
|
{
|
|
7633
7633
|
count: selection.selectedFacts.length,
|
|
7634
7634
|
onClear: selection.clearSelection,
|
|
@@ -10605,13 +10605,13 @@ function ConnectedWorkspaceSettings({
|
|
|
10605
10605
|
const [membersExpanded, setMembersExpanded] = React7.useState(false);
|
|
10606
10606
|
const [shareOpen, setShareOpen] = React7.useState(false);
|
|
10607
10607
|
if (!workspace) {
|
|
10608
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkV2GEULRG_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10608
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkV2GEULRG_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkI45LDMQU_cjs.LoadingIndicator, { message: "Loading workspace..." }) });
|
|
10609
10609
|
}
|
|
10610
10610
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10611
10611
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkV2GEULRG_cjs.WorkspacePageFrame, { testId, children: [
|
|
10612
10612
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkV2GEULRG_cjs.WorkspaceIdentityPanel, { children: [
|
|
10613
10613
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10614
|
-
|
|
10614
|
+
chunkI45LDMQU_cjs.EntityIdentityBar,
|
|
10615
10615
|
{
|
|
10616
10616
|
testId: "workspace-identity-bar",
|
|
10617
10617
|
canEdit: isOwner,
|
|
@@ -10628,12 +10628,12 @@ function ConnectedWorkspaceSettings({
|
|
|
10628
10628
|
label: "Name",
|
|
10629
10629
|
value: workspace.name,
|
|
10630
10630
|
placeholder: "Untitled",
|
|
10631
|
-
maxLength:
|
|
10631
|
+
maxLength: chunkI45LDMQU_cjs.IDENTITY_NAME_MAX_LENGTH,
|
|
10632
10632
|
valueClassName: "truncate text-base font-semibold",
|
|
10633
10633
|
testId: "workspace-home-title",
|
|
10634
10634
|
hideLabel: true,
|
|
10635
10635
|
leading: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10636
|
-
|
|
10636
|
+
chunkQWKT4DO6_cjs.WorkspaceIdentity,
|
|
10637
10637
|
{
|
|
10638
10638
|
workspace: {
|
|
10639
10639
|
...react.toShellWorkspace(workspace),
|
|
@@ -11384,36 +11384,36 @@ function ConnectedSharePointAdminConsentPage({
|
|
|
11384
11384
|
const result = givenResult === void 0 ? queryResult : givenResult;
|
|
11385
11385
|
const { apiBaseUrl } = chunkAHYSHKPL_cjs.useBlocksEnvironment().runtimeConfig;
|
|
11386
11386
|
const consentUrl = `${apiBaseUrl}/v1/connectors/microsoft_sharepoint/admin-consent`;
|
|
11387
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11387
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkTL5VXRNT_cjs.ConsentCard, { size: "md", children: [
|
|
11388
11388
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11389
|
-
|
|
11389
|
+
chunkTL5VXRNT_cjs.ConsentHeader,
|
|
11390
11390
|
{
|
|
11391
11391
|
icon: /* @__PURE__ */ jsxRuntime.jsx(chunkHT62K3UO_cjs.VendorLogo, { vendorKey: "microsoft_sharepoint", product: "sharepoint" }),
|
|
11392
11392
|
title: "Approve ARBI for SharePoint access",
|
|
11393
11393
|
children: "A member of your organization uses ARBI and wants to sync documents from SharePoint. Your Microsoft 365 organization requires an administrator to approve this once for the whole organization."
|
|
11394
11394
|
}
|
|
11395
11395
|
),
|
|
11396
|
-
result === "granted" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11397
|
-
result === "declined" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11398
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11396
|
+
result === "granted" && /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentNotice, { tone: "success", title: "Access approved \u2014 you\u2019re all set.", className: "mt-4", children: "People in your organization can now connect SharePoint from their own ARBI account. Nothing is synced until each user connects and chooses what to import." }),
|
|
11397
|
+
result === "declined" && /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentNotice, { tone: "warning", title: "The approval didn\u2019t complete.", className: "mt-4", children: "The request was declined or canceled on the Microsoft screen. You can try again below \u2014 you must sign in with a Microsoft 365 administrator account of your organization." }),
|
|
11398
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTL5VXRNT_cjs.ConsentSection, { title: "What you are approving", children: [
|
|
11399
11399
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11400
|
-
|
|
11400
|
+
chunkTL5VXRNT_cjs.ConsentBulletList,
|
|
11401
11401
|
{
|
|
11402
11402
|
items: [
|
|
11403
11403
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11404
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11404
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentStrong, { children: "Read SharePoint sites and files" }),
|
|
11405
11405
|
" \u2014 lets each user who connects their own account import documents from sites they already have access to. ARBI never gets more access than the user has."
|
|
11406
11406
|
] }),
|
|
11407
11407
|
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11408
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11408
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentStrong, { children: "Sign users in and keep access" }),
|
|
11409
11409
|
" \u2014 standard sign-in (openid, profile, email) and offline access so syncs keep working between sessions."
|
|
11410
11410
|
] })
|
|
11411
11411
|
]
|
|
11412
11412
|
}
|
|
11413
11413
|
),
|
|
11414
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11414
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentText, { children: "Approving does not sync anything by itself and grants ARBI no standing access to your tenant. Each user still connects their own Microsoft account, and their tokens are end-to-end encrypted so ARBI\u2019s servers cannot read them at rest." }),
|
|
11415
11415
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { asChild: true, className: "w-full pointer-coarse:h-11", children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: consentUrl, children: "Review and approve in Microsoft" }) }),
|
|
11416
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11416
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentText, { variant: "footnote", children: "You\u2019ll sign in at login.microsoftonline.com and see Microsoft\u2019s own summary of these permissions before anything is granted." })
|
|
11417
11417
|
] })
|
|
11418
11418
|
] }) });
|
|
11419
11419
|
}
|
|
@@ -11435,7 +11435,7 @@ function BillingProjectEntity({
|
|
|
11435
11435
|
subscription = "none",
|
|
11436
11436
|
...props
|
|
11437
11437
|
}) {
|
|
11438
|
-
const { stripeEnabled } =
|
|
11438
|
+
const { stripeEnabled } = chunkLX3JJYVP_cjs.useBillingSupport();
|
|
11439
11439
|
const isPaid2 = stripeEnabled && (subscription === "active" || subscription === "past_due" || subscription === "dev");
|
|
11440
11440
|
return /* @__PURE__ */ jsxRuntime.jsx(ui.ProjectEntity, { ...props, subscription, isPaid: isPaid2 });
|
|
11441
11441
|
}
|
|
@@ -11462,8 +11462,8 @@ function InvoicesModal({
|
|
|
11462
11462
|
key: inv.number ?? String(i),
|
|
11463
11463
|
date: formatInvoiceDate(inv.date),
|
|
11464
11464
|
kind: KIND_LABELS2[inv.kind],
|
|
11465
|
-
amount:
|
|
11466
|
-
amountNote: inv.amount_ex_vat != null && inv.amount_ex_vat !== inv.amount ? `${
|
|
11465
|
+
amount: chunkLX3JJYVP_cjs.formatMoney(inv.amount, inv.currency),
|
|
11466
|
+
amountNote: inv.amount_ex_vat != null && inv.amount_ex_vat !== inv.amount ? `${chunkLX3JJYVP_cjs.formatMoney(inv.amount_ex_vat, inv.currency)} ex VAT` : void 0,
|
|
11467
11467
|
status: inv.status,
|
|
11468
11468
|
isPaid: isPaid2,
|
|
11469
11469
|
href: inv.hosted_invoice_url ?? inv.url ?? inv.pdf_url ?? void 0,
|
|
@@ -11498,7 +11498,7 @@ function StripeCheckoutModal({
|
|
|
11498
11498
|
const [clientSecret, setClientSecret] = React7.useState(null);
|
|
11499
11499
|
const [isCreating, setIsCreating] = React7.useState(false);
|
|
11500
11500
|
const [stripe, setStripe] = React7.useState(null);
|
|
11501
|
-
const { stripeEnabled, checkout } =
|
|
11501
|
+
const { stripeEnabled, checkout } = chunkLX3JJYVP_cjs.useBillingSupport();
|
|
11502
11502
|
const createCheckout = react.useCreateProjectCheckout();
|
|
11503
11503
|
const refreshProject = react.useRefreshProject();
|
|
11504
11504
|
const invalidateProjects = react.useInvalidateProjects();
|
|
@@ -11525,7 +11525,7 @@ function StripeCheckoutModal({
|
|
|
11525
11525
|
projectExtId,
|
|
11526
11526
|
body: {
|
|
11527
11527
|
interval,
|
|
11528
|
-
packs:
|
|
11528
|
+
packs: chunkLX3JJYVP_cjs.PRO_PACKS,
|
|
11529
11529
|
ai_blocks: aiBlocks,
|
|
11530
11530
|
storage_blocks: storageBlocks,
|
|
11531
11531
|
addon_budget_pence: addonBudgetPence,
|
|
@@ -11541,7 +11541,7 @@ function StripeCheckoutModal({
|
|
|
11541
11541
|
},
|
|
11542
11542
|
onError: (error) => {
|
|
11543
11543
|
console.error("Failed to create checkout session:", error);
|
|
11544
|
-
const reason =
|
|
11544
|
+
const reason = chunkLX3JJYVP_cjs.apiErrorDetail(error)?.message;
|
|
11545
11545
|
shell.notify.error(
|
|
11546
11546
|
reason ? `Checkout didn't start: ${reason}` : "Checkout didn't start. Try again."
|
|
11547
11547
|
);
|
|
@@ -11574,7 +11574,7 @@ function StripeCheckoutModal({
|
|
|
11574
11574
|
}
|
|
11575
11575
|
}, [open]);
|
|
11576
11576
|
const isStripeConfigured = stripeEnabled;
|
|
11577
|
-
const vatNote = quote ? `${
|
|
11577
|
+
const vatNote = quote ? `${chunkLX3JJYVP_cjs.checkoutItemsLabel(aiBlocks, storageBlocks)} \xB7 ${chunkLX3JJYVP_cjs.quoteTotalLine(quote)}` : null;
|
|
11578
11578
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11579
11579
|
chunkWL57N2KJ_cjs.CheckoutDialogFrame,
|
|
11580
11580
|
{
|
|
@@ -11628,31 +11628,31 @@ function defaultBillingCountry(languages = typeof navigator === "undefined" ? []
|
|
|
11628
11628
|
}
|
|
11629
11629
|
var choiceForPacks = (packs) => packs > 0 ? "pro" : "free";
|
|
11630
11630
|
function proCard(selected, isAnnual, prices) {
|
|
11631
|
-
const packs =
|
|
11631
|
+
const packs = chunkLX3JJYVP_cjs.PLAN_CHOICE_PACKS.pro;
|
|
11632
11632
|
const currency = prices.monthly?.currency ?? prices.annual?.currency ?? "gbp";
|
|
11633
|
-
const monthly =
|
|
11634
|
-
const annual =
|
|
11633
|
+
const monthly = chunkLX3JJYVP_cjs.packPrice(prices.monthly, packs);
|
|
11634
|
+
const annual = chunkLX3JJYVP_cjs.packPrice(prices.annual, packs);
|
|
11635
11635
|
const current2 = isAnnual ? annual : monthly;
|
|
11636
11636
|
const effectiveMonthly = current2 ? isAnnual ? current2.amount_ex_vat / 12 : current2.amount_ex_vat : null;
|
|
11637
11637
|
return {
|
|
11638
11638
|
id: packs,
|
|
11639
|
-
name:
|
|
11639
|
+
name: chunkLX3JJYVP_cjs.planNameForPacks(packs),
|
|
11640
11640
|
isSelected: selected === "pro",
|
|
11641
11641
|
price: current2 && effectiveMonthly != null ? {
|
|
11642
11642
|
annual: isAnnual,
|
|
11643
|
-
yearlyStrike: isAnnual && monthly && monthly.amount_ex_vat * 12 > current2.amount_ex_vat ?
|
|
11644
|
-
yearlyTotal: isAnnual ?
|
|
11643
|
+
yearlyStrike: isAnnual && monthly && monthly.amount_ex_vat * 12 > current2.amount_ex_vat ? chunkLX3JJYVP_cjs.formatMoney(monthly.amount_ex_vat * 12, currency) : void 0,
|
|
11644
|
+
yearlyTotal: isAnnual ? chunkLX3JJYVP_cjs.formatMoney(current2.amount_ex_vat, currency) : void 0,
|
|
11645
11645
|
intervalLabel: isAnnual ? "/yr + VAT" : "/mo",
|
|
11646
|
-
monthly:
|
|
11646
|
+
monthly: chunkLX3JJYVP_cjs.formatMoney(Math.round(effectiveMonthly), currency),
|
|
11647
11647
|
taxLabel: "+ VAT",
|
|
11648
11648
|
// The inclusive figure for a UK customer, right under the headline.
|
|
11649
|
-
note: `${
|
|
11649
|
+
note: `${chunkLX3JJYVP_cjs.formatMoney(current2.amount, currency)}${isAnnual ? "/yr" : "/mo"} incl. UK VAT`
|
|
11650
11650
|
} : void 0,
|
|
11651
11651
|
features: [
|
|
11652
|
-
`${react.formatGbp(
|
|
11653
|
-
`${
|
|
11652
|
+
`${react.formatGbp(chunkLX3JJYVP_cjs.PRO_AI_GBP)} of AI usage / month`,
|
|
11653
|
+
`${chunkLX3JJYVP_cjs.PRO_STORAGE_GB} GB storage`,
|
|
11654
11654
|
"Unlimited collaborators",
|
|
11655
|
-
...isAnnual ? [
|
|
11655
|
+
...isAnnual ? [chunkLX3JJYVP_cjs.ANNUAL_PREMIUM_AI_NOTE] : []
|
|
11656
11656
|
]
|
|
11657
11657
|
};
|
|
11658
11658
|
}
|
|
@@ -11664,9 +11664,9 @@ function buildPlanCards(selected, isAnnual, prices, isOnFree) {
|
|
|
11664
11664
|
isCurrent: isOnFree,
|
|
11665
11665
|
isSelected: selected === "free" && !isOnFree,
|
|
11666
11666
|
features: [
|
|
11667
|
-
`${react.formatGbp(
|
|
11668
|
-
`${
|
|
11669
|
-
|
|
11667
|
+
`${react.formatGbp(chunkLX3JJYVP_cjs.FREE_AI_GBP)} of AI usage / month`,
|
|
11668
|
+
`${chunkLX3JJYVP_cjs.FREE_STORAGE_MB.toLocaleString("en-US")} MB storage`,
|
|
11669
|
+
chunkLX3JJYVP_cjs.FREE_COLLABORATORS === 0 ? "Just you" : `${chunkLX3JJYVP_cjs.FREE_COLLABORATORS} collaborators`
|
|
11670
11670
|
]
|
|
11671
11671
|
};
|
|
11672
11672
|
return [free, proCard(selected, isAnnual, prices)];
|
|
@@ -11694,7 +11694,7 @@ function CheckoutAddonBudget({
|
|
|
11694
11694
|
value,
|
|
11695
11695
|
onChange
|
|
11696
11696
|
}) {
|
|
11697
|
-
const budget =
|
|
11697
|
+
const budget = chunkLX3JJYVP_cjs.parseBudgetPounds(value);
|
|
11698
11698
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11699
11699
|
"div",
|
|
11700
11700
|
{
|
|
@@ -11717,7 +11717,7 @@ function CheckoutAddonBudget({
|
|
|
11717
11717
|
step: 25,
|
|
11718
11718
|
className: "h-8 w-24",
|
|
11719
11719
|
value,
|
|
11720
|
-
placeholder: String(
|
|
11720
|
+
placeholder: String(chunkLX3JJYVP_cjs.DEFAULT_SPEND_CAP_PENCE / 100),
|
|
11721
11721
|
onChange: (e) => onChange(e.target.value),
|
|
11722
11722
|
"aria-invalid": budget === void 0,
|
|
11723
11723
|
"data-testid": "checkout-addon-budget-input"
|
|
@@ -11735,7 +11735,7 @@ function BlockStepper({
|
|
|
11735
11735
|
onChange,
|
|
11736
11736
|
testId
|
|
11737
11737
|
}) {
|
|
11738
|
-
const set2 = (n) => onChange(Math.max(0, Math.min(
|
|
11738
|
+
const set2 = (n) => onChange(Math.max(0, Math.min(chunkLX3JJYVP_cjs.MAX_CHECKOUT_BLOCKS, n)));
|
|
11739
11739
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11740
11740
|
"div",
|
|
11741
11741
|
{
|
|
@@ -11779,7 +11779,7 @@ function BlockStepper({
|
|
|
11779
11779
|
className: "size-8",
|
|
11780
11780
|
"aria-label": `More: ${label}`,
|
|
11781
11781
|
onClick: () => set2(value + 1),
|
|
11782
|
-
disabled: value >=
|
|
11782
|
+
disabled: value >= chunkLX3JJYVP_cjs.MAX_CHECKOUT_BLOCKS,
|
|
11783
11783
|
"data-testid": `${testId}-increment`,
|
|
11784
11784
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-4" })
|
|
11785
11785
|
}
|
|
@@ -11796,8 +11796,8 @@ function CheckoutAddonBlocks({
|
|
|
11796
11796
|
onStorageBlocksChange,
|
|
11797
11797
|
price
|
|
11798
11798
|
}) {
|
|
11799
|
-
const ai =
|
|
11800
|
-
const storage =
|
|
11799
|
+
const ai = chunkLX3JJYVP_cjs.addonPrice(price, "ai_usage");
|
|
11800
|
+
const storage = chunkLX3JJYVP_cjs.addonPrice(price, "storage");
|
|
11801
11801
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11802
11802
|
"div",
|
|
11803
11803
|
{
|
|
@@ -11807,8 +11807,8 @@ function CheckoutAddonBlocks({
|
|
|
11807
11807
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11808
11808
|
BlockStepper,
|
|
11809
11809
|
{
|
|
11810
|
-
label: `+${react.formatGbp(ai?.ai_gbp ||
|
|
11811
|
-
priceText:
|
|
11810
|
+
label: `+${react.formatGbp(ai?.ai_gbp || chunkLX3JJYVP_cjs.ADDON_BLOCK_AI_GBP)} of AI usage`,
|
|
11811
|
+
priceText: chunkLX3JJYVP_cjs.checkoutBlockPriceText(price, "ai_usage"),
|
|
11812
11812
|
value: aiBlocks,
|
|
11813
11813
|
onChange: onAiBlocksChange,
|
|
11814
11814
|
testId: "checkout-ai-blocks"
|
|
@@ -11817,8 +11817,8 @@ function CheckoutAddonBlocks({
|
|
|
11817
11817
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11818
11818
|
BlockStepper,
|
|
11819
11819
|
{
|
|
11820
|
-
label: `+${storage?.storage_gb ||
|
|
11821
|
-
priceText:
|
|
11820
|
+
label: `+${storage?.storage_gb || chunkLX3JJYVP_cjs.STORAGE_BLOCK_GB} GB storage`,
|
|
11821
|
+
priceText: chunkLX3JJYVP_cjs.checkoutBlockPriceText(price, "storage"),
|
|
11822
11822
|
value: storageBlocks,
|
|
11823
11823
|
onChange: onStorageBlocksChange,
|
|
11824
11824
|
testId: "checkout-storage-blocks"
|
|
@@ -11875,12 +11875,12 @@ function ConnectedReferralRewardSummary({
|
|
|
11875
11875
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11876
11876
|
chunkWL57N2KJ_cjs.ReferralRewardSummary,
|
|
11877
11877
|
{
|
|
11878
|
-
amountLabel:
|
|
11878
|
+
amountLabel: chunkLX3JJYVP_cjs.formatMoney(reward.amount, reward.currency),
|
|
11879
11879
|
breakdown: applied && totalCents != null && currency ? {
|
|
11880
|
-
subtotal:
|
|
11881
|
-
reward:
|
|
11882
|
-
youPay:
|
|
11883
|
-
rollover: applied.remaining > 0 ?
|
|
11880
|
+
subtotal: chunkLX3JJYVP_cjs.formatMoney(totalCents, currency),
|
|
11881
|
+
reward: chunkLX3JJYVP_cjs.formatMoney(applied.bonus, currency),
|
|
11882
|
+
youPay: chunkLX3JJYVP_cjs.formatMoney(applied.youPay, currency),
|
|
11883
|
+
rollover: applied.remaining > 0 ? chunkLX3JJYVP_cjs.formatMoney(applied.remaining, currency) : void 0
|
|
11884
11884
|
} : void 0
|
|
11885
11885
|
}
|
|
11886
11886
|
);
|
|
@@ -11888,7 +11888,7 @@ function ConnectedReferralRewardSummary({
|
|
|
11888
11888
|
function ConnectedReferralRewardNote() {
|
|
11889
11889
|
const reward = useReferralReward();
|
|
11890
11890
|
if (!reward) return null;
|
|
11891
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkWL57N2KJ_cjs.ReferralRewardNote, { amountLabel:
|
|
11891
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkWL57N2KJ_cjs.ReferralRewardNote, { amountLabel: chunkLX3JJYVP_cjs.formatMoney(reward.amount, reward.currency) });
|
|
11892
11892
|
}
|
|
11893
11893
|
function CheckoutTotal({
|
|
11894
11894
|
state,
|
|
@@ -11917,7 +11917,7 @@ function CheckoutTotal({
|
|
|
11917
11917
|
className: "text-sm font-medium text-foreground",
|
|
11918
11918
|
"data-testid": "checkout-total",
|
|
11919
11919
|
"aria-live": "polite",
|
|
11920
|
-
children: state.quote && !state.isLoading ?
|
|
11920
|
+
children: state.quote && !state.isLoading ? chunkLX3JJYVP_cjs.quoteTotalLine(state.quote) : state.isLoading ? "Calculating total\u2026" : state.error
|
|
11921
11921
|
}
|
|
11922
11922
|
)
|
|
11923
11923
|
] });
|
|
@@ -11950,13 +11950,13 @@ function useCheckoutQuote({
|
|
|
11950
11950
|
...aiBlocks || storageBlocks ? { addons: { ai_usage: aiBlocks, storage: storageBlocks } } : {}
|
|
11951
11951
|
} : null
|
|
11952
11952
|
);
|
|
11953
|
-
const { code, message } = query.isError ?
|
|
11954
|
-
const locationInvalid = code ===
|
|
11953
|
+
const { code, message } = query.isError ? chunkLX3JJYVP_cjs.quoteError(query.error) : {};
|
|
11954
|
+
const locationInvalid = code === chunkLX3JJYVP_cjs.TAX_LOCATION_INVALID;
|
|
11955
11955
|
const isLoading = enabled && (query.isLoading || postal !== postalCode.trim());
|
|
11956
11956
|
return {
|
|
11957
11957
|
quote: query.data,
|
|
11958
11958
|
isLoading,
|
|
11959
|
-
showPostcode:
|
|
11959
|
+
showPostcode: chunkLX3JJYVP_cjs.POSTCODE_COUNTRIES.includes(country) || locationInvalid || postalCode !== "",
|
|
11960
11960
|
error: query.isError ? locationInvalid ? message ?? "Enter your ZIP / postal code to see the total." : message ?? "Couldn't calculate tax. Stripe shows the total next." : null,
|
|
11961
11961
|
canContinue: !isLoading && (!!query.data || query.isError && !locationInvalid)
|
|
11962
11962
|
};
|
|
@@ -11965,7 +11965,7 @@ function SubscriptionPlans({ projectExtId, onDismiss }) {
|
|
|
11965
11965
|
const { data: products, isLoading, error } = react.useProducts();
|
|
11966
11966
|
const [isAnnual, setIsAnnual] = React7.useState(false);
|
|
11967
11967
|
const [promoCode, setPromoCode] = React7.useState("");
|
|
11968
|
-
const [addonBudget, setAddonBudget] = React7.useState(String(
|
|
11968
|
+
const [addonBudget, setAddonBudget] = React7.useState(String(chunkLX3JJYVP_cjs.DEFAULT_SPEND_CAP_PENCE / 100));
|
|
11969
11969
|
const [checkoutBudget, setCheckoutBudget] = React7.useState(null);
|
|
11970
11970
|
const [aiBlocks, setAiBlocks] = React7.useState(0);
|
|
11971
11971
|
const [storageBlocks, setStorageBlocks] = React7.useState(0);
|
|
@@ -11986,16 +11986,16 @@ function SubscriptionPlans({ projectExtId, onDismiss }) {
|
|
|
11986
11986
|
if (isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkWL57N2KJ_cjs.PlanNotice, { children: "Loading plans\u2026" });
|
|
11987
11987
|
if (error) return /* @__PURE__ */ jsxRuntime.jsx(chunkWL57N2KJ_cjs.PlanNotice, { tone: "error", children: "Plans didn't load. Try again." });
|
|
11988
11988
|
if (!products || products.length === 0) return /* @__PURE__ */ jsxRuntime.jsx(chunkWL57N2KJ_cjs.PlanNotice, { children: "No plans available." });
|
|
11989
|
-
const prices =
|
|
11989
|
+
const prices = chunkLX3JJYVP_cjs.findProPrices(products);
|
|
11990
11990
|
const intervalPrice = isAnnual ? prices.annual : prices.monthly;
|
|
11991
|
-
const selectedPrice =
|
|
11991
|
+
const selectedPrice = chunkLX3JJYVP_cjs.packPrice(intervalPrice);
|
|
11992
11992
|
if (!intervalPrice) return null;
|
|
11993
11993
|
const interval = isAnnual ? "year" : "month";
|
|
11994
|
-
const savingsPercent =
|
|
11994
|
+
const savingsPercent = chunkLX3JJYVP_cjs.calcSavingsPercent(prices.monthly, prices.annual);
|
|
11995
11995
|
const handleSubscribe = () => {
|
|
11996
11996
|
setCheckoutInterval(interval);
|
|
11997
|
-
const parsed =
|
|
11998
|
-
setCheckoutBudget(parsed == null || parsed ===
|
|
11997
|
+
const parsed = chunkLX3JJYVP_cjs.parseBudgetPounds(addonBudget);
|
|
11998
|
+
setCheckoutBudget(parsed == null || parsed === chunkLX3JJYVP_cjs.DEFAULT_SPEND_CAP_PENCE ? null : parsed);
|
|
11999
11999
|
setCheckoutQuote(quote.quote);
|
|
12000
12000
|
setIsCheckoutModalOpen(true);
|
|
12001
12001
|
};
|
|
@@ -12073,7 +12073,7 @@ function SubscriptionPlans({ projectExtId, onDismiss }) {
|
|
|
12073
12073
|
{
|
|
12074
12074
|
fill: true,
|
|
12075
12075
|
onClick: handleSubscribe,
|
|
12076
|
-
disabled: !selectedPrice ||
|
|
12076
|
+
disabled: !selectedPrice || chunkLX3JJYVP_cjs.parseBudgetPounds(addonBudget) === void 0 || !quote.canContinue,
|
|
12077
12077
|
size: "sm",
|
|
12078
12078
|
"data-testid": "subscribe-button",
|
|
12079
12079
|
children: "Continue to payment"
|
|
@@ -12113,7 +12113,7 @@ var FALLBACK_MESSAGES = {
|
|
|
12113
12113
|
BILLING_ADDRESS_REQUIRED: "Add a billing address first."
|
|
12114
12114
|
};
|
|
12115
12115
|
function addonErrorMessage(error) {
|
|
12116
|
-
const detail =
|
|
12116
|
+
const detail = chunkLX3JJYVP_cjs.apiErrorDetail(error);
|
|
12117
12117
|
if (detail && typeof detail === "object") {
|
|
12118
12118
|
const { code, message } = detail;
|
|
12119
12119
|
if (message) return message;
|
|
@@ -12139,18 +12139,18 @@ function chargeRefusalMessage(error) {
|
|
|
12139
12139
|
return code ? REFUSALS[code] : null;
|
|
12140
12140
|
}
|
|
12141
12141
|
function addonErrorCode(error) {
|
|
12142
|
-
const detail =
|
|
12142
|
+
const detail = chunkLX3JJYVP_cjs.apiErrorDetail(error);
|
|
12143
12143
|
if (detail && typeof detail === "object") {
|
|
12144
12144
|
const code = detail.code;
|
|
12145
12145
|
if (code && code in FALLBACK_MESSAGES) return code;
|
|
12146
12146
|
}
|
|
12147
12147
|
return null;
|
|
12148
12148
|
}
|
|
12149
|
-
var addedMessage = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `${react.formatGbp(blockAiGbp ??
|
|
12149
|
+
var addedMessage = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `${react.formatGbp(blockAiGbp ?? chunkLX3JJYVP_cjs.ADDON_BLOCK_AI_GBP)} of AI usage added` : `${blockStorageGb ?? chunkLX3JJYVP_cjs.STORAGE_BLOCK_GB} GB added`;
|
|
12150
12150
|
function useAddonPurchase() {
|
|
12151
12151
|
const addBlock = react.useAddProjectAddonBlock();
|
|
12152
12152
|
const { mutate } = addBlock;
|
|
12153
|
-
const { onAddonBlocksBought } =
|
|
12153
|
+
const { onAddonBlocksBought } = chunkLX3JJYVP_cjs.useBillingSupport();
|
|
12154
12154
|
const buy = React7.useCallback(
|
|
12155
12155
|
(kind, projectExtId, options2) => {
|
|
12156
12156
|
mutate(
|
|
@@ -12194,7 +12194,7 @@ function PlanChangeLines({
|
|
|
12194
12194
|
isError,
|
|
12195
12195
|
className
|
|
12196
12196
|
}) {
|
|
12197
|
-
const lines = preview ?
|
|
12197
|
+
const lines = preview ? chunkLX3JJYVP_cjs.planPreviewLines(preview) : [{ id: "pay-today", text: isError ? chunkLX3JJYVP_cjs.PAY_TODAY_UNPRICED : "Checking price\u2026" }];
|
|
12198
12198
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, "data-testid": "plan-change-lines", children: lines.map((line) => /* @__PURE__ */ jsxRuntime.jsx("p", { "data-testid": `plan-change-${line.id}`, children: line.text }, line.id)) });
|
|
12199
12199
|
}
|
|
12200
12200
|
var BANK_CONFIRM_PLAN_CHANGE = "Confirm with your bank. Nothing is charged until you do.";
|
|
@@ -12202,13 +12202,13 @@ function notifyPlanChange(data, fallback, planName2) {
|
|
|
12202
12202
|
const outcome = data?.plan_change;
|
|
12203
12203
|
switch (outcome?.result) {
|
|
12204
12204
|
case "upgraded": {
|
|
12205
|
-
const plan =
|
|
12206
|
-
const charged = outcome.charged_pence > 0 ? ` \xB7 ${
|
|
12205
|
+
const plan = chunkLX3JJYVP_cjs.planNameForPacks(data?.addons?.packs ?? data?.packs);
|
|
12206
|
+
const charged = outcome.charged_pence > 0 ? ` \xB7 ${chunkLX3JJYVP_cjs.formatMoney(outcome.charged_pence, "gbp")} charged` : "";
|
|
12207
12207
|
shell.notify.success(`Upgraded to ${plan}${charged}`);
|
|
12208
12208
|
break;
|
|
12209
12209
|
}
|
|
12210
12210
|
case "scheduled": {
|
|
12211
|
-
const when2 =
|
|
12211
|
+
const when2 = chunkLX3JJYVP_cjs.formatPeriodEnd(data?.addons?.period_end ?? data?.current_period_end);
|
|
12212
12212
|
shell.notify.success(when2 ? `Scheduled for ${when2}` : fallback);
|
|
12213
12213
|
break;
|
|
12214
12214
|
}
|
|
@@ -12241,23 +12241,23 @@ function ChangeProPlan({
|
|
|
12241
12241
|
const { data: products } = react.useProducts();
|
|
12242
12242
|
const changePlan = react.useChangeProjectPlan();
|
|
12243
12243
|
const cancel = react.useCancelProjectSubscription();
|
|
12244
|
-
const prices =
|
|
12244
|
+
const prices = chunkLX3JJYVP_cjs.findProPrices(products);
|
|
12245
12245
|
const addons = project.addons;
|
|
12246
12246
|
const isCanceling = project.cancel_at_period_end === true || project.subscription === "canceled";
|
|
12247
|
-
const currentPacks = Math.max(addons?.packs ?? project.packs ??
|
|
12248
|
-
const isLegacyMultiPack = currentPacks >
|
|
12247
|
+
const currentPacks = Math.max(addons?.packs ?? project.packs ?? chunkLX3JJYVP_cjs.PRO_PACKS, chunkLX3JJYVP_cjs.PRO_PACKS);
|
|
12248
|
+
const isLegacyMultiPack = currentPacks > chunkLX3JJYVP_cjs.PRO_PACKS;
|
|
12249
12249
|
const currentInterval = project.plan_interval === "year" ? "year" : "month";
|
|
12250
12250
|
const scheduledPacks = isCanceling ? 0 : addons?.packs_next ?? currentPacks;
|
|
12251
12251
|
const scheduledInterval = addons?.pending_interval ?? currentInterval;
|
|
12252
12252
|
const [targetPacks, setTargetPacks] = React7.useState(scheduledPacks);
|
|
12253
12253
|
const [chosenInterval, setChosenInterval] = React7.useState(scheduledInterval);
|
|
12254
|
-
const targetInterval = targetPacks >
|
|
12254
|
+
const targetInterval = targetPacks > chunkLX3JJYVP_cjs.PRO_PACKS ? currentInterval : chosenInterval;
|
|
12255
12255
|
const periodEnd = formatDate(addons?.period_end ?? project.current_period_end);
|
|
12256
12256
|
const when2 = periodEnd ?? "the end of the period";
|
|
12257
12257
|
const shortWhen = periodEnd ? periodEnd.replace(/ \d{4}$/, "") : "period end";
|
|
12258
12258
|
const isPending = changePlan.isPending || cancel.isPending;
|
|
12259
12259
|
const sameAsScheduled = targetPacks === scheduledPacks && (targetPacks === 0 || targetInterval === scheduledInterval);
|
|
12260
|
-
const packOptions = isLegacyMultiPack ? [currentPacks,
|
|
12260
|
+
const packOptions = isLegacyMultiPack ? [currentPacks, chunkLX3JJYVP_cjs.PRO_PACKS, 0] : [chunkLX3JJYVP_cjs.PRO_PACKS, 0];
|
|
12261
12261
|
const intervalPrice = targetInterval === "year" ? prices.annual : prices.monthly;
|
|
12262
12262
|
const currency = intervalPrice?.currency ?? project.currency ?? "gbp";
|
|
12263
12263
|
const preview = react.usePreviewProjectPlanChange(
|
|
@@ -12265,7 +12265,7 @@ function ChangeProPlan({
|
|
|
12265
12265
|
sameAsScheduled || targetPacks === 0 ? null : { packs: targetPacks, interval: targetInterval }
|
|
12266
12266
|
);
|
|
12267
12267
|
const noChange = sameAsScheduled || preview.data?.unchanged === true;
|
|
12268
|
-
const nameFor = (packs) => packs === currentPacks && packs > 0 ?
|
|
12268
|
+
const nameFor = (packs) => packs === currentPacks && packs > 0 ? chunkLX3JJYVP_cjs.proTierName(project) : chunkLX3JJYVP_cjs.planNameForPacks(packs);
|
|
12269
12269
|
const effects = [];
|
|
12270
12270
|
const target = nameFor(targetPacks);
|
|
12271
12271
|
if (targetPacks === 0) {
|
|
@@ -12275,7 +12275,7 @@ function ChangeProPlan({
|
|
|
12275
12275
|
if (targetPacks < currentPacks) {
|
|
12276
12276
|
effects.push(`Changes to one Pro licence on ${when2}. No refund.`);
|
|
12277
12277
|
} else if (!isCanceling && addons?.packs_next != null) {
|
|
12278
|
-
effects.push(`Cancels the change to ${
|
|
12278
|
+
effects.push(`Cancels the change to ${chunkLX3JJYVP_cjs.planNameForPacks(addons.packs_next)}.`);
|
|
12279
12279
|
}
|
|
12280
12280
|
if (targetInterval !== currentInterval) {
|
|
12281
12281
|
effects.push(`${targetInterval === "year" ? "Annual" : "Monthly"} billing from ${when2}.`);
|
|
@@ -12314,26 +12314,26 @@ function ChangeProPlan({
|
|
|
12314
12314
|
if (packs === 0) {
|
|
12315
12315
|
return {
|
|
12316
12316
|
total: "\xA30",
|
|
12317
|
-
summary: `${react.formatGbp(
|
|
12317
|
+
summary: `${react.formatGbp(chunkLX3JJYVP_cjs.FREE_AI_GBP)} of AI usage \xB7 ${chunkLX3JJYVP_cjs.FREE_STORAGE_MB} MB \xB7 just you`
|
|
12318
12318
|
};
|
|
12319
12319
|
}
|
|
12320
|
-
const allowance = `${react.formatGbp(
|
|
12321
|
-
const legacy = packs >
|
|
12322
|
-
const exVat = legacy ? project.amount_ex_vat :
|
|
12320
|
+
const allowance = `${react.formatGbp(chunkLX3JJYVP_cjs.PRO_AI_GBP * packs)} of AI usage \xB7 ${chunkLX3JJYVP_cjs.PRO_STORAGE_GB * packs} GB`;
|
|
12321
|
+
const legacy = packs > chunkLX3JJYVP_cjs.PRO_PACKS;
|
|
12322
|
+
const exVat = legacy ? project.amount_ex_vat : chunkLX3JJYVP_cjs.packPrice(intervalPrice)?.amount_ex_vat;
|
|
12323
12323
|
return {
|
|
12324
|
-
total: exVat != null ?
|
|
12324
|
+
total: exVat != null ? chunkLX3JJYVP_cjs.plusVat(exVat, currency) : void 0,
|
|
12325
12325
|
summary: allowance
|
|
12326
12326
|
};
|
|
12327
12327
|
};
|
|
12328
12328
|
return /* @__PURE__ */ jsxRuntime.jsxs(chunkWL57N2KJ_cjs.PlanStack, { gap: 4, testId: "change-pro-plan", children: [
|
|
12329
12329
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [
|
|
12330
12330
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: "Billing" }),
|
|
12331
|
-
targetPacks >
|
|
12331
|
+
targetPacks > chunkLX3JJYVP_cjs.PRO_PACKS ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", "data-testid": "change-plan-interval-fixed", children: currentInterval === "year" ? "Annual" : "Monthly" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
12332
12332
|
chunkWL57N2KJ_cjs.PricingToggle,
|
|
12333
12333
|
{
|
|
12334
12334
|
isAnnual: targetInterval === "year",
|
|
12335
12335
|
onToggle: () => setChosenInterval(targetInterval === "year" ? "month" : "year"),
|
|
12336
|
-
savingsPercent:
|
|
12336
|
+
savingsPercent: chunkLX3JJYVP_cjs.calcSavingsPercent(prices.monthly, prices.annual)
|
|
12337
12337
|
}
|
|
12338
12338
|
)
|
|
12339
12339
|
] }),
|
|
@@ -12358,12 +12358,12 @@ function ChangeProPlan({
|
|
|
12358
12358
|
}) }),
|
|
12359
12359
|
isLegacyMultiPack && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1", children: [
|
|
12360
12360
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkWL57N2KJ_cjs.PlanNotice, { className: "text-xs", testId: "change-plan-legacy-note", children: [
|
|
12361
|
-
|
|
12361
|
+
chunkLX3JJYVP_cjs.proTierName(project),
|
|
12362
12362
|
" is no longer sold"
|
|
12363
12363
|
] }),
|
|
12364
12364
|
/* @__PURE__ */ jsxRuntime.jsxs(chunkWL57N2KJ_cjs.MoreInfo, { title: "Legacy plan", testId: "change-plan-legacy-more-info", children: [
|
|
12365
12365
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
12366
|
-
|
|
12366
|
+
chunkLX3JJYVP_cjs.proTierName(project),
|
|
12367
12367
|
" keeps renewing at its own price, with its allowance and add-ons, until you change it."
|
|
12368
12368
|
] }),
|
|
12369
12369
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
@@ -12395,7 +12395,7 @@ function ChangeProPlan({
|
|
|
12395
12395
|
] });
|
|
12396
12396
|
}
|
|
12397
12397
|
function ChangePlanDialog({ project, open, onOpenChange }) {
|
|
12398
|
-
const isPro = !!project &&
|
|
12398
|
+
const isPro = !!project && chunkLX3JJYVP_cjs.isProProject(project);
|
|
12399
12399
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12400
12400
|
chunkWL57N2KJ_cjs.PlanDialogFrame,
|
|
12401
12401
|
{
|
|
@@ -12417,14 +12417,14 @@ function ChangePlanDialog({ project, open, onOpenChange }) {
|
|
|
12417
12417
|
}
|
|
12418
12418
|
function ProjectsTable() {
|
|
12419
12419
|
const { data: projects, isLoading } = react.useProjects();
|
|
12420
|
-
const currentUserExtId =
|
|
12420
|
+
const currentUserExtId = chunkLX3JJYVP_cjs.useSelfExtId();
|
|
12421
12421
|
const { openProject } = chunkAHYSHKPL_cjs.useBlocksEnvironment();
|
|
12422
12422
|
const updateProject = react.useUpdateProjectFields();
|
|
12423
12423
|
const [renameTarget, setRenameTarget] = React7.useState(null);
|
|
12424
12424
|
const [renameValue, setRenameValue] = React7.useState("");
|
|
12425
12425
|
const [invoicesTarget, setInvoicesTarget] = React7.useState(null);
|
|
12426
12426
|
const [upgradeTarget, setUpgradeTarget] = React7.useState(null);
|
|
12427
|
-
const { stripeEnabled } =
|
|
12427
|
+
const { stripeEnabled } = chunkLX3JJYVP_cjs.useBillingSupport();
|
|
12428
12428
|
const ownedProjects = React7.useMemo(
|
|
12429
12429
|
() => (projects ?? []).filter((p) => p.created_by === currentUserExtId),
|
|
12430
12430
|
[projects, currentUserExtId]
|
|
@@ -12468,8 +12468,8 @@ function ProjectsTable() {
|
|
|
12468
12468
|
testId: `project-row-${p.external_id}`,
|
|
12469
12469
|
onOpen: () => openProject(p.external_id),
|
|
12470
12470
|
identity: /* @__PURE__ */ jsxRuntime.jsx(BillingProjectEntity, { name: p.name, relation: "mine", subscription: p.subscription, size: "sm" }),
|
|
12471
|
-
summary: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx(chunkWL57N2KJ_cjs.PlanBadge, { ...
|
|
12472
|
-
usage: p.quotas ? /* @__PURE__ */ jsxRuntime.jsx(chunkWL57N2KJ_cjs.QuotaMeter, { items:
|
|
12471
|
+
summary: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center whitespace-nowrap", children: /* @__PURE__ */ jsxRuntime.jsx(chunkWL57N2KJ_cjs.PlanBadge, { ...chunkLX3JJYVP_cjs.planBadgeView(p) }) }) : void 0,
|
|
12472
|
+
usage: p.quotas ? /* @__PURE__ */ jsxRuntime.jsx(chunkWL57N2KJ_cjs.QuotaMeter, { items: chunkLX3JJYVP_cjs.getQuotaItems(p.quotas), size: "lg" }) : void 0,
|
|
12473
12473
|
actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12474
12474
|
canUpgrade && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12475
12475
|
ui.Button,
|
|
@@ -12536,7 +12536,7 @@ function ProjectsTable() {
|
|
|
12536
12536
|
}
|
|
12537
12537
|
function SharedProjects() {
|
|
12538
12538
|
const { data: projects } = react.useProjects();
|
|
12539
|
-
const currentUserExtId =
|
|
12539
|
+
const currentUserExtId = chunkLX3JJYVP_cjs.useSelfExtId();
|
|
12540
12540
|
const { data: usageToday } = react.useUserUsageToday();
|
|
12541
12541
|
const shared = React7.useMemo(
|
|
12542
12542
|
() => (projects ?? []).filter((p) => p.created_by !== currentUserExtId),
|
|
@@ -12612,9 +12612,9 @@ function SubscriptionStatus({ project }) {
|
|
|
12612
12612
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12613
12613
|
chunkWL57N2KJ_cjs.SubscriptionStatusView,
|
|
12614
12614
|
{
|
|
12615
|
-
resetDate:
|
|
12615
|
+
resetDate: chunkLX3JJYVP_cjs.formatResetDate(addons?.ai_usage_reset_at ?? current_period_end),
|
|
12616
12616
|
isCanceling: subscription === "canceled" || cancel_at_period_end === true,
|
|
12617
|
-
meters:
|
|
12617
|
+
meters: chunkLX3JJYVP_cjs.getQuotaItems(quotas).map((q) => ({
|
|
12618
12618
|
key: q.key,
|
|
12619
12619
|
icon: q.icon,
|
|
12620
12620
|
label: q.label,
|
|
@@ -12678,7 +12678,7 @@ function PendingChange({
|
|
|
12678
12678
|
}
|
|
12679
12679
|
);
|
|
12680
12680
|
}
|
|
12681
|
-
var titleFor = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `Add ${react.formatGbp(blockAiGbp ??
|
|
12681
|
+
var titleFor = (kind, blockAiGbp, blockStorageGb) => kind === "ai_usage" ? `Add ${react.formatGbp(blockAiGbp ?? chunkLX3JJYVP_cjs.ADDON_BLOCK_AI_GBP)} of AI usage` : `Add ${blockStorageGb ?? chunkLX3JJYVP_cjs.STORAGE_BLOCK_GB} GB storage`;
|
|
12682
12682
|
var blocksOf = (kind, project) => (kind === "ai_usage" ? project.addons?.ai_blocks : project.addons?.storage_blocks) ?? 0;
|
|
12683
12683
|
function Row({ label, children }) {
|
|
12684
12684
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-between gap-4", children: [
|
|
@@ -12699,11 +12699,11 @@ function AddAddonDialog({
|
|
|
12699
12699
|
const addons = project.addons;
|
|
12700
12700
|
if (!addons) return null;
|
|
12701
12701
|
const isAnnual = project.plan_interval === "year";
|
|
12702
|
-
const price =
|
|
12703
|
-
const nextCharge =
|
|
12704
|
-
const now = quote.data ?
|
|
12705
|
-
const renewal = quote.data ?
|
|
12706
|
-
const today = now ? { total:
|
|
12702
|
+
const price = chunkLX3JJYVP_cjs.addonCharge(kind, addons, isAnnual, addons.period_end ?? project.current_period_end);
|
|
12703
|
+
const nextCharge = chunkLX3JJYVP_cjs.formatPeriodEnd(addons.period_end ?? project.current_period_end);
|
|
12704
|
+
const now = quote.data ? chunkLX3JJYVP_cjs.quoteParts(quote.data.now) : null;
|
|
12705
|
+
const renewal = quote.data ? chunkLX3JJYVP_cjs.quoteParts(quote.data.renewal) : null;
|
|
12706
|
+
const today = now ? { total: chunkLX3JJYVP_cjs.money2(now.total), detail: chunkLX3JJYVP_cjs.taxDetail(now) } : { total: price.now, detail: `incl. VAT (${price.nowExVat} + ${price.nowVat} VAT)` };
|
|
12707
12707
|
const pricing = quote.isLoading;
|
|
12708
12708
|
const confirm = () => {
|
|
12709
12709
|
const before = blocksOf(kind, project);
|
|
@@ -12758,7 +12758,7 @@ function AddAddonDialog({
|
|
|
12758
12758
|
term: "Usage cap",
|
|
12759
12759
|
text: "Adding by hand is never blocked by the usage cap; the cap limits automatic top-ups only."
|
|
12760
12760
|
},
|
|
12761
|
-
...isAnnual && kind === "ai_usage" ? [{ term: "Annual", text: `${
|
|
12761
|
+
...isAnnual && kind === "ai_usage" ? [{ term: "Annual", text: `${chunkLX3JJYVP_cjs.ANNUAL_PREMIUM_AI_NOTE}.` }] : []
|
|
12762
12762
|
]
|
|
12763
12763
|
}
|
|
12764
12764
|
) })
|
|
@@ -12781,7 +12781,7 @@ function AddAddonDialog({
|
|
|
12781
12781
|
)
|
|
12782
12782
|
] }) }),
|
|
12783
12783
|
!pricing && /* @__PURE__ */ jsxRuntime.jsxs(Row, { label: "Next charge", children: [
|
|
12784
|
-
renewal ?
|
|
12784
|
+
renewal ? chunkLX3JJYVP_cjs.totalWithTaxWord(renewal) : price.then.replace(/\/(month|year)/, ""),
|
|
12785
12785
|
nextCharge ? ` on ${nextCharge}` : " at renewal"
|
|
12786
12786
|
] })
|
|
12787
12787
|
] }) }),
|
|
@@ -12812,11 +12812,11 @@ function ReduceAddonDialog({
|
|
|
12812
12812
|
const update = react.useUpdateProjectNextPeriodAddons();
|
|
12813
12813
|
const addons = project.addons;
|
|
12814
12814
|
if (!addons) return null;
|
|
12815
|
-
const { min, next } =
|
|
12815
|
+
const { min, next } = chunkLX3JJYVP_cjs.reduceBounds(kind, addons);
|
|
12816
12816
|
const keep = Math.max(min, next - 1);
|
|
12817
|
-
const size =
|
|
12818
|
-
const what =
|
|
12819
|
-
const from =
|
|
12817
|
+
const size = chunkLX3JJYVP_cjs.nextRemovedBlockSize(kind, addons);
|
|
12818
|
+
const what = chunkLX3JJYVP_cjs.stepLabel(kind, size);
|
|
12819
|
+
const from = chunkLX3JJYVP_cjs.formatPeriodEnd(addons.period_end ?? project.current_period_end) ?? "your next renewal";
|
|
12820
12820
|
const fromShort = from.replace(/ \d{4}$/, "");
|
|
12821
12821
|
const allowanceNext = kind === "ai_usage" ? addons.ai_allowance_next_gbp - size : addons.storage_allowance_next_gb - size;
|
|
12822
12822
|
const allowanceNow = kind === "ai_usage" ? addons.ai_allowance_gbp : addons.storage_allowance_gb;
|
|
@@ -12824,7 +12824,7 @@ function ReduceAddonDialog({
|
|
|
12824
12824
|
const save = () => update.mutate(
|
|
12825
12825
|
{
|
|
12826
12826
|
projectExtId: project.external_id,
|
|
12827
|
-
body:
|
|
12827
|
+
body: chunkLX3JJYVP_cjs.nextPeriodBody(kind, keep)
|
|
12828
12828
|
},
|
|
12829
12829
|
{
|
|
12830
12830
|
onSuccess: () => {
|
|
@@ -12891,7 +12891,7 @@ function ReduceAddonDialog({
|
|
|
12891
12891
|
}
|
|
12892
12892
|
) });
|
|
12893
12893
|
}
|
|
12894
|
-
var gbp = (pence) =>
|
|
12894
|
+
var gbp = (pence) => chunkLX3JJYVP_cjs.formatMoney(pence, "gbp");
|
|
12895
12895
|
var gb2 = (n) => `${Math.round(n * 10) / 10} GB`;
|
|
12896
12896
|
var pct = (used, limit) => limit > 0 ? Math.min(100, used / limit * 100) : 0;
|
|
12897
12897
|
function formatShortDate(unix) {
|
|
@@ -12903,20 +12903,20 @@ function AutoTopupThreshold({
|
|
|
12903
12903
|
addons
|
|
12904
12904
|
}) {
|
|
12905
12905
|
const updateSettings = react.useUpdateProjectAddonSettings();
|
|
12906
|
-
const min = addons.min_auto_topup_threshold_gbp ||
|
|
12906
|
+
const min = addons.min_auto_topup_threshold_gbp || chunkLX3JJYVP_cjs.MIN_AUTO_TOPUP_THRESHOLD_GBP;
|
|
12907
12907
|
const saved = addons.auto_topup_threshold_gbp;
|
|
12908
12908
|
const [value, setValue] = React7.useState(String(saved));
|
|
12909
12909
|
React7.useEffect(() => setValue(String(saved)), [saved]);
|
|
12910
12910
|
const parsed = Number(value);
|
|
12911
12911
|
const valid = Number.isFinite(parsed) && parsed >= min;
|
|
12912
12912
|
const dirty = valid && parsed !== saved;
|
|
12913
|
-
const off =
|
|
12913
|
+
const off = chunkLX3JJYVP_cjs.isAddonBudgetZero(addons);
|
|
12914
12914
|
const save = () => {
|
|
12915
12915
|
if (!dirty) return;
|
|
12916
12916
|
updateSettings.mutate(
|
|
12917
12917
|
{
|
|
12918
12918
|
projectExtId: project.external_id,
|
|
12919
|
-
body:
|
|
12919
|
+
body: chunkLX3JJYVP_cjs.addonSettingsBody(addons, { auto_topup_threshold_gbp: parsed })
|
|
12920
12920
|
},
|
|
12921
12921
|
{
|
|
12922
12922
|
onSuccess: () => shell.notify.success(`Auto-add below ${react.formatGbp(parsed)} of AI usage left`),
|
|
@@ -13013,10 +13013,10 @@ function ResourceMeter({
|
|
|
13013
13013
|
const update = react.useUpdateProjectNextPeriodAddons();
|
|
13014
13014
|
const isAi = kind === "ai_usage";
|
|
13015
13015
|
const slug = isAi ? "ai-usage" : "storage";
|
|
13016
|
-
const periodEnd =
|
|
13016
|
+
const periodEnd = chunkLX3JJYVP_cjs.formatPeriodEnd(addons.period_end ?? project.current_period_end);
|
|
13017
13017
|
const from = periodEnd ?? "your next renewal";
|
|
13018
13018
|
const fromShort = formatShortDate(addons.period_end ?? project.current_period_end) ?? "renewal";
|
|
13019
|
-
const { min, current: current2, next } =
|
|
13019
|
+
const { min, current: current2, next } = chunkLX3JJYVP_cjs.reduceBounds(kind, addons);
|
|
13020
13020
|
const fmt = (n) => isAi ? react.formatGbp(n) : gb2(n);
|
|
13021
13021
|
const used = isAi ? addons.ai_used_gbp : addons.storage_used_gb;
|
|
13022
13022
|
const allowance = isAi ? addons.ai_allowance_gbp : addons.storage_allowance_gb;
|
|
@@ -13024,15 +13024,15 @@ function ResourceMeter({
|
|
|
13024
13024
|
const plan = isAi ? addons.plan_ai_gbp : addons.plan_storage_gb;
|
|
13025
13025
|
const topUps = Math.max(0, allowance - plan);
|
|
13026
13026
|
const blocks = isAi ? addons.ai_blocks : addons.storage_blocks;
|
|
13027
|
-
const hasLegacy =
|
|
13028
|
-
const room =
|
|
13029
|
-
const capZero =
|
|
13030
|
-
const resets = isAi ? formatShortDate(
|
|
13031
|
-
const removeSize =
|
|
13027
|
+
const hasLegacy = chunkLX3JJYVP_cjs.splitBlocks(kind, blocks, addons).legacy > 0;
|
|
13028
|
+
const room = chunkLX3JJYVP_cjs.autoRoom(kind, addons);
|
|
13029
|
+
const capZero = chunkLX3JJYVP_cjs.isAddonBudgetZero(addons);
|
|
13030
|
+
const resets = isAi ? formatShortDate(chunkLX3JJYVP_cjs.aiUsageResetTimestamp(project)) : null;
|
|
13031
|
+
const removeSize = chunkLX3JJYVP_cjs.nextRemovedBlockSize(kind, addons);
|
|
13032
13032
|
const undo = () => update.mutate(
|
|
13033
13033
|
{
|
|
13034
13034
|
projectExtId: project.external_id,
|
|
13035
|
-
body:
|
|
13035
|
+
body: chunkLX3JJYVP_cjs.nextPeriodBody(kind, current2)
|
|
13036
13036
|
},
|
|
13037
13037
|
{
|
|
13038
13038
|
onSuccess: () => shell.notify.success("Kept"),
|
|
@@ -13049,7 +13049,7 @@ function ResourceMeter({
|
|
|
13049
13049
|
allowance: { used, plan, topUps, autoRoom: capZero ? 0 : room },
|
|
13050
13050
|
legend: {
|
|
13051
13051
|
plan: `Plan ${fmt(plan)}`,
|
|
13052
|
-
topUps: topUps > 0 ? `Top-ups ${fmt(topUps)}${hasLegacy ? ` (${
|
|
13052
|
+
topUps: topUps > 0 ? `Top-ups ${fmt(topUps)}${hasLegacy ? ` (${chunkLX3JJYVP_cjs.blocksLabel(kind, blocks, addons)})` : ""}` : void 0,
|
|
13053
13053
|
autoRoom: room != null && room > 0 && !capZero ? `Automatic up to ${fmt(room)}` : void 0
|
|
13054
13054
|
},
|
|
13055
13055
|
testId: `usage-meter-${slug}`,
|
|
@@ -13078,9 +13078,9 @@ function ResourceMeter({
|
|
|
13078
13078
|
{
|
|
13079
13079
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-3.5" }),
|
|
13080
13080
|
label: isAi ? react.formatGbp(addons.block_ai_gbp) : `${addons.block_storage_gb} GB`,
|
|
13081
|
-
caption:
|
|
13081
|
+
caption: chunkLX3JJYVP_cjs.addStepCaption(kind, addons),
|
|
13082
13082
|
onClick: onAdd,
|
|
13083
|
-
ariaLabel: `Add ${
|
|
13083
|
+
ariaLabel: `Add ${chunkLX3JJYVP_cjs.stepLabel(kind, isAi ? addons.block_ai_gbp : addons.block_storage_gb)}`,
|
|
13084
13084
|
testId: isAi ? "add-ai-block-button" : "add-storage-block-button"
|
|
13085
13085
|
}
|
|
13086
13086
|
),
|
|
@@ -13091,7 +13091,7 @@ function ResourceMeter({
|
|
|
13091
13091
|
label: isAi ? react.formatGbp(removeSize) : `${removeSize} GB`,
|
|
13092
13092
|
caption: `from ${fromShort}`,
|
|
13093
13093
|
onClick: onReduce,
|
|
13094
|
-
ariaLabel: `Remove ${
|
|
13094
|
+
ariaLabel: `Remove ${chunkLX3JJYVP_cjs.stepLabel(kind, removeSize)} from ${from}`,
|
|
13095
13095
|
testId: `reduce-${slug}-button`
|
|
13096
13096
|
}
|
|
13097
13097
|
)
|
|
@@ -13130,10 +13130,10 @@ function UsageCapEditor({ project, addons }) {
|
|
|
13130
13130
|
updateSettings.mutate(
|
|
13131
13131
|
{
|
|
13132
13132
|
projectExtId: project.external_id,
|
|
13133
|
-
body:
|
|
13133
|
+
body: chunkLX3JJYVP_cjs.addonSettingsBody(addons, { spend_cap_pence: nextCap })
|
|
13134
13134
|
},
|
|
13135
13135
|
{
|
|
13136
|
-
onSuccess: () => shell.notify.success(
|
|
13136
|
+
onSuccess: () => shell.notify.success(chunkLX3JJYVP_cjs.budgetSavedMessage(nextCap)),
|
|
13137
13137
|
onError: (error) => shell.notify.error(addonErrorMessage(error))
|
|
13138
13138
|
}
|
|
13139
13139
|
);
|
|
@@ -13144,14 +13144,14 @@ function UsageCapEditor({ project, addons }) {
|
|
|
13144
13144
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13145
13145
|
chunkQZTNTP75_cjs.UsageMeter,
|
|
13146
13146
|
{
|
|
13147
|
-
label:
|
|
13147
|
+
label: chunkLX3JJYVP_cjs.USAGE_CAP_LABEL,
|
|
13148
13148
|
hint: spendResets && savedCap !== 0 ? `resets ${spendResets}` : void 0,
|
|
13149
13149
|
value: readout,
|
|
13150
13150
|
pct: savedCap != null && savedCap > 0 ? pct(spent, savedCap) : 0,
|
|
13151
13151
|
testId: "addon-spend"
|
|
13152
13152
|
}
|
|
13153
13153
|
),
|
|
13154
|
-
addons.cap_reached && savedCap != null && savedCap > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", "data-testid": "addon-cap-reached", children:
|
|
13154
|
+
addons.cap_reached && savedCap != null && savedCap > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", "data-testid": "addon-cap-reached", children: chunkLX3JJYVP_cjs.CAP_REACHED_MESSAGE }),
|
|
13155
13155
|
addons.manual_spent_pence > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-muted-foreground", "data-testid": "addon-manual-spend", children: [
|
|
13156
13156
|
"Added by hand this month: ",
|
|
13157
13157
|
gbp(addons.manual_spent_pence),
|
|
@@ -13172,7 +13172,7 @@ function UsageCapEditor({ project, addons }) {
|
|
|
13172
13172
|
step: 25,
|
|
13173
13173
|
className: "h-9 w-28",
|
|
13174
13174
|
value: noCap ? "" : value,
|
|
13175
|
-
placeholder: noCap ? "No limit" : String(
|
|
13175
|
+
placeholder: noCap ? "No limit" : String(chunkLX3JJYVP_cjs.DEFAULT_SPEND_CAP_PENCE / 100),
|
|
13176
13176
|
disabled: noCap,
|
|
13177
13177
|
onChange: (e) => setValue(e.target.value),
|
|
13178
13178
|
onKeyDown: (e) => e.key === "Enter" && save(),
|
|
@@ -13198,7 +13198,7 @@ function UsageCapEditor({ project, addons }) {
|
|
|
13198
13198
|
checked: noCap,
|
|
13199
13199
|
onCheckedChange: (checked) => {
|
|
13200
13200
|
setNoCap(checked);
|
|
13201
|
-
if (!checked && value === "") setValue(String(
|
|
13201
|
+
if (!checked && value === "") setValue(String(chunkLX3JJYVP_cjs.DEFAULT_SPEND_CAP_PENCE / 100));
|
|
13202
13202
|
},
|
|
13203
13203
|
"data-testid": "no-cap-switch"
|
|
13204
13204
|
}
|
|
@@ -13227,7 +13227,7 @@ function UsageInfo({ addons, isAnnual }) {
|
|
|
13227
13227
|
term: "Automatic top-ups",
|
|
13228
13228
|
text: "One step is added when AI usage drops below your auto top-up level, or when an upload needs more storage."
|
|
13229
13229
|
},
|
|
13230
|
-
{ term: "Usage cap", text:
|
|
13230
|
+
{ term: "Usage cap", text: chunkLX3JJYVP_cjs.USAGE_CAP_HELP },
|
|
13231
13231
|
{
|
|
13232
13232
|
term: "Reducing",
|
|
13233
13233
|
text: "\u2212 removes one step from your next renewal. You keep this period's allowance. No refunds."
|
|
@@ -13238,7 +13238,7 @@ function UsageInfo({ addons, isAnnual }) {
|
|
|
13238
13238
|
text: "Top-ups bought on an earlier price keep their size and price until removed; they are removed last."
|
|
13239
13239
|
}
|
|
13240
13240
|
] : [],
|
|
13241
|
-
...isAnnual ? [{ term: "Annual", text: `${
|
|
13241
|
+
...isAnnual ? [{ term: "Annual", text: `${chunkLX3JJYVP_cjs.ANNUAL_PREMIUM_AI_NOTE}.` }] : [],
|
|
13242
13242
|
{
|
|
13243
13243
|
term: "Prices",
|
|
13244
13244
|
text: "Shown ex VAT. The confirm step shows the total with VAT before you pay."
|
|
@@ -13330,7 +13330,7 @@ function formatShortDate2(unix) {
|
|
|
13330
13330
|
if (!unix) return null;
|
|
13331
13331
|
return new Date(unix * 1e3).toLocaleDateString("en-GB", { day: "numeric", month: "short" });
|
|
13332
13332
|
}
|
|
13333
|
-
var gbp2 = (pence) =>
|
|
13333
|
+
var gbp2 = (pence) => chunkLX3JJYVP_cjs.formatMoney(pence, "gbp");
|
|
13334
13334
|
var gbNum = (n) => `${Math.round(n * 10) / 10}`;
|
|
13335
13335
|
var pct2 = (used, limit) => limit > 0 ? Math.min(100, used / limit * 100) : 0;
|
|
13336
13336
|
function Meter({
|
|
@@ -13348,15 +13348,15 @@ function Meter({
|
|
|
13348
13348
|
] });
|
|
13349
13349
|
}
|
|
13350
13350
|
function usePlanPrice(project) {
|
|
13351
|
-
const { data: products } = react.useProducts({ enabled:
|
|
13352
|
-
if (!
|
|
13351
|
+
const { data: products } = react.useProducts({ enabled: chunkLX3JJYVP_cjs.isProProject(project) });
|
|
13352
|
+
if (!chunkLX3JJYVP_cjs.isProProject(project)) return null;
|
|
13353
13353
|
const isAnnual = project.plan_interval === "year";
|
|
13354
13354
|
if (project.amount != null) {
|
|
13355
13355
|
return { incl: project.amount, ex: project.amount_ex_vat ?? null, isAnnual };
|
|
13356
13356
|
}
|
|
13357
|
-
if ((project.packs ??
|
|
13358
|
-
const prices =
|
|
13359
|
-
const pp =
|
|
13357
|
+
if ((project.packs ?? chunkLX3JJYVP_cjs.PRO_PACKS) > chunkLX3JJYVP_cjs.PRO_PACKS) return null;
|
|
13358
|
+
const prices = chunkLX3JJYVP_cjs.findProPrices(products);
|
|
13359
|
+
const pp = chunkLX3JJYVP_cjs.packPrice(isAnnual ? prices.annual : prices.monthly);
|
|
13360
13360
|
return pp ? { incl: pp.amount, ex: pp.amount_ex_vat, isAnnual } : null;
|
|
13361
13361
|
}
|
|
13362
13362
|
function paidLine(payment, addons) {
|
|
@@ -13369,11 +13369,11 @@ function ProjectPlanCard({
|
|
|
13369
13369
|
onChangePlan
|
|
13370
13370
|
}) {
|
|
13371
13371
|
const { quotas, addons } = project;
|
|
13372
|
-
const isPro =
|
|
13372
|
+
const isPro = chunkLX3JJYVP_cjs.isProProject(project);
|
|
13373
13373
|
const used = quotas?.ai_usage?.used ?? 0;
|
|
13374
13374
|
const limit = quotas?.ai_usage?.limit ?? 0;
|
|
13375
|
-
const resetDate = formatShortDate2(
|
|
13376
|
-
const periodEnd =
|
|
13375
|
+
const resetDate = formatShortDate2(chunkLX3JJYVP_cjs.aiUsageResetTimestamp(project));
|
|
13376
|
+
const periodEnd = chunkLX3JJYVP_cjs.formatPeriodEnd(addons?.period_end ?? project.current_period_end);
|
|
13377
13377
|
const when2 = periodEnd ?? "the end of the period";
|
|
13378
13378
|
const storageUsed = quotas?.storage_gb?.used ?? 0;
|
|
13379
13379
|
const storageLimit = quotas?.storage_gb?.limit ?? 0;
|
|
@@ -13389,7 +13389,7 @@ function ProjectPlanCard({
|
|
|
13389
13389
|
project.external_id,
|
|
13390
13390
|
hasScheduledChange && addons ? { packs: packsNext ?? addons.packs, interval: pending ?? currentInterval } : null
|
|
13391
13391
|
).data;
|
|
13392
|
-
const tier = isPro ?
|
|
13392
|
+
const tier = isPro ? chunkLX3JJYVP_cjs.proTierName(project) : project.subscription === "dev" ? "Dev" : "Free";
|
|
13393
13393
|
const pendingPayment = addons?.payment?.status === "pending" ? addons.payment : null;
|
|
13394
13394
|
const confirmUrl = pendingPayment?.confirm_url ?? addons?.confirm_url;
|
|
13395
13395
|
const paidPayment = addons?.payment?.status === "paid" ? addons.payment : null;
|
|
@@ -13423,7 +13423,7 @@ function ProjectPlanCard({
|
|
|
13423
13423
|
isPro && " ",
|
|
13424
13424
|
isPro && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-sm font-normal text-muted-foreground", children: currentInterval === "year" ? "Annual" : "Monthly" })
|
|
13425
13425
|
] }),
|
|
13426
|
-
isPro && periodEnd && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", "data-testid": "project-plan-renews", children: isCanceling ? `Ends ${periodEnd}` : hasScheduledChange && nextBill ? `Next bill ${
|
|
13426
|
+
isPro && periodEnd && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", "data-testid": "project-plan-renews", children: isCanceling ? `Ends ${periodEnd}` : hasScheduledChange && nextBill ? `Next bill ${chunkLX3JJYVP_cjs.totalWithTaxWord({
|
|
13427
13427
|
subtotal: nextBill.next_renewal_ex_vat_pence,
|
|
13428
13428
|
tax: nextBill.next_renewal_tax_pence,
|
|
13429
13429
|
total: nextBill.next_renewal_pence,
|
|
@@ -13432,7 +13432,7 @@ function ProjectPlanCard({
|
|
|
13432
13432
|
] }),
|
|
13433
13433
|
price && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto text-right", "data-testid": "project-plan-price", children: [
|
|
13434
13434
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-lg font-semibold tabular-nums text-foreground", children: [
|
|
13435
|
-
price.ex != null ?
|
|
13435
|
+
price.ex != null ? chunkLX3JJYVP_cjs.plusVat(price.ex) : gbp2(price.incl),
|
|
13436
13436
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-normal text-muted-foreground", children: price.isAnnual ? "/year" : "/month" })
|
|
13437
13437
|
] }),
|
|
13438
13438
|
price.ex != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xs text-muted-foreground", children: [
|
|
@@ -13470,7 +13470,7 @@ function ProjectPlanCard({
|
|
|
13470
13470
|
undoTestId: "undo-plan-change-button",
|
|
13471
13471
|
children: [
|
|
13472
13472
|
"Changes to ",
|
|
13473
|
-
|
|
13473
|
+
chunkLX3JJYVP_cjs.planNameForPacks(packsNext),
|
|
13474
13474
|
" on ",
|
|
13475
13475
|
when2,
|
|
13476
13476
|
"."
|
|
@@ -13561,7 +13561,7 @@ function ProjectBilling({
|
|
|
13561
13561
|
const { addons } = project;
|
|
13562
13562
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", "data-testid": "project-billing", children: [
|
|
13563
13563
|
/* @__PURE__ */ jsxRuntime.jsx(ProjectPlanCard, { project, onChangePlan }),
|
|
13564
|
-
addons &&
|
|
13564
|
+
addons && chunkLX3JJYVP_cjs.isProProject(project) && /* @__PURE__ */ jsxRuntime.jsx(ProjectUsageCard, { project, addons })
|
|
13565
13565
|
] });
|
|
13566
13566
|
}
|
|
13567
13567
|
var BREAKDOWN_LABELS = {
|
|
@@ -13826,13 +13826,13 @@ function ProjectUsageContent({
|
|
|
13826
13826
|
);
|
|
13827
13827
|
}
|
|
13828
13828
|
function ProjectDetail({ projectExtId, storage }) {
|
|
13829
|
-
const { stripeEnabled } =
|
|
13829
|
+
const { stripeEnabled } = chunkLX3JJYVP_cjs.useBillingSupport();
|
|
13830
13830
|
const [planOpen, setPlanOpen] = React7.useState(false);
|
|
13831
13831
|
const [renameOpen, setRenameOpen] = React7.useState(false);
|
|
13832
13832
|
const [renameValue, setRenameValue] = React7.useState("");
|
|
13833
13833
|
const updateProject = react.useUpdateProjectFields();
|
|
13834
13834
|
const { data: projects, isLoading } = react.useProjects();
|
|
13835
|
-
const currentUserExtId =
|
|
13835
|
+
const currentUserExtId = chunkLX3JJYVP_cjs.useSelfExtId();
|
|
13836
13836
|
const project = projects?.find((p) => p.external_id === projectExtId);
|
|
13837
13837
|
const handleSaveRename = React7.useCallback(() => {
|
|
13838
13838
|
const trimmed = renameValue.trim();
|
|
@@ -13878,7 +13878,7 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
13878
13878
|
setRenameValue(project.name);
|
|
13879
13879
|
setRenameOpen(true);
|
|
13880
13880
|
},
|
|
13881
|
-
badge: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx(chunkWL57N2KJ_cjs.PlanBadge, { ...
|
|
13881
|
+
badge: stripeEnabled ? /* @__PURE__ */ jsxRuntime.jsx(chunkWL57N2KJ_cjs.PlanBadge, { ...chunkLX3JJYVP_cjs.planBadgeView(project), size: "md" }) : void 0
|
|
13882
13882
|
}
|
|
13883
13883
|
),
|
|
13884
13884
|
hasBilling && /* @__PURE__ */ jsxRuntime.jsx(ProjectBilling, { project, onChangePlan: () => setPlanOpen(true) }),
|
|
@@ -13923,7 +13923,7 @@ function ProjectDetail({ projectExtId, storage }) {
|
|
|
13923
13923
|
] });
|
|
13924
13924
|
}
|
|
13925
13925
|
function createProjectErrorMessage(error, fallback = `Failed to create ${ui.entityNoun("PROJECT")}`) {
|
|
13926
|
-
const detail =
|
|
13926
|
+
const detail = chunkLX3JJYVP_cjs.apiErrorDetail(error);
|
|
13927
13927
|
if (typeof detail === "string" && detail) return detail;
|
|
13928
13928
|
const message = detail?.message;
|
|
13929
13929
|
return typeof message === "string" && message ? message : fallback;
|
|
@@ -13933,7 +13933,7 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
13933
13933
|
const [plan, setPlan] = React7.useState("pro");
|
|
13934
13934
|
const [isAnnual, setIsAnnual] = React7.useState(false);
|
|
13935
13935
|
const [promoCode, setPromoCode] = React7.useState("");
|
|
13936
|
-
const [addonBudget, setAddonBudget] = React7.useState(String(
|
|
13936
|
+
const [addonBudget, setAddonBudget] = React7.useState(String(chunkLX3JJYVP_cjs.DEFAULT_SPEND_CAP_PENCE / 100));
|
|
13937
13937
|
const [checkoutBudget, setCheckoutBudget] = React7.useState(null);
|
|
13938
13938
|
const [aiBlocks, setAiBlocks] = React7.useState(0);
|
|
13939
13939
|
const [storageBlocks, setStorageBlocks] = React7.useState(0);
|
|
@@ -13947,7 +13947,7 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
13947
13947
|
const [checkoutProjectName, setCheckoutProjectName] = React7.useState("");
|
|
13948
13948
|
const [checkoutInterval, setCheckoutInterval] = React7.useState("month");
|
|
13949
13949
|
const paymentCompletedRef = React7.useRef(false);
|
|
13950
|
-
const { stripeEnabled } =
|
|
13950
|
+
const { stripeEnabled } = chunkLX3JJYVP_cjs.useBillingSupport();
|
|
13951
13951
|
const { data: products, isLoading: productsLoading } = react.useProducts({
|
|
13952
13952
|
enabled: stripeEnabled
|
|
13953
13953
|
});
|
|
@@ -13976,18 +13976,18 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
13976
13976
|
setPlan("pro");
|
|
13977
13977
|
setPromoCode("");
|
|
13978
13978
|
setPostalCode("");
|
|
13979
|
-
setAddonBudget(String(
|
|
13979
|
+
setAddonBudget(String(chunkLX3JJYVP_cjs.DEFAULT_SPEND_CAP_PENCE / 100));
|
|
13980
13980
|
setAiBlocks(0);
|
|
13981
13981
|
setStorageBlocks(0);
|
|
13982
13982
|
setIsCreating(false);
|
|
13983
13983
|
}
|
|
13984
13984
|
onOpenChange(newOpen);
|
|
13985
13985
|
};
|
|
13986
|
-
const prices =
|
|
13986
|
+
const prices = chunkLX3JJYVP_cjs.findProPrices(products);
|
|
13987
13987
|
const intervalPrice = isAnnual ? prices.annual : prices.monthly;
|
|
13988
|
-
const selectedPrice =
|
|
13988
|
+
const selectedPrice = chunkLX3JJYVP_cjs.packPrice(intervalPrice);
|
|
13989
13989
|
const currency = intervalPrice?.currency ?? "gbp";
|
|
13990
|
-
const savingsPercent =
|
|
13990
|
+
const savingsPercent = chunkLX3JJYVP_cjs.calcSavingsPercent(prices.monthly, prices.annual);
|
|
13991
13991
|
const isPro = stripeEnabled && plan !== "free";
|
|
13992
13992
|
const quote = useCheckoutQuote({
|
|
13993
13993
|
interval: isAnnual ? "year" : "month",
|
|
@@ -13997,14 +13997,14 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
13997
13997
|
storageBlocks,
|
|
13998
13998
|
enabled: open && isPro && !!selectedPrice
|
|
13999
13999
|
});
|
|
14000
|
-
const canSubmit = !!projectName.trim() && !isCreating && !createProject.isPending && (!isPro || !!selectedPrice &&
|
|
14000
|
+
const canSubmit = !!projectName.trim() && !isCreating && !createProject.isPending && (!isPro || !!selectedPrice && chunkLX3JJYVP_cjs.parseBudgetPounds(addonBudget) !== void 0 && quote.canContinue);
|
|
14001
14001
|
const handleCreateFree = () => {
|
|
14002
14002
|
setIsCreating(true);
|
|
14003
14003
|
createProject.mutate(
|
|
14004
14004
|
{
|
|
14005
14005
|
name: projectName.trim(),
|
|
14006
14006
|
plan: "free",
|
|
14007
|
-
daily_cap_per_user:
|
|
14007
|
+
daily_cap_per_user: chunkLX3JJYVP_cjs.SUGGESTED_DAILY_CAP_PER_USER
|
|
14008
14008
|
},
|
|
14009
14009
|
{
|
|
14010
14010
|
onSuccess: () => {
|
|
@@ -14021,14 +14021,14 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
14021
14021
|
};
|
|
14022
14022
|
const handleSubscribe = () => {
|
|
14023
14023
|
const interval = isAnnual ? "year" : "month";
|
|
14024
|
-
const parsed =
|
|
14025
|
-
const budgetToSend = parsed == null || parsed ===
|
|
14024
|
+
const parsed = chunkLX3JJYVP_cjs.parseBudgetPounds(addonBudget);
|
|
14025
|
+
const budgetToSend = parsed == null || parsed === chunkLX3JJYVP_cjs.DEFAULT_SPEND_CAP_PENCE ? null : parsed;
|
|
14026
14026
|
setIsCreating(true);
|
|
14027
14027
|
createProject.mutate(
|
|
14028
14028
|
{
|
|
14029
14029
|
name: projectName.trim(),
|
|
14030
14030
|
plan: "pro",
|
|
14031
|
-
daily_cap_per_user:
|
|
14031
|
+
daily_cap_per_user: chunkLX3JJYVP_cjs.SUGGESTED_DAILY_CAP_PER_USER
|
|
14032
14032
|
},
|
|
14033
14033
|
{
|
|
14034
14034
|
onSuccess: (newProject) => {
|
|
@@ -14183,7 +14183,7 @@ function NewProjectFlow({ open, onOpenChange, defaultName }) {
|
|
|
14183
14183
|
function useAutoRefreshPendingProjects() {
|
|
14184
14184
|
const { data: projects } = react.useProjects();
|
|
14185
14185
|
const refreshProject = react.useRefreshProject();
|
|
14186
|
-
const currentUserExtId =
|
|
14186
|
+
const currentUserExtId = chunkLX3JJYVP_cjs.useSelfExtId();
|
|
14187
14187
|
const refreshedRef = React7.useRef(/* @__PURE__ */ new Set());
|
|
14188
14188
|
React7.useEffect(() => {
|
|
14189
14189
|
if (!projects || !currentUserExtId) return;
|
|
@@ -14214,7 +14214,7 @@ function ConnectedQuotaDialog({ info, onClose: close }) {
|
|
|
14214
14214
|
if (quotaProjectId) void refetchProjects();
|
|
14215
14215
|
}, [quotaProjectId, refetchProjects]);
|
|
14216
14216
|
const project = info?.projectExtId ? projects?.find((p) => p.external_id === info.projectExtId) : void 0;
|
|
14217
|
-
const addons = project &&
|
|
14217
|
+
const addons = project && chunkLX3JJYVP_cjs.isProProject(project) ? project.addons : null;
|
|
14218
14218
|
const handleUpgrade = () => {
|
|
14219
14219
|
if (info?.projectExtId) {
|
|
14220
14220
|
requestProjectBillingFocus({ projectExtId: info.projectExtId, openUpgrade: true });
|
|
@@ -14250,8 +14250,8 @@ function ConnectedQuotaDialog({ info, onClose: close }) {
|
|
|
14250
14250
|
/* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {})
|
|
14251
14251
|
);
|
|
14252
14252
|
} else if (addons) {
|
|
14253
|
-
const price = `${
|
|
14254
|
-
const capZero =
|
|
14253
|
+
const price = `${chunkLX3JJYVP_cjs.formatMoney(addons.ai_block_price_ex_vat_pence, "gbp")} + VAT`;
|
|
14254
|
+
const capZero = chunkLX3JJYVP_cjs.isAddonBudgetZero(addons);
|
|
14255
14255
|
const addAiUsage = /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: handleAddAiUsage, "data-testid": "quota-add-ai-usage-button", children: [
|
|
14256
14256
|
"Add ",
|
|
14257
14257
|
react.formatGbp(addons.block_ai_gbp),
|
|
@@ -14259,7 +14259,7 @@ function ConnectedQuotaDialog({ info, onClose: close }) {
|
|
|
14259
14259
|
price
|
|
14260
14260
|
] });
|
|
14261
14261
|
if (capZero || addons.cap_reached) {
|
|
14262
|
-
message = capZero ?
|
|
14262
|
+
message = capZero ? chunkLX3JJYVP_cjs.ZERO_BUDGET_MESSAGE : chunkLX3JJYVP_cjs.CAP_REACHED_MESSAGE;
|
|
14263
14263
|
actions = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14264
14264
|
addAiUsage,
|
|
14265
14265
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outline", onClick: handleRaiseCap, "data-testid": "quota-raise-cap-button", children: capZero ? "Set cap" : "Raise cap" })
|
|
@@ -14369,7 +14369,7 @@ function ConnectedWelcomeDialog({
|
|
|
14369
14369
|
}) {
|
|
14370
14370
|
const currentUser = react.useArbiSession().user;
|
|
14371
14371
|
const { data: projects } = react.useProjects();
|
|
14372
|
-
const balance =
|
|
14372
|
+
const balance = chunkLX3JJYVP_cjs.useRewardBalance();
|
|
14373
14373
|
const [showPlans, setShowPlans] = React7.useState(false);
|
|
14374
14374
|
const [showInvite, setShowInvite] = React7.useState(false);
|
|
14375
14375
|
const [selectedProjectId, setSelectedProjectId] = React7.useState(null);
|
|
@@ -14394,15 +14394,15 @@ function ConnectedWelcomeDialog({
|
|
|
14394
14394
|
ConnectedAddContacts,
|
|
14395
14395
|
{
|
|
14396
14396
|
onClose: () => handleOpenChange(false),
|
|
14397
|
-
rewardAmount:
|
|
14397
|
+
rewardAmount: chunkLX3JJYVP_cjs.formatMoney(REFERRAL_OFFER.amount, REFERRAL_OFFER.currency)
|
|
14398
14398
|
}
|
|
14399
14399
|
) });
|
|
14400
14400
|
}
|
|
14401
14401
|
const firstName2 = currentUser?.given_name;
|
|
14402
14402
|
const hasBalance = balance !== null;
|
|
14403
|
-
const quotaItems =
|
|
14404
|
-
const resetTs =
|
|
14405
|
-
const aiUsageHint = resetTs ? `resets ${
|
|
14403
|
+
const quotaItems = chunkLX3JJYVP_cjs.getQuotaItems(selectedProject.quotas);
|
|
14404
|
+
const resetTs = chunkLX3JJYVP_cjs.aiUsageResetTimestamp(selectedProject);
|
|
14405
|
+
const aiUsageHint = resetTs ? `resets ${chunkLX3JJYVP_cjs.formatResetDate(resetTs)}` : void 0;
|
|
14406
14406
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14407
14407
|
chunkWL57N2KJ_cjs.WelcomeDialog,
|
|
14408
14408
|
{
|
|
@@ -14419,7 +14419,7 @@ function ConnectedWelcomeDialog({
|
|
|
14419
14419
|
onChange: setSelectedProjectId
|
|
14420
14420
|
}
|
|
14421
14421
|
),
|
|
14422
|
-
planBadge: /* @__PURE__ */ jsxRuntime.jsx(chunkWL57N2KJ_cjs.PlanBadge, { ...
|
|
14422
|
+
planBadge: /* @__PURE__ */ jsxRuntime.jsx(chunkWL57N2KJ_cjs.PlanBadge, { ...chunkLX3JJYVP_cjs.planBadgeView(selectedProject), size: "md" }),
|
|
14423
14423
|
quotas: quotaItems.map((q) => ({
|
|
14424
14424
|
key: q.key,
|
|
14425
14425
|
icon: q.icon,
|
|
@@ -14429,9 +14429,9 @@ function ConnectedWelcomeDialog({
|
|
|
14429
14429
|
hint: q.key === "ai-usage" ? aiUsageHint : void 0
|
|
14430
14430
|
})),
|
|
14431
14431
|
onSeePlans: () => setShowPlans(true),
|
|
14432
|
-
referralOfferLabel: `${
|
|
14432
|
+
referralOfferLabel: `${chunkLX3JJYVP_cjs.formatMoney(REFERRAL_OFFER.amount, REFERRAL_OFFER.currency)} off your plan`,
|
|
14433
14433
|
onInvite: () => setShowInvite(true),
|
|
14434
|
-
rewardBalanceLabel: hasBalance ?
|
|
14434
|
+
rewardBalanceLabel: hasBalance ? chunkLX3JJYVP_cjs.formatMoney(balance.amount, balance.currency) : void 0
|
|
14435
14435
|
}
|
|
14436
14436
|
);
|
|
14437
14437
|
}
|
|
@@ -14468,7 +14468,7 @@ function WorkspaceCardsView({
|
|
|
14468
14468
|
createDisabledReason,
|
|
14469
14469
|
workspaceState
|
|
14470
14470
|
}) {
|
|
14471
|
-
const { stripeEnabled } =
|
|
14471
|
+
const { stripeEnabled } = chunkLX3JJYVP_cjs.useBillingSupport();
|
|
14472
14472
|
const { hrefFor } = chunkAHYSHKPL_cjs.useBlocksEnvironment();
|
|
14473
14473
|
const workspaceLabel = ui.getEntityLabel("WORKSPACE");
|
|
14474
14474
|
const projectLabel = ui.getEntityLabel("PROJECT").toLowerCase();
|
|
@@ -14488,7 +14488,7 @@ function WorkspaceCardsView({
|
|
|
14488
14488
|
}
|
|
14489
14489
|
return /* @__PURE__ */ jsxRuntime.jsx(chunkV2GEULRG_cjs.WorkspaceList, { testId: "workspace-cards-list", children: groups.map((group) => {
|
|
14490
14490
|
const project = projects.find((p) => p.external_id === group.projectExtId);
|
|
14491
|
-
const { breakdown, readout } =
|
|
14491
|
+
const { breakdown, readout } = chunkLX3JJYVP_cjs.projectGroupBilling(project, {
|
|
14492
14492
|
isOwned: group.isOwned,
|
|
14493
14493
|
stripeEnabled
|
|
14494
14494
|
});
|
|
@@ -14548,7 +14548,7 @@ function WorkspaceCardsView({
|
|
|
14548
14548
|
ui.ShieldIcon,
|
|
14549
14549
|
{
|
|
14550
14550
|
char: workspace.name.charAt(0),
|
|
14551
|
-
workspaceColor:
|
|
14551
|
+
workspaceColor: chunkQWKT4DO6_cjs.workspaceKindColor(react.getWorkspaceKind(workspace)),
|
|
14552
14552
|
size: 28,
|
|
14553
14553
|
isSelected: true
|
|
14554
14554
|
}
|
|
@@ -14712,7 +14712,7 @@ function useConnectedWorkspaceList({
|
|
|
14712
14712
|
};
|
|
14713
14713
|
}
|
|
14714
14714
|
var WorkspaceTableView = React7.lazy(
|
|
14715
|
-
() => import('../WorkspaceTableView-
|
|
14715
|
+
() => import('../WorkspaceTableView-5I3KWZ5I.cjs').then((m) => ({ default: m.WorkspaceTableView }))
|
|
14716
14716
|
);
|
|
14717
14717
|
var WORKSPACES_TAB_ID = "workspaces";
|
|
14718
14718
|
var defaultRenderMember2 = (user, size) => {
|
|
@@ -14764,7 +14764,7 @@ function ConnectedWorkspaceList({
|
|
|
14764
14764
|
else void openWorkspace(workspace.external_id, { name: workspace.name });
|
|
14765
14765
|
};
|
|
14766
14766
|
const createDisabledReason = list.canCreateProjects === false ? react.PROJECT_CREATION_DENIED_REASON : void 0;
|
|
14767
|
-
if (list.isLoading) return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14767
|
+
if (list.isLoading) return /* @__PURE__ */ jsxRuntime.jsx(chunkI45LDMQU_cjs.LoadingIndicator, { message: "Loading workspaces..." });
|
|
14768
14768
|
if (list.error) {
|
|
14769
14769
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14770
14770
|
chunkORVJFY72_cjs.HomeLoadError,
|
|
@@ -14837,7 +14837,7 @@ function ConnectedWorkspaceList({
|
|
|
14837
14837
|
workspaceState
|
|
14838
14838
|
}
|
|
14839
14839
|
) })
|
|
14840
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(React7.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14840
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(React7.Suspense, { fallback: /* @__PURE__ */ jsxRuntime.jsx(chunkI45LDMQU_cjs.LoadingIndicator, { message: "Loading grid..." }), children: /* @__PURE__ */ jsxRuntime.jsx(chunkORVJFY72_cjs.HomeCenteredColumn, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14841
14841
|
WorkspaceTableView,
|
|
14842
14842
|
{
|
|
14843
14843
|
list,
|
|
@@ -15079,7 +15079,7 @@ function ProjectsListPage({
|
|
|
15079
15079
|
}
|
|
15080
15080
|
),
|
|
15081
15081
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15082
|
-
|
|
15082
|
+
chunkI45LDMQU_cjs.Toolbar,
|
|
15083
15083
|
{
|
|
15084
15084
|
search,
|
|
15085
15085
|
onSearch: setSearch,
|
|
@@ -15143,7 +15143,7 @@ function ProjectsPanel({
|
|
|
15143
15143
|
const { data: projects } = react.useProjects();
|
|
15144
15144
|
const canCreateProjects = react.useCanCreateProjects();
|
|
15145
15145
|
const { userId } = chunkNZCAWWV4_cjs.useConnectedWorkspace();
|
|
15146
|
-
const { stripeEnabled } =
|
|
15146
|
+
const { stripeEnabled } = chunkLX3JJYVP_cjs.useBillingSupport();
|
|
15147
15147
|
const billingPortal = useOpenBillingPortal();
|
|
15148
15148
|
const [newProjectOpen, setNewProjectOpen] = React7.useState(false);
|
|
15149
15149
|
useAutoRefreshPendingProjects();
|
|
@@ -15495,7 +15495,7 @@ var COMPACT_BELOW = 132;
|
|
|
15495
15495
|
var NO_DOCUMENTS = [];
|
|
15496
15496
|
function useFilesWorkspace() {
|
|
15497
15497
|
const { workspaceId, userId, live } = chunkNZCAWWV4_cjs.useConnectedWorkspace();
|
|
15498
|
-
const { members, role } =
|
|
15498
|
+
const { members, role } = chunkSQQULKT4_cjs.useConnectedWorkspaceRole();
|
|
15499
15499
|
const { data: workspaces } = react.useWorkspaces({ enabled: live });
|
|
15500
15500
|
const workspaceName = workspaces?.find((w) => w.external_id === workspaceId)?.name;
|
|
15501
15501
|
return {
|
|
@@ -16255,7 +16255,7 @@ function ProjectChronology({
|
|
|
16255
16255
|
})),
|
|
16256
16256
|
[facts]
|
|
16257
16257
|
);
|
|
16258
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { className: "h-[min(70dvh,640px)] overflow-hidden", "data-testid": testId, children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "p-4 text-sm text-muted-foreground", children: loading }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
16258
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { className: "h-[min(70dvh,640px)] overflow-hidden", "data-testid": testId, children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "p-4 text-sm text-muted-foreground", children: loading }) : /* @__PURE__ */ jsxRuntime.jsx(chunkYD3RN2FY_cjs.FactsGanttPane, { items, testId: `${testId}-gantt`, labels: { ganttEmpty: empty } }) });
|
|
16259
16259
|
}
|
|
16260
16260
|
function ProjectThreads({
|
|
16261
16261
|
projectId,
|
|
@@ -17265,7 +17265,7 @@ function recentConversations(conversations) {
|
|
|
17265
17265
|
return [...conversations].sort((a, b) => time(b.updated_at) - time(a.updated_at)).slice(0, RECENT_ROWS).map((c) => ({
|
|
17266
17266
|
id: c.external_id,
|
|
17267
17267
|
title: c.title?.trim() || "Untitled thread",
|
|
17268
|
-
subtitle: c.status ? [
|
|
17268
|
+
subtitle: c.status ? [chunkTL5VXRNT_cjs.STATUS_LABELS[chunkTL5VXRNT_cjs.asTaskStatus(c.status)], c.due_at ? `due ${shortDate(c.due_at)}` : null].filter(Boolean).join(" \xB7 ") : `${c.message_count} ${c.message_count === 1 ? "message" : "messages"}`,
|
|
17269
17269
|
time: timeAndDate(c.updated_at)
|
|
17270
17270
|
}));
|
|
17271
17271
|
}
|
|
@@ -21023,7 +21023,7 @@ function EventEditorDialog({
|
|
|
21023
21023
|
const { notify: notify17, runtimeConfig } = chunkAHYSHKPL_cjs.useBlocksEnvironment();
|
|
21024
21024
|
const attachmentDocuments = documents.map((document2) => ({
|
|
21025
21025
|
doc_id: document2.external_id,
|
|
21026
|
-
title:
|
|
21026
|
+
title: chunkSQQULKT4_cjs.toWorkflowFieldDocument(document2).title,
|
|
21027
21027
|
url: chunk725OETK3_cjs.buildDeepLinkUrl(
|
|
21028
21028
|
{ workspaceId: workspaceId ?? void 0, documentId: document2.external_id },
|
|
21029
21029
|
runtimeConfig.deploymentDomain
|
|
@@ -23542,9 +23542,9 @@ function ConnectedTagEntity({
|
|
|
23542
23542
|
onEditClick();
|
|
23543
23543
|
}
|
|
23544
23544
|
};
|
|
23545
|
-
const tooltipContent = showTooltip ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
23545
|
+
const tooltipContent = showTooltip ? /* @__PURE__ */ jsxRuntime.jsxs(chunkI45LDMQU_cjs.EntityTooltip, { children: [
|
|
23546
23546
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
23547
|
-
|
|
23547
|
+
chunkI45LDMQU_cjs.EntityTooltipHeader,
|
|
23548
23548
|
{
|
|
23549
23549
|
lead: /* @__PURE__ */ jsxRuntime.jsx(
|
|
23550
23550
|
"span",
|
|
@@ -27699,7 +27699,7 @@ function ConnectedFilesPage({
|
|
|
27699
27699
|
const deleteDocuments = react.useDeleteDocuments();
|
|
27700
27700
|
const isDocumentsPending = isLoading && documents.length === 0;
|
|
27701
27701
|
const { workspaceId, userId, live } = chunkNZCAWWV4_cjs.useConnectedWorkspace();
|
|
27702
|
-
const { role, members } =
|
|
27702
|
+
const { role, members } = chunkSQQULKT4_cjs.useConnectedWorkspaceRole();
|
|
27703
27703
|
const { data: workspaces } = react.useWorkspaces({ enabled: live });
|
|
27704
27704
|
const workspaceName = workspaces?.find((w) => w.external_id === workspaceId)?.name;
|
|
27705
27705
|
const isMember = role != null;
|
|
@@ -28114,7 +28114,7 @@ function ConnectedFilesPage({
|
|
|
28114
28114
|
viewMode === "grid" ? (
|
|
28115
28115
|
// ‹ n / N › over the table's displayed rows; a step opens the document.
|
|
28116
28116
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28117
|
-
|
|
28117
|
+
chunkI45LDMQU_cjs.GridRowNavigator,
|
|
28118
28118
|
{
|
|
28119
28119
|
gridApi,
|
|
28120
28120
|
selectedId: viewingDocumentId ?? selectedDocumentIds[0] ?? null,
|
|
@@ -29658,7 +29658,7 @@ function ConnectedConfigForm({ availableModels, ...rest }) {
|
|
|
29658
29658
|
({ value, onChange }) => /* @__PURE__ */ jsxRuntime.jsx(ConnectedModelSelector, { value, onValueChange: onChange, className: "w-full" }),
|
|
29659
29659
|
[]
|
|
29660
29660
|
);
|
|
29661
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29661
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConfigForm, { ...rest, renderModelSelect: hasModels ? renderModelSelect : void 0 });
|
|
29662
29662
|
}
|
|
29663
29663
|
function ConnectedAgentConfigForm({ agentExtId, agentName, onSaved }) {
|
|
29664
29664
|
const { notify: notify17 } = chunkAHYSHKPL_cjs.useBlocksEnvironment();
|
|
@@ -29775,7 +29775,7 @@ function ConnectedAuthorizeAgent({ onClose, editAgent }) {
|
|
|
29775
29775
|
}, [name, selectedWorkspaces, role, createAgent, addWorkspaceUsers, arbi, notify17]);
|
|
29776
29776
|
if (editAgent) {
|
|
29777
29777
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29778
|
-
|
|
29778
|
+
chunkTL5VXRNT_cjs.AgentEditView,
|
|
29779
29779
|
{
|
|
29780
29780
|
agentName: editAgent.name,
|
|
29781
29781
|
config: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -29791,7 +29791,7 @@ function ConnectedAuthorizeAgent({ onClose, editAgent }) {
|
|
|
29791
29791
|
}
|
|
29792
29792
|
if (view === "main") {
|
|
29793
29793
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29794
|
-
|
|
29794
|
+
chunkTL5VXRNT_cjs.AgentMainView,
|
|
29795
29795
|
{
|
|
29796
29796
|
onConnectExternal: () => setView("connect"),
|
|
29797
29797
|
config: mainAgent ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -29807,11 +29807,11 @@ function ConnectedAuthorizeAgent({ onClose, editAgent }) {
|
|
|
29807
29807
|
}
|
|
29808
29808
|
if (result) {
|
|
29809
29809
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29810
|
-
|
|
29810
|
+
chunkTL5VXRNT_cjs.AgentCreatedView,
|
|
29811
29811
|
{
|
|
29812
29812
|
email: result.email,
|
|
29813
29813
|
signingKey: result.signingKey,
|
|
29814
|
-
instructions: /* @__PURE__ */ jsxRuntime.jsx(
|
|
29814
|
+
instructions: /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.AgentConnectInstructions, { email: result.email, signingKey: result.signingKey }),
|
|
29815
29815
|
config: /* @__PURE__ */ jsxRuntime.jsx(ConnectedAgentConfigForm, { agentExtId: result.extId, agentName: result.name }),
|
|
29816
29816
|
isConfigOpen: configOpen,
|
|
29817
29817
|
onToggleConfig: () => setConfigOpen((v) => !v),
|
|
@@ -29820,7 +29820,7 @@ function ConnectedAuthorizeAgent({ onClose, editAgent }) {
|
|
|
29820
29820
|
);
|
|
29821
29821
|
}
|
|
29822
29822
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29823
|
-
|
|
29823
|
+
chunkTL5VXRNT_cjs.AgentCreateView,
|
|
29824
29824
|
{
|
|
29825
29825
|
name,
|
|
29826
29826
|
onNameChange: setName,
|
|
@@ -30594,7 +30594,7 @@ function ConnectedWorkspaceEntity({
|
|
|
30594
30594
|
...shieldProps
|
|
30595
30595
|
}) {
|
|
30596
30596
|
const name = workspace.name;
|
|
30597
|
-
const workspaceColor =
|
|
30597
|
+
const workspaceColor = chunkQWKT4DO6_cjs.workspaceKindColor(react.getWorkspaceKind(workspace));
|
|
30598
30598
|
const shield = /* @__PURE__ */ jsxRuntime.jsx(
|
|
30599
30599
|
ui.ShieldIcon,
|
|
30600
30600
|
{
|
|
@@ -30608,9 +30608,9 @@ function ConnectedWorkspaceEntity({
|
|
|
30608
30608
|
);
|
|
30609
30609
|
const documentCount2 = (workspace.shared_document_count ?? 0) + (workspace.private_document_count ?? 0);
|
|
30610
30610
|
const conversationCount = (workspace.shared_conversation_count ?? 0) + (workspace.private_conversation_count ?? 0);
|
|
30611
|
-
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30611
|
+
const tooltipContent = /* @__PURE__ */ jsxRuntime.jsxs(chunkI45LDMQU_cjs.EntityTooltip, { children: [
|
|
30612
30612
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30613
|
-
|
|
30613
|
+
chunkI45LDMQU_cjs.EntityTooltipHeader,
|
|
30614
30614
|
{
|
|
30615
30615
|
lead: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30616
30616
|
ui.ShieldIcon,
|
|
@@ -30627,7 +30627,7 @@ function ConnectedWorkspaceEntity({
|
|
|
30627
30627
|
}
|
|
30628
30628
|
),
|
|
30629
30629
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30630
|
-
|
|
30630
|
+
chunkI45LDMQU_cjs.EntityTooltipStats,
|
|
30631
30631
|
{
|
|
30632
30632
|
stats: [
|
|
30633
30633
|
{
|
|
@@ -30651,11 +30651,11 @@ function ConnectedWorkspaceEntity({
|
|
|
30651
30651
|
]
|
|
30652
30652
|
}
|
|
30653
30653
|
),
|
|
30654
|
-
workspace.updated_at && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30654
|
+
workspace.updated_at && /* @__PURE__ */ jsxRuntime.jsxs(chunkI45LDMQU_cjs.EntityTooltipHint, { children: [
|
|
30655
30655
|
"Updated ",
|
|
30656
30656
|
ui.formatFriendlyDate(workspace.updated_at)
|
|
30657
30657
|
] }),
|
|
30658
|
-
interactive && variant !== "icon" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30658
|
+
interactive && variant !== "icon" && /* @__PURE__ */ jsxRuntime.jsxs(chunkI45LDMQU_cjs.EntityTooltipHint, { icon: /* @__PURE__ */ jsxRuntime.jsx(ui.EntityIcon, { entityType: "WORKSPACE", className: "w-3 h-3" }), children: [
|
|
30659
30659
|
"Click to open ",
|
|
30660
30660
|
ui.getEntityLabel("WORKSPACE").toLowerCase(),
|
|
30661
30661
|
" settings"
|
|
@@ -30723,7 +30723,7 @@ function ConnectedProjectEntity({
|
|
|
30723
30723
|
subscription = "none",
|
|
30724
30724
|
...props
|
|
30725
30725
|
}) {
|
|
30726
|
-
const { stripeEnabled } =
|
|
30726
|
+
const { stripeEnabled } = chunkLX3JJYVP_cjs.useBillingSupport();
|
|
30727
30727
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30728
30728
|
ui.ProjectEntity,
|
|
30729
30729
|
{
|
|
@@ -30805,7 +30805,7 @@ function ConnectedAccountCluster({
|
|
|
30805
30805
|
if (!open) return null;
|
|
30806
30806
|
const current2 = activePage === page;
|
|
30807
30807
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30808
|
-
|
|
30808
|
+
chunkQWKT4DO6_cjs.SidebarBadgeRow,
|
|
30809
30809
|
{
|
|
30810
30810
|
icon: icon2,
|
|
30811
30811
|
label,
|
|
@@ -30822,7 +30822,7 @@ function ConnectedAccountCluster({
|
|
|
30822
30822
|
);
|
|
30823
30823
|
};
|
|
30824
30824
|
const bell = layout === "drawer" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30825
|
-
|
|
30825
|
+
chunkQWKT4DO6_cjs.SidebarBadgeRow,
|
|
30826
30826
|
{
|
|
30827
30827
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "size-5" }),
|
|
30828
30828
|
label: "Notifications",
|
|
@@ -30856,7 +30856,7 @@ function ConnectedAccountCluster({
|
|
|
30856
30856
|
side,
|
|
30857
30857
|
align,
|
|
30858
30858
|
renderTrigger: layout === "bar" ? void 0 : ({ unread, ariaLabel, testId }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
30859
|
-
|
|
30859
|
+
chunkQWKT4DO6_cjs.SidebarBadgeRow,
|
|
30860
30860
|
{
|
|
30861
30861
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "size-5" }),
|
|
30862
30862
|
label: "Notifications",
|
|
@@ -30869,7 +30869,7 @@ function ConnectedAccountCluster({
|
|
|
30869
30869
|
}
|
|
30870
30870
|
);
|
|
30871
30871
|
const contacts = showContacts && openContacts ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30872
|
-
|
|
30872
|
+
chunkQWKT4DO6_cjs.SidebarBadgeRow,
|
|
30873
30873
|
{
|
|
30874
30874
|
icon: /* @__PURE__ */ jsxRuntime.jsx(ContactIcon, { className: "size-5" }),
|
|
30875
30875
|
label: "Contacts",
|
|
@@ -30906,7 +30906,7 @@ function ConnectedAccountCluster({
|
|
|
30906
30906
|
layout
|
|
30907
30907
|
);
|
|
30908
30908
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30909
|
-
|
|
30909
|
+
chunkQWKT4DO6_cjs.ActionCluster,
|
|
30910
30910
|
{
|
|
30911
30911
|
layout,
|
|
30912
30912
|
status: layout === "bar" ? status : null,
|
|
@@ -30945,7 +30945,7 @@ var ConversationEntity = React7.memo(function ConversationEntity2({
|
|
|
30945
30945
|
);
|
|
30946
30946
|
const icon2 = /* @__PURE__ */ jsxRuntime.jsx(ui.ThreadVisibilityIcon, { shared: isShared, className: `${iconSizeClass} shrink-0` });
|
|
30947
30947
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30948
|
-
|
|
30948
|
+
chunkTL5VXRNT_cjs.EntityChip,
|
|
30949
30949
|
{
|
|
30950
30950
|
variant,
|
|
30951
30951
|
icon: icon2,
|
|
@@ -30967,7 +30967,7 @@ function WorkflowRunStatusCell({ conversation }) {
|
|
|
30967
30967
|
});
|
|
30968
30968
|
const { data: members = [] } = react.useWorkspaceUsers();
|
|
30969
30969
|
const me = react.useArbiSession().user?.external_id;
|
|
30970
|
-
const steps =
|
|
30970
|
+
const steps = chunkTL5VXRNT_cjs.fromPlanSteps(conversation.plan?.steps ?? []);
|
|
30971
30971
|
const states = chunkEZLZ3MDU_cjs.stepStatesFromActivity(activity.data ?? []);
|
|
30972
30972
|
const nameOf = (id) => {
|
|
30973
30973
|
if (id === me) return "you";
|
|
@@ -30975,7 +30975,7 @@ function WorkflowRunStatusCell({ conversation }) {
|
|
|
30975
30975
|
return person ? ui.getUserDisplayName(person) : void 0;
|
|
30976
30976
|
};
|
|
30977
30977
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30978
|
-
|
|
30978
|
+
chunkTL5VXRNT_cjs.WorkflowRunStatus,
|
|
30979
30979
|
{
|
|
30980
30980
|
steps,
|
|
30981
30981
|
states,
|
|
@@ -31009,7 +31009,7 @@ function ConversationStatusCell({ conversation }) {
|
|
|
31009
31009
|
if (conversation.plan?.steps?.length && !isLiveGenerating)
|
|
31010
31010
|
return /* @__PURE__ */ jsxRuntime.jsx(WorkflowRunStatusCell, { conversation });
|
|
31011
31011
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
31012
|
-
|
|
31012
|
+
chunkTL5VXRNT_cjs.ThreadStatusLine,
|
|
31013
31013
|
{
|
|
31014
31014
|
state: threadStateOf(conversation, isLiveGenerating),
|
|
31015
31015
|
className: "h-full",
|
|
@@ -31341,16 +31341,16 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
31341
31341
|
const openWorkflow = chunkAHYSHKPL_cjs.useOpenWorkflow();
|
|
31342
31342
|
const workspaceExtId = react.useArbiSessionState((s) => s.workspaceId);
|
|
31343
31343
|
const task = conversations.find((c) => c.external_id === conversationId);
|
|
31344
|
-
const latestMessageAt =
|
|
31344
|
+
const latestMessageAt = chunkTL5VXRNT_cjs.latestMessageTime(messageHistory);
|
|
31345
31345
|
const events = (activity.data ?? []).filter(
|
|
31346
|
-
(event) => !
|
|
31346
|
+
(event) => !chunkTL5VXRNT_cjs.isSupersededStop(event, latestMessageAt)
|
|
31347
31347
|
);
|
|
31348
31348
|
const personName = (extId) => {
|
|
31349
31349
|
const person = members.find((m) => m.user.external_id === extId)?.user;
|
|
31350
31350
|
return person ? ui.getUserDisplayName(person) : "someone";
|
|
31351
31351
|
};
|
|
31352
|
-
const planSteps =
|
|
31353
|
-
const entries =
|
|
31352
|
+
const planSteps = chunkTL5VXRNT_cjs.fromPlanSteps(task?.plan?.steps ?? []);
|
|
31353
|
+
const entries = chunkTL5VXRNT_cjs.compactThreadActivity(events, (id) => planSteps.find((s) => s.id === id)?.title);
|
|
31354
31354
|
const items = entries.map(({ event, label, recipients }) => {
|
|
31355
31355
|
const messageActivity = [
|
|
31356
31356
|
"created",
|
|
@@ -31376,7 +31376,7 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
31376
31376
|
const messageId = sourceMessage ?? [...messageHistory].reverse().find((message) => Date.parse(message.created_at ?? "") <= Date.parse(event.created_at))?.external_id ?? messageHistory[0]?.external_id;
|
|
31377
31377
|
const doc = docId ? docs.find((d) => d.external_id === docId) : void 0;
|
|
31378
31378
|
const mailDraftId = event.kind === "notified" && event.detail?.event === "mail_draft_ready" && typeof event.detail?.mail_id === "string" ? event.detail.mail_id : void 0;
|
|
31379
|
-
const missed = event.kind === "notified" && recipients.length ?
|
|
31379
|
+
const missed = event.kind === "notified" && recipients.length ? chunkTL5VXRNT_cjs.unnotifiedMentions(
|
|
31380
31380
|
messageHistory.find((message) => message.external_id === sourceMessage)?.mentions,
|
|
31381
31381
|
recipients,
|
|
31382
31382
|
event.actor_ext_id
|
|
@@ -31409,7 +31409,7 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
31409
31409
|
) : void 0,
|
|
31410
31410
|
docId,
|
|
31411
31411
|
docTitle: doc ? ui.getDocumentTitle(doc) : void 0,
|
|
31412
|
-
label: mailDraftId ? "Left a draft email" : event.kind === "notified" && recipients.length ?
|
|
31412
|
+
label: mailDraftId ? "Left a draft email" : event.kind === "notified" && recipients.length ? chunkTL5VXRNT_cjs.notifiedLabel(recipients.map(personName), missed.map(personName)) : label,
|
|
31413
31413
|
description: [
|
|
31414
31414
|
name,
|
|
31415
31415
|
label,
|
|
@@ -31423,7 +31423,7 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
31423
31423
|
stepChip: eventStep ? stepChipOf(eventStep, event.kind, stepDocument) : void 0,
|
|
31424
31424
|
// No avatar tooltip: the entry is already a button (or titled row) that carries the same
|
|
31425
31425
|
// details, and a tooltip trigger inside it would be a nested <button>.
|
|
31426
|
-
avatar: assistant ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
31426
|
+
avatar: assistant ? /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.AssistantEntity, { variant: "icon", size: 20, showTooltip: false }) : member ? /* @__PURE__ */ jsxRuntime.jsx(DocumentUser, { user: member, tooltip: false }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { className: "size-4 text-muted-foreground" }),
|
|
31427
31427
|
time: ui.formatRelativeTime(event.created_at, { style: "short" }),
|
|
31428
31428
|
exactTime: ui.formatFriendlyDate(event.created_at),
|
|
31429
31429
|
onOpenDocument: docId && doc ? () => openDocument(docId) : void 0,
|
|
@@ -31472,7 +31472,7 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
31472
31472
|
onSelect: () => navigateToConversation(source)
|
|
31473
31473
|
});
|
|
31474
31474
|
}
|
|
31475
|
-
const links =
|
|
31475
|
+
const links = chunkTL5VXRNT_cjs.linkedRunsFromActivity(activity.data);
|
|
31476
31476
|
const threadName = (id, workflowId) => conversations.find((c) => c.external_id === id)?.title || workflows.find((w) => w.external_id === workflowId)?.name || "Linked thread";
|
|
31477
31477
|
const signals = links.raised.map((raised) => ({
|
|
31478
31478
|
step: raised.step,
|
|
@@ -31487,7 +31487,7 @@ function useConnectedThreadActivity(conversationId) {
|
|
|
31487
31487
|
if (links.startedBy) {
|
|
31488
31488
|
const { conversationId: parentId, step, signal } = links.startedBy;
|
|
31489
31489
|
const parent = conversations.find((c) => c.external_id === parentId);
|
|
31490
|
-
const parentSteps =
|
|
31490
|
+
const parentSteps = chunkTL5VXRNT_cjs.fromPlanSteps(parent?.plan?.steps ?? []);
|
|
31491
31491
|
startedBy = {
|
|
31492
31492
|
stepTitle: parentSteps.find((s) => s.id === step)?.title ?? step ?? "a step",
|
|
31493
31493
|
threadTitle: parent?.title || "another thread",
|
|
@@ -31520,7 +31520,7 @@ function ConnectedThreadTaskBar({
|
|
|
31520
31520
|
const person = members.find((m) => m.user.external_id === id)?.user;
|
|
31521
31521
|
return person ? ui.getUserDisplayName(person) : void 0;
|
|
31522
31522
|
};
|
|
31523
|
-
const steps =
|
|
31523
|
+
const steps = chunkTL5VXRNT_cjs.fromPlanSteps(task?.plan?.steps ?? []);
|
|
31524
31524
|
const states = chunkEZLZ3MDU_cjs.stepStatesFromActivity(activity.data ?? []);
|
|
31525
31525
|
const runInputs = task?.skill_inputs ?? {};
|
|
31526
31526
|
const stepCall = (body) => actOnStep.mutateAsync({ conversationId, body });
|
|
@@ -31546,7 +31546,7 @@ function ConnectedThreadTaskBar({
|
|
|
31546
31546
|
task?.plan?.steps?.length ? (
|
|
31547
31547
|
// A workflow run: its named steps, with what happened in the thread under each.
|
|
31548
31548
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31549
|
-
|
|
31549
|
+
chunkTL5VXRNT_cjs.WorkflowThreadStrip,
|
|
31550
31550
|
{
|
|
31551
31551
|
steps,
|
|
31552
31552
|
states,
|
|
@@ -31573,7 +31573,7 @@ function ConnectedThreadTaskBar({
|
|
|
31573
31573
|
renderStepAction: (step, phase) => (
|
|
31574
31574
|
// A signer or a draft's person acts on their step even on a thread they cannot edit.
|
|
31575
31575
|
canEdit || phase === "waiting" || phase === "done" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
31576
|
-
|
|
31576
|
+
chunkTL5VXRNT_cjs.WorkflowStepAction,
|
|
31577
31577
|
{
|
|
31578
31578
|
step,
|
|
31579
31579
|
phase,
|
|
@@ -31594,8 +31594,8 @@ function ConnectedThreadTaskBar({
|
|
|
31594
31594
|
}
|
|
31595
31595
|
)
|
|
31596
31596
|
) : items.length || startedBy ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
31597
|
-
startedBy && /* @__PURE__ */ jsxRuntime.jsx(
|
|
31598
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31597
|
+
startedBy && /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.WorkflowThreadStartedBy, { origin: startedBy }),
|
|
31598
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.TaskFlow, { items: items.filter((item) => !item.step) })
|
|
31599
31599
|
] }) : (
|
|
31600
31600
|
// Ordinary chats record no activity events, so an empty ribbon says nothing rather than
|
|
31601
31601
|
// "No recorded activity yet" while the answer and its steps are right there in the thread.
|
|
@@ -31629,7 +31629,7 @@ function ConnectedThreadTaskBar({
|
|
|
31629
31629
|
) }),
|
|
31630
31630
|
/* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuContent, { align: "end", children: [
|
|
31631
31631
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31632
|
-
|
|
31632
|
+
chunkI45LDMQU_cjs.ThreadFollowMenuItem,
|
|
31633
31633
|
{
|
|
31634
31634
|
following: follow.following,
|
|
31635
31635
|
onFollowingChange: (on) => (
|
|
@@ -31708,25 +31708,25 @@ function useSkillsEnabled() {
|
|
|
31708
31708
|
// src/connection/workflows/useWorkflowDefinitions.ts
|
|
31709
31709
|
function useWorkflowDefinitions() {
|
|
31710
31710
|
const { data: listings } = react.useSkills();
|
|
31711
|
-
const usage =
|
|
31711
|
+
const usage = chunkTL5VXRNT_cjs.useWorkflowUsage();
|
|
31712
31712
|
const skillsEnabled = useSkillsEnabled();
|
|
31713
31713
|
return React7.useMemo(() => {
|
|
31714
31714
|
const { host: builtins, skills: fromServer } = chunk76L6LOP3_cjs.mergeSkillWorkflows(
|
|
31715
|
-
|
|
31715
|
+
chunkTL5VXRNT_cjs.WEB_WORKFLOWS,
|
|
31716
31716
|
listings ?? []
|
|
31717
31717
|
);
|
|
31718
31718
|
const all = [...builtins, ...fromServer];
|
|
31719
31719
|
const byId = new Map(all.map((w) => [w.id, w]));
|
|
31720
|
-
const pinned =
|
|
31720
|
+
const pinned = chunkTL5VXRNT_cjs.DASHBOARD_PINNED.flatMap((id) => {
|
|
31721
31721
|
const w = byId.get(id);
|
|
31722
31722
|
return w ? [w] : [];
|
|
31723
31723
|
});
|
|
31724
31724
|
return {
|
|
31725
31725
|
skills: all,
|
|
31726
31726
|
skillsEnabled,
|
|
31727
|
-
start: skillsEnabled ? [...builtins, ...
|
|
31728
|
-
dashboard: [...pinned, ...
|
|
31729
|
-
forTasks: [
|
|
31727
|
+
start: skillsEnabled ? [...builtins, ...chunkTL5VXRNT_cjs.sortByRecentUse(fromServer, usage)] : [],
|
|
31728
|
+
dashboard: [...pinned, ...chunkTL5VXRNT_cjs.DASHBOARD_OPERATIONS],
|
|
31729
|
+
forTasks: [chunkTL5VXRNT_cjs.CUSTOM_TASK, ...all.filter((w) => w.schedulable), chunkTL5VXRNT_cjs.REMIND_TASK]
|
|
31730
31730
|
};
|
|
31731
31731
|
}, [listings, usage, skillsEnabled]);
|
|
31732
31732
|
}
|
|
@@ -31754,7 +31754,7 @@ function useWorkflowTasks() {
|
|
|
31754
31754
|
);
|
|
31755
31755
|
const create3 = React7.useCallback(
|
|
31756
31756
|
async (ctx, forceWorkflow = false) => {
|
|
31757
|
-
const request =
|
|
31757
|
+
const request = chunkTL5VXRNT_cjs.taskComposerToCreateRequest(
|
|
31758
31758
|
{ ...ctx, documentTitles, plan: ctx.plan ?? null },
|
|
31759
31759
|
activeWorkspaceId ?? void 0,
|
|
31760
31760
|
forceWorkflow
|
|
@@ -31796,7 +31796,7 @@ function useWorkflowTasks() {
|
|
|
31796
31796
|
);
|
|
31797
31797
|
const update = React7.useCallback(
|
|
31798
31798
|
async (task, ctx) => {
|
|
31799
|
-
const patch =
|
|
31799
|
+
const patch = chunkTL5VXRNT_cjs.taskComposerToUpdateRequest({ ...ctx, plan: ctx.plan ?? null });
|
|
31800
31800
|
if (task.is_owner === false) delete patch.shared;
|
|
31801
31801
|
await updateConversation.mutateAsync({ conversationId: task.external_id, patch });
|
|
31802
31802
|
},
|
|
@@ -31804,7 +31804,7 @@ function useWorkflowTasks() {
|
|
|
31804
31804
|
);
|
|
31805
31805
|
const updateWorkflow = React7.useCallback(
|
|
31806
31806
|
async (workflow, ctx) => {
|
|
31807
|
-
const patch =
|
|
31807
|
+
const patch = chunkTL5VXRNT_cjs.composerToWorkflowUpdate({ ...ctx, documentTitles, plan: ctx.plan ?? null });
|
|
31808
31808
|
if (workflow.is_owner === false) delete patch.shared;
|
|
31809
31809
|
const workspaceId = workflow.workspace_ext_id ?? activeWorkspaceId;
|
|
31810
31810
|
const updated = await updateWorkflowMutation.mutateAsync({
|
|
@@ -31919,7 +31919,7 @@ function ConnectedTaskComposer({
|
|
|
31919
31919
|
const { tasks: allTasks } = react.useWorkItems();
|
|
31920
31920
|
const { data: documents = [] } = react.useDocuments();
|
|
31921
31921
|
const { create: create3, update, updateWorkflow, isPending } = useWorkflowTasks();
|
|
31922
|
-
const scopeSource =
|
|
31922
|
+
const scopeSource = chunkSQQULKT4_cjs.useConnectedWorkflowScopeSource();
|
|
31923
31923
|
const activeWorkspaceId = react.useArbiSessionState((s) => s.workspaceId);
|
|
31924
31924
|
const activeWorkspace = React7.useMemo(
|
|
31925
31925
|
() => workspaces.find((w) => w.external_id === activeWorkspaceId) ?? null,
|
|
@@ -31936,7 +31936,7 @@ function ConnectedTaskComposer({
|
|
|
31936
31936
|
const label = (t) => t.title?.trim() || "Untitled task";
|
|
31937
31937
|
if (isWorkflow) return allTasks.map((t) => ({ id: t.external_id, name: label(t) }));
|
|
31938
31938
|
const subject = task ?? { external_id: "__new__" };
|
|
31939
|
-
return
|
|
31939
|
+
return chunkTL5VXRNT_cjs.moveTargets(
|
|
31940
31940
|
[...allTasks.filter((t) => t.external_id !== subject.external_id), subject],
|
|
31941
31941
|
subject
|
|
31942
31942
|
).map((t) => ({ id: t.external_id, name: label(t) }));
|
|
@@ -31951,33 +31951,33 @@ function ConnectedTaskComposer({
|
|
|
31951
31951
|
);
|
|
31952
31952
|
const initialValues = React7.useMemo(() => {
|
|
31953
31953
|
const ids = {
|
|
31954
|
-
customWorkflowId:
|
|
31955
|
-
reminderWorkflowId:
|
|
31954
|
+
customWorkflowId: chunkTL5VXRNT_cjs.CUSTOM_TASK_ID,
|
|
31955
|
+
reminderWorkflowId: chunkTL5VXRNT_cjs.REMIND_TASK_ID,
|
|
31956
31956
|
definitions: forTasks
|
|
31957
31957
|
};
|
|
31958
31958
|
const base = launchWorkflow ? {
|
|
31959
|
-
...
|
|
31959
|
+
...chunkTL5VXRNT_cjs.workflowToComposerValues(launchWorkflow, ids),
|
|
31960
31960
|
when: "once",
|
|
31961
31961
|
runAt: "",
|
|
31962
31962
|
rrule: "",
|
|
31963
31963
|
eventKind: "",
|
|
31964
31964
|
afterTaskId: "",
|
|
31965
31965
|
name: ""
|
|
31966
|
-
} : editingWorkflow ?
|
|
31966
|
+
} : editingWorkflow ? chunkTL5VXRNT_cjs.workflowToComposerValues(editingWorkflow, ids) : task ? chunkTL5VXRNT_cjs.taskToComposerValues(task, ids) : isWorkflow ? {
|
|
31967
31967
|
// Run now is the default start; scheduling is the fallback in the same field.
|
|
31968
31968
|
assignee: "agent",
|
|
31969
|
-
workflowId: initialWorkflowId ??
|
|
31969
|
+
workflowId: initialWorkflowId ?? chunkTL5VXRNT_cjs.CUSTOM_TASK_ID,
|
|
31970
31970
|
when: startLater ? "once" : "now",
|
|
31971
31971
|
...initialPrompt ? {
|
|
31972
31972
|
inputs: {
|
|
31973
|
-
[initialWorkflowId ===
|
|
31973
|
+
[initialWorkflowId === chunkTL5VXRNT_cjs.REMIND_TASK_ID ? "message" : "instruction"]: initialPrompt
|
|
31974
31974
|
}
|
|
31975
31975
|
} : {},
|
|
31976
31976
|
// A scheduled run needs an agent: the owner's Assistant unless another is picked.
|
|
31977
31977
|
...startLater && defaultAgentId ? { agentId: defaultAgentId } : {}
|
|
31978
31978
|
} : initialAgentExtId ? (
|
|
31979
31979
|
// Assigning an agent means agentic work: the free instruction, and tell me when done.
|
|
31980
|
-
{ agentId: initialAgentExtId, workflowId:
|
|
31980
|
+
{ agentId: initialAgentExtId, workflowId: chunkTL5VXRNT_cjs.CUSTOM_TASK_ID, notifyOnComplete: true }
|
|
31981
31981
|
) : {};
|
|
31982
31982
|
return {
|
|
31983
31983
|
timezone: chunkQUMUAJ2P_cjs.detectTimeZone(),
|
|
@@ -32038,7 +32038,7 @@ function ConnectedTaskComposer({
|
|
|
32038
32038
|
const ctx = {
|
|
32039
32039
|
workflow: chosen,
|
|
32040
32040
|
values: submitted,
|
|
32041
|
-
plan: chosen.id ===
|
|
32041
|
+
plan: chosen.id === chunkTL5VXRNT_cjs.CUSTOM_TASK_ID ? plan : null
|
|
32042
32042
|
};
|
|
32043
32043
|
try {
|
|
32044
32044
|
if (isWorkflow && editingWorkflow && !options2?.runOnce) {
|
|
@@ -32074,7 +32074,7 @@ function ConnectedTaskComposer({
|
|
|
32074
32074
|
}
|
|
32075
32075
|
};
|
|
32076
32076
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32077
|
-
|
|
32077
|
+
chunkTL5VXRNT_cjs.TaskComposer,
|
|
32078
32078
|
{
|
|
32079
32079
|
open,
|
|
32080
32080
|
onOpenChange,
|
|
@@ -32088,15 +32088,15 @@ function ConnectedTaskComposer({
|
|
|
32088
32088
|
tasks: taskOptions,
|
|
32089
32089
|
initialValues,
|
|
32090
32090
|
timezones,
|
|
32091
|
-
eventOptions:
|
|
32091
|
+
eventOptions: chunkTL5VXRNT_cjs.AUTOMATION_EVENTS,
|
|
32092
32092
|
eventWorkflowOptions: workspaceAutomations.filter((item) => item.external_id !== editingWorkflow?.external_id).map((item) => ({ id: item.external_id, label: item.name })),
|
|
32093
32093
|
isPending,
|
|
32094
32094
|
planDrafting: planWork.isPending,
|
|
32095
32095
|
hasPlan: plan !== null,
|
|
32096
|
-
renderIcon:
|
|
32096
|
+
renderIcon: chunkTL5VXRNT_cjs.renderWorkflowIcon,
|
|
32097
32097
|
scopeSource,
|
|
32098
32098
|
renderDocuments: (field, value, onChange) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
32099
|
-
|
|
32099
|
+
chunkSQQULKT4_cjs.ConnectedWorkflowDocumentsField,
|
|
32100
32100
|
{
|
|
32101
32101
|
field,
|
|
32102
32102
|
value,
|
|
@@ -32127,8 +32127,8 @@ function ConnectedTaskComposer({
|
|
|
32127
32127
|
...plan ? { addAndStart: "Approve plan and start", addAndSchedule: "Approve plan and schedule" } : {}
|
|
32128
32128
|
},
|
|
32129
32129
|
onSubmit: submit,
|
|
32130
|
-
goal: (values) => values.workflowId ===
|
|
32131
|
-
|
|
32130
|
+
goal: (values) => values.workflowId === chunkTL5VXRNT_cjs.CUSTOM_TASK_ID ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
32131
|
+
chunkTL5VXRNT_cjs.TaskPlan,
|
|
32132
32132
|
{
|
|
32133
32133
|
plan,
|
|
32134
32134
|
onChange: setPlan,
|
|
@@ -32328,7 +32328,7 @@ function ConnectedTaskStartDialog({
|
|
|
32328
32328
|
};
|
|
32329
32329
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32330
32330
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32331
|
-
|
|
32331
|
+
chunkTL5VXRNT_cjs.TaskStartDialog,
|
|
32332
32332
|
{
|
|
32333
32333
|
open: open && !later,
|
|
32334
32334
|
onOpenChange: (next) => {
|
|
@@ -32360,7 +32360,7 @@ function ConnectedTaskStartDialog({
|
|
|
32360
32360
|
kind: "workflow",
|
|
32361
32361
|
startLater: true,
|
|
32362
32362
|
initialPrompt: later.prompt,
|
|
32363
|
-
initialWorkflowId: later.todo ?
|
|
32363
|
+
initialWorkflowId: later.todo ? chunkTL5VXRNT_cjs.REMIND_TASK_ID : void 0,
|
|
32364
32364
|
initialShared: later.shared,
|
|
32365
32365
|
launchWorkflow: later.workflow
|
|
32366
32366
|
}
|
|
@@ -32374,7 +32374,7 @@ function ConnectedThreadLauncher({ autoFocus }) {
|
|
|
32374
32374
|
const [later, setLater] = React7.useState(null);
|
|
32375
32375
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32376
32376
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32377
|
-
|
|
32377
|
+
chunkTL5VXRNT_cjs.ThreadLauncher,
|
|
32378
32378
|
{
|
|
32379
32379
|
workflows: task.workflows,
|
|
32380
32380
|
people: task.people,
|
|
@@ -32411,7 +32411,7 @@ function ConnectedThreadLauncher({ autoFocus }) {
|
|
|
32411
32411
|
kind: "workflow",
|
|
32412
32412
|
startLater: true,
|
|
32413
32413
|
initialPrompt: later.prompt,
|
|
32414
|
-
initialWorkflowId: later.todo ?
|
|
32414
|
+
initialWorkflowId: later.todo ? chunkTL5VXRNT_cjs.REMIND_TASK_ID : void 0,
|
|
32415
32415
|
initialShared: later.shared,
|
|
32416
32416
|
launchWorkflow: later.workflow
|
|
32417
32417
|
}
|
|
@@ -32440,13 +32440,13 @@ function ConnectedNewThreadDialog({
|
|
|
32440
32440
|
});
|
|
32441
32441
|
const parentOptions = React7.useMemo(() => {
|
|
32442
32442
|
const leaf = { external_id: "__new__" };
|
|
32443
|
-
return
|
|
32443
|
+
return chunkTL5VXRNT_cjs.moveTargets([...tasks, leaf], leaf).map((t) => ({
|
|
32444
32444
|
id: t.external_id,
|
|
32445
32445
|
name: t.title?.trim() || "Untitled task"
|
|
32446
32446
|
}));
|
|
32447
32447
|
}, [tasks]);
|
|
32448
32448
|
const submit = async (values) => {
|
|
32449
|
-
const request =
|
|
32449
|
+
const request = chunkTL5VXRNT_cjs.newThreadToRequest(values);
|
|
32450
32450
|
try {
|
|
32451
32451
|
if (!workspaceId) throw new Error("Open a workspace to add a task.");
|
|
32452
32452
|
if (!request.startAssistant && request.todo) {
|
|
@@ -32487,7 +32487,7 @@ function ConnectedNewThreadDialog({
|
|
|
32487
32487
|
}
|
|
32488
32488
|
};
|
|
32489
32489
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32490
|
-
|
|
32490
|
+
chunkTL5VXRNT_cjs.NewThreadDialog,
|
|
32491
32491
|
{
|
|
32492
32492
|
open,
|
|
32493
32493
|
onOpenChange,
|
|
@@ -32522,7 +32522,7 @@ function useRenderTaskPerson() {
|
|
|
32522
32522
|
return React7.useCallback(
|
|
32523
32523
|
(person) => {
|
|
32524
32524
|
const user = person.id ? byId.get(person.id) : void 0;
|
|
32525
|
-
return user ? /* @__PURE__ */ jsxRuntime.jsx(DocumentUser, { user, variant: "pill" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
32525
|
+
return user ? /* @__PURE__ */ jsxRuntime.jsx(DocumentUser, { user, variant: "pill" }) : /* @__PURE__ */ jsxRuntime.jsx(chunkF5T4R7CN_cjs.PersonPill, { person });
|
|
32526
32526
|
},
|
|
32527
32527
|
[byId]
|
|
32528
32528
|
);
|
|
@@ -32532,14 +32532,14 @@ var referencesOf = (inputs) => {
|
|
|
32532
32532
|
return value?.documents ?? [];
|
|
32533
32533
|
};
|
|
32534
32534
|
var PROMPT_BINDINGS = {
|
|
32535
|
-
[
|
|
32535
|
+
[chunkTL5VXRNT_cjs.GENERATE_IMAGE_ID]: {
|
|
32536
32536
|
attachScope: false,
|
|
32537
32537
|
tools: (inputs) => {
|
|
32538
32538
|
const aspectRatio = typeof inputs.aspect_ratio === "string" ? inputs.aspect_ratio : "";
|
|
32539
32539
|
return {
|
|
32540
32540
|
retrieval_chunk: browser.buildRetrievalChunkTool([]),
|
|
32541
32541
|
retrieval_full_context: browser.buildRetrievalFullContextTool(referencesOf(inputs)),
|
|
32542
|
-
...aspectRatio && aspectRatio !==
|
|
32542
|
+
...aspectRatio && aspectRatio !== chunkTL5VXRNT_cjs.IMAGE_ASPECT_AUTO ? {
|
|
32543
32543
|
image_generation: {
|
|
32544
32544
|
name: "image_generation",
|
|
32545
32545
|
description: "image generation",
|
|
@@ -32560,7 +32560,7 @@ var text = (inputs, name) => {
|
|
|
32560
32560
|
function useLaunchWorkflow({ landing: surfaceLanding } = {}) {
|
|
32561
32561
|
const { data: documents = [] } = react.useDocuments();
|
|
32562
32562
|
const { data: workspaceTags = [] } = react.useTags();
|
|
32563
|
-
const tags = React7.useMemo(() =>
|
|
32563
|
+
const tags = React7.useMemo(() => chunkF5T4R7CN_cjs.documentScopeLabels(workspaceTags), [workspaceTags]);
|
|
32564
32564
|
const createTag = react.useCreateTag();
|
|
32565
32565
|
const updateTag = react.useUpdateTag();
|
|
32566
32566
|
const generate = react.useGenerateDocTags();
|
|
@@ -32571,8 +32571,8 @@ function useLaunchWorkflow({ landing: surfaceLanding } = {}) {
|
|
|
32571
32571
|
const annotate = React7.useCallback(
|
|
32572
32572
|
async ({ inputs, scope }) => {
|
|
32573
32573
|
const description = text(inputs, "description");
|
|
32574
|
-
const name = text(inputs, "name") ||
|
|
32575
|
-
const matching =
|
|
32574
|
+
const name = text(inputs, "name") || chunkTL5VXRNT_cjs.deriveAnnotationName(description);
|
|
32575
|
+
const matching = chunkF5T4R7CN_cjs.matchWorkflowScope(documents, scope);
|
|
32576
32576
|
if (!name || !description || matching.length === 0) return;
|
|
32577
32577
|
try {
|
|
32578
32578
|
const existing = tags.find((t) => t.name.toLowerCase() === name.toLowerCase());
|
|
@@ -32615,9 +32615,9 @@ function useLaunchWorkflow({ landing: surfaceLanding } = {}) {
|
|
|
32615
32615
|
async (launch) => {
|
|
32616
32616
|
const { workflow, inputs, scope, agentId } = launch;
|
|
32617
32617
|
if (workflow.run.kind === "operation") {
|
|
32618
|
-
if (workflow.id ===
|
|
32618
|
+
if (workflow.id === chunkTL5VXRNT_cjs.ANNOTATE_ID) {
|
|
32619
32619
|
await annotate(launch);
|
|
32620
|
-
|
|
32620
|
+
chunkTL5VXRNT_cjs.recordWorkflowUse(workflow.id);
|
|
32621
32621
|
return;
|
|
32622
32622
|
}
|
|
32623
32623
|
throw new Error(`No host handler for workflow "${workflow.id}"`);
|
|
@@ -32627,7 +32627,7 @@ function useLaunchWorkflow({ landing: surfaceLanding } = {}) {
|
|
|
32627
32627
|
);
|
|
32628
32628
|
const prompt = chunk76L6LOP3_cjs.composeWorkflowPrompt(workflow, inputs, { documentTitles });
|
|
32629
32629
|
if (!prompt) return;
|
|
32630
|
-
|
|
32630
|
+
chunkTL5VXRNT_cjs.recordWorkflowUse(workflow.id);
|
|
32631
32631
|
if (agentId) {
|
|
32632
32632
|
try {
|
|
32633
32633
|
const created = await createTask({
|
|
@@ -32672,7 +32672,7 @@ function useLaunchWorkflow({ landing: surfaceLanding } = {}) {
|
|
|
32672
32672
|
const binding = PROMPT_BINDINGS[workflow.id];
|
|
32673
32673
|
if (!inPlace) openNewConversation();
|
|
32674
32674
|
if (binding?.attachScope !== false && !chunk76L6LOP3_cjs.isEmptyWorkflowScope(scope)) {
|
|
32675
|
-
const ids =
|
|
32675
|
+
const ids = chunkF5T4R7CN_cjs.matchWorkflowScope(documents, scope).map((d) => d.external_id);
|
|
32676
32676
|
if (ids.length > 0) {
|
|
32677
32677
|
session.setConversationDocuments(
|
|
32678
32678
|
inPlace ? session.getState().conversationId ?? "new" : "new",
|
|
@@ -32713,7 +32713,7 @@ function resolveLaunchInputs(workflow, request) {
|
|
|
32713
32713
|
function useWorkflowLaunch() {
|
|
32714
32714
|
const { skills } = useWorkflowDefinitions();
|
|
32715
32715
|
const launch = React7.useCallback(
|
|
32716
|
-
(workflowId, options2 = {}) =>
|
|
32716
|
+
(workflowId, options2 = {}) => chunkTL5VXRNT_cjs.openWorkflowLaunch({ workflowId, ...options2 }),
|
|
32717
32717
|
[]
|
|
32718
32718
|
);
|
|
32719
32719
|
const itemsFor = React7.useCallback(
|
|
@@ -32751,30 +32751,30 @@ function ConnectedWorkflowStart({
|
|
|
32751
32751
|
const onLaunch = useLaunchWorkflow({ landing });
|
|
32752
32752
|
const { openUpload } = chunkAHYSHKPL_cjs.useBlocksEnvironment();
|
|
32753
32753
|
const { data: workspaceTags = [] } = react.useTags();
|
|
32754
|
-
const tags = React7.useMemo(() =>
|
|
32754
|
+
const tags = React7.useMemo(() => chunkF5T4R7CN_cjs.documentScopeLabels(workspaceTags), [workspaceTags]);
|
|
32755
32755
|
const fieldPlaceholder = React7.useCallback(
|
|
32756
32756
|
(field, inputs, workflow) => {
|
|
32757
|
-
if (workflow.id !==
|
|
32758
|
-
const derived =
|
|
32757
|
+
if (workflow.id !== chunkTL5VXRNT_cjs.ANNOTATE_ID || field.name !== "name") return void 0;
|
|
32758
|
+
const derived = chunkTL5VXRNT_cjs.deriveAnnotationName(String(inputs.description ?? ""));
|
|
32759
32759
|
return derived ? `Otherwise \u201C${derived}\u201D` : "Taken from the description";
|
|
32760
32760
|
},
|
|
32761
32761
|
[]
|
|
32762
32762
|
);
|
|
32763
32763
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32764
|
-
|
|
32764
|
+
chunkSQQULKT4_cjs.ConnectedWorkflowLauncher,
|
|
32765
32765
|
{
|
|
32766
32766
|
...rest,
|
|
32767
32767
|
workflows,
|
|
32768
32768
|
onLaunch,
|
|
32769
|
-
renderIcon:
|
|
32769
|
+
renderIcon: chunkTL5VXRNT_cjs.renderWorkflowIcon,
|
|
32770
32770
|
onAddFiles: openUpload,
|
|
32771
32771
|
agentLabels: AGENT_LABELS,
|
|
32772
32772
|
addFilesAction,
|
|
32773
32773
|
fieldPlaceholder,
|
|
32774
|
-
submitLabel: ({ workflow, matchedCount }) => workflow.id ===
|
|
32774
|
+
submitLabel: ({ workflow, matchedCount }) => workflow.id === chunkTL5VXRNT_cjs.ANNOTATE_ID && matchedCount !== null ? `Annotate ${matchedCount} document${matchedCount !== 1 ? "s" : ""}` : void 0,
|
|
32775
32775
|
renderNotice: ({ workflow, inputs }) => {
|
|
32776
|
-
if (workflow.id !==
|
|
32777
|
-
const name = String(inputs.name ?? "").trim() ||
|
|
32776
|
+
if (workflow.id !== chunkTL5VXRNT_cjs.ANNOTATE_ID) return null;
|
|
32777
|
+
const name = String(inputs.name ?? "").trim() || chunkTL5VXRNT_cjs.deriveAnnotationName(String(inputs.description ?? ""));
|
|
32778
32778
|
const existing = name ? tags.find((t) => t.name.toLowerCase() === name.toLowerCase()) : void 0;
|
|
32779
32779
|
if (!existing) return null;
|
|
32780
32780
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -32798,8 +32798,8 @@ function ConnectedWorkflowStart({
|
|
|
32798
32798
|
);
|
|
32799
32799
|
}
|
|
32800
32800
|
function Inner() {
|
|
32801
|
-
const request =
|
|
32802
|
-
const close =
|
|
32801
|
+
const request = chunkTL5VXRNT_cjs.useWorkflowLaunchRequest();
|
|
32802
|
+
const close = chunkTL5VXRNT_cjs.closeWorkflowLaunch;
|
|
32803
32803
|
const { skills } = useWorkflowDefinitions();
|
|
32804
32804
|
const run = useLaunchWorkflow({ landing: request?.landing });
|
|
32805
32805
|
const workflow = skills.find((w) => w.id === request?.workflowId);
|
|
@@ -32837,7 +32837,7 @@ function Inner() {
|
|
|
32837
32837
|
);
|
|
32838
32838
|
}
|
|
32839
32839
|
function WorkflowLaunchHost() {
|
|
32840
|
-
return
|
|
32840
|
+
return chunkTL5VXRNT_cjs.useWorkflowLaunchRequest() ? /* @__PURE__ */ jsxRuntime.jsx(Inner, {}) : null;
|
|
32841
32841
|
}
|
|
32842
32842
|
var START_VISIBLE = 8;
|
|
32843
32843
|
var START_SEARCH_ABOVE = 8;
|
|
@@ -32857,7 +32857,7 @@ function ConnectedConversationStart() {
|
|
|
32857
32857
|
const browse = openSkillsBrowser ? [
|
|
32858
32858
|
{
|
|
32859
32859
|
id: "browse-all",
|
|
32860
|
-
iconNode:
|
|
32860
|
+
iconNode: chunkTL5VXRNT_cjs.renderWorkflowIcon("library"),
|
|
32861
32861
|
title: "Browse all",
|
|
32862
32862
|
description: "See every skill, make a copy, add your own",
|
|
32863
32863
|
onSelect: () => openSkillsBrowser(),
|
|
@@ -32970,7 +32970,7 @@ function getToolParams(detail) {
|
|
|
32970
32970
|
return params;
|
|
32971
32971
|
}
|
|
32972
32972
|
function StepModelIcon({ modelName, tag }) {
|
|
32973
|
-
const cfg = tag === "Premium" ? null :
|
|
32973
|
+
const cfg = tag === "Premium" ? null : chunkTL5VXRNT_cjs.getModelIcon(modelName, tag);
|
|
32974
32974
|
if (tag !== "Premium" && !cfg) return null;
|
|
32975
32975
|
return /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
|
|
32976
32976
|
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: tag === "Premium" ? /* @__PURE__ */ jsxRuntime.jsx(ui.ProviderIcon, { modelName: modelName ?? void 0, size: 11 }) : cfg && /* @__PURE__ */ jsxRuntime.jsx(cfg.icon, { className: cfg.className, style: { width: 11, height: 11 } }) }) }),
|
|
@@ -33085,15 +33085,15 @@ var AgentStepsComponent = ({
|
|
|
33085
33085
|
const lastStepIndex = mergedSteps[mergedSteps.length - 1].index;
|
|
33086
33086
|
const renderRow = (step, depth, isLastInList) => {
|
|
33087
33087
|
const i = posByIndex.get(step.index);
|
|
33088
|
-
const presentation =
|
|
33088
|
+
const presentation = chunkTL5VXRNT_cjs.getAgentStepPresentation(step, docInfo);
|
|
33089
33089
|
const { tool, Icon } = presentation;
|
|
33090
33090
|
const { label, summary, isMultiLine, details } = browser.getStepDisplay(step, docInfo);
|
|
33091
|
-
const accent =
|
|
33091
|
+
const accent = chunkTL5VXRNT_cjs.stepAccent(step, tool);
|
|
33092
33092
|
const duration = stepDurations[i];
|
|
33093
33093
|
const isLastStep = step.index === lastStepIndex;
|
|
33094
33094
|
const isActive = step.index === currentStepIndex;
|
|
33095
33095
|
const tier = step.step === "goal" ? step.model_recommendation : null;
|
|
33096
|
-
const TierIcon = tier ?
|
|
33096
|
+
const TierIcon = tier ? chunkTL5VXRNT_cjs.MODEL_TIER_ICON_MAP[tier] : null;
|
|
33097
33097
|
const useLiveDuration = isLastStep && liveTimer != null && step.t != null;
|
|
33098
33098
|
const durationNode = useLiveDuration ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
33099
33099
|
MessageLiveSeconds,
|
|
@@ -33117,7 +33117,7 @@ var AgentStepsComponent = ({
|
|
|
33117
33117
|
})) : null;
|
|
33118
33118
|
const folded = childrenByParent.get(step.index);
|
|
33119
33119
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33120
|
-
|
|
33120
|
+
chunkTL5VXRNT_cjs.StepRow,
|
|
33121
33121
|
{
|
|
33122
33122
|
index: step.index,
|
|
33123
33123
|
number: displayNumber.get(step.index) ?? String(i + 1),
|
|
@@ -33131,7 +33131,7 @@ var AgentStepsComponent = ({
|
|
|
33131
33131
|
titleTestId: isActive ? "agent-expanded-current-step-description" : void 0,
|
|
33132
33132
|
badge: TierIcon ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Tooltip, { children: [
|
|
33133
33133
|
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center self-center", children: /* @__PURE__ */ jsxRuntime.jsx(TierIcon, { size: 12, className: accent.fg, "aria-hidden": true }) }) }),
|
|
33134
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { side: "top", children:
|
|
33134
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.TooltipContent, { side: "top", children: chunkTL5VXRNT_cjs.MODEL_TIER_LABELS[tier] ?? tier })
|
|
33135
33135
|
] }) : void 0,
|
|
33136
33136
|
meta: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33137
33137
|
isDeveloper && /* @__PURE__ */ jsxRuntime.jsx(StepModelIcon, { modelName: step.usage?.model, tag: getModelTag(step.usage?.model) }),
|
|
@@ -33146,14 +33146,14 @@ var AgentStepsComponent = ({
|
|
|
33146
33146
|
summary && !isActive && (step.narration ? (
|
|
33147
33147
|
/* Narration is PROSE (headings, bold, lists): render markdown, not raw asterisks.
|
|
33148
33148
|
Tool summaries stay plain text: one-line headlines where a clamp matters. */
|
|
33149
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33150
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
33151
|
-
details.map((d, di) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
33152
|
-
showOutcome && /* @__PURE__ */ jsxRuntime.jsx(
|
|
33153
|
-
toolParams.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
33154
|
-
criteriaView && /* @__PURE__ */ jsxRuntime.jsx(
|
|
33149
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.StepNarration, { index: step.index, children: /* @__PURE__ */ jsxRuntime.jsx(chunk4Y4724GI_cjs.ConnectedMarkdown, { isStreaming: false, children: summary }) })
|
|
33150
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.StepSummary, { index: step.index, multiLine: isMultiLine, children: summary })),
|
|
33151
|
+
details.map((d, di) => /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.StepDetail, { index: step.index, children: d }, di)),
|
|
33152
|
+
showOutcome && /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.StepOutcome, { index: step.index, failed: outcomeFailed, children: step.outcome }),
|
|
33153
|
+
toolParams.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.StepParams, { children: toolParams.map((p) => `${p.key}=${p.value}`).join(" ") }),
|
|
33154
|
+
criteriaView && /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.GoalCriteria, { criteria: criteriaView }),
|
|
33155
33155
|
folded && folded.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
33156
|
-
|
|
33156
|
+
chunkTL5VXRNT_cjs.SubStepGroup,
|
|
33157
33157
|
{
|
|
33158
33158
|
parentIndex: step.index,
|
|
33159
33159
|
summary: summariseSubSteps(folded),
|
|
@@ -33179,7 +33179,7 @@ var AgentStepsComponent = ({
|
|
|
33179
33179
|
leftParts.push(`${browser.formatTokens(totalInputTokens)} in`);
|
|
33180
33180
|
if (totalOutputTokens > 0) leftParts.push(`${browser.formatTokens(totalOutputTokens)} out`);
|
|
33181
33181
|
summaryNode = /* @__PURE__ */ jsxRuntime.jsx(
|
|
33182
|
-
|
|
33182
|
+
chunkTL5VXRNT_cjs.StepTraceSummary,
|
|
33183
33183
|
{
|
|
33184
33184
|
left: leftParts.join(" \xB7 "),
|
|
33185
33185
|
isNearBudget: browser.isNearAiUsageBudget(contextUsage),
|
|
@@ -33187,7 +33187,7 @@ var AgentStepsComponent = ({
|
|
|
33187
33187
|
}
|
|
33188
33188
|
);
|
|
33189
33189
|
}
|
|
33190
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33190
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.StepTrace, { className, summary: summaryNode, children: displayRows.map((row2, i) => {
|
|
33191
33191
|
if (row2.lane) {
|
|
33192
33192
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33193
33193
|
LaneBinding,
|
|
@@ -33224,7 +33224,7 @@ function LaneBinding({
|
|
|
33224
33224
|
const running = !closed && isStreaming;
|
|
33225
33225
|
const latest = inner[inner.length - 1];
|
|
33226
33226
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33227
|
-
|
|
33227
|
+
chunkTL5VXRNT_cjs.SubAgentLane,
|
|
33228
33228
|
{
|
|
33229
33229
|
handle,
|
|
33230
33230
|
number,
|
|
@@ -33347,7 +33347,7 @@ function AgentBarShell({
|
|
|
33347
33347
|
}, [isStepsExpanded, steps]);
|
|
33348
33348
|
const visibleStepCount = React7.useMemo(() => browser.topLevelAgentSteps(steps ?? []).length, [steps]);
|
|
33349
33349
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33350
|
-
|
|
33350
|
+
chunkTL5VXRNT_cjs.AgentBar,
|
|
33351
33351
|
{
|
|
33352
33352
|
className,
|
|
33353
33353
|
testId,
|
|
@@ -33403,7 +33403,7 @@ function AgentControlBar({
|
|
|
33403
33403
|
const isPaused = controlState === "paused" || controlState === "resuming";
|
|
33404
33404
|
const steps = agentSteps ?? [];
|
|
33405
33405
|
const currentStep = browser.getCurrentStep(steps);
|
|
33406
|
-
const currentPresentation =
|
|
33406
|
+
const currentPresentation = chunkTL5VXRNT_cjs.getCurrentAgentStepPresentation(steps);
|
|
33407
33407
|
const CurrentStepIcon = currentPresentation?.Icon;
|
|
33408
33408
|
const stepLabel2 = currentPresentation?.description ?? "Agent working\u2026";
|
|
33409
33409
|
const runningLanes = browser.extractSubagentLanes(steps).filter((l) => l.status === "running");
|
|
@@ -33420,7 +33420,7 @@ function AgentControlBar({
|
|
|
33420
33420
|
}
|
|
33421
33421
|
);
|
|
33422
33422
|
const status = /* @__PURE__ */ jsxRuntime.jsx(
|
|
33423
|
-
|
|
33423
|
+
chunkTL5VXRNT_cjs.AgentBarStatus,
|
|
33424
33424
|
{
|
|
33425
33425
|
state: showState ? controlState : void 0,
|
|
33426
33426
|
stateLabel: STATE_LABEL[controlState],
|
|
@@ -33462,7 +33462,7 @@ function AgentControlBar({
|
|
|
33462
33462
|
];
|
|
33463
33463
|
const controls = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33464
33464
|
onStop && /* @__PURE__ */ jsxRuntime.jsx(
|
|
33465
|
-
|
|
33465
|
+
chunkTL5VXRNT_cjs.AgentBarIconButton,
|
|
33466
33466
|
{
|
|
33467
33467
|
onClick: onStop,
|
|
33468
33468
|
title: "Stop",
|
|
@@ -33471,22 +33471,22 @@ function AgentControlBar({
|
|
|
33471
33471
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Square, { className: "h-3 w-3", fill: "currentColor" })
|
|
33472
33472
|
}
|
|
33473
33473
|
),
|
|
33474
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33474
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.AgentBarMenu, { items: menuItems })
|
|
33475
33475
|
] });
|
|
33476
33476
|
const displayedQueuedMessages = (transientQueuedMessages ?? []).filter(
|
|
33477
33477
|
(message) => !message.serverId || !queuedMessages.some((queued) => queued.external_id === message.serverId)
|
|
33478
33478
|
);
|
|
33479
33479
|
const queuedNotes = displayedQueuedMessages.filter((message) => message.content);
|
|
33480
|
-
const below = probeAnswer || queuedNotes.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33480
|
+
const below = probeAnswer || queuedNotes.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(chunkTL5VXRNT_cjs.AgentBarNotes, { children: [
|
|
33481
33481
|
queuedNotes.map((message, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
33482
|
-
|
|
33482
|
+
chunkTL5VXRNT_cjs.AgentBarQueuedNote,
|
|
33483
33483
|
{
|
|
33484
33484
|
text: message.content ?? "",
|
|
33485
33485
|
isAcknowledged: message.acknowledged
|
|
33486
33486
|
},
|
|
33487
33487
|
index
|
|
33488
33488
|
)),
|
|
33489
|
-
probeAnswer && /* @__PURE__ */ jsxRuntime.jsx(
|
|
33489
|
+
probeAnswer && /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.AgentBarProbeAnswer, { answer: probeAnswer.answer })
|
|
33490
33490
|
] }) : null;
|
|
33491
33491
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33492
33492
|
AgentBarShell,
|
|
@@ -33543,7 +33543,7 @@ function RunningSubagentsRoster({
|
|
|
33543
33543
|
if (leafId) selectThread(leafId);
|
|
33544
33544
|
};
|
|
33545
33545
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33546
|
-
|
|
33546
|
+
chunkTL5VXRNT_cjs.SubagentRoster,
|
|
33547
33547
|
{
|
|
33548
33548
|
lanes: rosterLanes,
|
|
33549
33549
|
className,
|
|
@@ -33667,7 +33667,7 @@ function useOpenChunk() {
|
|
|
33667
33667
|
const meta = chunk.metadata;
|
|
33668
33668
|
if (!meta?.doc_ext_id) return;
|
|
33669
33669
|
const listed = documents?.find((d) => d.external_id === meta.doc_ext_id);
|
|
33670
|
-
openDocument(
|
|
33670
|
+
openDocument(chunkYD3RN2FY_cjs.citedVersionRef(meta.doc_ext_id, meta.doc_version, listed?.current_version), {
|
|
33671
33671
|
page: meta.page_number ?? void 0,
|
|
33672
33672
|
passageId: meta.chunk_ext_id ?? void 0
|
|
33673
33673
|
});
|
|
@@ -34269,7 +34269,7 @@ function useOpenWorkspaceIcon() {
|
|
|
34269
34269
|
ui.ShieldIcon,
|
|
34270
34270
|
{
|
|
34271
34271
|
char: workspace.name.charAt(0),
|
|
34272
|
-
workspaceColor:
|
|
34272
|
+
workspaceColor: chunkQWKT4DO6_cjs.workspaceKindColor(react.getWorkspaceKind(workspace)),
|
|
34273
34273
|
size
|
|
34274
34274
|
}
|
|
34275
34275
|
) : void 0;
|
|
@@ -34285,7 +34285,7 @@ function WorkflowStepMessage({
|
|
|
34285
34285
|
const { conversations } = react.useConversationItems();
|
|
34286
34286
|
const activity = react.useConversationActivity(conversationId ?? void 0, { live: true });
|
|
34287
34287
|
const plan = conversations.find((c) => c.external_id === conversationId)?.plan;
|
|
34288
|
-
const steps =
|
|
34288
|
+
const steps = chunkTL5VXRNT_cjs.fromPlanSteps(plan?.steps ?? []);
|
|
34289
34289
|
const found = steps.find((s) => s.id === step);
|
|
34290
34290
|
const states = chunkEZLZ3MDU_cjs.stepStatesFromActivity(activity.data ?? []);
|
|
34291
34291
|
const { data: documents = [] } = react.useDocuments();
|
|
@@ -34457,7 +34457,7 @@ var MessageComponent = ({
|
|
|
34457
34457
|
const isQueuedAnswer = !isUser && message.status === "queued" && !isGenerating;
|
|
34458
34458
|
const isAwaitingAnswer = (isGenerating || isRunningOnServer) && !isStopped && !!message.pendingUserInput;
|
|
34459
34459
|
const showWorkingIndicator = (isGenerating || isRunningOnServer) && !isQueuedAnswer && !responseContent.trim() && !linkedArtifact && !isAwaitingAnswer;
|
|
34460
|
-
const workingStepLabel = showWorkingIndicator ?
|
|
34460
|
+
const workingStepLabel = showWorkingIndicator ? chunkTL5VXRNT_cjs.getCurrentAgentStepPresentation(message.agentSteps ?? [])?.description : void 0;
|
|
34461
34461
|
const workingStepStart = showWorkingIndicator ? browser.getCurrentStep(message.agentSteps ?? [])?.t ?? 0 : 0;
|
|
34462
34462
|
const showEmptyAnswer = !isUser && !isGenerating && !isRunningOnServer && !isFailed && !isStopped && !responseContent.trim() && !linkedArtifact;
|
|
34463
34463
|
const isEmptyStopped = isStopped && !responseContent.trim();
|
|
@@ -34477,7 +34477,7 @@ var MessageComponent = ({
|
|
|
34477
34477
|
else session.setDraft(retry.question.content);
|
|
34478
34478
|
};
|
|
34479
34479
|
const factData = React7.useMemo(
|
|
34480
|
-
() =>
|
|
34480
|
+
() => chunkYD3RN2FY_cjs.buildFactCitations(responseContent, activeCitations, citationData),
|
|
34481
34481
|
[responseContent, activeCitations, citationData]
|
|
34482
34482
|
);
|
|
34483
34483
|
const factText = factData.text;
|
|
@@ -34580,7 +34580,7 @@ var MessageComponent = ({
|
|
|
34580
34580
|
notify17("Cannot create fact: no workspace open", "error");
|
|
34581
34581
|
return;
|
|
34582
34582
|
}
|
|
34583
|
-
const chronology =
|
|
34583
|
+
const chronology = chunkYD3RN2FY_cjs.chronologyFactBodies(factText, factData.citations);
|
|
34584
34584
|
try {
|
|
34585
34585
|
if (chronology) {
|
|
34586
34586
|
await createFacts.mutateAsync({ facts: chronology });
|
|
@@ -34761,7 +34761,7 @@ var MessageComponent = ({
|
|
|
34761
34761
|
},
|
|
34762
34762
|
"data-testid": `message-model-${messageId}`,
|
|
34763
34763
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
34764
|
-
|
|
34764
|
+
chunkTL5VXRNT_cjs.AssistantEntity,
|
|
34765
34765
|
{
|
|
34766
34766
|
name: modelDisplayName,
|
|
34767
34767
|
modelName,
|
|
@@ -34874,7 +34874,7 @@ var MessageComponent = ({
|
|
|
34874
34874
|
// Stays the ARBI identity while streaming: the model name arrives
|
|
34875
34875
|
// with the first step that reports one and would swap the author
|
|
34876
34876
|
// mid-answer. The model is shown in the footer once settled.
|
|
34877
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
34877
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.AssistantEntity, { size: 16, pillSize: "sm" })
|
|
34878
34878
|
),
|
|
34879
34879
|
timeLabel,
|
|
34880
34880
|
isSettled: settledForHeader,
|
|
@@ -35339,7 +35339,7 @@ function ConnectedMessageList({ messages }) {
|
|
|
35339
35339
|
start: virtualItem.start,
|
|
35340
35340
|
messageId: entry.id,
|
|
35341
35341
|
setSize: transcript.length,
|
|
35342
|
-
children: entry.item.card ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
35342
|
+
children: entry.item.card ?? /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ThreadActivity, { item: entry.item, children: entry.item.onOpenDocument && /* @__PURE__ */ jsxRuntime.jsx(
|
|
35343
35343
|
"button",
|
|
35344
35344
|
{
|
|
35345
35345
|
className: "mt-1 hover:underline text-primary",
|
|
@@ -36234,7 +36234,7 @@ function ConnectedConversation({
|
|
|
36234
36234
|
}, [isGenerating]);
|
|
36235
36235
|
const slashWorkflows = useSlashSkillWorkflows({ landing: "current-chat" });
|
|
36236
36236
|
const composerSkills = React7.useMemo(
|
|
36237
|
-
() => ({ builtin:
|
|
36237
|
+
() => ({ builtin: chunkTL5VXRNT_cjs.BUILTIN_SKILLS, openFor: slashWorkflows.openFor }),
|
|
36238
36238
|
[slashWorkflows.openFor]
|
|
36239
36239
|
);
|
|
36240
36240
|
const browseSkills = React7.useMemo(
|
|
@@ -36309,7 +36309,7 @@ function ConnectedConversation({
|
|
|
36309
36309
|
/* @__PURE__ */ jsxRuntime.jsx(chunk7U2DNPMZ_cjs.CallConversationEmpty, { callExtId: meetingCallExtId }),
|
|
36310
36310
|
/* @__PURE__ */ jsxRuntime.jsx(chunk7U2DNPMZ_cjs.ProvisionalSpeakers, { ids: provisionalSpeakers })
|
|
36311
36311
|
] })
|
|
36312
|
-
) : currentTask && currentTask.status != null ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
36312
|
+
) : currentTask && currentTask.status != null ? /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.TaskEmptyState, { task: currentTask }) : pendingFirstTurn && isGenerating ? /* @__PURE__ */ jsxRuntime.jsx(ConnectedMessageArea, { ref: containerRef, messages: pendingFirstTurn }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
36313
36313
|
ConnectedConversationEmpty,
|
|
36314
36314
|
{
|
|
36315
36315
|
hasDocuments: allWorkspaceDocuments.length > 0,
|
|
@@ -37565,8 +37565,7 @@ var sodiumWarmed = false;
|
|
|
37565
37565
|
function warmSodium() {
|
|
37566
37566
|
if (sodiumWarmed) return;
|
|
37567
37567
|
sodiumWarmed = true;
|
|
37568
|
-
const run = () => void client.initSodium
|
|
37569
|
-
});
|
|
37568
|
+
const run = () => void chunkQWKT4DO6_cjs.prefetchChunk(client.initSodium);
|
|
37570
37569
|
if (typeof window.requestIdleCallback === "function") window.requestIdleCallback(run);
|
|
37571
37570
|
else window.setTimeout(run, 200);
|
|
37572
37571
|
}
|
|
@@ -38170,7 +38169,7 @@ function SsoResendVerificationButton({
|
|
|
38170
38169
|
onClick: async () => handleResendEmailVerification(),
|
|
38171
38170
|
disabled: loading || disabled,
|
|
38172
38171
|
"aria-label": "Resend verification email",
|
|
38173
|
-
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
38172
|
+
children: loading ? /* @__PURE__ */ jsxRuntime.jsx(chunkI45LDMQU_cjs.LoadingIndicator, {}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
38174
38173
|
"Didn't get a verification email? ",
|
|
38175
38174
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: "Resend" })
|
|
38176
38175
|
] })
|
|
@@ -39064,27 +39063,27 @@ function ConnectedOAuthConsentPage({
|
|
|
39064
39063
|
oauthErrorRedirect(params.redirectUri, params.state, "access_denied");
|
|
39065
39064
|
}
|
|
39066
39065
|
if (error && !params) {
|
|
39067
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
39066
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentMessage, { tone: "error", title: "Invalid Request", children: error }) });
|
|
39068
39067
|
}
|
|
39069
39068
|
if (!params) {
|
|
39070
39069
|
return null;
|
|
39071
39070
|
}
|
|
39072
39071
|
if (clientInfo?.isLocalAgentFlow) {
|
|
39073
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
39072
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentMessage, { tone: "warning", title: "Close this tab", children: "This tab opened alongside the correct authorization page. Please close this tab and complete the connection in the other tab that opened at the same time." }) });
|
|
39074
39073
|
}
|
|
39075
39074
|
if (!isAuthenticated2) {
|
|
39076
39075
|
return null;
|
|
39077
39076
|
}
|
|
39078
39077
|
if (callbackUrl) {
|
|
39079
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
39080
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
39078
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkTL5VXRNT_cjs.ConsentCard, { size: "md", children: [
|
|
39079
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTL5VXRNT_cjs.ConsentHeader, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ClipboardList, {}), title: "Almost there", children: [
|
|
39081
39080
|
"A new tab has opened to complete the connection. If it succeeded, you can close this page. If you see a connection error there, paste the URL below into Claude Cowork \u2014",
|
|
39082
39081
|
" ",
|
|
39083
39082
|
copied ? "it's already copied to your clipboard." : "copy it first."
|
|
39084
39083
|
] }),
|
|
39085
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
39086
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
39087
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
39084
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTL5VXRNT_cjs.ConsentSection, { title: "Callback URL", children: [
|
|
39085
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.CopyableUrl, { url: callbackUrl, copied, onCopy: handleCopy }),
|
|
39086
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTL5VXRNT_cjs.ConsentText, { variant: "hint", children: [
|
|
39088
39087
|
"In Claude Code, paste the URL at the prompt that says",
|
|
39089
39088
|
" ",
|
|
39090
39089
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono text-foreground", children: '"paste the full redirect URL here"' }),
|
|
@@ -39093,17 +39092,17 @@ function ConnectedOAuthConsentPage({
|
|
|
39093
39092
|
] })
|
|
39094
39093
|
] }) });
|
|
39095
39094
|
}
|
|
39096
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
39097
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
39098
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
39095
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentPage, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkTL5VXRNT_cjs.ConsentCard, { children: [
|
|
39096
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkTL5VXRNT_cjs.ConsentHeader, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Link2, {}), title: `Connect to ${appName}`, children: [
|
|
39097
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentStrong, { children: clientInfo?.name ?? params.clientId }),
|
|
39099
39098
|
" is requesting access to your ",
|
|
39100
39099
|
appName,
|
|
39101
39100
|
" workspace."
|
|
39102
39101
|
] }),
|
|
39103
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
39104
|
-
error && /* @__PURE__ */ jsxRuntime.jsx(
|
|
39105
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
39106
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
39102
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentSection, { title: "This will allow", children: /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentPermissionList, { items: permissions }) }),
|
|
39103
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentNotice, { tone: "error", children: error }),
|
|
39104
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentActions, { isLoading: loading, onDeny: handleDeny, onAllow: handleAllow }),
|
|
39105
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTL5VXRNT_cjs.ConsentFootnote, { children: footnote })
|
|
39107
39106
|
] }) });
|
|
39108
39107
|
}
|
|
39109
39108
|
function ConnectedSharedFilesPage({
|
|
@@ -39203,55 +39202,55 @@ function ConnectedAccountAccessBadge() {
|
|
|
39203
39202
|
|
|
39204
39203
|
Object.defineProperty(exports, "CAP_REACHED_MESSAGE", {
|
|
39205
39204
|
enumerable: true,
|
|
39206
|
-
get: function () { return
|
|
39205
|
+
get: function () { return chunkLX3JJYVP_cjs.CAP_REACHED_MESSAGE; }
|
|
39207
39206
|
});
|
|
39208
39207
|
Object.defineProperty(exports, "ZERO_BUDGET_MESSAGE", {
|
|
39209
39208
|
enumerable: true,
|
|
39210
|
-
get: function () { return
|
|
39209
|
+
get: function () { return chunkLX3JJYVP_cjs.ZERO_BUDGET_MESSAGE; }
|
|
39211
39210
|
});
|
|
39212
39211
|
Object.defineProperty(exports, "aiUsageResetTimestamp", {
|
|
39213
39212
|
enumerable: true,
|
|
39214
|
-
get: function () { return
|
|
39213
|
+
get: function () { return chunkLX3JJYVP_cjs.aiUsageResetTimestamp; }
|
|
39215
39214
|
});
|
|
39216
39215
|
Object.defineProperty(exports, "formatMoney", {
|
|
39217
39216
|
enumerable: true,
|
|
39218
|
-
get: function () { return
|
|
39217
|
+
get: function () { return chunkLX3JJYVP_cjs.formatMoney; }
|
|
39219
39218
|
});
|
|
39220
39219
|
Object.defineProperty(exports, "formatResetDate", {
|
|
39221
39220
|
enumerable: true,
|
|
39222
|
-
get: function () { return
|
|
39221
|
+
get: function () { return chunkLX3JJYVP_cjs.formatResetDate; }
|
|
39223
39222
|
});
|
|
39224
39223
|
Object.defineProperty(exports, "getQuotaItems", {
|
|
39225
39224
|
enumerable: true,
|
|
39226
|
-
get: function () { return
|
|
39225
|
+
get: function () { return chunkLX3JJYVP_cjs.getQuotaItems; }
|
|
39227
39226
|
});
|
|
39228
39227
|
Object.defineProperty(exports, "isAddonBudgetZero", {
|
|
39229
39228
|
enumerable: true,
|
|
39230
|
-
get: function () { return
|
|
39229
|
+
get: function () { return chunkLX3JJYVP_cjs.isAddonBudgetZero; }
|
|
39231
39230
|
});
|
|
39232
39231
|
Object.defineProperty(exports, "isProProject", {
|
|
39233
39232
|
enumerable: true,
|
|
39234
|
-
get: function () { return
|
|
39233
|
+
get: function () { return chunkLX3JJYVP_cjs.isProProject; }
|
|
39235
39234
|
});
|
|
39236
39235
|
Object.defineProperty(exports, "planBadgeView", {
|
|
39237
39236
|
enumerable: true,
|
|
39238
|
-
get: function () { return
|
|
39237
|
+
get: function () { return chunkLX3JJYVP_cjs.planBadgeView; }
|
|
39239
39238
|
});
|
|
39240
39239
|
Object.defineProperty(exports, "planName", {
|
|
39241
39240
|
enumerable: true,
|
|
39242
|
-
get: function () { return
|
|
39241
|
+
get: function () { return chunkLX3JJYVP_cjs.planName; }
|
|
39243
39242
|
});
|
|
39244
39243
|
Object.defineProperty(exports, "projectGroupBilling", {
|
|
39245
39244
|
enumerable: true,
|
|
39246
|
-
get: function () { return
|
|
39245
|
+
get: function () { return chunkLX3JJYVP_cjs.projectGroupBilling; }
|
|
39247
39246
|
});
|
|
39248
39247
|
Object.defineProperty(exports, "useBillingSupport", {
|
|
39249
39248
|
enumerable: true,
|
|
39250
|
-
get: function () { return
|
|
39249
|
+
get: function () { return chunkLX3JJYVP_cjs.useBillingSupport; }
|
|
39251
39250
|
});
|
|
39252
39251
|
Object.defineProperty(exports, "useRewardBalance", {
|
|
39253
39252
|
enumerable: true,
|
|
39254
|
-
get: function () { return
|
|
39253
|
+
get: function () { return chunkLX3JJYVP_cjs.useRewardBalance; }
|
|
39255
39254
|
});
|
|
39256
39255
|
Object.defineProperty(exports, "ConnectedAssistantDock", {
|
|
39257
39256
|
enumerable: true,
|
|
@@ -39287,43 +39286,43 @@ Object.defineProperty(exports, "useWorkspaceDocs", {
|
|
|
39287
39286
|
});
|
|
39288
39287
|
Object.defineProperty(exports, "ConnectedWorkflowDocumentsField", {
|
|
39289
39288
|
enumerable: true,
|
|
39290
|
-
get: function () { return
|
|
39289
|
+
get: function () { return chunkSQQULKT4_cjs.ConnectedWorkflowDocumentsField; }
|
|
39291
39290
|
});
|
|
39292
39291
|
Object.defineProperty(exports, "ConnectedWorkflowLauncher", {
|
|
39293
39292
|
enumerable: true,
|
|
39294
|
-
get: function () { return
|
|
39293
|
+
get: function () { return chunkSQQULKT4_cjs.ConnectedWorkflowLauncher; }
|
|
39295
39294
|
});
|
|
39296
39295
|
Object.defineProperty(exports, "ConnectedWorkflowsTable", {
|
|
39297
39296
|
enumerable: true,
|
|
39298
|
-
get: function () { return
|
|
39297
|
+
get: function () { return chunkSQQULKT4_cjs.ConnectedWorkflowsTable; }
|
|
39299
39298
|
});
|
|
39300
39299
|
Object.defineProperty(exports, "DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS", {
|
|
39301
39300
|
enumerable: true,
|
|
39302
|
-
get: function () { return
|
|
39301
|
+
get: function () { return chunkSQQULKT4_cjs.DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS; }
|
|
39303
39302
|
});
|
|
39304
39303
|
Object.defineProperty(exports, "toWorkflowFieldDocument", {
|
|
39305
39304
|
enumerable: true,
|
|
39306
|
-
get: function () { return
|
|
39305
|
+
get: function () { return chunkSQQULKT4_cjs.toWorkflowFieldDocument; }
|
|
39307
39306
|
});
|
|
39308
39307
|
Object.defineProperty(exports, "useConnectedAgentOptions", {
|
|
39309
39308
|
enumerable: true,
|
|
39310
|
-
get: function () { return
|
|
39309
|
+
get: function () { return chunkSQQULKT4_cjs.useConnectedAgentOptions; }
|
|
39311
39310
|
});
|
|
39312
39311
|
Object.defineProperty(exports, "useConnectedWorkflowScopeSource", {
|
|
39313
39312
|
enumerable: true,
|
|
39314
|
-
get: function () { return
|
|
39313
|
+
get: function () { return chunkSQQULKT4_cjs.useConnectedWorkflowScopeSource; }
|
|
39315
39314
|
});
|
|
39316
39315
|
Object.defineProperty(exports, "useConnectedWorkspaceRole", {
|
|
39317
39316
|
enumerable: true,
|
|
39318
|
-
get: function () { return
|
|
39317
|
+
get: function () { return chunkSQQULKT4_cjs.useConnectedWorkspaceRole; }
|
|
39319
39318
|
});
|
|
39320
39319
|
Object.defineProperty(exports, "useDocxCommentTarget", {
|
|
39321
39320
|
enumerable: true,
|
|
39322
|
-
get: function () { return
|
|
39321
|
+
get: function () { return chunkSQQULKT4_cjs.useDocxCommentTarget; }
|
|
39323
39322
|
});
|
|
39324
39323
|
Object.defineProperty(exports, "useNativeDocxSupport", {
|
|
39325
39324
|
enumerable: true,
|
|
39326
|
-
get: function () { return
|
|
39325
|
+
get: function () { return chunkSQQULKT4_cjs.useNativeDocxSupport; }
|
|
39327
39326
|
});
|
|
39328
39327
|
Object.defineProperty(exports, "ConnectedDocumentToolsProvider", {
|
|
39329
39328
|
enumerable: true,
|