@powerhousedao/reactor-browser 6.2.3-dev.9 → 6.2.3-dev.91
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/{attachment-service-D3EhiAJ7.d.ts → attachment-service-10Qn5nIw.d.ts} +766 -108
- package/dist/attachment-service-10Qn5nIw.d.ts.map +1 -0
- package/dist/auth-DzIYxeEJ.d.ts +32 -0
- package/dist/auth-DzIYxeEJ.d.ts.map +1 -0
- package/dist/{client-DjK30EQ-.js → client-BFnMV-EO.js} +39 -22
- package/dist/client-BFnMV-EO.js.map +1 -0
- package/dist/{client-D66jVnot.js → client-BNMyQ_Z2.js} +372 -33
- package/dist/client-BNMyQ_Z2.js.map +1 -0
- package/dist/{client-BIHN_UyR.d.ts → client-C-NgSjoc.d.ts} +4 -3
- package/dist/client-C-NgSjoc.d.ts.map +1 -0
- package/dist/dispatch-Cylwl2Dk.js +1173 -0
- package/dist/dispatch-Cylwl2Dk.js.map +1 -0
- package/dist/document-by-id-DdvqanGR.js +16 -0
- package/dist/document-by-id-DdvqanGR.js.map +1 -0
- package/dist/document-model-modules-ChmfyIxT.js +644 -0
- package/dist/document-model-modules-ChmfyIxT.js.map +1 -0
- package/dist/document-operations-QtU34A52.js +4664 -0
- package/dist/document-operations-QtU34A52.js.map +1 -0
- package/dist/global-bbfp3_1x.d.ts +649 -0
- package/dist/global-bbfp3_1x.d.ts.map +1 -0
- package/dist/{index-B33TKEqp.d.ts → index-Bfr_cWdi.d.ts} +31 -100
- package/dist/index-Bfr_cWdi.d.ts.map +1 -0
- package/dist/{index-BIVDXw3K.d.ts → index-rtDmzViP.d.ts} +3 -3
- package/dist/index-rtDmzViP.d.ts.map +1 -0
- package/dist/index.d.ts +837 -411
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +851 -129
- package/dist/index.js.map +1 -1
- package/dist/inspector-proxy-DODqs15F.d.ts +25 -0
- package/dist/inspector-proxy-DODqs15F.d.ts.map +1 -0
- package/dist/make-ph-event-functions-B5GU5xcR.js +180 -0
- package/dist/make-ph-event-functions-B5GU5xcR.js.map +1 -0
- package/dist/{pglite-CntadC_p-9NDG14dS.d.ts → pglite-CntadC_p-DTkdF8sr.d.ts} +11 -33
- package/dist/pglite-CntadC_p-DTkdF8sr.d.ts.map +1 -0
- package/dist/{relational-D1RB45sA.js → relational-DZuyKp2y.js} +66 -5
- package/dist/relational-DZuyKp2y.js.map +1 -0
- package/dist/{renown-rqK8sokh.js → renown-B3MUaiq7.js} +61 -31
- package/dist/renown-B3MUaiq7.js.map +1 -0
- package/dist/renown-CBoTdGrg.js +394 -0
- package/dist/renown-CBoTdGrg.js.map +1 -0
- package/dist/{types-Dcv1ZLoW.d.ts → schema-Bn6L3QR1.d.ts} +324 -64
- package/dist/schema-Bn6L3QR1.d.ts.map +1 -0
- package/dist/src/ai/index.d.ts +276 -75
- package/dist/src/ai/index.d.ts.map +1 -1
- package/dist/src/ai/index.js +733 -172
- package/dist/src/ai/index.js.map +1 -1
- package/dist/src/analytics/index.d.ts +36 -44
- package/dist/src/analytics/index.d.ts.map +1 -1
- package/dist/src/analytics/index.js +4 -4
- package/dist/src/analytics/index.js.map +1 -1
- package/dist/src/document-model.d.ts +3 -4
- package/dist/src/document-model.d.ts.map +1 -1
- package/dist/src/document-model.js.map +1 -1
- package/dist/src/graphql/client.d.ts +4 -3
- package/dist/src/graphql/client.js +1 -1
- package/dist/src/graphql-client/entry.d.ts +6 -4
- package/dist/src/graphql-client/entry.js +4 -4
- package/dist/src/relational/index.d.ts +15 -9
- package/dist/src/relational/index.d.ts.map +1 -1
- package/dist/src/relational/index.js +1 -1
- package/dist/src/renown/index.d.ts +3 -2
- package/dist/src/renown/index.js +3 -3
- package/dist/src/rpc/index.d.ts +217 -140
- package/dist/src/rpc/index.d.ts.map +1 -1
- package/dist/src/rpc/index.js +600 -623
- package/dist/src/rpc/index.js.map +1 -1
- package/dist/{store-BJYcr_FL.js → store-DInXcjal.js} +1 -1
- package/dist/{store-BJYcr_FL.js.map → store-DInXcjal.js.map} +1 -1
- package/dist/{switchboard-CaXQ4-5Q.js → switchboard-B640iT1L.js} +61 -11
- package/dist/switchboard-B640iT1L.js.map +1 -0
- package/dist/{types-6vDzbRRS.d.ts → types-520nWrB3.d.ts} +2 -2
- package/dist/types-520nWrB3.d.ts.map +1 -0
- package/dist/types-CT44EMmw.d.ts +59 -0
- package/dist/types-CT44EMmw.d.ts.map +1 -0
- package/package.json +24 -23
- package/dist/attachment-service-D3EhiAJ7.d.ts.map +0 -1
- package/dist/client-BIHN_UyR.d.ts.map +0 -1
- package/dist/client-D66jVnot.js.map +0 -1
- package/dist/client-DjK30EQ-.js.map +0 -1
- package/dist/document-by-id-B4FIzG1w.js +0 -519
- package/dist/document-by-id-B4FIzG1w.js.map +0 -1
- package/dist/document-model-modules-bTP87nyr.js +0 -419
- package/dist/document-model-modules-bTP87nyr.js.map +0 -1
- package/dist/document-operations-WeE6wIDt.js +0 -2603
- package/dist/document-operations-WeE6wIDt.js.map +0 -1
- package/dist/global-OuINvEGT.d.ts +0 -401
- package/dist/global-OuINvEGT.d.ts.map +0 -1
- package/dist/index-B33TKEqp.d.ts.map +0 -1
- package/dist/index-BIVDXw3K.d.ts.map +0 -1
- package/dist/inspector-proxy-6h5VKAwt.d.ts +0 -257
- package/dist/inspector-proxy-6h5VKAwt.d.ts.map +0 -1
- package/dist/make-ph-event-functions-DBq3iWYn.js +0 -53
- package/dist/make-ph-event-functions-DBq3iWYn.js.map +0 -1
- package/dist/pglite-CntadC_p-9NDG14dS.d.ts.map +0 -1
- package/dist/relational-D1RB45sA.js.map +0 -1
- package/dist/renown-BHxwP7xU.js +0 -97
- package/dist/renown-BHxwP7xU.js.map +0 -1
- package/dist/renown-rqK8sokh.js.map +0 -1
- package/dist/switchboard-CaXQ4-5Q.js.map +0 -1
- package/dist/types-6vDzbRRS.d.ts.map +0 -1
- package/dist/types-Dcv1ZLoW.d.ts.map +0 -1
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
import { c as getPHStore, f as usePHStore, n as subscribeToPHValue, s as getActivePHStore, t as makePHEventFunctions } from "./make-ph-event-functions-B5GU5xcR.js";
|
|
2
|
+
import { C as isDuplicateModuleError, S as isDuplicateManifestError, n as useDispatch } from "./dispatch-Cylwl2Dk.js";
|
|
3
|
+
import { $ as makeNodeSlug, C as getCurrentPathname, E as hasHostNavigation, G as extractNodeIdFromSlug, J as findDriveBySlug, K as extractNodeSlugFromPath, M as preloadTarget, U as extractDriveSlugFromPath, Z as makeDriveSlug, k as openTarget } from "./renown-CBoTdGrg.js";
|
|
4
|
+
import { createContext, useCallback, useContext, useEffect, useSyncExternalStore } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { logger } from "document-model";
|
|
7
|
+
//#region src/graphql-client/auth.ts
|
|
8
|
+
/** Lifetime requested for an ambient Renown token, in seconds. */
|
|
9
|
+
const ambientTokenExpiresInSeconds = 600;
|
|
10
|
+
/**
|
|
11
|
+
* The default token provider: the token of the currently logged-in Renown user.
|
|
12
|
+
*
|
|
13
|
+
* It is deliberately resolved from `window.ph` on every call rather than
|
|
14
|
+
* captured at construction time, so a client built before login starts sending
|
|
15
|
+
* the token as soon as there is one.
|
|
16
|
+
*
|
|
17
|
+
* The token is requested WITHOUT an `aud` claim - the Switchboard verifier
|
|
18
|
+
* rejects tokens that carry an audience.
|
|
19
|
+
*/
|
|
20
|
+
async function ambientRenownTokenProvider() {
|
|
21
|
+
if (typeof window === "undefined") return;
|
|
22
|
+
const renown = getPHStore()?.renown;
|
|
23
|
+
if (!renown?.user) return;
|
|
24
|
+
return renown.getBearerToken({ expiresIn: ambientTokenExpiresInSeconds });
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Builds the SDK middleware that authenticates every request.
|
|
28
|
+
*
|
|
29
|
+
* The token is resolved per request and never cached, so a login, a logout or
|
|
30
|
+
* an expiry between two calls is picked up by the next one. When no token is
|
|
31
|
+
* available the request goes out unauthenticated.
|
|
32
|
+
*/
|
|
33
|
+
function makeAuthMiddleware(tokenProvider) {
|
|
34
|
+
return async (action) => {
|
|
35
|
+
const token = await tokenProvider();
|
|
36
|
+
if (!token) return action();
|
|
37
|
+
return action({ authorization: `Bearer ${token}` });
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region src/utils/nodes.ts
|
|
42
|
+
/** Sorts nodes by name. */
|
|
43
|
+
function sortNodesByName(nodes) {
|
|
44
|
+
return nodes.toSorted((a, b) => a.name.localeCompare(b.name));
|
|
45
|
+
}
|
|
46
|
+
/** Returns whether a node is a file. */
|
|
47
|
+
function isFileNodeKind(node) {
|
|
48
|
+
if (!node) return false;
|
|
49
|
+
return node.kind.toUpperCase() === "FILE";
|
|
50
|
+
}
|
|
51
|
+
/** Returns whether a node is a folder. */
|
|
52
|
+
function isFolderNodeKind(node) {
|
|
53
|
+
if (!node) return false;
|
|
54
|
+
return node.kind.toUpperCase() === "FOLDER";
|
|
55
|
+
}
|
|
56
|
+
const NODE_PAGE_SIZE = 1e3;
|
|
57
|
+
/** Every node of a drive from `read.drives`, paged until the last page;
|
|
58
|
+
* `parentFolder` narrows it as `listNodes` does (null: the root level). */
|
|
59
|
+
async function listAllDriveNodes(reader, driveId, options = {}) {
|
|
60
|
+
const nodes = [];
|
|
61
|
+
let cursor = "";
|
|
62
|
+
for (;;) {
|
|
63
|
+
const page = await reader.listNodes(driveId, options.parentFolder, {
|
|
64
|
+
limit: NODE_PAGE_SIZE,
|
|
65
|
+
cursor
|
|
66
|
+
}, options.signal);
|
|
67
|
+
nodes.push(...page.results);
|
|
68
|
+
if (!page.nextCursor || page.results.length === 0) return nodes;
|
|
69
|
+
cursor = page.nextCursor;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/hooks/drive-nodes.ts
|
|
74
|
+
const driveNodesEventFunctions = makePHEventFunctions("driveNodes");
|
|
75
|
+
/** Returns the per-drive node caches */
|
|
76
|
+
const useDriveNodesCache = driveNodesEventFunctions.useValue;
|
|
77
|
+
/** Adds an event handler for the drive node cache */
|
|
78
|
+
const addDriveNodesEventHandler = driveNodesEventFunctions.addEventHandler;
|
|
79
|
+
const mounted = /* @__PURE__ */ new Map();
|
|
80
|
+
function retain(driveId) {
|
|
81
|
+
mounted.set(driveId, (mounted.get(driveId) ?? 0) + 1);
|
|
82
|
+
return () => {
|
|
83
|
+
const count = (mounted.get(driveId) ?? 1) - 1;
|
|
84
|
+
if (count > 0) mounted.set(driveId, count);
|
|
85
|
+
else mounted.delete(driveId);
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function driveReader(store) {
|
|
89
|
+
const read = store?.reactorClient?.read;
|
|
90
|
+
if (read) return read.drives;
|
|
91
|
+
throw new Error("The reactor client is not initialized");
|
|
92
|
+
}
|
|
93
|
+
function entryOf(store, driveId) {
|
|
94
|
+
return store?.driveNodes?.get(driveId);
|
|
95
|
+
}
|
|
96
|
+
function setEntry(store, driveId, entry) {
|
|
97
|
+
if (!store) return;
|
|
98
|
+
const next = new Map(store.driveNodes);
|
|
99
|
+
if (entry) next.set(driveId, entry);
|
|
100
|
+
else next.delete(driveId);
|
|
101
|
+
store.driveNodes = next;
|
|
102
|
+
if (!getActivePHStore() && typeof window !== "undefined" && store === window.ph) window.dispatchEvent(new CustomEvent("ph:driveNodesUpdated"));
|
|
103
|
+
}
|
|
104
|
+
/** Loads every node of a drive into the cache, paging through
|
|
105
|
+
* `read.drives.listNodes`; served from the cache once loaded. */
|
|
106
|
+
function loadDriveNodes(driveId, options = {}) {
|
|
107
|
+
const store = options.store ?? getPHStore();
|
|
108
|
+
const current = entryOf(store, driveId);
|
|
109
|
+
if (current?.loading) {
|
|
110
|
+
if (options.refresh && !current.stale) setEntry(store, driveId, {
|
|
111
|
+
...current,
|
|
112
|
+
stale: true
|
|
113
|
+
});
|
|
114
|
+
return current.loading;
|
|
115
|
+
}
|
|
116
|
+
if (!options.refresh && current?.loaded === "all" && current.nodes) return Promise.resolve(current.nodes);
|
|
117
|
+
const read = store?.reactorClient?.read;
|
|
118
|
+
if (!read) return Promise.reject(/* @__PURE__ */ new Error("The reactor client is not initialized"));
|
|
119
|
+
const reader = read.drives;
|
|
120
|
+
const loading = listAllDriveNodes(reader, driveId);
|
|
121
|
+
setEntry(store, driveId, {
|
|
122
|
+
byId: current?.byId ?? /* @__PURE__ */ new Map(),
|
|
123
|
+
nodes: current?.nodes,
|
|
124
|
+
loaded: current?.byId.size ? "partial" : "none",
|
|
125
|
+
loading
|
|
126
|
+
});
|
|
127
|
+
loading.then((nodes) => {
|
|
128
|
+
const settled = entryOf(store, driveId);
|
|
129
|
+
if (settled?.loading !== loading) return;
|
|
130
|
+
setEntry(store, driveId, {
|
|
131
|
+
byId: new Map(nodes.map((n) => [n.id, n])),
|
|
132
|
+
nodes,
|
|
133
|
+
loaded: "all"
|
|
134
|
+
});
|
|
135
|
+
if (settled.stale) {
|
|
136
|
+
if (mounted.has(driveId)) loadDriveNodes(driveId, {
|
|
137
|
+
store,
|
|
138
|
+
refresh: true
|
|
139
|
+
}).catch((error) => logger.error("Reloading drive nodes failed: @error", error));
|
|
140
|
+
else setEntry(store, driveId, void 0);
|
|
141
|
+
}
|
|
142
|
+
}, (error) => {
|
|
143
|
+
const entry = entryOf(store, driveId);
|
|
144
|
+
if (entry?.loading !== loading) return;
|
|
145
|
+
setEntry(store, driveId, {
|
|
146
|
+
...entry,
|
|
147
|
+
loading: void 0,
|
|
148
|
+
error
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
return loading;
|
|
152
|
+
}
|
|
153
|
+
/** A node from the cache, else read through `read.drives.getNode`;
|
|
154
|
+
* undefined when the drive does not hold it. */
|
|
155
|
+
async function getDriveNode(driveId, nodeId, options = {}) {
|
|
156
|
+
const store = options.store ?? getPHStore();
|
|
157
|
+
const current = entryOf(store, driveId);
|
|
158
|
+
if (!options.refresh && current) {
|
|
159
|
+
const cached = current.byId.get(nodeId);
|
|
160
|
+
if (cached || current.loaded === "all") return cached;
|
|
161
|
+
}
|
|
162
|
+
const reader = driveReader(store);
|
|
163
|
+
let node;
|
|
164
|
+
try {
|
|
165
|
+
node = await reader.getNode(driveId, nodeId);
|
|
166
|
+
} catch {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const entry = entryOf(store, driveId);
|
|
170
|
+
const byId = new Map(entry?.byId);
|
|
171
|
+
byId.set(node.id, node);
|
|
172
|
+
setEntry(store, driveId, {
|
|
173
|
+
...entry,
|
|
174
|
+
byId,
|
|
175
|
+
nodes: entry?.nodes && replaceNode(entry.nodes, node),
|
|
176
|
+
loaded: entry?.loaded === "all" ? "all" : "partial"
|
|
177
|
+
});
|
|
178
|
+
return node;
|
|
179
|
+
}
|
|
180
|
+
function replaceNode(nodes, node) {
|
|
181
|
+
const at = nodes.findIndex((n) => n.id === node.id);
|
|
182
|
+
if (at < 0) return [...nodes, node];
|
|
183
|
+
return nodes.map((n, i) => i === at ? node : n);
|
|
184
|
+
}
|
|
185
|
+
/** A node from the cache only, without reading; for synchronous callers. */
|
|
186
|
+
function peekDriveNode(driveId, nodeId, store = getPHStore()) {
|
|
187
|
+
return entryOf(store, driveId)?.byId.get(nodeId);
|
|
188
|
+
}
|
|
189
|
+
/** Drops a drive's cached nodes; while a hook shows them, they reload and
|
|
190
|
+
* the old nodes stay visible until the new listing lands. */
|
|
191
|
+
function invalidateDriveNodes(driveId, store = getPHStore()) {
|
|
192
|
+
const current = entryOf(store, driveId);
|
|
193
|
+
if (!current) return;
|
|
194
|
+
if (current.loading) {
|
|
195
|
+
if (!current.stale) setEntry(store, driveId, {
|
|
196
|
+
...current,
|
|
197
|
+
stale: true
|
|
198
|
+
});
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
if (!mounted.has(driveId)) {
|
|
202
|
+
setEntry(store, driveId, void 0);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
setEntry(store, driveId, {
|
|
206
|
+
byId: current.byId,
|
|
207
|
+
nodes: current.nodes,
|
|
208
|
+
loaded: "partial"
|
|
209
|
+
});
|
|
210
|
+
loadDriveNodes(driveId, { store }).catch((error) => logger.error("Reloading drive nodes failed: @error", error));
|
|
211
|
+
}
|
|
212
|
+
/** Drives this tab has just written to; their next change is read at once. */
|
|
213
|
+
const localDriveWrites = /* @__PURE__ */ new Set();
|
|
214
|
+
/**
|
|
215
|
+
* Notes that this tab wrote to a drive, so the drive change handler re-reads
|
|
216
|
+
* it on the change that follows instead of waiting out its interval: the
|
|
217
|
+
* person who added, renamed or removed a node expects to see it, while a
|
|
218
|
+
* drive being filled by someone else can wait.
|
|
219
|
+
*/
|
|
220
|
+
function markLocalDriveWrite(driveId) {
|
|
221
|
+
localDriveWrites.add(driveId);
|
|
222
|
+
}
|
|
223
|
+
/** Spends a drive's local-write mark; true when one was set. */
|
|
224
|
+
function takeLocalDriveWrite(driveId) {
|
|
225
|
+
return localDriveWrites.delete(driveId);
|
|
226
|
+
}
|
|
227
|
+
/** Takes a node out of a drive's cache after this tab removed it, so the
|
|
228
|
+
* listing drops it at once instead of after the next drive refresh. */
|
|
229
|
+
function dropDriveNode(driveId, nodeId, store = getPHStore()) {
|
|
230
|
+
const entry = entryOf(store, driveId);
|
|
231
|
+
if (!entry?.byId.has(nodeId)) return;
|
|
232
|
+
const byId = new Map(entry.byId);
|
|
233
|
+
byId.delete(nodeId);
|
|
234
|
+
setEntry(store, driveId, {
|
|
235
|
+
...entry,
|
|
236
|
+
byId,
|
|
237
|
+
nodes: entry.nodes?.filter((n) => n.id !== nodeId)
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
function useDriveNodesEntry(driveId) {
|
|
241
|
+
const store = usePHStore() ?? getPHStore();
|
|
242
|
+
const cache = useDriveNodesCache();
|
|
243
|
+
return [store, driveId ? cache?.get(driveId) : void 0];
|
|
244
|
+
}
|
|
245
|
+
/** Every node of a drive, loaded on first use; undefined until loaded. */
|
|
246
|
+
function useDriveNodes(driveId) {
|
|
247
|
+
const [store, entry] = useDriveNodesEntry(driveId);
|
|
248
|
+
const needsLoad = !!driveId && !entry?.loading && !entry?.error && entry?.loaded !== "all";
|
|
249
|
+
useEffect(() => {
|
|
250
|
+
if (!driveId) return;
|
|
251
|
+
return retain(driveId);
|
|
252
|
+
}, [driveId]);
|
|
253
|
+
useEffect(() => {
|
|
254
|
+
if (!driveId || !needsLoad) return;
|
|
255
|
+
loadDriveNodes(driveId, { store }).catch((error) => logger.error("Loading drive nodes failed: @error", error));
|
|
256
|
+
}, [
|
|
257
|
+
driveId,
|
|
258
|
+
needsLoad,
|
|
259
|
+
store
|
|
260
|
+
]);
|
|
261
|
+
return entry?.nodes;
|
|
262
|
+
}
|
|
263
|
+
/** One node of a drive, from the cache or read on its own. */
|
|
264
|
+
function useDriveNode(driveId, nodeId) {
|
|
265
|
+
const [store, entry] = useDriveNodesEntry(driveId);
|
|
266
|
+
const node = nodeId ? entry?.byId.get(nodeId) : void 0;
|
|
267
|
+
const needsFetch = !!driveId && !!nodeId && !node && entry?.loaded !== "all" && !entry?.loading;
|
|
268
|
+
useEffect(() => {
|
|
269
|
+
if (!driveId) return;
|
|
270
|
+
return retain(driveId);
|
|
271
|
+
}, [driveId]);
|
|
272
|
+
useEffect(() => {
|
|
273
|
+
if (!driveId || !nodeId || !needsFetch) return;
|
|
274
|
+
getDriveNode(driveId, nodeId, { store }).catch((error) => logger.error("Loading drive node failed: @error", error));
|
|
275
|
+
}, [
|
|
276
|
+
driveId,
|
|
277
|
+
nodeId,
|
|
278
|
+
needsFetch,
|
|
279
|
+
store
|
|
280
|
+
]);
|
|
281
|
+
return node;
|
|
282
|
+
}
|
|
283
|
+
//#endregion
|
|
284
|
+
//#region src/routing/initial-sync.ts
|
|
285
|
+
/** The store's sync remotes; none before the reactor is ready. */
|
|
286
|
+
function listSyncRemotes(store) {
|
|
287
|
+
try {
|
|
288
|
+
return store?.reactorClientModule?.reactorModule?.syncModule?.syncManager?.list() ?? [];
|
|
289
|
+
} catch {
|
|
290
|
+
return [];
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function isFirstPullInFlight(remote) {
|
|
294
|
+
try {
|
|
295
|
+
const { state, receivingPages, lastSuccessUtcMs, failureCount } = remote.channel.getConnectionState();
|
|
296
|
+
if (state === "connected") return receivingPages;
|
|
297
|
+
if (state === "reconnecting") return !lastSuccessUtcMs && !failureCount;
|
|
298
|
+
return state === "connecting" && (receivingPages || !lastSuccessUtcMs);
|
|
299
|
+
} catch {
|
|
300
|
+
return false;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
/** Whether a remote, or one syncing `driveId` when given, is in its first pull. */
|
|
304
|
+
function isInitialSyncInFlight(store, driveId) {
|
|
305
|
+
return listSyncRemotes(store).some((remote) => (driveId === void 0 || remote.meta.collectionId.driveId === driveId) && isFirstPullInFlight(remote));
|
|
306
|
+
}
|
|
307
|
+
//#endregion
|
|
308
|
+
//#region src/hooks/drive-context.tsx
|
|
309
|
+
const DriveContext = createContext(void 0);
|
|
310
|
+
/** Hosts render a drive app inside this; `useSelectedDrive`, `useSelectedNode`
|
|
311
|
+
* and `useSelectedFolder` below read it, and opening nodes calls its `open`. */
|
|
312
|
+
function DriveProvider(props) {
|
|
313
|
+
return /* @__PURE__ */ jsx(DriveContext.Provider, {
|
|
314
|
+
value: props.value,
|
|
315
|
+
children: props.children
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
/** The nearest drive app's drive, or undefined outside one. */
|
|
319
|
+
function useDriveContext() {
|
|
320
|
+
return useContext(DriveContext);
|
|
321
|
+
}
|
|
322
|
+
//#endregion
|
|
323
|
+
//#region src/hooks/drives.ts
|
|
324
|
+
const drivesEventFunctions = makePHEventFunctions("drives");
|
|
325
|
+
/** Returns all of the drives in the reactor */
|
|
326
|
+
const useDrives = drivesEventFunctions.useValue;
|
|
327
|
+
/** Sets the drives in the reactor */
|
|
328
|
+
const setDrives = drivesEventFunctions.setValue;
|
|
329
|
+
/** Adds an event handler for the drives */
|
|
330
|
+
const addDrivesEventHandler = drivesEventFunctions.addEventHandler;
|
|
331
|
+
//#endregion
|
|
332
|
+
//#region src/hooks/set-selected-node.ts
|
|
333
|
+
const selectedNodeIdEventFunctions = makePHEventFunctions("selectedNodeId");
|
|
334
|
+
const useStoreSelectedNodeId = selectedNodeIdEventFunctions.useValue;
|
|
335
|
+
/** The selected node id: the drive app's open node, else the app's selection. */
|
|
336
|
+
function useSelectedNodeId() {
|
|
337
|
+
const context = useDriveContext();
|
|
338
|
+
const selectedNodeId = useStoreSelectedNodeId();
|
|
339
|
+
return context ? context.nodeId : selectedNodeId;
|
|
340
|
+
}
|
|
341
|
+
/** Sets the selected node id without touching the URL. */
|
|
342
|
+
const setSelectedNodeId = selectedNodeIdEventFunctions.setValue;
|
|
343
|
+
/** @deprecated `ph:setSelectedNodeId` bypasses the URL; use `setSelectedNode`. */
|
|
344
|
+
const addSelectedNodeIdEventHandler = selectedNodeIdEventFunctions.addEventHandler;
|
|
345
|
+
function decodeSlug(slug) {
|
|
346
|
+
try {
|
|
347
|
+
return decodeURIComponent(slug);
|
|
348
|
+
} catch {
|
|
349
|
+
return slug;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
function openDriveSlug(store, pathname) {
|
|
353
|
+
const selected = store?.drives?.find((d) => d.header.id === store.selectedDriveId);
|
|
354
|
+
if (selected) return makeDriveSlug(selected);
|
|
355
|
+
const driveSlug = extractDriveSlugFromPath(pathname);
|
|
356
|
+
return driveSlug ? decodeSlug(driveSlug) : void 0;
|
|
357
|
+
}
|
|
358
|
+
function nodeTarget(nodeSlug, drive) {
|
|
359
|
+
const driveSlug = drive ? makeDriveSlug(drive) : openDriveSlug(getPHStore(), getCurrentPathname());
|
|
360
|
+
if (!driveSlug) return void 0;
|
|
361
|
+
return {
|
|
362
|
+
driveSlug,
|
|
363
|
+
nodeSlug: nodeSlug || void 0
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
const toSlug = (node) => typeof node === "string" ? node : makeNodeSlug(node);
|
|
367
|
+
/** Selects a node in `drive`, else in the app's open drive. */
|
|
368
|
+
function selectNode(node, options, drive) {
|
|
369
|
+
const nodeSlug = toSlug(node);
|
|
370
|
+
if (!hasHostNavigation()) setSelectedNodeId(extractNodeIdFromSlug(nodeSlug));
|
|
371
|
+
const target = nodeTarget(nodeSlug, drive);
|
|
372
|
+
if (target) openTarget(target, options);
|
|
373
|
+
}
|
|
374
|
+
/** Sets the selected node (file or folder) of the app's store; `search` sets
|
|
375
|
+
* the params it opens with. Inside a drive app, use `useSetSelectedNode`. */
|
|
376
|
+
function setSelectedNode(node, options) {
|
|
377
|
+
selectNode(node, options);
|
|
378
|
+
}
|
|
379
|
+
function findNode(drive, node, store) {
|
|
380
|
+
if (typeof node !== "string") return node;
|
|
381
|
+
const id = extractNodeIdFromSlug(node);
|
|
382
|
+
return id ? peekDriveNode(drive.header.id, id, store) : void 0;
|
|
383
|
+
}
|
|
384
|
+
/** Opens a node: through the drive app's `open` when it has one, else the
|
|
385
|
+
* app's navigation in the drive app's drive. */
|
|
386
|
+
function useSetSelectedNode() {
|
|
387
|
+
const context = useDriveContext();
|
|
388
|
+
const store = usePHStore() ?? getPHStore();
|
|
389
|
+
return useCallback((node, options) => {
|
|
390
|
+
if (context?.open) {
|
|
391
|
+
context.open(findNode(context.drive, node, store), options);
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
selectNode(node, options, context?.drive);
|
|
395
|
+
}, [context, store]);
|
|
396
|
+
}
|
|
397
|
+
/** Opens a node, or with `undefined` its drive. */
|
|
398
|
+
const useOpenNode = useSetSelectedNode;
|
|
399
|
+
/** Where a node of `drive`, else of the open drive, navigates to. */
|
|
400
|
+
function getNodeTarget(node, drive) {
|
|
401
|
+
return nodeTarget(makeNodeSlug(node), drive);
|
|
402
|
+
}
|
|
403
|
+
/** Where a node navigates to: in the drive app's drive, else the open drive. */
|
|
404
|
+
function useNodeTarget(node) {
|
|
405
|
+
return getNodeTarget(node, useDriveContext()?.drive);
|
|
406
|
+
}
|
|
407
|
+
/** Warms a node's view before it is opened, e.g. on hover. */
|
|
408
|
+
function preloadNode(node, drive) {
|
|
409
|
+
if (!node) return;
|
|
410
|
+
const target = nodeTarget(makeNodeSlug(node), drive);
|
|
411
|
+
if (target) preloadTarget(target);
|
|
412
|
+
}
|
|
413
|
+
/** `preloadNode` through the drive app's `preload`, if it has one. */
|
|
414
|
+
function usePreloadNode() {
|
|
415
|
+
const context = useDriveContext();
|
|
416
|
+
return useCallback((node) => {
|
|
417
|
+
if (context?.preload) context.preload(node);
|
|
418
|
+
else if (!context?.open) preloadNode(node, context?.drive);
|
|
419
|
+
}, [context]);
|
|
420
|
+
}
|
|
421
|
+
function addResetSelectedNodeEventHandler() {
|
|
422
|
+
subscribeToPHValue("selectedDriveId", () => {
|
|
423
|
+
setSelectedNodeId(void 0);
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region src/hooks/selected-drive.ts
|
|
428
|
+
const selectedDriveIdEventFunctions = makePHEventFunctions("selectedDriveId");
|
|
429
|
+
const useStoreSelectedDriveId = selectedDriveIdEventFunctions.useValue;
|
|
430
|
+
/** Returns the selected drive id: the drive app's drive, else the app's selection. */
|
|
431
|
+
function useSelectedDriveId() {
|
|
432
|
+
const context = useDriveContext();
|
|
433
|
+
const selectedDriveId = useStoreSelectedDriveId();
|
|
434
|
+
return context ? context.drive.header.id : selectedDriveId;
|
|
435
|
+
}
|
|
436
|
+
/** Sets the selected drive id */
|
|
437
|
+
const setSelectedDriveId = selectedDriveIdEventFunctions.setValue;
|
|
438
|
+
/** Adds an event handler for the selected drive id
|
|
439
|
+
* @deprecated `ph:setSelectedDriveId` bypasses the URL; use `setSelectedDrive`. */
|
|
440
|
+
const addSelectedDriveIdEventHandler = selectedDriveIdEventFunctions.addEventHandler;
|
|
441
|
+
/** Returns the selected drive */
|
|
442
|
+
function useSelectedDrive() {
|
|
443
|
+
const drive = useSelectedDriveSafe();
|
|
444
|
+
if (!drive[0]) throw new Error("There is no drive selected. Did you mean to call 'useSelectedDriveSafe'?");
|
|
445
|
+
return drive;
|
|
446
|
+
}
|
|
447
|
+
/** Returns the selected drive, or undefined if no drive is selected */
|
|
448
|
+
function useSelectedDriveSafe() {
|
|
449
|
+
const context = useDriveContext();
|
|
450
|
+
const selectedDriveId = useStoreSelectedDriveId();
|
|
451
|
+
const drives = useDrives();
|
|
452
|
+
const selectedDrive = context ? void 0 : drives?.find((drive) => drive.header.id === selectedDriveId);
|
|
453
|
+
const [drive, dispatch] = useDispatch(selectedDrive);
|
|
454
|
+
if (context) return [context.drive, context.dispatch];
|
|
455
|
+
if (!selectedDrive) return [void 0, void 0];
|
|
456
|
+
return [drive, dispatch];
|
|
457
|
+
}
|
|
458
|
+
/** Selects a drive in the app's store. */
|
|
459
|
+
function setSelectedDrive(driveOrDriveSlug) {
|
|
460
|
+
selectDrive(driveOrDriveSlug);
|
|
461
|
+
}
|
|
462
|
+
/** `setSelectedDrive`, as a hook. */
|
|
463
|
+
function useSetSelectedDrive() {
|
|
464
|
+
return useCallback((drive) => selectDrive(drive), []);
|
|
465
|
+
}
|
|
466
|
+
/** Selects a drive in the app's store. */
|
|
467
|
+
function selectDrive(driveOrDriveSlug) {
|
|
468
|
+
const driveSlug = typeof driveOrDriveSlug === "string" ? driveOrDriveSlug : driveOrDriveSlug && makeDriveSlug(driveOrDriveSlug);
|
|
469
|
+
if (hasHostNavigation()) {
|
|
470
|
+
cancelPendingDriveSelection();
|
|
471
|
+
openTarget(driveSlug ? { driveSlug } : void 0);
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
const drives = getPHStore()?.drives;
|
|
475
|
+
const driveId = (typeof driveOrDriveSlug === "object" && driveOrDriveSlug !== null ? driveOrDriveSlug : findDriveBySlug(drives, driveSlug))?.header.id;
|
|
476
|
+
if (!driveId && driveSlug && extractDriveSlugFromPath(getCurrentPathname()) === driveSlug) {
|
|
477
|
+
if (getPHStore()?.selectedDriveId) setSelectedDriveId(void 0);
|
|
478
|
+
deferDriveSelection(driveSlug);
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
cancelPendingDriveSelection();
|
|
482
|
+
setSelectedDriveId(driveId);
|
|
483
|
+
openTarget(driveId && driveSlug ? { driveSlug } : void 0);
|
|
484
|
+
}
|
|
485
|
+
/** Warms a drive's view before it is opened, e.g. on hover. */
|
|
486
|
+
function preloadDrive(drive) {
|
|
487
|
+
if (drive) preloadTarget({ driveSlug: makeDriveSlug(drive) });
|
|
488
|
+
}
|
|
489
|
+
/** `preloadDrive`, as a hook. */
|
|
490
|
+
function usePreloadDrive() {
|
|
491
|
+
return useCallback((drive) => preloadDrive(drive), []);
|
|
492
|
+
}
|
|
493
|
+
const DEFERRED_DRIVE_TICK_MS = 2e3;
|
|
494
|
+
const DEFERRED_DRIVE_MAX_WAIT_MS = 15e3;
|
|
495
|
+
let unsubscribePending;
|
|
496
|
+
let pendingTimeout;
|
|
497
|
+
function cancelPendingDriveSelection() {
|
|
498
|
+
if (unsubscribePending) {
|
|
499
|
+
unsubscribePending();
|
|
500
|
+
unsubscribePending = void 0;
|
|
501
|
+
}
|
|
502
|
+
if (pendingTimeout) {
|
|
503
|
+
clearTimeout(pendingTimeout);
|
|
504
|
+
pendingTimeout = void 0;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
function deferDriveSelection(driveSlug) {
|
|
508
|
+
cancelPendingDriveSelection();
|
|
509
|
+
const nodeSlug = extractNodeSlugFromPath(getCurrentPathname());
|
|
510
|
+
const handler = () => {
|
|
511
|
+
if (!findDriveBySlug(getPHStore()?.drives, driveSlug)) return;
|
|
512
|
+
cancelPendingDriveSelection();
|
|
513
|
+
selectDrive(driveSlug);
|
|
514
|
+
selectNode(nodeSlug);
|
|
515
|
+
};
|
|
516
|
+
unsubscribePending = subscribeToPHValue("drives", handler);
|
|
517
|
+
const deadline = Date.now() + DEFERRED_DRIVE_MAX_WAIT_MS;
|
|
518
|
+
const scheduleTick = () => {
|
|
519
|
+
pendingTimeout = setTimeout(() => {
|
|
520
|
+
if (Date.now() < deadline && isInitialSyncInFlight(getPHStore())) {
|
|
521
|
+
scheduleTick();
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
cancelPendingDriveSelection();
|
|
525
|
+
openTarget(void 0);
|
|
526
|
+
}, DEFERRED_DRIVE_TICK_MS);
|
|
527
|
+
};
|
|
528
|
+
scheduleTick();
|
|
529
|
+
}
|
|
530
|
+
//#endregion
|
|
531
|
+
//#region src/hooks/vetra-packages.ts
|
|
532
|
+
const vetraPackageManagerFunctions = makePHEventFunctions("vetraPackageManager");
|
|
533
|
+
const useVetraPackageManager = vetraPackageManagerFunctions.useValue;
|
|
534
|
+
const EMPTY_VETRA_PACKAGES = [];
|
|
535
|
+
const noPackageManagerUnsubscribe = () => {};
|
|
536
|
+
/**
|
|
537
|
+
* Returns all of the Vetra packages loaded by the Connect instance.
|
|
538
|
+
*
|
|
539
|
+
* The snapshot and subscription must keep stable identity while no package
|
|
540
|
+
* manager is registered: `useSyncExternalStore` loops when the snapshot
|
|
541
|
+
* changes on every read, which a fresh `[]` does.
|
|
542
|
+
*/
|
|
543
|
+
const useVetraPackages = () => {
|
|
544
|
+
const packageManager = useVetraPackageManager();
|
|
545
|
+
const getPackages = () => packageManager?.packages ?? EMPTY_VETRA_PACKAGES;
|
|
546
|
+
return useSyncExternalStore((cb) => packageManager ? packageManager.subscribe(cb) : noPackageManagerUnsubscribe, getPackages, getPackages);
|
|
547
|
+
};
|
|
548
|
+
/** Adds the Vetra package manager event handler */
|
|
549
|
+
const addVetraPackageManagerEventHandler = vetraPackageManagerFunctions.addEventHandler;
|
|
550
|
+
/**
|
|
551
|
+
* Non-react access to the Vetra package manager: calls `callback` once a
|
|
552
|
+
* manager is available - immediately when already set, otherwise when
|
|
553
|
+
* `setVetraPackageManager` publishes one. Returns an unsubscribe. The worker
|
|
554
|
+
* wiring uses this to forward package updates from plain boot code.
|
|
555
|
+
*/
|
|
556
|
+
function onVetraPackageManager(callback) {
|
|
557
|
+
let delivered;
|
|
558
|
+
const deliver = () => {
|
|
559
|
+
const packageManager = vetraPackageManagerFunctions.getSnapshot();
|
|
560
|
+
if (!packageManager || packageManager === delivered) return;
|
|
561
|
+
delivered = packageManager;
|
|
562
|
+
callback(packageManager);
|
|
563
|
+
};
|
|
564
|
+
const unsubscribe = vetraPackageManagerFunctions.subscribeToValue(deliver);
|
|
565
|
+
deliver();
|
|
566
|
+
return unsubscribe;
|
|
567
|
+
}
|
|
568
|
+
/** Sets the Vetra package manager and registers its packages */
|
|
569
|
+
function setVetraPackageManager(packageManager) {
|
|
570
|
+
vetraPackageManagerFunctions.setValue(packageManager);
|
|
571
|
+
updateReactorClientDocumentModels(packageManager.packages);
|
|
572
|
+
updateReactorClientUpgradeManifests(packageManager.packages);
|
|
573
|
+
packageManager.subscribe(({ packages }) => {
|
|
574
|
+
updateReactorClientDocumentModels(packages);
|
|
575
|
+
updateReactorClientUpgradeManifests(packages);
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
function updateReactorClientDocumentModels(packages) {
|
|
579
|
+
const documentModelModules = packages.flatMap((pkg) => pkg.documentModels).filter((module, index, modules) => modules.findIndex((m) => m.documentModel.global.id === module.documentModel.global.id && (m.version ?? 1) === (module.version ?? 1)) === index);
|
|
580
|
+
const registry = getPHStore()?.reactorClientModule?.reactorModule?.documentModelRegistry;
|
|
581
|
+
if (!registry || documentModelModules.length === 0) return;
|
|
582
|
+
const results = registry.registerModules(...documentModelModules);
|
|
583
|
+
const duplicateTypes = /* @__PURE__ */ new Set();
|
|
584
|
+
for (const result of results) if (result.status === "error") {
|
|
585
|
+
if (isDuplicateModuleError(result.error)) duplicateTypes.add(result.item.documentModel.global.id);
|
|
586
|
+
else console.error("Failed to register document model module:", result.error);
|
|
587
|
+
}
|
|
588
|
+
if (duplicateTypes.size > 0) {
|
|
589
|
+
registry.unregisterModules(...duplicateTypes);
|
|
590
|
+
registry.registerModules(...documentModelModules.filter((module) => duplicateTypes.has(module.documentModel.global.id)));
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
function updateReactorClientUpgradeManifests(packages) {
|
|
594
|
+
const upgradeManifests = packages.flatMap((pkg) => pkg.upgradeManifests).filter((u) => u !== void 0);
|
|
595
|
+
const registry = getPHStore()?.reactorClientModule?.reactorModule?.documentModelRegistry;
|
|
596
|
+
if (!registry || upgradeManifests.length === 0) return;
|
|
597
|
+
const results = registry.registerUpgradeManifests(...upgradeManifests);
|
|
598
|
+
const duplicates = [];
|
|
599
|
+
for (const result of results) if (result.status === "error") {
|
|
600
|
+
if (isDuplicateManifestError(result.error)) duplicates.push(result);
|
|
601
|
+
else console.error("Failed to register upgrade manifest:", result.error);
|
|
602
|
+
}
|
|
603
|
+
if (duplicates.length > 0) {
|
|
604
|
+
const duplicateTypes = duplicates.map((r) => r.item.documentType).filter((t) => !!t);
|
|
605
|
+
registry.unregisterUpgradeManifests(...duplicateTypes);
|
|
606
|
+
registry.registerUpgradeManifests(...duplicates.map((r) => r.item));
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
//#endregion
|
|
610
|
+
//#region src/hooks/document-model-modules.ts
|
|
611
|
+
function useDocumentModelModules() {
|
|
612
|
+
return useVetraPackages().flatMap((pkg) => pkg.documentModels).filter((module, index, modules) => modules.findIndex((m) => m.documentModel.global.id === module.documentModel.global.id && m.version === module.version) === index);
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* Resolves a document model module by document type, mirroring the registry's
|
|
616
|
+
* semantics (`IDocumentModelRegistry.getModule`): with `version` omitted the
|
|
617
|
+
* LATEST version of the type wins (`version ?? 1` as each module's default),
|
|
618
|
+
* with `version` given only an exact match is returned. The reactor resolves
|
|
619
|
+
* modules the same way when a document is created, so metadata read through
|
|
620
|
+
* this hook and the version a creation actually uses cannot disagree.
|
|
621
|
+
*/
|
|
622
|
+
function useDocumentModelModuleById(id, version) {
|
|
623
|
+
const documentModelModules = useDocumentModelModules();
|
|
624
|
+
if (!id || !documentModelModules) return void 0;
|
|
625
|
+
let latestModule;
|
|
626
|
+
let latestVersion = -1;
|
|
627
|
+
for (const module of documentModelModules) {
|
|
628
|
+
if (module.documentModel.global.id !== id) continue;
|
|
629
|
+
const moduleVersion = module.version ?? 1;
|
|
630
|
+
if (version !== void 0) {
|
|
631
|
+
if (moduleVersion === version) return module;
|
|
632
|
+
continue;
|
|
633
|
+
}
|
|
634
|
+
if (moduleVersion > latestVersion) {
|
|
635
|
+
latestVersion = moduleVersion;
|
|
636
|
+
latestModule = module;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
return latestModule;
|
|
640
|
+
}
|
|
641
|
+
//#endregion
|
|
642
|
+
export { makeAuthMiddleware as $, addDrivesEventHandler as A, invalidateDriveNodes as B, setSelectedNode as C, usePreloadNode as D, useOpenNode as E, isInitialSyncInFlight as F, useDriveNode as G, markLocalDriveWrite as H, listSyncRemotes as I, isFileNodeKind as J, useDriveNodes as K, addDriveNodesEventHandler as L, useDrives as M, DriveProvider as N, useSelectedNodeId as O, useDriveContext as P, ambientRenownTokenProvider as Q, dropDriveNode as R, selectNode as S, useNodeTarget as T, peekDriveNode as U, loadDriveNodes as V, takeLocalDriveWrite as W, listAllDriveNodes as X, isFolderNodeKind as Y, sortNodesByName as Z, useSetSelectedDrive as _, setVetraPackageManager as a, getNodeTarget as b, addSelectedDriveIdEventHandler as c, setSelectedDrive as d, setSelectedDriveId as f, useSelectedDriveSafe as g, useSelectedDriveId as h, onVetraPackageManager as i, setDrives as j, useSetSelectedNode as k, preloadDrive as l, useSelectedDrive as m, useDocumentModelModules as n, useVetraPackageManager as o, usePreloadDrive as p, useDriveNodesCache as q, addVetraPackageManagerEventHandler as r, useVetraPackages as s, useDocumentModelModuleById as t, selectDrive as u, addResetSelectedNodeEventHandler as v, setSelectedNodeId as w, preloadNode as x, addSelectedNodeIdEventHandler as y, getDriveNode as z };
|
|
643
|
+
|
|
644
|
+
//# sourceMappingURL=document-model-modules-ChmfyIxT.js.map
|