@arbidocs/blocks 0.5.126 → 0.5.127
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/README.md +19 -0
- package/dist/{ConnectedCallDock-733O5M36.cjs → ConnectedCallDock-XJOYVVAH.cjs} +5 -5
- package/dist/{ConnectedCallDock-733O5M36.cjs.map → ConnectedCallDock-XJOYVVAH.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-TAUGSRGV.cjs → ConnectedCallRoom-CUDYAPQK.cjs} +5 -5
- package/dist/{ConnectedCallRoom-TAUGSRGV.cjs.map → ConnectedCallRoom-CUDYAPQK.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-HDE522YC.cjs → ConnectedNativeDocxComparison-JUF2TI2P.cjs} +9 -9
- package/dist/{ConnectedNativeDocxComparison-HDE522YC.cjs.map → ConnectedNativeDocxComparison-JUF2TI2P.cjs.map} +1 -1
- package/dist/ConnectedPresentation-SI3L77J4.cjs +1 -1
- package/dist/{ConnectedSlidesTab-JSPU6EY5.cjs → ConnectedSlidesTab-E76OVY34.cjs} +3 -3
- package/dist/{ConnectedSlidesTab-JSPU6EY5.cjs.map → ConnectedSlidesTab-E76OVY34.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-4FHPOAFZ.cjs → ConnectedStreamedWordArtifact-Q64DRRQD.cjs} +9 -9
- package/dist/{ConnectedStreamedWordArtifact-4FHPOAFZ.cjs.map → ConnectedStreamedWordArtifact-Q64DRRQD.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-BDNXP3D4.cjs → DocumentReviewCard-M53XFLI2.cjs} +4 -4
- package/dist/{DocumentReviewCard-BDNXP3D4.cjs.map → DocumentReviewCard-M53XFLI2.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-WQRNSKWM.cjs → FilesViewerDialog-V6FSRQTP.cjs} +8 -8
- package/dist/{FilesViewerDialog-WQRNSKWM.cjs.map → FilesViewerDialog-V6FSRQTP.cjs.map} +1 -1
- package/dist/{NativeDocxEditor-SUDULUN3.cjs → NativeDocxEditor-2PTEK6ND.cjs} +6 -6
- package/dist/{NativeDocxEditor-SUDULUN3.cjs.map → NativeDocxEditor-2PTEK6ND.cjs.map} +1 -1
- package/dist/WorkspaceTableView-3XYAV4BV.cjs +1 -1
- package/dist/agents/index.cjs +1 -1
- package/dist/ai-IEIR7SC2.cjs +1 -1
- package/dist/calls/index.cjs +2 -2
- package/dist/{chunk-Q6N5D3R5.cjs → chunk-23I5EUZA.cjs} +45 -15
- package/dist/chunk-23I5EUZA.cjs.map +1 -0
- package/dist/{chunk-OHHKBURG.cjs → chunk-2SU37RZA.cjs} +378 -11
- package/dist/chunk-2SU37RZA.cjs.map +1 -0
- package/dist/{chunk-6B4CCDDB.cjs → chunk-ESVRVZ53.cjs} +5 -5
- package/dist/{chunk-6B4CCDDB.cjs.map → chunk-ESVRVZ53.cjs.map} +1 -1
- package/dist/{chunk-KA3F6TIH.cjs → chunk-IWHP7FAB.cjs} +12 -5
- package/dist/chunk-IWHP7FAB.cjs.map +1 -0
- package/dist/{chunk-FB3JXSQT.cjs → chunk-JVLOIIA7.cjs} +8 -8
- package/dist/{chunk-FB3JXSQT.cjs.map → chunk-JVLOIIA7.cjs.map} +1 -1
- package/dist/{chunk-FGOJBOZX.cjs → chunk-M6WVIGYP.cjs} +4 -4
- package/dist/{chunk-FGOJBOZX.cjs.map → chunk-M6WVIGYP.cjs.map} +1 -1
- package/dist/{chunk-I4X72WUT.cjs → chunk-MMSHIIKG.cjs} +6 -6
- package/dist/{chunk-I4X72WUT.cjs.map → chunk-MMSHIIKG.cjs.map} +1 -1
- package/dist/{chunk-LXM5QXII.cjs → chunk-MXBXZXXQ.cjs} +3 -3
- package/dist/{chunk-LXM5QXII.cjs.map → chunk-MXBXZXXQ.cjs.map} +1 -1
- package/dist/{chunk-463QM764.cjs → chunk-NG2EE7HR.cjs} +3 -3
- package/dist/{chunk-463QM764.cjs.map → chunk-NG2EE7HR.cjs.map} +1 -1
- package/dist/chunk-NTDQQLDD.cjs +18 -0
- package/dist/{chunk-OALQGO5C.cjs.map → chunk-NTDQQLDD.cjs.map} +1 -1
- package/dist/{chunk-XNB27POJ.cjs → chunk-Q6IKXWPG.cjs} +4 -4
- package/dist/{chunk-XNB27POJ.cjs.map → chunk-Q6IKXWPG.cjs.map} +1 -1
- package/dist/{chunk-LOB2ATS5.cjs → chunk-VLQCLQAS.cjs} +5 -5
- package/dist/{chunk-LOB2ATS5.cjs.map → chunk-VLQCLQAS.cjs.map} +1 -1
- package/dist/{chunk-4KEQ62SL.cjs → chunk-YP5EBGLU.cjs} +6 -6
- package/dist/{chunk-4KEQ62SL.cjs.map → chunk-YP5EBGLU.cjs.map} +1 -1
- package/dist/{chunk-CMPHJRVV.cjs → chunk-ZYGAXD3N.cjs} +3 -3
- package/dist/{chunk-CMPHJRVV.cjs.map → chunk-ZYGAXD3N.cjs.map} +1 -1
- package/dist/connect/docx.cjs +13 -13
- package/dist/connect/index.cjs +233 -287
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +6 -6
- package/dist/connection/remote-control/ConnectedRemoteControlConsent.js +6 -3
- package/dist/connection/remote-control/ConnectedRemoteControlConsent.js.map +2 -2
- package/dist/connection/remote-control/ConnectedRemoteControlIndicator.js +12 -2
- package/dist/connection/remote-control/ConnectedRemoteControlIndicator.js.map +2 -2
- package/dist/connection/remote-control/ConnectedRemoteControlSwitch.js +1 -1
- package/dist/connection/remote-control/ConnectedRemoteControlSwitch.js.map +1 -1
- package/dist/connection/remote-control/browser-diagnostics.d.ts +7 -0
- package/dist/connection/remote-control/browser-diagnostics.js +109 -0
- package/dist/connection/remote-control/browser-diagnostics.js.map +7 -0
- package/dist/connection/remote-control/remoteControl.d.ts +9 -1
- package/dist/connection/remote-control/remoteControl.js +130 -10
- package/dist/connection/remote-control/remoteControl.js.map +2 -2
- package/dist/connection/remote-control/screen-sharing.d.ts +11 -0
- package/dist/connection/remote-control/screen-sharing.js +78 -0
- package/dist/connection/remote-control/screen-sharing.js.map +7 -0
- package/dist/connection/report-problem/screen-capture.d.ts +1 -0
- package/dist/connection/report-problem/screen-capture.js +2 -1
- package/dist/connection/report-problem/screen-capture.js.map +2 -2
- package/dist/docx/NativeDocxEditor.js +14 -12
- package/dist/docx/NativeDocxEditor.js.map +2 -2
- package/dist/docx/index.cjs +38 -38
- package/dist/docx/useVersionAutosave.d.ts +10 -0
- package/dist/docx/useVersionAutosave.js +36 -0
- package/dist/docx/useVersionAutosave.js.map +7 -0
- package/dist/embed/index.cjs +9 -9
- package/dist/facts/index.cjs +43 -43
- package/dist/index.cjs +97 -97
- package/dist/settings/index.cjs +1 -1
- package/dist/shell/RemoteControlPill.d.ts +2 -1
- package/dist/shell/RemoteControlPill.js +10 -3
- package/dist/shell/RemoteControlPill.js.map +2 -2
- package/dist/shell/index.cjs +21 -21
- package/dist/studio/index.cjs +1 -1
- package/dist/workflow-canvas/index.cjs +12 -12
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/chunk-KA3F6TIH.cjs.map +0 -1
- package/dist/chunk-OALQGO5C.cjs +0 -18
- package/dist/chunk-OHHKBURG.cjs.map +0 -1
- package/dist/chunk-Q6N5D3R5.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -951,6 +951,25 @@ connection registers the handler; a host with its own socket passes `useRemoteCo
|
|
|
951
951
|
`ArbiWebSocketProvider`'s `handlers`. With remote control off, the handler, prompt, pill and switch
|
|
952
952
|
are absent; "Show me" works either way.
|
|
953
953
|
|
|
954
|
+
For troubleshooting, backend `view_screen` requests use the same dialog with **Start sharing**, **Share one image**,
|
|
955
|
+
and **Deny**. Start sharing retains the browser-selected tab/window stream across chat turns; each tool call takes
|
|
956
|
+
one fresh native frame. The pill exposes a visible **Stop sharing** button. That button, the browser's own Stop,
|
|
957
|
+
sign-out, workspace change, and runtime teardown close the stream and revoke control together. There is no recording
|
|
958
|
+
or audio. Browser permission to choose the surface remains required even when remote control was already enabled.
|
|
959
|
+
|
|
960
|
+
While sharing, a bounded in-memory feed collects ARBI console warnings/errors, uncaught errors/rejections and failed
|
|
961
|
+
request summaries, using the existing error-report formatter. The SDK's `diagnose()` supplies content-free connection,
|
|
962
|
+
session and workspace checks. Replies also list visible ARBI controls with selectors. No request/response bodies,
|
|
963
|
+
headers, storage, or form values are collected; URL queries/fragments and common credential patterns are removed.
|
|
964
|
+
The feed starts at sharing, clears at Stop, and cannot read prior DevTools history or another tab's console. Diagnostics
|
|
965
|
+
always describe ARBI even if the user shares another surface. Fresh frame evidence travels through authenticated,
|
|
966
|
+
owner/workspace/session-bound replies and expires after consumption; it is not uploaded as a document.
|
|
967
|
+
|
|
968
|
+
Workspace `control_ui` requests acknowledge runner completion/denial/Stop back to the agent. Completion means the
|
|
969
|
+
sequence finished, not proof that every target existed or a change succeeded; use a fresh `view_screen` inspection
|
|
970
|
+
to verify effects. Viewing and control share the existing grant, while control remains limited to ARBI's guided runner.
|
|
971
|
+
|
|
972
|
+
|
|
954
973
|
## Workflows page
|
|
955
974
|
|
|
956
975
|
`ConnectedWorkflowsPage` (`@arbidocs/blocks/workflow-canvas`) is the whole Workflows page: one
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkNG2EE7HR_cjs = require('./chunk-NG2EE7HR.cjs');
|
|
5
|
+
require('./chunk-VZOOGA47.cjs');
|
|
5
6
|
var chunk7OPOPYV6_cjs = require('./chunk-7OPOPYV6.cjs');
|
|
6
7
|
require('./chunk-OAIOOVFN.cjs');
|
|
7
8
|
var chunkQMIHLJMH_cjs = require('./chunk-QMIHLJMH.cjs');
|
|
@@ -10,7 +11,6 @@ require('./chunk-TMX7YFVM.cjs');
|
|
|
10
11
|
require('./chunk-3YZKDCWY.cjs');
|
|
11
12
|
require('./chunk-SJSGSHIT.cjs');
|
|
12
13
|
require('./chunk-ZT5MIFLC.cjs');
|
|
13
|
-
require('./chunk-VZOOGA47.cjs');
|
|
14
14
|
require('./chunk-XCKHOXRP.cjs');
|
|
15
15
|
require('./chunk-KLMNCBLY.cjs');
|
|
16
16
|
require('./chunk-KNGZZC4O.cjs');
|
|
@@ -304,7 +304,7 @@ function ConnectedCallDock() {
|
|
|
304
304
|
) })
|
|
305
305
|
] })),
|
|
306
306
|
connected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
307
|
-
|
|
307
|
+
chunkNG2EE7HR_cjs.ConnectedCallRoom,
|
|
308
308
|
{
|
|
309
309
|
tokenResponse: connected,
|
|
310
310
|
e2eeKey: active.key,
|
|
@@ -329,5 +329,5 @@ function ConnectedCallDock() {
|
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
exports.ConnectedCallDock = ConnectedCallDock;
|
|
332
|
-
//# sourceMappingURL=ConnectedCallDock-
|
|
333
|
-
//# sourceMappingURL=ConnectedCallDock-
|
|
332
|
+
//# sourceMappingURL=ConnectedCallDock-XJOYVVAH.cjs.map
|
|
333
|
+
//# sourceMappingURL=ConnectedCallDock-XJOYVVAH.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/calls/connected/WebinarHolding.tsx","../src/calls/connected/ConnectedCallDock.tsx"],"names":["useArbi","useRef","useEffect","callSession","joinFromPreJoin","AUDIENCE_CHOICES","onCallEvent","jsx","WebinarWaiting","CallUserPill","useState","useLayoutEffect","nearestCorner","useArbiHost","useCallSession","useCallback","useMirrorSelfView","useCall","rejoinAsAudience","calls","callLink","Fragment","jsxs","cn","MinimisedCall","CallHeader","CallStateMessage","PreJoin","DEFAULT_JOIN_CHOICES","classifyMediaError","Button","ConnectedCallRoom"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,IAAM,oBAAA,GAAuB,GAAA;AAGpC,SAAS,eAAA,CAAgB,SAAA,EAAmB,WAAA,EAAqB,OAAA,EAAwB;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EAEhE;AAAA;AAAA,WAEJ,EAEJ;AAAA,SAAA,EACF,CAAA,CAAA;AAAA,QAEH,6BACCvB,cAAAA;AAAA,UAACwB,mCAAA;AAAA,UAAA;AAAA,YAGC,aAAA,EAAe,SAAA;AAAA,YACf,SAAS,MAAA,CAAO,GAAA;AAAA,YAChB,OAAA,EAAS,OAAO,OAAA,IAAW,MAAA;AAAA,YAC3B,WAAW,MAAA,CAAO,SAAA;AAAA,YAClB,sBAAsB,MAAA,CAAO,oBAAA;AAAA,YAC7B,KAAA;AAAA,YACA,WAAW,MAAA,CAAO,SAAA;AAAA,YAClB,IAAA;AAAA,YACA,SAAA;AAAA,YACA,iBAAA,EAAmB,gBAAA;AAAA,YACnB,OAAA,EAAS,MAAM,UAAA,CAAW,SAAS,CAAA;AAAA,YACnC,WAAA;AAAA,YACA,YAAA;AAAA,YACA,cAAA,EAAgB;AAAA,WAAA;AAAA,UAdX,CAAA,EAAG,MAAA,CAAO,SAAS,CAAA,CAAA,EAAI,UAAU,KAAK,CAAA;AAAA;AAe7C;AAAA;AAAA,GAEJ,EACF,CAAA;AAEJ","file":"ConnectedCallDock-733O5M36.cjs","sourcesContent":["/**\n * The audience's holding screens in the call dock: \"Starting soon\" before the host goes live —\n * reading the webinar every few seconds and listening to WS `call.webinar`, then joining by itself\n * — and \"This webinar has ended\" once the host ended it.\n */\n\nimport {\n useArbi,\n onCallEvent,\n callSession,\n joinFromPreJoin,\n AUDIENCE_CHOICES,\n} from '@arbidocs/react'\nimport { useEffect, useRef, type ReactElement } from 'react'\nimport { WebinarWaiting } from '../ui'\nimport { CallUserPill } from './CallUserPill'\n\n/** How often \"Starting soon\" reads the webinar (a link holder gets no WS event). */\nexport const WEBINAR_WAIT_POLL_MS = 5_000\n\n/** Wait for go-live, then join once. */\nfunction useJoinWhenLive(callExtId: string, linkVersion: number, enabled: boolean): void {\n const arbi = useArbi()\n const joined = useRef(false)\n useEffect(() => {\n if (!enabled) return\n joined.current = false\n let stopped = false\n const join = () => {\n if (stopped || joined.current) return\n joined.current = true\n const active = callSession.getState().active\n if (active?.callExtId !== callExtId) return\n void joinFromPreJoin(arbi, active.choices ?? AUDIENCE_CHOICES)\n }\n const poll = () =>\n arbi.calls.webinar\n .get(callExtId, linkVersion)\n .then((s) => s.live && join())\n .catch((err: unknown) => console.warn('[calls] could not read the webinar state', err))\n const id = setInterval(() => void poll(), WEBINAR_WAIT_POLL_MS)\n const off = onCallEvent('call.webinar', (m) => {\n if (m.call_ext_id === callExtId && m.live) join()\n })\n return () => {\n stopped = true\n clearInterval(id)\n off()\n }\n }, [arbi, callExtId, linkVersion, enabled])\n}\n\nexport function WebinarHolding({\n variant,\n callExtId,\n linkVersion,\n title,\n host,\n onLeave,\n}: {\n variant: 'waiting' | 'ended'\n callExtId: string\n linkVersion: number\n title?: string | null\n /** The host (the call's creator), named as a pill. */\n host?: { identity: string; name?: string | null } | null\n onLeave(): void\n}): ReactElement {\n useJoinWhenLive(callExtId, linkVersion, variant === 'waiting')\n return (\n <WebinarWaiting\n variant={variant}\n title={title}\n host={host?.identity ? <CallUserPill identity={host.identity} name={host.name} /> : undefined}\n onLeave={onLeave}\n leaveLabel={variant === 'waiting' ? 'Leave' : 'Close'}\n />\n )\n}\n","/**\n * ConnectedCallDock — where the active call lives. Mount it once (lazily: it pulls LiveKit) while\n * the call session has an active call. Placements of ONE element (so the room never remounts and\n * hangs up):\n * docked → the call panel in the host's right-hand dock, like the document viewer: the host's\n * slot (`calls.useSlot`) reserves the space and this element follows that box. The\n * main pane shows the call's conversation (`calls.showConversation`) — its chat and\n * live transcript.\n * main → a webinar's audience has no conversation beside the call: its viewer takes the\n * host's main slot the same way, the stage large with the Q&A / chat column beside\n * it. Without a host slot the call floats at the right edge (or fills the page).\n * minimised → a small card in a corner (drag it to another), so the user keeps working; another\n * panel taking the dock also minimises the call.\n * Phases: prejoin (device check), knocking (waiting for a host), connected (<CallRoom>). A\n * webinar's audience skips the device check (it cannot publish), waits on \"Starting soon\" before\n * go-live and sees \"This webinar has ended\" after; when the stage changes under someone (moved to\n * the audience, stepped down) the room drops them and they join again at once, with no screen.\n */\n\nimport {\n useArbi,\n callSession,\n classifyMediaError,\n useCall,\n useCallSession,\n callLink,\n joinFromPreJoin,\n rejoinAsAudience,\n AUDIENCE_CHOICES,\n useArbiHost,\n type CallSlotMode,\n DEFAULT_JOIN_CHOICES,\n} from '@arbidocs/react'\nimport { useCallback, useEffect, useLayoutEffect, useRef, useState, type ReactElement } from 'react'\nimport { Button, cn } from '@arbidocs/react/ui'\nimport {\n CallHeader,\n CallStateMessage,\n MinimisedCall,\n PreJoin,\n nearestCorner,\n type PipCorner,\n} from '../ui'\nimport { calls } from '@arbidocs/sdk/browser'\nimport { ConnectedCallRoom } from './ConnectedCallRoom'\nimport { WebinarHolding } from './WebinarHolding'\nimport { useMirrorSelfView } from '../self-view'\n\nconst CORNER_KEY = 'arbi-call-pip-corner'\n\ninterface Rect {\n top: number\n left: number\n width: number\n height: number\n}\n\n/** An element's viewport rectangle, kept current; null while there is none. */\nfunction useRectOf(el: Element | null): Rect | null {\n const [rect, setRect] = useState<Rect | null>(null)\n useLayoutEffect(() => {\n if (!el) {\n setRect(null)\n return\n }\n const measure = () => {\n const r = el.getBoundingClientRect()\n const next =\n r.width > 0 && r.height > 0\n ? { top: r.top, left: r.left, width: r.width, height: r.height }\n : null\n setRect((prev) =>\n prev &&\n next &&\n prev.top === next.top &&\n prev.left === next.left &&\n prev.width === next.width &&\n prev.height === next.height\n ? prev\n : next\n )\n }\n measure()\n const ro = typeof ResizeObserver !== 'undefined' ? new ResizeObserver(measure) : null\n ro?.observe(el)\n window.addEventListener('resize', measure)\n // Banners, the sidebar and the dock's open animation move the box without resizing it.\n const id = setInterval(measure, 250)\n return () => {\n ro?.disconnect()\n window.removeEventListener('resize', measure)\n clearInterval(id)\n }\n }, [el])\n return rect\n}\n\nfunction readCorner(): PipCorner {\n try {\n const v = localStorage.getItem(CORNER_KEY)\n if (v === 'top-left' || v === 'top-right' || v === 'bottom-left' || v === 'bottom-right')\n return v\n } catch {\n // Storage blocked: the default corner.\n }\n return 'bottom-right'\n}\n\nconst CORNER_CLASS: Record<PipCorner, string> = {\n 'top-left': 'left-4 top-4',\n 'top-right': 'right-4 top-4',\n 'bottom-left': 'bottom-4 left-4',\n 'bottom-right': 'bottom-4 right-4',\n}\n\n/** Drag the minimised card; it settles in the nearest corner. */\nfunction usePipDrag(onCorner: (c: PipCorner) => void) {\n const [offset, setOffset] = useState<{ x: number; y: number } | null>(null)\n const start = useRef<{ x: number; y: number; moved: boolean } | null>(null)\n const onPointerDown = (e: React.PointerEvent<HTMLElement>) => {\n // Buttons keep their clicks; drag by the card's body.\n if (\n e.button !== 0 ||\n (e.target as HTMLElement).closest('button:not([data-testid=\"call-minimised-restore\"])')\n )\n return\n start.current = { x: e.clientX, y: e.clientY, moved: false }\n e.currentTarget.setPointerCapture?.(e.pointerId)\n }\n const onPointerMove = (e: React.PointerEvent<HTMLElement>) => {\n const s = start.current\n if (!s) return\n const dx = e.clientX - s.x\n const dy = e.clientY - s.y\n if (!s.moved && Math.hypot(dx, dy) < 6) return\n s.moved = true\n setOffset({ x: dx, y: dy })\n }\n const onPointerUp = (e: React.PointerEvent<HTMLElement>) => {\n const s = start.current\n start.current = null\n if (!s?.moved) return\n const r = e.currentTarget.getBoundingClientRect()\n onCorner(\n nearestCorner(\n r.left + r.width / 2,\n r.top + r.height / 2,\n window.innerWidth,\n window.innerHeight\n )\n )\n setOffset(null)\n // The drag ended on the card: do not let it count as \"back to the call\".\n const swallow = (ev: Event) => {\n ev.stopPropagation()\n ev.preventDefault()\n }\n window.addEventListener('click', swallow, { capture: true, once: true })\n setTimeout(() => window.removeEventListener('click', swallow, { capture: true }), 0)\n }\n return { offset, handlers: { onPointerDown, onPointerMove, onPointerUp } }\n}\n\n/** A host slot that renders nothing: the call floats. */\nconst noSlot = (): HTMLElement | null => null\n\nexport function ConnectedCallDock(): ReactElement | null {\n const arbi = useArbi()\n const host = useArbiHost().calls\n const useSlot = host?.useSlot ?? noSlot\n const showConversation = host?.showConversation\n const active = useCallSession((s) => s.active)\n const { endActiveCall, updateActiveCall, setCallMinimized } = callSession\n const [joining, setJoining] = useState(false)\n const [corner, setCornerState] = useState<PipCorner>(readCorner)\n const setCorner = useCallback((c: PipCorner) => {\n setCornerState(c)\n try {\n localStorage.setItem(CORNER_KEY, c)\n } catch {\n // Not remembered: fine.\n }\n }, [])\n const minimized = !!active?.minimized\n const docked = !!active && !minimized\n const [mirrorSelf] = useMirrorSelfView()\n const drag = usePipDrag(setCorner)\n\n // A webinar: my role decides the join (the audience skips the device check) and the UI.\n const { data: call, isError: callUnreadable } = useCall(active?.callExtId)\n const callKnown = !!call || callUnreadable\n const webinarRole = call?.mode === 'webinar' ? (call.webinar?.my_role ?? 'attendee') : null\n const audience = webinarRole === 'attendee'\n const phase = active?.phase\n const callExtId = active?.callExtId\n const autoJoined = useRef<string | null>(null)\n useEffect(() => {\n if (phase !== 'prejoin' || !audience || !callExtId || autoJoined.current === callExtId) return\n autoJoined.current = callExtId\n setJoining(true)\n void joinFromPreJoin(arbi, AUDIENCE_CHOICES).finally(() => setJoining(false))\n }, [arbi, phase, audience, callExtId])\n\n /** A room I was in has gone: leave the call, unless it dropped me to join again (webinar stage). */\n const onRoomLeft = useCallback(\n (token: calls.CallTokenResponse) => {\n const current = callSession.getState().active\n if (!current || current.tokenResponse !== token) return // a room already replaced\n if (current.rejoining) void rejoinAsAudience(arbi, current.callExtId)\n else endActiveCall()\n },\n [arbi, endActiveCall]\n )\n /** The host ended the webinar: the audience and panelists see it ended; moderators just close. */\n const onRoomClosed =\n webinarRole && !calls.WEBINAR_MODERATORS.has(webinarRole) && callExtId\n ? () => updateActiveCall(callExtId, { phase: 'webinar-ended', tokenResponse: null })\n : undefined\n\n // The slot: the dock, or the main area for a webinar's audience (the viewer, or its waiting /\n // ended screens). The host's slot is claimed while the call shows; another panel taking it\n // minimises the call; closing the call frees it.\n const [roomViewer, setRoomViewer] = useState(false)\n const slotMode: CallSlotMode = (phase === 'connected' ? roomViewer : audience) ? 'main' : 'docked'\n const minimise = useCallback(() => setCallMinimized(true), [setCallMinimized])\n const slot = useSlot(slotMode, docked, minimise)\n const rect = useRectOf(docked ? slot : null)\n\n // Once connected, the main pane shows the call's conversation (its chat and transcript).\n const shownFor = useRef<string | null>(null)\n // A webinar's audience is not in its meeting chat: nothing to show.\n useEffect(() => {\n // The viewer took the main area (a team member off stage): show it again once back on stage.\n if (roomViewer) shownFor.current = null\n if (active?.phase !== 'connected' || shownFor.current === active.callExtId) return\n if (!callKnown || audience || roomViewer || !showConversation) return\n shownFor.current = active.callExtId\n void showConversation(active)\n }, [active, callKnown, audience, roomViewer, showConversation])\n\n if (!active) return null\n const title = active.title ?? 'Call'\n const connected = active.phase === 'connected' ? active.tokenResponse : null\n const link = callLink(active.callExtId, active.key, active.linkVersion)\n\n return (\n <>\n <section\n aria-label=\"Active call\"\n data-testid=\"call-dock\"\n data-placement={minimized ? 'minimised' : slotMode}\n className={cn(\n 'fixed flex flex-col overflow-hidden bg-background text-foreground',\n minimized\n ? cn(\n 'z-50 w-80 max-w-[calc(100vw-2rem)] cursor-grab touch-none rounded-md border border-border shadow-xl active:cursor-grabbing',\n CORNER_CLASS[corner]\n )\n : cn(\n 'z-40',\n !rect &&\n (slotMode === 'main'\n ? 'inset-0'\n : 'inset-y-0 right-0 w-[min(480px,100vw)] border-l border-border')\n )\n )}\n style={\n minimized\n ? drag.offset\n ? { transform: `translate(${drag.offset.x}px, ${drag.offset.y}px)` }\n : undefined\n : rect\n ? { top: rect.top, left: rect.left, width: rect.width, height: rect.height }\n : undefined\n }\n {...(minimized ? drag.handlers : {})}\n >\n {active.phase !== 'connected' &&\n (minimized ? (\n <MinimisedCall\n title={title}\n onRestore={() => setCallMinimized(false)}\n onLeave={endActiveCall}\n />\n ) : (\n <div className=\"flex size-full min-h-0 flex-col\">\n <CallHeader title={title} onMinimise={() => setCallMinimized(true)} />\n <div className=\"flex min-h-0 flex-1 overflow-y-auto p-4\">\n {active.phase === 'prejoin' && (audience || !callKnown) ? (\n <CallStateMessage title=\"Joining…\" testId=\"call-joining\" />\n ) : active.phase === 'prejoin' ? (\n <PreJoin\n initialChoices={DEFAULT_JOIN_CHOICES}\n className=\"my-auto\"\n busy={joining}\n joinLabel={active.ringOnJoin ? 'Start call' : 'Join'}\n describeError={(err, kind) => classifyMediaError(err, kind)}\n mirror={mirrorSelf}\n onJoin={(choices) => {\n setJoining(true)\n void joinFromPreJoin(arbi, choices).finally(() => setJoining(false))\n }}\n onCancel={endActiveCall}\n />\n ) : active.phase === 'webinar-waiting' || active.phase === 'webinar-ended' ? (\n <WebinarHolding\n variant={active.phase === 'webinar-waiting' ? 'waiting' : 'ended'}\n callExtId={active.callExtId}\n linkVersion={active.linkVersion}\n title={active.title}\n host={\n call?.creator_ext_id\n ? { identity: call.creator_ext_id, name: call.creator_name }\n : null\n }\n onLeave={endActiveCall}\n />\n ) : (\n <CallStateMessage\n title=\"Waiting for the host to let you in…\"\n description=\"You will join as soon as someone in the call admits you.\"\n testId=\"call-knocking\"\n action={\n <Button type=\"button\" variant=\"outline\" onClick={endActiveCall}>\n Cancel\n </Button>\n }\n />\n )}\n </div>\n </div>\n ))}\n {connected && (\n <ConnectedCallRoom\n // A new token is a new room (a webinar rejoin): build it afresh.\n key={`${active.callExtId}:${connected.token}`}\n tokenResponse={connected}\n e2eeKey={active.key}\n choices={active.choices ?? undefined}\n isCreator={active.isCreator}\n lockedWorkspaceExtId={active.lockedWorkspaceExtId}\n title={title}\n startedAt={active.startedAt}\n link={link}\n minimized={minimized}\n onMinimizedChange={setCallMinimized}\n onLeave={() => onRoomLeft(connected)}\n webinarRole={webinarRole}\n onRoomClosed={onRoomClosed}\n onViewerChange={setRoomViewer}\n />\n )}\n </section>\n </>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/calls/connected/WebinarHolding.tsx","../src/calls/connected/ConnectedCallDock.tsx"],"names":["useArbi","useRef","useEffect","callSession","joinFromPreJoin","AUDIENCE_CHOICES","onCallEvent","jsx","WebinarWaiting","CallUserPill","useState","useLayoutEffect","nearestCorner","useArbiHost","useCallSession","useCallback","useMirrorSelfView","useCall","rejoinAsAudience","calls","callLink","Fragment","jsxs","cn","MinimisedCall","CallHeader","CallStateMessage","PreJoin","DEFAULT_JOIN_CHOICES","classifyMediaError","Button","ConnectedCallRoom"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,IAAM,oBAAA,GAAuB,GAAA;AAGpC,SAAS,eAAA,CAAgB,SAAA,EAAmB,WAAA,EAAqB,OAAA,EAAwB;AACvF,EAAA,MAAM,OAAOA,aAAA,EAAQ;AACrB,EAAA,MAAM,MAAA,GAASC,eAAO,KAAK,CAAA;AAC3B,EAAAC,iBAAA,CAAU,MAAM;AACd,IAAA,IAAI,CAAC,OAAA,EAAS;AACd,IAAA,MAAA,CAAO,OAAA,GAAU,KAAA;AACjB,IAAA,IAAI,OAAA,GAAU,KAAA;AACd,IAAA,MAAM,OAAO,MAAM;AACjB,MAAA,IAAI,OAAA,IAAW,OAAO,OAAA,EAAS;AAC/B,MAAA,MAAA,CAAO,OAAA,GAAU,IAAA;AACjB,MAAA,MAAM,MAAA,GAASC,iBAAA,CAAY,QAAA,EAAS,CAAE,MAAA;AACtC,MAAA,IAAI,MAAA,EAAQ,cAAc,SAAA,EAAW;AACrC,MAAA,KAAKC,qBAAA,CAAgB,IAAA,EAAM,MAAA,CAAO,OAAA,IAAWC,sBAAgB,CAAA;AAAA,IAC/D,CAAA;AACA,IAAA,MAAM,IAAA,GAAO,MACX,IAAA,CAAK,KAAA,CAAM,OAAA,CACR,IAAI,SAAA,EAAW,WAAW,CAAA,CAC1B,IAAA,CAAK,CAAC,CAAA,KAAM,EAAE,IAAA,IAAQ,IAAA,EAAM,CAAA,CAC5B,KAAA,CAAM,CAAC,QAAiB,OAAA,CAAQ,IAAA,CAAK,0C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AAA,EAAM,cAAA,GACF,EAAE,QAAA,EAAU,KAAK,cAAA,EAAgB,IAAA,EAAM,IAAA,CAAK,YAAA,EAAa,GACzD,IAAA;AAAA,cAEN,OAAA,EAAS;AAAA;AAAA,8BAGXA,cAAAA;AAAA,YAACmB,kCAAA;AAAA,YAAA;AAAA,cACC,KAAA,EAAM,0CAAA;AAAA,cACN,WAAA,EAAY,0DAAA;AAAA,cACZ,MAAA,EAAO,eAAA;AAAA,cACP,MAAA,kBACEnB,cAAAA,CAACuB,SAAA,EAAA,EAAO,IAAA,EAAK,UAAS,OAAA,EAAQ,SAAA,EAAU,OAAA,EAAS,aAAA,EAAe,QAAA,EAAA,QAAA,EAEhE;AAAA;AAAA,WAEJ,EAEJ;AAAA,SAAA,EACF,CAAA,CAAA;AAAA,QAEH,6BACCvB,cAAAA;AAAA,UAACwB,mCAAA;AAAA,UAAA;AAAA,YAGC,aAAA,EAAe,SAAA;AAAA,YACf,SAAS,MAAA,CAAO,GAAA;AAAA,YAChB,OAAA,EAAS,OAAO,OAAA,IAAW,MAAA;AAAA,YAC3B,WAAW,MAAA,CAAO,SAAA;AAAA,YAClB,sBAAsB,MAAA,CAAO,oBAAA;AAAA,YAC7B,KAAA;AAAA,YACA,WAAW,MAAA,CAAO,SAAA;AAAA,YAClB,IAAA;AAAA,YACA,SAAA;AAAA,YACA,iBAAA,EAAmB,gBAAA;AAAA,YACnB,OAAA,EAAS,MAAM,UAAA,CAAW,SAAS,CAAA;AAAA,YACnC,WAAA;AAAA,YACA,YAAA;AAAA,YACA,cAAA,EAAgB;AAAA,WAAA;AAAA,UAdX,CAAA,EAAG,MAAA,CAAO,SAAS,CAAA,CAAA,EAAI,UAAU,KAAK,CAAA;AAAA;AAe7C;AAAA;AAAA,GAEJ,EACF,CAAA;AAEJ","file":"ConnectedCallDock-XJOYVVAH.cjs","sourcesContent":["/**\n * The audience's holding screens in the call dock: \"Starting soon\" before the host goes live —\n * reading the webinar every few seconds and listening to WS `call.webinar`, then joining by itself\n * — and \"This webinar has ended\" once the host ended it.\n */\n\nimport {\n useArbi,\n onCallEvent,\n callSession,\n joinFromPreJoin,\n AUDIENCE_CHOICES,\n} from '@arbidocs/react'\nimport { useEffect, useRef, type ReactElement } from 'react'\nimport { WebinarWaiting } from '../ui'\nimport { CallUserPill } from './CallUserPill'\n\n/** How often \"Starting soon\" reads the webinar (a link holder gets no WS event). */\nexport const WEBINAR_WAIT_POLL_MS = 5_000\n\n/** Wait for go-live, then join once. */\nfunction useJoinWhenLive(callExtId: string, linkVersion: number, enabled: boolean): void {\n const arbi = useArbi()\n const joined = useRef(false)\n useEffect(() => {\n if (!enabled) return\n joined.current = false\n let stopped = false\n const join = () => {\n if (stopped || joined.current) return\n joined.current = true\n const active = callSession.getState().active\n if (active?.callExtId !== callExtId) return\n void joinFromPreJoin(arbi, active.choices ?? AUDIENCE_CHOICES)\n }\n const poll = () =>\n arbi.calls.webinar\n .get(callExtId, linkVersion)\n .then((s) => s.live && join())\n .catch((err: unknown) => console.warn('[calls] could not read the webinar state', err))\n const id = setInterval(() => void poll(), WEBINAR_WAIT_POLL_MS)\n const off = onCallEvent('call.webinar', (m) => {\n if (m.call_ext_id === callExtId && m.live) join()\n })\n return () => {\n stopped = true\n clearInterval(id)\n off()\n }\n }, [arbi, callExtId, linkVersion, enabled])\n}\n\nexport function WebinarHolding({\n variant,\n callExtId,\n linkVersion,\n title,\n host,\n onLeave,\n}: {\n variant: 'waiting' | 'ended'\n callExtId: string\n linkVersion: number\n title?: string | null\n /** The host (the call's creator), named as a pill. */\n host?: { identity: string; name?: string | null } | null\n onLeave(): void\n}): ReactElement {\n useJoinWhenLive(callExtId, linkVersion, variant === 'waiting')\n return (\n <WebinarWaiting\n variant={variant}\n title={title}\n host={host?.identity ? <CallUserPill identity={host.identity} name={host.name} /> : undefined}\n onLeave={onLeave}\n leaveLabel={variant === 'waiting' ? 'Leave' : 'Close'}\n />\n )\n}\n","/**\n * ConnectedCallDock — where the active call lives. Mount it once (lazily: it pulls LiveKit) while\n * the call session has an active call. Placements of ONE element (so the room never remounts and\n * hangs up):\n * docked → the call panel in the host's right-hand dock, like the document viewer: the host's\n * slot (`calls.useSlot`) reserves the space and this element follows that box. The\n * main pane shows the call's conversation (`calls.showConversation`) — its chat and\n * live transcript.\n * main → a webinar's audience has no conversation beside the call: its viewer takes the\n * host's main slot the same way, the stage large with the Q&A / chat column beside\n * it. Without a host slot the call floats at the right edge (or fills the page).\n * minimised → a small card in a corner (drag it to another), so the user keeps working; another\n * panel taking the dock also minimises the call.\n * Phases: prejoin (device check), knocking (waiting for a host), connected (<CallRoom>). A\n * webinar's audience skips the device check (it cannot publish), waits on \"Starting soon\" before\n * go-live and sees \"This webinar has ended\" after; when the stage changes under someone (moved to\n * the audience, stepped down) the room drops them and they join again at once, with no screen.\n */\n\nimport {\n useArbi,\n callSession,\n classifyMediaError,\n useCall,\n useCallSession,\n callLink,\n joinFromPreJoin,\n rejoinAsAudience,\n AUDIENCE_CHOICES,\n useArbiHost,\n type CallSlotMode,\n DEFAULT_JOIN_CHOICES,\n} from '@arbidocs/react'\nimport { useCallback, useEffect, useLayoutEffect, useRef, useState, type ReactElement } from 'react'\nimport { Button, cn } from '@arbidocs/react/ui'\nimport {\n CallHeader,\n CallStateMessage,\n MinimisedCall,\n PreJoin,\n nearestCorner,\n type PipCorner,\n} from '../ui'\nimport { calls } from '@arbidocs/sdk/browser'\nimport { ConnectedCallRoom } from './ConnectedCallRoom'\nimport { WebinarHolding } from './WebinarHolding'\nimport { useMirrorSelfView } from '../self-view'\n\nconst CORNER_KEY = 'arbi-call-pip-corner'\n\ninterface Rect {\n top: number\n left: number\n width: number\n height: number\n}\n\n/** An element's viewport rectangle, kept current; null while there is none. */\nfunction useRectOf(el: Element | null): Rect | null {\n const [rect, setRect] = useState<Rect | null>(null)\n useLayoutEffect(() => {\n if (!el) {\n setRect(null)\n return\n }\n const measure = () => {\n const r = el.getBoundingClientRect()\n const next =\n r.width > 0 && r.height > 0\n ? { top: r.top, left: r.left, width: r.width, height: r.height }\n : null\n setRect((prev) =>\n prev &&\n next &&\n prev.top === next.top &&\n prev.left === next.left &&\n prev.width === next.width &&\n prev.height === next.height\n ? prev\n : next\n )\n }\n measure()\n const ro = typeof ResizeObserver !== 'undefined' ? new ResizeObserver(measure) : null\n ro?.observe(el)\n window.addEventListener('resize', measure)\n // Banners, the sidebar and the dock's open animation move the box without resizing it.\n const id = setInterval(measure, 250)\n return () => {\n ro?.disconnect()\n window.removeEventListener('resize', measure)\n clearInterval(id)\n }\n }, [el])\n return rect\n}\n\nfunction readCorner(): PipCorner {\n try {\n const v = localStorage.getItem(CORNER_KEY)\n if (v === 'top-left' || v === 'top-right' || v === 'bottom-left' || v === 'bottom-right')\n return v\n } catch {\n // Storage blocked: the default corner.\n }\n return 'bottom-right'\n}\n\nconst CORNER_CLASS: Record<PipCorner, string> = {\n 'top-left': 'left-4 top-4',\n 'top-right': 'right-4 top-4',\n 'bottom-left': 'bottom-4 left-4',\n 'bottom-right': 'bottom-4 right-4',\n}\n\n/** Drag the minimised card; it settles in the nearest corner. */\nfunction usePipDrag(onCorner: (c: PipCorner) => void) {\n const [offset, setOffset] = useState<{ x: number; y: number } | null>(null)\n const start = useRef<{ x: number; y: number; moved: boolean } | null>(null)\n const onPointerDown = (e: React.PointerEvent<HTMLElement>) => {\n // Buttons keep their clicks; drag by the card's body.\n if (\n e.button !== 0 ||\n (e.target as HTMLElement).closest('button:not([data-testid=\"call-minimised-restore\"])')\n )\n return\n start.current = { x: e.clientX, y: e.clientY, moved: false }\n e.currentTarget.setPointerCapture?.(e.pointerId)\n }\n const onPointerMove = (e: React.PointerEvent<HTMLElement>) => {\n const s = start.current\n if (!s) return\n const dx = e.clientX - s.x\n const dy = e.clientY - s.y\n if (!s.moved && Math.hypot(dx, dy) < 6) return\n s.moved = true\n setOffset({ x: dx, y: dy })\n }\n const onPointerUp = (e: React.PointerEvent<HTMLElement>) => {\n const s = start.current\n start.current = null\n if (!s?.moved) return\n const r = e.currentTarget.getBoundingClientRect()\n onCorner(\n nearestCorner(\n r.left + r.width / 2,\n r.top + r.height / 2,\n window.innerWidth,\n window.innerHeight\n )\n )\n setOffset(null)\n // The drag ended on the card: do not let it count as \"back to the call\".\n const swallow = (ev: Event) => {\n ev.stopPropagation()\n ev.preventDefault()\n }\n window.addEventListener('click', swallow, { capture: true, once: true })\n setTimeout(() => window.removeEventListener('click', swallow, { capture: true }), 0)\n }\n return { offset, handlers: { onPointerDown, onPointerMove, onPointerUp } }\n}\n\n/** A host slot that renders nothing: the call floats. */\nconst noSlot = (): HTMLElement | null => null\n\nexport function ConnectedCallDock(): ReactElement | null {\n const arbi = useArbi()\n const host = useArbiHost().calls\n const useSlot = host?.useSlot ?? noSlot\n const showConversation = host?.showConversation\n const active = useCallSession((s) => s.active)\n const { endActiveCall, updateActiveCall, setCallMinimized } = callSession\n const [joining, setJoining] = useState(false)\n const [corner, setCornerState] = useState<PipCorner>(readCorner)\n const setCorner = useCallback((c: PipCorner) => {\n setCornerState(c)\n try {\n localStorage.setItem(CORNER_KEY, c)\n } catch {\n // Not remembered: fine.\n }\n }, [])\n const minimized = !!active?.minimized\n const docked = !!active && !minimized\n const [mirrorSelf] = useMirrorSelfView()\n const drag = usePipDrag(setCorner)\n\n // A webinar: my role decides the join (the audience skips the device check) and the UI.\n const { data: call, isError: callUnreadable } = useCall(active?.callExtId)\n const callKnown = !!call || callUnreadable\n const webinarRole = call?.mode === 'webinar' ? (call.webinar?.my_role ?? 'attendee') : null\n const audience = webinarRole === 'attendee'\n const phase = active?.phase\n const callExtId = active?.callExtId\n const autoJoined = useRef<string | null>(null)\n useEffect(() => {\n if (phase !== 'prejoin' || !audience || !callExtId || autoJoined.current === callExtId) return\n autoJoined.current = callExtId\n setJoining(true)\n void joinFromPreJoin(arbi, AUDIENCE_CHOICES).finally(() => setJoining(false))\n }, [arbi, phase, audience, callExtId])\n\n /** A room I was in has gone: leave the call, unless it dropped me to join again (webinar stage). */\n const onRoomLeft = useCallback(\n (token: calls.CallTokenResponse) => {\n const current = callSession.getState().active\n if (!current || current.tokenResponse !== token) return // a room already replaced\n if (current.rejoining) void rejoinAsAudience(arbi, current.callExtId)\n else endActiveCall()\n },\n [arbi, endActiveCall]\n )\n /** The host ended the webinar: the audience and panelists see it ended; moderators just close. */\n const onRoomClosed =\n webinarRole && !calls.WEBINAR_MODERATORS.has(webinarRole) && callExtId\n ? () => updateActiveCall(callExtId, { phase: 'webinar-ended', tokenResponse: null })\n : undefined\n\n // The slot: the dock, or the main area for a webinar's audience (the viewer, or its waiting /\n // ended screens). The host's slot is claimed while the call shows; another panel taking it\n // minimises the call; closing the call frees it.\n const [roomViewer, setRoomViewer] = useState(false)\n const slotMode: CallSlotMode = (phase === 'connected' ? roomViewer : audience) ? 'main' : 'docked'\n const minimise = useCallback(() => setCallMinimized(true), [setCallMinimized])\n const slot = useSlot(slotMode, docked, minimise)\n const rect = useRectOf(docked ? slot : null)\n\n // Once connected, the main pane shows the call's conversation (its chat and transcript).\n const shownFor = useRef<string | null>(null)\n // A webinar's audience is not in its meeting chat: nothing to show.\n useEffect(() => {\n // The viewer took the main area (a team member off stage): show it again once back on stage.\n if (roomViewer) shownFor.current = null\n if (active?.phase !== 'connected' || shownFor.current === active.callExtId) return\n if (!callKnown || audience || roomViewer || !showConversation) return\n shownFor.current = active.callExtId\n void showConversation(active)\n }, [active, callKnown, audience, roomViewer, showConversation])\n\n if (!active) return null\n const title = active.title ?? 'Call'\n const connected = active.phase === 'connected' ? active.tokenResponse : null\n const link = callLink(active.callExtId, active.key, active.linkVersion)\n\n return (\n <>\n <section\n aria-label=\"Active call\"\n data-testid=\"call-dock\"\n data-placement={minimized ? 'minimised' : slotMode}\n className={cn(\n 'fixed flex flex-col overflow-hidden bg-background text-foreground',\n minimized\n ? cn(\n 'z-50 w-80 max-w-[calc(100vw-2rem)] cursor-grab touch-none rounded-md border border-border shadow-xl active:cursor-grabbing',\n CORNER_CLASS[corner]\n )\n : cn(\n 'z-40',\n !rect &&\n (slotMode === 'main'\n ? 'inset-0'\n : 'inset-y-0 right-0 w-[min(480px,100vw)] border-l border-border')\n )\n )}\n style={\n minimized\n ? drag.offset\n ? { transform: `translate(${drag.offset.x}px, ${drag.offset.y}px)` }\n : undefined\n : rect\n ? { top: rect.top, left: rect.left, width: rect.width, height: rect.height }\n : undefined\n }\n {...(minimized ? drag.handlers : {})}\n >\n {active.phase !== 'connected' &&\n (minimized ? (\n <MinimisedCall\n title={title}\n onRestore={() => setCallMinimized(false)}\n onLeave={endActiveCall}\n />\n ) : (\n <div className=\"flex size-full min-h-0 flex-col\">\n <CallHeader title={title} onMinimise={() => setCallMinimized(true)} />\n <div className=\"flex min-h-0 flex-1 overflow-y-auto p-4\">\n {active.phase === 'prejoin' && (audience || !callKnown) ? (\n <CallStateMessage title=\"Joining…\" testId=\"call-joining\" />\n ) : active.phase === 'prejoin' ? (\n <PreJoin\n initialChoices={DEFAULT_JOIN_CHOICES}\n className=\"my-auto\"\n busy={joining}\n joinLabel={active.ringOnJoin ? 'Start call' : 'Join'}\n describeError={(err, kind) => classifyMediaError(err, kind)}\n mirror={mirrorSelf}\n onJoin={(choices) => {\n setJoining(true)\n void joinFromPreJoin(arbi, choices).finally(() => setJoining(false))\n }}\n onCancel={endActiveCall}\n />\n ) : active.phase === 'webinar-waiting' || active.phase === 'webinar-ended' ? (\n <WebinarHolding\n variant={active.phase === 'webinar-waiting' ? 'waiting' : 'ended'}\n callExtId={active.callExtId}\n linkVersion={active.linkVersion}\n title={active.title}\n host={\n call?.creator_ext_id\n ? { identity: call.creator_ext_id, name: call.creator_name }\n : null\n }\n onLeave={endActiveCall}\n />\n ) : (\n <CallStateMessage\n title=\"Waiting for the host to let you in…\"\n description=\"You will join as soon as someone in the call admits you.\"\n testId=\"call-knocking\"\n action={\n <Button type=\"button\" variant=\"outline\" onClick={endActiveCall}>\n Cancel\n </Button>\n }\n />\n )}\n </div>\n </div>\n ))}\n {connected && (\n <ConnectedCallRoom\n // A new token is a new room (a webinar rejoin): build it afresh.\n key={`${active.callExtId}:${connected.token}`}\n tokenResponse={connected}\n e2eeKey={active.key}\n choices={active.choices ?? undefined}\n isCreator={active.isCreator}\n lockedWorkspaceExtId={active.lockedWorkspaceExtId}\n title={title}\n startedAt={active.startedAt}\n link={link}\n minimized={minimized}\n onMinimizedChange={setCallMinimized}\n onLeave={() => onRoomLeft(connected)}\n webinarRole={webinarRole}\n onRoomClosed={onRoomClosed}\n onViewerChange={setRoomViewer}\n />\n )}\n </section>\n </>\n )\n}\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkNG2EE7HR_cjs = require('./chunk-NG2EE7HR.cjs');
|
|
5
|
+
require('./chunk-VZOOGA47.cjs');
|
|
5
6
|
require('./chunk-7OPOPYV6.cjs');
|
|
6
7
|
require('./chunk-OAIOOVFN.cjs');
|
|
7
8
|
require('./chunk-QMIHLJMH.cjs');
|
|
@@ -10,7 +11,6 @@ require('./chunk-TMX7YFVM.cjs');
|
|
|
10
11
|
require('./chunk-3YZKDCWY.cjs');
|
|
11
12
|
require('./chunk-SJSGSHIT.cjs');
|
|
12
13
|
require('./chunk-ZT5MIFLC.cjs');
|
|
13
|
-
require('./chunk-VZOOGA47.cjs');
|
|
14
14
|
require('./chunk-XCKHOXRP.cjs');
|
|
15
15
|
require('./chunk-KLMNCBLY.cjs');
|
|
16
16
|
require('./chunk-KNGZZC4O.cjs');
|
|
@@ -47,7 +47,7 @@ require('./chunk-PLIF5CUV.cjs');
|
|
|
47
47
|
|
|
48
48
|
Object.defineProperty(exports, "ConnectedCallRoom", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkNG2EE7HR_cjs.ConnectedCallRoom; }
|
|
51
51
|
});
|
|
52
|
-
//# sourceMappingURL=ConnectedCallRoom-
|
|
53
|
-
//# sourceMappingURL=ConnectedCallRoom-
|
|
52
|
+
//# sourceMappingURL=ConnectedCallRoom-CUDYAPQK.cjs.map
|
|
53
|
+
//# sourceMappingURL=ConnectedCallRoom-CUDYAPQK.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"ConnectedCallRoom-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ConnectedCallRoom-CUDYAPQK.cjs"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
4
|
+
var chunkMMSHIIKG_cjs = require('./chunk-MMSHIIKG.cjs');
|
|
5
|
+
require('./chunk-Q6IKXWPG.cjs');
|
|
6
|
+
require('./chunk-23I5EUZA.cjs');
|
|
7
7
|
require('./chunk-GA5ZO4YA.cjs');
|
|
8
8
|
require('./chunk-VG5XNE4H.cjs');
|
|
9
9
|
require('./chunk-DDWLMYRO.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-VLQCLQAS.cjs');
|
|
11
11
|
require('./chunk-4ONPEVTP.cjs');
|
|
12
12
|
require('./chunk-V3KLUWQQ.cjs');
|
|
13
13
|
require('./chunk-P5AQYC4D.cjs');
|
|
@@ -15,7 +15,7 @@ require('./chunk-WAV762GP.cjs');
|
|
|
15
15
|
require('./chunk-ZESMRGDV.cjs');
|
|
16
16
|
require('./chunk-UKOYN2WD.cjs');
|
|
17
17
|
require('./chunk-RC25WMVB.cjs');
|
|
18
|
-
require('./chunk-
|
|
18
|
+
require('./chunk-ZYGAXD3N.cjs');
|
|
19
19
|
require('./chunk-JJZOL5MG.cjs');
|
|
20
20
|
require('./chunk-3YEXZX4H.cjs');
|
|
21
21
|
require('./chunk-4PA6VCCR.cjs');
|
|
@@ -26,12 +26,12 @@ require('./chunk-6UZC4XVV.cjs');
|
|
|
26
26
|
require('./chunk-YVCOQHCE.cjs');
|
|
27
27
|
require('./chunk-JV5TVUOU.cjs');
|
|
28
28
|
require('./chunk-ZVEW3JBT.cjs');
|
|
29
|
+
require('./chunk-VZOOGA47.cjs');
|
|
29
30
|
require('./chunk-HQDR43JC.cjs');
|
|
30
31
|
require('./chunk-JR2YSBD5.cjs');
|
|
31
32
|
require('./chunk-3YZKDCWY.cjs');
|
|
32
33
|
require('./chunk-SJSGSHIT.cjs');
|
|
33
34
|
require('./chunk-ZW6FPIFC.cjs');
|
|
34
|
-
require('./chunk-VZOOGA47.cjs');
|
|
35
35
|
require('./chunk-75BNMCUX.cjs');
|
|
36
36
|
require('./chunk-QGVOT7E4.cjs');
|
|
37
37
|
require('./chunk-QRAQZTJE.cjs');
|
|
@@ -48,7 +48,7 @@ require('./chunk-PLIF5CUV.cjs');
|
|
|
48
48
|
|
|
49
49
|
Object.defineProperty(exports, "ConnectedNativeDocxComparison", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkMMSHIIKG_cjs.ConnectedNativeDocxComparison; }
|
|
52
52
|
});
|
|
53
|
-
//# sourceMappingURL=ConnectedNativeDocxComparison-
|
|
54
|
-
//# sourceMappingURL=ConnectedNativeDocxComparison-
|
|
53
|
+
//# sourceMappingURL=ConnectedNativeDocxComparison-JUF2TI2P.cjs.map
|
|
54
|
+
//# sourceMappingURL=ConnectedNativeDocxComparison-JUF2TI2P.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"ConnectedNativeDocxComparison-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ConnectedNativeDocxComparison-JUF2TI2P.cjs"}
|
|
@@ -23,11 +23,11 @@ require('./chunk-WXUU3COI.cjs');
|
|
|
23
23
|
require('./chunk-AHDJXIUB.cjs');
|
|
24
24
|
require('./chunk-YVCOQHCE.cjs');
|
|
25
25
|
require('./chunk-JV5TVUOU.cjs');
|
|
26
|
+
require('./chunk-VZOOGA47.cjs');
|
|
26
27
|
require('./chunk-HQDR43JC.cjs');
|
|
27
28
|
require('./chunk-JR2YSBD5.cjs');
|
|
28
29
|
require('./chunk-3YZKDCWY.cjs');
|
|
29
30
|
require('./chunk-SJSGSHIT.cjs');
|
|
30
|
-
require('./chunk-VZOOGA47.cjs');
|
|
31
31
|
require('./chunk-XJEXFEWG.cjs');
|
|
32
32
|
require('./chunk-YZSQ7F5K.cjs');
|
|
33
33
|
require('./chunk-FX3K6LNZ.cjs');
|
|
@@ -18,11 +18,11 @@ require('./chunk-WXUU3COI.cjs');
|
|
|
18
18
|
require('./chunk-AHDJXIUB.cjs');
|
|
19
19
|
require('./chunk-YVCOQHCE.cjs');
|
|
20
20
|
require('./chunk-JV5TVUOU.cjs');
|
|
21
|
+
require('./chunk-VZOOGA47.cjs');
|
|
21
22
|
require('./chunk-HQDR43JC.cjs');
|
|
22
23
|
require('./chunk-JR2YSBD5.cjs');
|
|
23
24
|
require('./chunk-3YZKDCWY.cjs');
|
|
24
25
|
var chunkZW6FPIFC_cjs = require('./chunk-ZW6FPIFC.cjs');
|
|
25
|
-
require('./chunk-VZOOGA47.cjs');
|
|
26
26
|
require('./chunk-QRAQZTJE.cjs');
|
|
27
27
|
require('./chunk-UDSHVNU3.cjs');
|
|
28
28
|
require('./chunk-IPSHAMO2.cjs');
|
|
@@ -250,5 +250,5 @@ function ConnectedSlidesTab({
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
exports.ConnectedSlidesTab = ConnectedSlidesTab;
|
|
253
|
-
//# sourceMappingURL=ConnectedSlidesTab-
|
|
254
|
-
//# sourceMappingURL=ConnectedSlidesTab-
|
|
253
|
+
//# sourceMappingURL=ConnectedSlidesTab-E76OVY34.cjs.map
|
|
254
|
+
//# sourceMappingURL=ConnectedSlidesTab-E76OVY34.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/connection/presentation/ConnectedSlidesTab.tsx"],"names":["hasUnsavedChanges","usePresentation","useArbiSessionStore","usePanelHostSupport","useBlocksEnvironment","usePresentationFiles","useState","useArbiSessionState","isPanelOpen","PRESENTATION_PANEL","presentationWindowOnlyPresents","usePresentationController","useRef","useEffect","editPresentation","registerDocumentTurnFlush","useCallback","openPresentation","jsx","EmptyState","ExternalLink","jsxs","Button","PanelLeftClose","Presentation","Loader2","Fragment","SlidesEditor","DropdownMenuItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,IAAM,MAAA,GAAS,CAAC,OAAA,KACd,OAAA,CAAQ,MAAA,GAAS,CAAA,GACb,MAAA,CAAO,OAAA,CAAQ,CAAC,CAAA,IAAK,EAAE,CAAA,GACvB,CAAA,EAAG,QAAQ,KAAA,CAAM,CAAA,EAAG,EAAE,CAAA,CAAE,IAAA,CAAK,IAAI,CAAC,CAAA,KAAA,EAAQ,OAAA,CAAQ,OAAA,CAAQ,MAAA,GAAS,CAAC,CAAC,CAAA,CAAA;AAG3E,IAAM,kBAAA,GAAqB,IAAA;AAE3B,IAAM,aAAA,GAAgB,uCAAA;AAEtB,IAAM,KAAA,GAAQ,kFAAA;AAGd,IAAM,UAAA,GAAa,MAAMA,mCAAA,CAAkBC,iCAAA,CAAgB,UAAU,CAAA;AAE9D,SAAS,kBAAA,CAAmB;AAAA,EACjC,UAAA;AAAA,EACA,OAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAA,EAA4B;AAC1B,EAAA,MAAM,UAAUC,yBAAA,EAAoB;AACpC,EAAA,MAAM,EAAE,OAAA,EAAS,WAAA,EAAY,GAAIC,qCAAA,EAAoB;AACrD,EAAA,MAAM,EAAE,OAAA,EAAQ,GAAIC,sCAAA,EAAqB;AACzC,EAAA,MAAM,EAAE,IAAA,EAAM,IAAA,EAAK,GAAIC,sCAAA,EAAqB;AAC5C,EAAA,MAAM,MAAA,GAASJ,iCAAA,CAAgB,CAAC,CAAA,KAAM,EAAE,MA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A,QACE,GAAG,UAAA,CAAW,MAAA;AAAA,QACf,2BACEN,eAAA,CAAAK,mBAAA,EAAA,EACG,QAAA,EAAA;AAAA,UAAA,UAAA,CAAW,MAAA,CAAO,SAAA;AAAA,0BACnBL,eAAA;AAAA,YAACO,mBAAA;AAAA,YAAA;AAAA,cACC,QAAA,EAAU,MACRX,kCAAA,CAAiB,OAAA,EAAS,EAAE,SAAS,KAAA,EAAO,WAAA,CAAY,cAAc,CAAA,EAAG,CAAA;AAAA,cAE3E,aAAA,EAAY,sBAAA;AAAA,cAEZ,QAAA,EAAA;AAAA,gCAAAC,cAAA,CAACE,wBAAA,EAAA,EAAa,WAAU,QAAA,EAAS,CAAA;AAAA,gCACjCF,cAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,MAAA,EAAO,QAAA,EAAA,wBAAA,EAAsB;AAAA;AAAA;AAAA;AAC/C,SAAA,EACF,CAAA;AAAA,QAEF,SAAA,EAAW;AAAA;AAAA;AACb,GAAA,EACF,CAAA;AAEJ","file":"ConnectedSlidesTab-JSPU6EY5.cjs","sourcesContent":["/**\n * A presentation's slides tab in the document viewer: the slides editor, on the presentation the\n * viewer shows. Opening a saved presentation loads it (unless it is the one being edited); a new\n * one (a presentation draft) takes the clips gathered so far. Clips gathered with no presentation\n * open join the one opened next. Saving a draft makes it a document, and the tab moves to it.\n *\n * The editor can also move to the presentation's own window (Pop out), beside the documents its\n * clips come from; the tab then says so. Present opens that window with the slides alone.\n */\n\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport { ExternalLink, Loader2, PanelLeftClose, Presentation } from 'lucide-react'\nimport {\n isPanelOpen,\n registerDocumentTurnFlush,\n useArbiSessionState,\n useArbiSessionStore,\n} from '@arbidocs/react'\nimport { Button, DropdownMenuItem } from '@arbidocs/react/ui'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { usePanelHostSupport } from '../../shell/panel-host'\nimport {\n PRESENTATION_PANEL,\n openPresentation,\n presentationWindowOnlyPresents,\n} from '../../presentation/panel-id'\nimport { SlidesEditor } from '../../presentation/SlidesEditor'\nimport { hasUnsavedChanges, usePresentation } from '../../presentation/store'\nimport { EmptyState } from '../../components/EmptyState'\nimport { editPresentation } from './requests'\nimport { usePresentationController } from './usePresentationController'\nimport { usePresentationFiles } from './usePresentationFiles'\n\nexport interface ConnectedSlidesTabProps {\n /** The viewed document's id, or a presentation draft's (`draft-…`). */\n documentId: string\n /** The version on screen, when an older one. */\n version?: number\n /** The document's current version: a newer one than the one being edited is opened. */\n currentVersion?: number\n /** A new presentation, not saved yet: its draft title. */\n draftTitle?: string\n}\n\n/** \"2, 3 and 5\". */\nconst listOf = (numbers: number[]) =>\n numbers.length < 2\n ? String(numbers[0] ?? '')\n : `${numbers.slice(0, -1).join(', ')} and ${numbers[numbers.length - 1]}`\n\n/** A new presentation saves itself this long after its first content (typing settles first). */\nconst AUTO_SAVE_AFTER_MS = 2500\n/** The names a new presentation starts with (not chosen by anyone). */\nconst DEFAULT_NAMES = /^(new|untitled) presentation( \\d+)?$/i\n\nconst STALE = 'This presentation was changed outside the editor: Save to draw its slides again.'\n\n/** The presentation has anything in it worth asking about before it is replaced. */\nconst hasContent = () => hasUnsavedChanges(usePresentation.getState())\n\nexport function ConnectedSlidesTab({\n documentId,\n version,\n currentVersion,\n draftTitle,\n}: ConnectedSlidesTabProps) {\n const session = useArbiSessionStore()\n const { windows, popoutTitle } = usePanelHostSupport()\n const { confirm } = useBlocksEnvironment()\n const { open, save } = usePresentationFiles()\n const notify = usePresentation((s) => s.notify)\n const boundTo = usePresentation((s) => s.boundTo)\n const savedId = usePresentation((s) => s.savedId)\n const [loading, setLoading] = useState(false)\n const isDraft = draftTitle !== undefined\n const target = version ? `${documentId}@v${version}` : documentId\n const poppedOut = useArbiSessionState(\n (state) => isPanelOpen(state, PRESENTATION_PANEL) && !presentationWindowOnlyPresents()\n )\n const controller = usePresentationController(!poppedOut)\n const asked = useRef<string | null>(null)\n // Another presentation, with changes, is being edited and the user kept it.\n const [declined, setDeclined] = useState(false)\n const [force, setForce] = useState(0)\n\n // Show the presentation this tab is for (once per presentation: a remount does not ask again).\n useEffect(() => {\n const state = usePresentation.getState()\n if (state.boundTo === target || asked.current === `${target}#${force}`) return\n asked.current = `${target}#${force}`\n setDeclined(false)\n void (async () => {\n // Clips gathered with no presentation open join this one.\n const gathered = state.boundTo === null ? state.clips : []\n if (state.boundTo !== null && hasContent() && !force) {\n const ok = await confirm({\n title: 'Open presentation',\n message: 'Replace the presentation being edited? Save it first to keep its changes.',\n kind: 'confirm',\n })\n if (!ok) return setDeclined(true)\n }\n if (isDraft) {\n if (state.boundTo !== null) state.reset()\n usePresentation.getState().bind(target)\n usePresentation.getState().setTitle(draftTitle || 'Untitled presentation')\n return\n }\n setLoading(true)\n try {\n const { missing, stale, imported, changedOutside } = await open(documentId, version)\n usePresentation.getState().bind(target)\n if (gathered.length) usePresentation.getState().adoptClips(gathered)\n if (stale) notify(STALE, 'error')\n if (imported) {\n notify(\n ['Opened from PowerPoint, ready to edit.', ...imported.notes].join(' · '),\n 'success'\n )\n }\n if (changedOutside) {\n notify(\n `${changedOutside.length === 1 ? `Slide ${changedOutside[0]} was` : `Slides ${listOf(changedOutside)} were`} changed in PowerPoint: brought in as changed there.`,\n 'success'\n )\n }\n if (missing) {\n notify(\n `${missing} clip${missing === 1 ? '' : 's'} could not be opened (moved, deleted or not shared with you)`,\n 'error'\n )\n }\n } catch (error) {\n notify(\n error instanceof Error ? error.message : 'The presentation could not be opened',\n 'error'\n )\n } finally {\n setLoading(false)\n }\n })()\n // eslint-disable-next-line react-hooks/exhaustive-deps -- a draft's title changes as it is typed\n }, [target, documentId, version, isDraft, force, open, confirm, notify])\n\n // A draft's title is the presentation's.\n useEffect(() => {\n if (isDraft && boundTo === target && draftTitle) usePresentation.getState().setTitle(draftTitle)\n }, [isDraft, boundTo, target, draftTitle])\n\n // Saved as another document (a draft's first save, Save as, an older file saved as a\n // PowerPoint): the viewer follows it. Only once this tab's presentation was the one edited\n // (another, still bound as the tab opens, is not \"its\" save).\n const wasBound = useRef(false)\n useEffect(() => {\n if (boundTo === target) wasBound.current = true\n if (!wasBound.current || !savedId || boundTo !== savedId || savedId === target) return\n if (isDraft) session.clearDraftDocument(documentId)\n editPresentation(session, { kind: 'open', documentId: savedId })\n }, [isDraft, savedId, boundTo, target, documentId, session])\n\n // A newer version saved meanwhile (by ARBI, asked in the chat beside the deck, or by someone\n // else): shown at once, unless this one has changes of its own, which are never thrown away.\n const heldVersion = usePresentation((s) => (s.boundTo === target ? s.version : null))\n const toldNewer = useRef<number | null>(null)\n useEffect(() => {\n if (isDraft || version || !currentVersion || heldVersion === null) return\n if (currentVersion <= heldVersion || loading) return\n if (hasContent()) {\n if (toldNewer.current === currentVersion) return\n toldNewer.current = currentVersion\n notify(\n `A newer version (${currentVersion}) was saved while you edited. Save as… keeps yours; reopen the presentation to see it.`,\n 'error'\n )\n return\n }\n setLoading(true)\n void open(documentId)\n .then(() => {\n usePresentation.getState().bind(target)\n notify(`Updated to version ${currentVersion}.`, 'success')\n })\n .catch((error: unknown) =>\n notify(\n error instanceof Error ? error.message : 'The new version could not be opened',\n 'error'\n )\n )\n .finally(() => setLoading(false))\n }, [currentVersion, heldVersion, isDraft, version, loading, open, documentId, target, notify])\n\n // A new presentation saves itself once it has something in it (a clip, a title, a point): from\n // then on it is a document of Presentations, which a chat can work in and look at (its PDF), and\n // which is not lost with the tab. Later saves stay the person's (each a version they chose).\n const editState = usePresentation((state) => state)\n useEffect(() => {\n if (version || editState.boundTo !== target || !hasUnsavedChanges(editState)) return\n const timer = setTimeout(() => {\n const state = usePresentation.getState()\n const firstTitle = state.slides.find((slide) => slide.caption.trim())?.caption.trim()\n const title =\n state.title && !DEFAULT_NAMES.test(state.title)\n ? state.title\n : (firstTitle ?? (state.title || 'Untitled presentation'))\n if (title !== state.title) state.setTitle(title)\n void save(title, { autosave: true }).catch((error: unknown) => {\n notify(\n error instanceof Error ? error.message : 'The presentation could not be saved',\n 'error'\n )\n })\n }, AUTO_SAVE_AFTER_MS)\n return () => clearTimeout(timer)\n }, [editState, target, version, save, notify])\n\n // A chat turn about this presentation (the chat beside it) saves its unsaved changes first, so\n // ARBI works on the slides as they are on screen.\n useEffect(() => {\n if (version || boundTo !== target || (!isDraft && savedId !== documentId)) return\n return registerDocumentTurnFlush(documentId, async () => {\n const state = usePresentation.getState()\n if ((isDraft || state.savedId === documentId) && hasUnsavedChanges(state))\n await save(state.title)\n })\n }, [isDraft, version, savedId, boundTo, documentId, target, save])\n\n const present = useCallback(() => {\n openPresentation(session, { present: true, windows, title: popoutTitle('Presentation') })\n usePresentation.getState().setPresenting(true)\n }, [session, windows, popoutTitle])\n\n if (poppedOut) {\n return (\n <div className=\"flex h-full items-center justify-center p-6\" data-testid=\"slides-popped-out\">\n <EmptyState\n icon={ExternalLink}\n title=\"Editing in its own window\"\n description=\"The presentation is open in its own window, beside the documents you clip from.\"\n action={\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => session.closePanel(PRESENTATION_PANEL)}\n >\n <PanelLeftClose className=\"size-4\" />\n Bring it back here\n </Button>\n }\n />\n </div>\n )\n }\n if (declined && boundTo !== target) {\n return (\n <div className=\"flex h-full items-center justify-center p-6\" data-testid=\"slides-declined\">\n <EmptyState\n icon={Presentation}\n title=\"Another presentation is being edited\"\n description=\"It has changes. Save it first, or open this one in its place.\"\n action={\n <Button type=\"button\" variant=\"outline\" onClick={() => setForce((n) => n + 1)}>\n Open this one instead\n </Button>\n }\n />\n </div>\n )\n }\n if (loading || boundTo !== target) {\n return (\n <div className=\"flex h-full items-center justify-center gap-2 text-sm text-muted-foreground\">\n <Loader2 className=\"size-4 animate-spin\" />\n Opening the presentation…\n </div>\n )\n }\n return (\n <>\n {controller.dialogs}\n <SlidesEditor\n {...controller.editor}\n menuItems={\n <>\n {controller.editor.menuItems}\n <DropdownMenuItem\n onSelect={() =>\n openPresentation(session, { windows, title: popoutTitle('Presentation') })\n }\n data-testid=\"presentation-pop-out\"\n >\n <ExternalLink className=\"size-4\" />\n <span className=\"ml-2\">Edit in its own window</span>\n </DropdownMenuItem>\n </>\n }\n onPresent={present}\n />\n </>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/connection/presentation/ConnectedSlidesTab.tsx"],"names":["hasUnsavedChanges","usePresentation","useArbiSessionStore","usePanelHostSupport","useBlocksEnvironment","usePresentationFiles","useState","useArbiSessionState","isPanelOpen","PRESENTATION_PANEL","presentationWindowOnlyPresents","usePresentationController","useRef","useEffect","editPresentation","registerDocumentTurnFlush","useCallback","openPresentation","jsx","EmptyState","ExternalLink","jsxs","Button","PanelLeftClose","Presentation","Loader2","Fragment","SlidesEditor","DropdownMenuItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,IAAM,MAAA,GAAS,CAAC,OAAA,KACd,OAAA,CAAQ,MAAA,GAAS,CAAA,GACb,MAAA,CAAO,OAAA,CAAQ,CAAC,CAAA,IAAK,EAAE,CAAA,GACvB,CAAA,EAAG,QAAQ,KAAA,CAAM,CAAA,EAAG,EAAE,CAAA,CAAE,IAAA,CAAK,IAAI,CAAC,CAAA,KAAA,EAAQ,OAAA,CAAQ,OAAA,CAAQ,MAAA,GAAS,CAAC,CAAC,CAAA,CAAA;AAG3E,IAAM,kBAAA,GAAqB,IAAA;AAE3B,IAAM,aAAA,GAAgB,uCAAA;AAEtB,IAAM,KAAA,GAAQ,kFAAA;AAGd,IAAM,UAAA,GAAa,MAAMA,mCAAA,CAAkBC,iCAAA,CAAgB,UAAU,CAAA;AAE9D,SAAS,kBAAA,CAAmB;AAAA,EACjC,UAAA;AAAA,EACA,OAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAA,EAA4B;AAC1B,EAAA,MAAM,UAAUC,yBAAA,EAAoB;AACpC,EAAA,MAAM,EAAE,OAAA,EAAS,WAAA,EAAY,GAAIC,qCAAA,EAAoB;AACrD,EAAA,MAAM,EAAE,OAAA,EAAQ,GAA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;AAAA,EAEJ;AACA,EAAA,uBACEJ,eAAA,CAAAK,mBAAA,EAAA,EACG,QAAA,EAAA;AAAA,IAAA,UAAA,CAAW,OAAA;AAAA,oBACZR,cAAA;AAAA,MAACS,8BAAA;AAAA,MAAA;AAAA,QACE,GAAG,UAAA,CAAW,MAAA;AAAA,QACf,2BACEN,eAAA,CAAAK,mBAAA,EAAA,EACG,QAAA,EAAA;AAAA,UAAA,UAAA,CAAW,MAAA,CAAO,SAAA;AAAA,0BACnBL,eAAA;AAAA,YAACO,mBAAA;AAAA,YAAA;AAAA,cACC,QAAA,EAAU,MACRX,kCAAA,CAAiB,OAAA,EAAS,EAAE,SAAS,KAAA,EAAO,WAAA,CAAY,cAAc,CAAA,EAAG,CAAA;AAAA,cAE3E,aAAA,EAAY,sBAAA;AAAA,cAEZ,QAAA,EAAA;AAAA,gCAAAC,cAAA,CAACE,wBAAA,EAAA,EAAa,WAAU,QAAA,EAAS,CAAA;AAAA,gCACjCF,cAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,MAAA,EAAO,QAAA,EAAA,wBAAA,EAAsB;AAAA;AAAA;AAAA;AAC/C,SAAA,EACF,CAAA;AAAA,QAEF,SAAA,EAAW;AAAA;AAAA;AACb,GAAA,EACF,CAAA;AAEJ","file":"ConnectedSlidesTab-E76OVY34.cjs","sourcesContent":["/**\n * A presentation's slides tab in the document viewer: the slides editor, on the presentation the\n * viewer shows. Opening a saved presentation loads it (unless it is the one being edited); a new\n * one (a presentation draft) takes the clips gathered so far. Clips gathered with no presentation\n * open join the one opened next. Saving a draft makes it a document, and the tab moves to it.\n *\n * The editor can also move to the presentation's own window (Pop out), beside the documents its\n * clips come from; the tab then says so. Present opens that window with the slides alone.\n */\n\nimport { useCallback, useEffect, useRef, useState } from 'react'\nimport { ExternalLink, Loader2, PanelLeftClose, Presentation } from 'lucide-react'\nimport {\n isPanelOpen,\n registerDocumentTurnFlush,\n useArbiSessionState,\n useArbiSessionStore,\n} from '@arbidocs/react'\nimport { Button, DropdownMenuItem } from '@arbidocs/react/ui'\nimport { useBlocksEnvironment } from '../../provider/environment'\nimport { usePanelHostSupport } from '../../shell/panel-host'\nimport {\n PRESENTATION_PANEL,\n openPresentation,\n presentationWindowOnlyPresents,\n} from '../../presentation/panel-id'\nimport { SlidesEditor } from '../../presentation/SlidesEditor'\nimport { hasUnsavedChanges, usePresentation } from '../../presentation/store'\nimport { EmptyState } from '../../components/EmptyState'\nimport { editPresentation } from './requests'\nimport { usePresentationController } from './usePresentationController'\nimport { usePresentationFiles } from './usePresentationFiles'\n\nexport interface ConnectedSlidesTabProps {\n /** The viewed document's id, or a presentation draft's (`draft-…`). */\n documentId: string\n /** The version on screen, when an older one. */\n version?: number\n /** The document's current version: a newer one than the one being edited is opened. */\n currentVersion?: number\n /** A new presentation, not saved yet: its draft title. */\n draftTitle?: string\n}\n\n/** \"2, 3 and 5\". */\nconst listOf = (numbers: number[]) =>\n numbers.length < 2\n ? String(numbers[0] ?? '')\n : `${numbers.slice(0, -1).join(', ')} and ${numbers[numbers.length - 1]}`\n\n/** A new presentation saves itself this long after its first content (typing settles first). */\nconst AUTO_SAVE_AFTER_MS = 2500\n/** The names a new presentation starts with (not chosen by anyone). */\nconst DEFAULT_NAMES = /^(new|untitled) presentation( \\d+)?$/i\n\nconst STALE = 'This presentation was changed outside the editor: Save to draw its slides again.'\n\n/** The presentation has anything in it worth asking about before it is replaced. */\nconst hasContent = () => hasUnsavedChanges(usePresentation.getState())\n\nexport function ConnectedSlidesTab({\n documentId,\n version,\n currentVersion,\n draftTitle,\n}: ConnectedSlidesTabProps) {\n const session = useArbiSessionStore()\n const { windows, popoutTitle } = usePanelHostSupport()\n const { confirm } = useBlocksEnvironment()\n const { open, save } = usePresentationFiles()\n const notify = usePresentation((s) => s.notify)\n const boundTo = usePresentation((s) => s.boundTo)\n const savedId = usePresentation((s) => s.savedId)\n const [loading, setLoading] = useState(false)\n const isDraft = draftTitle !== undefined\n const target = version ? `${documentId}@v${version}` : documentId\n const poppedOut = useArbiSessionState(\n (state) => isPanelOpen(state, PRESENTATION_PANEL) && !presentationWindowOnlyPresents()\n )\n const controller = usePresentationController(!poppedOut)\n const asked = useRef<string | null>(null)\n // Another presentation, with changes, is being edited and the user kept it.\n const [declined, setDeclined] = useState(false)\n const [force, setForce] = useState(0)\n\n // Show the presentation this tab is for (once per presentation: a remount does not ask again).\n useEffect(() => {\n const state = usePresentation.getState()\n if (state.boundTo === target || asked.current === `${target}#${force}`) return\n asked.current = `${target}#${force}`\n setDeclined(false)\n void (async () => {\n // Clips gathered with no presentation open join this one.\n const gathered = state.boundTo === null ? state.clips : []\n if (state.boundTo !== null && hasContent() && !force) {\n const ok = await confirm({\n title: 'Open presentation',\n message: 'Replace the presentation being edited? Save it first to keep its changes.',\n kind: 'confirm',\n })\n if (!ok) return setDeclined(true)\n }\n if (isDraft) {\n if (state.boundTo !== null) state.reset()\n usePresentation.getState().bind(target)\n usePresentation.getState().setTitle(draftTitle || 'Untitled presentation')\n return\n }\n setLoading(true)\n try {\n const { missing, stale, imported, changedOutside } = await open(documentId, version)\n usePresentation.getState().bind(target)\n if (gathered.length) usePresentation.getState().adoptClips(gathered)\n if (stale) notify(STALE, 'error')\n if (imported) {\n notify(\n ['Opened from PowerPoint, ready to edit.', ...imported.notes].join(' · '),\n 'success'\n )\n }\n if (changedOutside) {\n notify(\n `${changedOutside.length === 1 ? `Slide ${changedOutside[0]} was` : `Slides ${listOf(changedOutside)} were`} changed in PowerPoint: brought in as changed there.`,\n 'success'\n )\n }\n if (missing) {\n notify(\n `${missing} clip${missing === 1 ? '' : 's'} could not be opened (moved, deleted or not shared with you)`,\n 'error'\n )\n }\n } catch (error) {\n notify(\n error instanceof Error ? error.message : 'The presentation could not be opened',\n 'error'\n )\n } finally {\n setLoading(false)\n }\n })()\n // eslint-disable-next-line react-hooks/exhaustive-deps -- a draft's title changes as it is typed\n }, [target, documentId, version, isDraft, force, open, confirm, notify])\n\n // A draft's title is the presentation's.\n useEffect(() => {\n if (isDraft && boundTo === target && draftTitle) usePresentation.getState().setTitle(draftTitle)\n }, [isDraft, boundTo, target, draftTitle])\n\n // Saved as another document (a draft's first save, Save as, an older file saved as a\n // PowerPoint): the viewer follows it. Only once this tab's presentation was the one edited\n // (another, still bound as the tab opens, is not \"its\" save).\n const wasBound = useRef(false)\n useEffect(() => {\n if (boundTo === target) wasBound.current = true\n if (!wasBound.current || !savedId || boundTo !== savedId || savedId === target) return\n if (isDraft) session.clearDraftDocument(documentId)\n editPresentation(session, { kind: 'open', documentId: savedId })\n }, [isDraft, savedId, boundTo, target, documentId, session])\n\n // A newer version saved meanwhile (by ARBI, asked in the chat beside the deck, or by someone\n // else): shown at once, unless this one has changes of its own, which are never thrown away.\n const heldVersion = usePresentation((s) => (s.boundTo === target ? s.version : null))\n const toldNewer = useRef<number | null>(null)\n useEffect(() => {\n if (isDraft || version || !currentVersion || heldVersion === null) return\n if (currentVersion <= heldVersion || loading) return\n if (hasContent()) {\n if (toldNewer.current === currentVersion) return\n toldNewer.current = currentVersion\n notify(\n `A newer version (${currentVersion}) was saved while you edited. Save as… keeps yours; reopen the presentation to see it.`,\n 'error'\n )\n return\n }\n setLoading(true)\n void open(documentId)\n .then(() => {\n usePresentation.getState().bind(target)\n notify(`Updated to version ${currentVersion}.`, 'success')\n })\n .catch((error: unknown) =>\n notify(\n error instanceof Error ? error.message : 'The new version could not be opened',\n 'error'\n )\n )\n .finally(() => setLoading(false))\n }, [currentVersion, heldVersion, isDraft, version, loading, open, documentId, target, notify])\n\n // A new presentation saves itself once it has something in it (a clip, a title, a point): from\n // then on it is a document of Presentations, which a chat can work in and look at (its PDF), and\n // which is not lost with the tab. Later saves stay the person's (each a version they chose).\n const editState = usePresentation((state) => state)\n useEffect(() => {\n if (version || editState.boundTo !== target || !hasUnsavedChanges(editState)) return\n const timer = setTimeout(() => {\n const state = usePresentation.getState()\n const firstTitle = state.slides.find((slide) => slide.caption.trim())?.caption.trim()\n const title =\n state.title && !DEFAULT_NAMES.test(state.title)\n ? state.title\n : (firstTitle ?? (state.title || 'Untitled presentation'))\n if (title !== state.title) state.setTitle(title)\n void save(title, { autosave: true }).catch((error: unknown) => {\n notify(\n error instanceof Error ? error.message : 'The presentation could not be saved',\n 'error'\n )\n })\n }, AUTO_SAVE_AFTER_MS)\n return () => clearTimeout(timer)\n }, [editState, target, version, save, notify])\n\n // A chat turn about this presentation (the chat beside it) saves its unsaved changes first, so\n // ARBI works on the slides as they are on screen.\n useEffect(() => {\n if (version || boundTo !== target || (!isDraft && savedId !== documentId)) return\n return registerDocumentTurnFlush(documentId, async () => {\n const state = usePresentation.getState()\n if ((isDraft || state.savedId === documentId) && hasUnsavedChanges(state))\n await save(state.title)\n })\n }, [isDraft, version, savedId, boundTo, documentId, target, save])\n\n const present = useCallback(() => {\n openPresentation(session, { present: true, windows, title: popoutTitle('Presentation') })\n usePresentation.getState().setPresenting(true)\n }, [session, windows, popoutTitle])\n\n if (poppedOut) {\n return (\n <div className=\"flex h-full items-center justify-center p-6\" data-testid=\"slides-popped-out\">\n <EmptyState\n icon={ExternalLink}\n title=\"Editing in its own window\"\n description=\"The presentation is open in its own window, beside the documents you clip from.\"\n action={\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => session.closePanel(PRESENTATION_PANEL)}\n >\n <PanelLeftClose className=\"size-4\" />\n Bring it back here\n </Button>\n }\n />\n </div>\n )\n }\n if (declined && boundTo !== target) {\n return (\n <div className=\"flex h-full items-center justify-center p-6\" data-testid=\"slides-declined\">\n <EmptyState\n icon={Presentation}\n title=\"Another presentation is being edited\"\n description=\"It has changes. Save it first, or open this one in its place.\"\n action={\n <Button type=\"button\" variant=\"outline\" onClick={() => setForce((n) => n + 1)}>\n Open this one instead\n </Button>\n }\n />\n </div>\n )\n }\n if (loading || boundTo !== target) {\n return (\n <div className=\"flex h-full items-center justify-center gap-2 text-sm text-muted-foreground\">\n <Loader2 className=\"size-4 animate-spin\" />\n Opening the presentation…\n </div>\n )\n }\n return (\n <>\n {controller.dialogs}\n <SlidesEditor\n {...controller.editor}\n menuItems={\n <>\n {controller.editor.menuItems}\n <DropdownMenuItem\n onSelect={() =>\n openPresentation(session, { windows, title: popoutTitle('Presentation') })\n }\n data-testid=\"presentation-pop-out\"\n >\n <ExternalLink className=\"size-4\" />\n <span className=\"ml-2\">Edit in its own window</span>\n </DropdownMenuItem>\n </>\n }\n onPresent={present}\n />\n </>\n )\n}\n"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
4
|
+
var chunkNTDQQLDD_cjs = require('./chunk-NTDQQLDD.cjs');
|
|
5
|
+
require('./chunk-ESVRVZ53.cjs');
|
|
6
|
+
require('./chunk-23I5EUZA.cjs');
|
|
7
7
|
require('./chunk-GA5ZO4YA.cjs');
|
|
8
8
|
require('./chunk-VG5XNE4H.cjs');
|
|
9
9
|
require('./chunk-DDWLMYRO.cjs');
|
|
10
|
-
require('./chunk-
|
|
10
|
+
require('./chunk-VLQCLQAS.cjs');
|
|
11
11
|
require('./chunk-4ONPEVTP.cjs');
|
|
12
12
|
require('./chunk-V3KLUWQQ.cjs');
|
|
13
13
|
require('./chunk-P5AQYC4D.cjs');
|
|
@@ -15,7 +15,7 @@ require('./chunk-WAV762GP.cjs');
|
|
|
15
15
|
require('./chunk-ZESMRGDV.cjs');
|
|
16
16
|
require('./chunk-UKOYN2WD.cjs');
|
|
17
17
|
require('./chunk-RC25WMVB.cjs');
|
|
18
|
-
require('./chunk-
|
|
18
|
+
require('./chunk-ZYGAXD3N.cjs');
|
|
19
19
|
require('./chunk-JJZOL5MG.cjs');
|
|
20
20
|
require('./chunk-3YEXZX4H.cjs');
|
|
21
21
|
require('./chunk-4PA6VCCR.cjs');
|
|
@@ -26,12 +26,12 @@ require('./chunk-6UZC4XVV.cjs');
|
|
|
26
26
|
require('./chunk-YVCOQHCE.cjs');
|
|
27
27
|
require('./chunk-JV5TVUOU.cjs');
|
|
28
28
|
require('./chunk-ZVEW3JBT.cjs');
|
|
29
|
+
require('./chunk-VZOOGA47.cjs');
|
|
29
30
|
require('./chunk-HQDR43JC.cjs');
|
|
30
31
|
require('./chunk-JR2YSBD5.cjs');
|
|
31
32
|
require('./chunk-3YZKDCWY.cjs');
|
|
32
33
|
require('./chunk-SJSGSHIT.cjs');
|
|
33
34
|
require('./chunk-ZW6FPIFC.cjs');
|
|
34
|
-
require('./chunk-VZOOGA47.cjs');
|
|
35
35
|
require('./chunk-75BNMCUX.cjs');
|
|
36
36
|
require('./chunk-QGVOT7E4.cjs');
|
|
37
37
|
require('./chunk-QRAQZTJE.cjs');
|
|
@@ -48,7 +48,7 @@ require('./chunk-PLIF5CUV.cjs');
|
|
|
48
48
|
|
|
49
49
|
Object.defineProperty(exports, "ConnectedStreamedWordArtifact", {
|
|
50
50
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkNTDQQLDD_cjs.ConnectedStreamedWordArtifact; }
|
|
52
52
|
});
|
|
53
|
-
//# sourceMappingURL=ConnectedStreamedWordArtifact-
|
|
54
|
-
//# sourceMappingURL=ConnectedStreamedWordArtifact-
|
|
53
|
+
//# sourceMappingURL=ConnectedStreamedWordArtifact-Q64DRRQD.cjs.map
|
|
54
|
+
//# sourceMappingURL=ConnectedStreamedWordArtifact-Q64DRRQD.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"ConnectedStreamedWordArtifact-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ConnectedStreamedWordArtifact-Q64DRRQD.cjs"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkMLA2BJ2Y_cjs = require('./chunk-MLA2BJ2Y.cjs');
|
|
5
|
-
var chunkAEQT2QQX_cjs = require('./chunk-AEQT2QQX.cjs');
|
|
6
5
|
require('./chunk-7PN3YENO.cjs');
|
|
6
|
+
var chunkAEQT2QQX_cjs = require('./chunk-AEQT2QQX.cjs');
|
|
7
7
|
var chunkADDQKZ5I_cjs = require('./chunk-ADDQKZ5I.cjs');
|
|
8
8
|
require('./chunk-5QERK4PK.cjs');
|
|
9
9
|
require('./chunk-T73BHNQX.cjs');
|
|
@@ -29,11 +29,11 @@ require('./chunk-6UZC4XVV.cjs');
|
|
|
29
29
|
require('./chunk-JV5TVUOU.cjs');
|
|
30
30
|
require('./chunk-ZVEW3JBT.cjs');
|
|
31
31
|
require('./chunk-M74FWYNL.cjs');
|
|
32
|
+
require('./chunk-VZOOGA47.cjs');
|
|
32
33
|
var chunkJR2YSBD5_cjs = require('./chunk-JR2YSBD5.cjs');
|
|
33
34
|
require('./chunk-TMX7YFVM.cjs');
|
|
34
35
|
require('./chunk-3YZKDCWY.cjs');
|
|
35
36
|
require('./chunk-SJSGSHIT.cjs');
|
|
36
|
-
require('./chunk-VZOOGA47.cjs');
|
|
37
37
|
require('./chunk-UDSHVNU3.cjs');
|
|
38
38
|
require('./chunk-IPSHAMO2.cjs');
|
|
39
39
|
require('./chunk-PPCATBOY.cjs');
|
|
@@ -516,5 +516,5 @@ function DocumentReviewCard({
|
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
exports.DocumentReviewCard = DocumentReviewCard;
|
|
519
|
-
//# sourceMappingURL=DocumentReviewCard-
|
|
520
|
-
//# sourceMappingURL=DocumentReviewCard-
|
|
519
|
+
//# sourceMappingURL=DocumentReviewCard-M53XFLI2.cjs.map
|
|
520
|
+
//# sourceMappingURL=DocumentReviewCard-M53XFLI2.cjs.map
|