@powerhousedao/reactor-browser 6.0.0-dev.91 → 6.0.0-dev.92
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/src/analytics.js +80 -38
- package/dist/src/connect.js +30 -9
- package/dist/src/index.js +323 -305
- package/package.json +7 -7
package/dist/src/analytics.js
CHANGED
|
@@ -4,39 +4,60 @@ var __defProp = Object.defineProperty;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
7
12
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
8
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
22
|
for (let key of __getOwnPropNames(mod))
|
|
11
23
|
if (!__hasOwnProp.call(to, key))
|
|
12
24
|
__defProp(to, key, {
|
|
13
|
-
get: (
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
14
26
|
enumerable: true
|
|
15
27
|
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
16
30
|
return to;
|
|
17
31
|
};
|
|
18
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
19
32
|
var __toCommonJS = (from) => {
|
|
20
|
-
var entry = __moduleCache.get(from), desc;
|
|
33
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
21
34
|
if (entry)
|
|
22
35
|
return entry;
|
|
23
36
|
entry = __defProp({}, "__esModule", { value: true });
|
|
24
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
38
|
+
for (var key of __getOwnPropNames(from))
|
|
39
|
+
if (!__hasOwnProp.call(entry, key))
|
|
40
|
+
__defProp(entry, key, {
|
|
41
|
+
get: __accessProp.bind(from, key),
|
|
42
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
43
|
+
});
|
|
44
|
+
}
|
|
29
45
|
__moduleCache.set(from, entry);
|
|
30
46
|
return entry;
|
|
31
47
|
};
|
|
48
|
+
var __moduleCache;
|
|
32
49
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
50
|
+
var __returnValue = (v) => v;
|
|
51
|
+
function __exportSetter(name, newValue) {
|
|
52
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
53
|
+
}
|
|
33
54
|
var __export = (target, all) => {
|
|
34
55
|
for (var name in all)
|
|
35
56
|
__defProp(target, name, {
|
|
36
57
|
get: all[name],
|
|
37
58
|
enumerable: true,
|
|
38
59
|
configurable: true,
|
|
39
|
-
set: (
|
|
60
|
+
set: __exportSetter.bind(all, name)
|
|
40
61
|
});
|
|
41
62
|
};
|
|
42
63
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -5571,39 +5592,60 @@ var __defProp2 = Object.defineProperty;
|
|
|
5571
5592
|
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
5572
5593
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
5573
5594
|
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
5595
|
+
function __accessProp2(key) {
|
|
5596
|
+
return this[key];
|
|
5597
|
+
}
|
|
5598
|
+
var __toESMCache_node2;
|
|
5599
|
+
var __toESMCache_esm2;
|
|
5574
5600
|
var __toESM2 = (mod, isNodeMode, target) => {
|
|
5601
|
+
var canCache = mod != null && typeof mod === "object";
|
|
5602
|
+
if (canCache) {
|
|
5603
|
+
var cache = isNodeMode ? __toESMCache_node2 ??= new WeakMap : __toESMCache_esm2 ??= new WeakMap;
|
|
5604
|
+
var cached = cache.get(mod);
|
|
5605
|
+
if (cached)
|
|
5606
|
+
return cached;
|
|
5607
|
+
}
|
|
5575
5608
|
target = mod != null ? __create2(__getProtoOf2(mod)) : {};
|
|
5576
5609
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target;
|
|
5577
5610
|
for (let key of __getOwnPropNames2(mod))
|
|
5578
5611
|
if (!__hasOwnProp2.call(to, key))
|
|
5579
5612
|
__defProp2(to, key, {
|
|
5580
|
-
get: (
|
|
5613
|
+
get: __accessProp2.bind(mod, key),
|
|
5581
5614
|
enumerable: true
|
|
5582
5615
|
});
|
|
5616
|
+
if (canCache)
|
|
5617
|
+
cache.set(mod, to);
|
|
5583
5618
|
return to;
|
|
5584
5619
|
};
|
|
5585
|
-
var __moduleCache2 = /* @__PURE__ */ new WeakMap;
|
|
5586
5620
|
var __toCommonJS2 = (from) => {
|
|
5587
|
-
var entry = __moduleCache2.get(from), desc;
|
|
5621
|
+
var entry = (__moduleCache2 ??= new WeakMap).get(from), desc;
|
|
5588
5622
|
if (entry)
|
|
5589
5623
|
return entry;
|
|
5590
5624
|
entry = __defProp2({}, "__esModule", { value: true });
|
|
5591
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5625
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
5626
|
+
for (var key of __getOwnPropNames2(from))
|
|
5627
|
+
if (!__hasOwnProp2.call(entry, key))
|
|
5628
|
+
__defProp2(entry, key, {
|
|
5629
|
+
get: __accessProp2.bind(from, key),
|
|
5630
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
5631
|
+
});
|
|
5632
|
+
}
|
|
5596
5633
|
__moduleCache2.set(from, entry);
|
|
5597
5634
|
return entry;
|
|
5598
5635
|
};
|
|
5636
|
+
var __moduleCache2;
|
|
5599
5637
|
var __commonJS2 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
5638
|
+
var __returnValue2 = (v) => v;
|
|
5639
|
+
function __exportSetter2(name, newValue) {
|
|
5640
|
+
this[name] = __returnValue2.bind(null, newValue);
|
|
5641
|
+
}
|
|
5600
5642
|
var __export2 = (target, all) => {
|
|
5601
5643
|
for (var name in all)
|
|
5602
5644
|
__defProp2(target, name, {
|
|
5603
5645
|
get: all[name],
|
|
5604
5646
|
enumerable: true,
|
|
5605
5647
|
configurable: true,
|
|
5606
|
-
set: (
|
|
5648
|
+
set: __exportSetter2.bind(all, name)
|
|
5607
5649
|
});
|
|
5608
5650
|
};
|
|
5609
5651
|
var __esm2 = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -61986,6 +62028,9 @@ var QueryClient = class {
|
|
|
61986
62028
|
this.#mutationCache.clear();
|
|
61987
62029
|
}
|
|
61988
62030
|
};
|
|
62031
|
+
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
62032
|
+
import * as React5 from "react";
|
|
62033
|
+
|
|
61989
62034
|
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
61990
62035
|
import * as React from "react";
|
|
61991
62036
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -62014,15 +62059,8 @@ var QueryClientProvider = ({
|
|
|
62014
62059
|
return /* @__PURE__ */ jsx(QueryClientContext.Provider, { value: client, children });
|
|
62015
62060
|
};
|
|
62016
62061
|
|
|
62017
|
-
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
62018
|
-
import * as React2 from "react";
|
|
62019
|
-
"use client";
|
|
62020
|
-
var IsRestoringContext = React2.createContext(false);
|
|
62021
|
-
var useIsRestoring = () => React2.useContext(IsRestoringContext);
|
|
62022
|
-
var IsRestoringProvider = IsRestoringContext.Provider;
|
|
62023
|
-
|
|
62024
62062
|
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
62025
|
-
import * as
|
|
62063
|
+
import * as React2 from "react";
|
|
62026
62064
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
62027
62065
|
"use client";
|
|
62028
62066
|
function createValue() {
|
|
@@ -62039,11 +62077,11 @@ function createValue() {
|
|
|
62039
62077
|
}
|
|
62040
62078
|
};
|
|
62041
62079
|
}
|
|
62042
|
-
var QueryErrorResetBoundaryContext =
|
|
62043
|
-
var useQueryErrorResetBoundary = () =>
|
|
62080
|
+
var QueryErrorResetBoundaryContext = React2.createContext(createValue());
|
|
62081
|
+
var useQueryErrorResetBoundary = () => React2.useContext(QueryErrorResetBoundaryContext);
|
|
62044
62082
|
|
|
62045
62083
|
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
|
|
62046
|
-
import * as
|
|
62084
|
+
import * as React3 from "react";
|
|
62047
62085
|
"use client";
|
|
62048
62086
|
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
|
62049
62087
|
const throwOnError = query?.state.error && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;
|
|
@@ -62054,7 +62092,7 @@ var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
|
|
62054
62092
|
}
|
|
62055
62093
|
};
|
|
62056
62094
|
var useClearResetErrorBoundary = (errorResetBoundary) => {
|
|
62057
|
-
|
|
62095
|
+
React3.useEffect(() => {
|
|
62058
62096
|
errorResetBoundary.clearReset();
|
|
62059
62097
|
}, [errorResetBoundary]);
|
|
62060
62098
|
};
|
|
@@ -62068,6 +62106,13 @@ var getHasError = ({
|
|
|
62068
62106
|
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === undefined || shouldThrowError(throwOnError, [result.error, query]));
|
|
62069
62107
|
};
|
|
62070
62108
|
|
|
62109
|
+
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
62110
|
+
import * as React4 from "react";
|
|
62111
|
+
"use client";
|
|
62112
|
+
var IsRestoringContext = React4.createContext(false);
|
|
62113
|
+
var useIsRestoring = () => React4.useContext(IsRestoringContext);
|
|
62114
|
+
var IsRestoringProvider = IsRestoringContext.Provider;
|
|
62115
|
+
|
|
62071
62116
|
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/suspense.js
|
|
62072
62117
|
var defaultThrowOnError = (_error, query) => query.state.data === undefined;
|
|
62073
62118
|
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
@@ -62088,7 +62133,6 @@ var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observ
|
|
|
62088
62133
|
});
|
|
62089
62134
|
|
|
62090
62135
|
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
62091
|
-
import * as React5 from "react";
|
|
62092
62136
|
"use client";
|
|
62093
62137
|
function useBaseQuery(options, Observer, queryClient) {
|
|
62094
62138
|
if (true) {
|
|
@@ -62167,7 +62211,6 @@ function useSuspenseQuery(options, queryClient) {
|
|
|
62167
62211
|
placeholderData: undefined
|
|
62168
62212
|
}, QueryObserver, queryClient);
|
|
62169
62213
|
}
|
|
62170
|
-
|
|
62171
62214
|
// ../../node_modules/.pnpm/@tanstack+react-query@5.90.21_react@19.2.4/node_modules/@tanstack/react-query/build/modern/useMutation.js
|
|
62172
62215
|
import * as React6 from "react";
|
|
62173
62216
|
"use client";
|
|
@@ -62186,7 +62229,6 @@ function useMutation(options, queryClient) {
|
|
|
62186
62229
|
}
|
|
62187
62230
|
return { ...result, mutate, mutateAsync: result.mutate };
|
|
62188
62231
|
}
|
|
62189
|
-
|
|
62190
62232
|
// src/analytics/context.tsx
|
|
62191
62233
|
import { childLogger } from "document-drive";
|
|
62192
62234
|
import { useEffect as useEffect5, useMemo } from "react";
|
|
@@ -62366,12 +62408,12 @@ function useAnalyticsEngineAsync() {
|
|
|
62366
62408
|
init_src();
|
|
62367
62409
|
import { useEffect as useEffect6 } from "react";
|
|
62368
62410
|
function useAnalyticsQueryWrapper(options) {
|
|
62369
|
-
const { queryFn, ...
|
|
62411
|
+
const { queryFn, ...queryOptions2 } = options;
|
|
62370
62412
|
const { data: store } = useAnalyticsStoreAsync();
|
|
62371
62413
|
const { data: engine } = useAnalyticsEngineAsync();
|
|
62372
|
-
const enabled = "enabled" in
|
|
62414
|
+
const enabled = "enabled" in queryOptions2 ? queryOptions2.enabled : !!store && !!engine;
|
|
62373
62415
|
return useQuery({
|
|
62374
|
-
...
|
|
62416
|
+
...queryOptions2,
|
|
62375
62417
|
enabled,
|
|
62376
62418
|
queryFn: async () => {
|
|
62377
62419
|
if (!store || !engine) {
|
|
@@ -62382,10 +62424,10 @@ function useAnalyticsQueryWrapper(options) {
|
|
|
62382
62424
|
});
|
|
62383
62425
|
}
|
|
62384
62426
|
function useAnalyticsMutationWrapper(options) {
|
|
62385
|
-
const { mutationFn, ...
|
|
62427
|
+
const { mutationFn, ...mutationOptions2 } = options;
|
|
62386
62428
|
const storeOptions = useAnalyticsStoreOptions();
|
|
62387
62429
|
return useMutation({
|
|
62388
|
-
...
|
|
62430
|
+
...mutationOptions2,
|
|
62389
62431
|
mutationFn: async (value) => {
|
|
62390
62432
|
let store = null;
|
|
62391
62433
|
try {
|
package/dist/src/connect.js
CHANGED
|
@@ -4,39 +4,60 @@ var __defProp = Object.defineProperty;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
7
12
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
8
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
22
|
for (let key of __getOwnPropNames(mod))
|
|
11
23
|
if (!__hasOwnProp.call(to, key))
|
|
12
24
|
__defProp(to, key, {
|
|
13
|
-
get: (
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
14
26
|
enumerable: true
|
|
15
27
|
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
16
30
|
return to;
|
|
17
31
|
};
|
|
18
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
19
32
|
var __toCommonJS = (from) => {
|
|
20
|
-
var entry = __moduleCache.get(from), desc;
|
|
33
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
21
34
|
if (entry)
|
|
22
35
|
return entry;
|
|
23
36
|
entry = __defProp({}, "__esModule", { value: true });
|
|
24
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
38
|
+
for (var key of __getOwnPropNames(from))
|
|
39
|
+
if (!__hasOwnProp.call(entry, key))
|
|
40
|
+
__defProp(entry, key, {
|
|
41
|
+
get: __accessProp.bind(from, key),
|
|
42
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
43
|
+
});
|
|
44
|
+
}
|
|
29
45
|
__moduleCache.set(from, entry);
|
|
30
46
|
return entry;
|
|
31
47
|
};
|
|
48
|
+
var __moduleCache;
|
|
32
49
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
50
|
+
var __returnValue = (v) => v;
|
|
51
|
+
function __exportSetter(name, newValue) {
|
|
52
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
53
|
+
}
|
|
33
54
|
var __export = (target, all) => {
|
|
34
55
|
for (var name in all)
|
|
35
56
|
__defProp(target, name, {
|
|
36
57
|
get: all[name],
|
|
37
58
|
enumerable: true,
|
|
38
59
|
configurable: true,
|
|
39
|
-
set: (
|
|
60
|
+
set: __exportSetter.bind(all, name)
|
|
40
61
|
});
|
|
41
62
|
};
|
|
42
63
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
package/dist/src/index.js
CHANGED
|
@@ -4,39 +4,60 @@ var __defProp = Object.defineProperty;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
7
12
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
8
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
22
|
for (let key of __getOwnPropNames(mod))
|
|
11
23
|
if (!__hasOwnProp.call(to, key))
|
|
12
24
|
__defProp(to, key, {
|
|
13
|
-
get: (
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
14
26
|
enumerable: true
|
|
15
27
|
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
16
30
|
return to;
|
|
17
31
|
};
|
|
18
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
19
32
|
var __toCommonJS = (from) => {
|
|
20
|
-
var entry = __moduleCache.get(from), desc;
|
|
33
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
21
34
|
if (entry)
|
|
22
35
|
return entry;
|
|
23
36
|
entry = __defProp({}, "__esModule", { value: true });
|
|
24
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
38
|
+
for (var key of __getOwnPropNames(from))
|
|
39
|
+
if (!__hasOwnProp.call(entry, key))
|
|
40
|
+
__defProp(entry, key, {
|
|
41
|
+
get: __accessProp.bind(from, key),
|
|
42
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
43
|
+
});
|
|
44
|
+
}
|
|
29
45
|
__moduleCache.set(from, entry);
|
|
30
46
|
return entry;
|
|
31
47
|
};
|
|
48
|
+
var __moduleCache;
|
|
32
49
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
50
|
+
var __returnValue = (v) => v;
|
|
51
|
+
function __exportSetter(name, newValue) {
|
|
52
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
53
|
+
}
|
|
33
54
|
var __export = (target, all) => {
|
|
34
55
|
for (var name in all)
|
|
35
56
|
__defProp(target, name, {
|
|
36
57
|
get: all[name],
|
|
37
58
|
enumerable: true,
|
|
38
59
|
configurable: true,
|
|
39
|
-
set: (
|
|
60
|
+
set: __exportSetter.bind(all, name)
|
|
40
61
|
});
|
|
41
62
|
};
|
|
42
63
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -1432,16 +1453,16 @@ var CID, parseCIDtoBytes = (source, base3) => {
|
|
|
1432
1453
|
} else {
|
|
1433
1454
|
return cid;
|
|
1434
1455
|
}
|
|
1435
|
-
}, DAG_PB_CODE = 112, SHA_256_CODE = 18, encodeCID = (
|
|
1436
|
-
const codeOffset = encodingLength(
|
|
1456
|
+
}, DAG_PB_CODE = 112, SHA_256_CODE = 18, encodeCID = (version2, code4, multihash) => {
|
|
1457
|
+
const codeOffset = encodingLength(version2);
|
|
1437
1458
|
const hashOffset = codeOffset + encodingLength(code4);
|
|
1438
1459
|
const bytes = new Uint8Array(hashOffset + multihash.byteLength);
|
|
1439
|
-
encodeTo(
|
|
1460
|
+
encodeTo(version2, bytes, 0);
|
|
1440
1461
|
encodeTo(code4, bytes, codeOffset);
|
|
1441
1462
|
bytes.set(multihash, hashOffset);
|
|
1442
1463
|
return bytes;
|
|
1443
|
-
}, cidSymbol, readonly, hidden,
|
|
1444
|
-
if (range.test(
|
|
1464
|
+
}, cidSymbol, readonly, hidden, version2 = "0.0.0-dev", deprecate = (range, message) => {
|
|
1465
|
+
if (range.test(version2)) {
|
|
1445
1466
|
console.warn(message);
|
|
1446
1467
|
} else {
|
|
1447
1468
|
throw new Error(message);
|
|
@@ -1468,9 +1489,9 @@ var init_cid = __esm(() => {
|
|
|
1468
1489
|
init_base32();
|
|
1469
1490
|
init_bytes();
|
|
1470
1491
|
CID = class CID {
|
|
1471
|
-
constructor(
|
|
1492
|
+
constructor(version2, code4, multihash, bytes) {
|
|
1472
1493
|
this.code = code4;
|
|
1473
|
-
this.version =
|
|
1494
|
+
this.version = version2;
|
|
1474
1495
|
this.multihash = multihash;
|
|
1475
1496
|
this.bytes = bytes;
|
|
1476
1497
|
this.byteOffset = bytes.byteOffset;
|
|
@@ -1524,8 +1545,8 @@ var init_cid = __esm(() => {
|
|
|
1524
1545
|
return other && this.code === other.code && this.version === other.version && equals2(this.multihash, other.multihash);
|
|
1525
1546
|
}
|
|
1526
1547
|
toString(base3) {
|
|
1527
|
-
const { bytes, version, _baseCache } = this;
|
|
1528
|
-
switch (
|
|
1548
|
+
const { bytes, version: version2, _baseCache } = this;
|
|
1549
|
+
switch (version2) {
|
|
1529
1550
|
case 0:
|
|
1530
1551
|
return toStringV0(bytes, _baseCache, base3 || base58btc.encoder);
|
|
1531
1552
|
default:
|
|
@@ -1568,31 +1589,31 @@ var init_cid = __esm(() => {
|
|
|
1568
1589
|
if (value instanceof CID) {
|
|
1569
1590
|
return value;
|
|
1570
1591
|
} else if (value != null && value.asCID === value) {
|
|
1571
|
-
const { version, code: code4, multihash, bytes } = value;
|
|
1572
|
-
return new CID(
|
|
1592
|
+
const { version: version2, code: code4, multihash, bytes } = value;
|
|
1593
|
+
return new CID(version2, code4, multihash, bytes || encodeCID(version2, code4, multihash.bytes));
|
|
1573
1594
|
} else if (value != null && value[cidSymbol] === true) {
|
|
1574
|
-
const { version, multihash, code: code4 } = value;
|
|
1595
|
+
const { version: version2, multihash, code: code4 } = value;
|
|
1575
1596
|
const digest2 = decode5(multihash);
|
|
1576
|
-
return CID.create(
|
|
1597
|
+
return CID.create(version2, code4, digest2);
|
|
1577
1598
|
} else {
|
|
1578
1599
|
return null;
|
|
1579
1600
|
}
|
|
1580
1601
|
}
|
|
1581
|
-
static create(
|
|
1602
|
+
static create(version2, code4, digest2) {
|
|
1582
1603
|
if (typeof code4 !== "number") {
|
|
1583
1604
|
throw new Error("String codecs are no longer supported");
|
|
1584
1605
|
}
|
|
1585
|
-
switch (
|
|
1606
|
+
switch (version2) {
|
|
1586
1607
|
case 0: {
|
|
1587
1608
|
if (code4 !== DAG_PB_CODE) {
|
|
1588
1609
|
throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE}) block encoding`);
|
|
1589
1610
|
} else {
|
|
1590
|
-
return new CID(
|
|
1611
|
+
return new CID(version2, code4, digest2, digest2.bytes);
|
|
1591
1612
|
}
|
|
1592
1613
|
}
|
|
1593
1614
|
case 1: {
|
|
1594
|
-
const bytes = encodeCID(
|
|
1595
|
-
return new CID(
|
|
1615
|
+
const bytes = encodeCID(version2, code4, digest2.bytes);
|
|
1616
|
+
return new CID(version2, code4, digest2, bytes);
|
|
1596
1617
|
}
|
|
1597
1618
|
default: {
|
|
1598
1619
|
throw new Error("Invalid version");
|
|
@@ -1634,16 +1655,16 @@ var init_cid = __esm(() => {
|
|
|
1634
1655
|
offset += length2;
|
|
1635
1656
|
return i;
|
|
1636
1657
|
};
|
|
1637
|
-
let
|
|
1658
|
+
let version2 = next();
|
|
1638
1659
|
let codec = DAG_PB_CODE;
|
|
1639
|
-
if (
|
|
1640
|
-
|
|
1660
|
+
if (version2 === 18) {
|
|
1661
|
+
version2 = 0;
|
|
1641
1662
|
offset = 0;
|
|
1642
|
-
} else if (
|
|
1663
|
+
} else if (version2 === 1) {
|
|
1643
1664
|
codec = next();
|
|
1644
1665
|
}
|
|
1645
|
-
if (
|
|
1646
|
-
throw new RangeError(`Invalid CID version ${
|
|
1666
|
+
if (version2 !== 0 && version2 !== 1) {
|
|
1667
|
+
throw new RangeError(`Invalid CID version ${version2}`);
|
|
1647
1668
|
}
|
|
1648
1669
|
const prefixSize = offset;
|
|
1649
1670
|
const multihashCode = next();
|
|
@@ -1651,7 +1672,7 @@ var init_cid = __esm(() => {
|
|
|
1651
1672
|
const size = offset + digestSize;
|
|
1652
1673
|
const multihashSize = size - prefixSize;
|
|
1653
1674
|
return {
|
|
1654
|
-
version,
|
|
1675
|
+
version: version2,
|
|
1655
1676
|
codec,
|
|
1656
1677
|
multihashCode,
|
|
1657
1678
|
digestSize,
|
|
@@ -3441,9 +3462,9 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
3441
3462
|
Stack.prototype.has = stackHas;
|
|
3442
3463
|
Stack.prototype.set = stackSet;
|
|
3443
3464
|
function arrayLikeKeys(value, inherited) {
|
|
3444
|
-
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value),
|
|
3465
|
+
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType2 = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType2, result = skipIndexes ? baseTimes(value.length, String) : [], length3 = result.length;
|
|
3445
3466
|
for (var key in value) {
|
|
3446
|
-
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") ||
|
|
3467
|
+
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType2 && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length3)))) {
|
|
3447
3468
|
result.push(key);
|
|
3448
3469
|
}
|
|
3449
3470
|
}
|
|
@@ -4831,7 +4852,6 @@ var parseRawRequestArgs = (queryOrOptions, variables, requestHeaders) => {
|
|
|
4831
4852
|
signal: undefined
|
|
4832
4853
|
};
|
|
4833
4854
|
};
|
|
4834
|
-
|
|
4835
4855
|
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/devAssert.mjs
|
|
4836
4856
|
function devAssert(condition, message) {
|
|
4837
4857
|
const booleanCondition = Boolean(condition);
|
|
@@ -4840,9 +4860,137 @@ function devAssert(condition, message) {
|
|
|
4840
4860
|
}
|
|
4841
4861
|
}
|
|
4842
4862
|
|
|
4843
|
-
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/
|
|
4844
|
-
|
|
4845
|
-
|
|
4863
|
+
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/inspect.mjs
|
|
4864
|
+
var MAX_ARRAY_LENGTH = 10;
|
|
4865
|
+
var MAX_RECURSIVE_DEPTH = 2;
|
|
4866
|
+
function inspect(value) {
|
|
4867
|
+
return formatValue(value, []);
|
|
4868
|
+
}
|
|
4869
|
+
function formatValue(value, seenValues) {
|
|
4870
|
+
switch (typeof value) {
|
|
4871
|
+
case "string":
|
|
4872
|
+
return JSON.stringify(value);
|
|
4873
|
+
case "function":
|
|
4874
|
+
return value.name ? `[function ${value.name}]` : "[function]";
|
|
4875
|
+
case "object":
|
|
4876
|
+
return formatObjectValue(value, seenValues);
|
|
4877
|
+
default:
|
|
4878
|
+
return String(value);
|
|
4879
|
+
}
|
|
4880
|
+
}
|
|
4881
|
+
function formatObjectValue(value, previouslySeenValues) {
|
|
4882
|
+
if (value === null) {
|
|
4883
|
+
return "null";
|
|
4884
|
+
}
|
|
4885
|
+
if (previouslySeenValues.includes(value)) {
|
|
4886
|
+
return "[Circular]";
|
|
4887
|
+
}
|
|
4888
|
+
const seenValues = [...previouslySeenValues, value];
|
|
4889
|
+
if (isJSONable(value)) {
|
|
4890
|
+
const jsonValue = value.toJSON();
|
|
4891
|
+
if (jsonValue !== value) {
|
|
4892
|
+
return typeof jsonValue === "string" ? jsonValue : formatValue(jsonValue, seenValues);
|
|
4893
|
+
}
|
|
4894
|
+
} else if (Array.isArray(value)) {
|
|
4895
|
+
return formatArray(value, seenValues);
|
|
4896
|
+
}
|
|
4897
|
+
return formatObject(value, seenValues);
|
|
4898
|
+
}
|
|
4899
|
+
function isJSONable(value) {
|
|
4900
|
+
return typeof value.toJSON === "function";
|
|
4901
|
+
}
|
|
4902
|
+
function formatObject(object, seenValues) {
|
|
4903
|
+
const entries = Object.entries(object);
|
|
4904
|
+
if (entries.length === 0) {
|
|
4905
|
+
return "{}";
|
|
4906
|
+
}
|
|
4907
|
+
if (seenValues.length > MAX_RECURSIVE_DEPTH) {
|
|
4908
|
+
return "[" + getObjectTag(object) + "]";
|
|
4909
|
+
}
|
|
4910
|
+
const properties = entries.map(([key, value]) => key + ": " + formatValue(value, seenValues));
|
|
4911
|
+
return "{ " + properties.join(", ") + " }";
|
|
4912
|
+
}
|
|
4913
|
+
function formatArray(array, seenValues) {
|
|
4914
|
+
if (array.length === 0) {
|
|
4915
|
+
return "[]";
|
|
4916
|
+
}
|
|
4917
|
+
if (seenValues.length > MAX_RECURSIVE_DEPTH) {
|
|
4918
|
+
return "[Array]";
|
|
4919
|
+
}
|
|
4920
|
+
const len = Math.min(MAX_ARRAY_LENGTH, array.length);
|
|
4921
|
+
const remaining = array.length - len;
|
|
4922
|
+
const items = [];
|
|
4923
|
+
for (let i = 0;i < len; ++i) {
|
|
4924
|
+
items.push(formatValue(array[i], seenValues));
|
|
4925
|
+
}
|
|
4926
|
+
if (remaining === 1) {
|
|
4927
|
+
items.push("... 1 more item");
|
|
4928
|
+
} else if (remaining > 1) {
|
|
4929
|
+
items.push(`... ${remaining} more items`);
|
|
4930
|
+
}
|
|
4931
|
+
return "[" + items.join(", ") + "]";
|
|
4932
|
+
}
|
|
4933
|
+
function getObjectTag(object) {
|
|
4934
|
+
const tag = Object.prototype.toString.call(object).replace(/^\[object /, "").replace(/]$/, "");
|
|
4935
|
+
if (tag === "Object" && typeof object.constructor === "function") {
|
|
4936
|
+
const name = object.constructor.name;
|
|
4937
|
+
if (typeof name === "string" && name !== "") {
|
|
4938
|
+
return name;
|
|
4939
|
+
}
|
|
4940
|
+
}
|
|
4941
|
+
return tag;
|
|
4942
|
+
}
|
|
4943
|
+
|
|
4944
|
+
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/instanceOf.mjs
|
|
4945
|
+
var isProduction = globalThis.process && false;
|
|
4946
|
+
var instanceOf = isProduction ? function instanceOf2(value, constructor) {
|
|
4947
|
+
return value instanceof constructor;
|
|
4948
|
+
} : function instanceOf3(value, constructor) {
|
|
4949
|
+
if (value instanceof constructor) {
|
|
4950
|
+
return true;
|
|
4951
|
+
}
|
|
4952
|
+
if (typeof value === "object" && value !== null) {
|
|
4953
|
+
var _value$constructor;
|
|
4954
|
+
const className = constructor.prototype[Symbol.toStringTag];
|
|
4955
|
+
const valueClassName = Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === undefined ? undefined : _value$constructor.name;
|
|
4956
|
+
if (className === valueClassName) {
|
|
4957
|
+
const stringifiedValue = inspect(value);
|
|
4958
|
+
throw new Error(`Cannot use ${className} "${stringifiedValue}" from another module or realm.
|
|
4959
|
+
|
|
4960
|
+
Ensure that there is only one instance of "graphql" in the node_modules
|
|
4961
|
+
directory. If different versions of "graphql" are the dependencies of other
|
|
4962
|
+
relied on modules, use "resolutions" to ensure only one version is installed.
|
|
4963
|
+
|
|
4964
|
+
https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
4965
|
+
|
|
4966
|
+
Duplicate "graphql" modules cannot be used at the same time since different
|
|
4967
|
+
versions may have different capabilities and behavior. The data from one
|
|
4968
|
+
version used in the function from another could produce confusing and
|
|
4969
|
+
spurious results.`);
|
|
4970
|
+
}
|
|
4971
|
+
}
|
|
4972
|
+
return false;
|
|
4973
|
+
};
|
|
4974
|
+
|
|
4975
|
+
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/source.mjs
|
|
4976
|
+
class Source {
|
|
4977
|
+
constructor(body, name = "GraphQL request", locationOffset = {
|
|
4978
|
+
line: 1,
|
|
4979
|
+
column: 1
|
|
4980
|
+
}) {
|
|
4981
|
+
typeof body === "string" || devAssert(false, `Body must be a string. Received: ${inspect(body)}.`);
|
|
4982
|
+
this.body = body;
|
|
4983
|
+
this.name = name;
|
|
4984
|
+
this.locationOffset = locationOffset;
|
|
4985
|
+
this.locationOffset.line > 0 || devAssert(false, "line in locationOffset is 1-indexed and must be positive.");
|
|
4986
|
+
this.locationOffset.column > 0 || devAssert(false, "column in locationOffset is 1-indexed and must be positive.");
|
|
4987
|
+
}
|
|
4988
|
+
get [Symbol.toStringTag]() {
|
|
4989
|
+
return "Source";
|
|
4990
|
+
}
|
|
4991
|
+
}
|
|
4992
|
+
function isSource(source) {
|
|
4993
|
+
return instanceOf(source, Source);
|
|
4846
4994
|
}
|
|
4847
4995
|
|
|
4848
4996
|
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/invariant.mjs
|
|
@@ -4916,6 +5064,91 @@ function printPrefixedLines(lines) {
|
|
|
4916
5064
|
`);
|
|
4917
5065
|
}
|
|
4918
5066
|
|
|
5067
|
+
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/kinds.mjs
|
|
5068
|
+
var Kind;
|
|
5069
|
+
(function(Kind2) {
|
|
5070
|
+
Kind2["NAME"] = "Name";
|
|
5071
|
+
Kind2["DOCUMENT"] = "Document";
|
|
5072
|
+
Kind2["OPERATION_DEFINITION"] = "OperationDefinition";
|
|
5073
|
+
Kind2["VARIABLE_DEFINITION"] = "VariableDefinition";
|
|
5074
|
+
Kind2["SELECTION_SET"] = "SelectionSet";
|
|
5075
|
+
Kind2["FIELD"] = "Field";
|
|
5076
|
+
Kind2["ARGUMENT"] = "Argument";
|
|
5077
|
+
Kind2["FRAGMENT_SPREAD"] = "FragmentSpread";
|
|
5078
|
+
Kind2["INLINE_FRAGMENT"] = "InlineFragment";
|
|
5079
|
+
Kind2["FRAGMENT_DEFINITION"] = "FragmentDefinition";
|
|
5080
|
+
Kind2["VARIABLE"] = "Variable";
|
|
5081
|
+
Kind2["INT"] = "IntValue";
|
|
5082
|
+
Kind2["FLOAT"] = "FloatValue";
|
|
5083
|
+
Kind2["STRING"] = "StringValue";
|
|
5084
|
+
Kind2["BOOLEAN"] = "BooleanValue";
|
|
5085
|
+
Kind2["NULL"] = "NullValue";
|
|
5086
|
+
Kind2["ENUM"] = "EnumValue";
|
|
5087
|
+
Kind2["LIST"] = "ListValue";
|
|
5088
|
+
Kind2["OBJECT"] = "ObjectValue";
|
|
5089
|
+
Kind2["OBJECT_FIELD"] = "ObjectField";
|
|
5090
|
+
Kind2["DIRECTIVE"] = "Directive";
|
|
5091
|
+
Kind2["NAMED_TYPE"] = "NamedType";
|
|
5092
|
+
Kind2["LIST_TYPE"] = "ListType";
|
|
5093
|
+
Kind2["NON_NULL_TYPE"] = "NonNullType";
|
|
5094
|
+
Kind2["SCHEMA_DEFINITION"] = "SchemaDefinition";
|
|
5095
|
+
Kind2["OPERATION_TYPE_DEFINITION"] = "OperationTypeDefinition";
|
|
5096
|
+
Kind2["SCALAR_TYPE_DEFINITION"] = "ScalarTypeDefinition";
|
|
5097
|
+
Kind2["OBJECT_TYPE_DEFINITION"] = "ObjectTypeDefinition";
|
|
5098
|
+
Kind2["FIELD_DEFINITION"] = "FieldDefinition";
|
|
5099
|
+
Kind2["INPUT_VALUE_DEFINITION"] = "InputValueDefinition";
|
|
5100
|
+
Kind2["INTERFACE_TYPE_DEFINITION"] = "InterfaceTypeDefinition";
|
|
5101
|
+
Kind2["UNION_TYPE_DEFINITION"] = "UnionTypeDefinition";
|
|
5102
|
+
Kind2["ENUM_TYPE_DEFINITION"] = "EnumTypeDefinition";
|
|
5103
|
+
Kind2["ENUM_VALUE_DEFINITION"] = "EnumValueDefinition";
|
|
5104
|
+
Kind2["INPUT_OBJECT_TYPE_DEFINITION"] = "InputObjectTypeDefinition";
|
|
5105
|
+
Kind2["DIRECTIVE_DEFINITION"] = "DirectiveDefinition";
|
|
5106
|
+
Kind2["SCHEMA_EXTENSION"] = "SchemaExtension";
|
|
5107
|
+
Kind2["SCALAR_TYPE_EXTENSION"] = "ScalarTypeExtension";
|
|
5108
|
+
Kind2["OBJECT_TYPE_EXTENSION"] = "ObjectTypeExtension";
|
|
5109
|
+
Kind2["INTERFACE_TYPE_EXTENSION"] = "InterfaceTypeExtension";
|
|
5110
|
+
Kind2["UNION_TYPE_EXTENSION"] = "UnionTypeExtension";
|
|
5111
|
+
Kind2["ENUM_TYPE_EXTENSION"] = "EnumTypeExtension";
|
|
5112
|
+
Kind2["INPUT_OBJECT_TYPE_EXTENSION"] = "InputObjectTypeExtension";
|
|
5113
|
+
Kind2["TYPE_COORDINATE"] = "TypeCoordinate";
|
|
5114
|
+
Kind2["MEMBER_COORDINATE"] = "MemberCoordinate";
|
|
5115
|
+
Kind2["ARGUMENT_COORDINATE"] = "ArgumentCoordinate";
|
|
5116
|
+
Kind2["DIRECTIVE_COORDINATE"] = "DirectiveCoordinate";
|
|
5117
|
+
Kind2["DIRECTIVE_ARGUMENT_COORDINATE"] = "DirectiveArgumentCoordinate";
|
|
5118
|
+
})(Kind || (Kind = {}));
|
|
5119
|
+
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/tokenKind.mjs
|
|
5120
|
+
var TokenKind;
|
|
5121
|
+
(function(TokenKind2) {
|
|
5122
|
+
TokenKind2["SOF"] = "<SOF>";
|
|
5123
|
+
TokenKind2["EOF"] = "<EOF>";
|
|
5124
|
+
TokenKind2["BANG"] = "!";
|
|
5125
|
+
TokenKind2["DOLLAR"] = "$";
|
|
5126
|
+
TokenKind2["AMP"] = "&";
|
|
5127
|
+
TokenKind2["PAREN_L"] = "(";
|
|
5128
|
+
TokenKind2["PAREN_R"] = ")";
|
|
5129
|
+
TokenKind2["DOT"] = ".";
|
|
5130
|
+
TokenKind2["SPREAD"] = "...";
|
|
5131
|
+
TokenKind2["COLON"] = ":";
|
|
5132
|
+
TokenKind2["EQUALS"] = "=";
|
|
5133
|
+
TokenKind2["AT"] = "@";
|
|
5134
|
+
TokenKind2["BRACKET_L"] = "[";
|
|
5135
|
+
TokenKind2["BRACKET_R"] = "]";
|
|
5136
|
+
TokenKind2["BRACE_L"] = "{";
|
|
5137
|
+
TokenKind2["PIPE"] = "|";
|
|
5138
|
+
TokenKind2["BRACE_R"] = "}";
|
|
5139
|
+
TokenKind2["NAME"] = "Name";
|
|
5140
|
+
TokenKind2["INT"] = "Int";
|
|
5141
|
+
TokenKind2["FLOAT"] = "Float";
|
|
5142
|
+
TokenKind2["STRING"] = "String";
|
|
5143
|
+
TokenKind2["BLOCK_STRING"] = "BlockString";
|
|
5144
|
+
TokenKind2["COMMENT"] = "Comment";
|
|
5145
|
+
})(TokenKind || (TokenKind = {}));
|
|
5146
|
+
|
|
5147
|
+
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/isObjectLike.mjs
|
|
5148
|
+
function isObjectLike(value) {
|
|
5149
|
+
return typeof value == "object" && value !== null;
|
|
5150
|
+
}
|
|
5151
|
+
|
|
4919
5152
|
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/error/GraphQLError.mjs
|
|
4920
5153
|
function toNormalizedOptions(args) {
|
|
4921
5154
|
const firstArg = args[0];
|
|
@@ -5176,83 +5409,6 @@ var OperationTypeNode;
|
|
|
5176
5409
|
OperationTypeNode2["SUBSCRIPTION"] = "subscription";
|
|
5177
5410
|
})(OperationTypeNode || (OperationTypeNode = {}));
|
|
5178
5411
|
|
|
5179
|
-
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/directiveLocation.mjs
|
|
5180
|
-
var DirectiveLocation;
|
|
5181
|
-
(function(DirectiveLocation2) {
|
|
5182
|
-
DirectiveLocation2["QUERY"] = "QUERY";
|
|
5183
|
-
DirectiveLocation2["MUTATION"] = "MUTATION";
|
|
5184
|
-
DirectiveLocation2["SUBSCRIPTION"] = "SUBSCRIPTION";
|
|
5185
|
-
DirectiveLocation2["FIELD"] = "FIELD";
|
|
5186
|
-
DirectiveLocation2["FRAGMENT_DEFINITION"] = "FRAGMENT_DEFINITION";
|
|
5187
|
-
DirectiveLocation2["FRAGMENT_SPREAD"] = "FRAGMENT_SPREAD";
|
|
5188
|
-
DirectiveLocation2["INLINE_FRAGMENT"] = "INLINE_FRAGMENT";
|
|
5189
|
-
DirectiveLocation2["VARIABLE_DEFINITION"] = "VARIABLE_DEFINITION";
|
|
5190
|
-
DirectiveLocation2["SCHEMA"] = "SCHEMA";
|
|
5191
|
-
DirectiveLocation2["SCALAR"] = "SCALAR";
|
|
5192
|
-
DirectiveLocation2["OBJECT"] = "OBJECT";
|
|
5193
|
-
DirectiveLocation2["FIELD_DEFINITION"] = "FIELD_DEFINITION";
|
|
5194
|
-
DirectiveLocation2["ARGUMENT_DEFINITION"] = "ARGUMENT_DEFINITION";
|
|
5195
|
-
DirectiveLocation2["INTERFACE"] = "INTERFACE";
|
|
5196
|
-
DirectiveLocation2["UNION"] = "UNION";
|
|
5197
|
-
DirectiveLocation2["ENUM"] = "ENUM";
|
|
5198
|
-
DirectiveLocation2["ENUM_VALUE"] = "ENUM_VALUE";
|
|
5199
|
-
DirectiveLocation2["INPUT_OBJECT"] = "INPUT_OBJECT";
|
|
5200
|
-
DirectiveLocation2["INPUT_FIELD_DEFINITION"] = "INPUT_FIELD_DEFINITION";
|
|
5201
|
-
})(DirectiveLocation || (DirectiveLocation = {}));
|
|
5202
|
-
|
|
5203
|
-
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/kinds.mjs
|
|
5204
|
-
var Kind;
|
|
5205
|
-
(function(Kind2) {
|
|
5206
|
-
Kind2["NAME"] = "Name";
|
|
5207
|
-
Kind2["DOCUMENT"] = "Document";
|
|
5208
|
-
Kind2["OPERATION_DEFINITION"] = "OperationDefinition";
|
|
5209
|
-
Kind2["VARIABLE_DEFINITION"] = "VariableDefinition";
|
|
5210
|
-
Kind2["SELECTION_SET"] = "SelectionSet";
|
|
5211
|
-
Kind2["FIELD"] = "Field";
|
|
5212
|
-
Kind2["ARGUMENT"] = "Argument";
|
|
5213
|
-
Kind2["FRAGMENT_SPREAD"] = "FragmentSpread";
|
|
5214
|
-
Kind2["INLINE_FRAGMENT"] = "InlineFragment";
|
|
5215
|
-
Kind2["FRAGMENT_DEFINITION"] = "FragmentDefinition";
|
|
5216
|
-
Kind2["VARIABLE"] = "Variable";
|
|
5217
|
-
Kind2["INT"] = "IntValue";
|
|
5218
|
-
Kind2["FLOAT"] = "FloatValue";
|
|
5219
|
-
Kind2["STRING"] = "StringValue";
|
|
5220
|
-
Kind2["BOOLEAN"] = "BooleanValue";
|
|
5221
|
-
Kind2["NULL"] = "NullValue";
|
|
5222
|
-
Kind2["ENUM"] = "EnumValue";
|
|
5223
|
-
Kind2["LIST"] = "ListValue";
|
|
5224
|
-
Kind2["OBJECT"] = "ObjectValue";
|
|
5225
|
-
Kind2["OBJECT_FIELD"] = "ObjectField";
|
|
5226
|
-
Kind2["DIRECTIVE"] = "Directive";
|
|
5227
|
-
Kind2["NAMED_TYPE"] = "NamedType";
|
|
5228
|
-
Kind2["LIST_TYPE"] = "ListType";
|
|
5229
|
-
Kind2["NON_NULL_TYPE"] = "NonNullType";
|
|
5230
|
-
Kind2["SCHEMA_DEFINITION"] = "SchemaDefinition";
|
|
5231
|
-
Kind2["OPERATION_TYPE_DEFINITION"] = "OperationTypeDefinition";
|
|
5232
|
-
Kind2["SCALAR_TYPE_DEFINITION"] = "ScalarTypeDefinition";
|
|
5233
|
-
Kind2["OBJECT_TYPE_DEFINITION"] = "ObjectTypeDefinition";
|
|
5234
|
-
Kind2["FIELD_DEFINITION"] = "FieldDefinition";
|
|
5235
|
-
Kind2["INPUT_VALUE_DEFINITION"] = "InputValueDefinition";
|
|
5236
|
-
Kind2["INTERFACE_TYPE_DEFINITION"] = "InterfaceTypeDefinition";
|
|
5237
|
-
Kind2["UNION_TYPE_DEFINITION"] = "UnionTypeDefinition";
|
|
5238
|
-
Kind2["ENUM_TYPE_DEFINITION"] = "EnumTypeDefinition";
|
|
5239
|
-
Kind2["ENUM_VALUE_DEFINITION"] = "EnumValueDefinition";
|
|
5240
|
-
Kind2["INPUT_OBJECT_TYPE_DEFINITION"] = "InputObjectTypeDefinition";
|
|
5241
|
-
Kind2["DIRECTIVE_DEFINITION"] = "DirectiveDefinition";
|
|
5242
|
-
Kind2["SCHEMA_EXTENSION"] = "SchemaExtension";
|
|
5243
|
-
Kind2["SCALAR_TYPE_EXTENSION"] = "ScalarTypeExtension";
|
|
5244
|
-
Kind2["OBJECT_TYPE_EXTENSION"] = "ObjectTypeExtension";
|
|
5245
|
-
Kind2["INTERFACE_TYPE_EXTENSION"] = "InterfaceTypeExtension";
|
|
5246
|
-
Kind2["UNION_TYPE_EXTENSION"] = "UnionTypeExtension";
|
|
5247
|
-
Kind2["ENUM_TYPE_EXTENSION"] = "EnumTypeExtension";
|
|
5248
|
-
Kind2["INPUT_OBJECT_TYPE_EXTENSION"] = "InputObjectTypeExtension";
|
|
5249
|
-
Kind2["TYPE_COORDINATE"] = "TypeCoordinate";
|
|
5250
|
-
Kind2["MEMBER_COORDINATE"] = "MemberCoordinate";
|
|
5251
|
-
Kind2["ARGUMENT_COORDINATE"] = "ArgumentCoordinate";
|
|
5252
|
-
Kind2["DIRECTIVE_COORDINATE"] = "DirectiveCoordinate";
|
|
5253
|
-
Kind2["DIRECTIVE_ARGUMENT_COORDINATE"] = "DirectiveArgumentCoordinate";
|
|
5254
|
-
})(Kind || (Kind = {}));
|
|
5255
|
-
|
|
5256
5412
|
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/characterClasses.mjs
|
|
5257
5413
|
function isWhiteSpace(code) {
|
|
5258
5414
|
return code === 9 || code === 32;
|
|
@@ -5322,34 +5478,6 @@ function printBlockString(value, options) {
|
|
|
5322
5478
|
return '"""' + result + '"""';
|
|
5323
5479
|
}
|
|
5324
5480
|
|
|
5325
|
-
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/tokenKind.mjs
|
|
5326
|
-
var TokenKind;
|
|
5327
|
-
(function(TokenKind2) {
|
|
5328
|
-
TokenKind2["SOF"] = "<SOF>";
|
|
5329
|
-
TokenKind2["EOF"] = "<EOF>";
|
|
5330
|
-
TokenKind2["BANG"] = "!";
|
|
5331
|
-
TokenKind2["DOLLAR"] = "$";
|
|
5332
|
-
TokenKind2["AMP"] = "&";
|
|
5333
|
-
TokenKind2["PAREN_L"] = "(";
|
|
5334
|
-
TokenKind2["PAREN_R"] = ")";
|
|
5335
|
-
TokenKind2["DOT"] = ".";
|
|
5336
|
-
TokenKind2["SPREAD"] = "...";
|
|
5337
|
-
TokenKind2["COLON"] = ":";
|
|
5338
|
-
TokenKind2["EQUALS"] = "=";
|
|
5339
|
-
TokenKind2["AT"] = "@";
|
|
5340
|
-
TokenKind2["BRACKET_L"] = "[";
|
|
5341
|
-
TokenKind2["BRACKET_R"] = "]";
|
|
5342
|
-
TokenKind2["BRACE_L"] = "{";
|
|
5343
|
-
TokenKind2["PIPE"] = "|";
|
|
5344
|
-
TokenKind2["BRACE_R"] = "}";
|
|
5345
|
-
TokenKind2["NAME"] = "Name";
|
|
5346
|
-
TokenKind2["INT"] = "Int";
|
|
5347
|
-
TokenKind2["FLOAT"] = "Float";
|
|
5348
|
-
TokenKind2["STRING"] = "String";
|
|
5349
|
-
TokenKind2["BLOCK_STRING"] = "BlockString";
|
|
5350
|
-
TokenKind2["COMMENT"] = "Comment";
|
|
5351
|
-
})(TokenKind || (TokenKind = {}));
|
|
5352
|
-
|
|
5353
5481
|
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/lexer.mjs
|
|
5354
5482
|
class Lexer {
|
|
5355
5483
|
constructor(source) {
|
|
@@ -5752,138 +5880,29 @@ function readName(lexer, start) {
|
|
|
5752
5880
|
return createToken(lexer, TokenKind.NAME, start, position, body.slice(start, position));
|
|
5753
5881
|
}
|
|
5754
5882
|
|
|
5755
|
-
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/
|
|
5756
|
-
var
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
return "[Circular]";
|
|
5779
|
-
}
|
|
5780
|
-
const seenValues = [...previouslySeenValues, value];
|
|
5781
|
-
if (isJSONable(value)) {
|
|
5782
|
-
const jsonValue = value.toJSON();
|
|
5783
|
-
if (jsonValue !== value) {
|
|
5784
|
-
return typeof jsonValue === "string" ? jsonValue : formatValue(jsonValue, seenValues);
|
|
5785
|
-
}
|
|
5786
|
-
} else if (Array.isArray(value)) {
|
|
5787
|
-
return formatArray(value, seenValues);
|
|
5788
|
-
}
|
|
5789
|
-
return formatObject(value, seenValues);
|
|
5790
|
-
}
|
|
5791
|
-
function isJSONable(value) {
|
|
5792
|
-
return typeof value.toJSON === "function";
|
|
5793
|
-
}
|
|
5794
|
-
function formatObject(object, seenValues) {
|
|
5795
|
-
const entries = Object.entries(object);
|
|
5796
|
-
if (entries.length === 0) {
|
|
5797
|
-
return "{}";
|
|
5798
|
-
}
|
|
5799
|
-
if (seenValues.length > MAX_RECURSIVE_DEPTH) {
|
|
5800
|
-
return "[" + getObjectTag(object) + "]";
|
|
5801
|
-
}
|
|
5802
|
-
const properties = entries.map(([key, value]) => key + ": " + formatValue(value, seenValues));
|
|
5803
|
-
return "{ " + properties.join(", ") + " }";
|
|
5804
|
-
}
|
|
5805
|
-
function formatArray(array, seenValues) {
|
|
5806
|
-
if (array.length === 0) {
|
|
5807
|
-
return "[]";
|
|
5808
|
-
}
|
|
5809
|
-
if (seenValues.length > MAX_RECURSIVE_DEPTH) {
|
|
5810
|
-
return "[Array]";
|
|
5811
|
-
}
|
|
5812
|
-
const len = Math.min(MAX_ARRAY_LENGTH, array.length);
|
|
5813
|
-
const remaining = array.length - len;
|
|
5814
|
-
const items = [];
|
|
5815
|
-
for (let i = 0;i < len; ++i) {
|
|
5816
|
-
items.push(formatValue(array[i], seenValues));
|
|
5817
|
-
}
|
|
5818
|
-
if (remaining === 1) {
|
|
5819
|
-
items.push("... 1 more item");
|
|
5820
|
-
} else if (remaining > 1) {
|
|
5821
|
-
items.push(`... ${remaining} more items`);
|
|
5822
|
-
}
|
|
5823
|
-
return "[" + items.join(", ") + "]";
|
|
5824
|
-
}
|
|
5825
|
-
function getObjectTag(object) {
|
|
5826
|
-
const tag = Object.prototype.toString.call(object).replace(/^\[object /, "").replace(/]$/, "");
|
|
5827
|
-
if (tag === "Object" && typeof object.constructor === "function") {
|
|
5828
|
-
const name = object.constructor.name;
|
|
5829
|
-
if (typeof name === "string" && name !== "") {
|
|
5830
|
-
return name;
|
|
5831
|
-
}
|
|
5832
|
-
}
|
|
5833
|
-
return tag;
|
|
5834
|
-
}
|
|
5835
|
-
|
|
5836
|
-
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/instanceOf.mjs
|
|
5837
|
-
var isProduction = globalThis.process && false;
|
|
5838
|
-
var instanceOf = isProduction ? function instanceOf2(value, constructor) {
|
|
5839
|
-
return value instanceof constructor;
|
|
5840
|
-
} : function instanceOf3(value, constructor) {
|
|
5841
|
-
if (value instanceof constructor) {
|
|
5842
|
-
return true;
|
|
5843
|
-
}
|
|
5844
|
-
if (typeof value === "object" && value !== null) {
|
|
5845
|
-
var _value$constructor;
|
|
5846
|
-
const className = constructor.prototype[Symbol.toStringTag];
|
|
5847
|
-
const valueClassName = Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === undefined ? undefined : _value$constructor.name;
|
|
5848
|
-
if (className === valueClassName) {
|
|
5849
|
-
const stringifiedValue = inspect(value);
|
|
5850
|
-
throw new Error(`Cannot use ${className} "${stringifiedValue}" from another module or realm.
|
|
5851
|
-
|
|
5852
|
-
Ensure that there is only one instance of "graphql" in the node_modules
|
|
5853
|
-
directory. If different versions of "graphql" are the dependencies of other
|
|
5854
|
-
relied on modules, use "resolutions" to ensure only one version is installed.
|
|
5855
|
-
|
|
5856
|
-
https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
5857
|
-
|
|
5858
|
-
Duplicate "graphql" modules cannot be used at the same time since different
|
|
5859
|
-
versions may have different capabilities and behavior. The data from one
|
|
5860
|
-
version used in the function from another could produce confusing and
|
|
5861
|
-
spurious results.`);
|
|
5862
|
-
}
|
|
5863
|
-
}
|
|
5864
|
-
return false;
|
|
5865
|
-
};
|
|
5866
|
-
|
|
5867
|
-
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/source.mjs
|
|
5868
|
-
class Source {
|
|
5869
|
-
constructor(body, name = "GraphQL request", locationOffset = {
|
|
5870
|
-
line: 1,
|
|
5871
|
-
column: 1
|
|
5872
|
-
}) {
|
|
5873
|
-
typeof body === "string" || devAssert(false, `Body must be a string. Received: ${inspect(body)}.`);
|
|
5874
|
-
this.body = body;
|
|
5875
|
-
this.name = name;
|
|
5876
|
-
this.locationOffset = locationOffset;
|
|
5877
|
-
this.locationOffset.line > 0 || devAssert(false, "line in locationOffset is 1-indexed and must be positive.");
|
|
5878
|
-
this.locationOffset.column > 0 || devAssert(false, "column in locationOffset is 1-indexed and must be positive.");
|
|
5879
|
-
}
|
|
5880
|
-
get [Symbol.toStringTag]() {
|
|
5881
|
-
return "Source";
|
|
5882
|
-
}
|
|
5883
|
-
}
|
|
5884
|
-
function isSource(source) {
|
|
5885
|
-
return instanceOf(source, Source);
|
|
5886
|
-
}
|
|
5883
|
+
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/directiveLocation.mjs
|
|
5884
|
+
var DirectiveLocation;
|
|
5885
|
+
(function(DirectiveLocation2) {
|
|
5886
|
+
DirectiveLocation2["QUERY"] = "QUERY";
|
|
5887
|
+
DirectiveLocation2["MUTATION"] = "MUTATION";
|
|
5888
|
+
DirectiveLocation2["SUBSCRIPTION"] = "SUBSCRIPTION";
|
|
5889
|
+
DirectiveLocation2["FIELD"] = "FIELD";
|
|
5890
|
+
DirectiveLocation2["FRAGMENT_DEFINITION"] = "FRAGMENT_DEFINITION";
|
|
5891
|
+
DirectiveLocation2["FRAGMENT_SPREAD"] = "FRAGMENT_SPREAD";
|
|
5892
|
+
DirectiveLocation2["INLINE_FRAGMENT"] = "INLINE_FRAGMENT";
|
|
5893
|
+
DirectiveLocation2["VARIABLE_DEFINITION"] = "VARIABLE_DEFINITION";
|
|
5894
|
+
DirectiveLocation2["SCHEMA"] = "SCHEMA";
|
|
5895
|
+
DirectiveLocation2["SCALAR"] = "SCALAR";
|
|
5896
|
+
DirectiveLocation2["OBJECT"] = "OBJECT";
|
|
5897
|
+
DirectiveLocation2["FIELD_DEFINITION"] = "FIELD_DEFINITION";
|
|
5898
|
+
DirectiveLocation2["ARGUMENT_DEFINITION"] = "ARGUMENT_DEFINITION";
|
|
5899
|
+
DirectiveLocation2["INTERFACE"] = "INTERFACE";
|
|
5900
|
+
DirectiveLocation2["UNION"] = "UNION";
|
|
5901
|
+
DirectiveLocation2["ENUM"] = "ENUM";
|
|
5902
|
+
DirectiveLocation2["ENUM_VALUE"] = "ENUM_VALUE";
|
|
5903
|
+
DirectiveLocation2["INPUT_OBJECT"] = "INPUT_OBJECT";
|
|
5904
|
+
DirectiveLocation2["INPUT_FIELD_DEFINITION"] = "INPUT_FIELD_DEFINITION";
|
|
5905
|
+
})(DirectiveLocation || (DirectiveLocation = {}));
|
|
5887
5906
|
|
|
5888
5907
|
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/parser.mjs
|
|
5889
5908
|
function parse(source, options) {
|
|
@@ -6778,7 +6797,6 @@ function getTokenDesc(token) {
|
|
|
6778
6797
|
function getTokenKindDesc(kind) {
|
|
6779
6798
|
return isPunctuatorTokenKind(kind) ? `"${kind}"` : kind;
|
|
6780
6799
|
}
|
|
6781
|
-
|
|
6782
6800
|
// ../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/printString.mjs
|
|
6783
6801
|
function printString(str) {
|
|
6784
6802
|
return `"${str.replace(escapedRegExp, escapedReplacer)}"`;
|
|
@@ -10564,7 +10582,7 @@ function useConnectionStates() {
|
|
|
10564
10582
|
useEffect3(() => {
|
|
10565
10583
|
if (!syncManager)
|
|
10566
10584
|
return;
|
|
10567
|
-
function
|
|
10585
|
+
function subscribe2() {
|
|
10568
10586
|
for (const unsub of unsubscribesRef.current) {
|
|
10569
10587
|
unsub();
|
|
10570
10588
|
}
|
|
@@ -10578,8 +10596,8 @@ function useConnectionStates() {
|
|
|
10578
10596
|
}
|
|
10579
10597
|
setStates(buildSnapshot(syncManager));
|
|
10580
10598
|
}
|
|
10581
|
-
|
|
10582
|
-
const interval = setInterval(
|
|
10599
|
+
subscribe2();
|
|
10600
|
+
const interval = setInterval(subscribe2, 5000);
|
|
10583
10601
|
return () => {
|
|
10584
10602
|
clearInterval(interval);
|
|
10585
10603
|
for (const unsub of unsubscribesRef.current) {
|
|
@@ -16424,10 +16442,10 @@ function SignerAlg(alg) {
|
|
|
16424
16442
|
return impl;
|
|
16425
16443
|
}
|
|
16426
16444
|
function publicKeyToAddress$1(publicKey, otherAddress) {
|
|
16427
|
-
const
|
|
16445
|
+
const version3 = bytesToHex2(base58ToBytes(otherAddress).slice(0, 1));
|
|
16428
16446
|
const publicKeyBuffer = hexToBytes2(publicKey);
|
|
16429
16447
|
const publicKeyHash = ripemd1602(sha2564(publicKeyBuffer));
|
|
16430
|
-
const step1 =
|
|
16448
|
+
const step1 = version3 + bytesToHex2(publicKeyHash);
|
|
16431
16449
|
const step2 = sha2564(hexToBytes2(step1));
|
|
16432
16450
|
const step3 = sha2564(step2);
|
|
16433
16451
|
const checksum = bytesToHex2(step3).substring(0, 8);
|
|
@@ -18400,8 +18418,8 @@ var sha5123 = from4({
|
|
|
18400
18418
|
|
|
18401
18419
|
// ../../node_modules/.pnpm/multiformats@13.4.2/node_modules/multiformats/dist/src/cid.js
|
|
18402
18420
|
function format(link, base4) {
|
|
18403
|
-
const { bytes, version:
|
|
18404
|
-
switch (
|
|
18421
|
+
const { bytes, version: version3 } = link;
|
|
18422
|
+
switch (version3) {
|
|
18405
18423
|
case 0:
|
|
18406
18424
|
return toStringV02(bytes, baseCache(link), base4 ?? base58btc2.encoder);
|
|
18407
18425
|
default:
|
|
@@ -18425,9 +18443,9 @@ class CID2 {
|
|
|
18425
18443
|
multihash;
|
|
18426
18444
|
bytes;
|
|
18427
18445
|
"/";
|
|
18428
|
-
constructor(
|
|
18446
|
+
constructor(version3, code5, multihash, bytes) {
|
|
18429
18447
|
this.code = code5;
|
|
18430
|
-
this.version =
|
|
18448
|
+
this.version = version3;
|
|
18431
18449
|
this.multihash = multihash;
|
|
18432
18450
|
this.bytes = bytes;
|
|
18433
18451
|
this["/"] = bytes;
|
|
@@ -18504,34 +18522,34 @@ class CID2 {
|
|
|
18504
18522
|
if (value instanceof CID2) {
|
|
18505
18523
|
return value;
|
|
18506
18524
|
} else if (value["/"] != null && value["/"] === value.bytes || value.asCID === value) {
|
|
18507
|
-
const { version:
|
|
18508
|
-
return new CID2(
|
|
18525
|
+
const { version: version3, code: code5, multihash, bytes } = value;
|
|
18526
|
+
return new CID2(version3, code5, multihash, bytes ?? encodeCID2(version3, code5, multihash.bytes));
|
|
18509
18527
|
} else if (value[cidSymbol2] === true) {
|
|
18510
|
-
const { version:
|
|
18528
|
+
const { version: version3, multihash, code: code5 } = value;
|
|
18511
18529
|
const digest3 = decode13(multihash);
|
|
18512
|
-
return CID2.create(
|
|
18530
|
+
return CID2.create(version3, code5, digest3);
|
|
18513
18531
|
} else {
|
|
18514
18532
|
return null;
|
|
18515
18533
|
}
|
|
18516
18534
|
}
|
|
18517
|
-
static create(
|
|
18535
|
+
static create(version3, code5, digest3) {
|
|
18518
18536
|
if (typeof code5 !== "number") {
|
|
18519
18537
|
throw new Error("String codecs are no longer supported");
|
|
18520
18538
|
}
|
|
18521
18539
|
if (!(digest3.bytes instanceof Uint8Array)) {
|
|
18522
18540
|
throw new Error("Invalid digest");
|
|
18523
18541
|
}
|
|
18524
|
-
switch (
|
|
18542
|
+
switch (version3) {
|
|
18525
18543
|
case 0: {
|
|
18526
18544
|
if (code5 !== DAG_PB_CODE2) {
|
|
18527
18545
|
throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE2}) block encoding`);
|
|
18528
18546
|
} else {
|
|
18529
|
-
return new CID2(
|
|
18547
|
+
return new CID2(version3, code5, digest3, digest3.bytes);
|
|
18530
18548
|
}
|
|
18531
18549
|
}
|
|
18532
18550
|
case 1: {
|
|
18533
|
-
const bytes = encodeCID2(
|
|
18534
|
-
return new CID2(
|
|
18551
|
+
const bytes = encodeCID2(version3, code5, digest3.bytes);
|
|
18552
|
+
return new CID2(version3, code5, digest3, bytes);
|
|
18535
18553
|
}
|
|
18536
18554
|
default: {
|
|
18537
18555
|
throw new Error("Invalid version");
|
|
@@ -18570,23 +18588,23 @@ class CID2 {
|
|
|
18570
18588
|
offset += length3;
|
|
18571
18589
|
return i;
|
|
18572
18590
|
};
|
|
18573
|
-
let
|
|
18591
|
+
let version3 = next();
|
|
18574
18592
|
let codec = DAG_PB_CODE2;
|
|
18575
|
-
if (
|
|
18576
|
-
|
|
18593
|
+
if (version3 === 18) {
|
|
18594
|
+
version3 = 0;
|
|
18577
18595
|
offset = 0;
|
|
18578
18596
|
} else {
|
|
18579
18597
|
codec = next();
|
|
18580
18598
|
}
|
|
18581
|
-
if (
|
|
18582
|
-
throw new RangeError(`Invalid CID version ${
|
|
18599
|
+
if (version3 !== 0 && version3 !== 1) {
|
|
18600
|
+
throw new RangeError(`Invalid CID version ${version3}`);
|
|
18583
18601
|
}
|
|
18584
18602
|
const prefixSize = offset;
|
|
18585
18603
|
const multihashCode = next();
|
|
18586
18604
|
const digestSize = next();
|
|
18587
18605
|
const size = offset + digestSize;
|
|
18588
18606
|
const multihashSize = size - prefixSize;
|
|
18589
|
-
return { version:
|
|
18607
|
+
return { version: version3, codec, multihashCode, digestSize, multihashSize, size };
|
|
18590
18608
|
}
|
|
18591
18609
|
static parse(source, base4) {
|
|
18592
18610
|
const [prefix, bytes] = parseCIDtoBytes2(source, base4);
|
|
@@ -18654,11 +18672,11 @@ function toStringV12(bytes, cache2, base4) {
|
|
|
18654
18672
|
}
|
|
18655
18673
|
var DAG_PB_CODE2 = 112;
|
|
18656
18674
|
var SHA_256_CODE2 = 18;
|
|
18657
|
-
function encodeCID2(
|
|
18658
|
-
const codeOffset = encodingLength2(
|
|
18675
|
+
function encodeCID2(version3, code5, multihash) {
|
|
18676
|
+
const codeOffset = encodingLength2(version3);
|
|
18659
18677
|
const hashOffset = codeOffset + encodingLength2(code5);
|
|
18660
18678
|
const bytes = new Uint8Array(hashOffset + multihash.byteLength);
|
|
18661
|
-
encodeTo2(
|
|
18679
|
+
encodeTo2(version3, bytes, 0);
|
|
18662
18680
|
encodeTo2(code5, bytes, codeOffset);
|
|
18663
18681
|
bytes.set(multihash, hashOffset);
|
|
18664
18682
|
return bytes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/reactor-browser",
|
|
3
|
-
"version": "6.0.0-dev.
|
|
3
|
+
"version": "6.0.0-dev.92",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"luxon": "^3.6.1",
|
|
62
62
|
"lz-string": "^1.5.0",
|
|
63
63
|
"slug": "^11.0.0",
|
|
64
|
-
"@powerhousedao/analytics-engine-browser": "6.0.0-dev.
|
|
65
|
-
"@powerhousedao/analytics-engine-core": "6.0.0-dev.
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
64
|
+
"@powerhousedao/analytics-engine-browser": "6.0.0-dev.92",
|
|
65
|
+
"@powerhousedao/analytics-engine-core": "6.0.0-dev.92",
|
|
66
|
+
"@powerhousedao/reactor": "6.0.0-dev.92",
|
|
67
|
+
"@renown/sdk": "6.0.0-dev.92",
|
|
68
|
+
"document-model": "6.0.0-dev.92",
|
|
69
|
+
"document-drive": "6.0.0-dev.92"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"react": ">=19.0.0",
|