@xyo-network/react-chain-blockchain 1.23.0 → 1.23.2

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.
@@ -1,6 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/components/account/BalanceHistoryFlexbox.tsx
5
2
  import { Typography as Typography8 } from "@mui/material";
6
3
  import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
@@ -8,16 +5,15 @@ import { isDefined as isDefined8 } from "@xylabs/sdk-js";
8
5
  import { useAccountBalanceHistory } from "@xyo-network/react-chain-provider";
9
6
  import { ErrorRender as ErrorRender3 } from "@xyo-network/react-error";
10
7
  import { AttoXL1 } from "@xyo-network/xl1-sdk";
11
- import React31 from "react";
12
8
 
13
9
  // src/components/account/helpers/formatBalanceMagnitude.ts
14
10
  import { XL1Amount } from "@xyo-network/xl1-sdk";
15
- var formatBalanceMagnitude = /* @__PURE__ */ __name((set) => {
11
+ var formatBalanceMagnitude = (set) => {
16
12
  const [received, sent] = set;
17
13
  const netBalance = received - sent;
18
14
  return netBalance < 0n ? `-${formatBalance(sent - received)}` : formatBalance(netBalance);
19
- }, "formatBalanceMagnitude");
20
- var formatBalance = /* @__PURE__ */ __name((balance) => {
15
+ };
16
+ var formatBalance = (balance) => {
21
17
  const xl1Amount = new XL1Amount(balance);
22
18
  return xl1Amount.toString(void 0, {
23
19
  places: 18,
@@ -26,25 +22,30 @@ var formatBalance = /* @__PURE__ */ __name((balance) => {
26
22
  minDecimals: 1,
27
23
  locale: navigator.language
28
24
  });
29
- }, "formatBalance");
25
+ };
30
26
 
31
27
  // src/components/account/table/BalanceHistoryTableEx.tsx
32
- import { TableBody as TableBody2, TableCell as TableCell15, TableHead as TableHead2, TableRow as TableRow3 } from "@mui/material";
28
+ import {
29
+ TableBody as TableBody2,
30
+ TableCell as TableCell15,
31
+ TableHead as TableHead2,
32
+ TableRow as TableRow3
33
+ } from "@mui/material";
33
34
  import { isDefined as isDefined7 } from "@xylabs/sdk-js";
34
35
  import { TableEx as TableEx2 } from "@xyo-network/react-table";
35
- import React30 from "react";
36
36
 
37
37
  // src/components/account/table/BalanceHistoryTableRow.tsx
38
- import { TableCell as TableCell14 } from "@mui/material";
38
+ import {
39
+ TableCell as TableCell14
40
+ } from "@mui/material";
39
41
  import { isDefined as isDefined6 } from "@xylabs/sdk-js";
40
42
  import { RawInfoIconButton } from "@xyo-network/react-payload-raw-info";
41
- import React29, { useMemo as useMemo7 } from "react";
43
+ import { useMemo as useMemo7 } from "react";
42
44
 
43
45
  // src/components/block/BlockHeadingFlexbox.tsx
44
46
  import { FlexCol as FlexCol2, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
45
47
  import { BWVerification, HashHeadingPaper } from "@xyo-network/react-boundwitness-plugin";
46
48
  import { usePayloadHash } from "@xyo-network/react-shared";
47
- import React12 from "react";
48
49
 
49
50
  // src/context/analyzer/context.ts
50
51
  import { createContextEx } from "@xylabs/react-shared";
@@ -52,7 +53,7 @@ var ChainAnalyzersContext = createContextEx();
52
53
 
53
54
  // src/context/analyzer/use.ts
54
55
  import { useContextEx } from "@xylabs/react-shared";
55
- var useChainAnalyzersContext = /* @__PURE__ */ __name((required = false) => useContextEx(ChainAnalyzersContext, "ChainAnalyzers", required), "useChainAnalyzersContext");
56
+ var useChainAnalyzersContext = (required = false) => useContextEx(ChainAnalyzersContext, "ChainAnalyzers", required);
56
57
 
57
58
  // src/context/polling/context.ts
58
59
  import { createContextEx as createContextEx2 } from "@xylabs/react-shared";
@@ -60,16 +61,20 @@ var ChainPollingContext = createContextEx2();
60
61
 
61
62
  // src/context/polling/use.ts
62
63
  import { useContextEx as useContextEx2 } from "@xylabs/react-shared";
63
- var useChainPollingContext = /* @__PURE__ */ __name((required = false) => useContextEx2(ChainPollingContext, "ChainPolling", required), "useChainPollingContext");
64
+ var useChainPollingContext = (required = false) => useContextEx2(ChainPollingContext, "ChainPolling", required);
64
65
 
65
66
  // src/components/transactions/submit/Builder.tsx
66
- import { Button, FormControl, TextField } from "@mui/material";
67
+ import {
68
+ Button,
69
+ FormControl,
70
+ TextField
71
+ } from "@mui/material";
67
72
  import { FlexCol } from "@xylabs/react-flexbox";
68
73
  import { toHex } from "@xylabs/sdk-js";
69
74
  import { defaultTransactionFees, toXL1BlockNumber } from "@xyo-network/xl1-sdk";
70
- import React2 from "react";
71
- var ChainTransactionBuilder = /* @__PURE__ */ __name(({ onSubmitTx }) => {
72
- const handleSubmit = /* @__PURE__ */ __name(async (event) => {
75
+ import { jsx, jsxs } from "react/jsx-runtime";
76
+ var ChainTransactionBuilder = ({ onSubmitTx }) => {
77
+ const handleSubmit = async (event) => {
73
78
  event.preventDefault();
74
79
  const formData = new FormData(event.currentTarget);
75
80
  const chainTx = {
@@ -84,52 +89,31 @@ var ChainTransactionBuilder = /* @__PURE__ */ __name(({ onSubmitTx }) => {
84
89
  }
85
90
  };
86
91
  await onSubmitTx?.(chainTx);
87
- }, "handleSubmit");
88
- return /* @__PURE__ */ React2.createElement("form", {
89
- onSubmit: /* @__PURE__ */ __name((event) => void handleSubmit(event), "onSubmit"),
90
- style: {
91
- width: "100%"
92
- }
93
- }, /* @__PURE__ */ React2.createElement(FlexCol, {
94
- sx: {
95
- gap: 2
96
- }
97
- }, /* @__PURE__ */ React2.createElement(FormControl, {
98
- fullWidth: true
99
- }, /* @__PURE__ */ React2.createElement(TextField, {
100
- label: "Chain Address",
101
- name: "chain",
102
- required: true
103
- })), /* @__PURE__ */ React2.createElement(FormControl, {
104
- fullWidth: true
105
- }, /* @__PURE__ */ React2.createElement(TextField, {
106
- label: "Gas",
107
- name: "gas",
108
- required: true
109
- })), /* @__PURE__ */ React2.createElement(FormControl, {
110
- fullWidth: true
111
- }, /* @__PURE__ */ React2.createElement(TextField, {
112
- label: "Not Before Block",
113
- name: "nbf",
114
- required: true
115
- })), /* @__PURE__ */ React2.createElement(FormControl, {
116
- fullWidth: true
117
- }, /* @__PURE__ */ React2.createElement(TextField, {
118
- label: "Not After Block",
119
- name: "exp",
120
- required: true
121
- })), /* @__PURE__ */ React2.createElement(Button, {
122
- type: "submit",
123
- variant: "contained"
124
- }, "Submit")));
125
- }, "ChainTransactionBuilder");
92
+ };
93
+ return /* @__PURE__ */ jsx("form", { onSubmit: (event) => void handleSubmit(event), style: { width: "100%" }, children: /* @__PURE__ */ jsxs(FlexCol, { sx: { gap: 2 }, children: [
94
+ /* @__PURE__ */ jsx(FormControl, { fullWidth: true, children: /* @__PURE__ */ jsx(TextField, { label: "Chain Address", name: "chain", required: true }) }),
95
+ /* @__PURE__ */ jsx(FormControl, { fullWidth: true, children: /* @__PURE__ */ jsx(TextField, { label: "Gas", name: "gas", required: true }) }),
96
+ /* @__PURE__ */ jsx(FormControl, { fullWidth: true, children: /* @__PURE__ */ jsx(TextField, { label: "Not Before Block", name: "nbf", required: true }) }),
97
+ /* @__PURE__ */ jsx(FormControl, { fullWidth: true, children: /* @__PURE__ */ jsx(TextField, { label: "Not After Block", name: "exp", required: true }) }),
98
+ /* @__PURE__ */ jsx(Button, { type: "submit", variant: "contained", children: "Submit" })
99
+ ] }) });
100
+ };
126
101
 
127
102
  // src/components/transactions/submit/Network.tsx
128
- import { FormControl as FormControl2, FormHelperText, TextField as TextField2 } from "@mui/material";
129
- import React3, { useState } from "react";
130
- var ChainTransactionNetwork = /* @__PURE__ */ __name(({ network, onNetworkChange, ...props }) => {
103
+ import {
104
+ FormControl as FormControl2,
105
+ FormHelperText,
106
+ TextField as TextField2
107
+ } from "@mui/material";
108
+ import { useState } from "react";
109
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
110
+ var ChainTransactionNetwork = ({
111
+ network,
112
+ onNetworkChange,
113
+ ...props
114
+ }) => {
131
115
  const [error, setError] = useState();
132
- const handleChange = /* @__PURE__ */ __name((event) => {
116
+ const handleChange = (event) => {
133
117
  try {
134
118
  const url = new URL(event.target.value);
135
119
  setError(void 0);
@@ -138,55 +122,54 @@ var ChainTransactionNetwork = /* @__PURE__ */ __name(({ network, onNetworkChange
138
122
  console.error(error2);
139
123
  setError(error2);
140
124
  }
141
- }, "handleChange");
142
- return /* @__PURE__ */ React3.createElement(FormControl2, {
143
- fullWidth: true
144
- }, /* @__PURE__ */ React3.createElement(TextField2, {
145
- label: "Network",
146
- name: "network",
147
- onChange: handleChange,
148
- required: true,
149
- value: network,
150
- ...props
151
- }), /* @__PURE__ */ React3.createElement(FormHelperText, {
152
- sx: {
153
- color: error ? "red" : void 0
154
- }
155
- }, error ? "Not a valid url" : "Enter full url of archivist"));
156
- }, "ChainTransactionNetwork");
125
+ };
126
+ return /* @__PURE__ */ jsxs2(FormControl2, { fullWidth: true, children: [
127
+ /* @__PURE__ */ jsx2(TextField2, { label: "Network", name: "network", onChange: handleChange, required: true, value: network, ...props }),
128
+ /* @__PURE__ */ jsx2(FormHelperText, { sx: { color: error ? "red" : void 0 }, children: error ? "Not a valid url" : "Enter full url of archivist" })
129
+ ] });
130
+ };
157
131
 
158
132
  // src/components/transactions/submit/SubmitChain.tsx
159
- import { Alert, Grid, Typography } from "@mui/material";
133
+ import {
134
+ Alert,
135
+ Grid,
136
+ Typography
137
+ } from "@mui/material";
160
138
  import { ErrorRender } from "@xylabs/react-error";
161
139
  import { FlexGrowCol } from "@xylabs/react-flexbox";
162
140
  import { FetchJsonClient } from "@xylabs/sdk-js";
163
- import { Account, ArchivistInsertQuerySchema, PayloadBuilder, QueryBoundWitnessBuilder } from "@xyo-network/sdk-js";
141
+ import {
142
+ Account,
143
+ ArchivistInsertQuerySchema,
144
+ PayloadBuilder,
145
+ QueryBoundWitnessBuilder
146
+ } from "@xyo-network/sdk-js";
164
147
  import { buildTransaction } from "@xyo-network/xl1-sdk";
165
- import React4, { useState as useState2 } from "react";
148
+ import { useState as useState2 } from "react";
149
+ import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
166
150
  var BETA_PENDING_TRANSACTIONS_ARCHIVIST = "https://beta.api.chain.xyo.network/8050fee682a2762f504d5449d8269a6f17f0b693";
167
151
  var defaultNetwork = new URL(BETA_PENDING_TRANSACTIONS_ARCHIVIST);
168
- var SubmitChainTransaction = /* @__PURE__ */ __name(() => {
152
+ var SubmitChainTransaction = () => {
169
153
  const [network, setNetwork] = useState2(defaultNetwork);
170
154
  const [result, setResult] = useState2();
171
155
  const [error, setError] = useState2();
172
- const onSubmitTx = /* @__PURE__ */ __name(async (chainTx) => {
156
+ const onSubmitTx = async (chainTx) => {
173
157
  if (network) {
174
158
  const randomAccount = await Account.random();
175
- const [transactionBoundWitness] = await buildTransaction(chainTx.chain, [], [], randomAccount, chainTx.nbf, chainTx.exp);
176
- const insertQuery = new PayloadBuilder({
177
- schema: ArchivistInsertQuerySchema
178
- }).build();
179
- const [queryBoundWitness] = await new QueryBoundWitnessBuilder().payloads([
180
- transactionBoundWitness
181
- ]).query(insertQuery).signer(randomAccount).build();
182
- const response = await new FetchJsonClient().post(network.href, [
183
- queryBoundWitness,
184
- [
185
- insertQuery,
186
- transactionBoundWitness,
187
- chainTx
188
- ]
189
- ]);
159
+ const [transactionBoundWitness] = await buildTransaction(
160
+ chainTx.chain,
161
+ [],
162
+ [],
163
+ randomAccount,
164
+ chainTx.nbf,
165
+ chainTx.exp
166
+ );
167
+ const insertQuery = new PayloadBuilder({ schema: ArchivistInsertQuerySchema }).build();
168
+ const [queryBoundWitness] = await new QueryBoundWitnessBuilder().payloads([transactionBoundWitness]).query(insertQuery).signer(randomAccount).build();
169
+ const response = await new FetchJsonClient().post(
170
+ network.href,
171
+ [queryBoundWitness, [insertQuery, transactionBoundWitness, chainTx]]
172
+ );
190
173
  const envelope = response.data;
191
174
  if (!envelope) {
192
175
  setError(new Error("Empty response from archivist"));
@@ -196,72 +179,91 @@ var SubmitChainTransaction = /* @__PURE__ */ __name(() => {
196
179
  setResult(envelope.data);
197
180
  }
198
181
  }
199
- }, "onSubmitTx");
200
- const onNetworkChange = /* @__PURE__ */ __name((url) => {
182
+ };
183
+ const onNetworkChange = (url) => {
201
184
  setNetwork(url);
202
- }, "onNetworkChange");
203
- return /* @__PURE__ */ React4.createElement(Grid, {
204
- container: true
205
- }, /* @__PURE__ */ React4.createElement(Grid, {
206
- size: {
207
- xs: 12,
208
- sm: 6,
209
- md: 4
210
- }
211
- }, /* @__PURE__ */ React4.createElement(FlexGrowCol, {
212
- sx: {
213
- alignItems: "start",
214
- gap: 2
185
+ };
186
+ return /* @__PURE__ */ jsx3(Grid, { container: true, children: /* @__PURE__ */ jsx3(
187
+ Grid,
188
+ {
189
+ size: {
190
+ xs: 12,
191
+ sm: 6,
192
+ md: 4
193
+ },
194
+ children: /* @__PURE__ */ jsxs3(
195
+ FlexGrowCol,
196
+ {
197
+ sx: {
198
+ alignItems: "start",
199
+ gap: 2
200
+ },
201
+ children: [
202
+ /* @__PURE__ */ jsx3(ChainTransactionNetwork, { network, onNetworkChange }),
203
+ network ? /* @__PURE__ */ jsx3(ChainTransactionBuilder, { onSubmitTx }) : null,
204
+ result?.[2].length === 0 ? /* @__PURE__ */ jsx3(Alert, { severity: "success", children: "Success" }) : null,
205
+ error ? /* @__PURE__ */ jsx3(ErrorRender, { error }) : null,
206
+ result?.[2] && result?.[2].length > 0 ? /* @__PURE__ */ jsx3(ErrorRender, { error: new Error("Failed insert...see result below") }) : null,
207
+ result ? /* @__PURE__ */ jsxs3(Fragment, { children: [
208
+ /* @__PURE__ */ jsx3(Typography, { variant: "h6", children: "Result:" }),
209
+ /* @__PURE__ */ jsx3("pre", { children: JSON.stringify(result, null, 2) })
210
+ ] }) : null
211
+ ]
212
+ }
213
+ )
215
214
  }
216
- }, /* @__PURE__ */ React4.createElement(ChainTransactionNetwork, {
217
- network,
218
- onNetworkChange
219
- }), network ? /* @__PURE__ */ React4.createElement(ChainTransactionBuilder, {
220
- onSubmitTx
221
- }) : null, result?.[2].length === 0 ? /* @__PURE__ */ React4.createElement(Alert, {
222
- severity: "success"
223
- }, "Success") : null, error ? /* @__PURE__ */ React4.createElement(ErrorRender, {
224
- error
225
- }) : null, result?.[2] && result?.[2].length > 0 ? /* @__PURE__ */ React4.createElement(ErrorRender, {
226
- error: new Error("Failed insert...see result below")
227
- }) : null, result ? /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(Typography, {
228
- variant: "h6"
229
- }, "Result:"), /* @__PURE__ */ React4.createElement("pre", null, JSON.stringify(result, null, 2))) : null)));
230
- }, "SubmitChainTransaction");
215
+ ) });
216
+ };
231
217
 
232
218
  // src/components/transactions/TransactionCountChip.tsx
233
219
  import CompareArrowsIcon from "@mui/icons-material/CompareArrows";
234
220
  import { Chip, Icon } from "@mui/material";
235
- import React5, { useMemo } from "react";
236
- var TransactionCountChip = /* @__PURE__ */ __name(({ transactions, sx, ...props }) => {
221
+ import { useMemo } from "react";
222
+ import { jsx as jsx4 } from "react/jsx-runtime";
223
+ var TransactionCountChip = ({
224
+ transactions,
225
+ sx,
226
+ ...props
227
+ }) => {
237
228
  const label = useMemo(() => {
238
229
  if (!transactions) return "0";
239
230
  return transactions?.length > 10 ? "+10" : transactions.length;
240
- }, [
241
- transactions
242
- ]);
243
- return /* @__PURE__ */ React5.createElement(Chip, {
244
- avatar: /* @__PURE__ */ React5.createElement(Icon, null, /* @__PURE__ */ React5.createElement(CompareArrowsIcon, null)),
245
- label,
246
- title: transactions ? `Block contains ${transactions.length} transactions` : void 0,
247
- sx: {
248
- display: "inline-flex",
249
- alignItems: "center",
250
- justifyContent: "center",
251
- ...sx
252
- },
253
- ...props
254
- });
255
- }, "TransactionCountChip");
231
+ }, [transactions]);
232
+ return /* @__PURE__ */ jsx4(
233
+ Chip,
234
+ {
235
+ avatar: /* @__PURE__ */ jsx4(Icon, { children: /* @__PURE__ */ jsx4(CompareArrowsIcon, {}) }),
236
+ label,
237
+ title: transactions ? `Block contains ${transactions.length} transactions` : void 0,
238
+ sx: {
239
+ display: "inline-flex",
240
+ alignItems: "center",
241
+ justifyContent: "center",
242
+ ...sx
243
+ },
244
+ ...props
245
+ }
246
+ );
247
+ };
256
248
 
257
249
  // src/components/transactions/TransactionsQuickTipButton.tsx
258
250
  import { ContentCopy as ContentCopyIcon, Paid } from "@mui/icons-material";
259
- import { Alert as Alert2, AlertTitle, Collapse, Snackbar, Typography as Typography2 } from "@mui/material";
251
+ import {
252
+ Alert as Alert2,
253
+ AlertTitle,
254
+ Collapse,
255
+ Snackbar,
256
+ Typography as Typography2
257
+ } from "@mui/material";
260
258
  import { ErrorRender as ErrorRender2 } from "@xylabs/react-error";
261
- import { FlexGrowCol as FlexGrowCol2, FlexGrowRow, FlexRow } from "@xylabs/react-flexbox";
259
+ import {
260
+ FlexGrowCol as FlexGrowCol2,
261
+ FlexGrowRow,
262
+ FlexRow
263
+ } from "@xylabs/react-flexbox";
262
264
  import { QuickTipButton } from "@xylabs/react-quick-tip-button";
263
265
  import { isDefined as isDefined2 } from "@xylabs/sdk-js";
264
- import React6, { Fragment, useState as useState4 } from "react";
266
+ import { Fragment as Fragment2, useState as useState4 } from "react";
265
267
 
266
268
  // src/hooks/chain-iterator/useChainIteratorParams.ts
267
269
  import { usePromise } from "@xylabs/react-promise";
@@ -269,23 +271,29 @@ import { isHash } from "@xylabs/sdk-js";
269
271
  import { assertEx, isDefined } from "@xylabs/sdk-js";
270
272
  import { BoundWitnessBuilder } from "@xyo-network/sdk-js";
271
273
  import { ConfigZod, isBlockBoundWitness } from "@xyo-network/xl1-sdk";
272
- var resolveDefinedHead = /* @__PURE__ */ __name(async (head, chainArchivist) => {
273
- const [headPayload] = await chainArchivist.get([
274
- head
275
- ]);
274
+ var resolveDefinedHead = async (head, chainArchivist) => {
275
+ const [headPayload] = await chainArchivist.get([head]);
276
276
  if (headPayload === void 0) {
277
277
  const [currentHead] = await new BoundWitnessBuilder().build();
278
278
  return currentHead;
279
279
  } else {
280
280
  return assertEx(isBlockBoundWitness(headPayload) ? headPayload : void 0, () => `Expected a block bound witness: ${JSON.stringify(headPayload)}`);
281
281
  }
282
- }, "resolveDefinedHead");
283
- var useChainIteratorParams = /* @__PURE__ */ __name(({ chainMap, chainId, head, name }) => {
282
+ };
283
+ var useChainIteratorParams = ({
284
+ chainMap,
285
+ chainId,
286
+ head,
287
+ name
288
+ }) => {
284
289
  return usePromise(async () => {
285
290
  if (isDefined(chainMap) && isDefined(chainId) && isHash(head)) {
286
291
  const result = await chainMap.get(head);
287
292
  const foundResult = assertEx(result, () => `Head not found: ${head}`);
288
- const resolvedHead = assertEx(isBlockBoundWitness(foundResult) ? foundResult : void 0, () => `Head is not a boundwitness: ${JSON.stringify(foundResult)}`);
293
+ const resolvedHead = assertEx(
294
+ isBlockBoundWitness(foundResult) ? foundResult : void 0,
295
+ () => `Head is not a boundwitness: ${JSON.stringify(foundResult)}`
296
+ );
289
297
  const config = ConfigZod.parse({});
290
298
  config.chain.id = chainId;
291
299
  return {
@@ -296,22 +304,15 @@ var useChainIteratorParams = /* @__PURE__ */ __name(({ chainMap, chainId, head,
296
304
  name
297
305
  };
298
306
  }
299
- }, [
300
- chainMap,
301
- chainId,
302
- head
303
- ]);
304
- }, "useChainIteratorParams");
307
+ }, [chainMap, chainId, head]);
308
+ };
305
309
 
306
310
  // src/hooks/useBaseContext.ts
307
311
  import { useState as useState3 } from "react";
308
- var useBaseContext = /* @__PURE__ */ __name(() => {
309
- const [context] = useState3({
310
- caches: {},
311
- singletons: {}
312
- });
312
+ var useBaseContext = () => {
313
+ const [context] = useState3({ caches: {}, singletons: {} });
313
314
  return context;
314
- }, "useBaseContext");
315
+ };
315
316
 
316
317
  // src/hooks/useTxsFromBlock.ts
317
318
  import { usePromise as usePromise2 } from "@xylabs/react-promise";
@@ -319,26 +320,25 @@ import { usePromise as usePromise2 } from "@xylabs/react-promise";
319
320
  // src/helpers/txsFromBlock.ts
320
321
  import { HydratedBlockWrapper } from "@xyo-network/chain-wrappers";
321
322
  import { PayloadBuilder as PayloadBuilder2 } from "@xyo-network/sdk-js";
322
- var txsFromBlock = /* @__PURE__ */ __name(async (block) => {
323
+ var txsFromBlock = async (block) => {
323
324
  const wrapper = await HydratedBlockWrapper.parse(block);
324
325
  const txs = wrapper.transactions;
325
326
  const txPayloads = txs.map((tx) => tx.boundWitness);
326
327
  return await PayloadBuilder2.hashPairs(txPayloads);
327
- }, "txsFromBlock");
328
+ };
328
329
 
329
330
  // src/hooks/useTxsFromBlock.ts
330
- var useTxsFromBlock = /* @__PURE__ */ __name((block) => {
331
+ var useTxsFromBlock = (block) => {
331
332
  return usePromise2(async () => {
332
333
  if (block) {
333
334
  return await txsFromBlock(block);
334
335
  }
335
- }, [
336
- block
337
- ]);
338
- }, "useTxsFromBlock");
336
+ }, [block]);
337
+ };
339
338
 
340
339
  // src/components/transactions/TransactionsQuickTipButton.tsx
341
- var TransactionsQuickTipButton = /* @__PURE__ */ __name(({ block, ...props }) => {
340
+ import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
341
+ var TransactionsQuickTipButton = ({ block, ...props }) => {
342
342
  const [transactions, transactionsError] = useTxsFromBlock(block);
343
343
  const [copied, setCopied] = useState4(false);
344
344
  const [closeDialog, setCloseDialog] = useState4(false);
@@ -348,70 +348,76 @@ var TransactionsQuickTipButton = /* @__PURE__ */ __name(({ block, ...props }) =>
348
348
  setPreviousTransactionError(transactionsError);
349
349
  setCloseDialog(false);
350
350
  }
351
- const onCopy = /* @__PURE__ */ __name(async (transactionHash) => {
351
+ const onCopy = async (transactionHash) => {
352
352
  await navigator.clipboard.writeText(transactionHash);
353
353
  setCopied(true);
354
354
  setTimeout(() => {
355
355
  setCopied(false);
356
356
  }, 5e3);
357
- }, "onCopy");
358
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(QuickTipButton, {
359
- Icon: Paid,
360
- disabled: transactions?.length === 0,
361
- hoverText: `Transaction Count: ${transactions?.length ?? 0}`,
362
- disableDialog: transactions?.length === 0,
363
- dialogProps: {
364
- fullWidth: true,
365
- maxWidth: "md"
366
- },
367
- ...props
368
- }, transactions?.length === 0 ? null : /* @__PURE__ */ React6.createElement(FlexGrowCol2, {
369
- sx: {
370
- gap: 1,
371
- alignItems: "stretch"
372
- }
373
- }, transactions?.map(([_transaction, hash]) => /* @__PURE__ */ React6.createElement(Fragment, {
374
- key: hash
375
- }, /* @__PURE__ */ React6.createElement(FlexGrowRow, {
376
- sx: {
377
- gap: 2,
378
- justifyContent: "start"
379
- }
380
- }, /* @__PURE__ */ React6.createElement(ContentCopyIcon, {
381
- sx: {
382
- cursor: "pointer"
383
- },
384
- onClick: /* @__PURE__ */ __name(() => void onCopy(hash), "onClick")
385
- }), /* @__PURE__ */ React6.createElement(Typography2, {
386
- sx: {
387
- overflow: "hidden",
388
- textOverflow: "ellipsis",
389
- whiteSpace: "nowrap"
390
- }
391
- }, hash)), /* @__PURE__ */ React6.createElement(FlexRow, null, /* @__PURE__ */ React6.createElement(Collapse, {
392
- in: copied,
393
- unmountOnExit: true
394
- }, /* @__PURE__ */ React6.createElement(Alert2, null, /* @__PURE__ */ React6.createElement(AlertTitle, null, "Previous hash copied to clipboard")))))))), /* @__PURE__ */ React6.createElement(Snackbar, {
395
- open: open && closeDialog === false,
396
- onClose: /* @__PURE__ */ __name(() => setCloseDialog(true), "onClose")
397
- }, /* @__PURE__ */ React6.createElement(ErrorRender2, {
398
- error: transactionsError,
399
- scope: "TransactionsQuickTipButton"
400
- })));
401
- }, "TransactionsQuickTipButton");
357
+ };
358
+ return /* @__PURE__ */ jsxs4(Fragment3, { children: [
359
+ /* @__PURE__ */ jsx5(
360
+ QuickTipButton,
361
+ {
362
+ Icon: Paid,
363
+ disabled: transactions?.length === 0,
364
+ hoverText: `Transaction Count: ${transactions?.length ?? 0}`,
365
+ disableDialog: transactions?.length === 0,
366
+ dialogProps: { fullWidth: true, maxWidth: "md" },
367
+ ...props,
368
+ children: transactions?.length === 0 ? null : /* @__PURE__ */ jsx5(
369
+ FlexGrowCol2,
370
+ {
371
+ sx: {
372
+ gap: 1,
373
+ alignItems: "stretch"
374
+ },
375
+ children: transactions?.map(([_transaction, hash]) => /* @__PURE__ */ jsxs4(Fragment2, { children: [
376
+ /* @__PURE__ */ jsxs4(
377
+ FlexGrowRow,
378
+ {
379
+ sx: {
380
+ gap: 2,
381
+ justifyContent: "start"
382
+ },
383
+ children: [
384
+ /* @__PURE__ */ jsx5(ContentCopyIcon, { sx: { cursor: "pointer" }, onClick: () => void onCopy(hash) }),
385
+ /* @__PURE__ */ jsx5(
386
+ Typography2,
387
+ {
388
+ sx: {
389
+ overflow: "hidden",
390
+ textOverflow: "ellipsis",
391
+ whiteSpace: "nowrap"
392
+ },
393
+ children: hash
394
+ }
395
+ )
396
+ ]
397
+ }
398
+ ),
399
+ /* @__PURE__ */ jsx5(FlexRow, { children: /* @__PURE__ */ jsx5(Collapse, { in: copied, unmountOnExit: true, children: /* @__PURE__ */ jsx5(Alert2, { children: /* @__PURE__ */ jsx5(AlertTitle, { children: "Previous hash copied to clipboard" }) }) }) })
400
+ ] }, hash))
401
+ }
402
+ )
403
+ }
404
+ ),
405
+ /* @__PURE__ */ jsx5(Snackbar, { open: open && closeDialog === false, onClose: () => setCloseDialog(true), children: /* @__PURE__ */ jsx5(ErrorRender2, { error: transactionsError, scope: "TransactionsQuickTipButton" }) })
406
+ ] });
407
+ };
402
408
 
403
409
  // src/components/block/hooks/useAnchorElement.ts
404
410
  import { useRef, useState as useState5 } from "react";
405
- var useAnchorElement = /* @__PURE__ */ __name(() => {
411
+ var useAnchorElement = () => {
406
412
  const [anchorEl, setAnchorEl] = useState5(null);
407
413
  const anchorRef = useRef(null);
408
414
  const open = Boolean(anchorEl);
409
- const handleClick = /* @__PURE__ */ __name((event) => {
415
+ const handleClick = (event) => {
410
416
  setAnchorEl(event.currentTarget);
411
- }, "handleClick");
412
- const handleClose = /* @__PURE__ */ __name(() => {
417
+ };
418
+ const handleClose = () => {
413
419
  setAnchorEl(null);
414
- }, "handleClose");
420
+ };
415
421
  return {
416
422
  anchorEl,
417
423
  anchorRef,
@@ -419,260 +425,262 @@ var useAnchorElement = /* @__PURE__ */ __name(() => {
419
425
  handleClick,
420
426
  handleClose
421
427
  };
422
- }, "useAnchorElement");
428
+ };
423
429
 
424
430
  // src/components/block/hooks/useBlockHeadingEvents.ts
425
431
  import { useEvent } from "@xyo-network/react-event";
426
- var useBlockHeadingEvents = /* @__PURE__ */ __name((...args) => {
432
+ var useBlockHeadingEvents = (...args) => {
427
433
  return useEvent(...args);
428
- }, "useBlockHeadingEvents");
434
+ };
429
435
 
430
436
  // src/components/block/hooks/useBlockProducer.ts
431
437
  import { useMemo as useMemo2 } from "react";
432
- var useBlockProducer = /* @__PURE__ */ __name((block) => {
438
+ var useBlockProducer = (block) => {
433
439
  return useMemo2(() => {
434
440
  if (block) {
435
441
  const producer = block[0].addresses[0];
436
442
  return producer;
437
443
  }
438
- }, [
439
- block
440
- ]);
441
- }, "useBlockProducer");
444
+ }, [block]);
445
+ };
442
446
 
443
447
  // src/components/block/hooks/usePayloadCountsFromBlock.ts
444
448
  import { useMemo as useMemo3 } from "react";
445
449
 
446
450
  // src/components/block/helpers/blockProducer.ts
447
- var blockProducer = /* @__PURE__ */ __name((block) => {
451
+ var blockProducer = (block) => {
448
452
  return block.addresses[0];
449
- }, "blockProducer");
453
+ };
450
454
 
451
455
  // src/components/block/helpers/buildBlockChainRenderComponent.tsx
452
- import React7 from "react";
453
- var buildBlockChainRenderComponent = /* @__PURE__ */ __name(async (context, BlockComponent, blockComponentProps) => {
456
+ import { jsx as jsx6 } from "react/jsx-runtime";
457
+ var buildBlockChainRenderComponent = async (context, BlockComponent, blockComponentProps) => {
454
458
  const { block, ...remainingProps } = blockComponentProps;
455
459
  const blockTxs = await txsFromBlock(block);
456
460
  const txHashes = blockTxs.map(([_, hash]) => hash);
457
461
  const item = {
458
- child: /* @__PURE__ */ React7.createElement(BlockComponent, {
459
- block,
460
- transactions: txHashes,
461
- ...remainingProps
462
- }),
462
+ child: /* @__PURE__ */ jsx6(
463
+ BlockComponent,
464
+ {
465
+ block,
466
+ transactions: txHashes,
467
+ ...remainingProps
468
+ }
469
+ ),
463
470
  key: block[0].block.toString(),
464
471
  block
465
472
  };
466
473
  return item;
467
- }, "buildBlockChainRenderComponent");
474
+ };
468
475
 
469
476
  // src/components/block/helpers/payloadCountsFromBlock.ts
470
477
  import { BoundWitnessSchema } from "@xyo-network/boundwitness-model";
471
478
  import { isTransactionBoundWitness } from "@xyo-network/xl1-sdk";
472
- var payloadCountsFromBlock = /* @__PURE__ */ __name(([block, payloads]) => {
479
+ var payloadCountsFromBlock = ([block, payloads]) => {
473
480
  const publicPayloads = block.payload_schemas.filter((schema) => schema !== BoundWitnessSchema);
474
481
  const transactionHashes = payloads.filter((payload) => isTransactionBoundWitness(payload)).flatMap((payload) => payload.payload_hashes);
475
482
  const privateHashes = transactionHashes.filter((hash) => !payloads.some((payload) => payload._hash === hash));
476
- return [
477
- publicPayloads.length,
478
- privateHashes.length
479
- ];
480
- }, "payloadCountsFromBlock");
483
+ return [publicPayloads.length, privateHashes.length];
484
+ };
481
485
 
482
486
  // src/components/block/hooks/usePayloadCountsFromBlock.ts
483
- var usePayloadCountsFromBlock = /* @__PURE__ */ __name((block) => {
487
+ var usePayloadCountsFromBlock = (block) => {
484
488
  return useMemo3(() => {
485
489
  if (block) {
486
- return [
487
- ...payloadCountsFromBlock(block),
488
- void 0
489
- ];
490
+ return [...payloadCountsFromBlock(block), void 0];
490
491
  }
491
- return [
492
- void 0,
493
- void 0,
494
- void 0
495
- ];
496
- }, [
497
- block
498
- ]);
499
- }, "usePayloadCountsFromBlock");
492
+ return [void 0, void 0, void 0];
493
+ }, [block]);
494
+ };
500
495
 
501
496
  // src/components/block/LinkedDivider.tsx
502
497
  import { Divider, Stack } from "@mui/material";
503
- import React8 from "react";
504
- var LinkedDivider = /* @__PURE__ */ __name(() => {
505
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(Stack, {
506
- className: "divider-spacer",
507
- sx: {
508
- justifyContent: "end",
509
- width: "50%",
510
- height: 24
511
- }
512
- }, /* @__PURE__ */ React8.createElement(Divider, {
513
- className: "divider",
514
- orientation: "vertical",
515
- flexItem: true,
516
- sx: {
517
- borderRightWidth: 2,
518
- height: 24,
519
- transition: "height 1s"
498
+ import { Fragment as Fragment4, jsx as jsx7 } from "react/jsx-runtime";
499
+ var LinkedDivider = () => {
500
+ return /* @__PURE__ */ jsx7(Fragment4, { children: /* @__PURE__ */ jsx7(
501
+ Stack,
502
+ {
503
+ className: "divider-spacer",
504
+ sx: {
505
+ justifyContent: "end",
506
+ width: "50%",
507
+ height: 24
508
+ },
509
+ children: /* @__PURE__ */ jsx7(
510
+ Divider,
511
+ {
512
+ className: "divider",
513
+ orientation: "vertical",
514
+ flexItem: true,
515
+ sx: {
516
+ borderRightWidth: 2,
517
+ height: 24,
518
+ transition: "height 1s"
519
+ }
520
+ }
521
+ )
520
522
  }
521
- })));
522
- }, "LinkedDivider");
523
+ ) });
524
+ };
523
525
 
524
526
  // src/components/block/menu/Expanded.tsx
525
527
  import { MoreVert } from "@mui/icons-material";
526
528
  import { IconButton, Menu } from "@mui/material";
527
529
  import { BWJsonMenuItem, BWPreviousHashMenuItem } from "@xyo-network/react-boundwitness-plugin";
528
- import React9 from "react";
529
- var BlockMenuExpanded = /* @__PURE__ */ __name(({ block }) => {
530
- const { anchorEl, anchorRef, open, handleClick, handleClose } = useAnchorElement();
531
- return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(IconButton, {
532
- ref: anchorRef,
533
- size: "small",
534
- onClick: handleClick
535
- }, /* @__PURE__ */ React9.createElement(MoreVert, {
536
- fontSize: "inherit"
537
- })), /* @__PURE__ */ React9.createElement(Menu, {
538
- open,
530
+ import { Fragment as Fragment5, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
531
+ var BlockMenuExpanded = ({ block }) => {
532
+ const {
539
533
  anchorEl,
540
- anchorOrigin: {
541
- horizontal: "left",
542
- vertical: "bottom"
543
- },
544
- onClose: handleClose
545
- }, /* @__PURE__ */ React9.createElement(BWPreviousHashMenuItem, {
546
- boundwitness: block?.[0],
547
- dense: true,
548
- onDialogClose: handleClose
549
- }), /* @__PURE__ */ React9.createElement(BWJsonMenuItem, {
550
- boundwitness: block?.[0],
551
- dense: true,
552
- onDialogClose: handleClose
553
- })));
554
- }, "BlockMenuExpanded");
534
+ anchorRef,
535
+ open,
536
+ handleClick,
537
+ handleClose
538
+ } = useAnchorElement();
539
+ return /* @__PURE__ */ jsxs5(Fragment5, { children: [
540
+ /* @__PURE__ */ jsx8(IconButton, { ref: anchorRef, size: "small", onClick: handleClick, children: /* @__PURE__ */ jsx8(MoreVert, { fontSize: "inherit" }) }),
541
+ /* @__PURE__ */ jsxs5(
542
+ Menu,
543
+ {
544
+ open,
545
+ anchorEl,
546
+ anchorOrigin: { horizontal: "left", vertical: "bottom" },
547
+ onClose: handleClose,
548
+ children: [
549
+ /* @__PURE__ */ jsx8(BWPreviousHashMenuItem, { boundwitness: block?.[0], dense: true, onDialogClose: handleClose }),
550
+ /* @__PURE__ */ jsx8(BWJsonMenuItem, { boundwitness: block?.[0], dense: true, onDialogClose: handleClose })
551
+ ]
552
+ }
553
+ )
554
+ ] });
555
+ };
555
556
 
556
557
  // src/components/block/ProducerChip.tsx
557
558
  import { Chip as Chip2 } from "@mui/material";
558
- import { EthAddressWrapper, isString, isUndefined, toAddress } from "@xylabs/sdk-js";
559
+ import {
560
+ EthAddressWrapper,
561
+ isString,
562
+ isUndefined,
563
+ toAddress
564
+ } from "@xylabs/sdk-js";
559
565
  import { BlockiesAvatar } from "@xyo-network/xl1-blockies";
560
- import React11, { useMemo as useMemo4 } from "react";
566
+ import { useMemo as useMemo4 } from "react";
561
567
 
562
568
  // src/components/block/ChipSkeleton.tsx
563
569
  import { Skeleton } from "@mui/material";
564
- import React10 from "react";
565
- var ChipSkeleton = /* @__PURE__ */ __name((props) => {
566
- return /* @__PURE__ */ React10.createElement(Skeleton, {
567
- width: 100,
568
- ...props
569
- });
570
- }, "ChipSkeleton");
570
+ import { jsx as jsx9 } from "react/jsx-runtime";
571
+ var ChipSkeleton = (props) => {
572
+ return /* @__PURE__ */ jsx9(Skeleton, { width: 100, ...props });
573
+ };
571
574
 
572
575
  // src/components/block/ProducerChip.tsx
573
- var formatProducerAddress = /* @__PURE__ */ __name((address) => {
576
+ import { jsx as jsx10 } from "react/jsx-runtime";
577
+ var formatProducerAddress = (address) => {
574
578
  if (isUndefined(address) || !isString(address)) return void 0;
575
579
  const formattedAddress = toAddress(address);
576
580
  return EthAddressWrapper.parse(formattedAddress)?.toShortString(4);
577
- }, "formatProducerAddress");
578
- var BlockProducerChip = /* @__PURE__ */ __name(({ block, ...props }) => {
581
+ };
582
+ var BlockProducerChip = ({ block, ...props }) => {
579
583
  const blockProducer2 = block?.[0].addresses[0];
580
- return /* @__PURE__ */ React11.createElement(BlockAddressChip, {
581
- address: blockProducer2,
582
- toolTipTitle: `Block producer: ${blockProducer2}`,
583
- ...props
584
- });
585
- }, "BlockProducerChip");
586
- var BlockAddressChip = /* @__PURE__ */ __name(({ address, sx, toolTipTitle, ...props }) => {
584
+ return /* @__PURE__ */ jsx10(BlockAddressChip, { address: blockProducer2, toolTipTitle: `Block producer: ${blockProducer2}`, ...props });
585
+ };
586
+ var BlockAddressChip = ({
587
+ address,
588
+ sx,
589
+ toolTipTitle,
590
+ ...props
591
+ }) => {
587
592
  const shortedBlockProducer = address === void 0 ? null : formatProducerAddress(address);
588
- const avatar = useMemo4(() => address === "" ? void 0 : /* @__PURE__ */ React11.createElement(BlockiesAvatar, {
589
- blockiesOptions: {
590
- seed: address
593
+ const avatar = useMemo4(() => address === "" ? void 0 : /* @__PURE__ */ jsx10(BlockiesAvatar, { blockiesOptions: { seed: address } }), [address]);
594
+ return /* @__PURE__ */ jsx10(
595
+ Chip2,
596
+ {
597
+ avatar,
598
+ label: shortedBlockProducer ?? /* @__PURE__ */ jsx10(ChipSkeleton, { width: 115 }),
599
+ title: toolTipTitle,
600
+ sx: {
601
+ fontFamily: "monospace",
602
+ cursor: "pointer",
603
+ ...sx
604
+ },
605
+ ...props
591
606
  }
592
- }), [
593
- address
594
- ]);
595
- return /* @__PURE__ */ React11.createElement(Chip2, {
596
- avatar,
597
- label: shortedBlockProducer ?? /* @__PURE__ */ React11.createElement(ChipSkeleton, {
598
- width: 115
599
- }),
600
- title: toolTipTitle,
601
- sx: {
602
- fontFamily: "monospace",
603
- cursor: "pointer",
604
- ...sx
605
- },
606
- ...props
607
- });
608
- }, "BlockAddressChip");
607
+ );
608
+ };
609
609
 
610
610
  // src/components/block/BlockHeadingFlexbox.tsx
611
- var BlockHeadingFlexbox = /* @__PURE__ */ __name(({ block, defaultExpanded, transactions }) => {
611
+ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
612
+ var BlockHeadingFlexbox = ({
613
+ block,
614
+ defaultExpanded,
615
+ transactions
616
+ }) => {
612
617
  const hash = usePayloadHash(block?.[0]);
613
618
  const [blockHeadingRef, blockHeadingListener] = useBlockHeadingEvents();
614
619
  const { pollingState } = useChainPollingContext();
615
620
  const expanded = pollingState === "paused" || defaultExpanded;
616
- const handleTransactionCountClick = /* @__PURE__ */ __name((event, transactions2) => {
621
+ const handleTransactionCountClick = (event, transactions2) => {
617
622
  event.stopPropagation();
618
623
  blockHeadingListener("transaction-count", "click", JSON.stringify(transactions2), event.nativeEvent);
619
- }, "handleTransactionCountClick");
620
- return /* @__PURE__ */ React12.createElement(FlexCol2, {
621
- className: "block-heading-flexbox",
622
- ref: blockHeadingRef,
623
- onClick: /* @__PURE__ */ __name(() => blockHeadingListener("block-hash", "click", hash), "onClick"),
624
- sx: {
625
- alignItems: "stretch"
626
- }
627
- }, /* @__PURE__ */ React12.createElement(LinkedDivider, null), /* @__PURE__ */ React12.createElement(HashHeadingPaper, {
628
- hash,
629
- heading: block?.[0].block === void 0 ? "" : block?.[0].block.toString(),
630
- paperProps: {
631
- sx: {
632
- p: 1,
633
- width: "100%"
634
- }
635
- },
636
- AdornmentEnd: /* @__PURE__ */ React12.createElement(FlexRow2, {
637
- sx: {
638
- gap: 1
639
- }
640
- }, /* @__PURE__ */ React12.createElement(BlockProducerChip, {
641
- block
642
- }), /* @__PURE__ */ React12.createElement(TransactionCountChip, {
643
- onClick: /* @__PURE__ */ __name((e) => handleTransactionCountClick(e, transactions ?? []), "onClick"),
644
- transactions
645
- }), /* @__PURE__ */ React12.createElement(BWVerification, {
646
- iconColors: true,
647
- boundwitness: block?.[0]
648
- }), /* @__PURE__ */ React12.createElement("span", {
649
- style: {
650
- // maxWidth is required for css animation to work and 28px is the width of the icon button
651
- display: "flex",
652
- transition: "max-width .5s",
653
- maxWidth: expanded ? "28px" : 0
654
- }
655
- }, /* @__PURE__ */ React12.createElement(BlockMenuExpanded, {
656
- block
657
- }))),
658
- identiconProps: {
659
- sx: {
660
- p: 0.75
661
- },
662
- size: 18
624
+ };
625
+ return /* @__PURE__ */ jsxs6(
626
+ FlexCol2,
627
+ {
628
+ className: "block-heading-flexbox",
629
+ ref: blockHeadingRef,
630
+ onClick: () => blockHeadingListener("block-hash", "click", hash),
631
+ sx: { alignItems: "stretch" },
632
+ children: [
633
+ /* @__PURE__ */ jsx11(LinkedDivider, {}),
634
+ /* @__PURE__ */ jsx11(
635
+ HashHeadingPaper,
636
+ {
637
+ hash,
638
+ heading: block?.[0].block === void 0 ? "" : block?.[0].block.toString(),
639
+ paperProps: { sx: { p: 1, width: "100%" } },
640
+ AdornmentEnd: /* @__PURE__ */ jsxs6(FlexRow2, { sx: { gap: 1 }, children: [
641
+ /* @__PURE__ */ jsx11(BlockProducerChip, { block }),
642
+ /* @__PURE__ */ jsx11(
643
+ TransactionCountChip,
644
+ {
645
+ onClick: (e) => handleTransactionCountClick(e, transactions ?? []),
646
+ transactions
647
+ }
648
+ ),
649
+ /* @__PURE__ */ jsx11(BWVerification, { iconColors: true, boundwitness: block?.[0] }),
650
+ /* @__PURE__ */ jsx11(
651
+ "span",
652
+ {
653
+ style: {
654
+ // maxWidth is required for css animation to work and 28px is the width of the icon button
655
+ display: "flex",
656
+ transition: "max-width .5s",
657
+ maxWidth: expanded ? "28px" : 0
658
+ },
659
+ children: /* @__PURE__ */ jsx11(BlockMenuExpanded, { block })
660
+ }
661
+ )
662
+ ] }),
663
+ identiconProps: { sx: { p: 0.75 }, size: 18 }
664
+ }
665
+ )
666
+ ]
663
667
  }
664
- }));
665
- }, "BlockHeadingFlexbox");
668
+ );
669
+ };
666
670
 
667
671
  // src/components/block/table/cell/BlockNumber.tsx
668
- import { Link, TableCell, Tooltip, Typography as Typography3 } from "@mui/material";
669
- import React13 from "react";
672
+ import {
673
+ Link,
674
+ TableCell,
675
+ Tooltip,
676
+ Typography as Typography3
677
+ } from "@mui/material";
670
678
 
671
679
  // src/components/block/table/cell/hooks/useLinkedBlockItem.tsx
672
680
  import { useEvent as useEvent2 } from "@xyo-network/react-event";
673
- var useLinkedBlockItem = /* @__PURE__ */ __name((noun, data) => {
681
+ var useLinkedBlockItem = (noun, data) => {
674
682
  const [ref, dispatch] = useEvent2();
675
- const handleClick = /* @__PURE__ */ __name((event) => {
683
+ const handleClick = (event) => {
676
684
  event.preventDefault();
677
685
  event.stopPropagation();
678
686
  if (noun === void 0) {
@@ -684,45 +692,39 @@ var useLinkedBlockItem = /* @__PURE__ */ __name((noun, data) => {
684
692
  if (!isTextSelected) {
685
693
  dispatch(noun, "click", data, event.nativeEvent);
686
694
  }
687
- }, "handleClick");
688
- return [
689
- ref,
690
- handleClick
691
- ];
692
- }, "useLinkedBlockItem");
695
+ };
696
+ return [ref, handleClick];
697
+ };
693
698
 
694
699
  // src/components/block/table/cell/BlockNumber.tsx
695
- var BlockNumberTableCell = /* @__PURE__ */ __name(({ block, eventNoun = "block-number", linked, ...props }) => {
700
+ import { jsx as jsx12 } from "react/jsx-runtime";
701
+ var BlockNumberTableCell = ({
702
+ block,
703
+ eventNoun = "block-number",
704
+ linked,
705
+ ...props
706
+ }) => {
696
707
  const blockNumber = block?.[0].block;
697
- return /* @__PURE__ */ React13.createElement(BlockNumberTableCellInner, {
698
- blockNumber,
699
- eventNoun,
700
- linked,
701
- ...props
702
- });
703
- }, "BlockNumberTableCell");
704
- var BlockNumberTableCellInner = /* @__PURE__ */ __name(({ blockNumber, eventNoun = "block-number", linked, ...props }) => {
708
+ return /* @__PURE__ */ jsx12(BlockNumberTableCellInner, { blockNumber, eventNoun, linked, ...props });
709
+ };
710
+ var BlockNumberTableCellInner = ({
711
+ blockNumber,
712
+ eventNoun = "block-number",
713
+ linked,
714
+ ...props
715
+ }) => {
705
716
  const [ref, handleClick] = useLinkedBlockItem(eventNoun, blockNumber?.toLocaleString());
706
- return /* @__PURE__ */ React13.createElement(TableCell, {
707
- ref,
708
- ...props
709
- }, /* @__PURE__ */ React13.createElement(Tooltip, {
710
- title: `Block Number: ${blockNumber}`
711
- }, /* @__PURE__ */ React13.createElement(Typography3, {
712
- component: "span",
713
- variant: "body1"
714
- }, linked ? /* @__PURE__ */ React13.createElement(Link, {
715
- onClick: handleClick,
716
- sx: {
717
- cursor: "pointer"
718
- }
719
- }, blockNumber) : blockNumber)));
720
- }, "BlockNumberTableCellInner");
717
+ return /* @__PURE__ */ jsx12(TableCell, { ref, ...props, children: /* @__PURE__ */ jsx12(Tooltip, { title: `Block Number: ${blockNumber}`, children: /* @__PURE__ */ jsx12(Typography3, { component: "span", variant: "body1", children: linked ? /* @__PURE__ */ jsx12(Link, { onClick: handleClick, sx: { cursor: "pointer" }, children: blockNumber }) : blockNumber }) }) });
718
+ };
721
719
 
722
720
  // src/components/block/table/cell/Epoch.tsx
723
- import { Skeleton as Skeleton2, TableCell as TableCell2, Tooltip as Tooltip2, Typography as Typography4 } from "@mui/material";
721
+ import {
722
+ Skeleton as Skeleton2,
723
+ TableCell as TableCell2,
724
+ Tooltip as Tooltip2,
725
+ Typography as Typography4
726
+ } from "@mui/material";
724
727
  import { isDefined as isDefined3 } from "@xylabs/sdk-js";
725
- import React14 from "react";
726
728
 
727
729
  // src/components/block/table/cell/helpers/timeFunctions.ts
728
730
  var dateFormat = Intl.DateTimeFormat(globalThis.navigator.language ?? "en-US", {
@@ -733,7 +735,7 @@ var dateFormat = Intl.DateTimeFormat(globalThis.navigator.language ?? "en-US", {
733
735
  minute: "2-digit",
734
736
  second: "2-digit"
735
737
  });
736
- var timeAgo = /* @__PURE__ */ __name((epoch, locale = navigator.language ?? "en-US") => {
738
+ var timeAgo = (epoch, locale = navigator.language ?? "en-US") => {
737
739
  const now = Date.now();
738
740
  const diffInSeconds = Math.floor((now - epoch) / 1e3);
739
741
  const units = [
@@ -776,118 +778,138 @@ var timeAgo = /* @__PURE__ */ __name((epoch, locale = navigator.language ?? "en-
776
778
  for (const unit of units) {
777
779
  if (Math.abs(diffInSeconds) < unit.max) {
778
780
  const value = Math.round(diffInSeconds / unit.value);
779
- return new Intl.RelativeTimeFormat(locale, {
780
- numeric: "auto"
781
- }).format(-value, unit.name);
781
+ return new Intl.RelativeTimeFormat(locale, { numeric: "auto" }).format(-value, unit.name);
782
782
  }
783
783
  }
784
- }, "timeAgo");
784
+ };
785
785
 
786
786
  // src/components/block/table/cell/Epoch.tsx
787
- var BlockEpochTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
787
+ import { jsx as jsx13 } from "react/jsx-runtime";
788
+ var BlockEpochTableCell = ({
789
+ block,
790
+ linked,
791
+ ...props
792
+ }) => {
788
793
  const epoch = block?.[0]?.$epoch;
789
794
  const dateTime = dateFormat.format(epoch);
790
795
  const age = isDefined3(epoch) ? timeAgo(epoch) : void 0;
791
- return /* @__PURE__ */ React14.createElement(TableCell2, props, /* @__PURE__ */ React14.createElement(Tooltip2, {
792
- title: `Block Epoch: ${dateTime}`
793
- }, /* @__PURE__ */ React14.createElement(Typography4, {
794
- component: "span",
795
- variant: "body1"
796
- }, age ?? /* @__PURE__ */ React14.createElement(Skeleton2, {
797
- width: 115
798
- }))));
799
- }, "BlockEpochTableCell");
800
- var BlockEpochTableCellInner = /* @__PURE__ */ __name(({ epoch, linked, ...props }) => {
796
+ return /* @__PURE__ */ jsx13(TableCell2, { ...props, children: /* @__PURE__ */ jsx13(Tooltip2, { title: `Block Epoch: ${dateTime}`, children: /* @__PURE__ */ jsx13(Typography4, { component: "span", variant: "body1", children: age ?? /* @__PURE__ */ jsx13(Skeleton2, { width: 115 }) }) }) });
797
+ };
798
+ var BlockEpochTableCellInner = ({
799
+ epoch,
800
+ linked,
801
+ ...props
802
+ }) => {
801
803
  const dateTime = dateFormat.format(epoch);
802
804
  const age = isDefined3(epoch) ? timeAgo(epoch) : void 0;
803
- return /* @__PURE__ */ React14.createElement(TableCell2, props, /* @__PURE__ */ React14.createElement(Tooltip2, {
804
- title: `Block Epoch: ${dateTime}`
805
- }, /* @__PURE__ */ React14.createElement(Typography4, {
806
- component: "span",
807
- variant: "body1"
808
- }, age ?? /* @__PURE__ */ React14.createElement(Skeleton2, {
809
- width: 115
810
- }))));
811
- }, "BlockEpochTableCellInner");
805
+ return /* @__PURE__ */ jsx13(TableCell2, { ...props, children: /* @__PURE__ */ jsx13(Tooltip2, { title: `Block Epoch: ${dateTime}`, children: /* @__PURE__ */ jsx13(Typography4, { component: "span", variant: "body1", children: age ?? /* @__PURE__ */ jsx13(Skeleton2, { width: 115 }) }) }) });
806
+ };
812
807
 
813
808
  // src/components/block/table/cell/Hash.tsx
814
- import { Link as Link2, TableCell as TableCell3, Tooltip as Tooltip3 } from "@mui/material";
809
+ import {
810
+ Link as Link2,
811
+ TableCell as TableCell3,
812
+ Tooltip as Tooltip3
813
+ } from "@mui/material";
815
814
  import { isHash as isHash2 } from "@xylabs/sdk-js";
816
815
  import { usePayloadRootHash } from "@xyo-network/react-shared";
817
- import React16, { useState as useState6 } from "react";
816
+ import { useState as useState6 } from "react";
818
817
 
819
818
  // src/components/FeatureNotAvailable.tsx
820
- import { Button as Button2, Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
821
- import React15 from "react";
822
- var FeatureNotAvailable = /* @__PURE__ */ __name(({ featureName = "Feature", ...props }) => /* @__PURE__ */ React15.createElement(Dialog, props, /* @__PURE__ */ React15.createElement(DialogTitle, null, `${featureName} Not Available`), /* @__PURE__ */ React15.createElement(DialogContent, null, "This feature is not currently available. Either you do not have access to it or it is currently undergoing maintenance."), /* @__PURE__ */ React15.createElement(DialogActions, null, /* @__PURE__ */ React15.createElement(Button2, {
823
- onClick: /* @__PURE__ */ __name((e) => props.onClose?.(e, "backdropClick"), "onClick")
824
- }, "Close"))), "FeatureNotAvailable");
819
+ import {
820
+ Button as Button2,
821
+ Dialog,
822
+ DialogActions,
823
+ DialogContent,
824
+ DialogTitle
825
+ } from "@mui/material";
826
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
827
+ var FeatureNotAvailable = ({ featureName = "Feature", ...props }) => /* @__PURE__ */ jsxs7(Dialog, { ...props, children: [
828
+ /* @__PURE__ */ jsx14(DialogTitle, { children: `${featureName} Not Available` }),
829
+ /* @__PURE__ */ jsx14(DialogContent, { children: "This feature is not currently available. Either you do not have access to it or it is currently undergoing maintenance." }),
830
+ /* @__PURE__ */ jsx14(DialogActions, { children: /* @__PURE__ */ jsx14(Button2, { onClick: (e) => props.onClose?.(e, "backdropClick"), children: "Close" }) })
831
+ ] });
825
832
 
826
833
  // src/components/block/table/cell/Hash.tsx
827
- var BlockHashTableCell = /* @__PURE__ */ __name(({ block, notAvailableDialog, linked, ...props }) => {
834
+ import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
835
+ var BlockHashTableCell = ({
836
+ block,
837
+ notAvailableDialog,
838
+ linked,
839
+ ...props
840
+ }) => {
828
841
  const hash = usePayloadRootHash(block?.[0]);
829
842
  const [ref, handleClick] = useLinkedBlockItem("block-hash", hash);
830
843
  const [notAvailable, setNotAvailable] = useState6(false);
831
844
  const shortenedHash = isHash2(hash) ? `${hash.slice(0, 4)}...${hash.slice(-5, -1)}` : void 0;
832
- return /* @__PURE__ */ React16.createElement(TableCell3, {
833
- ref,
834
- ...props
835
- }, /* @__PURE__ */ React16.createElement(Tooltip3, {
836
- title: `Block Hash: ${hash}`
837
- }, linked ? /* @__PURE__ */ React16.createElement(Link2, {
838
- sx: {
839
- cursor: "pointer"
840
- },
841
- onClick: linked ? handleClick : () => setNotAvailable(true)
842
- }, shortenedHash ?? /* @__PURE__ */ React16.createElement(ChipSkeleton, null)) : /* @__PURE__ */ React16.createElement("span", null, shortenedHash ?? /* @__PURE__ */ React16.createElement(ChipSkeleton, null))), notAvailableDialog && notAvailable ? /* @__PURE__ */ React16.createElement(FeatureNotAvailable, {
843
- featureName: "Block Details",
844
- open: notAvailable,
845
- onClick: /* @__PURE__ */ __name(() => setNotAvailable(false), "onClick")
846
- }) : null);
847
- }, "BlockHashTableCell");
845
+ return /* @__PURE__ */ jsxs8(TableCell3, { ref, ...props, children: [
846
+ /* @__PURE__ */ jsx15(Tooltip3, { title: `Block Hash: ${hash}`, children: linked ? /* @__PURE__ */ jsx15(
847
+ Link2,
848
+ {
849
+ sx: { cursor: "pointer" },
850
+ onClick: linked ? handleClick : () => setNotAvailable(true),
851
+ children: shortenedHash ?? /* @__PURE__ */ jsx15(ChipSkeleton, {})
852
+ }
853
+ ) : /* @__PURE__ */ jsx15("span", { children: shortenedHash ?? /* @__PURE__ */ jsx15(ChipSkeleton, {}) }) }),
854
+ notAvailableDialog && notAvailable ? /* @__PURE__ */ jsx15(FeatureNotAvailable, { featureName: "Block Details", open: notAvailable, onClick: () => setNotAvailable(false) }) : null
855
+ ] });
856
+ };
848
857
 
849
858
  // src/components/block/table/cell/JsonView.tsx
850
859
  import { DataObject } from "@mui/icons-material";
851
- import { Button as Button3, Dialog as Dialog2, DialogActions as DialogActions2, DialogContent as DialogContent2, DialogTitle as DialogTitle2, IconButton as IconButton2, TableCell as TableCell4 } from "@mui/material";
860
+ import {
861
+ Button as Button3,
862
+ Dialog as Dialog2,
863
+ DialogActions as DialogActions2,
864
+ DialogContent as DialogContent2,
865
+ DialogTitle as DialogTitle2,
866
+ IconButton as IconButton2,
867
+ TableCell as TableCell4
868
+ } from "@mui/material";
852
869
  import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
853
870
  import { ellipsize, isHash as isHash3 } from "@xylabs/sdk-js";
854
871
  import { JsonViewerEx } from "@xyo-network/react-payload-raw-info";
855
872
  import { usePayloadRootHash as usePayloadRootHash2 } from "@xyo-network/react-shared";
856
- import React17, { useState as useState7 } from "react";
857
- var BlockJsonViewTableCell = /* @__PURE__ */ __name(({ block, ...props }) => {
873
+ import { useState as useState7 } from "react";
874
+ import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
875
+ var BlockJsonViewTableCell = ({ block, ...props }) => {
858
876
  const [open, setOpen] = useState7(false);
859
- const onClose = /* @__PURE__ */ __name(() => setOpen(false), "onClose");
877
+ const onClose = () => setOpen(false);
860
878
  const hash = usePayloadRootHash2(block?.[0]);
861
879
  const title = isHash3(hash) ? `JSON for ${ellipsize(hash, 5)}` : "JSON";
862
- return /* @__PURE__ */ React17.createElement(TableCell4, props, /* @__PURE__ */ React17.createElement(FlexRow3, {
863
- onClick: /* @__PURE__ */ __name((e) => e.stopPropagation(), "onClick"),
864
- sx: {
865
- width: "100%"
866
- }
867
- }, /* @__PURE__ */ React17.createElement(IconButton2, {
868
- onClick: /* @__PURE__ */ __name(() => setOpen(true), "onClick")
869
- }, /* @__PURE__ */ React17.createElement(DataObject, null)), /* @__PURE__ */ React17.createElement(Dialog2, {
870
- open,
871
- onClose
872
- }, /* @__PURE__ */ React17.createElement(DialogTitle2, null, title), /* @__PURE__ */ React17.createElement(DialogContent2, null, /* @__PURE__ */ React17.createElement(JsonViewerEx, {
873
- value: block
874
- })), /* @__PURE__ */ React17.createElement(DialogActions2, {
875
- sx: {
876
- display: "flex",
877
- flexDirection: "row",
878
- justifyContent: "end"
879
- }
880
- }, /* @__PURE__ */ React17.createElement(Button3, {
881
- variant: "contained",
882
- onClick: onClose
883
- }, "Close")))));
884
- }, "BlockJsonViewTableCell");
880
+ return /* @__PURE__ */ jsx16(TableCell4, { ...props, children: /* @__PURE__ */ jsxs9(FlexRow3, { onClick: (e) => e.stopPropagation(), sx: { width: "100%" }, children: [
881
+ /* @__PURE__ */ jsx16(IconButton2, { onClick: () => setOpen(true), children: /* @__PURE__ */ jsx16(DataObject, {}) }),
882
+ /* @__PURE__ */ jsxs9(Dialog2, { open, onClose, children: [
883
+ /* @__PURE__ */ jsx16(DialogTitle2, { children: title }),
884
+ /* @__PURE__ */ jsx16(DialogContent2, { children: /* @__PURE__ */ jsx16(JsonViewerEx, { value: block }) }),
885
+ /* @__PURE__ */ jsx16(
886
+ DialogActions2,
887
+ {
888
+ sx: {
889
+ display: "flex",
890
+ flexDirection: "row",
891
+ justifyContent: "end"
892
+ },
893
+ children: /* @__PURE__ */ jsx16(Button3, { variant: "contained", onClick: onClose, children: "Close" })
894
+ }
895
+ )
896
+ ] })
897
+ ] }) });
898
+ };
885
899
 
886
900
  // src/components/block/table/cell/PayloadCounts.tsx
887
901
  import { Error as Error2 } from "@mui/icons-material";
888
- import { Link as Link3, TableCell as TableCell5, Tooltip as Tooltip4 } from "@mui/material";
889
- import React18 from "react";
890
- var BlockPayloadCountsTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
902
+ import {
903
+ Link as Link3,
904
+ TableCell as TableCell5,
905
+ Tooltip as Tooltip4
906
+ } from "@mui/material";
907
+ import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
908
+ var BlockPayloadCountsTableCell = ({
909
+ block,
910
+ linked,
911
+ ...props
912
+ }) => {
891
913
  const [publicPayloads, privatePayloads, error] = usePayloadCountsFromBlock(block);
892
914
  const data = block && privatePayloads !== void 0 && publicPayloads !== void 0 ? {
893
915
  publicPayloads,
@@ -896,256 +918,228 @@ var BlockPayloadCountsTableCell = /* @__PURE__ */ __name(({ block, linked, ...pr
896
918
  } : void 0;
897
919
  const payloadCount = (publicPayloads ?? 0) + (privatePayloads ?? 0);
898
920
  const [ref, handleClick] = useLinkedBlockItem("payload-counts", data);
899
- return /* @__PURE__ */ React18.createElement(TableCell5, {
900
- ref,
901
- ...props
902
- }, /* @__PURE__ */ React18.createElement("span", null, error ? /* @__PURE__ */ React18.createElement(Tooltip4, {
903
- title: error.message
904
- }, /* @__PURE__ */ React18.createElement(Error2, {
905
- sx: {
906
- color: "error"
907
- }
908
- })) : null, linked ? /* @__PURE__ */ React18.createElement(Tooltip4, {
909
- title: `Public Payloads: ${publicPayloads ?? "--"} Private Payloads: ${privatePayloads ?? "--"}`
910
- }, /* @__PURE__ */ React18.createElement(Link3, {
911
- onClick: handleClick,
912
- sx: {
913
- cursor: "pointer"
914
- }
915
- }, payloadCount)) : /* @__PURE__ */ React18.createElement(Tooltip4, {
916
- title: `Public Payloads: ${publicPayloads ?? "--"} Private Payloads: ${privatePayloads ?? "--"}`
917
- }, /* @__PURE__ */ React18.createElement("span", null, payloadCount))));
918
- }, "BlockPayloadCountsTableCell");
921
+ return /* @__PURE__ */ jsx17(TableCell5, { ref, ...props, children: /* @__PURE__ */ jsxs10("span", { children: [
922
+ error ? /* @__PURE__ */ jsx17(Tooltip4, { title: error.message, children: /* @__PURE__ */ jsx17(Error2, { sx: { color: "error" } }) }) : null,
923
+ linked ? /* @__PURE__ */ jsx17(Tooltip4, { title: `Public Payloads: ${publicPayloads ?? "--"} Private Payloads: ${privatePayloads ?? "--"}`, children: /* @__PURE__ */ jsx17(
924
+ Link3,
925
+ {
926
+ onClick: handleClick,
927
+ sx: { cursor: "pointer" },
928
+ children: payloadCount
929
+ }
930
+ ) }) : /* @__PURE__ */ jsx17(Tooltip4, { title: `Public Payloads: ${publicPayloads ?? "--"} Private Payloads: ${privatePayloads ?? "--"}`, children: /* @__PURE__ */ jsx17("span", { children: payloadCount }) })
931
+ ] }) });
932
+ };
919
933
 
920
934
  // src/components/block/table/cell/Producer.tsx
921
935
  import { TableCell as TableCell6, Tooltip as Tooltip5 } from "@mui/material";
922
- import React19, { useState as useState8 } from "react";
923
- var BlockProducerTableCell = /* @__PURE__ */ __name(({ block, linked, notAvailableDialog, producerChipProps, ...props }) => {
936
+ import { useState as useState8 } from "react";
937
+ import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
938
+ var BlockProducerTableCell = ({
939
+ block,
940
+ linked,
941
+ notAvailableDialog,
942
+ producerChipProps,
943
+ ...props
944
+ }) => {
924
945
  const [ref, handleClick] = useLinkedBlockItem("block-producer", JSON.stringify(block));
925
946
  const producer = useBlockProducer(block);
926
- return /* @__PURE__ */ React19.createElement(BlockProducerTableCellInner, {
927
- address: producer,
928
- handleClick,
929
- linked,
930
- notAvailableDialog,
931
- producerChipProps,
932
- ...props,
933
- ref
934
- });
935
- }, "BlockProducerTableCell");
936
- var BlockProducerTableCellInner = /* @__PURE__ */ __name(({ address, handleClick, linked, notAvailableDialog, producerChipProps, ...props }) => {
947
+ return /* @__PURE__ */ jsx18(
948
+ BlockProducerTableCellInner,
949
+ {
950
+ address: producer,
951
+ handleClick,
952
+ linked,
953
+ notAvailableDialog,
954
+ producerChipProps,
955
+ ...props,
956
+ ref
957
+ }
958
+ );
959
+ };
960
+ var BlockProducerTableCellInner = ({
961
+ address,
962
+ handleClick,
963
+ linked,
964
+ notAvailableDialog,
965
+ producerChipProps,
966
+ ...props
967
+ }) => {
937
968
  const [notAvailable, setNotAvailable] = useState8(false);
938
- return /* @__PURE__ */ React19.createElement(TableCell6, props, /* @__PURE__ */ React19.createElement(Tooltip5, {
939
- title: `Block Producer: ${address}`
940
- }, /* @__PURE__ */ React19.createElement(BlockAddressChip, {
941
- sx: {
942
- cursor: "pointer"
943
- },
944
- onClick: linked ? handleClick : () => setNotAvailable(true),
945
- address,
946
- toolTipTitle: `Block Producer: ${address}`,
947
- ...producerChipProps
948
- })), notAvailableDialog && notAvailable ? /* @__PURE__ */ React19.createElement(FeatureNotAvailable, {
949
- featureName: "Producer Details",
950
- open: notAvailable,
951
- onClick: /* @__PURE__ */ __name(() => setNotAvailable(false), "onClick")
952
- }) : null);
953
- }, "BlockProducerTableCellInner");
969
+ return /* @__PURE__ */ jsxs11(TableCell6, { ...props, children: [
970
+ /* @__PURE__ */ jsx18(Tooltip5, { title: `Block Producer: ${address}`, children: /* @__PURE__ */ jsx18(
971
+ BlockAddressChip,
972
+ {
973
+ sx: { cursor: "pointer" },
974
+ onClick: linked ? handleClick : () => setNotAvailable(true),
975
+ address,
976
+ toolTipTitle: `Block Producer: ${address}`,
977
+ ...producerChipProps
978
+ }
979
+ ) }),
980
+ notAvailableDialog && notAvailable ? /* @__PURE__ */ jsx18(FeatureNotAvailable, { featureName: "Producer Details", open: notAvailable, onClick: () => setNotAvailable(false) }) : null
981
+ ] });
982
+ };
954
983
 
955
984
  // src/components/block/table/cell/TransactionCount.tsx
956
985
  import { Error as Error3 } from "@mui/icons-material";
957
- import { Link as Link4, TableCell as TableCell7, Tooltip as Tooltip6 } from "@mui/material";
958
- import React20, { useMemo as useMemo5 } from "react";
959
- var BlockTransactionCountTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
986
+ import {
987
+ Link as Link4,
988
+ TableCell as TableCell7,
989
+ Tooltip as Tooltip6
990
+ } from "@mui/material";
991
+ import { useMemo as useMemo5 } from "react";
992
+ import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
993
+ var BlockTransactionCountTableCell = ({
994
+ block,
995
+ linked,
996
+ ...props
997
+ }) => {
960
998
  const [transactions, error] = useTxsFromBlock(block);
961
- const txHashes = useMemo5(() => transactions?.map(([, hash]) => hash), [
962
- transactions
963
- ]);
999
+ const txHashes = useMemo5(() => transactions?.map(([, hash]) => hash), [transactions]);
964
1000
  const data = block && transactions !== void 0 ? {
965
1001
  transactions: transactions.length,
966
1002
  block: block[0]._hash
967
1003
  } : void 0;
968
1004
  const [ref, handleClick] = useLinkedBlockItem("transaction-count", data);
969
- return /* @__PURE__ */ React20.createElement(TableCell7, {
970
- ref,
971
- ...props
972
- }, /* @__PURE__ */ React20.createElement("span", null, error ? /* @__PURE__ */ React20.createElement(Tooltip6, {
973
- title: error.message
974
- }, /* @__PURE__ */ React20.createElement(Error3, {
975
- sx: {
976
- color: "error"
977
- }
978
- })) : null, linked ? /* @__PURE__ */ React20.createElement(Link4, {
979
- onClick: handleClick,
980
- sx: {
981
- cursor: "pointer"
982
- }
983
- }, txHashes?.length) : txHashes?.length));
984
- }, "BlockTransactionCountTableCell");
1005
+ return /* @__PURE__ */ jsx19(TableCell7, { ref, ...props, children: /* @__PURE__ */ jsxs12("span", { children: [
1006
+ error ? /* @__PURE__ */ jsx19(Tooltip6, { title: error.message, children: /* @__PURE__ */ jsx19(Error3, { sx: { color: "error" } }) }) : null,
1007
+ linked ? /* @__PURE__ */ jsx19(Link4, { onClick: handleClick, sx: { cursor: "pointer" }, children: txHashes?.length }) : txHashes?.length
1008
+ ] }) });
1009
+ };
985
1010
 
986
1011
  // src/components/block/table/cell/Verification.tsx
987
1012
  import { CheckCircleOutlineRounded } from "@mui/icons-material";
988
1013
  import { TableCell as TableCell8 } from "@mui/material";
989
1014
  import { FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
990
1015
  import { BWVerification as BWVerification2 } from "@xyo-network/react-boundwitness-plugin";
991
- import React21 from "react";
992
- var BlockVerificationTableCell = /* @__PURE__ */ __name(({ block, linked, deepValidation, ...props }) => {
993
- return /* @__PURE__ */ React21.createElement(TableCell8, props, /* @__PURE__ */ React21.createElement(FlexRow4, {
994
- onClick: /* @__PURE__ */ __name((e) => e.stopPropagation(), "onClick"),
995
- sx: {
996
- width: "100%"
997
- }
998
- }, deepValidation ? /* @__PURE__ */ React21.createElement(BWVerification2, {
999
- iconColors: true,
1000
- boundwitness: block?.[0]
1001
- }) : /* @__PURE__ */ React21.createElement(CheckCircleOutlineRounded, {
1002
- color: "success"
1003
- })));
1004
- }, "BlockVerificationTableCell");
1016
+ import { jsx as jsx20 } from "react/jsx-runtime";
1017
+ var BlockVerificationTableCell = ({
1018
+ block,
1019
+ linked,
1020
+ deepValidation,
1021
+ ...props
1022
+ }) => {
1023
+ return /* @__PURE__ */ jsx20(TableCell8, { ...props, children: /* @__PURE__ */ jsx20(FlexRow4, { onClick: (e) => e.stopPropagation(), sx: { width: "100%" }, children: deepValidation ? /* @__PURE__ */ jsx20(BWVerification2, { iconColors: true, boundwitness: block?.[0] }) : /* @__PURE__ */ jsx20(CheckCircleOutlineRounded, { color: "success" }) }) });
1024
+ };
1005
1025
 
1006
1026
  // src/components/block/table/Ex.tsx
1007
1027
  import { TableBody } from "@mui/material";
1008
1028
  import { TableEx } from "@xyo-network/react-table";
1009
- import React23 from "react";
1010
1029
 
1011
1030
  // src/components/block/table/head/TableHead.tsx
1012
1031
  import { InfoOutlined } from "@mui/icons-material";
1013
- import { TableCell as TableCell9, TableHead, TableRow, Tooltip as Tooltip7, Typography as Typography5 } from "@mui/material";
1032
+ import {
1033
+ TableCell as TableCell9,
1034
+ TableHead,
1035
+ TableRow,
1036
+ Tooltip as Tooltip7,
1037
+ Typography as Typography5
1038
+ } from "@mui/material";
1014
1039
  import { FlexRow as FlexRow5 } from "@xylabs/react-flexbox";
1015
- import React22 from "react";
1016
- var ToolTipTableCell = /* @__PURE__ */ __name(({ children, align, title, ...props }) => {
1017
- return /* @__PURE__ */ React22.createElement(TableCell9, {
1018
- title,
1019
- ...props
1020
- }, /* @__PURE__ */ React22.createElement(FlexRow5, {
1021
- sx: {
1022
- justifyContent: align
1023
- }
1024
- }, /* @__PURE__ */ React22.createElement(Typography5, {
1025
- variant: "body2"
1026
- }, children), "\xA0", /* @__PURE__ */ React22.createElement(Tooltip7, {
1027
- title
1028
- }, /* @__PURE__ */ React22.createElement(InfoOutlined, {
1029
- sx: {
1030
- fontSize: "small"
1031
- }
1032
- }))));
1033
- }, "ToolTipTableCell");
1034
- var BlockchainTableHead = /* @__PURE__ */ __name(() => {
1035
- return /* @__PURE__ */ React22.createElement(TableHead, null, /* @__PURE__ */ React22.createElement(TableRow, null, /* @__PURE__ */ React22.createElement(ToolTipTableCell, {
1036
- align: "left",
1037
- title: "The block number that is included in the block"
1038
- }, "Block"), /* @__PURE__ */ React22.createElement(ToolTipTableCell, {
1039
- title: "The hash of the block",
1040
- sx: {
1041
- width: "20%"
1042
- }
1043
- }, "Hash"), /* @__PURE__ */ React22.createElement(ToolTipTableCell, {
1044
- title: "The epoch of the block",
1045
- sx: {
1046
- width: "20%"
1047
- }
1048
- }, "Epoch"), /* @__PURE__ */ React22.createElement(ToolTipTableCell, {
1049
- align: "left",
1050
- title: "The address of the block producer that produced the block",
1051
- sx: {
1052
- width: "20%"
1053
- }
1054
- }, "Block Producer"), /* @__PURE__ */ React22.createElement(ToolTipTableCell, {
1055
- align: "left",
1056
- title: "Count of transactions that are included in the block"
1057
- }, "Transactions"), /* @__PURE__ */ React22.createElement(ToolTipTableCell, {
1058
- align: "left",
1059
- title: "Count of public and private payload counts for the block"
1060
- }, "Payloads"), /* @__PURE__ */ React22.createElement(ToolTipTableCell, {
1061
- align: "center",
1062
- title: "The result of the local validation check for the block"
1063
- }, "Valid"), /* @__PURE__ */ React22.createElement(ToolTipTableCell, {
1064
- align: "center",
1065
- title: "Link to display the raw JSON of the block"
1066
- }, "JSON")));
1067
- }, "BlockchainTableHead");
1040
+ import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
1041
+ var ToolTipTableCell = ({
1042
+ children,
1043
+ align,
1044
+ title,
1045
+ ...props
1046
+ }) => {
1047
+ return /* @__PURE__ */ jsx21(TableCell9, { title, ...props, children: /* @__PURE__ */ jsxs13(FlexRow5, { sx: { justifyContent: align }, children: [
1048
+ /* @__PURE__ */ jsx21(Typography5, { variant: "body2", children }),
1049
+ "\xA0",
1050
+ /* @__PURE__ */ jsx21(Tooltip7, { title, children: /* @__PURE__ */ jsx21(InfoOutlined, { sx: { fontSize: "small" } }) })
1051
+ ] }) });
1052
+ };
1053
+ var BlockchainTableHead = () => {
1054
+ return /* @__PURE__ */ jsx21(TableHead, { children: /* @__PURE__ */ jsxs13(TableRow, { children: [
1055
+ /* @__PURE__ */ jsx21(ToolTipTableCell, { align: "left", title: "The block number that is included in the block", children: "Block" }),
1056
+ /* @__PURE__ */ jsx21(ToolTipTableCell, { title: "The hash of the block", sx: { width: "20%" }, children: "Hash" }),
1057
+ /* @__PURE__ */ jsx21(ToolTipTableCell, { title: "The epoch of the block", sx: { width: "20%" }, children: "Epoch" }),
1058
+ /* @__PURE__ */ jsx21(
1059
+ ToolTipTableCell,
1060
+ {
1061
+ align: "left",
1062
+ title: "The address of the block producer that produced the block",
1063
+ sx: { width: "20%" },
1064
+ children: "Block Producer"
1065
+ }
1066
+ ),
1067
+ /* @__PURE__ */ jsx21(ToolTipTableCell, { align: "left", title: "Count of transactions that are included in the block", children: "Transactions" }),
1068
+ /* @__PURE__ */ jsx21(ToolTipTableCell, { align: "left", title: "Count of public and private payload counts for the block", children: "Payloads" }),
1069
+ /* @__PURE__ */ jsx21(ToolTipTableCell, { align: "center", title: "The result of the local validation check for the block", children: "Valid" }),
1070
+ /* @__PURE__ */ jsx21(ToolTipTableCell, { align: "center", title: "Link to display the raw JSON of the block", children: "JSON" })
1071
+ ] }) });
1072
+ };
1068
1073
 
1069
1074
  // src/components/block/table/Ex.tsx
1070
- var BlockchainTableEx = /* @__PURE__ */ __name(({ ref, children, ...props }) => {
1071
- return /* @__PURE__ */ React23.createElement(TableEx, {
1072
- ref,
1073
- ...props
1074
- }, /* @__PURE__ */ React23.createElement(BlockchainTableHead, null), /* @__PURE__ */ React23.createElement(TableBody, null, children));
1075
- }, "BlockchainTableEx");
1075
+ import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
1076
+ var BlockchainTableEx = ({
1077
+ ref,
1078
+ children,
1079
+ ...props
1080
+ }) => {
1081
+ return /* @__PURE__ */ jsxs14(TableEx, { ref, ...props, children: [
1082
+ /* @__PURE__ */ jsx22(BlockchainTableHead, {}),
1083
+ /* @__PURE__ */ jsx22(TableBody, { children })
1084
+ ] });
1085
+ };
1076
1086
  BlockchainTableEx.displayName = "BlockchainTableEx";
1077
1087
 
1078
1088
  // src/components/block/table/row/TableRow.tsx
1079
1089
  import { usePayloadRootHash as usePayloadRootHash3 } from "@xyo-network/react-shared";
1080
- import React24, { useMemo as useMemo6 } from "react";
1090
+ import { useMemo as useMemo6 } from "react";
1081
1091
 
1082
1092
  // src/components/table/StyledLinkableTableRow.tsx
1083
1093
  import { styled, TableRow as TableRow2 } from "@mui/material";
1084
1094
  import { alphaCss } from "@xylabs/react-theme";
1085
- var StyledLinkableTableRow = styled(TableRow2, {
1086
- shouldForwardProp: /* @__PURE__ */ __name((prop) => prop !== "linked", "shouldForwardProp")
1087
- })(({ theme, linked }) => ({
1095
+ var StyledLinkableTableRow = styled(TableRow2, { shouldForwardProp: (prop) => prop !== "linked" })(({ theme, linked }) => ({
1088
1096
  "cursor": linked ? "pointer" : "default",
1089
1097
  "overflowY": "scroll",
1090
- "&:hover": {
1091
- backgroundColor: alphaCss(theme.vars.palette.secondary.light, 0.15)
1092
- }
1098
+ "&:hover": { backgroundColor: alphaCss(theme.vars.palette.secondary.light, 0.15) }
1093
1099
  }));
1094
1100
 
1095
1101
  // src/components/block/table/row/TableRow.tsx
1096
- var BlockChainTableRow = /* @__PURE__ */ __name(({ block, deepValidation, defaultExpanded, linked, ...props }) => {
1097
- const linkedTableCellProps = useMemo6(() => ({
1098
- block,
1099
- linked
1100
- }), [
1101
- block,
1102
- linked
1103
- ]);
1104
- const defaultTableCellProps = useMemo6(() => ({
1105
- block
1106
- }), [
1107
- block
1108
- ]);
1102
+ import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
1103
+ var BlockChainTableRow = ({
1104
+ block,
1105
+ deepValidation,
1106
+ defaultExpanded,
1107
+ linked,
1108
+ ...props
1109
+ }) => {
1110
+ const linkedTableCellProps = useMemo6(() => ({ block, linked }), [block, linked]);
1111
+ const defaultTableCellProps = useMemo6(() => ({ block }), [block]);
1109
1112
  const hash = usePayloadRootHash3(block?.[0]);
1110
1113
  const [ref, handleClick] = useLinkedBlockItem("block-hash", hash);
1111
- return /* @__PURE__ */ React24.createElement(StyledLinkableTableRow, {
1112
- onClick: linked ? handleClick : void 0,
1113
- ref,
1114
- linked,
1115
- ...props
1116
- }, /* @__PURE__ */ React24.createElement(BlockNumberTableCell, {
1117
- align: "left",
1118
- ...linkedTableCellProps
1119
- }), /* @__PURE__ */ React24.createElement(BlockHashTableCell, {
1120
- align: "left",
1121
- ...linkedTableCellProps
1122
- }), /* @__PURE__ */ React24.createElement(BlockEpochTableCell, {
1123
- align: "left",
1124
- ...linkedTableCellProps
1125
- }), /* @__PURE__ */ React24.createElement(BlockProducerTableCell, {
1126
- align: "left",
1127
- ...linkedTableCellProps
1128
- }), /* @__PURE__ */ React24.createElement(BlockTransactionCountTableCell, {
1129
- align: "left",
1130
- ...linkedTableCellProps
1131
- }), /* @__PURE__ */ React24.createElement(BlockPayloadCountsTableCell, {
1132
- align: "left",
1133
- ...linkedTableCellProps
1134
- }), /* @__PURE__ */ React24.createElement(BlockVerificationTableCell, {
1135
- deepValidation,
1136
- ...defaultTableCellProps
1137
- }), /* @__PURE__ */ React24.createElement(BlockJsonViewTableCell, defaultTableCellProps));
1138
- }, "BlockChainTableRow");
1114
+ return /* @__PURE__ */ jsxs15(
1115
+ StyledLinkableTableRow,
1116
+ {
1117
+ onClick: linked ? handleClick : void 0,
1118
+ ref,
1119
+ linked,
1120
+ ...props,
1121
+ children: [
1122
+ /* @__PURE__ */ jsx23(BlockNumberTableCell, { align: "left", ...linkedTableCellProps }),
1123
+ /* @__PURE__ */ jsx23(BlockHashTableCell, { align: "left", ...linkedTableCellProps }),
1124
+ /* @__PURE__ */ jsx23(BlockEpochTableCell, { align: "left", ...linkedTableCellProps }),
1125
+ /* @__PURE__ */ jsx23(BlockProducerTableCell, { align: "left", ...linkedTableCellProps }),
1126
+ /* @__PURE__ */ jsx23(BlockTransactionCountTableCell, { align: "left", ...linkedTableCellProps }),
1127
+ /* @__PURE__ */ jsx23(BlockPayloadCountsTableCell, { align: "left", ...linkedTableCellProps }),
1128
+ /* @__PURE__ */ jsx23(BlockVerificationTableCell, { deepValidation, ...defaultTableCellProps }),
1129
+ /* @__PURE__ */ jsx23(BlockJsonViewTableCell, { ...defaultTableCellProps })
1130
+ ]
1131
+ }
1132
+ );
1133
+ };
1139
1134
 
1140
1135
  // src/components/account/table/cell/AddressTableCell.tsx
1141
1136
  import { TableCell as TableCell10, Tooltip as Tooltip8 } from "@mui/material";
1142
- import React25 from "react";
1143
1137
 
1144
1138
  // src/components/account/table/hooks/useLinkedBalanceHistoryItem.tsx
1145
1139
  import { useEvent as useEvent3 } from "@xyo-network/react-event";
1146
- var useLinkedBalanceHistoryItem = /* @__PURE__ */ __name(() => {
1140
+ var useLinkedBalanceHistoryItem = () => {
1147
1141
  const [ref, dispatch] = useEvent3();
1148
- const handleClick = /* @__PURE__ */ __name((event, noun, data) => {
1142
+ const handleClick = (event, noun, data) => {
1149
1143
  event.preventDefault();
1150
1144
  event.stopPropagation();
1151
1145
  if (noun === void 0) {
@@ -1157,92 +1151,96 @@ var useLinkedBalanceHistoryItem = /* @__PURE__ */ __name(() => {
1157
1151
  if (!isTextSelected) {
1158
1152
  dispatch(noun, "click", data, event.nativeEvent);
1159
1153
  }
1160
- }, "handleClick");
1161
- return [
1162
- ref,
1163
- handleClick
1164
- ];
1165
- }, "useLinkedBalanceHistoryItem");
1154
+ };
1155
+ return [ref, handleClick];
1156
+ };
1166
1157
 
1167
1158
  // src/components/account/table/cell/AddressTableCell.tsx
1168
- var AddressTableCell = /* @__PURE__ */ __name(({ address, eventNoun, linked, toolTipTitle, sx, ...props }) => {
1159
+ import { jsx as jsx24 } from "react/jsx-runtime";
1160
+ var AddressTableCell = ({
1161
+ address,
1162
+ eventNoun,
1163
+ linked,
1164
+ toolTipTitle,
1165
+ sx,
1166
+ ...props
1167
+ }) => {
1169
1168
  const [ref, handleClick] = useLinkedBalanceHistoryItem();
1170
- return /* @__PURE__ */ React25.createElement(TableCell10, {
1171
- ref,
1172
- sx: {
1173
- cursor: linked ? "pointer" : "default",
1174
- ...sx
1175
- },
1176
- ...props
1177
- }, /* @__PURE__ */ React25.createElement(Tooltip8, {
1178
- title: toolTipTitle
1179
- }, /* @__PURE__ */ React25.createElement(BlockAddressChip, {
1180
- address,
1181
- onClick: linked ? (e) => handleClick(e, eventNoun, address) : void 0
1182
- })));
1183
- }, "AddressTableCell");
1169
+ return /* @__PURE__ */ jsx24(TableCell10, { ref, sx: { cursor: linked ? "pointer" : "default", ...sx }, ...props, children: /* @__PURE__ */ jsx24(Tooltip8, { title: toolTipTitle, children: /* @__PURE__ */ jsx24(BlockAddressChip, { address, onClick: linked ? (e) => handleClick(e, eventNoun, address) : void 0 }) }) });
1170
+ };
1184
1171
 
1185
1172
  // src/components/account/table/cell/BlockNumber.tsx
1186
- import { Link as Link5, TableCell as TableCell11, Tooltip as Tooltip9, Typography as Typography6 } from "@mui/material";
1187
- import React26 from "react";
1188
- var BalanceHistoryBlockNumberTableCell = /* @__PURE__ */ __name(({ block, eventNoun = "block-number", linked, ...props }) => {
1173
+ import {
1174
+ Link as Link5,
1175
+ TableCell as TableCell11,
1176
+ Tooltip as Tooltip9,
1177
+ Typography as Typography6
1178
+ } from "@mui/material";
1179
+ import { jsx as jsx25 } from "react/jsx-runtime";
1180
+ var BalanceHistoryBlockNumberTableCell = ({
1181
+ block,
1182
+ eventNoun = "block-number",
1183
+ linked,
1184
+ ...props
1185
+ }) => {
1189
1186
  const blockNumber = block?.[0].block;
1190
- return /* @__PURE__ */ React26.createElement(BalanceHistoryBlockNumberTableCellInner, {
1191
- blockNumber,
1192
- eventNoun,
1193
- linked,
1194
- ...props
1195
- });
1196
- }, "BalanceHistoryBlockNumberTableCell");
1197
- var BalanceHistoryBlockNumberTableCellInner = /* @__PURE__ */ __name(({ blockNumber, eventNoun = "block-number", linked, ...props }) => {
1187
+ return /* @__PURE__ */ jsx25(BalanceHistoryBlockNumberTableCellInner, { blockNumber, eventNoun, linked, ...props });
1188
+ };
1189
+ var BalanceHistoryBlockNumberTableCellInner = ({
1190
+ blockNumber,
1191
+ eventNoun = "block-number",
1192
+ linked,
1193
+ ...props
1194
+ }) => {
1198
1195
  const [ref, handleClick] = useLinkedBalanceHistoryItem();
1199
- return /* @__PURE__ */ React26.createElement(TableCell11, {
1200
- ref,
1201
- ...props
1202
- }, /* @__PURE__ */ React26.createElement(Tooltip9, {
1203
- title: `Block Number: ${blockNumber}`
1204
- }, /* @__PURE__ */ React26.createElement(Typography6, {
1205
- component: "span",
1206
- variant: "body1"
1207
- }, linked ? /* @__PURE__ */ React26.createElement(Link5, {
1208
- onClick: /* @__PURE__ */ __name((e) => handleClick(e, eventNoun, blockNumber?.toString() ?? ""), "onClick"),
1209
- sx: {
1210
- cursor: "pointer"
1211
- }
1212
- }, blockNumber) : blockNumber)));
1213
- }, "BalanceHistoryBlockNumberTableCellInner");
1196
+ return /* @__PURE__ */ jsx25(TableCell11, { ref, ...props, children: /* @__PURE__ */ jsx25(Tooltip9, { title: `Block Number: ${blockNumber}`, children: /* @__PURE__ */ jsx25(Typography6, { component: "span", variant: "body1", children: linked ? /* @__PURE__ */ jsx25(Link5, { onClick: (e) => handleClick(e, eventNoun, blockNumber?.toString() ?? ""), sx: { cursor: "pointer" }, children: blockNumber }) : blockNumber }) }) });
1197
+ };
1214
1198
 
1215
1199
  // src/components/account/table/cell/HashTableCell.tsx
1216
- import { Link as Link6, TableCell as TableCell12, Tooltip as Tooltip10, Typography as Typography7 } from "@mui/material";
1217
- import { ellipsize as ellipsize2, isDefined as isDefined4 } from "@xylabs/sdk-js";
1218
- import React27 from "react";
1219
- var HashTableCell = /* @__PURE__ */ __name(({ eventData, eventNoun = "tx-hash", hash, linked, toolTipTitle, sx, ...props }) => {
1200
+ import {
1201
+ Link as Link6,
1202
+ TableCell as TableCell12,
1203
+ Tooltip as Tooltip10,
1204
+ Typography as Typography7
1205
+ } from "@mui/material";
1206
+ import {
1207
+ ellipsize as ellipsize2,
1208
+ isDefined as isDefined4
1209
+ } from "@xylabs/sdk-js";
1210
+ import { jsx as jsx26 } from "react/jsx-runtime";
1211
+ var HashTableCell = ({
1212
+ eventData,
1213
+ eventNoun = "tx-hash",
1214
+ hash,
1215
+ linked,
1216
+ toolTipTitle,
1217
+ sx,
1218
+ ...props
1219
+ }) => {
1220
1220
  const [ref, handleClick] = useLinkedBalanceHistoryItem();
1221
1221
  const shortenedHash = isDefined4(hash) ? ellipsize2(hash, 6) : "N/A";
1222
- return /* @__PURE__ */ React27.createElement(TableCell12, {
1223
- ref,
1224
- ...props
1225
- }, hash ? /* @__PURE__ */ React27.createElement(Tooltip10, {
1226
- title: toolTipTitle
1227
- }, /* @__PURE__ */ React27.createElement(Typography7, {
1228
- component: "span",
1229
- variant: "body1"
1230
- }, linked ? /* @__PURE__ */ React27.createElement(Link6, {
1231
- onClick: /* @__PURE__ */ __name((e) => handleClick(e, eventNoun, eventData), "onClick"),
1232
- sx: {
1233
- cursor: "pointer"
1234
- }
1235
- }, shortenedHash) : shortenedHash)) : "N/A");
1236
- }, "HashTableCell");
1222
+ return /* @__PURE__ */ jsx26(TableCell12, { ref, ...props, children: hash ? /* @__PURE__ */ jsx26(Tooltip10, { title: toolTipTitle, children: /* @__PURE__ */ jsx26(Typography7, { component: "span", variant: "body1", children: linked ? /* @__PURE__ */ jsx26(Link6, { onClick: (e) => handleClick(e, eventNoun, eventData), sx: { cursor: "pointer" }, children: shortenedHash }) : shortenedHash }) }) : "N/A" });
1223
+ };
1237
1224
 
1238
1225
  // src/components/account/table/RawAmountTableCell.tsx
1239
- import { Link as Link7, TableCell as TableCell13, Tooltip as Tooltip11 } from "@mui/material";
1226
+ import {
1227
+ Link as Link7,
1228
+ TableCell as TableCell13,
1229
+ Tooltip as Tooltip11
1230
+ } from "@mui/material";
1240
1231
  import { isDefined as isDefined5, toHex as toHex2 } from "@xylabs/sdk-js";
1241
1232
  import { XL1Amount as XL1Amount2 } from "@xyo-network/xl1-sdk";
1242
- import React28 from "react";
1243
- var RawAmountTableCell = /* @__PURE__ */ __name(({ amount, eventNoun = "amount", linked, sx, type, ...props }) => {
1233
+ import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
1234
+ var RawAmountTableCell = ({
1235
+ amount,
1236
+ eventNoun = "amount",
1237
+ linked,
1238
+ sx,
1239
+ type,
1240
+ ...props
1241
+ }) => {
1244
1242
  const [ref, handleClick] = useLinkedBalanceHistoryItem();
1245
- const formatAmount = /* @__PURE__ */ __name((amount2) => {
1243
+ const formatAmount = (amount2) => {
1246
1244
  if (!isDefined5(amount2)) {
1247
1245
  return "N/A";
1248
1246
  }
@@ -1254,73 +1252,61 @@ var RawAmountTableCell = /* @__PURE__ */ __name(({ amount, eventNoun = "amount",
1254
1252
  minDecimals: 1,
1255
1253
  locale: navigator.language
1256
1254
  });
1257
- }, "formatAmount");
1258
- return /* @__PURE__ */ React28.createElement(TableCell13, {
1259
- ref,
1260
- ...props
1261
- }, /* @__PURE__ */ React28.createElement(Tooltip11, {
1262
- title: `Raw Amount: ${amount}`
1263
- }, linked ? /* @__PURE__ */ React28.createElement(Link7, {
1264
- onClick: /* @__PURE__ */ __name((e) => handleClick(e, eventNoun, isDefined5(amount) ? toHex2(amount) : ""), "onClick"),
1265
- sx: {
1266
- cursor: "pointer"
1267
- }
1268
- }, type === "send" ? "-" : "", formatAmount(amount)) : /* @__PURE__ */ React28.createElement("span", null, type === "send" ? "-" : "", formatAmount(amount))));
1269
- }, "RawAmountTableCell");
1255
+ };
1256
+ return /* @__PURE__ */ jsx27(TableCell13, { ref, ...props, children: /* @__PURE__ */ jsx27(Tooltip11, { title: `Raw Amount: ${amount}`, children: linked ? /* @__PURE__ */ jsxs16(Link7, { onClick: (e) => handleClick(e, eventNoun, isDefined5(amount) ? toHex2(amount) : ""), sx: { cursor: "pointer" }, children: [
1257
+ type === "send" ? "-" : "",
1258
+ formatAmount(amount)
1259
+ ] }) : /* @__PURE__ */ jsxs16("span", { children: [
1260
+ type === "send" ? "-" : "",
1261
+ formatAmount(amount)
1262
+ ] }) }) });
1263
+ };
1270
1264
 
1271
1265
  // src/components/account/table/BalanceHistoryTableRow.tsx
1272
- var BalanceHistoryTableRow = /* @__PURE__ */ __name(({ linked, row, ...props }) => {
1273
- const { amount, blockHash, blockNumber, debug, from, key, timestamp, to, type, txHash, transferHash } = row ?? {};
1274
- const linkedTableCallProps = useMemo7(() => ({
1275
- linked
1276
- }), [
1277
- linked
1278
- ]);
1266
+ import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
1267
+ var BalanceHistoryTableRow = ({
1268
+ linked,
1269
+ row,
1270
+ ...props
1271
+ }) => {
1272
+ const {
1273
+ amount,
1274
+ blockHash,
1275
+ blockNumber,
1276
+ debug,
1277
+ from,
1278
+ key,
1279
+ timestamp,
1280
+ to,
1281
+ type,
1282
+ txHash,
1283
+ transferHash
1284
+ } = row ?? {};
1285
+ const linkedTableCallProps = useMemo7(() => ({ linked }), [linked]);
1279
1286
  const [ref, handleClick] = useLinkedBalanceHistoryItem();
1280
1287
  const noun = isDefined6(txHash) ? "tx-hash|transfer-hash" : "block-hash|transfer-hash";
1281
1288
  const data = isDefined6(txHash) ? `${txHash}|${transferHash}` : `${blockHash}|${transferHash}`;
1282
- return /* @__PURE__ */ React29.createElement(StyledLinkableTableRow, {
1283
- linked,
1284
- key,
1285
- onClick: linked ? (e) => handleClick(e, noun, data) : void 0,
1286
- ref,
1287
- ...props
1288
- }, /* @__PURE__ */ React29.createElement(HashTableCell, {
1289
- hash: txHash,
1290
- toolTipTitle: `Transaction Hash: ${txHash}`,
1291
- eventNoun: "tx-hash",
1292
- ...linkedTableCallProps
1293
- }), /* @__PURE__ */ React29.createElement(BalanceHistoryBlockNumberTableCellInner, {
1294
- blockNumber,
1295
- eventNoun: "block-number",
1296
- ...linkedTableCallProps
1297
- }), /* @__PURE__ */ React29.createElement(BlockEpochTableCellInner, {
1298
- epoch: timestamp,
1299
- ...linkedTableCallProps
1300
- }), /* @__PURE__ */ React29.createElement(AddressTableCell, {
1301
- address: from,
1302
- toolTipTitle: `From Address: ${from}`,
1303
- eventNoun: "from-address",
1304
- ...linkedTableCallProps
1305
- }), /* @__PURE__ */ React29.createElement(AddressTableCell, {
1306
- address: to,
1307
- toolTipTitle: `To Address: ${to}`,
1308
- eventNoun: "to-address",
1309
- ...linkedTableCallProps
1310
- }), /* @__PURE__ */ React29.createElement(RawAmountTableCell, {
1311
- amount,
1312
- type,
1313
- eventNoun: "amount"
1314
- }), /* @__PURE__ */ React29.createElement(HashTableCell, {
1315
- hash: transferHash,
1316
- toolTipTitle: `Transfer Hash: ${transferHash}`,
1317
- eventNoun: noun,
1318
- eventData: data,
1319
- ...linkedTableCallProps
1320
- }), /* @__PURE__ */ React29.createElement(TableCell14, null, /* @__PURE__ */ React29.createElement(RawInfoIconButton, {
1321
- rawValue: debug
1322
- })));
1323
- }, "BalanceHistoryTableRow");
1289
+ return /* @__PURE__ */ jsxs17(
1290
+ StyledLinkableTableRow,
1291
+ {
1292
+ linked,
1293
+ onClick: linked ? (e) => handleClick(e, noun, data) : void 0,
1294
+ ref,
1295
+ ...props,
1296
+ children: [
1297
+ /* @__PURE__ */ jsx28(HashTableCell, { hash: txHash, toolTipTitle: `Transaction Hash: ${txHash}`, eventNoun: "tx-hash", ...linkedTableCallProps }),
1298
+ /* @__PURE__ */ jsx28(BalanceHistoryBlockNumberTableCellInner, { blockNumber, eventNoun: "block-number", ...linkedTableCallProps }),
1299
+ /* @__PURE__ */ jsx28(BlockEpochTableCellInner, { epoch: timestamp, ...linkedTableCallProps }),
1300
+ /* @__PURE__ */ jsx28(AddressTableCell, { address: from, toolTipTitle: `From Address: ${from}`, eventNoun: "from-address", ...linkedTableCallProps }),
1301
+ /* @__PURE__ */ jsx28(AddressTableCell, { address: to, toolTipTitle: `To Address: ${to}`, eventNoun: "to-address", ...linkedTableCallProps }),
1302
+ /* @__PURE__ */ jsx28(RawAmountTableCell, { amount, type, eventNoun: "amount" }),
1303
+ /* @__PURE__ */ jsx28(HashTableCell, { hash: transferHash, toolTipTitle: `Transfer Hash: ${transferHash}`, eventNoun: noun, eventData: data, ...linkedTableCallProps }),
1304
+ /* @__PURE__ */ jsx28(TableCell14, { children: /* @__PURE__ */ jsx28(RawInfoIconButton, { rawValue: debug }) })
1305
+ ]
1306
+ },
1307
+ key
1308
+ );
1309
+ };
1324
1310
 
1325
1311
  // src/components/account/table/types/index.ts
1326
1312
  var TableHeadingLabels = [
@@ -1335,55 +1321,60 @@ var TableHeadingLabels = [
1335
1321
  ];
1336
1322
 
1337
1323
  // src/components/account/table/BalanceHistoryTableEx.tsx
1338
- var AccountBalanceHistoryTableEx = /* @__PURE__ */ __name(({ history, linked, ...props }) => {
1339
- return isDefined7(history) ? /* @__PURE__ */ React30.createElement(TableEx2, props, /* @__PURE__ */ React30.createElement(TableHead2, null, /* @__PURE__ */ React30.createElement(TableRow3, null, TableHeadingLabels.map((heading) => /* @__PURE__ */ React30.createElement(TableCell15, {
1340
- key: heading
1341
- }, heading)))), /* @__PURE__ */ React30.createElement(TableBody2, null, history?.map((row) => /* @__PURE__ */ React30.createElement(BalanceHistoryTableRow, {
1342
- key: row.key,
1343
- linked,
1344
- row
1345
- })))) : null;
1346
- }, "AccountBalanceHistoryTableEx");
1324
+ import { jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
1325
+ var AccountBalanceHistoryTableEx = ({
1326
+ history,
1327
+ linked,
1328
+ ...props
1329
+ }) => {
1330
+ return isDefined7(history) ? /* @__PURE__ */ jsxs18(TableEx2, { ...props, children: [
1331
+ /* @__PURE__ */ jsx29(TableHead2, { children: /* @__PURE__ */ jsx29(TableRow3, { children: TableHeadingLabels.map((heading) => /* @__PURE__ */ jsx29(TableCell15, { children: heading }, heading)) }) }),
1332
+ /* @__PURE__ */ jsx29(TableBody2, { children: history?.map((row) => /* @__PURE__ */ jsx29(BalanceHistoryTableRow, { linked, row }, row.key)) })
1333
+ ] }) : null;
1334
+ };
1347
1335
 
1348
1336
  // src/components/account/BalanceHistoryFlexbox.tsx
1349
- var AccountBalanceHistoryFlexBox = /* @__PURE__ */ __name(({ address, refresh, viewer, ...props }) => {
1337
+ import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
1338
+ var AccountBalanceHistoryFlexBox = ({
1339
+ address,
1340
+ refresh,
1341
+ viewer,
1342
+ ...props
1343
+ }) => {
1350
1344
  const [results, error] = useAccountBalanceHistory(address, viewer, void 0, void 0, refresh);
1351
- const { history, balance, truncated } = results || {
1352
- balance: [
1353
- AttoXL1(0n),
1354
- AttoXL1(0n)
1355
- ],
1356
- history: void 0
1357
- };
1358
- return isDefined8(history) && isDefined8(address) ? /* @__PURE__ */ React31.createElement(FlexCol3, props, /* @__PURE__ */ React31.createElement(ErrorRender3, {
1359
- error,
1360
- scope: "AccountBalanceHistoryTable"
1361
- }), /* @__PURE__ */ React31.createElement(Typography8, {
1362
- variant: "h6",
1363
- gutterBottom: true
1364
- }, formatBalanceMagnitude(balance)), truncated ? /* @__PURE__ */ React31.createElement(Typography8, {
1365
- variant: "caption",
1366
- gutterBottom: true
1367
- }, "Ranged Balance from", " ", history.at(-1).blockNumber, " ", "-", " ", history[0].blockNumber) : null, /* @__PURE__ */ React31.createElement(AccountBalanceHistoryTableEx, {
1368
- history
1369
- })) : null;
1370
- }, "AccountBalanceHistoryFlexBox");
1345
+ const {
1346
+ history,
1347
+ balance,
1348
+ truncated
1349
+ } = results || { balance: [AttoXL1(0n), AttoXL1(0n)], history: void 0 };
1350
+ return isDefined8(history) && isDefined8(address) ? /* @__PURE__ */ jsxs19(FlexCol3, { ...props, children: [
1351
+ /* @__PURE__ */ jsx30(ErrorRender3, { error, scope: "AccountBalanceHistoryTable" }),
1352
+ /* @__PURE__ */ jsx30(Typography8, { variant: "h6", gutterBottom: true, children: formatBalanceMagnitude(balance) }),
1353
+ truncated ? /* @__PURE__ */ jsxs19(Typography8, { variant: "caption", gutterBottom: true, children: [
1354
+ "Ranged Balance from",
1355
+ " ",
1356
+ history.at(-1).blockNumber,
1357
+ " ",
1358
+ "-",
1359
+ " ",
1360
+ history[0].blockNumber
1361
+ ] }) : null,
1362
+ /* @__PURE__ */ jsx30(AccountBalanceHistoryTableEx, { history })
1363
+ ] }) : null;
1364
+ };
1371
1365
 
1372
1366
  // src/components/account/hooks/usePagedAccountBalanceHistory.ts
1373
1367
  import { isDefined as isDefined9 } from "@xylabs/sdk-js";
1374
1368
  import { useAccountBalanceHistory as useAccountBalanceHistory2 } from "@xyo-network/react-chain-provider";
1375
1369
  import { useCallback, useState as useState9 } from "react";
1376
- var usePagedAccountBalanceHistory = /* @__PURE__ */ __name((address, viewer, maxPage = 1) => {
1370
+ var usePagedAccountBalanceHistory = (address, viewer, maxPage = 1) => {
1377
1371
  const [updatedBlockRange, setUpdatedBlockRange] = useState9();
1378
1372
  const [pagedHistory, setPagedHistory] = useState9();
1379
1373
  const [results, error, loading] = useAccountBalanceHistory2(address, viewer, maxPage, updatedBlockRange);
1380
1374
  const { history, truncated } = results || {};
1381
1375
  const [previousHistory, setPreviousHistory] = useState9(history);
1382
1376
  if (isDefined9(history) && history !== previousHistory) {
1383
- setPagedHistory([
1384
- ...pagedHistory ?? [],
1385
- ...history
1386
- ]);
1377
+ setPagedHistory([...pagedHistory ?? [], ...history]);
1387
1378
  setPreviousHistory(history);
1388
1379
  }
1389
1380
  const lastBlock = isDefined9(history) ? history.at(-1)?.blockNumber : void 0;
@@ -1391,15 +1382,9 @@ var usePagedAccountBalanceHistory = /* @__PURE__ */ __name((address, viewer, max
1391
1382
  const updateRange = useCallback(() => {
1392
1383
  if (isDefined9(lastBlock) && lastBlock > 0 && truncated) {
1393
1384
  const newEndBlock = lastBlock - 1;
1394
- setUpdatedBlockRange([
1395
- 0,
1396
- newEndBlock
1397
- ]);
1385
+ setUpdatedBlockRange([0, newEndBlock]);
1398
1386
  }
1399
- }, [
1400
- lastBlock,
1401
- truncated
1402
- ]);
1387
+ }, [lastBlock, truncated]);
1403
1388
  return {
1404
1389
  pagedHistory,
1405
1390
  historyComplete,
@@ -1407,123 +1392,125 @@ var usePagedAccountBalanceHistory = /* @__PURE__ */ __name((address, viewer, max
1407
1392
  error,
1408
1393
  loading
1409
1394
  };
1410
- }, "usePagedAccountBalanceHistory");
1395
+ };
1411
1396
 
1412
1397
  // src/components/chain/controls/PollingControlsFlexbox.tsx
1413
- import { Autorenew, Pause } from "@mui/icons-material";
1414
- import { Alert as Alert3, AlertTitle as AlertTitle2, Grow, Icon as Icon2, IconButton as IconButton4, Tooltip as Tooltip12 } from "@mui/material";
1398
+ import {
1399
+ Autorenew,
1400
+ Pause
1401
+ } from "@mui/icons-material";
1402
+ import {
1403
+ Alert as Alert3,
1404
+ AlertTitle as AlertTitle2,
1405
+ Grow,
1406
+ Icon as Icon2,
1407
+ IconButton as IconButton4,
1408
+ Tooltip as Tooltip12
1409
+ } from "@mui/material";
1415
1410
  import { FlexRow as FlexRow6 } from "@xylabs/react-flexbox";
1416
- import React36, { memo } from "react";
1411
+ import { memo } from "react";
1417
1412
 
1418
1413
  // src/components/chain/stats/Dialog.tsx
1419
1414
  import { QueryStats } from "@mui/icons-material";
1420
- import { Dialog as Dialog3, DialogContent as DialogContent3, DialogTitle as DialogTitle3, IconButton as IconButton3 } from "@mui/material";
1421
- import React34, { useState as useState10 } from "react";
1415
+ import {
1416
+ Dialog as Dialog3,
1417
+ DialogContent as DialogContent3,
1418
+ DialogTitle as DialogTitle3,
1419
+ IconButton as IconButton3
1420
+ } from "@mui/material";
1421
+ import { useState as useState10 } from "react";
1422
1422
 
1423
1423
  // src/components/chain/stats/producer/ProducerFlexbox.tsx
1424
1424
  import { Typography as Typography9 } from "@mui/material";
1425
1425
  import { ErrorRender as ErrorRender4 } from "@xylabs/react-error";
1426
1426
  import { FlexCol as FlexCol4 } from "@xylabs/react-flexbox";
1427
1427
  import { isChainSummaryProducers } from "@xyo-network/chain-analyze";
1428
- import React33, { useMemo as useMemo8 } from "react";
1428
+ import { useMemo as useMemo8 } from "react";
1429
1429
 
1430
1430
  // src/components/chain/stats/producer/Table.tsx
1431
- import { Table, TableBody as TableBody3, TableCell as TableCell16, TableHead as TableHead3, TableRow as TableRow4, useTheme } from "@mui/material";
1431
+ import {
1432
+ Table,
1433
+ TableBody as TableBody3,
1434
+ TableCell as TableCell16,
1435
+ TableHead as TableHead3,
1436
+ TableRow as TableRow4,
1437
+ useTheme
1438
+ } from "@mui/material";
1432
1439
  import { BlockiesAvatar as BlockiesAvatar2 } from "@xyo-network/xl1-blockies";
1433
- import React32 from "react";
1434
- var ChainProducerStatsTable = /* @__PURE__ */ __name(({ producers, ...props }) => {
1440
+ import { jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
1441
+ var ChainProducerStatsTable = ({ producers, ...props }) => {
1435
1442
  const theme = useTheme();
1436
- return /* @__PURE__ */ React32.createElement(Table, props, /* @__PURE__ */ React32.createElement(TableHead3, null, /* @__PURE__ */ React32.createElement(TableRow4, null, /* @__PURE__ */ React32.createElement(TableCell16, null, "Address"), /* @__PURE__ */ React32.createElement(TableCell16, null, "Blocks Produced"), /* @__PURE__ */ React32.createElement(TableCell16, null, "Rewards Earned Produced"))), /* @__PURE__ */ React32.createElement(TableBody3, null, producers?.map((producer) => /* @__PURE__ */ React32.createElement(TableRow4, {
1437
- key: producer.address
1438
- }, /* @__PURE__ */ React32.createElement(TableCell16, null, /* @__PURE__ */ React32.createElement(BlockiesAvatar2, {
1439
- blockiesOptions: {
1440
- seed: producer.address
1441
- },
1442
- sx: {
1443
- height: theme.spacing(2.75),
1444
- width: theme.spacing(2.75)
1445
- }
1446
- })), /* @__PURE__ */ React32.createElement(TableCell16, null, producer.blocksProduced.toString()), /* @__PURE__ */ React32.createElement(TableCell16, null, producer.rewardsEarned.toString())))));
1447
- }, "ChainProducerStatsTable");
1443
+ return /* @__PURE__ */ jsxs20(Table, { ...props, children: [
1444
+ /* @__PURE__ */ jsx31(TableHead3, { children: /* @__PURE__ */ jsxs20(TableRow4, { children: [
1445
+ /* @__PURE__ */ jsx31(TableCell16, { children: "Address" }),
1446
+ /* @__PURE__ */ jsx31(TableCell16, { children: "Blocks Produced" }),
1447
+ /* @__PURE__ */ jsx31(TableCell16, { children: "Rewards Earned Produced" })
1448
+ ] }) }),
1449
+ /* @__PURE__ */ jsx31(TableBody3, { children: producers?.map((producer) => /* @__PURE__ */ jsxs20(TableRow4, { children: [
1450
+ /* @__PURE__ */ jsx31(TableCell16, { children: /* @__PURE__ */ jsx31(BlockiesAvatar2, { blockiesOptions: { seed: producer.address }, sx: { height: theme.spacing(2.75), width: theme.spacing(2.75) } }) }),
1451
+ /* @__PURE__ */ jsx31(TableCell16, { children: producer.blocksProduced.toString() }),
1452
+ /* @__PURE__ */ jsx31(TableCell16, { children: producer.rewardsEarned.toString() })
1453
+ ] }, producer.address)) })
1454
+ ] });
1455
+ };
1448
1456
 
1449
1457
  // src/components/chain/stats/producer/ProducerFlexbox.tsx
1450
- var BlockProducerStatsFlexbox = /* @__PURE__ */ __name(({ payload, ...props }) => {
1458
+ import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
1459
+ var BlockProducerStatsFlexbox = ({ payload, ...props }) => {
1451
1460
  const [producer, producerError] = useMemo8(() => {
1452
1461
  if (payload) {
1453
- return isChainSummaryProducers(payload) ? [
1454
- payload
1455
- ] : [
1456
- void 0,
1457
- new Error("Payload is not a Chain Producer")
1458
- ];
1462
+ return isChainSummaryProducers(payload) ? [payload] : [void 0, new Error("Payload is not a Chain Producer")];
1459
1463
  } else {
1460
1464
  return [];
1461
1465
  }
1462
- }, [
1463
- payload
1464
- ]);
1465
- const producersArray = useMemo8(() => Object.values(producer?.producers ?? {}), [
1466
- producer
1467
- ]);
1468
- return /* @__PURE__ */ React33.createElement(FlexCol4, {
1469
- ...props,
1470
- sx: {
1471
- alignItems: "start",
1472
- gap: 1
1473
- }
1474
- }, /* @__PURE__ */ React33.createElement(ErrorRender4, {
1475
- error: producerError,
1476
- scope: "BlockProducerStatsFlexbox"
1477
- }), /* @__PURE__ */ React33.createElement(Typography9, {
1478
- sx: {
1479
- fontSize: "1rem"
1466
+ }, [payload]);
1467
+ const producersArray = useMemo8(() => Object.values(producer?.producers ?? {}), [producer]);
1468
+ return /* @__PURE__ */ jsxs21(
1469
+ FlexCol4,
1470
+ {
1471
+ ...props,
1472
+ sx: { alignItems: "start", gap: 1 },
1473
+ children: [
1474
+ /* @__PURE__ */ jsx32(ErrorRender4, { error: producerError, scope: "BlockProducerStatsFlexbox" }),
1475
+ /* @__PURE__ */ jsx32(Typography9, { sx: { fontSize: "1rem" }, children: "Block Producers" }),
1476
+ /* @__PURE__ */ jsx32(ChainProducerStatsTable, { producers: producersArray })
1477
+ ]
1480
1478
  }
1481
- }, "Block Producers"), /* @__PURE__ */ React33.createElement(ChainProducerStatsTable, {
1482
- producers: producersArray
1483
- }));
1484
- }, "BlockProducerStatsFlexbox");
1479
+ );
1480
+ };
1485
1481
 
1486
1482
  // src/components/chain/stats/Dialog.tsx
1487
- var ChainAnalyzerStatsDialog = /* @__PURE__ */ __name((props) => {
1483
+ import { Fragment as Fragment6, jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
1484
+ var ChainAnalyzerStatsDialog = (props) => {
1488
1485
  const { analyzers, statsUpdated } = useChainAnalyzersContext();
1489
- return /* @__PURE__ */ React34.createElement(Dialog3, props, /* @__PURE__ */ React34.createElement(DialogTitle3, null, "Chain Analysis"), /* @__PURE__ */ React34.createElement(DialogContent3, null, statsUpdated > 0 ? Object.entries(analyzers).map(([id2, analyzer]) => /* @__PURE__ */ React34.createElement("div", {
1490
- key: id2
1491
- }, id2 === "producers" ? /* @__PURE__ */ React34.createElement(BlockProducerStatsFlexbox, {
1492
- payload: analyzer.result()
1493
- }) : null)) : null));
1494
- }, "ChainAnalyzerStatsDialog");
1495
- var ChainAnalyzerStatsDialogFromContext = /* @__PURE__ */ __name((props) => {
1486
+ return /* @__PURE__ */ jsxs22(Dialog3, { ...props, children: [
1487
+ /* @__PURE__ */ jsx33(DialogTitle3, { children: "Chain Analysis" }),
1488
+ /* @__PURE__ */ jsx33(DialogContent3, { children: statsUpdated > 0 ? Object.entries(analyzers).map(([id2, analyzer]) => /* @__PURE__ */ jsx33("div", { children: id2 === "producers" ? /* @__PURE__ */ jsx33(BlockProducerStatsFlexbox, { payload: analyzer.result() }) : null }, id2)) : null })
1489
+ ] });
1490
+ };
1491
+ var ChainAnalyzerStatsDialogFromContext = (props) => {
1496
1492
  const [open, setOpen] = useState10(false);
1497
- const handleClose = /* @__PURE__ */ __name(() => setOpen(false), "handleClose");
1498
- return /* @__PURE__ */ React34.createElement(React34.Fragment, null, /* @__PURE__ */ React34.createElement(IconButton3, {
1499
- onClick: /* @__PURE__ */ __name(() => setOpen(true), "onClick")
1500
- }, /* @__PURE__ */ React34.createElement(QueryStats, null)), /* @__PURE__ */ React34.createElement(ChainAnalyzerStatsDialog, {
1501
- onClose: handleClose,
1502
- open,
1503
- ...props
1504
- }));
1505
- }, "ChainAnalyzerStatsDialogFromContext");
1493
+ const handleClose = () => setOpen(false);
1494
+ return /* @__PURE__ */ jsxs22(Fragment6, { children: [
1495
+ /* @__PURE__ */ jsx33(IconButton3, { onClick: () => setOpen(true), children: /* @__PURE__ */ jsx33(QueryStats, {}) }),
1496
+ /* @__PURE__ */ jsx33(ChainAnalyzerStatsDialog, { onClose: handleClose, open, ...props })
1497
+ ] });
1498
+ };
1506
1499
 
1507
1500
  // src/components/chain/controls/PulseSvgIcon.tsx
1508
- import { createSvgIcon, keyframes, styled as styled2 } from "@mui/material";
1509
- import React35 from "react";
1510
- var PulseSvgIcon = createSvgIcon(/* @__PURE__ */ React35.createElement("svg", {
1511
- viewBox: "0 0 80 80",
1512
- version: "1.1",
1513
- xmlns: "http://www.w3.org/2000/svg"
1514
- }, /* @__PURE__ */ React35.createElement("g", {
1515
- transform: "translate(34,34)"
1516
- }, /* @__PURE__ */ React35.createElement("circle", {
1517
- className: "core",
1518
- cx: "0",
1519
- cy: "0",
1520
- r: "6"
1521
- }), /* @__PURE__ */ React35.createElement("circle", {
1522
- className: "radar",
1523
- cx: "0",
1524
- cy: "0",
1525
- r: "6"
1526
- }))), "PulseSvgIcon");
1501
+ import {
1502
+ createSvgIcon,
1503
+ keyframes,
1504
+ styled as styled2
1505
+ } from "@mui/material";
1506
+ import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
1507
+ var PulseSvgIcon = createSvgIcon(
1508
+ /* @__PURE__ */ jsx34("svg", { viewBox: "0 0 80 80", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxs23("g", { transform: "translate(34,34)", children: [
1509
+ /* @__PURE__ */ jsx34("circle", { className: "core", cx: "0", cy: "0", r: "6" }),
1510
+ /* @__PURE__ */ jsx34("circle", { className: "radar", cx: "0", cy: "0", r: "6" })
1511
+ ] }) }),
1512
+ "PulseSvgIcon"
1513
+ );
1527
1514
  var pulse1 = keyframes`
1528
1515
  0% {
1529
1516
  opacity: 0;
@@ -1579,66 +1566,71 @@ var StyledPulseSvgIcon = styled2(PulseSvgIcon)(({ theme }) => {
1579
1566
  });
1580
1567
 
1581
1568
  // src/components/chain/controls/PollingControlsFlexbox.tsx
1582
- var PollingControlsFlexbox = /* @__PURE__ */ __name(({ blocksBehind, pollingState, setPollingState }) => {
1569
+ import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
1570
+ var PollingControlsFlexbox = ({
1571
+ blocksBehind,
1572
+ pollingState,
1573
+ setPollingState
1574
+ }) => {
1583
1575
  const paused = pollingState === "paused";
1584
1576
  const running = pollingState === "running";
1585
- return /* @__PURE__ */ React36.createElement(FlexRow6, {
1586
- sx: {
1587
- justifyContent: "space-between",
1588
- width: "100%"
1589
- }
1590
- }, /* @__PURE__ */ React36.createElement(FlexRow6, {
1591
- sx: {
1592
- gap: 2
1593
- }
1594
- }, running ? /* @__PURE__ */ React36.createElement(IconButton4, {
1595
- onClick: /* @__PURE__ */ __name(() => setPollingState?.("paused"), "onClick"),
1596
- title: "Pause Block Stream"
1597
- }, /* @__PURE__ */ React36.createElement(Pause, null)) : null, paused ? /* @__PURE__ */ React36.createElement(IconButton4, {
1598
- onClick: /* @__PURE__ */ __name(() => setPollingState?.("running"), "onClick"),
1599
- title: "Re-Sync Block Stream"
1600
- }, /* @__PURE__ */ React36.createElement(Autorenew, null)) : null, /* @__PURE__ */ React36.createElement(ChainAnalyzerStatsDialogFromContext, null)), /* @__PURE__ */ React36.createElement(FlexRow6, {
1601
- sx: {
1602
- gap: 2
1603
- }
1604
- }, /* @__PURE__ */ React36.createElement(Grow, {
1605
- in: (blocksBehind ?? 0) > 0
1606
- }, /* @__PURE__ */ React36.createElement(Tooltip12, {
1607
- title: "Click to Re-Sync"
1608
- }, /* @__PURE__ */ React36.createElement(Alert3, {
1609
- sx: {
1610
- py: 0,
1611
- px: 1,
1612
- cursor: "pointer"
1613
- },
1614
- severity: "warning",
1615
- onClick: /* @__PURE__ */ __name(() => setPollingState?.("running"), "onClick")
1616
- }, /* @__PURE__ */ React36.createElement(AlertTitle2, {
1617
- sx: {
1618
- mb: 0
1577
+ return /* @__PURE__ */ jsxs24(
1578
+ FlexRow6,
1579
+ {
1580
+ sx: {
1581
+ justifyContent: "space-between",
1582
+ width: "100%"
1583
+ },
1584
+ children: [
1585
+ /* @__PURE__ */ jsxs24(FlexRow6, { sx: { gap: 2 }, children: [
1586
+ running ? /* @__PURE__ */ jsx35(IconButton4, { onClick: () => setPollingState?.("paused"), title: "Pause Block Stream", children: /* @__PURE__ */ jsx35(Pause, {}) }) : null,
1587
+ paused ? /* @__PURE__ */ jsx35(IconButton4, { onClick: () => setPollingState?.("running"), title: "Re-Sync Block Stream", children: /* @__PURE__ */ jsx35(Autorenew, {}) }) : null,
1588
+ /* @__PURE__ */ jsx35(ChainAnalyzerStatsDialogFromContext, {})
1589
+ ] }),
1590
+ /* @__PURE__ */ jsxs24(FlexRow6, { sx: { gap: 2 }, children: [
1591
+ /* @__PURE__ */ jsx35(Grow, { in: (blocksBehind ?? 0) > 0, children: /* @__PURE__ */ jsx35(Tooltip12, { title: "Click to Re-Sync", children: /* @__PURE__ */ jsx35(
1592
+ Alert3,
1593
+ {
1594
+ sx: {
1595
+ py: 0,
1596
+ px: 1,
1597
+ cursor: "pointer"
1598
+ },
1599
+ severity: "warning",
1600
+ onClick: () => setPollingState?.("running"),
1601
+ children: /* @__PURE__ */ jsxs24(AlertTitle2, { sx: { mb: 0 }, children: [
1602
+ "Behind:",
1603
+ " ",
1604
+ blocksBehind
1605
+ ] })
1606
+ }
1607
+ ) }) }),
1608
+ /* @__PURE__ */ jsx35(Icon2, { children: /* @__PURE__ */ jsx35(StyledPulseSvgIcon, { className: running ? "" : "paused" }) })
1609
+ ] })
1610
+ ]
1619
1611
  }
1620
- }, "Behind:", " ", blocksBehind)))), /* @__PURE__ */ React36.createElement(Icon2, null, /* @__PURE__ */ React36.createElement(StyledPulseSvgIcon, {
1621
- className: running ? "" : "paused"
1622
- }))));
1623
- }, "PollingControlsFlexbox");
1624
- var MemoizedPollingControlsFlexbox = /* @__PURE__ */ memo(PollingControlsFlexbox);
1612
+ );
1613
+ };
1614
+ var MemoizedPollingControlsFlexbox = memo(PollingControlsFlexbox);
1625
1615
 
1626
1616
  // src/components/chain/dialog/Dialog.tsx
1627
- import { Button as Button4, Dialog as Dialog4, DialogActions as DialogActions3, DialogContent as DialogContent4 } from "@mui/material";
1628
- import React37 from "react";
1629
- var TransactionsDialog = /* @__PURE__ */ __name(({ onClose, ...props }) => {
1630
- return /* @__PURE__ */ React37.createElement(Dialog4, {
1631
- onClose,
1632
- ...props
1633
- }, /* @__PURE__ */ React37.createElement(DialogContent4, null, "Transactions Dialog"), /* @__PURE__ */ React37.createElement(DialogActions3, null, /* @__PURE__ */ React37.createElement(Button4, {
1634
- variant: "outlined",
1635
- onClick: /* @__PURE__ */ __name((e) => onClose?.(e, "escapeKeyDown"), "onClick")
1636
- }, "Close")));
1637
- }, "TransactionsDialog");
1617
+ import {
1618
+ Button as Button4,
1619
+ Dialog as Dialog4,
1620
+ DialogActions as DialogActions3,
1621
+ DialogContent as DialogContent4
1622
+ } from "@mui/material";
1623
+ import { jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
1624
+ var TransactionsDialog = ({ onClose, ...props }) => {
1625
+ return /* @__PURE__ */ jsxs25(Dialog4, { onClose, ...props, children: [
1626
+ /* @__PURE__ */ jsx36(DialogContent4, { children: "Transactions Dialog" }),
1627
+ /* @__PURE__ */ jsx36(DialogActions3, { children: /* @__PURE__ */ jsx36(Button4, { variant: "outlined", onClick: (e) => onClose?.(e, "escapeKeyDown"), children: "Close" }) })
1628
+ ] });
1629
+ };
1638
1630
 
1639
1631
  // src/components/chain/hooks/useOnBlock.ts
1640
1632
  import { useEffect, useRef as useRef2 } from "react";
1641
- var useOnBlock = /* @__PURE__ */ __name((initialHeadNumber, onAddBlock, liveHead, pollingState) => {
1633
+ var useOnBlock = (initialHeadNumber, onAddBlock, liveHead, pollingState) => {
1642
1634
  const blocksWhilePausedRef = useRef2([]);
1643
1635
  const lastLiveHeadRef = useRef2(liveHead);
1644
1636
  useEffect(() => {
@@ -1661,56 +1653,45 @@ var useOnBlock = /* @__PURE__ */ __name((initialHeadNumber, onAddBlock, liveHead
1661
1653
  void onAddBlock(liveHead);
1662
1654
  }
1663
1655
  }
1664
- }, [
1665
- initialHeadNumber,
1666
- liveHead,
1667
- onAddBlock,
1668
- pollingState
1669
- ]);
1656
+ }, [initialHeadNumber, liveHead, onAddBlock, pollingState]);
1670
1657
  return blocksWhilePausedRef;
1671
- }, "useOnBlock");
1658
+ };
1672
1659
 
1673
1660
  // src/components/chain/pagination/BlockChainPagination.tsx
1674
1661
  import { TablePaginationActions } from "@xyo-network/react-payload-table";
1675
- import React38 from "react";
1676
- var BlockChainPagination = /* @__PURE__ */ __name(({ count = 0, onPageChange, page, rowsPerPage = 10 }) => {
1677
- return /* @__PURE__ */ React38.createElement(TablePaginationActions, {
1678
- count,
1679
- onPageChange,
1680
- page,
1681
- rowsPerPage
1682
- });
1683
- }, "BlockChainPagination");
1662
+ import { jsx as jsx37 } from "react/jsx-runtime";
1663
+ var BlockChainPagination = ({
1664
+ count = 0,
1665
+ onPageChange,
1666
+ page,
1667
+ rowsPerPage = 10
1668
+ }) => {
1669
+ return /* @__PURE__ */ jsx37(TablePaginationActions, { count, onPageChange, page, rowsPerPage });
1670
+ };
1684
1671
 
1685
1672
  // src/components/chain/pagination/hooks/usePagination.tsx
1686
1673
  import { useMemo as useMemo9, useState as useState11 } from "react";
1687
- var useChainPagination = /* @__PURE__ */ __name((pageSize, blockComponents) => {
1674
+ var useChainPagination = (pageSize, blockComponents) => {
1688
1675
  const [page, setPage] = useState11(0);
1689
1676
  const paginatedBlockComponents = useMemo9(() => {
1690
1677
  const startIndex = page * pageSize;
1691
1678
  const endIndex = startIndex + pageSize;
1692
1679
  return blockComponents?.slice(startIndex, endIndex);
1693
- }, [
1694
- blockComponents,
1695
- page,
1696
- pageSize
1697
- ]);
1698
- const onPageChange = /* @__PURE__ */ __name((_event, newPage) => {
1680
+ }, [blockComponents, page, pageSize]);
1681
+ const onPageChange = (_event, newPage) => {
1699
1682
  setPage(newPage);
1700
- }, "onPageChange");
1683
+ };
1701
1684
  return {
1702
1685
  onPageChange,
1703
1686
  page,
1704
1687
  paginatedBlockComponents
1705
1688
  };
1706
- }, "useChainPagination");
1689
+ };
1707
1690
 
1708
1691
  // src/components/chain/styled/BlockListWrapperFlexbox.tsx
1709
1692
  import { styled as styled3 } from "@mui/material";
1710
1693
  import { FlexCol as FlexCol5 } from "@xylabs/react-flexbox";
1711
- var BlockListWrapperFlexBox = styled3(FlexCol5, {
1712
- name: "BlockListWrapperFlexbox"
1713
- })(() => ({
1694
+ var BlockListWrapperFlexBox = styled3(FlexCol5, { name: "BlockListWrapperFlexbox" })(() => ({
1714
1695
  "& > div:nth-of-type(2) .block-heading-flexbox .divider-spacer": {
1715
1696
  // hide the spacer for the first element
1716
1697
  visibility: "hidden"
@@ -1725,69 +1706,94 @@ var BlockListWrapperFlexBox = styled3(FlexCol5, {
1725
1706
  // src/components/payload/builder/Flexbox.tsx
1726
1707
  import { FlexCol as FlexCol6 } from "@xylabs/react-flexbox";
1727
1708
  import { JsonViewerEx as JsonViewerEx2 } from "@xyo-network/react-payload-raw-info";
1728
- import React39, { useState as useState12 } from "react";
1729
- var PayloadBuilderFlexbox = /* @__PURE__ */ __name(({ BuilderComponent, onBuild, ...props }) => {
1709
+ import { useState as useState12 } from "react";
1710
+ import { jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
1711
+ var PayloadBuilderFlexbox = ({
1712
+ BuilderComponent,
1713
+ onBuild,
1714
+ ...props
1715
+ }) => {
1730
1716
  const [payload, setPayload] = useState12();
1731
- const onBuildLocal = /* @__PURE__ */ __name((payload2) => {
1717
+ const onBuildLocal = (payload2) => {
1732
1718
  onBuild?.(payload2);
1733
1719
  setPayload(payload2);
1734
- }, "onBuildLocal");
1735
- return /* @__PURE__ */ React39.createElement(FlexCol6, {
1736
- ...props,
1737
- sx: [
1738
- {
1739
- gap: 2
1740
- },
1741
- ...Array.isArray(props.sx) ? props.sx : [
1742
- props.sx
1720
+ };
1721
+ return /* @__PURE__ */ jsxs26(
1722
+ FlexCol6,
1723
+ {
1724
+ ...props,
1725
+ sx: [{ gap: 2 }, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
1726
+ children: [
1727
+ /* @__PURE__ */ jsx38(BuilderComponent, { onBuild: onBuildLocal }),
1728
+ payload ? /* @__PURE__ */ jsx38(JsonViewerEx2, { value: payload }) : null
1743
1729
  ]
1744
- ]
1745
- }, /* @__PURE__ */ React39.createElement(BuilderComponent, {
1746
- onBuild: onBuildLocal
1747
- }), payload ? /* @__PURE__ */ React39.createElement(JsonViewerEx2, {
1748
- value: payload
1749
- }) : null);
1750
- }, "PayloadBuilderFlexbox");
1730
+ }
1731
+ );
1732
+ };
1751
1733
 
1752
1734
  // src/components/payload/builder/producer-intent/Form.tsx
1753
1735
  import { Button as Button5, FormControl as FormControl5 } from "@mui/material";
1754
1736
  import { usePromise as usePromise3 } from "@xylabs/react-promise";
1755
1737
  import { createProducerChainStakeIntent } from "@xyo-network/chain-protocol";
1756
- import React42, { useState as useState15 } from "react";
1738
+ import { useState as useState15 } from "react";
1757
1739
 
1758
1740
  // src/components/payload/fields/BlockNumberTextField.tsx
1759
- import { FormControl as FormControl3, FormHelperText as FormHelperText2, TextField as TextField3 } from "@mui/material";
1741
+ import {
1742
+ FormControl as FormControl3,
1743
+ FormHelperText as FormHelperText2,
1744
+ TextField as TextField3
1745
+ } from "@mui/material";
1760
1746
  import { toXL1BlockNumber as toXL1BlockNumber2 } from "@xyo-network/xl1-sdk";
1761
- import React40, { useState as useState13 } from "react";
1762
- var BlockNumberTextField = /* @__PURE__ */ __name(({ errorMessage, onBlockNumberChanged, onChange, ...props }) => {
1747
+ import { useState as useState13 } from "react";
1748
+ import { jsx as jsx39, jsxs as jsxs27 } from "react/jsx-runtime";
1749
+ var BlockNumberTextField = ({
1750
+ errorMessage,
1751
+ onBlockNumberChanged,
1752
+ onChange,
1753
+ ...props
1754
+ }) => {
1763
1755
  const [blockNumber, setBlockNumber] = useState13();
1764
- const handleChange = /* @__PURE__ */ __name((e) => {
1756
+ const handleChange = (e) => {
1765
1757
  const value = e.target.value.replaceAll(/\D/g, "");
1766
1758
  setBlockNumber(value.length > 0 ? Number(value) : void 0);
1767
1759
  onBlockNumberChanged?.(toXL1BlockNumber2(value));
1768
1760
  onChange?.(e);
1769
- }, "handleChange");
1761
+ };
1770
1762
  const errored = errorMessage !== void 0;
1771
- return /* @__PURE__ */ React40.createElement(FormControl3, {
1772
- fullWidth: true
1773
- }, /* @__PURE__ */ React40.createElement(TextField3, {
1774
- error: errored,
1775
- onChange: handleChange,
1776
- type: "number",
1777
- value: blockNumber ?? "",
1778
- ...props
1779
- }), errored ? /* @__PURE__ */ React40.createElement(FormHelperText2, {
1780
- sx: {
1781
- color: "error.main"
1782
- }
1783
- }, errorMessage) : null);
1784
- }, "BlockNumberTextField");
1763
+ return /* @__PURE__ */ jsxs27(FormControl3, { fullWidth: true, children: [
1764
+ /* @__PURE__ */ jsx39(
1765
+ TextField3,
1766
+ {
1767
+ error: errored,
1768
+ onChange: handleChange,
1769
+ type: "number",
1770
+ value: blockNumber ?? "",
1771
+ ...props
1772
+ }
1773
+ ),
1774
+ errored ? /* @__PURE__ */ jsx39(FormHelperText2, { sx: { color: "error.main" }, children: errorMessage }) : null
1775
+ ] });
1776
+ };
1785
1777
 
1786
1778
  // src/components/payload/fields/XyoAddressTextField.tsx
1787
- import { FormControl as FormControl4, FormHelperText as FormHelperText3, TextField as TextField4 } from "@mui/material";
1788
- import { asAddress, isAddress, isDefined as isDefined10 } from "@xylabs/sdk-js";
1789
- import React41, { useState as useState14 } from "react";
1790
- var XyoAddressTextField = /* @__PURE__ */ __name(({ onAddressChanged, onChange, resetValue, ...props }) => {
1779
+ import {
1780
+ FormControl as FormControl4,
1781
+ FormHelperText as FormHelperText3,
1782
+ TextField as TextField4
1783
+ } from "@mui/material";
1784
+ import {
1785
+ asAddress,
1786
+ isAddress,
1787
+ isDefined as isDefined10
1788
+ } from "@xylabs/sdk-js";
1789
+ import { useState as useState14 } from "react";
1790
+ import { jsx as jsx40, jsxs as jsxs28 } from "react/jsx-runtime";
1791
+ var XyoAddressTextField = ({
1792
+ onAddressChanged,
1793
+ onChange,
1794
+ resetValue,
1795
+ ...props
1796
+ }) => {
1791
1797
  const [address, setAddress] = useState14("");
1792
1798
  const [addressError, setAddressError] = useState14();
1793
1799
  const [previousResetValue, setPreviousResetValue] = useState14(resetValue);
@@ -1795,7 +1801,7 @@ var XyoAddressTextField = /* @__PURE__ */ __name(({ onAddressChanged, onChange,
1795
1801
  setPreviousResetValue(resetValue);
1796
1802
  setAddress("");
1797
1803
  }
1798
- const handleChange = /* @__PURE__ */ __name((event) => {
1804
+ const handleChange = (event) => {
1799
1805
  const { value } = event.target;
1800
1806
  onChange?.(event);
1801
1807
  const xyoAddress = asAddress(value);
@@ -1808,31 +1814,32 @@ var XyoAddressTextField = /* @__PURE__ */ __name(({ onAddressChanged, onChange,
1808
1814
  setAddressError(new Error("Invalid address"));
1809
1815
  }
1810
1816
  setAddress(value);
1811
- }, "handleChange");
1812
- const handleBlur = /* @__PURE__ */ __name(() => {
1817
+ };
1818
+ const handleBlur = () => {
1813
1819
  const xyoAddress = asAddress(address);
1814
1820
  if (!isAddress(xyoAddress)) {
1815
1821
  setAddressError(new Error("Invalid address"));
1816
1822
  onAddressChanged?.();
1817
1823
  }
1818
- }, "handleBlur");
1819
- return /* @__PURE__ */ React41.createElement(FormControl4, {
1820
- fullWidth: true
1821
- }, /* @__PURE__ */ React41.createElement(TextField4, {
1822
- error: !!addressError,
1823
- onBlur: handleBlur,
1824
- onChange: handleChange,
1825
- value: address,
1826
- ...props
1827
- }), addressError ? /* @__PURE__ */ React41.createElement(FormHelperText3, {
1828
- sx: {
1829
- color: "error.main"
1830
- }
1831
- }, addressError.message) : null);
1832
- }, "XyoAddressTextField");
1824
+ };
1825
+ return /* @__PURE__ */ jsxs28(FormControl4, { fullWidth: true, children: [
1826
+ /* @__PURE__ */ jsx40(
1827
+ TextField4,
1828
+ {
1829
+ error: !!addressError,
1830
+ onBlur: handleBlur,
1831
+ onChange: handleChange,
1832
+ value: address,
1833
+ ...props
1834
+ }
1835
+ ),
1836
+ addressError ? /* @__PURE__ */ jsx40(FormHelperText3, { sx: { color: "error.main" }, children: addressError.message }) : null
1837
+ ] });
1838
+ };
1833
1839
 
1834
1840
  // src/components/payload/builder/producer-intent/Form.tsx
1835
- var ProducerIntentBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
1841
+ import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
1842
+ var ProducerIntentBuilderForm = ({ onBuild }) => {
1836
1843
  const [delegate, setDelegate] = useState15();
1837
1844
  const [exp, setExp] = useState15();
1838
1845
  const [nbf, setNbf] = useState15();
@@ -1849,64 +1856,66 @@ var ProducerIntentBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
1849
1856
  }
1850
1857
  }
1851
1858
  }
1852
- }, [
1853
- delegate,
1854
- exp,
1855
- nbf
1856
- ]);
1857
- const onBuildLocal = /* @__PURE__ */ __name(() => {
1859
+ }, [delegate, exp, nbf]);
1860
+ const onBuildLocal = () => {
1858
1861
  if (onBuild && intentPayload) onBuild?.(intentPayload);
1859
- }, "onBuildLocal");
1860
- return /* @__PURE__ */ React42.createElement(React42.Fragment, null, /* @__PURE__ */ React42.createElement(FormControl5, {
1861
- fullWidth: true
1862
- }, /* @__PURE__ */ React42.createElement(XyoAddressTextField, {
1863
- label: "Delegate",
1864
- name: "delegate",
1865
- onAddressChanged: setDelegate,
1866
- required: true,
1867
- size: "small"
1868
- })), /* @__PURE__ */ React42.createElement(FormControl5, {
1869
- fullWidth: true
1870
- }, /* @__PURE__ */ React42.createElement(BlockNumberTextField, {
1871
- errorMessage: blockRangeError?.message,
1872
- label: "Expires",
1873
- name: "exp",
1874
- onBlockNumberChanged: setExp,
1875
- required: true,
1876
- size: "small"
1877
- })), /* @__PURE__ */ React42.createElement(FormControl5, {
1878
- fullWidth: true
1879
- }, /* @__PURE__ */ React42.createElement(BlockNumberTextField, {
1880
- errorMessage: blockRangeError?.message,
1881
- label: "Not Before",
1882
- name: "nbf",
1883
- onBlockNumberChanged: setNbf,
1884
- required: true,
1885
- size: "small"
1886
- })), /* @__PURE__ */ React42.createElement(Button5, {
1887
- disabled: !intentPayload,
1888
- variant: "contained",
1889
- onClick: onBuildLocal
1890
- }, "Build"));
1891
- }, "ProducerIntentBuilderForm");
1892
-
1893
- // src/components/payload/builder/transfer/Flexbox.tsx
1894
- import React45 from "react";
1862
+ };
1863
+ return /* @__PURE__ */ jsxs29(Fragment7, { children: [
1864
+ /* @__PURE__ */ jsx41(FormControl5, { fullWidth: true, children: /* @__PURE__ */ jsx41(XyoAddressTextField, { label: "Delegate", name: "delegate", onAddressChanged: setDelegate, required: true, size: "small" }) }),
1865
+ /* @__PURE__ */ jsx41(FormControl5, { fullWidth: true, children: /* @__PURE__ */ jsx41(
1866
+ BlockNumberTextField,
1867
+ {
1868
+ errorMessage: blockRangeError?.message,
1869
+ label: "Expires",
1870
+ name: "exp",
1871
+ onBlockNumberChanged: setExp,
1872
+ required: true,
1873
+ size: "small"
1874
+ }
1875
+ ) }),
1876
+ /* @__PURE__ */ jsx41(FormControl5, { fullWidth: true, children: /* @__PURE__ */ jsx41(
1877
+ BlockNumberTextField,
1878
+ {
1879
+ errorMessage: blockRangeError?.message,
1880
+ label: "Not Before",
1881
+ name: "nbf",
1882
+ onBlockNumberChanged: setNbf,
1883
+ required: true,
1884
+ size: "small"
1885
+ }
1886
+ ) }),
1887
+ /* @__PURE__ */ jsx41(Button5, { disabled: !intentPayload, variant: "contained", onClick: onBuildLocal, children: "Build" })
1888
+ ] });
1889
+ };
1895
1890
 
1896
1891
  // src/components/payload/builder/transfer/Form.tsx
1897
1892
  import { Button as Button6, FormControl as FormControl7 } from "@mui/material";
1898
1893
  import { isAddress as isAddress3 } from "@xylabs/sdk-js";
1899
1894
  import { TransferSchema } from "@xyo-network/xl1-sdk";
1900
- import React44, { useMemo as useMemo10, useState as useState17 } from "react";
1895
+ import { useMemo as useMemo10, useState as useState17 } from "react";
1901
1896
 
1902
1897
  // src/components/payload/builder/transfer/builder/SingleFlexbox.tsx
1903
1898
  import { RemoveCircle } from "@mui/icons-material";
1904
- import { FormControl as FormControl6, Icon as Icon3, IconButton as IconButton5 } from "@mui/material";
1899
+ import {
1900
+ FormControl as FormControl6,
1901
+ Icon as Icon3,
1902
+ IconButton as IconButton5
1903
+ } from "@mui/material";
1905
1904
  import { FlexRow as FlexRow7 } from "@xylabs/react-flexbox";
1906
- import { isAddress as isAddress2, isDefinedNotNull, toHex as toHex3 } from "@xylabs/sdk-js";
1905
+ import {
1906
+ isAddress as isAddress2,
1907
+ isDefinedNotNull,
1908
+ toHex as toHex3
1909
+ } from "@xylabs/sdk-js";
1907
1910
  import { BigIntInput } from "@xyo-network/react-shared";
1908
- import React43, { useEffect as useEffect2, useState as useState16 } from "react";
1909
- var SingleTransferBuilderFlexbox = /* @__PURE__ */ __name(({ onTransferUpdated, onRemoveTransfer, singleTransfer, ...props }) => {
1911
+ import { useEffect as useEffect2, useState as useState16 } from "react";
1912
+ import { jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
1913
+ var SingleTransferBuilderFlexbox = ({
1914
+ onTransferUpdated,
1915
+ onRemoveTransfer,
1916
+ singleTransfer,
1917
+ ...props
1918
+ }) => {
1910
1919
  const [toAddress3, setToAddress] = useState16();
1911
1920
  const [amount, setAmount] = useState16();
1912
1921
  useEffect2(() => {
@@ -1916,46 +1925,27 @@ var SingleTransferBuilderFlexbox = /* @__PURE__ */ __name(({ onTransferUpdated,
1916
1925
  to: toAddress3
1917
1926
  } : void 0;
1918
1927
  if (transferAmount) onTransferUpdated?.(transferAmount);
1919
- }, [
1920
- amount,
1921
- onTransferUpdated,
1922
- singleTransfer,
1923
- toAddress3
1924
- ]);
1925
- return /* @__PURE__ */ React43.createElement(FlexRow7, {
1926
- ...props,
1927
- sx: [
1928
- {
1928
+ }, [amount, onTransferUpdated, singleTransfer, toAddress3]);
1929
+ return /* @__PURE__ */ jsxs30(
1930
+ FlexRow7,
1931
+ {
1932
+ ...props,
1933
+ sx: [{
1929
1934
  alignItems: "start",
1930
1935
  gap: 1
1931
- },
1932
- ...Array.isArray(props.sx) ? props.sx : [
1933
- props.sx
1936
+ }, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
1937
+ children: [
1938
+ /* @__PURE__ */ jsx42(FormControl6, { fullWidth: true, children: /* @__PURE__ */ jsx42(XyoAddressTextField, { label: "To", name: "to", onAddressChanged: setToAddress, required: true, size: "small" }) }),
1939
+ /* @__PURE__ */ jsx42(FormControl6, { fullWidth: true, children: /* @__PURE__ */ jsx42(BigIntInput.TextField, { label: "Amount", name: "amount", onChangeFixedPoint: setAmount, required: true, size: "small" }) }),
1940
+ /* @__PURE__ */ jsx42(IconButton5, { onClick: () => onRemoveTransfer?.(singleTransfer.transferId), children: /* @__PURE__ */ jsx42(Icon3, { children: /* @__PURE__ */ jsx42(RemoveCircle, {}) }) })
1934
1941
  ]
1935
- ]
1936
- }, /* @__PURE__ */ React43.createElement(FormControl6, {
1937
- fullWidth: true
1938
- }, /* @__PURE__ */ React43.createElement(XyoAddressTextField, {
1939
- label: "To",
1940
- name: "to",
1941
- onAddressChanged: setToAddress,
1942
- required: true,
1943
- size: "small"
1944
- })), /* @__PURE__ */ React43.createElement(FormControl6, {
1945
- fullWidth: true
1946
- }, /* @__PURE__ */ React43.createElement(BigIntInput.TextField, {
1947
- label: "Amount",
1948
- name: "amount",
1949
- onChangeFixedPoint: setAmount,
1950
- required: true,
1951
- size: "small"
1952
- })), /* @__PURE__ */ React43.createElement(IconButton5, {
1953
- onClick: /* @__PURE__ */ __name(() => onRemoveTransfer?.(singleTransfer.transferId), "onClick")
1954
- }, /* @__PURE__ */ React43.createElement(Icon3, null, /* @__PURE__ */ React43.createElement(RemoveCircle, null))));
1955
- }, "SingleTransferBuilderFlexbox");
1942
+ }
1943
+ );
1944
+ };
1956
1945
 
1957
1946
  // src/components/payload/builder/transfer/Form.tsx
1958
- var TransferBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
1947
+ import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs31 } from "react/jsx-runtime";
1948
+ var TransferBuilderForm = ({ onBuild }) => {
1959
1949
  const [fromAddress, setFromAddress] = useState17();
1960
1950
  const [transfers, setTransfers] = useState17([]);
1961
1951
  const [epoch] = useState17(() => Date.now());
@@ -1972,80 +1962,64 @@ var TransferBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
1972
1962
  epoch
1973
1963
  };
1974
1964
  }
1975
- }, [
1976
- fromAddress,
1977
- transfers,
1978
- epoch
1979
- ]);
1980
- const onBuildLocal = /* @__PURE__ */ __name(() => {
1965
+ }, [fromAddress, transfers, epoch]);
1966
+ const onBuildLocal = () => {
1981
1967
  if (onBuild && transferPayload) onBuild?.(transferPayload);
1982
- }, "onBuildLocal");
1983
- const onTransferAdded = /* @__PURE__ */ __name(() => {
1968
+ };
1969
+ const onTransferAdded = () => {
1984
1970
  const transferAmount = {
1985
1971
  amount: "",
1986
1972
  transferId: Date.now(),
1987
1973
  to: ""
1988
1974
  };
1989
- setTransfers((prev) => [
1990
- ...prev,
1991
- transferAmount
1992
- ]);
1993
- }, "onTransferAdded");
1994
- const onTransferRemoved = /* @__PURE__ */ __name((transferId) => {
1975
+ setTransfers((prev) => [...prev, transferAmount]);
1976
+ };
1977
+ const onTransferRemoved = (transferId) => {
1995
1978
  setTransfers((prev) => prev.filter((transfer) => transfer.transferId !== transferId));
1996
- }, "onTransferRemoved");
1997
- const onTransferUpdated = /* @__PURE__ */ __name((singleTransfer) => {
1979
+ };
1980
+ const onTransferUpdated = (singleTransfer) => {
1998
1981
  setTransfers((prev) => prev.map((transfer) => {
1999
1982
  if (transfer.transferId === singleTransfer.transferId) {
2000
1983
  return singleTransfer;
2001
1984
  }
2002
1985
  return transfer;
2003
1986
  }));
2004
- }, "onTransferUpdated");
2005
- return /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(FormControl7, {
2006
- fullWidth: true
2007
- }, /* @__PURE__ */ React44.createElement(XyoAddressTextField, {
2008
- label: "From",
2009
- name: "from",
2010
- onAddressChanged: setFromAddress,
2011
- required: true,
2012
- size: "small"
2013
- })), /* @__PURE__ */ React44.createElement(Button6, {
2014
- onClick: onTransferAdded,
2015
- size: "small",
2016
- variant: "contained"
2017
- }, "Add Transfer"), transfers.map((transfer) => /* @__PURE__ */ React44.createElement(SingleTransferBuilderFlexbox, {
2018
- key: transfer.transferId,
2019
- onTransferUpdated,
2020
- onRemoveTransfer: onTransferRemoved,
2021
- singleTransfer: transfer,
2022
- sx: {
2023
- width: "100%"
2024
- }
2025
- })), /* @__PURE__ */ React44.createElement(Button6, {
2026
- disabled: !transferPayload,
2027
- variant: "contained",
2028
- onClick: onBuildLocal
2029
- }, "Build"));
2030
- }, "TransferBuilderForm");
1987
+ };
1988
+ return /* @__PURE__ */ jsxs31(Fragment8, { children: [
1989
+ /* @__PURE__ */ jsx43(FormControl7, { fullWidth: true, children: /* @__PURE__ */ jsx43(XyoAddressTextField, { label: "From", name: "from", onAddressChanged: setFromAddress, required: true, size: "small" }) }),
1990
+ /* @__PURE__ */ jsx43(Button6, { onClick: onTransferAdded, size: "small", variant: "contained", children: "Add Transfer" }),
1991
+ transfers.map((transfer) => /* @__PURE__ */ jsx43(
1992
+ SingleTransferBuilderFlexbox,
1993
+ {
1994
+ onTransferUpdated,
1995
+ onRemoveTransfer: onTransferRemoved,
1996
+ singleTransfer: transfer,
1997
+ sx: { width: "100%" }
1998
+ },
1999
+ transfer.transferId
2000
+ )),
2001
+ /* @__PURE__ */ jsx43(Button6, { disabled: !transferPayload, variant: "contained", onClick: onBuildLocal, children: "Build" })
2002
+ ] });
2003
+ };
2031
2004
 
2032
2005
  // src/components/payload/builder/transfer/Flexbox.tsx
2033
- var TransferBuilderFlexbox = /* @__PURE__ */ __name(({ onBuild, ...props }) => /* @__PURE__ */ React45.createElement(PayloadBuilderFlexbox, {
2034
- BuilderComponent: TransferBuilderForm,
2035
- onBuild,
2036
- ...props,
2037
- sx: {
2038
- gap: 4,
2039
- alignItems: "start"
2006
+ import { jsx as jsx44 } from "react/jsx-runtime";
2007
+ var TransferBuilderFlexbox = ({ onBuild, ...props }) => /* @__PURE__ */ jsx44(
2008
+ PayloadBuilderFlexbox,
2009
+ {
2010
+ BuilderComponent: TransferBuilderForm,
2011
+ onBuild,
2012
+ ...props,
2013
+ sx: { gap: 4, alignItems: "start" }
2040
2014
  }
2041
- }), "TransferBuilderFlexbox");
2015
+ );
2042
2016
 
2043
2017
  // src/components/rate/flexbox/FlexBox.tsx
2044
2018
  import { FlexCol as FlexCol7 } from "@xylabs/react-flexbox";
2045
2019
  import { isDefined as isDefined11 } from "@xylabs/sdk-js";
2046
2020
 
2047
2021
  // src/helpers/rate/rateUnitToLabel.ts
2048
- var rateUnitToLabel = /* @__PURE__ */ __name((rateUnit) => {
2022
+ var rateUnitToLabel = (rateUnit) => {
2049
2023
  switch (rateUnit) {
2050
2024
  case "millis": {
2051
2025
  return "b/ms";
@@ -2069,7 +2043,7 @@ var rateUnitToLabel = /* @__PURE__ */ __name((rateUnit) => {
2069
2043
  return rateUnit;
2070
2044
  }
2071
2045
  }
2072
- }, "rateUnitToLabel");
2046
+ };
2073
2047
 
2074
2048
  // src/components/rate/SpanTypography.tsx
2075
2049
  import { ViewAgendaOutlined } from "@mui/icons-material";
@@ -2079,7 +2053,16 @@ import { Tooltip as Tooltip13 } from "@mui/material";
2079
2053
  import { Icon as Icon4, Typography as Typography10 } from "@mui/material";
2080
2054
  import { isUndefined as isUndefined2 } from "@xylabs/sdk-js";
2081
2055
  import { useEffect as useEffect3, useState as useState18 } from "react";
2082
- var MetricTypography = /* @__PURE__ */ __name(({ animationDurationMs = 1e3, disableAnimation, icon, label, metric, sx, ...props }) => {
2056
+ import { jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
2057
+ var MetricTypography = ({
2058
+ animationDurationMs = 1e3,
2059
+ disableAnimation,
2060
+ icon,
2061
+ label,
2062
+ metric,
2063
+ sx,
2064
+ ...props
2065
+ }) => {
2083
2066
  const [displayValue, setDisplayValue] = useState18(0);
2084
2067
  if (isUndefined2(metric) && displayValue !== 0) {
2085
2068
  setDisplayValue(0);
@@ -2090,7 +2073,7 @@ var MetricTypography = /* @__PURE__ */ __name(({ animationDurationMs = 1e3, disa
2090
2073
  const startTime = Date.now();
2091
2074
  const startValue = 0;
2092
2075
  const endValue = metric;
2093
- const animate = /* @__PURE__ */ __name(() => {
2076
+ const animate = () => {
2094
2077
  const now = Date.now();
2095
2078
  const elapsed = now - startTime;
2096
2079
  const progress = Math.min(elapsed / duration, 1);
@@ -2100,187 +2083,222 @@ var MetricTypography = /* @__PURE__ */ __name(({ animationDurationMs = 1e3, disa
2100
2083
  if (progress < 1) {
2101
2084
  requestAnimationFrame(animate);
2102
2085
  }
2103
- }, "animate");
2086
+ };
2104
2087
  globalThis.requestAnimationFrame(animate);
2105
- }, [
2106
- animationDurationMs,
2107
- metric
2108
- ]);
2088
+ }, [animationDurationMs, metric]);
2109
2089
  const isWholeNumber = metric !== void 0 && Number.isInteger(metric);
2110
2090
  const formattedValue = disableAnimation ? metric : displayValue.toLocaleString(navigator.language, {
2111
2091
  minimumFractionDigits: 0,
2112
2092
  maximumFractionDigits: isWholeNumber ? 0 : 2
2113
2093
  });
2114
- return /* @__PURE__ */ React.createElement(Typography10, {
2115
- variant: "h4",
2116
- ...props,
2117
- sx: [
2118
- {
2094
+ return /* @__PURE__ */ jsxs32(
2095
+ Typography10,
2096
+ {
2097
+ variant: "h4",
2098
+ ...props,
2099
+ sx: [{
2119
2100
  mb: 1,
2120
2101
  display: "flex",
2121
2102
  alignItems: "end",
2122
2103
  gap: 0.5
2123
- },
2124
- ...Array.isArray(sx) ? sx : sx ? [
2125
- sx
2126
- ] : []
2127
- ]
2128
- }, /* @__PURE__ */ React.createElement(Icon4, {
2129
- sx: {
2130
- fontSize: "large"
2131
- }
2132
- }, icon), formattedValue, " ", /* @__PURE__ */ React.createElement(Typography10, {
2133
- component: "span",
2134
- variant: "caption",
2135
- sx: {
2136
- lineHeight: 1.86
2104
+ }, ...Array.isArray(sx) ? sx : sx ? [sx] : []],
2105
+ children: [
2106
+ /* @__PURE__ */ jsx45(Icon4, { sx: { fontSize: "large" }, children: icon }),
2107
+ formattedValue,
2108
+ " ",
2109
+ /* @__PURE__ */ jsx45(
2110
+ Typography10,
2111
+ {
2112
+ component: "span",
2113
+ variant: "caption",
2114
+ sx: { lineHeight: 1.86 },
2115
+ children: label
2116
+ }
2117
+ )
2118
+ ]
2137
2119
  }
2138
- }, label));
2139
- }, "MetricTypography");
2120
+ );
2121
+ };
2140
2122
 
2141
2123
  // src/components/rate/SpanTypography.tsx
2142
- var BlockRateSpanTypography = /* @__PURE__ */ __name(({ range, span, sx, ...props }) => {
2143
- return /* @__PURE__ */ React.createElement(Tooltip13, {
2144
- title: `Block Range: ${range?.join(" - ")}`
2145
- }, /* @__PURE__ */ React.createElement(MetricTypography, {
2146
- icon: /* @__PURE__ */ React.createElement(ViewAgendaOutlined, {
2147
- fontSize: "large"
2148
- }),
2149
- metric: span,
2150
- label: "blocks",
2151
- ...props
2152
- }));
2153
- }, "BlockRateSpanTypography");
2124
+ import { jsx as jsx46 } from "react/jsx-runtime";
2125
+ var BlockRateSpanTypography = ({
2126
+ range,
2127
+ span,
2128
+ sx,
2129
+ ...props
2130
+ }) => {
2131
+ return /* @__PURE__ */ jsx46(Tooltip13, { title: `Block Range: ${range?.join(" - ")}`, children: /* @__PURE__ */ jsx46(MetricTypography, { icon: /* @__PURE__ */ jsx46(ViewAgendaOutlined, { fontSize: "large" }), metric: span, label: "blocks", ...props }) });
2132
+ };
2154
2133
 
2155
2134
  // src/components/rate/SpeedTypography.tsx
2156
2135
  import { SpeedOutlined } from "@mui/icons-material";
2157
- var BlockRateSpeedTypography = /* @__PURE__ */ __name(({ rate, rateUnitLabel, ...props }) => {
2158
- return /* @__PURE__ */ React.createElement(MetricTypography, {
2159
- icon: /* @__PURE__ */ React.createElement(SpeedOutlined, {
2160
- fontSize: "large"
2161
- }),
2162
- metric: rate,
2163
- label: rateUnitLabel,
2164
- ...props
2165
- });
2166
- }, "BlockRateSpeedTypography");
2136
+ import { jsx as jsx47 } from "react/jsx-runtime";
2137
+ var BlockRateSpeedTypography = ({
2138
+ rate,
2139
+ rateUnitLabel,
2140
+ ...props
2141
+ }) => {
2142
+ return /* @__PURE__ */ jsx47(MetricTypography, { icon: /* @__PURE__ */ jsx47(SpeedOutlined, { fontSize: "large" }), metric: rate, label: rateUnitLabel, ...props });
2143
+ };
2167
2144
 
2168
2145
  // src/components/rate/TimeTypography.tsx
2169
2146
  import { TimelapseOutlined } from "@mui/icons-material";
2170
- var BlockRateTimeTypography = /* @__PURE__ */ __name(({ timeUnit, timeDifference, sx, ...props }) => {
2171
- return /* @__PURE__ */ React.createElement(MetricTypography, {
2172
- icon: /* @__PURE__ */ React.createElement(TimelapseOutlined, {
2173
- fontSize: "large"
2174
- }),
2175
- metric: timeDifference,
2176
- label: timeUnit,
2177
- ...props
2178
- });
2179
- }, "BlockRateTimeTypography");
2147
+ import { jsx as jsx48 } from "react/jsx-runtime";
2148
+ var BlockRateTimeTypography = ({
2149
+ timeUnit,
2150
+ timeDifference,
2151
+ sx,
2152
+ ...props
2153
+ }) => {
2154
+ return /* @__PURE__ */ jsx48(MetricTypography, { icon: /* @__PURE__ */ jsx48(TimelapseOutlined, { fontSize: "large" }), metric: timeDifference, label: timeUnit, ...props });
2155
+ };
2180
2156
 
2181
2157
  // src/components/rate/flexbox/FlexBox.tsx
2182
- var BlockRateFlexBox = /* @__PURE__ */ __name(({ blockRate, ...flexBoxProps }) => {
2183
- const { range, span, rate, timeUnit, timeDifference } = blockRate ?? {};
2184
- const rateUnitLabel = isDefined11(timeUnit) ? rateUnitToLabel(timeUnit) : "";
2185
- return /* @__PURE__ */ React.createElement(FlexCol7, {
2186
- ...flexBoxProps,
2187
- sx: [
2188
- {
2189
- alignItems: "start"
2190
- },
2191
- ...Array.isArray(flexBoxProps.sx) ? flexBoxProps.sx : [
2192
- flexBoxProps.sx
2193
- ]
2194
- ]
2195
- }, /* @__PURE__ */ React.createElement(BlockRateSpeedTypography, {
2196
- rate,
2197
- rateUnitLabel
2198
- }), /* @__PURE__ */ React.createElement(BlockRateSpanTypography, {
2158
+ import { jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
2159
+ var BlockRateFlexBox = ({
2160
+ blockRate,
2161
+ ...flexBoxProps
2162
+ }) => {
2163
+ const {
2199
2164
  range,
2200
- span
2201
- }), /* @__PURE__ */ React.createElement(BlockRateTimeTypography, {
2165
+ span,
2166
+ rate,
2202
2167
  timeUnit,
2203
2168
  timeDifference
2204
- }));
2205
- }, "BlockRateFlexBox");
2169
+ } = blockRate ?? {};
2170
+ const rateUnitLabel = isDefined11(timeUnit) ? rateUnitToLabel(timeUnit) : "";
2171
+ return /* @__PURE__ */ jsxs33(
2172
+ FlexCol7,
2173
+ {
2174
+ ...flexBoxProps,
2175
+ sx: [{ alignItems: "start" }, ...Array.isArray(flexBoxProps.sx) ? flexBoxProps.sx : [flexBoxProps.sx]],
2176
+ children: [
2177
+ /* @__PURE__ */ jsx49(BlockRateSpeedTypography, { rate, rateUnitLabel }),
2178
+ /* @__PURE__ */ jsx49(BlockRateSpanTypography, { range, span }),
2179
+ /* @__PURE__ */ jsx49(BlockRateTimeTypography, { timeUnit, timeDifference })
2180
+ ]
2181
+ }
2182
+ );
2183
+ };
2206
2184
 
2207
2185
  // src/components/rate/gauge/Container.tsx
2208
- import { GaugeContainer, GaugeReferenceArc, GaugeValueArc } from "@mui/x-charts";
2186
+ import {
2187
+ GaugeContainer,
2188
+ GaugeReferenceArc,
2189
+ GaugeValueArc
2190
+ } from "@mui/x-charts";
2209
2191
 
2210
2192
  // src/components/rate/gauge/helpers/blockRateConversions.ts
2211
2193
  import { isDefined as isDefined12, isUndefined as isUndefined3 } from "@xylabs/sdk-js";
2212
- var toBlocksPerMillisecond = /* @__PURE__ */ __name((rateValue, unit) => {
2194
+ var toBlocksPerMillisecond = (rateValue, unit) => {
2213
2195
  if (isUndefined3(unit)) return rateValue;
2214
2196
  const conversions = {
2215
2197
  millis: 1,
2198
+ // already in milliseconds
2216
2199
  seconds: 1e3,
2200
+ // 1 second = 1000 milliseconds
2217
2201
  minutes: 6e4,
2202
+ // 1 minute = 60000 milliseconds
2218
2203
  hours: 36e5,
2204
+ // 1 hour = 3600000 milliseconds
2219
2205
  days: 864e5,
2206
+ // 1 day = 86400000 milliseconds
2220
2207
  weeks: 6048e5
2208
+ // 1 week = 604800000 milliseconds
2221
2209
  };
2222
2210
  return rateValue * (isDefined12(conversions[unit]) ? conversions[unit] : 1);
2223
- }, "toBlocksPerMillisecond");
2224
- var toBlocksPerSecond = /* @__PURE__ */ __name((rateValue, unit) => {
2211
+ };
2212
+ var toBlocksPerSecond = (rateValue, unit) => {
2225
2213
  if (isUndefined3(unit)) return rateValue;
2226
2214
  const conversions = {
2227
2215
  millis: 1e-3,
2216
+ // 1 millisecond = 0.001 seconds
2228
2217
  seconds: 1,
2218
+ // already in seconds
2229
2219
  minutes: 60,
2220
+ // 1 minute = 60 seconds
2230
2221
  hours: 3600,
2222
+ // 1 hour = 3600 seconds
2231
2223
  days: 86400,
2224
+ // 1 day = 86400 seconds
2232
2225
  weeks: 604800
2226
+ // 1 week = 604800 seconds
2233
2227
  };
2234
2228
  return rateValue * (isDefined12(conversions[unit]) ? conversions[unit] : 1);
2235
- }, "toBlocksPerSecond");
2236
- var toBlocksPerMinute = /* @__PURE__ */ __name((rateValue, unit) => {
2229
+ };
2230
+ var toBlocksPerMinute = (rateValue, unit) => {
2237
2231
  if (isUndefined3(unit)) return rateValue;
2238
2232
  const conversions = {
2239
2233
  millis: 6e4,
2234
+ // 1 minute = 60000 milliseconds
2240
2235
  seconds: 60,
2236
+ // 1 minute = 60 seconds
2241
2237
  minutes: 1,
2238
+ // already in minutes
2242
2239
  hours: 1 / 60,
2240
+ // 1 hour = 60 minutes
2243
2241
  days: 1 / 1440,
2242
+ // 1 day = 1440 minutes
2244
2243
  weeks: 1 / 10080
2244
+ // 1 week = 10080 minutes
2245
2245
  };
2246
2246
  return rateValue * (isDefined12(conversions[unit]) ? conversions[unit] : 1);
2247
- }, "toBlocksPerMinute");
2248
- var toBlocksPerHour = /* @__PURE__ */ __name((rateValue, unit) => {
2247
+ };
2248
+ var toBlocksPerHour = (rateValue, unit) => {
2249
2249
  if (isUndefined3(unit)) return rateValue;
2250
2250
  const conversions = {
2251
2251
  millis: 36e5,
2252
+ // 1 hour = 3600000 milliseconds
2252
2253
  seconds: 3600,
2254
+ // 1 hour = 3600 seconds
2253
2255
  minutes: 60,
2256
+ // 1 hour = 60 minutes
2254
2257
  hours: 1,
2258
+ // already in hours
2255
2259
  days: 1 / 24,
2260
+ // 1 day = 24 hours
2256
2261
  weeks: 1 / 168
2262
+ // 1 week = 168 hours
2257
2263
  };
2258
2264
  return rateValue * (isDefined12(conversions[unit]) ? conversions[unit] : 1);
2259
- }, "toBlocksPerHour");
2260
- var toBlocksPerDay = /* @__PURE__ */ __name((rateValue, unit) => {
2265
+ };
2266
+ var toBlocksPerDay = (rateValue, unit) => {
2261
2267
  if (isUndefined3(unit)) return rateValue;
2262
2268
  const conversions = {
2263
2269
  millis: 864e5,
2270
+ // 1 day = 86400000 milliseconds
2264
2271
  seconds: 86400,
2272
+ // 1 day = 86400 seconds
2265
2273
  minutes: 1440,
2274
+ // 1 day = 1440 minutes
2266
2275
  hours: 24,
2276
+ // 1 day = 24 hours
2267
2277
  days: 1,
2278
+ // already in days
2268
2279
  weeks: 1 / 7
2280
+ // 1 week = 7 days
2269
2281
  };
2270
2282
  return rateValue * (isDefined12(conversions[unit]) ? conversions[unit] : 1);
2271
- }, "toBlocksPerDay");
2272
- var toBlocksPerWeek = /* @__PURE__ */ __name((rateValue, unit) => {
2283
+ };
2284
+ var toBlocksPerWeek = (rateValue, unit) => {
2273
2285
  if (isUndefined3(unit)) return rateValue;
2274
2286
  const conversions = {
2275
2287
  millis: 6048e5,
2288
+ // 1 week = 604800000 milliseconds
2276
2289
  seconds: 604800,
2290
+ // 1 week = 604800 seconds
2277
2291
  minutes: 10080,
2292
+ // 1 week = 10080 minutes
2278
2293
  hours: 168,
2294
+ // 1 week = 168 hours
2279
2295
  days: 7,
2296
+ // 1 week = 7 days
2280
2297
  weeks: 1
2298
+ // already in weeks
2281
2299
  };
2282
2300
  return rateValue * (isDefined12(conversions[unit]) ? conversions[unit] : 1);
2283
- }, "toBlocksPerWeek");
2301
+ };
2284
2302
  var BlockRateConversions = {
2285
2303
  millis: toBlocksPerMillisecond,
2286
2304
  seconds: toBlocksPerSecond,
@@ -2295,10 +2313,16 @@ import { useTheme as useTheme2 } from "@mui/material";
2295
2313
  import { useGaugeState } from "@mui/x-charts/Gauge";
2296
2314
  import { isDefined as isDefined13 } from "@xylabs/sdk-js";
2297
2315
  import { useEffect as useEffect4, useState as useState19 } from "react";
2298
- var GaugePointer = /* @__PURE__ */ __name(({ pointerColor, startAngle = 0 }) => {
2316
+ import { jsx as jsx50, jsxs as jsxs34 } from "react/jsx-runtime";
2317
+ var GaugePointer = ({ pointerColor, startAngle = 0 }) => {
2299
2318
  const theme = useTheme2();
2300
2319
  const strokeColor = isDefined13(pointerColor) ? pointerColor : theme.palette.error.dark;
2301
- const { valueAngle, outerRadius, cx, cy } = useGaugeState();
2320
+ const {
2321
+ valueAngle,
2322
+ outerRadius,
2323
+ cx,
2324
+ cy
2325
+ } = useGaugeState();
2302
2326
  const [currentAngle, setCurrentAngle] = useState19(startAngle);
2303
2327
  useEffect4(() => {
2304
2328
  if (valueAngle === null) return;
@@ -2306,7 +2330,7 @@ var GaugePointer = /* @__PURE__ */ __name(({ pointerColor, startAngle = 0 }) =>
2306
2330
  const startTime = Date.now();
2307
2331
  const animationStartAngle = currentAngle;
2308
2332
  const endAngle = valueAngle;
2309
- const animate = /* @__PURE__ */ __name(() => {
2333
+ const animate = () => {
2310
2334
  const now = Date.now();
2311
2335
  const elapsed = now - startTime;
2312
2336
  const progress = Math.min(elapsed / duration, 1);
@@ -2316,12 +2340,9 @@ var GaugePointer = /* @__PURE__ */ __name(({ pointerColor, startAngle = 0 }) =>
2316
2340
  if (progress < 1) {
2317
2341
  globalThis.requestAnimationFrame(animate);
2318
2342
  }
2319
- }, "animate");
2343
+ };
2320
2344
  globalThis.requestAnimationFrame(animate);
2321
- }, [
2322
- currentAngle,
2323
- valueAngle
2324
- ]);
2345
+ }, [currentAngle, valueAngle]);
2325
2346
  if (valueAngle === null) {
2326
2347
  return null;
2327
2348
  }
@@ -2329,27 +2350,41 @@ var GaugePointer = /* @__PURE__ */ __name(({ pointerColor, startAngle = 0 }) =>
2329
2350
  x: cx + outerRadius * Math.sin(currentAngle),
2330
2351
  y: cy - outerRadius * Math.cos(currentAngle)
2331
2352
  };
2332
- return /* @__PURE__ */ React.createElement("g", {
2333
- className: "GaugePointer"
2334
- }, /* @__PURE__ */ React.createElement("circle", {
2335
- cx,
2336
- cy,
2337
- r: 5,
2338
- fill: strokeColor
2339
- }), /* @__PURE__ */ React.createElement("path", {
2340
- d: `M ${cx} ${cy} L ${target.x} ${target.y}`,
2341
- stroke: strokeColor,
2342
- strokeWidth: 3
2343
- }));
2344
- }, "GaugePointer");
2353
+ return /* @__PURE__ */ jsxs34("g", { className: "GaugePointer", children: [
2354
+ /* @__PURE__ */ jsx50("circle", { cx, cy, r: 5, fill: strokeColor }),
2355
+ /* @__PURE__ */ jsx50(
2356
+ "path",
2357
+ {
2358
+ d: `M ${cx} ${cy} L ${target.x} ${target.y}`,
2359
+ stroke: strokeColor,
2360
+ strokeWidth: 3
2361
+ }
2362
+ )
2363
+ ] });
2364
+ };
2345
2365
 
2346
2366
  // src/components/rate/gauge/Ticks.tsx
2347
2367
  import { useTheme as useTheme3 } from "@mui/material";
2348
2368
  import { useGaugeState as useGaugeState2 } from "@mui/x-charts/Gauge";
2349
2369
  import { isDefined as isDefined14 } from "@xylabs/sdk-js";
2350
- var GaugeTicks = /* @__PURE__ */ __name(({ numTicks = 11, minorTicksPerMajor = 4, majorTickLength = 0.2, minorTickLength = 0.15, majorTickWidth = 2, minorTickWidth = 1, tickColor }) => {
2370
+ import { jsx as jsx51 } from "react/jsx-runtime";
2371
+ var GaugeTicks = ({
2372
+ numTicks = 11,
2373
+ minorTicksPerMajor = 4,
2374
+ majorTickLength = 0.2,
2375
+ minorTickLength = 0.15,
2376
+ majorTickWidth = 2,
2377
+ minorTickWidth = 1,
2378
+ tickColor
2379
+ }) => {
2351
2380
  const theme = useTheme3();
2352
- const { startAngle, endAngle, outerRadius, cx, cy } = useGaugeState2();
2381
+ const {
2382
+ startAngle,
2383
+ endAngle,
2384
+ outerRadius,
2385
+ cx,
2386
+ cy
2387
+ } = useGaugeState2();
2353
2388
  const color = isDefined14(tickColor) ? tickColor : theme.vars.palette.text.secondary;
2354
2389
  if (startAngle === null || endAngle === null) {
2355
2390
  return null;
@@ -2365,16 +2400,21 @@ var GaugeTicks = /* @__PURE__ */ __name(({ numTicks = 11, minorTicksPerMajor = 4
2365
2400
  const y1 = cy - tickStart * Math.cos(angle);
2366
2401
  const x2 = cx + innerRadius * Math.sin(angle);
2367
2402
  const y2 = cy - innerRadius * Math.cos(angle);
2368
- ticks.push(/* @__PURE__ */ React.createElement("line", {
2369
- className: `GaugeTick-major-${i}`,
2370
- key: `major-${i}`,
2371
- x1,
2372
- y1,
2373
- x2,
2374
- y2,
2375
- stroke: color,
2376
- strokeWidth: majorTickWidth
2377
- }));
2403
+ ticks.push(
2404
+ /* @__PURE__ */ jsx51(
2405
+ "line",
2406
+ {
2407
+ className: `GaugeTick-major-${i}`,
2408
+ x1,
2409
+ y1,
2410
+ x2,
2411
+ y2,
2412
+ stroke: color,
2413
+ strokeWidth: majorTickWidth
2414
+ },
2415
+ `major-${i}`
2416
+ )
2417
+ );
2378
2418
  if (i < numTicks - 1) {
2379
2419
  const angleStep = totalAngle / (numTicks - 1) / (minorTicksPerMajor + 1);
2380
2420
  for (let j = 1; j <= minorTicksPerMajor; j++) {
@@ -2386,61 +2426,82 @@ var GaugeTicks = /* @__PURE__ */ __name(({ numTicks = 11, minorTicksPerMajor = 4
2386
2426
  const my1 = cy - minorTickStart * Math.cos(minorAngle);
2387
2427
  const mx2 = cx + minorInnerRadius * Math.sin(minorAngle);
2388
2428
  const my2 = cy - minorInnerRadius * Math.cos(minorAngle);
2389
- ticks.push(/* @__PURE__ */ React.createElement("line", {
2390
- key: `minor-${i}-${j}`,
2391
- x1: mx1,
2392
- y1: my1,
2393
- x2: mx2,
2394
- y2: my2,
2395
- stroke: color,
2396
- strokeWidth: minorTickWidth
2397
- }));
2429
+ ticks.push(
2430
+ /* @__PURE__ */ jsx51(
2431
+ "line",
2432
+ {
2433
+ x1: mx1,
2434
+ y1: my1,
2435
+ x2: mx2,
2436
+ y2: my2,
2437
+ stroke: color,
2438
+ strokeWidth: minorTickWidth
2439
+ },
2440
+ `minor-${i}-${j}`
2441
+ )
2442
+ );
2398
2443
  }
2399
2444
  }
2400
2445
  }
2401
- return /* @__PURE__ */ React.createElement("g", {
2402
- className: "GaugeTicks"
2403
- }, ticks);
2404
- }, "GaugeTicks");
2446
+ return /* @__PURE__ */ jsx51("g", { className: "GaugeTicks", children: ticks });
2447
+ };
2405
2448
 
2406
2449
  // src/components/rate/gauge/Container.tsx
2407
- var BlockRateSpeedGaugeContainer = /* @__PURE__ */ __name(({ blockRate, children, gaugeConfig, startAngle = -110, endAngle = 110, width = 200, height = 150, ...props }) => {
2450
+ import { jsx as jsx52, jsxs as jsxs35 } from "react/jsx-runtime";
2451
+ var BlockRateSpeedGaugeContainer = ({
2452
+ blockRate,
2453
+ children,
2454
+ gaugeConfig,
2455
+ startAngle = -110,
2456
+ endAngle = 110,
2457
+ width = 200,
2458
+ height = 150,
2459
+ ...props
2460
+ }) => {
2408
2461
  const { rate, timeUnit } = blockRate || {};
2409
- const { targetBlockRate = 5, targetBlockRateUnit = "minutes", targetPosition = 75, showTicks = true } = gaugeConfig || {};
2462
+ const {
2463
+ targetBlockRate = 5,
2464
+ targetBlockRateUnit = "minutes",
2465
+ targetPosition = 75,
2466
+ showTicks = true
2467
+ } = gaugeConfig || {};
2410
2468
  const converter = BlockRateConversions[targetBlockRateUnit];
2411
2469
  const maxGaugeValue = endAngle;
2412
2470
  const blocksPerMinute = rate === void 0 ? 0 : converter(rate, timeUnit);
2413
2471
  const normalizedValue = Math.min(blocksPerMinute / targetBlockRate * targetPosition, maxGaugeValue);
2414
- return /* @__PURE__ */ React.createElement(GaugeContainer, {
2415
- startAngle,
2416
- endAngle,
2417
- value: normalizedValue,
2418
- valueMax: endAngle,
2419
- innerRadius: "95%",
2420
- outerRadius: "100%",
2421
- ...props,
2422
- sx: {
2423
- width,
2424
- height
2472
+ return /* @__PURE__ */ jsxs35(
2473
+ GaugeContainer,
2474
+ {
2475
+ startAngle,
2476
+ endAngle,
2477
+ value: normalizedValue,
2478
+ valueMax: endAngle,
2479
+ innerRadius: "95%",
2480
+ outerRadius: "100%",
2481
+ ...props,
2482
+ sx: { width, height },
2483
+ children: [
2484
+ showTicks && /* @__PURE__ */ jsx52(GaugeTicks, {}),
2485
+ /* @__PURE__ */ jsx52(GaugeReferenceArc, {}),
2486
+ /* @__PURE__ */ jsx52(GaugeValueArc, {}),
2487
+ /* @__PURE__ */ jsx52(GaugePointer, { startAngle: -2 }),
2488
+ children
2489
+ ]
2425
2490
  }
2426
- }, showTicks && /* @__PURE__ */ React.createElement(GaugeTicks, null), /* @__PURE__ */ React.createElement(GaugeReferenceArc, null), /* @__PURE__ */ React.createElement(GaugeValueArc, null), /* @__PURE__ */ React.createElement(GaugePointer, {
2427
- startAngle: -2
2428
- }), children);
2429
- }, "BlockRateSpeedGaugeContainer");
2491
+ );
2492
+ };
2430
2493
 
2431
2494
  // src/components/rate/gauge/WithLabel.tsx
2432
2495
  import { FlexCol as FlexCol8 } from "@xylabs/react-flexbox";
2433
2496
  import { isDefined as isDefined15 } from "@xylabs/sdk-js";
2434
- var BlockRateSpeedGaugeWithLabel = /* @__PURE__ */ __name(({ blockRate, ...props }) => {
2497
+ import { jsx as jsx53, jsxs as jsxs36 } from "react/jsx-runtime";
2498
+ var BlockRateSpeedGaugeWithLabel = ({ blockRate, ...props }) => {
2435
2499
  const rateUnitLabel = isDefined15(blockRate?.rate) ? rateUnitToLabel(blockRate?.timeUnit) : "";
2436
- return /* @__PURE__ */ React.createElement(FlexCol8, null, /* @__PURE__ */ React.createElement(BlockRateSpeedGaugeContainer, {
2437
- blockRate,
2438
- ...props
2439
- }), /* @__PURE__ */ React.createElement(BlockRateSpeedTypography, {
2440
- rate: blockRate?.rate,
2441
- rateUnitLabel
2442
- }));
2443
- }, "BlockRateSpeedGaugeWithLabel");
2500
+ return /* @__PURE__ */ jsxs36(FlexCol8, { children: [
2501
+ /* @__PURE__ */ jsx53(BlockRateSpeedGaugeContainer, { blockRate, ...props }),
2502
+ /* @__PURE__ */ jsx53(BlockRateSpeedTypography, { rate: blockRate?.rate, rateUnitLabel })
2503
+ ] });
2504
+ };
2444
2505
 
2445
2506
  // src/stories/ChainArchivistDecorator.tsx
2446
2507
  import { CircularProgress } from "@mui/material";
@@ -2448,44 +2509,33 @@ import { usePromise as usePromise4 } from "@xylabs/react-promise";
2448
2509
  import { buildRandomBlockChain } from "@xyo-network/react-chain-shared";
2449
2510
  import { ArchivistConfigSchema, MemoryArchivist } from "@xyo-network/sdk-js";
2450
2511
  import { flattenHydratedBlocks } from "@xyo-network/xl1-sdk";
2451
- import React46, { useEffect as useEffect5 } from "react";
2512
+ import { useEffect as useEffect5 } from "react";
2452
2513
 
2453
2514
  // src/lib/getChainId.ts
2454
2515
  import { toAddress as toAddress2 } from "@xylabs/sdk-js";
2455
2516
  var id = toAddress2("ce080bf3043a40c6c8838c7e813c00ab53df1684");
2456
- var getChainId = /* @__PURE__ */ __name(() => {
2517
+ var getChainId = () => {
2457
2518
  return id;
2458
- }, "getChainId");
2519
+ };
2459
2520
 
2460
2521
  // src/stories/ChainArchivistDecorator.tsx
2461
- var ChainArchivistDecorator = /* @__PURE__ */ __name((Story, { args, ...context }) => {
2522
+ import { jsx as jsx54 } from "react/jsx-runtime";
2523
+ var ChainArchivistDecorator = (Story, { args, ...context }) => {
2462
2524
  const [randomBlockChain] = usePromise4(async () => await buildRandomBlockChain(), []);
2463
2525
  const [blockChainRenderProps, blockChainRenderPropsError] = usePromise4(async () => {
2464
2526
  if (randomBlockChain) {
2465
- const chainArchivist = await MemoryArchivist.create({
2466
- config: {
2467
- schema: ArchivistConfigSchema,
2468
- name: "ChainArchivist"
2469
- }
2470
- });
2527
+ const chainArchivist = await MemoryArchivist.create({ config: { schema: ArchivistConfigSchema, name: "ChainArchivist" } });
2471
2528
  const flattened = flattenHydratedBlocks(randomBlockChain);
2472
2529
  await chainArchivist.insert(flattened);
2473
2530
  const chainId = await getChainId();
2474
- return {
2475
- chainArchivist,
2476
- chainId
2477
- };
2531
+ return { chainArchivist, chainId };
2478
2532
  }
2479
- }, [
2480
- randomBlockChain
2481
- ]);
2533
+ }, [randomBlockChain]);
2482
2534
  useEffect5(() => {
2483
2535
  if (blockChainRenderPropsError) {
2484
2536
  console.error(blockChainRenderPropsError);
2485
2537
  }
2486
- }, [
2487
- blockChainRenderPropsError
2488
- ]);
2538
+ }, [blockChainRenderPropsError]);
2489
2539
  const props = {
2490
2540
  ...context,
2491
2541
  args: {
@@ -2497,8 +2547,8 @@ var ChainArchivistDecorator = /* @__PURE__ */ __name((Story, { args, ...context
2497
2547
  }
2498
2548
  }
2499
2549
  };
2500
- return blockChainRenderProps?.chainArchivist ? /* @__PURE__ */ React46.createElement(Story, props) : /* @__PURE__ */ React46.createElement(CircularProgress, null);
2501
- }, "ChainArchivistDecorator");
2550
+ return blockChainRenderProps?.chainArchivist ? /* @__PURE__ */ jsx54(Story, { ...props }) : /* @__PURE__ */ jsx54(CircularProgress, {});
2551
+ };
2502
2552
 
2503
2553
  // src/stories/ChainArchivistDelayedInsertDecorator.tsx
2504
2554
  import { CircularProgress as CircularProgress2 } from "@mui/material";
@@ -2507,21 +2557,17 @@ import { delay } from "@xylabs/sdk-js";
2507
2557
  import { buildRandomBlockChain as buildRandomBlockChain2 } from "@xyo-network/react-chain-shared";
2508
2558
  import { ArchivistConfigSchema as ArchivistConfigSchema2, MemoryArchivist as MemoryArchivist2 } from "@xyo-network/sdk-js";
2509
2559
  import { flattenHydratedBlock } from "@xyo-network/xl1-sdk";
2510
- import React47, { useEffect as useEffect6, useState as useState20 } from "react";
2560
+ import { useEffect as useEffect6, useState as useState20 } from "react";
2561
+ import { jsx as jsx55 } from "react/jsx-runtime";
2511
2562
  var chainArchivistRef;
2512
- var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, context) => {
2563
+ var ChainArchivistDelayedInsertDecorator = (Story, context) => {
2513
2564
  const [firstBlock, setFirstBlock] = useState20();
2514
2565
  const [randomBlockChain] = usePromise5(async () => await buildRandomBlockChain2(), []);
2515
2566
  const [chainArchivist] = usePromise5(async () => {
2516
2567
  if (chainArchivistRef) {
2517
2568
  return chainArchivistRef;
2518
2569
  } else {
2519
- chainArchivistRef = await MemoryArchivist2.create({
2520
- config: {
2521
- schema: ArchivistConfigSchema2,
2522
- name: "ChainArchivist"
2523
- }
2524
- });
2570
+ chainArchivistRef = await MemoryArchivist2.create({ config: { schema: ArchivistConfigSchema2, name: "ChainArchivist" } });
2525
2571
  return chainArchivistRef;
2526
2572
  }
2527
2573
  }, []);
@@ -2534,26 +2580,16 @@ var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, contex
2534
2580
  await delay(1e3);
2535
2581
  }
2536
2582
  }
2537
- }, [
2538
- chainArchivist,
2539
- randomBlockChain
2540
- ]);
2583
+ }, [chainArchivist, randomBlockChain]);
2541
2584
  useEffect6(() => {
2542
2585
  if (delayedInsertError) {
2543
2586
  console.error(delayedInsertError);
2544
2587
  }
2545
- }, [
2546
- delayedInsertError
2547
- ]);
2588
+ }, [delayedInsertError]);
2548
2589
  const [blockChainRenderProps] = usePromise5(async () => {
2549
2590
  const chainId = await getChainId();
2550
- return {
2551
- chainArchivist,
2552
- chainId
2553
- };
2554
- }, [
2555
- chainArchivist
2556
- ]);
2591
+ return { chainArchivist, chainId };
2592
+ }, [chainArchivist]);
2557
2593
  const { args } = context;
2558
2594
  const props = {
2559
2595
  ...context,
@@ -2566,8 +2602,8 @@ var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, contex
2566
2602
  }
2567
2603
  }
2568
2604
  };
2569
- return firstBlock ? /* @__PURE__ */ React47.createElement(Story, props) : /* @__PURE__ */ React47.createElement(CircularProgress2, null);
2570
- }, "ChainArchivistDelayedInsertDecorator");
2605
+ return firstBlock ? /* @__PURE__ */ jsx55(Story, { ...props }) : /* @__PURE__ */ jsx55(CircularProgress2, {});
2606
+ };
2571
2607
  export {
2572
2608
  AccountBalanceHistoryFlexBox,
2573
2609
  AccountBalanceHistoryTableEx,
@@ -2644,4 +2680,4 @@ export {
2644
2680
  usePayloadCountsFromBlock,
2645
2681
  useTxsFromBlock
2646
2682
  };
2647
- //# sourceMappingURL=index.mjs.map
2683
+ //# sourceMappingURL=index.mjs.map